Jump to content

Hugo Qwerty

Member
  • Posts

    325
  • Joined

  • Last visited

Everything posted by Hugo Qwerty

  1. The delay seems to be caused by the game checking whether every item in the list is a duplicate of all other items in the list. The more items in the list the worse it gets. Some details in a post here:
  2. No idea if this will work, but you could try inserting them via their unicode values. Something like: "\u00df" for ß (or just "\udf", not sure if the leading zeros are required). https://dirask.com/posts/Java-insert-unicode-character-to-string-1xy2bD https://en.wikipedia.org/wiki/List_of_Unicode_characters
  3. Tree branches always spawn in pairs, the forage definition suggests they should spawn either 1 or 2. TreeBranch = { type = "Base.TreeBranch", minCount = 1, maxCount = 2, ... } Line 501 of /media/lua/client/Foraging/ISBaseIcon.lua is: self.itemCount = ZombRand(self.itemDef.minCount, self.itemDef.maxCount) + 1; Using the tree branch numbers, Zombrand(1,2) will only ever return 1, so they always spawn 1+1 branches. Suggested fix: self.itemCount = ZombRand(self.itemDef.minCount, self.itemDef.maxCount + 1) ZombRand(1,3) will return either 1 or 2, which seems to be the desired outcome. The bug impacts any item with min and max values in the definition, not just tree branches.
  4. I've never done any mapping, but in my files the name value is never 'parkingstall', its either empty or a special value (MassGenFac, network3, spiffo, good, etc.) If it makes any difference, vanilla parking stalls are in objects.lua rather than worldobjects.lua
  5. I can't think of any way to do that. You could make clay pot so big it won't fit into an electric oven, but it would still fit in the antique oven and barbecue. I suppose you could write your own code to check the player is next to a lit campfire, and use that within an OnTest function as part of a recipe.
  6. Looks like you will need to add a translation. Create the following file: \media\lua\shared\Translate\EN\ContextMenu_EN.txt Paste the following into the file, save, reload - that should fix it. ContextMenu_EN = { ContextMenu_EvolvedRecipe_Hotdog = "Hotdog", }
  7. I've seen mods overwrite loot tables - wiping them of anything that was supposed to spawn in some containers - so one of the mods might be doing that.
  8. Just done a quick search, the journal item is only listed on one loot table: "sidetable", not wure which containers that is - bed side drawers perhaps? or maybe those small table with a drawer you find in living rooms? Full tables is: "BluePen", 1, "ComicBook", 4, "Disc_Retail", 2, "Eraser", 2, "Journal", 4, "Magazine", 10, "Magazine", 10, "Newspaper", 4, "Notebook", 2, "Paperclip", 4, "Pen", 2, "Pencil", 4, "RedPen", 1, "SheetPaper2", 20,
  9. The game doesn't let you use rotten items unless the reciepe specifies "AllowRottenItem:true" - and none of the butcher recipes have that.
  10. I suspect one is redeclaring the item in a script, and the other is using DoParam via Lua to edit the item.
  11. Tested in debug mode, can confirm the Make Metal Sheet recipe does not work if the Welder Mask is favourited. Didn't check any other recipes. Had a quick look at the decompiled code, I think this is caused by function getItemsFrom(ArrayList<RMRecipeItem> arrayList, RMRecipe rMRecipe) in private static final class RMRecipeItemList, specifically the following code: || "Clothing".equals(rMRecipeItem.item.getCategory()) && rMRecipeItem.item.isFavorite() I assume the code is there to stop someone from losing a favourited item of clothing, e.g. ripping up all items of clothing. Maybe the code could be tweaked to allow favourited items where the recipe specifies the item as keep X? (although that could cause an issue if a recipe ever damages clothes even if they are 'keep', just like how crafting spears damages a knife but for clothes).
  12. *Wet. Wet your whistle, whet your appetite. I aassume this will change in B42, but at present the animation for plowing soil is hard-coded to the tool type. Can you tweak this to allow modded garden tools so they don't all default to the shovel animation unless they re-use the same item name? For example, for a mod I'm working on I overwrite this function. Vanilla: ISFarmingMenu.getShovelAnim = function(item) if not item then return CharacterActionAnims.Dig end if item:getType() == "HandShovel" or item:getType() == "HandFork" then return CharacterActionAnims.DigTrowel elseif item:getType() == "GardenHoe" then return CharacterActionAnims.DigHoe elseif item:getType() == "PickAxe" then return CharacterActionAnims.DigPickAxe else return CharacterActionAnims.DigShovel end end My Mod: ISFarmingMenu.getShovelAnim = function(item) if not item then return CharacterActionAnims.Dig end if string.find(item:getType(), "HandShovel") or string.find(item:getType(), "HandFork") then return CharacterActionAnims.DigTrowel elseif string.find(item:getType(), "GardenHoe") then return CharacterActionAnims.DigHoe elseif string.find(item:getType(), "PickAxe") then return CharacterActionAnims.DigPickAxe else return CharacterActionAnims.DigShovel end end This tweak means I don't have to use MyModStone.GardenHoe, MyModCopper.GardenHoe, MyModBronze.GardenHoe etc.
  13. Build 42 will significantly change how liquids in containers work. https://projectzomboid.com/blog/news/2022/07/liquid-zedball/
  14. Is this single player or multi player? Some multiplayer servers delete some items from the floor, to stop the world beoming cluttered with junk.
  15. Correct, but in my case that wasn't an issue as the spawn location was deep inside the military base, so it would be there by the time the player arrived (probably). I don't know of any, but there might be some that use a technique I don't know about.
  16. There's probably a better way, but the way I coded this in Hydrocraft was using Events.EveryHours.Add(function), and checking the square was loaded (not nil) before calling AddWorldInventoryItem. You'd also need (I assume) some mechanism for only doing this once. In the code I wrote I didn't need that as I wanted an item to keep respawning, all I added was a check to see if the item was there already so it didn't spawn more than one at the same. I've seen mods using the bad for performance option seemingly without issue, the Insurgent mod does that I believe.
  17. You can already go and live away from all the zombies. The incentive will always be on the player wanting to go killing zombies, not the gaming forcing them to.
  18. private void initSpawnBuildings() { for (int i = 0; i < this.SpawnPoints.size(); ++i) { IsoGameCharacter.Location location = this.SpawnPoints.get(i); RoomDef roomDef = IsoWorld.instance.MetaGrid.getRoomAt(location.x, location.y, location.z); if (roomDef == null || roomDef.getBuilding() == null) { DebugLog.General.warn("initSpawnBuildings: no room or building at %d,%d,%d", new Object[]{location.x, location.y, location.z}); continue; } this.SpawnBuildings.add(roomDef.getBuilding()); } } public boolean isSpawnBuilding(BuildingDef buildingDef) { return this.SpawnBuildings.contains((Object)buildingDef); } (decompiled by http://www.javadecompilers.com) This is the code that is causing that message to be displayed. All it appears to be doing is storing every spawn building in a list, so it can be checked later (via isSpawnBuilding) and if the spawn point isn't in a building it prints that message. There is no error being thrown, no code fails to execute (apart from not adding the building to a list, which is fine because there is no building). If some of the locations aren't working it is unrelated to that message.
  19. Hugo Qwerty

    Nil value

    'Tried to call nil' means the method being called does not exist. Presumably because its looking for a function that takes an argument (true), whereas the one you posted does not.
  20. I've just tried spawning at the location mentioned in the 1st post - it worked as normal, no errors. {worldX = 22, worldY = 41, posX = 141, posY = 27} If you post some more locations I can try those and see if I can replicate the problem.
  21. I've seen this before with a standard water bottle, emptying the bottle fixed it for me. I think the issue is that, somehow, the pot is full enough that there isn't room for another unit of water. The pot can store 25 units of water but the amount of water is stored as a loating point number, e.g. 24 units in the pot is stored as .96. Computers are bad at storing floating put numbers, so the pot could be at .9600001 of capacity and it would be 'too full' to accept another 0.04 off water. Similar to the issue with the unusable 10th charge on propane torches.
  22. I don't think that message is an error, just a warning that you might have used an exterior location by mistake. From looking at the code I don't see why this would cause a problem, and I know lots of mods spawn players outside. It looks like the game records which buildings are spawn buildings, I vaguely recall that is a factor re whether a building can be a safe house (as you probably don't want new players spawning inside someone else's safe house).
  23. I think such a mod already exists, I heard it talked about on a Twitch stream recently. No idea what the mod is called unfortunately. Maybe this mod? - https://steamcommunity.com/sharedfiles/filedetails/?id=2833580252
  24. The icon is in /media/texturepacks/UI2.pack (No idea how to actually edit these files) Textures are in the /media/scripts/WorldItems/ directory.
  25. Not something I've looked at before, but I assume eating an item is not the same as using an item. You could try giving the player the bong back within the OnEat_BottleBongFull function.
×
×
  • Create New...