#mod_development
1 messages · Page 332 of 1
I've literally been following every instruction trying my best to do this but othing works
Thanks
yep! so the original item exists and works totally just fine and you can equip it and all, but my copied version, whose only difference is a couple IDs as far as i can tell, instantly crashes the game as soon as the game would have to render the model (right when the progress bar for equipping finishes)
If the right click menu, then I'd try removing your custom module from clothingextraoption, as you already have it on top and you import Base
I don't know how to make my own model but it's a model that I paid for a while back and I wanted it in the game it seems like the model is too much of a problem to even do anything I don't know how to make it from scratch
nah the context menu isn't causing the crash, i copied the extraoption stuff directly from the working item and it seems to work just fine--shows up in the menus, you can mouse over it without a crash, etc
Just make a cube !
We're not telling you to make a gun !
We're telling you to make a block
That's it
And get that in the game
it really does seem to be something with the model since the crash is on the exact frame that the pants would appear lol
Learn how to get that in the game
You say that exact mesh works for different item though? Are you sure?
i will do that then
That gun reminds me of when I first started using Blender. Exported something only to realize it was HUGE compared to the other assets. That's when I learned it has a scale! 1m literally means 1 meter.
to expound as much as i can:
i am working with two mods, one is Undead Survivor and the other is MFTEOTW. i'm working with the public release of Undead Survivor to copy a couple of its items into MFTEOTW and reskin them as bonuses if you have both mods
right now the Stalker Trousers are a fully implemented, functional item in that mod, and i'm trying to copy the parts i need bit for bit to make a simple recolored (retextured) version into my mod
We already told him about the scale
so yeah, right now there is an existing item that is 100% exactly my item as far as i can tell, but with a couple of ID changes and that's it, and for some reason that's the difference between a crash
There is Example mod with model and texture and copy pasted item script of assault rifle. Get it, load into blender for reference
In the guide
It's file structure is for b41 but model and texture still work
Its late for me so I'll be going off, keep trying, and if you don't get it working when I'm back home after work I'll take a look again.
thanks for the attempt at helping at least! it's driving me up a wall haha, i'm totally out of stuff to change that makes sense
a little more context for anyone who might view this conundrum and try to help:
the custom models for the items i'm copying are not kept in my mod. so far, this has been fine--i copied the stalker hood, which has a custom model, and it seemed to work just fine pointing my mod's stalker hood to the original mod's model, which to me was great because it meant you couldn't render or use the item without having the original mod installed (since the mesh wouldn't be available for it to use) and i only want these items usable if you have the original mod installed
so the structure and what i'm doing is:
- copying the item script, changing the item IDs and and the clothing items to point to new ones
- copying the clothing item xmls, renaming them to distinguish them, then generating a new guid for each one and putting them in, and then pointing them to the new textures that i'm making
- putting the new guids and xml files into the fileguidtable
with this process i've created a couple of different reskinned items both from this mod and a couple others, and all of them seem to work just fine... except for this one
realistically, i'm probably missing something blatantly obvious because i'm picking up a project i stopped working on like a year ago, so i've probably forgotten something stupid
but i have strained the bounds of my consciousness searching for this blind spot and i have come up empty so
grrr.... anyone have experience with using pickupable furniture in recipes? item 1 [Base.furniture_shelving_01_19;Base.furniture_shelving_01_23;Base.furniture_shelving_01_51;Base.furniture_shelving_01_55], isn't playing nicely and the original developers weren't kind enough to associate that tile with an actual base item. :/
I tried it and it didn't work
That's what I'm using but the only thing I change name of the gun on the script
The error made me thing there was something wrong with the model and the way it was attached to bones (vertex weights) or the armiture in teh fbx or something... but if the model works for a different piece of clothing that's just weird. Best troubleshooting I can think of is start with an item definition that changes nothing but the item name (so a perfect copy), confirm that works, then change things one by one to isolate exactly which change causes the problem.
And if a perfect copy of the item does not work then we burn some sage and exorcise the evil spirits cursing your mod.
that's literally exactly what's happening it's KILLING me
i started out trying to make the full retexture, but when things started breaking i kept reverse engineering it until there was no further to go
ok, so that's good to know. The game loads shared and then client LUA scripts when it boots in the main menu, (presuming you have them enabled globally).
Then after it starts it loads shared, client, and then server LUA scripts, in that order.
as far as i can tell, i'm making an exact copy of the functional item with the only changes being in GUID/item ids so that the items don't conflict
but when i make that copy, inexplicably mine just doesn't work despite being identical in every possible aspect that i can tell
it is driving me up a wall for real
it's not only identical to the original item, but it's also identical in the process i used to copy it to other functional items too
so this is a working item having a working process applied to it that somehow produces a non-functional result
and it's like, everything else about the item is fine--the script seems to work fine, the item's name and stats and everything render normally in game, there doesn't seem to be anything off with it at all
except for the fact that putting it on instantly locks the game up and starts spamming a loop of that error :V
[09-06-25 13:02:33.758] ERROR: General , 1749499353758> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.HashMap.get(Object)" is null at AnimationPlayer.getSkinningBoneIndex line:340..
[09-06-25 13:02:33.758] ERROR: General , 1749499353758> DebugLogStream.printException> Stack trace:.
[09-06-25 13:02:33.765] ERROR: General , 1749499353765> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.HashMap.get(Object)" is null at AnimationPlayer.getSkinningBoneIndex line:340..
[09-06-25 13:02:33.766] ERROR: General , 1749499353766> DebugLogStream.printException> Stack trace:.
[09-06-25 13:02:33.774] ERROR: General , 1749499353774> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.HashMap.get(Object)" is null at AnimationPlayer.getSkinningBoneIndex line:340..
[09-06-25 13:02:33.774] ERROR: General , 1749499353774> DebugLogStream.printException> Stack trace:.
[09-06-25 13:02:33.784] ERROR: General , 1749499353784> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.HashMap.get(Object)" is null at AnimationPlayer.getSkinningBoneIndex line:340..```
here's a slightly longer chunk of the error log taken from the exact moment the error starts in case i missed anything
but it seems i did not
I mean make an exact copy - use the existing clothing def, just make the new item.
So the only difference is the item name - it's using the same model and texture and guid and clothing definition etc
If that still fails, put your item into the mod that the models etc are from
In case some utterly bizzare sequence of events makes the model break when a different mod uses it.
oh i see! i'll give that a swing tomorrow and report back, good idea
I want to know the answer too, because everything you've done sounds exactly correct and has worked for other items.
Finally rebuild that crafting menu(but only for cook)
i should make a framework and then go ahead to full crafting overhaul
Does anybody know how to put a photo on a weapon and magazine
And switch ammunition types
re: photo: do you mean map a texture image (which includes a photo of the weapon) to the model?
re: ammo types; In the weapon script you can set AmmoType = Base.556Bullets, and AmmoBox = 556Box, and if a magazine is in use MagazineType = Base.556Clip,. If you mean how to have a weapon that uses multiple ammo types, that requires custom lua code because the base game does not support that.
Yeah like a set of it being the (?)
UV Mapping is a way of saying "the texture for this face comes from this part of the image"
https://www.youtube.com/watch?v=qa_1LjeWsJg is the tutorial I used
In this Blender tutorial I will show you how to do UV Unwrapping for Beginners.
● Setup Texture Maps Tutorial: https://youtu.be/V8ZRp3J64x8
● Easy Texturing Method Tutorial: https://youtu.be/LtAE3JtCsRA
● Wood Texture link: https://polyhaven.com/a/rough_wood
● Help support the channel:
Patreon: https://www.patreon.com/ryankingart
Gumro...
I'm sure there are much better ways, but I basicly added some seams, used "unwrap" in UV editor, then shoved all the mappings over the relevent parts of the image
I make the texture so it had the bits I needed, even if it's a complete hack job. Guns are so tiny in-game you don't need to do a really good job here.
I did something similar with my old gun mod
but I cut out real guns parts and moved them into place
You can always do the vanilla weapon texture trick of "everything is either black or really dark grey so you can't tell what the texture looks like anyway"
My survival rifle texture looks really fancy until you realize half the faces and just randomly thrown into the flat grey squares
Still works though
this is why you never look at the UV map, it's like the man behind the curtain
Though I did actually make a good UV map the other day for my new car
Then you get peopel like KI5 doing this
I still don't know how KI5 does that, it's insane
and their perfect looking vehicle is all on a 512x512 texture
that is really good
nice and even
Personally I make all my textures at 1024 and then scale down to 512
wouldn't be shocked if KI5 does something similar
I'd like to know his workflow. Other than Step 1: Git Gud which they have clearly done.
Maybe the model is made at a high fidelity, and then simplified once a texture has been made?
I wouldn't be suprised if they were doing something fancy to bake in texture detail for a simplified model
Or they may just be really good at making textures in a 2D image editor.
Hi all, I'm trying to identify a zombie corpse on the ground, if its a corpse, and if you have a range of items in your inventory, on right click, show a context menu that allows the user to interact in a specific way.
I'm having errors in relation to identifying the corpse, also an error in relation to identifying the characters inventory.
So my question is, what is the correct way to code a check on the players inventory and is it possible to identify if a zombie is a corpse?
The basic idea: you want to affect the context menu when you right click in the world, so you make a function and attach it to the OnFillWorldObjectContextMenu Event
We know there is a "grab corpse" options, so lets see how that checks for a corpse: ISWorldObjectContextMenu.createMenu in ISWorldObjectContextMenu.createMenu
"fetch" is a caching thing the world context menu does, so it can check for things once and then other functions can just checked the cached values
OnFillWorldObjectContextMenu has the player number as a parameter, so from there you can get teh playe robject, then getInventory(), then call whatever functions are needed to see if the items you want are in there.
If all that passes, add something to the context menu.
I don't know if that warning on the IsoObject[] parameter will be an issue, but if it seems that the context menu never finds bodies worth remembering.
But using the same method as "Grab Corpse" should work anywhere that the "Grab Corpse" option works.
Hi, is there a way to hook into the Exercise menu, the one in the health panel where you can do push-ups etc.. I assumed it would be a timed action but can't find any
Thank you I'll have a play around with that
Nvm did a bit more digging and found it
https://theindiestone.com/forums/index.php?/topic/84231-build-4290-unstable-released/
Alright let's see
UNSTABLE WARNING - DUE TO CHANGES TO THE ZED SPAWNING SYSTEM SOME UNEXPECTED SPAWNS COULD OCCUR IN EXISTING SAVES - UNSTABLE WARNING NEW - Zombie spawn map is now generated automatically. -- Two levels of noise are applied to the spawn map to generate a variety of Z spawn configurations. -- Noise...
lmao @silent zealot
- Fixed HunkZ not spawning. The world is healing.
Indie Stone stealing all my mods!
Check it out! A reason to make use of the new version folder structure!
The 42.9 version disables everything and replaces the Mod's options with a message saying it's disabled in 42.9 because it now makes headlights worse than vanilla.
function ISUIElement:setStencilCircle(x, y, w, h)
if self.javaObject == nil then
self:instantiate();
end
return self.javaObject:setStencilCircle(x, y, w, h);
end
holy shit,they finally add StencilCircle
No more making squares and rounding down the corners required?
No more Java modding needed for high beams!
I'm trying to upload a mod to the workshop but it keeps saying the mod.info file is missing even though its right there, any ideas on why that could be happening?
either your mod.info is not in the right place, or you have an extra folder in your mods/ folder that does not have one
this is the right file structure right?
if you're in b41 yes
oh has it changed with 42
cheers i had no idea it changed
if i wanted to test my mod
how the hell do i do that
nevermind
i think im getting the hang of this
i think my .info file was in the wrong place
lets see now
okay NOW i think this will work
i think i followed everything in the wiki
fingers crossed my brown thumb to code wont mess this up somehow
last time i tried modding i made a 1 item mod for a game that made the game refuse to open
UGHHHH
whats wrong with this please tell me
i have no idea anymore
Recipes is misspelled, but more generally this file structure looks off. I'd double check what you have against what's described in the wiki—unless things have really changed while I haven't been looking, it should be media/lua (and other subfolders should be within media too)
noted
do you need all of these directories? if not, delete empty ones.
Also I think you placed it in the wrong folder, shouldn't be SteamLibrary, but the Zomboid folder in Nowy(D:)/
ah
See, this is why I made that ModTemplate project; so newbies already have the directory stucture in place. (Unfortunately my project is only for newbies on Linux...)
if only life was that easy
It's for Linux only because I don't have Windows so can't test Powershell scripts.
okay ive fixed a couple of things
i hope
lets see if it even shows up in the modlist
im not afraid of the code being wrong because i understand that well enough but
localisation
oh woe me
nope still nothing
/Zomboid/Workshop$ tree -d .
├── VNGarage
│ └── Contents
│ └── mods
│ ├── VNGarage
│ │ ├── 42
│ │ │ └── media
│ │ │ └── lua
│ │ │ └── client
│ │ ├── common
│ │ │ └── media
│ │ │ ├── lua
│ │ │ │ ├── client
│ │ │ │ ├── server
│ │ │ │ └── shared
│ │ │ │ └── Translate
│ │ │ │ ├── DE
│ │ │ │ ├── EN
│ │ │ │ └── ES
│ │ │ ├── scripts
│ │ │ ├── texturepacks
│ │ │ └── textures
│ │ └── media
│ │ ├── lua
│ │ │ ├── client
│ │ │ ├── server
│ │ │ └── shared
│ │ │ └── Translate
│ │ │ ├── DE
│ │ │ ├── EN
│ │ │ └── ES
│ │ ├── scripts
│ │ ├── texturepacks
│ │ └── textures
│ └── VNGarage_InventoryTetris
│ ├── 42
│ └── common
│ └── media
│ └── lua
│ └── client
My generated directory structure, if that helps as a reference.
Also note, your code should be in C:/Users/YOURUSERNAME/Zomboid/Workshop
Probably
okay that seems to have been the problem
now to see if the mod works
okay the naming sure is wrong
wonder whats up with that
okay the mod does show up but
it sure as hell dont work
it doesnt do anything
and its name is marked as 42
Hi everyone!
I am a newbie in PZ modding and i'm trying to find guides about PZ modding to just start.
I already have couple of links on PZwiki, FWolfe git repo etc.
But i still have not enough information to just begin.
If you have links to useful technical resources, guides like "how to make simple mods" or any other info usefull to fresh modder, i would glad you to share it a little)
Thanks in advance
okay so apparently my mod.info file is empty
even though i definitely did fill it
OKAY
IT SHOWS THE RIGHT NAME NOW
okay
i got the mod to work by itself now
time to fix the item
or quite possibly remake it from scratch
Sometimes I wish I had mod permission so I can block/remove spam content
ok omar
Ew... Not that one...
thanks
youre next
okay i edited some of the code
lets see if it works now
okay once again i require assistance because i am very inexperienced
is there something wrong here
I guess i have to make my question more certain.
I have an idea about mod adds more enemies types. Now i have an working empty mode and couple of modes to see how other people did the same things.
Basically i could copy data from the mods but i want to learn how to write mods step-by-step.
So now i want to write mod that adds smth like gray cube with no animations moving by circle. And i have a problem with getting a minimum code base to mod like this.
If you could share some articles or guides how to make smth like this, i'd very apprciated.
I have no more experience than you, so i can occasionally confuse you even more.
But if suggest that this file have a problem, i would pay some attention to Boolean values. Game parser can be case sensitive.
Also i would ensure that SurvivalGear param is allowed for this item type.
@crisp dew Thanks agian, now i just need to figure out how to make it path blocking https://cdn.discordapp.com/attachments/798315263133089803/1382115504550051941/image.png?ex=6849fade&is=6848a95e&hm=1d78dfeb87a65aac62651b9b7fa2706ce56f093e9360b16e44898e7bb248d1c0&
That's one of the flags in the tile; forgot exactly which one but I'll look it up after I'm done playing some B41 multiplayer.
got it
Reworked file formats page regarding models and animations
https://pzwiki.net/wiki/File_formats#Modeling_and_animation_formats
Rip, still can't change this
still no idea why they did this. hard coded value for how often animals can attack if they're fighting something that's not an animal, makes hostile animals impossible without a java mod
or really sketchy loophole code
out of curiousity, how does adding new buildables to the game work? using existing tiles of course
wdym by new buildables ? Like to the building menu ?
Post in the modding suggestions subthread: https://discord.com/channels/136501320340209664/1318920979581501502
Animal AI is still being worked on (I hope!) but asking for more to be exposed to LUA is a good idea.
in build 42, they're scripted using the new entity scripts
in build 41, a whole bunch of hardcoded bullshit
Not just for modders, sandbox settings for things like aggression would be good.
I need to document that entity script
yeah
say like you wanted to build cinnamon tiles using planks paint and some tools
hey, i changed that because it's grammatically incorrect 😅
Really ?
Ah yea maybe
Does sound a bit wrong
Also the CraftRecipe defined in the entity is defining how to build the buildable ?
yeah i believe so
component CraftRecipe
Wait it has special entries
OnAddToMenu
Ok new rabbit hole to go deep into, but that's a problem for future me lol
This will grow hard lol
So did they define an entity file for every buildable ?
not special, that exists for both 😅 stuff like that is why i recommend checking code over scanning vanilla scripts
Easier said than done when there's a fucking thousand script entries 💀 💀 💀 💀 💀
Especially when the way they write those craftRecipe doesn't follow the usual writings of craftRecipe, like with component craftRecipe
i mean just read the parser's source code, you'll be able to see every property and what they do rather than having to guess from the script
And also parsing the craftRecipes scripts gave me most of the unique entries for the different parameters
Which gave me lists of what's used in the vanilla crafts
not saying that that isn't useful too, just that it can be more precise to check the parser
Tho it leads to some missing, but pretty sure looking at the source code wouldn't give me every possibilities in these cases
Thanks, had no idea that was there lol
Hopefully they actually read it consistently
Some things from there have been implemented, but the best way to get stuff done is make a really funny bug report with the exact code fix - look how fast they patched No Gay Porn In Kentucky!
Check out that syntax highlighting!
vscode loves doing this for some reason
Featuring null, null and null.
Can't wait for my code to fail because "is null" is all "null is fine"
😂
I'd post that on the bug report forums too, using the template they give w/ version info in the subject/start of body. Overriding the lua with a hardcoded value is going to make their dev work harder too.
I thought it was just the usual "we hardcoded it in java", not "we override where the setting is supposed to be defined" which IMO moves that from request to bug.
Took years to create the first version of High Beams, weeks to make the java version, and now it's a simple lua mod. #progress
real ninepatch came out
declaration: package: zombie.core.textures, class: NinePatchTexture
Either they love modders or they are doing some UI work themselves.
Either way, that's a good feature.
i have to rewrite all my mod now
Damn. What did they mess with to screw yours up?
no,they didn't mess somethings,just provide a much better way to render texture
Ah
seems pretty good
Hey y'all. Is there a log verbosity level higher than whatever the default is?
What's that ?
Oooh that's the thing that allows you to extend textures in multiple directions ?
yep,work like the Android 9-patch
in the past,i use 9 picture to make it happen
now,only a single one pic can do that,
it can save me a lot of time
Ok ok that's nice
There's no "loglevel=INFO" type of thing.
But you can add a bunch of print() statemenst to the lua, or use the built in debugger
Alright, thank you
What are you trying to get more info on?
Trying to figure out the source of that sleep freeze issue I have been running into. Given that it's seemingly happening at random, fairly infrequently, it's challenging to isolate the source.
The game basically freezes, clears out almost all of its allocated memory. No exceptions or warn / error level logs
The last log line is
Saving worldgen params
which (i think) should be followed by
Saving GlobalModData
which is what led me to wonder if I could get more log verbosity to figure out what kills it
anyways, all of this is kind of off topic for this channel, I did not mean to bother you with all this
Does it happen in a new save?
Unfortunately that sounds like stuff that will all be handled in the java.
I've seen it reported in new saves, but for me it's mostly happening months into a save
yeah, in the debug menu in the top left there's a button that'll open menu where you can configure verbosity for each log type
Really? I'm going to have to see what other goodies are hidden in those menus
went through every single option in the debug menu, couldn't find one for logs. I swear I'm wearing my glasses too
both main / dev tabs
press f11
I see ! So I can configure what goes to which log level using that. Is there a way to set the console log level to TRACE then? Best I can tell is that it defaults to log up to DEBUG
the console should log everything based on the settings you set there
Okay I'll play with it a bit then, thank you!
Worse case I can always remap things to a different log level using what you've shown me
Here's my prediction for next mod drama resulting in DMCA takedowns:
that guy is re-uploading a bunch of mods with descriptions like "compression, deleted useless mods that serer never uses"
lol that's one way to prevent questions you don't want to answer.
My guess is he removed all the optional mods?
Yeah, looking at his massive mods list he's repacking mods with options and simply removing the extra stuff. 😅
AuthenticZ is less than a gig
it doesn't save any space when users have to install your version *on top of* the normal version
Yeah but they don't care about logic, they care that people stop complaining about how long it takes for people to join
Which, to be frank, the install screen does feel like there's something wrong, even if there's nothing that can be done.
I did a rough test a while ago, and it does seem like downloading the mods from a steam collection is faster than in-game -- but not by much.
To be frank, "also I need to take a shit, brb!" would be a power move in a different situation
Hey everyone! Not sure if this is the right place to ask, but here goes.
I don't know anything about programming, but I wanted to try making a mod just for fun using ChatGPT. I tried to add a custom food item, but things didn’t work 100%. 
Is there any video or resource that explains how the cooking system works in terms of modding/programming? Maybe that could help me fix it. Thanks in advance!
Yeah, that's me 
Yeah but what didnt work?
It’s a crafting system (I guess a simple one). The idea was:
New base ingredient + water = Dough → cook it = New food item.
Then, I wanted that food to work like sandwiches, where you can add cheese, avocado, etc.
The game loads the base ingredient, but I couldn’t craft anything.
Looks like that kid is just removing the mod support for B42, converted .ogg files to .wav, and recompressed all .png files with crappy highly compresed and pixelated 1995-jpeg-style.
so the Crafting Recipe is not working?, can you send the CraftRecipe.
{
recipe Prepare Arepa Dough
{
ComidaVenezolana.HarinaPAN, // new base ingredient
Water,
Bowl, // I was testing with a bowl.
Result:ComidaVenezolana.MasaArepaCruda,
Time:10.0,
Category:Cooking,
}
}```
is the workshop report system any good?
B41 mod?
yes, I wanted to practice with b41 and then practice with b42, do they use different systems?
What report system?
Also yes Proux; 41 and 42 use different recipe systems
craftRecipe CarveWoodHingeFromLog
{
Time = 1400,
SkillRequired = Carving:6,
tags = AnySurfaceCraft,
timedAction = SharpenStake,
xpAward = Carving:60,
Category = WoodLife,
inputs
{
item 1 [Base.Log],
item 1 tags[SharpKnife] mode:keep flags[MayDegradeLight;IsNotDull],
}
outputs
{
item 1 WoodLife.WoodHinge,
}
}
That is a B42 craft Recipe
oh cool, never realized there was a button there! Dunno, clearly I've never used it.
Discord tip use 3 times ` at the start and end to make a codeblock
extra: at the start Language name to color syntax
```lua
(lua code here)
```
ooh thanks! So do you recommend starting with B42? Is it easier?
I don’t think my idea is really worth much in PZ, but like I said before, it’s just for fun and maybe to learn something new.
Is there a wiki or guide where I can get an idea of how to build a mod in b42? I don’t want to bother you all with every little question
1 sec
You have to know how to format it if you're gonna use chatgpt because it doesnt know Project Zomboid formats or API
But yea, B42 is a lot easier
Recipes are a lot better imo too
wait seriously?? ogg TO wav??
Like my mod here:
you see the media folder has an exact copy inside a folder called 42, now my mod is useable in b41 and b42
(only cuz it doesn't use anything that changed)
you have to make diffrent recipes for it to work on both versions
OH, sorry, wav to ogg; misread the diff
ah 😅 at least there's some sense in that
Yeah, I realized it wasn’t working, but I still really wanted to make that little mod I had been thinking about for a few days, so I felt like sharing something here
Also yeah,
Please do not re-upload my mod without my specific permission. I have the means and motivation to go after such violators.
From Authentic Peach, (creator of the actual mod).
you will prob. get better results if you go to the wiki like https://pzwiki.net/wiki/CraftRecipe and feed it the examples
Thank you very much, I think that’s what I needed. So, to make a food mod, besides the script, do I need anything else?
If you implement new items i would say the Item itself and a image
A mod I made for Build 41 has been greatly improved and released for Build 42 exclusively, yet the better one only has 20% of the original's subscribers. I thought it was just people being uninterested, but that might actually just be because of how many people are still on Build 41. Anyone have any idea if that's true?
I was assuming basically everyone swapped to Build 42 once unstable came out
Nah the Multiplayer is just to important
The DMCA system will make things vanish, but that's for the mod author only
ah yes, at least that I could do well. 😅 That image was a test, then I made it with a transparent background
if they would release multiplayer the numbers would shoot up like a caffeine-fueled intern chasing a promotion.
Zomboid modding tip: it's easier without ChatGPT. 😂
I'm agree
mmm, all the workshop subscribers
You'll spend more time fixing the AI mistakes than just copying a tutorial/looking at an existing mod/copying an existing item
gonna need my family to stage an intervention, all I care about is getting those numbers to rise
Multiplayer is best left for when things are more stable. Imagine the tears if an update breaks all multiplayer worlds
true
Yes, I spent a whole weekend making mistakes with the ai 🥲
Plus it makes everything that are working on extra hard since they have deal with coding and testing multiplayer only to do that all over again when something changes
It depends. They're getting things done quicker than they would be, but depending on how much they're actually making sure things work with multiplayer in the future, I'm not looking forward to the sudden 3 month hiatus where they go back through everything to make sure it's multiplayer friendly
Hard to say, especially if we assume B42 players are more likely to be the sort of adventurous people that like mods
AI is great for formatting lua, but sometimes they change part of your script without telling you
Thank you very much @manic forum , I will do it on my own and let you know the results
Check pinned messages :3
Even that tbf isn't great bcs the AI tends to not be fully aware of what's possible in PZ Lua
So it will tend to fully nuke stuff bcs for it, what you tried to write is a mistake and needs fixing
There are code specific formatting tools
I have copilot enabled by default in my IDE, and it's CONSTANTLY trying to screw things up when working with LUA.
That understand what they are doing. I'd ask AI how to use those, rather than directly asking it to format code.
Looks like I have only one month before I can't do any Zomboid modding for a thousand hours
Oooh
Ships
Too bad Rimworld burned too many hours for me to put even more hours in it
Don't have time these days in my life 
Rimworld and Zomboid get me every expansion
I'm scared to reinstall factorio for the same reason lol
I'm also pretending Dwarf Fortress didn't update anything since the steam launch
Open ended sandbox games with mods are my kryptonite
anyone use ZomboidDecompiler and know why this is happening?
Not I; IntelliJ can just open the .jar files natively.
Can it also handle the recompiling part easily?
That's the only part I'm actually worried about, you can decompile things on a website lol
I haven't actually tried; pretty much all my work has always just been decompiling.
Ima gonna guess that would be a no.
Though it does give you the full code, so you could just copy/paste it to another file...
Is that the latest version of Zomboid decompiler?
Not too long ago the author made improvements so now you must run the exe and it figures out where the game is installed from steam info
(the author is one of the people that hangs out here, but I am terrible with names and forgot who)
it's me 😅 that's a weird ass error and i don't really know what it means
it sounds like it's unhappy about a jvm argument but you're not passing any
is that extension-less file supposed to be the exe lol
Try putting quotes around the path
I did, same error 😔
fwiw if your game is installed through steam, you can just run the bat
i think the extensionless file is a linux script
it's just part of the build system i use and i'm a windows user so i don't exactly know what it does 😅
but the bat should work
Linux binaries do usually omit any extension, so that's a distinct possibility.
When I do that, the classpath error closes it before I can barely read what it says. Opening with cmd and manually typing it in has the same, but obviously doesn't automatically close
Very strange though
It's installed through Steam, shouldn't be any problem since I verified the integrity of files like 5 minutes ago
there might be something messed up with your java if it's doing that
can you run java --version in cmd?
java 17.0.9 2023-10-17 LTS
Java(TM) SE Runtime Environment (build 17.0.9+11-LTS-201)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.9+11-LTS-201, mixed mode, sharing)```
Should be fine, shouldn't it?
Since you're the author, it may make sense to include that at the top of the bat file, (for diagnostic purposes like this)
I thought it just needed any version past 17
yeah that looks right
hmm that's odd
i see in the bat file it does call -classpath, and it does give an empty classpath, which triggers the same error if i do it manually: but the bat somehow runs fine for me 😅
i removed the line that does this from this bat, try replacing it with this and see if it works
Worked 
I read it after I posted my message, haha I felt a little embarrassed 
Yea np, but we had to put out a statement regarding AI modding because we're starting to see way too many people fighting the fact they actually need to learn to be able to mod
Currently, AI will never do what you're supposed to do. It can speed up some processes, but it will never do stuff for you for very simple reasons:
- it lacks data regarding PZ modding
- giving a proper prompt to guide the AI to make what you want actually requires you to have modding knowledge in the first place
The wiki WILL inevitably feed AI models however and due to it growing into a very good reference to get started with modding, AI can already start to give you some results (tho reading the wiki directly sounds like a better idea)
In fact, it's already starting to reference the wiki when you ask how to get started with making a mod
Recompiled my java class. Not only do animals seem to still attack on a cooldown, I reloaded my save and 1 cow turned into 3 lmao
Asked a specific mod idea, it gave me something that in theory should work
I want to make a mod where the player is set on fire when out in the sun
local function burnInSun(player)
if not player or player:isDead() then return end
local hour = getGameTime():getHour()
local square = player:getCurrentSquare()
-- Only during daytime
if hour >= 9 and hour <= 18 then
if square and square:isOutside() then
if not player:isOnFire() then
player:setOnFire(true) -- This sets the player on fire!
print("You're burning in the sun!")
end
end
end
end
-- Hook the function to player updates
Events.OnPlayerUpdate.Add(burnInSun)
Maybe it's best I just continue waiting for TIS to fix it themselves
You recreated the animal duplication glitch you monster >:(
I realized that seeing so many errors, the AI doesn't know much or doesn't have certain information about how it works in this case about PZ mods, I tried so hard that I couldn't make it. So this time I will read calmly the wiki and I will be guided by the indications given there to achieve it by myself
What was your mod idea ?
So I can try to see if I can prompt it to making the mod
Basically, the idea was to craft a new type of food: base ingredient + water (+ maybe a bowl) = dough → cook it → new food.
I wanted that new food to work like a sandwich, so you could add almost any filling.
If I could pull that off, I planned to add similar foods. Like I said, nothing game-changing—just for fun
And well, although I was able to implement the base ingredient, I couldn't craft it correctly. There was one time when cooking, the item would disappear
sweet, lighting on tiles is simple to implement
i don't know if this was my fault, but it's definitely a sign i'm in too deep and should work on something else
hmmm, my idea is to make a workbench with a pegboard backing that's 2 units wide; contemplating how I want to handle the container; 2-wide items still only have singular containers for each tile, each controlling their own sprites. Need to ponder if that would be meaningful to the player or if it would just be more confusing, (as a screwdriver can only go in the left side for example).
Is there a walkthrough or guide somewhere about how to add in a new food item? I'd like to add grits and the ability to make grits from corn, by grinding them out with the mortar and pestle and then cooking them. All I've done in the past is modify existing items, so I'm not quite sure where to start.
Check the pinned messages
Thank you, I always forget about pinned messages.
i've seen a few mods export animations as .x, what program do they use
Pretty sure it costs money, but still curious
most likely 3ds max
Are there any clothing items that go directly on the ear? I wanna make ear plugs but I'm no good at modelling.
Otherwise, I suppose I could make the item invisible on the body
Haven't tried animations, but did a fantastic job with items.
https://github.com/aoqia194/ZomboidAssetConverter
There are earrings.
OH, export, sorry, I read export as exporting from the game .x to Blender
Earplugs, would you even be able to see them if you did model them?
Might try to use the educational plan if possible
I tried opening someone else's FBX animation, changed it around just to test getting it to work in-game, and it just didn't. So running out of options 😔
are you just trying to learn how to put animations into the game?
No need
Yes, custom ones
Is there anything that shows the exporting requirements? because I've already tried exporting my FBX animation, just doesn't work in game
The character does a default stand animation instead
All I got to say is that .x is NOT a solution to any kind of issues you are having with animations
Animations are very complex to get a hold off when you start
I'll look into that. One more question though, do they auto update like models without having to leave the game?'
Hmmm, I have a feeling that there's some Java trickery going on when dealing with 2-tile items like large tables and large metal storage.
Gonna be tweaking it constantly to make it work with a tile's depth map, so it'll be a pain to close out over and over again
yes
unless you're me for some reason 😅
as far as i know they update live for literally everyone else, but they don't for me, never figured out why
If the animation is running while it updates, it can break it
nah it's just never worked at all for me, i have to restart the game fully to get anything to update
LUA, txt, and tile definitions are synced for me when I close to menu and relaunch the game when launched with -debug. Dunno about animations though.
Also, why do I hate myself by trying to do complex things? Managed to get 1/2 a workbench when picking up the other half :/
oh yeah i just meant animations, most things reload fully by returning to the menu
oh gods...... "Ohio State University has published that they want all students to have experience in using AI in their studies"
Some things get a DebugFileWatcher entry in the java - it applies to models (I've swapped those around and had the game update) but not textures, lua, scripts. Never tested animations.
lua and scripts aren't safe to reload live so they don't
i think specific textures do, like clothing i think does?
animnodes do, animations themselves do for everyone but me
textures don't even reload when you change your modlist.
Or at least, they don't update if a mod overrides them.
Thinking on it, I'm not sure I've tried updating a texture while the game is running
from what i know it's not all or even most textures
the game probably caches them into sheets or something that are too complex to reload
Can I load a file from my mod folder through Lua?
I forget if I can with the current build.
Not sure if different due to mod folder stuff changing.
like a lua file? yeah, should work
HTML file
oh, then yeah, for sure
i forget, but iirc it only likes one of them 😅
Alright. Thanks again.
i'd bet on common since i recall complaining about it and that'd be more annoying to me
Working on parsing XML and testing HTML code against WebKit.
Been reading the white papers for CSS models for the past few days now. x)
When yall have mods that need tested, do you just do that for hours by yourself or what
When you're a solo dev you turn to your employees, aka you.
Or if you run a community, throw it on your private server to let your members break it before you release it to the general public.
Too bad I hate everybody. No community for me lol
Months.
But I'm also insane and work on entire engines for mods sooo
Also I think that LuaEvent API got updated in this last update.
Reason: Internal errors for me because I modified those classes.
I added an async API to queue events to fire on the main thread from the render thread so I can hot-reload shaders in-game while developing my framework.
i don't see any interesting api changes unfortunately
I wish that I had access to the render thread context from Lua.
Always hungry for more power
there is realistically only a certain amount of testing you can do as a solo dev, after that just push and let the users do the rest for you
Oh yeah, and everyone's environment is different so mods could break.
🤔
They removed these events and added others.
Their MP is definitely being worked on.
like 99% of the code changes this update was multiplayer stuff
that's why the changenotes were a lot shorter than usual
Yeah. Did they blank the packets?
i have to assume they're doing that automatically
Probably comment #def checks in a script.
Their team has some c / cpp programmers so I'd suspect that's how they're doing it.
yeah, emptied
it's something i'm often quite sad about when i do write java
insert homer [pokes out of a bush, only to slowly retreat back in] meme here
This is what I change in the events manager
(Other way around)
I public them
I then call code from the Shader object in the skinnedmodel package.
Invoke render thread, recompile, push queued event.
Shaders not present in the game's core files are not watched as assets.
They don't reload.
Honestly I wish that PZ made their vanilla code a core mod, but treated just like a mod.
I think that some things might work better.
@bronze yoke Did you ever figure out the issue with your renaming stuff in your decompiler?
Working on updating my decompile of LuaManager for 42.9
nah, i have no idea if that's even the cause of the issue
Conflicting var names and package names was a thing I saw when trying to make a decompile from your project work.
That's all I saw.
Saw some inline package calls in lines in methods that used zombie as a var name.
that does seem like something that could happen
There might also be instances where identical or compatible calls to objects or primitives could collide due to name similarity.
Some collisions to test / work out.
Try appending a number to the generated var name.
See if that fixes the compile.
(Whenever you have the time and want to ofc)
yeah, i already ban certain names from dropping numbers (just primitives since this always results in a name clash with the type anyway) so that shouldn't be much work
Hope that helps.
It's nice to have those numbers not be there when compiling Umbrella & Rosetta data.
Might be good to keep as a flag.
Alright. Glad I finally unborked my copy of PZ to continue working on shaders.
Is this the right syntax??
print(getModFileReader('\\shadehammer', 'media/ui/html/test.html', false))
Returns nil
String var10000 = var4.getCommonDir();
String var3 = var10000 + File.separator + var1;
...
Don't use media/
It already adds that in for some reason.
Makes sense for sandboxing but lack of documentation kills.
Especially since sometimes you do need to add "media" at the start of a path.
you do need to add media, your folder isn't in media 😅
Mine is working without media and not with.
yeah, that's because your file isn't in media to start with
shadehammer/common/ui/html/test.html
Oh wait
When I moved it
I moved it wrong.
Thought it popped under the media folder there.
Thanks for pointing that out.
Such a silly mistake.
I was using VSCode drag+drop on folder movement. Guess it looked like it was in it, not next to it.
I'm trying to import some .png files into a new .pack file in TileZed, but it wont allow me to. Files don't show up in the directory window, nor work if I attempt to click-and-drag them into the window.
I'm new at this program, so if anybody has any tips or support that would be much appreciated
you need to put your images in a folder and select that folder
tysm
wait do you mean a zipped folder or regular folder? regular isnt working for me
got it working
do the pack files automatically go into your downloads folder or are they located in the program
they go where you tell it to. where it says save .pack file as
That makes sense, pretty sure I had it set to an invalid spot
Did build 42 change poly limits on models or something? I had a working model in 41, but in 42 the model has missing gaps, and missing faces. This model worked fine in build 41. Normals / Face Orientation and UV's are all fine etc. Using a red texture to better display the weird artifacts:
B42 no longer renders N-gons, so quad or Tri faces are required. Triangulate whole mesh and try again for easiest result.
As far as I'm aware it is triangulated but I'll try it and see if it changes something.
Yeah I double checked, the model is triangulated. I did apply a modifer to see but its the same result.
It's in-game screenshot?
correct, in the character creation, also appears in the game.
Can you show it's XML file?
Sure, its possible something changed between 42 and 41 and im missing something dumb.
But it seems like the model itself has something wrong with it, which is why i'm wondering if 42 maybe cant handle high poly clothing items.
You're missing hat mask folder line that should fix it
How it works on B41 I have no idea, but if you add that line, it should work
I mean how it works for you in B41 and not in b42 without that line still intrigues me
I'm on phone but I do have it
As a meme format
np ty ill try that lol
Do let me know then I'll delete it
Some might not want to see this so I'd rather delete it once you write it, or just go to any vanilla hat XML file and copy it from there
<m_MasksFolder>media/textures/Clothes/Hat/Masks</m_MasksFolder>
Found actual line
that does indeed fix it, wonderful.
Is there a compiled list of changes for migrating mods to 42 or is everyone just reverse engineering 42 vanilla items. I noticed 42 broke all my recipes, so that'll be fun to go through.
So masks are the issue then as your shoes UV probably not follow players UV maps.
The texture was just for testing purposes, the uv is fine. They use a bespoke texture.
Recipes completely changed, models need to be all quads or Tris or you will have holes as N-gons no longer render.
all gucci now.
I mean that pz uses masks that hide parts of player body and clothes under clothes that use that masks. It works only if it follows UV maps of vanilla player models. U can guess your shoes have UV map occupying whole space of that UV square, and I believe the holes appear when you wear more clothes on your character.
That mask folder line disables that.
ah okay, yeah that must be a new thing then.
I do have it in my guide I believe. It's on my steam.
Ill have a look, many thanks
Nah it's always been like this, how it works for you in 41 I have no idea
yeah thats weird then, never had an issue with it before.
ah well I know to include it now atleast
Is there any way to programaticly adjust the attachment points one a weapon script? There are multiple WIP B42 versions of Vanilla Firearms Extended, and they are use a different scope orientation & offset to vanilla since everyone seems to want to "fix" the scope attachment point a different way.
If there is I'll code up a "if mod X is active then change scope attachment numbers to <new values>"
But I don't feel like making multiple compatibility mods to overwrite the model file.
You can directly rotate attachments on a gun actually
Ah, so instead of changing the model script have something trigger after something is attached that rotate/move the attachment.
That would work.
thanks!
Looks like only a single axis of rotation is supportred.
Ash uses it in his gun framework
Bot that fct specifically
But ik he modifies the attachment pos and rot
Hey everyone! 👋 https://steamcommunity.com/sharedfiles/filedetails/?id=3422448677
It’s been a while since I last shared an update, but I’ve been hard at work on the next version of Modix Game Panel — a modern server manager built specifically for Project Zomboid.
📦 This update isn’t live just yet, but I wanted to give a quick share what’s coming and in 1.1.2
The panel is an user-friendly server manager made for Linux servers and Project Zomboid admins which is free to use. It’s a serious alternative to legacy tools like TCAdmin, AMP, or GameCP, designed around the needs of modern gaming communities — especially those running modded servers.
Anyone working on a mod that allows to attach items to backpacks for B42 (please im beggin 😭 🙏 )
You can do it yourself
You can learn modding
Ain't that vanilla with B42 ?
You can only attach sleeping bags to my knowledge
There is no real benefit to "attaching" things to your backpacks beside it looking cool, as it does not really reduce its weight in same value as if it were Inside backpack
Hi guys, it's me again. 
Yesterday I was reading the wiki and managed to create the item correctly. The dough is being crafted as expected, but I’ve run into a small issue: the bowl I use gets consumed in the process. 😅
I’m trying to use a water-filled bowl to make the dough, but when crafting with "water + flour + bowl," the result is correct (the dough is created), yet the bowl is lost. 
How can I prevent the water bowl from being consumed during crafting? I tried looking at similar in-game recipes, like when making stew, but I can only see the item properties, not the actual crafting recipe. B41 😬
ok i got sidetracked yesterday, time to try and figure out the pants of instant death again
ok so i can confirm the problem is definitely the clothing def somehow
because pointing it to the original def seems to work just fine
wondering if it was 'the model breaks when used by something tied to another mod' as you were, i also copied the model in and tried to see if it would work if the model was local to the mod but it did not
i still have no idea why it's acting like this or what it is that i change that causes it to arbitrarily start breaking
because all i do is copy the original clothing item def, swap the guids, and create a new fileguidtable with an appropriate entry and the new guid
which is theoretically what you do to make any clothing item and has worked like 20 previous times
i suppose my next step is to stop fretting over this specific item and see if i can make a different item in the same way to test if it's something specific to this model or if my workflow has somehow fucked it up, but as far as i can tell this is like i'm copying someone else's machine atom for atom and somehow my version of it is exploding violently
Keep it that way fr fr as a like 1% easter egg. Create a tooltip like "Mmmmmmh this dough tastes shardy"
-# /jk
Probably check mods that add more foods
I think you need to put mode:keep next to your bowl in the recipe
Or maybe just add a bowl to the output
This might be somewhat similar to your recipe craftRecipe MakeFriedOnionRings { timedAction = MixingBowl, Time = 80, NeedToBeLearn = True, Tags = AnySurfaceCraft;Cooking, category = Cooking, xpAward = Cooking:3, AutoLearnAny = Cooking:6, inputs { item 1 tags[SharpKnife;MeatCleaver] mode:keep flags[IsNotDull;SharpnessCheck], item 1 tags[MixingUtensil] mode:keep flags[MayDegradeVeryLight], item 1 [Base.Bowl;Base.ClayBowl] mode:keep flags[IsEmpty], item 1 [Base.Onion] flags[InheritFoodAge;ItemCount], item 2 [Base.BakingSoda], item 1 tags[Flour], } outputs { item 2 Base.FriedOnionRingsCraft, } }
Oh yeah, I got how to do it, but I think this code is for the B42
The solution was in front of my eyes, I had to read again more carefully, I think this is the solution, but I don't know in which order I should add it.
keep ItemType,
So you can specify an item that will not be spent on a recipe, but that you need to keep in hand for crafting.
Example:
keep Saw,
Always interesting to see installers / managers, though 127.0.01:5000? Why not a standard web server that can be more compliant / secure on public servers? (Since most multiplayer servers are public.)
and.... your github is having a distinct lack of any actual code.
127.0.0.1:5000 is just the default dev bind. Modix is meant to be run locally by the user, behind their own web server like Nginx with HTTPS, authentication, and firewall rules. It's not exposed raw or hosted by me it’s a self-hosted game server panel, built for secure deployment on your own machine or server as for GitHub it’s in closed testing while version 1.1.2 is finalized. The older versions are outdated since I took a break from it all. It’s not open source it’s provided as is and intended to be used that way. It might go open source later, but I haven’t made up my mind yet.
Doesn't that defeat the purpose of a code repository site like github though?
Did you go into the recipes scripts instead of the items scripts
Looking for some help on where to start with a mod type I've not dealt with before.
Problem: Players killing zombies in piles large enough that the server loses track and items begin to dupe.
First thought Solution: Set zombie Container Limit per tile ≥ are either not loaded or deleted on creation.
Ideas?
Items removed from the corpse appear again on the corpse if the player leaves and returns or enters interior and returns. Game seems to forget to remove the items from the contain because of how many it's trying to track.
yooo first time on the front page (I think)
I knew I struck gold with the bloody footprints mod
Duped items are still handed by server if they enter the same container as usual but can't run a stable'ish economy on the honor system
My quick fix was to set zombie corpse removal to 10 minutes IRL to prevent a player getting a large stack before they start to be removed.
Just wait to upload your mod on slow weeks. You can generally get on front page if its a decent mod
How I can make animals mod?
It's complicated
It also depends what you want to do
Someone has a tutorial ?
No
Damn
I just want add Guinea pig 
I'm horrible at figuring out how to export animations, so it's really rough for me (which is why that homunculus mod is just a retextured pig), but back when I made that it was also impossible because of a bug I believe. I recently saw a My Little Pony mod (bear with me) that seemingly uses completely custom models
So the bug is most likely fixed and I suggest looking into it. I will soon too, because I had like 6 animal mods I was working on and the model thing tripped me up every time lol
if anyone was wondering what better icons for the gun radial menu would look like... (take 2)
Always fun when it happens, congratulations!
Short version: if you can re-use an existing animal skeleton, animation and behaviors it's feasible, if not it's a massive amount of work.
Maybe a scaled up rat/scaled down raccoon with edited mesh/texture could be a guinea pig, but there isn't a lot of info on this because it's new, unstable and the people working hardest on it are making a horse which is not done yet.
Those are so much better than the usual "black blob on black background" weapon icons
🫡
Also, good pixel artwork - much better than my "take blender rendering, resize to 32x32" approach.
worms
currently very large, but once again, the model exporting was the hardest part. the rest will be easy 
we don't talk about it
I wish I could remove animations entirely
It's so much easier to add animals in rimworld. "Here's a pic of it looking east, a pic of it looking north, a pic of it looking south and some xml."
Slightly different game engine though lol
#3DWasAMistake #BringBackSprites
Even though that'd obviously be a lot simpler lol, Zomboid really did overcomplicate it. I don't blame them because they were probably trying to rush it out, but there's no need for it to be this complicated
Just hoping they'll make it easier eventually
Complicated & no inheritence/templating on most things 😦
textures
they look very cool moving around even though they're still massive, basically just bob for an animation, and make sheep sounds
planning to extend this mod for every single insect in the game, which will be a lot faster now since I probably won't even really need to make a different model for caterpillars
Kentucky super-maggots.
I first tested with a cube, then a sphere. The sphere particularly felt surreal lol. Definitely gonna be making more alien / crazy mods
Gross alien parasites that come out of corpses will be great. Might add biblically accurate angels
I wish I knew how much I could actually impact animals through normal lua lol. I'm assuming it's really limited, but it'd take so little to do really cool things. If I could tie into feeding animals, boom, you summon God and have to keep him fed to prevent him from exploding and destroying the entire world
Perfect
i havent done modding of this game yet, on a scale of 1 to 10, 10 being almost impossible in comparison, how difficult, generally, is it to mod b42 than b41?
like 2/10 in my opinion
maybe 1/10. depends on the mod, some code was changed so little all you have to do is update 2 functions, some mods require tons of reworking
for my mods it was very easy
The only thing that makes B42 harder to mod is not all existing mod tutorials work.
That's not even an issue for any tutorial that does things like "copy an existing thing and modify it" since you'll be copying the new B42 thing.
fair enough, thank you
"LOG : General f:0, t:*> java.lang.Exception: Sprite 'location_business_office_generic_01_57' is duplicate. entity script: *" zomboid
Asterisks where it doesn't actually matter. This is my error code.
I copied the water dispenser code to my mod files and this is what I'm met with. I've already renamed it, but it seems to be erroring because it's sharing a sprite with the water dispenser? Why would that even matter? It should be a readonly file. I didn't want to prototype the entire entity while experimenting and so now my shortcut has led to a deadend.
Can I get some advice/input/workarounds?
offRoadEfficiency = 3 What does the variable affect?
Simple mod that allows custom colors for shouts and stuff
I havent seen any mods in the workshop that do this
You made me look because I was curious, and this is the only place I can find where it does something: (CarController.java)
So it can affect engine power when offroad, higher is better, but you'd need to track down all the stuff going into that lerp function to get an idea of how much it matters/how high you can go before it doesn't matter.
Thank you very much, you've helped.
looks like vanilla uses 0.8 for "bad offroad" and 1.1 for "good offroad"
Oh it also affects the extra part confition loss from driivng offroad (Vehicles.lua) and again, higher is better.
you find that in the game files?
yes. I keep a copy of VSCode open with the games media folder (lua. txt, xml) and the decompiled java
makes it very easy to quickly search for things - highly recommended if you're into modding
ZomboidDecompiler is a one-click tool by Albion that will give you a nice decompiled copy of the java
Thanks , I'm just stuck on the fact that I don't understand how methods and variables work.
in general, or in a specific situation in zomboid?
I'm honestly not sure what the best way is to get started with programming concepts these days; I started with BASIC typed out from a book but that's a terrible way to learn, it just happened to be the easiest way to get started hake in the 80s.
API situation https://projectzomboid.com/modding/index.html I see what I can work with, but I don't fully understand how to do it and all the ins and outs.
package index
But again, I'm talking about my first time with the API and I'm having a hard time getting my bearings
but I think with this approach you realize every aspect less superficially.
Having the decompiled java can be helpful when the method names are not clear
A lot of it is just getting used to the zomboid jank style, and seeing what other modders have done and gradually learning more
Yeah, I appreciate it. It'll speed things up.
Asking questions in here is good too, even if no-one knows the exact answer we can normally giev at least a starting direction.
You can refer to pinned messages in this channel if you want an idea how useful AI is when it comes to Zomboid modding. 😂
XD I have already realized its uselessness through personal experience and pictures in the clips.
on his advice I created a bicycle as an object and not transport and according to his idea when the character holds in his hand the object bicycle, he accelerates )
https://steamcommunity.com/sharedfiles/filedetails/?id=3498086406 It's difficult to make a mod and listen to a conference call at the same time, but it's possible if you mostly ignore the call.
brilliant cover
Thanks to Reddit:
Thanks for your help, I'll keep trying.
craftRecipe ImproveRadioRange
{
timedAction = Disassemble,
Time = 100,
Tags = AnySurfaceCraft,
eedTobeLearn = false,
category = Electrical,
SkillRequired = Electricity:3,
IsHidden = false,
inputs
{
item 1 Base.HamRadioMakeShift,
item 5 Base.ElectronicsScrap,
item 3 Radio.ElectricWire,
item 3 Base.RadioTransmitter´,
item 2 Base.Aluminum,
item 1 Tags[Screwdriver] mode:keep,
}
outputs
{
item 1 Radio.HamRadioInfBat,
}
}
I'm trying to port a mod to b42 but I'm struggling to get it to show up in the crafting menu.
So far the mod works but not the crafting part.
My path looks like this
mods\radio\common\media\scripts\recipes
Hey everyone, I want to use another color in the ingame map, e.g., for tunnels, subway lines, etc.
Is there a way to insert the corresponding layers using Lua? If I copy the entire file media\lua\client\ISUI\Maps\ISMapDefinitions.lua and paste my code, everything works in my mod. But I'd like to have just a short Lua file with my layers in the mod, instead of a copy of the entire vanilla file. Is there an insert command that works here?
I'm still a complete beginner with Lua files; I'd like to focus more on mapping.
In debug mod, click the debug icon and then crafting recipies. That will let you see every recipe in the game; this lets you know if the is issue is the recipe failing to load or the issue is the recipe does not show up where you expect it to.
Then check console.txt for any errors related to the recipe
You shouldn't copy entire files
I think you ned square brakets around all the item names
You can modify specific functions easily
And even hook to them without overwriting them
See this wiki page
https://pzwiki.net/wiki/Lua_(language)#Decoration
Sir Doggy is right, copying an entire lua file is the worst way to do things and it will cause a lot of issues. Always use a unique filename for your files so the game doesn't think you're repalcing an existing file.
With lua alway try for a non-destructive prefix/postfix patch (aka decoration) and if that is not possible replace just the functions you need to replace.
With decoration multiple modders can decorate the same function, and if TIS update it your mod won't be erwriting it with old code.
Yes, I know. I took the entire file to test whether adding custom colors would work in general. My question was exactly how I could create my own Lua file from it, containing only my code, and then adding it to the game—together with the vanilla colors. So far, I've only managed to get my color to be used, overwriting the vanilla one.
I will look into decoration
What do you need to change/add?
I want to add own layers for the ingame map, like my screenshot above.
the most basic change you can make is to just copy all the functions you've edited into a new file, so that you only redefine the functions that you actually modify
after that you should look into how you might be able to accomplish what you're doing with decoration instead
Took me this long to realize context menu events gave you player numbers and not player objects. I've always wondered why it was "broken" lol
To the function MapUtils.initDefaultStyleV1(mapUI)?
yes
I'm only going to repost this one more time, because there are actually people online now;
"LOG : General f:0, t:*> java.lang.Exception: Sprite 'location_business_office_generic_01_57' is duplicate. entity script: *" zomboid
Asterisks where it doesn't actually matter. This is my error code.
I copied the water dispenser code to my mod files and this is what I'm met with. I've already renamed the entity, but it seems to be erroring because it's sharing a sprite with the water dispenser? Why would that even matter? It should be a readonly file. I didn't want to prototype the entire entity while experimenting and so now my shortcut has led to a deadend.
Can I get some advice/input/workarounds?
Looks like you can decorate it so you call the original function, then run some code of your own:
MapUtils.BlackshotOG_initDefaultStyleV1 = MapUtils.initDefaultStyleV1
function MapUtils.initDefaultStyleV1(mapUI)
MapUtils.BlackshotOG_initDefaultStyleV1(mapUI)
local mapAPI = mapUI.javaObject:getAPIv1()
local styleAPI = mapAPI:getStyleAPI()
local layer = styleAPI:newPolygonLayer("my new layer")
layer.addfill blah blah blah
end
I'll give it a try right away, thanks for the support!
and put require "Maps\ISMapDefinitions" at the top
To make certain the other file gets loaded first.
entities cannot share sprites because objects with that sprite are automatically converted into the entity: if there's two candidates it wouldn't know what to do
I like strictly typed languages because they find mistakes like this early on.
as for workarounds, i guess just make a copy of the sprite? or use a different one if you don't want to go through the hassle of spritesheets
I still don't follow. What do you mean two candidates? There's only one sprite, I'm confused as to why when an entity wants to be built it doesn't just copy, or reference preferably, the sprite sheet. We can have multiple water dispensers on the screen, after all. What you're saying implies that each sprite can only be used by one object. But then we can make as many of those objects as we want. That just screams "wrong" to me. Like..something was coded incorrectly? IfeellikeImtakingcrazypills.gif
when an object with that sprite loads, it is automatically converted into an instance of the entity that uses that sprite
so there can't be two kinds of entities that use the same sprite
In mathematics, a bijection, bijective function, or one-to-one correspondence is a function between two sets such that each element of the second set (the codomain) is the image of exactly one element of the first set (the domain). Equivalently, a bijection is a relation between two sets such that each element of either set is paired with exactl...
Big thanks, works fabulously!
Another work of art
Side quest complete, back to making actual animals. I just had to know it was possible
what does this do
It is of course
The modding Discord is working on a horse mod in fact
Tho that looks so goofy lol
all the people who spread misinformation about animal mods being impossible around the time b42 came out didn't even try
there's not really anything weird or special you have to do
I might just be insane, but I actually think it looks kind of good here lol. The scene is more natural
As good as a freakishly tall Minecraft villager being forced into a zombie survival game can look I mean
how did you do the string thing? is it b42 only?
and great job btw i looks awsome af
Yeah. You can attach ropes to animals in Build 42
Is that a public one?
I was in a French one at some point, never heard of any others
Attempting to add these recipes into a mod, but whenever i do it basically deletes/disables all of Sapph's cooking items.
Sapphs as well as more smokes are its dependencies, and the mod only has this one script in it. Does anyone know what the issue is?
(B41)
it deletes the items from another mod? is there a filepath conflict?
I dont think so? Define filepath conflict.
If i activate the mod containing my txt, the stuff from Sapphs is basically disabled, despite being enabled.
if two mods have a file with the exact same filepath (e.g. Mod1/media/scripts/myScript.txt and Mod2/media/scripts/myScript.txt) only one of them will load, depending on load order
other than that i can't imagine why a script file could have such a dramatic effect on another mod
Different filenames, would maybe putting my txt into a folder in scripts theoretically fix a filepath conflict?
if the filenames aren't the same that's not causing it, but it is good practice to use modname folders (or anything else you can reasonably expect to be unique) to avoid unexpected conflicts
Understood! Im still clueless to the issue
does anyone here by chance know if making a mod exactly like this is possible for B41 at all ?https://steamcommunity.com/sharedfiles/filedetails/?id=3440887907&searchtext=dave
Not sure what you mean
some mods work for both build 41+ and b42+, im curious if thats possible with this mod in particular
if its not possible to make the mod with both file paths for builds 41 and 42, is it at least possible to recreate a mod like this for b41?
as it is a b42 mod only
I just needed to confirm this with the PZ community/modders whether its possible or not before I continue looking into it
it doesn't look like it does anything you couldn't do in b41
Rework of animation wiki pages
Animation guide is being split into individual pages regarding the different aspects of it:
A port for my B42 moodle mod for B41 was long overdue, so here it is. Complete with fixed moodles from the original, there are three different color palettes/styles to choose from, and compatability for other moodle background mods. https://steamcommunity.com/sharedfiles/filedetails/?id=3498588484
i just got back into project zomboid modding, and now that this is done, i can finally switch back to B42 and play some Week One, lmao. Click the link above for all the info you need about the mod, and the full showcase of all moodles and statuses
@elder palm Sorry for the ping, but I saw you disabled the B42 ForageDefinitions stuff in the changelog for More Traits. I posted a potential fix for the line 132 error twice on the mod page. (once in the bug error subdiscussion)
Is this fix not enough, or did they break it even further in the last patch? (sorry if this sounds hostile, was not intended)
Sorry, I don't check the Steam Workshop anymore. I was only notified of the issue via my Discord.
I'll go check up on what you posted on the workshop, since yeah I only disabled it because I didn't want to keep the mod broken for too long, so a quick fix was in order.
Appreciate your help. In the future, you can create an issue on the github or ping me on Disocord.
Cheers!
good to know, hope it clears up the issue =)
Found your comment.
in the lua/shared/Foraging/ToadTraitsforageDefinitions file, I replaced
table.insert(forageSkills, skillDef);
with
table.insert(forageSystem.forageSkillDefinitions, skillDef);
and the error disappeared. I'm not quite sure if that fixes everything related to that error, but it's at least progress```
Really just that simple of a fix. Man now I feel stupid.
I'll push an update.
it's okay, it took me a while to figure out what broke. I had to do a lot of looking around too, but that seems to be it, though I didn't do too much indepth testing =)
When I create a pack file, I will see “_0” after the image name.
This is an overlay image for tile, but it was not there before.
Is there any way to avoid the “_0” at the end?
However, I was able to create it without “_0” before, even though the same tool/procedure should have been used...
Sorry, my simple mistake.
I was able to achieve this by turning off this checkbox.
is this where i can ask for help making a mod?
my mod is just adding a new hoodie, but i cant get it to show up in the mod list
it is intended for B42
What is your file structure and location? That's going to be your first clue.
My first huge hurdle was figuring out that the workshop format is different and has a different place to put the files.
Outdated tutorials and poor "ai overview" responses from google led me astray
ModName/Contents/Mods/NameOfMod
so one more folder
I know this sounds stupid, but it works
is that not what i did?
yeah, you did
sorry I was typing and checking my format and didn't really take the time to see your last screenshot
ah
I think a common folder is required in b42 in the modname/contents/mods/modname folder
so you should have 42 and common in that
mine is empty, but it's supposed to be content for "any version" of your mod
But I also don't know if that works for b41, cause I haven't actually been modding on that version
its for b42
(Y) You should have everything you need for it to SHOW UP in the mod list now. Actually booting without error is up to you unless you come back for more help. Cheers
I'm not even seeing the error? Maybe windows ate it
When did you crash? At worldgen, by chance?
The following LogTypes are disabled: Try enabling all of the logtypes again for the crash report. Worldgen is on your ignore list.
clothing log is also disabled, and that's what your mod does. so I'd enable that at least too
yeah it was because i overwrote the clothing_jacket file lol.
progress made
but the item is broken
You're out of my wheelhouse now. I've not done clothing. I'm in the fluids and recipes world right now.
You're welcome, sorry I wasn't able to help with your more specific issues.
Anyone knows what is the pushing the zombie in the java docs,I see two one for a moving object and game character, if my common sense tells me one is for collision(bump) and other is collision(push).
isPushableForSeparate
public boolean isPushableForSeparate()
Overrides:
isPushableForSeparate in class IsoMovingObject
isPushedByForSeparate
public boolean isPushedByForSeparate(IsoMovingObject other)
Overrides:
isPushedByForSeparate in class IsoGameCharacter
Looking at the java, the functions exist in IsoMovingObject and get extended by IsoPlayer and IsoZombie... but they are never used anywhere.
probably because nothing is actually checking if something is pushable or not. It just pushes (sends a signal to the object it wants to push) and the entity (the object in question) checks itself if it needs to stop (like if it hits a wall). These 2 specific methods would be best in a scenario for an item that changes from being pushable or not so it can check itself before it wrecks itself after being directed (pushed). That's my take.
Oooh, thank you. Will check it again later. o7
Now I assume "collideWith(obj)" does something like gathering both objects positions and velocities. But that's like.. movement collision. Not "player pushed the zombie"
I'm at a loss with a once over. shrug
When pushing a zombie, it triggers OnWeaponHitCharacter
Gotta love automatic embeds
That's how I check whenever a zombie was pushed or stomps
😅
Yea I ctrl A to select all and replace but it embed it haha
It's a useful feature, just annoying in this scenario
And thank god I'm Workshop mecha or I might have received a block for 10 minutes lol
It's annoying everytime. Should be default off with a checkbox option to enable.
Both of my links had embeds a few minutes ago and I didn't get a block. shrug
But yeah, I see that code and it definitely matches up with the behavior I'd expect. I'm assuming "doshove" is the magic sauce
You need to make a difference between a shove and a stomp
I think this was I was looking for, i forgot the term and It just the "push" thing that stuck in my head lol.
And that's what this code does
You can suppress embeds before sending by wrapping a link in angle brackets (i.e., <https://github.com>)
No that's not the embed we are talking about
This is the embed we are talking about
👀
Yes, that's the embed you can suppress
<https://www.youtube.com/watch?v=dQw4w9WgXcQ> -> https://www.youtube.com/watch?v=dQw4w9WgXcQ
There is only one meaning of embed on discord lol
It's the same if you do it that way
Not my fucking failed rick roll
Unless you're referring to masked links & not embeds
Yeah embeds are the little content preview that shows up
Yea ik
I fail to see the confusion so I'm just gonna repeat that putting a link in angle brackets makes it not embed & leave it at that lol
yea but again that wasn't the subject of the discussion
If you copy a link, then select text when writing and paste, it will hyperlink it
Which is what we were talking about when we said "embed"
So while it's the embed of links you were talking about, we used the word because that technically can be used to describe what is done to these links
Didn't think it would take a whole convo just to figure out it's what we were talking about
Is there any ways to create shortcuts of liquid system?
I need to make a few functions, like "Refill <> from <>"
Wdym ?
A context menu option ? Of course you can
For example, I have 10 buckets of water and 100 bottles. In order not to pour one liter a hundred times, I want to make a context function for liquid transferring
The user interface is horrible if someone needs to apply patches like that
Please tell me you're working on a quick way to say, half fill a bunch of items that doesn't require manually working the slider n times
Of course you can do that
Just involves making a custom context menu option, and doing the proper checks to move fluid
Proper indications
There's a lot of things you can do UI wise too
it'd be an annoying amount of ui work
Thanks, I'll get to it. I'm currently researching lua and zomboid api
context menus aren't sufficient for this kind of thing
I don't agree
The issue is how flexible you want it to be
you'd need a menu that lets you select both inputs and outputs
Nah
Just click on the item you're going to pull from
Selecting the items would already do that job
and then choose from falling menu where the output goes
if i select both in the context menu, how do i know what goes where?
just like sink does
Give both options, or if one is empty you already know there's nothing to do with that one
Move fluid from <> to <>
For both combination
Nothing magical, nothing fancy here
And then suboptions to that menu, like move 1 l, move half, move a quarter
Idk
ok i thought you were doing something way more advanced would this even be faster than vanilla at that point 😭
Depends what you want to do and how flexible
Speaking super basically, I want to add this function to water-filled items in context menu
But Fill from where ?
From the item you right clicked
i think they want you to right click one item and it gives a drop down of containers you can pour it into
like b41 had
The water container (bucket, dispenser bottle)
So like, right click a container with fluid, and have a transfer option to: list all other empty containers ?
Yeah, it was better back then 💀
yep
yeah when i first played it i thought it was really weird b42 didn't have that anymore
B42 is like UI degradation update
That would be very easy to do then
Everything about fluids and crafting is harder and tedious to management
Depends how you want to handle containers with already fluid in them tho
Due to mixing
Good news
You can easily list every empty containers, or list every fluid containers, ignore full ones
Make a transfer function for fluid, tho you might need to take into account how two fluids mix
it's not finished 😅
Bro it is been half a year, UI is one of the most important things 😭
So could you pour to a container with another fluid, and if so you need to consider if both can mix
The fluid UI might already use a bunch of different functions to check for stuff
they stopped using the term IWBUMS, it's still the same level of unfinished
The main issue is that they basically rewrote some entire sections of the game, like the crafting, they had to redo almost everything
The fluid section too they had to rewrite almost everything, and even then you can easily see some parts were missing, or not yet replaced and used old systems
i think this is definitely a disappointing lack of QOL but keep in mind that UI is usually the thing you want to finish up last
Making a UI is sooooo long
That if you had to remake it every time because you changed major sections during the dev of the unstable, you'd have to lose all your time again on making the UI
Thanks for help, i'll get to developing this mod. Won't be able to post it in a while tho, since my steam account is unactivated 😛
So the crafting system currently has a fairly decent UI but it still receives major changes like the research thing
also, zomboid's ui api sucks and nobody likes writing it LOL
It can be tedious
You basically have to tell it everything regarding the UI
And there's not system in place for default values and shit
If TIS is trying to find a UI developer but can't, then I know why 🤣
So you need in the design of your UI to consider every available resolutions of the game players will play on
XUI is a big improvement, i think it's actually pretty nice to use
Rosco mentioned that the 9 panel thing got released
Rocco ? Rosco ?
I don't remember
"Designer": > what do you mean I can't just use Photoshop? I have to actually write code? (/s)
double c
The guy that keeps releasing great UI mods these past weeks
I'm going to donate him 50£ if he makes CleanLiquidTransfer 😭 🙏🏻


