Jump to content

Search the Community

Showing results for tags 'solved'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News & Announcements
    • News
  • Project Zomboid
    • PZ Updates
    • General Discussions
    • Bug Reports
    • PZ Support
    • PZ Multiplayer
    • PZ Community & Creativity
    • PZ Suggestions
  • PZ Modding
    • Tutorials & Resources
    • Mods
    • Items
    • Mapping
    • Mod Ideas and Requests
  • General Games Development
    • Indie Scene
  • Other Discussions
    • General Discussion
    • Forum Games & Activities

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







  1. I'm wondering if it is possible to add code to another mods custom function. The mod I'm trying to add to is called "Rename Containers" My goal is to run the vanilla "ISInventoryPage:refreshBackpacks()" function when the Rename Containers mod calls the following function. Now for vanilla, you do this... However, when I try this method with Rename Containers function (as shown below), it never gets run. I think it makes sense why the above code would not run, but I'm wondering what (if at all possible) is the correct way to go about this. Thank you
  2. Hello forum, I wanted to try modding Project Zomboid so for the past day or two I have been making a barbwire baseball bat mod (that works like the nail bat) using posts from here at the forum and the PZ modding wiki. I've almost finished the core of the mod which is just the weapon, the repair scripts, model , & texture(s) and everything works fine until you strike with the weapon. There seems to be a 1/5(and if not the first, then at some point in the next four swings) chance that the game fades to black with error codes like (1,2,3,4,5, or 6) just a single number seemingly increasing by one with every crash. This has happened when striking a zombie or just swinging in the air, but only when my character swings the bat, not while idle with it. the screen fades to black and then loads the main menu. Ive narrowed it down in the debug logs to this one line that seems to cause the crash, ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "zombie.inventory.types.HandWeapon.getSwingAnim()" because "<parameter1>.bareHands" is null at SwipeStatePlayer.CalcAttackVars line:651.. I've looked up "zombie.inventory.types.HandWeapon.getSwingAnim()" through this page https://projectzomboid.com/modding/zombie/inventory/types/HandWeapon.html and am not entirely sure what is going wrong. I will attach the mod itself (forgive me if its formatted oddly or if i made some mistakes of somekind, and please let me know if i did) so you can see for yourself. I have attached the FBX model file for the bat the Fixing script the weapon script itself and mod.info And if you want to recreate the error for yourself here is a dropbox link to all of the Mod https://www.dropbox.com/scl/fo/ru8vdce4b3sqtkftwndmz/h?rlkey=0l3mq81dvlgx2oiy5h798gl8z&dl=0 the work folder in their is just to keep track of files I was using. And help is greatly appreciated! edit: rewording WiredBaseballBat.fbx fixing.txt items_weapons.txt mod.info
  3. OS: SteamOS 3.5 Server hosting gets to "Obtaining server information" before stopping during launch with a normaltermination error. I've tried using -novoip, compatibility mode, and various different server settings. Crash still occurs with no mods. (ignore the config name, was just a random name i remembered before i looked up who it actually was ) 19-10-23_20-33-46_DebugLog-server.txt
  4. I making sounds for characters, but zombies don’t hear character sounds for some reason , works through getSoundManager():PlaySound, tried through getSoundManager():PlayWorldSound, but zombies still do not hear. if player:isFemale() then local femalesounds = "FemaleScream"..tostring(ZombRand(5)); local femalesoundsplay = getSoundManager():PlaySound(femalesounds,false,0); -- getSoundManager():PlayAsMusic(femalesounds,femalesoundsplay,false,0); else local malesounds = "MaleScream"..tostring(ZombRand(5)); local malesoundsplay = getSoundManager():PlayWorldSound(malesounds, isoGridSquareInstance, 0.5, 10.0, 1.0, 3, true);); -- getSoundManager():PlayWorldSound(malesounds,malesoundsplay,false,0); end How can i fix this?
  5. Hi i have a big container item filled with alcohol that does not deplete itself when i refill empty bottles. it works fine if i take a tumbler and fill if from there but does not when i refill empty container via recipe. any insights are appreciated at the moment the keep in the recipe makes sure the container does not dissapear after crafting but also does not update the reduced value after pouring contents into a empty bottle Wine Can item item Alc_DistillPotSmallNEW { DisplayName = Distill Pot Small filled New(Spirit), DisplayCategory = Food, Type = Food, Weight = 1, Icon = WaterDistillPotSmall,, EvolvedRecipe = Beverage:4;Beverage2:4;HotDrink:4;HotDrinkRed:4;HotDrinkWhite:4;HotDrinkSpiffo:4;HotDrinkTea:4;WineInGlass:4;PastaPot:4;PastaPan:4, EvolvedRecipeName = Moonshine, FoodType = Wine, Alcoholic = TRUE, CantBeFrozen = TRUE, EatType = Bourbon, Packaged = TRUE, ReplaceOnUse = WineEmpty2, UseDelta = 0.04, ReplaceOnDeplete = BucketEmpty, HungerChange = -20, ThirstChange = -20, UnhappyChange = -20, Calories = 510, Carbohydrates = 0, Lipids = 0, Proteins = 0, CustomContextMenu = Drink, CustomEatSound = DrinkingFromBottleGlass, StaticModel = model_distill_small, WorldStaticModel = distill_small_Ground, } and my recipe for making a few bottles recipe Make 2 Bottles of Moonshine { CanBeDoneFromFloor:True, keep Alc_DistillPotSmallNEW/Alc_DistillPotSmall, WhiskeyEmpty=2, Result:WhiskeyRefill=2, Time:80.0, Category:Cooking, OnGiveXP:Recipe.OnGiveXP.None, OnCanPerform:Recipe.OnCanPerform.SliceCooked, } Thank you!
  6. Hello, I'm still learning the building tools a bit and to learn manual roofing a bit more, I tried rebuilding some Sims 1 houses, as I remembered them having somewhat complex roofs due to their unusual shapes. Now the roof looks fine in the editor and was build in tile mode on the roof layer (I also tried putting the top part on roof 2, with no changes), but ingame it seems that layering is all over the place and parts that should be behind the top part, are drawn right above it. Does anyone know how to fix it or what I could have done wrong to avoid these problems in the future?
  7. Hi ! I am creating a mod to change the name of the item category. For example in an unmoded game, a scissors will be in the category weapon but after modification it will be in the category tailoring. The idea is to combine these changes with the mod manage container ( https://steamcommunity.com/sharedfiles/filedetails/?id=2650547917 ) for me and my friend to fully enjoy it without having to modify one by one each container. So far, I have succeeded and I know how to change the category names of items. I simply copied and pasted the items_food.txt file, from the game directory ( C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\scripts\items_food.txt ) to my mod repertory and in it I only change the DisplayCategory. Here is an exemple of the code for one item.
  8. I'm trying to add my own tooltip after the default DoTooltip, so i try to implement the steps in Lua. The problem is that it seems to not like calling Java method and passing a double parameter. Code : ERROR Log :
  9. I need to set a variable to the number of days that have passed since the apocalypse first started, in order to determine if certain zombie types have evolved yet or not (imagine a certain zombie starts appearing after 30 days, for example) Functions like "getGameTime():getDay()" only get the current day of the month, and "getGameTime():getDaysSurvived()" resets whenever the player dies, so that won't work either. I would think there is a built in variable for this, used to determine things like the level of erosion in the world? Is there a more practical way to do this besides doing all the math to compare the starting day/month/year to current day/month/year? Thank you for the help!
  10. " There is no preview.png file in the folder you chose." I have tried 6 ways to sunday to get this to work, no matter what image I use, what size (it says 256x256) and it's in the correct location C:\Users\derp\Zomboid\Workshop\derp\Contents\mods\derp <---- within that folder is the Media folder, mod.info and poster.png. I tried using my own image I made for the mod with the right size, and .png format and I always get the same error: " There is no preview.png file in the folder you chose." I've also renamed it to preview.png to no avail I even copied the poster.png image from the template folder and get the same error. I've looked at other creators mods, the file structure, the image type and where it's located. (I know downloaded mods are in a different location than where they need to be to get uploaded) If I had any hair left, I would pull it out. What am I doing wrong?
  11. Okay so I cant seem to get this to change. These are the steps I do. File: New (Create a 2x2) I then drag my 600x600px image into it (Yes I have a _veg file too) File BMP To TMX - I assign maps to the world and replace existing maps then hit okay Then nothing generates but it says finished. If I open a tile its the way it needs to be but it doesnt update the map and then it always overwrites my work on every load. PS. I can get this to work after I uninstall all files and such but not always.
  12. So I seem to be getting the port 16262 is closed, performance might be severely affected warning when connecting to my server. The server is installed through steam cmd and I try to connect from a client started through steam (using the ingame server browser/entering the IP manually). Port 16262 is opened for UDP connections and I have verified that it is indeed open by shutting down the server and listening 16262 UDP through netcat, then connecting from my local machine to the server (Hosted with an dedicated IPv4 address) and I can see my packets arriving meaning that server-side configuration (firewall) must be correct. I tried with UPnP enabled and disabled but always get the same errors. Is there some way to debug the client and check if it´s actually trying to connect to 16262 or using some different port since online you´ll find ambiguous reports that it actually uses some range instead of this specific port or similar. I tried the broadest port ranges I could find for now (I´d like to limit it back to the actual ports used once figured out) and this is my current UFW config [project_zomboid] title=Project Zomboid description=Project Zomboid server ports ports=16262:16293/tcp|27015/tcp|27036/tcp|8766:8767/udp|16261:16262/udp|27015/udp|27031:27036/udp Also netstat shows that 16262 is indeed bound: major@vmd106028:~$ netstat -a | grep 16262 udp 0 0*
  13. So I did bmp to tmx and assigned generated maps to the world, you can see the map on the little mini map in the upper left but on the big one its showing blank. Anyone know what my problem is?
  14. When I get the player class getPlayer() then I want to index a field it gives me nil. Why can't I index fields from class but only methods? Example The java IsoPlayer closestZombie field in a public float But in a lua script below getPlayer().closestZombie --Gives me nil
  15. I saw other posts talking about this but the solutions didn't work. I downloaded the 2022 tiles and tilezed, but when I try to convert from BMP to TMX it gives me the missing error bellow: I tried rewriting the Rules and Blends files to erase the dreaded dirtgrass, but then it just breaks my map: For some reason, my tilesets on TileZed are red. Not sure what the matter is, but maybe I need to change the version? I had accidentaly installed the 2020 tilesets previously. Also, I had read the missing dirtgrass textures were fixed, so did I download the wrong version again? I have the Feb-07 tiles and march-14 TileZed and worldEd. Thanks in advance for the help.
  16. Hello, Im new to modding and I am trying to add a pistol or revolver to every zombie police officer's inventory to make the game more realistic. Ive used some code from Small Town Responders and from the wiki but nothing seems to be working. I think ive selected zombies using the GetZedX and GetZedY variables and I made an if statement checking if the zombie has either a police outfit, police state outfit or a police riot outfit. Im not sure how to carry on from there, I gave it a go though. The code I used us below. Thanks [spoiler][code] local function ROE_give_gear() -- Gets variables used local GetZed; local GetZedX; local GetZedY; local GetZedOutfitName; --Gets Zombies from world local GetZedList = getWorld():getCell():getZombieLost(); if GetZedList ~= nil then for i=0, GetZedList:size()-1 do -- Get Zombie GetZed = GetZedList:get(i); -- Get Zombie X GetZedX = GetZed:getX(); -- Get Zombie Y GetZedY = GetZed:getY(); -- Get The Outfit The Zombie Is Wearing GetZedOutfitName = GetZed:getOutfitName(); --Checks if Zombie is wearing a police outfit if GetZedX and GetZedY GetZedOutfitName == "Police" or GetZedOutfitName == "PoliceState" or GetZedOutfitName == "PoliceRiot" then local weapon = random(0,5) --generates a random num from 0 to 6 if weapon = 0 then --Gives zed a sidearm and holster depending on number. OnZombieDead.Add("Base.Pistol") OnZombieDead.Add("Base.Holster") GetZed:reload elseif weapon = 1 then OnZombieDead.Add("Base.Pistol2") OnZombieDead.Add("Base.Holster") GetZed:reload elseif weapon = 2 then OnZombieDead.Add("Base.Pistol3") OnZombieDead.Add("Base.Holster") GetZed:reload elseif weapon = 3 then OnZombieDead.Add("Base.Revolver_Short") OnZombieDead.Add("Base.Holster") GetZed:reload elseif weapon = 4 then OnZombieDead.Add("Base.Revolver") OnZombieDead.Add("Base.Holster") GetZed:reload elseif weapon = 5 then OnZombieDead.Add("Base.Revolver_Long") OnZombieDead.Add("Base.Holster") GetZed:reload end end end end Events.EveryOneMinute.Add(ROE_give_gear) --Checks every min, and changes if needed [/code][/spoiler]
  17. I recently decided to play project zomboid again and I seem to cant launch the game at all I boot it up through steam and then it hits a black screen then force quits ive update all my drivers ran the batch file and its seems to not fix anything. I would love to play the game once again if anyone can help me out. If I need to send files just let me know thanks in advance
  18. Folder structure (not sure if this is correct): mods/Better Spear Upgrade/media/lua/client/recipecode.lua mod.info file: name=Better Spear Upgrade poster= id=BetterSpearUpgrade description=Changes the formula for the starting condition of an upgraded spear url= Code: local _orig_UpgradeSpear = Recipe.OnCreate.UpgradeSpear -- get a mix of spear & upgrade item to do a correct condition of the result -- we take the craftedSpear condition and substract the attached weapon condition function Recipe.OnCreate.UpgradeSpear(items, result, player, selectedItem) local spearCondition = 0 local spearConditionMax = 0 local weaponCondition = 0 local weaponConditionMax = 0 local conditionMax = 0; for i=0,items:size() - 1 do if items:get(i):getType() == "SpearCrafted" then spearCondition = items:get(i):getCondition() spearConditionMax = items:get(i):getConditionMax() end end for i=0,items:size() - 1 do if instanceof (items:get(i), "HandWeapon") and items:get(i):getType() ~= "SpearCrafted" then weaponCondition = items:get(i):getCondition() weaponConditionMax = items:get(i):getConditionMax() end end local conditionPct = ((spearCondition / spearConditionMax) + (weaponCondition / weaponConditionMax)) / 2 conditionMax = result:getConditionMax() * conditionPct if conditionMax > result:getConditionMax() then conditionMax = result:getConditionMax(); end if conditionMax < 2 then conditionMax = 2; end result:setCondition(conditionMax); end
  19. I can add parkingstalls without any problems in worlded but ingame they dont spawn any cars. I gave them i name and they are bigger than 4x3 so thats probably not the problem. I searched on google and the indie forums for help multiple times but i couldnt find anything helpful. Please help.
  20. I'm having a repeating crash with a save game. It happened as I went to sleep and time was progressing but every time it reaches 5:00AM game time the game freezes then eventually quits back to main menu after having created a _crash copy of the save. I'm at the point where I'm at 2 months into the game, the crash seems to occur at 2 months 18 hours to be exact. The console.txt file is showing this ERROR: General , 1630461936733> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "zombie.inventory.InventoryItem.setCondition(int)" because "<local3>" is null at InventoryItem.update line:779. ERROR: General , 1630461936733> DebugLogStream.printException> Stack trace: java.lang.NullPointerException: Cannot invoke "zombie.inventory.InventoryItem.setCondition(int)" because "<local3>" is null at zombie.inventory.InventoryItem.update(InventoryItem.java:779) at zombie.iso.IsoCell.ProcessItems(IsoCell.java:2823) at zombie.iso.IsoCell.updateInternal(IsoCell.java:5618) at zombie.util.lambda.Invokers$Params1$CallbackStackItem.run(Invokers.java:37) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71) at zombie.core.profiling.AbstractPerformanceProfileProbe.lambda$invokeAndMeasure$0(AbstractPerformanceProfileProbe.java:83) at zombie.util.lambda.Stacks$Params3$CallbackStackItem.invoke(Stacks.java:230) at zombie.util.lambda.Stacks$GenericStack.invokeAndRelease(Stacks.java:26) at zombie.util.Lambda.capture(Lambda.java:130) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:81) at zombie.iso.IsoCell.update(IsoCell.java:5572) at zombie.iso.IsoWorld.updateInternal(IsoWorld.java:3175) at zombie.util.lambda.Invokers$Params1$CallbackStackItem.run(Invokers.java:37) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71) at zombie.core.profiling.AbstractPerformanceProfileProbe.lambda$invokeAndMeasure$0(AbstractPerformanceProfileProbe.java:83) at zombie.util.lambda.Stacks$Params3$CallbackStackItem.invoke(Stacks.java:230) at zombie.util.lambda.Stacks$GenericStack.invokeAndRelease(Stacks.java:26) at zombie.util.Lambda.capture(Lambda.java:130) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:81) at zombie.iso.IsoWorld.update(IsoWorld.java:3113) at zombie.gameStates.IngameState.updateInternal(IngameState.java:1612) at zombie.gameStates.IngameState.update(IngameState.java:1319) at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:101) at zombie.GameWindow.logic(GameWindow.java:285) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71) at zombie.GameWindow.frameStep(GameWindow.java:726) at zombie.GameWindow.run_ez(GameWindow.java:642) at zombie.GameWindow.mainThread(GameWindow.java:471) at java.base/java.lang.Thread.run(Unknown Source) LOG : General , 1630462093657> reanimate: saved 0 zombies LOG : General , 1630462093731> Saving GlobalModData LOG : General , 1630462093734> STATE: exit zombie.gameStates.IngameState LOG : General , 1630462093735> EXITDEBUG: IngameState.exit 1 I did remove all mods and the crash stopped happening. I'm assuming from the stack trace that at 5:00AM it's trying to spawn an item into the inventory of something but I don't know what item to try and track down any possible issue. I've gotten 2 months in without any issues and having run a search through my mods folder there are no items (besides the vanilla Katana) which start spawning only after 60 days. Is there any way to help track down what item is causing this so I don't lose this save?
  21. Hey, I created my first map mod but I get a repeating error message when I hover over or select my mod in the mod selector window. I tried to find info on the internet or to read the Console.txt but neither got me any further. When creating my mod I used the following version: LATEST TILEZED, WORLDED AND TILESETS (MARCH 14 2022) I used the following tutorials as a basis: THE ONE STOP TILEZED MAPPING SHOP Daddy Dirkie Dirks zomboid mapping tutorials You may have had a similar error message or can help with my Console.txt. I would be very happy about help Edit: I've seen a similar bug in another mod before. Cabin in the woods Workshop ID: 2732928635 Mod ID: CabininwoodsJoji
  22. My game started to crash after the update so i cannot launch the game anymore. It crashes instantly the game tries to open itself. I think i've tried every little bit of method to fix it but it didnt work. Here's what i've tried so far: -Tried the alternate launch -Uninstalled my mods -Deleted my save files -Checked file integrity on steam -Reinstalled the whole game from scratch *I also tried choosing legacy41.65 from betas on launch options in the steam menu, i was able to get into the main menu but the game crashed again when i tried to enter my SP save file. (I tried this first when i havent uninstalled the mods yet) Before this update, yesterday, i was able to play the game perfectly fine. This update just broke everything for me. I have an AMD system (RX570, R5 1600AF) and every driver is updated, im using windows 10. logs.zip
  23. Hi, i have a problem with textures on car, they are inverted. Idk what to do, I sent here 2 photos below. Maybe you know what to do.
  24. I am very new to this so sorry if I overlooked the answer for this or if its obvious. I am creating a test world to learn the ropes of making maps. I paste my world .bmp file into WorldEd. When setting up TileZed and WorldEd I linked it to the extracted tileset folder from April this year. When I try to convert to TMX I get the error below. How do I fix this? Thanks.
  • Create New...