Jump to content

Xyberviri

Member
  • Posts

    34
  • Joined

  • Last visited

Everything posted by Xyberviri

  1. Sorry i diverged there for a sec, this was about allowing end users to customize if a object is going to get added to the loot tables entirely by using a sandbox option. I would rather not resort to having a "EnableSettingA,EnableSettingB,EnableSettingC, etc, etc, etc" mod just to enable a setting. I guess i could break up the items and assets into sub mods and just tell people to load the options they want and build my settings based off that if i really had to. It appears the game has a copy of the loot tables in the java side and the "real" loot tables get built when ItemPickerJava.Parse() is called, If we wait until OnInitGlobalModData we have access to the sandbox variables but we cant add anything to SuburbsDistributions or ProceduralDistributions. Well correction, anything we insert appears to be in the loot tables when you inspect a container with lootzed but its never going to actually drop, i tried turning up the weight to 100 and had loot showing 97% against everything else and nothing ever dropped. but if you just deal with loot in OnPostDistributionMerge, your added items actually drop in game. All good i figured out i can just call ItemPickerJava.Parse() and it loads my changes.
  2. Hi, sorry for the late reply, the main reason is when i want to add my own sand box variables to allow the end users to adjust the rarity of the items I'm adding to the game itself, whatever weight i end up choosing to add my items a server owner / end user will inevitably ask for the ability to adjust my items to spawn more or less than whatever i choose. Alternatively i would like the ability to turn off the spawning of some of my items depending on the sandbox options a user sets. Also the reason this appears to be a bug, or at least not intentional is when you start a new game or host the sandbox variables are accessible in these events. If you restart the server/reload the game these is no longer accessible until later, so the behavior is inconsistent depending on how the game world is started.
  3. Hello, I noticed in IsoWorld.java we are loading the Sandbox options after firing off the Distribution events, a lot of mods that deal with loot (including my self) are loading things into the loot tables around these events, would it be possible to load the sandbox options before these events so we can have access to sandbox variables before Distribution tables are messed with? LuaEventManager.triggerEvent("OnPreDistributionMerge"); LuaEventManager.triggerEvent("OnDistributionMerge"); LuaEventManager.triggerEvent("OnPostDistributionMerge"); ItemPickerJava.Parse(); VehiclesDB2.instance.init(); LuaEventManager.triggerEvent("OnInitWorld"); if (!GameClient.bClient) { SandboxOptions.instance.load(); } The big issue with this is if a mod implements their own sandbox options we cant really do anything with loot until OnInitGlobalModData or OnLoadMapZones fires off, if we want to change loot we have to go back and remove stuff which takes a boat load of time. Sure if i want to hard code things no problem, but if I want a end user to be able to change any settings, again im sort of just out of luck unless im willing to go back though the tables with lua and slow down loading for a user. The alternative requires end users have to create a server mod to their settings via lua files which still have to be distributed, this is why we have a billion Arsenal26ServerSettings mods clogging up the workshop.
  4. Hello, Can we get a sandbox option so that the server owners can increase the distance that generators make noise for zombies to hear? not the actual sound but the invisible world sound ping that occurs when you are in debug mode viewing the zombie population.
  5. A better suggestion would be for each of the starting professions to have better starting items. For example of the mods that deals with addiction adds a can of beer and cigarette to the starting character when picking the alcoholic or smoker trait.
  6. Not sure if its a mistake or if i missed a patch note, but In previous builds the "vehicle remove" client command was accessible to players with out any admin rights on a server. I tried turning off all the anti cheats and none of those allow this to work as a player with out admin rights. I set the player as admin and then called this again and poof the vehicle was gone. sendClientCommand(getPlayer(), "vehicle", "remove", { vehicle = getPlayer():getNearVehicle():getId() }) For chuckles i copied the contents of this into my own client command and im able to remove vehicles as non admins on multiplayer servers again. So this appears to be blocked via the engine itself, can we get a anti cheat setting to override this so admin is not needed by the player? Edit: This appears to have been fixed around 41.77 perhaps ever earlier, this post can be locked at anytime.
  7. Ah thanks for the tip I played with this the other day with another object and didnt think about checking the container that way. that gives me somethign to work with.
  8. Ah no, that doesnt appear to be working either, i also tried OnReceiveGlobalModData, OnGameTimeLoaded & OnLoginStateSuccess local function TestVars(location,event) print("SandBox Variable "..location.." "..event.." Test boolean value: ".. tostring(SandboxVars.SandTest.isTrue)) print("SandBox Variable "..location.." "..event.." Test boolean value: ".. tostring(getSandboxOptions():getOptionByName("SandTest.isTrue"):getValue())) end Events.OnGameStart.Add(TestVars("server","OnGameStart")) Events.OnLoad.Add(TestVars("server","OnLoad")) Events.OnServerStarted.Add(TestVars("server","OnServerStarted")) Events.OnPostMapLoad.Add(TestVars("server","OnPostMapLoad")) Events.OnInitGlobalModData.Add(TestVars("server","OnInitGlobalModData")) Events.OnReceiveGlobalModData.Add(TestVars("server","OnReceiveGlobalModData")) Events.OnGameTimeLoaded.Add(TestVars("server","OnGameTimeLoaded")) Events.OnLoginStateSuccess.Add(TestVars("server","OnLoginStateSuccess")) I also have a copy of this in server and shared.... sandbox options seem broke... i guess if there is a way to read the ini files directly i can try sneaking back up one up and over via lua and see if that works. but at this point its easier to use mod options. This is all in single player and local hosts ive tested, ive even uploaded it to a test server and i get the same results. sandbox options are broken until some event i havent found yet. they work once i join the game and try to test it with debug console but i cant figure out how to use them with mods on launch of a server yet.
  9. the issue is with this tile Fortwater front has the exact same rails on the upper level over the garage in the main house and it blocks that southern tile.
  10. So i wrote this to trouble shoot a issue i was seeing with trying to mess with loot from my mod, i wanted to change some mod data on the items that spawn on zombies but not ones that were crafted or spawned in by a admin. The issue is im only able to see the items worn on a zed when this event fires. local function zombieDead(zombie) local inv = zombie:getInventory():getItems(); for i = 0, inv:size() - 1 do local item = inv:get(i) print("ZEDLOOT: "..item:getFullType()) end end Events.OnZombieDead.Add(zombieDead); If i kill a zombie only the items on that zombie are being returned when i get the inventory. The Hand Fork on this zombie was in its back here is another one where the matches and wallet had to be added after the event fires: this one wasnt able to see the lighter. Im trying to figure out if this is intended behavior or if there is something else up since the only use cases in the game of this event aren't dealing with the inventory of the corpse. And other mods all seem to just be checking for the outfit to see if they want to add inventory not mess with existing. But the issue is im going to have to write my own loot tables if i want to do that.
  11. sadly I'm finding more and more you will need to do some convoluted work around because code just doesn't work the way you think it should.
  12. Why do you need the recipe name? You can add whatever extra info you need on the end result item you are creating: item CarLights { DisplayCategory = CarWanna, Weight = 0.1, Type = Normal, Icon = AutoTitle, DisplayName = PinkSlip: Chevalier Nyala, VehicleID = Base.CarLights, WorldStaticModel = CW.AutoTitle, Tooltip = Tooltip_ClaimOutSide, Condition = 100, GasTank = 100, HasKey = true, } And then use one function on the recipe to create the item, heck in this case im using the input item to get my extra data: recipe Claim Vehicle { CarLights/CarLightsPolice/CarLuxury/CarNormal, //truncated for post Result: Base.CarKey, Time: 50.0, OnCanPerform:Recipe.OnCanPerform.CW_ClaimVehicle, OnCreate:Recipe.OnCreate.CW_ClaimVehicle, RemoveResultItem:True, } then in OnCreate i can access the data in "VehicleID" using getModData() function Recipe.OnCreate.CW_ClaimVehicle(items, result, player) local pinkslip = items:get(0) if not player:isOutside() or player:getZ() > 0 then --This should be caught with Recipe.OnCanPerform.CW_ClaimVehicle, but if we get here somehow give player back the pinkslip. player:Say("This wont work unless im standing on the ground outside...") player:getInventory():AddItem(pinkslip) else local modData = pinkslip:getModData() local requestedVehicle = { type = modData.VehicleID } if (type(modData.Condition) == "number") then requestedVehicle.condition = modData.Condition end if (type(modData.GasTank) == "number") then requestedVehicle.gastank = modData.GasTank end if (type(modData.FuelTank) == "number") then requestedVehicle.fueltank = modData.FuelTank end if modData.HasKey then requestedVehicle.makekey = true end if modData.Upgraded then requestedVehicle.upgrade = true end requestedVehicle.dir = player:getDir(); requestedVehicle.clear = true sendClientCommand(player, "CW", "spawnVehicle", requestedVehicle ) end I did use the input items but i could have just used the result and pulled the data the same way with getModData()
  13. Just make the recipe invalid if the mod isnt installed: module MyModID { imports { Base } recipe Buy AN/PRC-77 Radio Man Pack { Money=1, Result: Bag_ARVN_Rucksack, Time: 50.0, OnCanPerform:Recipe.OnCanPerform.CanBuyFromBritaArmor } } function Recipe.OnCanPerform.CanBuyFromBritaArmor(recipe, playerObj, item) return getActivatedMods():contains("Brita2") end
  14. oh neat.... oh... it uses python... welp guess i wont be using that... mostly cause the last discord bot i tried to do anything with in python ended horribly
  15. What is the correct scale for importing/exporting things with blender? the issue i have is when i import anything its scale gets all messed up on import, even models i have made exported, tweaked until i got them working the correct size i have later imported and they were scaled smaller than the original model.
  16. Just remove the straw from you default distribution list and merge it into that one if a option is true. Or put it in its own table and wrap the add that in, though looking at your code it looks like you are replacing the default lists in game and not adding to them. They already have code that does all that work for you, use this command to remove the item from all of the tables, just keep in mind its a little costly, but only happens on startup so once that is done the player never has to deal with it again. require "Items/SuburbsDistributions" RemoveItemFromDistribution(Distributions[1], "Straw",nil, true); Also just a heads up, make sure to put on your mod page that Mod Options works for servers, the host just needs to upload the zomboid\lua\mod-options.ini file to the same folder on the server for the server to read the settings. however the brand new Loot debug option will be broken because the loot tables on the server/client side wont match so you wont be able to use this new option they added in 46.71 to see loot tables :(, but loot will work because i added stuff to zombies and im seeing it drop. If you really really really want the server side mod options to match the client side you need to do message or extra mod shenanigans like the billion arsenal26 mods we see on the workshop. (it doesnt matter because again loot is server side, i confirmed this on my own mod) Also as you might have figured out sandbox variables are broken after restarting server or reloading a single player game during that event.
  17. yep on my server were playing with 3 hours to 1 day setting.... well that post explains it, guess it should be fixed on the next patch.
  18. I created a mod that adds some items to the loot table, I decided to add some sandbox-options for the player enable the setting if they dont want parts of it going out. I noticed im only able to read sandboxvars on the creation of a single player game the first time its created. On following reloads the sandboxvars are not avalible until after i load in the game which causes lua code to bomb out if where messing with the loot table. option CarWanna.EnablePinkSlipLoot = { type = boolean, default = false, page = CarWanna, translation = CarWanna_EnablePinkSlipLoot, } then in media\lua\server\items\whatever.lua print("CarWanna Loot Enabled".. tostring(SandboxVars.CarWanna.EnablePinkSlipLoot)) this will report true the firs time i start a new game, but every time after that i see false in the console.txt. but if i start the game in debug mod and type the following in my lua console: print( SandboxVars.CarWanna.EnablePinkSlipLoot ) I will see variable as true, this seems like a bug because the issue occurs on reloads of the same save file, but not on initial creation. I tried sticking this in Events.OnGameStart but im guessing maybe i need to wait for a later event as a work around. its 2:39am and i wanted to type this up before trouble shooting event orders, so ill test that in the morning. edit: tried OnPreDistributionMerge ,OnLoad,OnServerStarted,OnPostMapLoad, all of them seem to no see the sandbox variables except on first boot.... I can read it with the lua console when i join so i know at some point its loaded, I just cant read it with scripts. I also tried getSandboxOptions and that isnt loading the current config during those events.
  19. we just did a steam update on our server and after that the issue was resolved
  20. The issue is there is no real way to tell server operators that a steam update has occured other than for a player to just simply notice steam updated a file. Especially when there are no notes provided with the build, you cant even right click on the update and look at anything. Most people dont have their servers configured to check for updates at every restart. Im looking for a api feed that doesnt cost money so i can at least get some notification that a steam update has occured the best i have found so far is im going to have to either pay 100$ to get a publisher id from steam or pay 1$/month to steamapi so i can get a data feed for when the game is updated.
  21. does your weight ever decrease? On the server i play on since last save we can only gain weight. No matter what we try we cant lose weight, ill need to check if the nutrition is checked.
  22. Did you not see that this was originally posted in 2014 and the last post is from 2016? You shouldnt necro a forum post that is older than a year, let alone one that is 6 years old.
  23. It appears if the model is tall enough it gets cut off when rendered this way. definitely based on height
  24. It appears if the model is tall enough it gets cut off when rendered this way. definitely based on height Oh also what is the deal with importing models and the scaling???? like i spend hours trying to export things out of blender with different scaling only to have to put in different numbers in model config i honestly have such a hard time dealing with models in this games engine i makes me want to pull my hair out half the time.
×
×
  • Create New...