#mod_development
1 messages ยท Page 333 of 1
Yeah, we saw concepts in some video discussing horrible PZ UIX
they're definitely not gonna lock in fluids until after brewing comes out
i'd expect ui improvements around then
good lord that's going to take another six months
There's a project if you want
well you can, you just won't find much support or audience ๐
That's not the way
There's this project which is currently in need of modders to test the whole system tbf
although actually
if you wanted to make a ui mod you maybe really can't do it in java lol
Lua basically has almost everything needed to make UI work
Even the thing Jab is working on rn, where he's implementing HTML shit in PZ UI ?
the whole ui api is lua, only the primitives are java, you'd basically have to rebuild everything
oooh, that's the leaf that Aoqia was mentioning.
Yes it's her work
I mean tbf
If it was on Java ... I think it'd be worse
Simply because modders wouldn't be able to even fix it 
Fair 
ui in a scripting language is pretty ideal, that's not why it has issues
Yea like I had mentioned, when you start to look into it, you basically need to manually define almost everything
The UI size can't be easily adapted to the different resolutions, you need to do it yourself
Or not give a shit
'
XUI solves a lot of these issues
When I put a mod I'm working on in the ~/Zomboid/mods folder, I can't see any mods at all in the mods pane in-game. Anybody know what's up with that?
~/Zomboid/Workshop
can you run them from there? I thought that was just for Workshop uploads
It's for running too.
Things have changed a bit.
oh I know about the new structure, I had to update my mods
Also, nice work Jvla on adding examples and details to Mod_Structure, it looks really good now!
The /mods folder has a different mod structure than /workshop
Use /workshop, barely any point using /workshop
See this wiki page regarding the subject
I remember seeing some discussion a while back on how to test mods for multiplayer without having to run two clients. Is there any guide on that?
nvm found it
So question regarding flyers, can we make custom ones and if we can, is there anything weird about making them?
There's a guide on the wiki
I'm fairly certain you can do way more tho
But that's already okay to start
Thank you!
Check pinned messages
The wiki has a page regarding mod structure
Instead of copying an existing mod, follow that to better understand what's going on
Are there fliers with multiple pages? Would be interesting to make comics
like actual comics
OnObjectAdded nor OnObjectAboutToBeRemoved dont detect when an isotrap is being created by throwables like the pipebomb, OnThrowableExplode works perfectly but only for the explosives not the firebombs, does anyone know how i can tell when a throwable reaches it's final destination / explodes?
No idea
Check the game files for that I guess
To my knowledge, no, but I'm not aware of every fliers
Just the few I saw I don't remember seeing multiple pages
Isn't there option to "flip" flier so technicly you could have 2 sides to make a comic
I don't remember anything like that either but you guys got to know that all of these are technically possible
Because the UI for these are fully Lua sided
So nothing is stopping you from adding new pages
Or adding a flip to it
I'll check it out. Maybe I could add next page, which would take it to the next picture
Would be cool
do you have a way to add different recipes to one item without duplicating the item recipe in the crafting menu?
tried to add tags to item through lua, tried to make a recipe in different txt other than new item's txt yet i still cant make different recipies for one item without duplicating the recipe so i have 6 recipes in crafting menu for one item
B41 or B42 ?
Please make sure to provide the version of the game you are modding on when asking questions regarding modding.
so
craftRecipe CraftTwine
{
timedAction = Making,
time = 180,
Tags = AnySurfaceCraft,
inputs
{
item 1 [Base.Dogbane;Base.HempScutched;Base.FlaxTow;25:Base.Thread_Sinew] flags[Prop2;IsExclusive],
item 1 [Base.WoodenStick2;Base.TreeBranch2;Base.Handle] mode:keep flags[Prop1],
item 1 tags[SharpKnife;Scissors] mode:keep flags[IsNotDull;MayDegradeLight],
}
outputs
{
item 1 Base.Twine,
}
}
for example
Either use tags, like you mentioned, IF the recipe has tags for the inputs that your item should go in
"item 1 [Base.Dogbane;Base.HempScutched;Base.FlaxTow;25:Base.Thread_Sinew] flags[Prop2;IsExclusive],"
it doesnt work with "item 3"
tried to do it
but it didnt work
probably made a mistake
Ok you need to provide clear informations of what you are trying to do here
Because:
- we don't know what recipe you want to add your item to
- we don't know your item script
- we don't know what you are trying to achieve EXACTLY (add to input ? output ? modify quantiy ?)
I mean you did provide the recipe, just what input ?
i've created a new item
That was clear from the start
now i want it to have few recipies
Do you want it to have recipes to craft it ? Or you want it to be usable in recipes ?
Those are two different things
i want it to have recipies to craft it
So you want a custom recipe then
yes, new recipies for a new item

But no, it still doesn't solve my problem. This craftingrecipe allows you to create a few recipes but it only takes into account having one required item, I want to create my item from at least three single items, e.g. 3 rags or 3 twigs. You mentioned tags, maybe that will solve this problem?
You just want to use 3 items in the craft ?
Then just replace item 1 by item 3
Or do you mean have the ability to use 1 rag + 2 twigs, 2 rags + 1 twigs or 3 twigs or rags ?
yes, i want to have ability to use 3 rags to create an item as well as 3 twigs to create an item but these two recipes have to be separate
No or yes ???
Ok man seriously, you need to be a bit more clear on what you're trying to achieve
I asked this
You say yes
i want to have ability to use 3 rags to create an item as well as 3 twigs to create an item but these two recipes have to be separate
Then describe something completely different and your wording seems to describe the opposite
alright, my bad
i want to have ability to use 3 rags to create an item as well as 3 twigs to create an item but these two recipes have to be separate
You want the craft to use EITHER 3 rags OR 3 twigs ?
Then just add more items possibles
Did you read the wiki page ?
https://pzwiki.net/wiki/Inputs
item <quantity integer> [item1;item2...],
i think you need to add flags[IsExclusive] for what you want
adding both items but not the flag will let you use e.g. 2 twigs and 1 rag
the problem is that the quantity of a single item cannot be more than 1
Yes it can ?
I mean 1 item = 1 item
yes, i think i just have to make a flag
You can't make a flag
You need to describe the issue you are having
Bcs none of it makes sense of what your actual issue is
Wdym the quantity of an item can't be more than 1 ? Just set a quantity of 3 ?
I can solve my problem by creating a mod like this but this way has a limit, if I want to add a few possibilities to create one item I can't include more than 1 item, so the quantity can't be more than 1. So, I can't do something like this: item 3 [Base.Twigs;Base.RippedSheets] but only something like this: item 1 [Base.Twigs;Base.RippedSheets]
Why can you not add more items ?
If the quantity can't be more than 1 then that's your choice in the design of the recipe ?
idk, it just doesnt work
yes
Send your craftRecipe
Bcs yes it works
And I can bet you just did a mistake somewhere that's it
You're not importing base
So setting quantity to 1 won't even work anyway
module FirestarterMod
{
item Firestarter
{
DisplayCategory = Camping,
Weight = 0.1,
Type = Normal,
DisplayName = Firestarter,
Icon = firestarter,
Tooltip = "Used to make a campfire.",
}
craftRecipe CraftFirestarter
{
timedAction = Making,
time = 70,
Tags = AnySurfaceCraft;CanBeDoneInDark,
Category = Survival,
inputs
{
item 3 [Base.Twigs],
}
outputs
{
item 1 FirestarterMod.Firestarter,
}
}
}
^that one
You're still not importing base
Same issue as I just described
imports
{
Base
}
Should be something like that, just under
module FirestarterMod
{
why do they need to import for this script?
Using Base.Twigs
if you qualify it with Base. you don't have to import
all import does is let you refer to objects from other modules *without* the module name
Idk tbf imports at this point are just fucking confusing and no one actually knows how they work
they barely do anything, i recommend just not using them
And I've seen cases where not using them breaks your stuff
And I've seen cases where using them breaks your stuff
So uh
only if you are using a short reference
Yea no that's the thing
Even when using Base.
I am fairly certain I've seen many cases of people having issues by either doing any of two, importing or not, using Base.
i'd have to see proof to believe you, i've never run into these issues and never seen these issues happen here
the myths around needing to import base for everything only started because of a buggy error message
I need to make deeper tests I think
Especially as I'm currently rewriting the scripts page and will explain imports
weird oddities to keep in mind about imports then:
imports aren't local to a file, they are global to the module
a lot of references just don't support them, and imports won't change their behaviour at all
Again, inconsistent shit I guess lol
it's why you shouldn't use them ๐คซ
I mean, that you use them or not doesn't even matter as long as you use Base. from what you're saying ?
they're probably inspired by c++'s using namespace directive and that is also very popularly considered something you should never use
yeah
So what's the issue with the dude above ?
i can't even tell what problem he's having to begin with ๐
Bcs I don't see anything special, maybe in outputs
Idk apparently changing from 1 to 3 the quantity doesn't work
Does the craft work if you set the quantity to 1 instead of 3 ?
What's your issue exactly here ? In what case did it work ?
Also
That tooltip is wrong no ?
one sec
yes, works fine
plus it works only without module base
Wdym ?
If you set the module to Base, you need to change your output item module too
module Base
{
item Firestarter
{
DisplayCategory = Camping,
Weight = 0.1,
Type = Normal,
DisplayName = Firestarter,
Icon = firestarter,
Tooltip = "Used to make a campfire.",
}
craftRecipe CraftFirestarter
{
timedAction = Making,
time = 70,
Tags = AnySurfaceCraft;CanBeDoneInDark,
Category = Survival,
inputs
{
item 3 [Base.Twigs],
}
outputs
{
item 1 Base.Firestarter,
}
}
}
Like that
works for now
ill try tis way
whis
thois
this
4th one is the right one
hahaha
oh my fucking god you fucking did it
i was sitting for the last 5 hours
trying to fix it
but why does it show in available ingredients instead of possible ingredients?
oh,nvm
Reworked scripts page
does anyone know how to track a Throwable right after the swing animation? / B42
had to step away; thanks for the link!
You can't
I think you'd have to recalculate the supposed trajectory, if that's even possible
I belive they're reworking throwables, if they haven't done so already. I've seen people using pipebombs on ragdoll zombies, but i haven't paid attention if it was still the same way of "throwing".
Hi all, I see this channel is already quite busy. I'll keep it short. I'm working on a mod to disable all autosaves apart from when the player sleeps. The idea is to have a "checkpoint" system so if the player dies they will restart the day. Losing that progress.
Only issue is I'm haivng big issues finding a way to disable PZ's save on death.
I don't suppose it throws an event that can be hijacked, does it?
Even if it did I suppose the save would happen before you could stop it?
if it does you could check if the event was triggered by sleeping or dying and delete the save if it was a death
Yea it does seem to have that save pretty baked in on death so far.
check the death event and prevent the save there?
When I say prevent I mean like throw a wrench in it
https://projectzomboid.com/modding/zombie/savefile/PlayerDB.html this looks promising. But seems to point at a system that separates player saves from world saves which means you might roguelite back to your bed, but have all your stuff moved/built
Yea I've seen this. I'll keep looking will update you if I can find a clean solution
If there is a clean solution, it's probably the only one.
https://projectzomboid.com/modding/zombie/Lua/LuaManager.GlobalObject.html#saveGame()
deletePlayerSave looks promising as a backup
the funny part is, that "alternative Syntax" for the module block, my work considers this Ugly unusable and non professional. xD
The projectile itself isn't different tho
Unless they finally made them 3D
But yes they do plan on reworking those so they can react to the 3D tiles
Yea but it's a thing, and in fact I usually use it myself ๐
And like is stated multiple times in the page: scripts are not a programming language, so their syntax is ... weird
I think so, but I've seen it only used for fluids
or any from itemMapper
ah i get it
1 L of any liquid?
No
Do you have a plan for all the chunks that have been automatically saved during the day?
no its like always 1, even if you remove 0.2L
Take the example from the wiki
craftRecipe MakeCoffeeMug
{
timedAction = MakeCoffee,
Time = 20,
category = Cooking,
Tags = CoffeeMachine;Cooking,
inputs
{
item 1 [Base.Coffee2],
item 1 [*],
-fluid 0.2 [Water;TaintedWater],
item 1 tags[CoffeeMaker],
+fluid 0.2 Coffee,
}
outputs
{
}
}
It will consume (-fluid) water or taintedwater from any container *
And create (+fluid) coffee
Tho I'm unsure what the item section of output means with the tag
I think I need to rework that fluid craftRecipe page a bit to verify some info
Yea I need to do some tests
It will consume (-fluid) water or taintedwater from any container * - makes sense
Yes, that part I'm fairly certain that's how it works
wdym ?
item 1 [*],
Minimum 1 Container of any Container
Bcs technically literally ANY item can hold water
The new fluid component system allows you to add a fluid container property to anything, like an apple could hold water if I'm not mistaken
makes sense for stuff like "Squeeze Water out of socks"
Tasty
Uh that's not how it's used tho 
But you can see this in action in debug mode by right clicking a tile, you have an option to add a fluid container property
So a wall could hold water the same way as a barrel does
man i want now water squeezing out of soaked clothes as an option todo
You can just make a craft recipe for that
Take any clothing that is wet, squeeze water from it
wringe out clothing is already a thing
or do you mean recovering the water?
yea
yeah thats the point to drink sock water
mmm. hand foot mouth disease. my favorite
does any1 know how to register a Furniture as a CraftingStation ?
so i can make Recipes that use that Tag, that onlythat CraftingStation got
It's related to entities
And the Tag parameter
Some tags are crafting stations, and I suppose that you can define a custom one
yeah, i want to define a custom one, for custom recipes. But i have no idea where i do that xD
i cant find the "entity class" in the java doc does someone know the class name the game uses`?
No it's a script type xD
To make your own crafting station tag right ?
yes
Oh you want to see how the game does it ?
Did you not find your answer in existing crafting station scripts ?
This is one for example
lol didnt even think about looking at other recipes xD
Yea that's the first thing you should do, see where the existing crafting station tags are defined ๐
Start from the top and go down from there
Tho I plan on documenting the entity scripts
Is it possible to make new custom tracer effect to assign to custom guns? I've been trying to figure out how guns get their tracers assigned because there's more than one in the vanilla files
Very interested in this also, but I haven't had time to look into it yet.
Making custom tracer effects would be dope as fuck, would open up for all kinds of stuff
Just for you, I've also observed that there's multiple instances of tracer colors, lengths, alphas and thicknesses, and all but the colors are differently numbered, which might mean that you can make unique and vague shapes if you have the intuition
Hello, I'd like to get started developing a simple mod that adds a poster and a figure. I can program, have already done Java, Lua, Blender, Gimp in professional context. I cannot however find any concise guide on making a placeable item like a poster for example on the modding wiki. Is my only bet to analyze the game files and copy and learn from there?
You're going to get to play with TileZed https://pzwiki.net/wiki/TileZed - not the most easy application, but it's relatively simple once you get the hang of it.
in short, you'll have a 1024x2048 spritemap with your assets, (each sprite being 128x256), and load it up as a Pack. Restart Tilezed and click Tilesets... to reload the cache. You should then be able to create a new tileset and add your tiles to it.
Packs/(yourfile).pak
Tiles/(yourfile).tiles
Tiles/2x/(yourfile).png
I've found that the directory structure can be picky too.
Is there support for multiple spritemaps in case of too much items?
I don't need it right now but would be nice to know
Yes; you can spread assets across multiple tiles if necessary.
The first tile has the sprite name (yourfile)_0; the second yourfile_1, etc.
TileZed also creates those pack files, or is that an external app?
Alright that's exactly what I need to get started, thanks for the help
If you are expecting to have a bunch, I would recommend my_awesome_posters_0 with images my_awesome_posters_0_0 as the first, 0_1 as the second... etc, then the continued list would be the tiles my_awesome_posters_1
Also
I just want to save my future self a headache if I do like the experience and continue so
Thanks, better too much than too little
Eh, not sure
Bombarding with informations can just make new modders run away
But this explains the mapping tools, like TileZed that cdp linked above
Another note, I messed up mine a bit. I originally created different tiles for each different color of a thing. While it worked, it was excessive as I could have made a single tile which contains all variations of this particular item. Since however these tile IDs are attached to a player's game items, I opted not to change it as I had already released my mod, so just kept it.
Good to know, can I import the base game's files in this tool too as a reference image for the angles?
Yes, though expect many items to not have images; Tilezed hasn't been updated with B42 assets yet.
Damn alright
But enough should work to give you an understanding of what the base game is doing.
Okay, thanks for the help!
I think the advertising assets from the base game should have a bunch of signage you can refer to.
Sounds interesting because I only need a poster reference, since the figure will act as a placed item, I will look where in zomboid's files all of this is then
oooh, someone has an update? nice! I'll have to look into that too when I have some time.
Ah, alright, because atm I'm following an age old tutorial for viewing and snapping assets but I'll update my tools first then
I found that something like this helped me too. https://github.com/VeraciousNetwork/PZ-ModTemplate/blob/main/designs/templates/tileset-template.png
Provides a layout baseline so you can position your images.
Is it true that texture sizes have doubled btw? a tile went from 64x128 to 128x256?
No
(I have gimp, inkscape, and blender versions too in there)
I need to document that too
Ah, because this man's tutorial has a 64x128 grid for tiles and they fit in there, but b42 textures only fit in a 128x256 grid
Could you make me a list of everything that your repo has ?
How old is the guide ?
Jeez
Yeah, but it'll have to wait until tonight; about to run out the door.
You're aware that litterally the entire world changed in 10 years ?
Don't refer to such old guides when looking for modding tutorials
There are mapping tutorials that are way way more recent
At some point I need to spin up a Windows VM so I can build Powershell versions of the scripts too.
I'm only in there for the gimp part, and I couldn't find any proper recent one
it worked flawlessy until the grids
I didn't understand, you're using a 10 years old guide of what ?
Gimp or PZ tile making ?
Making PZ Tiles, the texturing and packing part
They all skipped that part as far as I could find
See the unofficial mapping discord too, it will have more guides and resources on tile making
Very weird that everything is always behind another discord but whatever thanks
Not our fault
I know
Stuff here is just very limited
@crisp dew this is automatically done from the in-game uploader
Yo quick question , Is "the only cure" mod out for b42 yet ?
Cuz ive been bitten and i forgot the only mod i had for the infection is the suicide mod
I made this mod compatible with the shop and traders, hope you like it https://steamcommunity.com/sharedfiles/filedetails/?edit=true&id=3500254209
i have no clue what i am doing with lua
need help again. trying to merge my modded item into the loot table, but its not appearing
guys i'm trying to learn how to use blender and get into animation, but I just can't fix this no matter what, my animation always ends up super messed up in the game, what am I doing wrong?
Inverse primary and secondary bone X Y axis in the export settings
this? what i need to select here?
Primary bone and secondary bone, inverse their selections
Primary to X and sec to Y
bro, thank you so much! I was about to lose my mind trying to figure this out, i really appreciate it!
Np, this is a common issue when the character looks like such a monsterish monster
The spaghetti noodle
now I just need to figure out how my animation shows up in the game. I created a test animation for carrying zombie bodies, and I need it to play when carrying a zombie's body. Is that very difficult to do?
yes, i created one animation for the zombie and another for the player (very poorly, but yeah)
I'm not familiar how to create these animations
I suggest you check how the AnimNodes for these work
You'll probably have to replace these AnimNodes
yeah, Iโm going to take a look at it, Iโm not sure if Iโll manage to do it, but Iโll give it a try xd
Looks like it yes
alright
100 sounds very high tho
testing number
The whole point of the tool is that you do not depend on spawning items
it does the stats independently of the items spawning
It takes the distribution table directly
If it doesn't spawn there, it means you made a mistake possibly
i mean it seems glitched in the distribution table
it appears in the dist table, but not in the actual wardrobe
I nevermind I thought you meant it wasn't in it
i cannot figure out the issue
Where did you put the file ?
Looks good
this looks broken
Item doesn't spawn in the container ?
nope
Someone know how to make a trait mod ? because i want to make a trait like wake up from coma, with extreme drunk state and with injury but i really don't know anything about coding ?
is this what you need?
No
Yea so that should be the right one
Since there's no other options
I think I remember people have a similar issue
But I don't remember the fix
looks like it thinks its an item that doesnt exist
Yes
You forgot to add the module
Your item is in a custom module
So you need to add the module in front of the item ID
In the distribution addition
NyoomHoodie.
Yes
^_^
bro else if is all over my screen
"I'm going to rip apart better sorting to look how it works, can't be that bad"
:3
So, this is kind of auto-defining for items
Instead of hand-writing category for each item
Now I gotta define why it casually ignores half of the beverages
hello
I noticed that too after I uploaded the update to my mod. I just left it for now; get back to fixing it at some point.
had to try everything possible just to figure that out, making a custom throwing system where i can plug events and track the throwed item is the only way to do it ig
Gonna try my luck here, crafting the items work, I've registered the tiledef in modinfo, also registered the pack file, the items logo and such works, but when I place it it doesn't work, doesn't get placed and the preview is invisible. I have the tile name from the tile definitions (see screenshots)
Try to place the tile completely independently from an item
When you craft the item, are you crafting it via the crafting menu or the building menu?
Like I said, try to place the tile completely independently from any of these to verify your tile even works in the first place
How? Sorry I haven't used dev mode for tiles before
What's your item config for your item NekoparaMerch.ChocolaPoster?
I think there's a sort of build menu in the debug mode
He sent a screenshot above
oh, sorry right, just catching up. Last check; in your Pack file via Pack Viewer, does the ID on mouse hover match up to your WorldObjectSprite?
How would I import a file for the pack viewer?
I restarted and it became clickable, my bad let me see
yes the numbers and names are correct
I'm trying to find the tile builder brush atm in debug
ok perfect, then it's probably just something silly with the Tile definition. Chances are if it still doesn't work with that debug build option, check the tile def.
Alright thanks
Those options tell the Tile how to behave when placed in the world, ie: this tile is 100% height or "this tile is attached to the wall on the high slot"
I have these atm
if I can't find my tilepack in the tiles selector of the brush tool, is there a registration issue?
It's possible
The pack= is the file name of the pack file right
not the name used in the tileset defs
yup
Does it play nicely with spaces?
~/Zomboid/Workshop/VNGarage/Contents/mods/VNGarage$ find . -type f | egrep '(\.pack|\.tiles)'
./media/texturepacks/vn_garage.pack
./media/vn_garage.tiles
./common/media/texturepacks/vn_garage.pack
./common/media/vn_garage.tiles
What do you mean?
You have tiledef = ...; I'm not sure if it throws a fit with those spaces, ie: tiledef=...
ait lemme test that
Also Doggy will know, but at least in B41 I think we needed a unique registration number; 1300 was VN Garage's tileset for example.
since removing the space I get an actual error on startup with a nil error
is there a list of taken numbers or just guesswork?
For now just use 9999 and see if it works.
There it is, thanks! I can never find that file
Error is fixed with the number, and YES it works
the space and missing number was all
Good to know that registration ID is still needed.
only 1 bug left and that is that the posters don't rotate, everything else works
thank you ๐
rotation was funny for me too, let me open my tire rack to see what I did
either CustomName and/or GroupName must match for the group, and the each must be N/E/S/W as appropriate, (or S/E in your case).
so AttachedN and AttachedW tags, groupname is already done
then customname still needs to match ig
Also bonus info, if you also set item (full name) to NekoparaMerch.ChocolaPoster players can pick up the tile and it'll remap back to the original item when placed in their inventory.
Possibly yeah; I just trial-and-errored with that interface until I eventually got it working.
Noted
Alright then I'll continue that later, it's 1 AM here and I have a masters thesis coming up
thank you for all the help ๐
np, and best of luck!
it will work
but it doesnt mean it wont conflict.
it should be unique cuz it should play nice with other tile mods
so if youre testing it isolated then any number would work
(tho iirc theres a max number)
oh, they won't want to keep 9999 but register their own; I just wanted to do some quick troubleshooting.
meanwhile what I need to do, is see if I can display multiple tile overlays at the same time to a given tile so I don't have to worry about a crazy mapping matrix.
using lua it can be done
multiple sprites stacked on top of each other?
wait nvm you can only add 1
but what i did back then was i added new iso object without sprite and gave that the overlay just to try
but yeah i ended up just adding another object with the sprite i wanted to use as overlay
eh, then I'd have to keep track of the other object, which also can only have 1 sprite overlay.
yes
I'm looking at 9 items, and the idea is to allow the player to have any combination, (within what fits), to be placed. ie: a screwdriver alongside a hammer or a screwdriver alongside ducttape.
inget it
yeah just have your on fill event add object auto matically
i have another one with a barrel that changes its overlay based on the item you put
interesting idea; and you're creating a new object per each addition?
yes
just keep track of it by making a get function and if it returns the object then dont add anymore
and when the container objects item gets removed use that get function to fetch and then delete the object
this mod above is actually much more complex cuz of the offset
i mean you place item on a different square and spawns the object on an offset square
Is that Moonshine - Alcohol Factory ?
and that complexity won't be an issue with mine; the object spans 2 tiles, but each tile is independent of each other.
(at least in terms of item storage)
ye just make sure theres no overlap otherwise it might look weird
oh yeah; already have that lined up thanks to some Blender templates.
if the container sprite bugs and becomes the one on top when you respawn
then you have to make invisible object and add the overlay to that one
this guarantees the overlay is on top
because you can't guarantee render order on map load?
since you have 2 overlay then make 1 overlay normal vanilla
and the the item you would need to do the hacky method
no other way around it afaik
i dunno why really
but i saw it bugs sometime
however it could be because i was doing this on the campfire object
which is global object and has no property at all
everything is being refreshed by java i think
so that could be the reason why it went above the overlay object
Since mine is a container, I could just remove any/all sprites on item updates and rebuild them, if I can go with this method. I'd need to do that anyway.
ah I see what you mean. Yeah, I think I would have just used the build menu to setup a new tile you can completely control.
oh... that was on B41, ok nvm
whatever means necessary . its all about figuring out how to do stuff despite limitations most of the time..
anyways good luck
Thanks for the pointers, I'm skimming through the code in that mod now to see how it's done there.
I was going to actually play some Zomboid for the first time in a while, but then I got distracted by the lack of cute little bows on stockings and now I'm modding again.
I've got five textures in each clothing item for different colors, the script has IconsForTexture = red;blue;pink;white;black; which works perfectly so the icons match the color, I have 5 world models, and then used WorldStaticModelsByIndex = red;blue;pink;white;black, but... every item is getting a random wolrd model color instead of using the same index used for the inventory icon and clothing texture.
The random color is consistent if I pick the ribbon up/put it back down, but only has a 20% chance of matching the item's actual color.
Does anyone have any idea if this is a fixable thing or a quirk we have to live with?
It looks like it's likely due to them being clothing items, which don't seem to use that parameter in vanilla scriptsโthey have separate handling that sets the texture in InventoryItem.synchWithVisual
The default code does sync the two, but special handling for clothing with an item visual immediately follows
Thanks
Guess I can raise a bug report, and just live with random world colors.
At least the inventory icon colors work so you don't have to try every pair on to find out what color they are.
@silent zealot re. #1318920979581501502 message: what you suggested would be ideal compared to this, but it seems feasible to use BodyLocationGroup.getAllLocations & mutate the ArrayList directly if you want to insert a BodyLocation
Thanks - I missed that looking for weird and crazy ways to do things. I did see public final class BodyLocations:Reset() but the idea of having to extract every location for everythin, reset them all, and then recreate from scratch just to wear little bows and a garter without layering issues was too much.
[16-06-25 14:31:50.949] LOG : General f:0, t:1750077110949> [craftRecipe] removing script due to load error = ImproveRadioRange.
[16-06-25 14:31:50.949] ERROR: General f:0, t:1750077110949> ExceptionLogger.logException> Exception thrown
java.lang.Exception: unknown recipe param: HamRadioMakeShift at InputScript.Load(InputScript.java:610).
Stack trace:
zombie.scripting.entity.components.crafting.InputScript.Load(InputScript.java:610)
zombie.scripting.entity.components.crafting.InputScript.Load(InputScript.java:364)
zombie.scripting.entity.components.crafting.CraftRecipe.LoadIO(CraftRecipe.java:526)
zombie.scripting.entity.components.crafting.CraftRecipe.Load(CraftRecipe.java:453)
zombie.scripting.entity.components.crafting.CraftRecipe.Load(CraftRecipe.java:287)
zombie.scripting.ScriptBucket.LoadScripts(ScriptBucket.java:265)
zombie.scripting.ScriptBucketCollection.LoadScripts(ScriptBucketCollection.java:122)
zombie.scripting.ScriptManager.loadScripts(ScriptManager.java:1830)
zombie.scripting.ScriptManager.Load(ScriptManager.java:1753)
zombie.GameWindow.initShared(GameWindow.java:159)
zombie.GameWindow.init(GameWindow.java:1375)
zombie.GameWindow.mainThreadInit(GameWindow.java:754)
zombie.GameWindow.mainThreadStart(GameWindow.java:596)
zombie.MainThread.mainLoop(MainThread.java:64)
java.base/java.lang.Thread.run(Unknown Source)
module Radio
{
imports
{
Base
}
craftRecipe ImproveRadioRange
{
timedAction = Disassemble,
Time = 100,
Tags = AnySurfaceCraft,
needTobeLearn = false,
category = Electrical,
SkillRequired = Electricity:3,
inputs
{
item 1 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 get the error above when loading in the mod (b42)
I don't quite understand why it has problems parsing the Item
Have you tried HamRadioMakeShift โ Base.HamRadioMakeShift?
Poking around, I can see a few mods using code that starts with --Codebase by Yuhiko and his/her mod BodyLocationsTweaker API. All credit of this functionality goes to him/her.
Can't find the original mod or user at all, but I can copypaste the code instead of writing my own.
https://steamcommunity.com/sharedfiles/filedetails/?id=2641190994 ? I'd probably roll my own rather than have this as a dependency, but seems like this may be it
oh sorry that was how it was infact before, I changed it to try something out. So yes
Looks like a lot of modders just lifted the code and renamed the lua file to avoid the dependency.
I'll write my own using theirs as a hint and credit them in the mod description...
Feels more reasonable than copypasting.
[16-06-25 14:40:24.466] ERROR: General f:0, t:1750077624466> ExceptionLogger.logException> Exception thrown
java.lang.Exception: unknown recipe param: Base.HamRadioMakeShift at InputScript.Load(InputScript.java:610).
Stack trace:
zombie.scripting.entity.components.crafting.InputScript.Load(InputScript.java:610)
zombie.scripting.entity.components.crafting.InputScript.Load(InputScript.java:364)
zombie.scripting.entity.components.crafting.CraftRecipe.LoadIO(CraftRecipe.java:526)
zombie.scripting.entity.components.crafting.CraftRecipe.Load(CraftRecipe.java:453)
zombie.scripting.entity.components.crafting.CraftRecipe.Load(CraftRecipe.java:287)
zombie.scripting.ScriptBucket.LoadScripts(ScriptBucket.java:265)
zombie.scripting.ScriptBucketCollection.LoadScripts(ScriptBucketCollection.java:122)
zombie.scripting.ScriptManager.loadScripts(ScriptManager.java:1830)
zombie.scripting.ScriptManager.Load(ScriptManager.java:1753)
zombie.GameWindow.initShared(GameWindow.java:159)
zombie.GameWindow.init(GameWindow.java:1375)
zombie.GameWindow.mainThreadInit(GameWindow.java:754)
zombie.GameWindow.mainThreadStart(GameWindow.java:596)
zombie.MainThread.mainLoop(MainThread.java:64)
java.base/java.lang.Thread.run(Unknown Source)
I haven't messed with the new recipe system at all, so this is another shot in the dark after taking a look at vanilla scripts: seems like it should be wrapped in square brackets
i.e., for all the items it should instead be item 1 [X], except the last one with tags
Not the case for the outputs, just the inputs
Looking at the relevant code in InputScript confirms that this is the expectation
okey let me try that one out
Typing is wrong
Read the wiki page
Your inputs need to be inbetween brackets
okey thanks
Ended up not using Yuhiko's code, I'd guess it was written before getAllLocations() existed (or they missed that function like I did!) so they had some ugly meta-table stuff to get the ArrayList.
Is there also a Item guide for b42?
It seems that I have errors in my Item-creation
They didn't change
The wiki about item scripts is the same
okey good
Make sure you didn't forget a comma
got one at the end of every line and everything in brakets
curly ones this time around
Show your recipe
Wdym you've put everything in brackets ?
item HamRadio1AC
{
DisplayName = Improved Premium Technologies Ham Radio AC,
DisplayCategory = Communications,
Type = Radio,
Weight = 15.0,
Icon = HamRadioCivilian,
BaseVolumeRange = 10,
ConditionMax = 100,
DisappearOnUse = FALSE,
IsHighTier = FALSE,
IsPortable = FALSE,
IsTelevision = FALSE,
MaxChannel = 500000,
MicRange = 5,
MinChannel = 10000,
Tooltip = Tooltip_item_Radio,
TransmitRange = 999999,
TwoWay = TRUE,
UseDelta = 0.010,
UseWhileEquipped = FALSE,
UsesBattery = FALSE,
WorldObjectSprite = appliances_com_01_0,
}
this is a different example
but the curly brakets {}
What's the issue ?
java.lang.Exception: ImproveRadioRange item not found: [Radio.HamRadioInfBat] at OutputMapper.getItem(OutputMapper.java:127).
Stack trace:
zombie.entity.components.crafting.recipe.OutputMapper.getItem(OutputMapper.java:127)
zombie.entity.components.crafting.recipe.OutputMapper.OnPostWorldDictionaryInit(OutputMapper.java:157)
zombie.scripting.entity.components.crafting.OutputScript.OnPostWorldDictionaryInit(OutputScript.java:398)
zombie.scripting.entity.components.crafting.CraftRecipe.OnPostWorldDictionaryInit(CraftRecipe.java:735)
zombie.scripting.ScriptBucketCollection.OnPostWorldDictionaryInit(ScriptBucketCollection.java:188)
zombie.scripting.ScriptManager.PostWorldDictionaryInit(ScriptManager.java:1910)
zombie.iso.IsoWorld.init(IsoWorld.java:2762)
zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:301)
zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:251)
java.base/java.lang.Thread.run(Unknown Source)
.
and I've changed HamRadio1AC to HamRadioInfBat
The issue is your craft
Show your recipe
sure one sec
module Radio
{
imports
{
Base
}
craftRecipe ImproveRadioRange
{
timedAction = DismantleElectrical,
Time = 100,
Tags = AnySurfaceCraft,
needTobeLearn = false,
category = Electrical,
SkillRequired = Electricity:3,
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],
}
}
craftRecipe ConvertRadioToGrid
{
timedAction = DismantleElectrical,
Time = 100,
Tags = AnySurfaceCraft,
NeedToBeLearn = false,
category = Electrical,
SkillRequired = Electricity:3,
inputs
{
item 1 [Radio.HamRadioInfBat],
item 2 [Base.ElectronicsScrap],
item 1 [Radio.ElectricWire],
item 1 tags[Screwdriver] mode:keep,
}
outputs
{
item 1 [Base.HamRadio1],
}
}
}
I told you outputs are not in brackets
Read its wiki page
not on output, sorry
I've even read the wiki page, must have missed it somehow
jup that was it, works now :)
@elder palm It looks like people are having a bunch of issues with more traits again. this time apparently a missing common folder in "dynamic". You may want to update your mod pages to clearly specify not to use the steam page for bug reports.
Hello guys, someone can help me with my mod traslation encoding? I have problem with Russian text provided by users and i don't know how to resolve it. I know from the wiki I have to set the file to Cp1251 but when I do all the text get unrecognizable. Is it ok to leave it that way?
Everyone's complaining my bloody footprint mod causes black tiles in random places, but the mod adds a single tileset with about 16 tiles, completely isolated called "bloody_footprints", and all it does is add an overlay to tiles you walk on. I haven't encountered this myself at all, and I'm completely dumbfounded
But people keep posting about it so I have no idea what I'm supposed to do 
There's issue with MRE mod. There's packing recipe, you box up 12 mres into one item, but, instead of using 12 rations, it boxes up 12 uses of them. Each ration has 50 uses. So, in order to fix it I just multiplied the required amount in recipe by 50. But this is essentially a crutch. Is there a better way?
You can ask someone to share their modlist and play with it
First guess - mod conflict
This is how it looks like btw
Someone told me it's happening without any other mods. Could easily by lying or making a mistake, but idk, with the amount of people complaining and how little it seems like my mod actually affects, I feel like that makes no sense. It's not even a problem with the tiles I add apparently, it's just random tiles all throughout the map
Though I also saw someone mention black tiles without any mods at some point, so I can't tell if everyone's blatantly ignoring the person in my comments that said it was likely 42.9, or if it really is just this mod
you can use flags[ItemCount;IsWholeFoodItem] to use full items instead of uses
I guess devs added this in the few updates
Cause this issue is really frequent
at release of b42 craftrecipes didn't even support food at all ๐
Can you show me example of full input line? I'm only starting to understand these
item 12 [MREM42.MRE] flags[ItemCount;IsWholeFoodItem] mappers[RationType],
Uh, so this just made mre box uncraftable lol
I'm not sure why
So question, is there a way to spawn a specific flier? The guide on the wiki doesn't seem to show a way to do that
hey folks guess who's back and having more issues with clothing items just not functioning despite being copied exactly as far as i can tell!
it's meeeee!
i didn't even fix the previous issue i've just been trying to fix other more obvious issues first like:
{
DisplayCategory = Bag,
Type = Container,
DisplayName = Music Bag,
ClothingItem = Bag_DuffelBagTINT,
CanBeEquipped = Back,
WeightReduction = 95,
Weight = 0.5,
Capacity = 25,
Icon = DuffelBagWhite,
OpenSound = OpenBag,
CloseSound = CloseBag,
PutInSound = PutItemInBag,
BloodLocation = Bag,
RunSpeedModifier = 0.95,
OnlyAcceptCategory = Cassette,
CanHaveHoles = false,
ReplaceInSecondHand = Bag_DuffelBag_LHandTINT holdingbagleft,
ReplaceInPrimaryHand = Bag_DuffelBag_RHandTINT holdingbagright,
WorldStaticModel = DuffelBag_Ground,
SoundParameter = EquippedBaggageContainer DuffleBag,
}```
well i'm realizing now in retrospect that i didn't need a new clothing definition for this item because of an existing tintable duffle bag (i'm working on an item i made over a year ago oops) so i should try using those first before i complain about the issue i'm having so hold on i'll be back if that breaks
yeah ok so the issue persists
ok so as you can see i've created an exact copy of the tinted duffel bag using the same exact clothing definitions as the normal, functional item
so the only way that my item is different from the normal version is in this script file, as you see here
and whatever i'm doing is causing it to break such that when you hold it in your hand it's invisible
even though it's. the exact same item. with a couple of variables changed
Unrecognized in-game ?
Which flag does it ?
ItemCount ?
I would suppose IsWholeFoodItem ?
Hmm, I haven't been able to find the mod that Glytch mentioned last night and am struggling to find working examples of overloading IsoObjects over top existing tiles.
You mean creating a new tile ?
More or less yeah; my goal is to have a sprite, (or more accurately multiple sprites), stacked visually on top of the base Tile.
Idk what you call "base tile" bcs a square can just have as many tiles as it wants if I understood it right
I think it can too, yeah; just haven't done this specific task before. My current search is IsoObject.new in previously mentioned examples.
Check this out to see how I add new tiles
ok, so IsoObject.new and square:AddTileObject were the core bits for that functionality?
Yes
Cool, I was missing the square:AddTileObject, as I niavely expected Java just to handle that since you have to pass in the square object when you instantiate the object.
You can see the constructors in the javadoc
Yea no you can create IsoObject for other reasons
I did notice the Java constructor was rather light; that should have been a giveaway...
yeah the api around a lot of object constructors is really strange
you'll notice a lot of them ask for a cell as well: in my experience every single one of these i've checked does nothing with it
possibly later on they realised that keeping constructors pure is generally the better choice and didn't want to break api just for that
TYVM, that worked like a charm! (also thanks for linking source code). Obviously not the final image, but something renders, so I'm onto the right track and won't need to do too many crazy things with the sprites.
Now that I won't need 300 tiles, I'm thinking of more items I should support, ie a box of nails and box of screws.
What's the goal of the mod ?
Just a storage container with a table top compatible with the "crafting on table" flag.
But as with my other modded items, it's reactive to what is stored; if you store a screwdriver you should see a screwdriver hung up.
Oooh shit wait, you could make something that has varients of objects as tiles that show up thx to the 3D inside other tiles
is there a way to check if an evolved recipe contains a specific ingredient? I have a cannibalism mod that allows you to chop up and eat zombies/dead players, however with certain debuffs. Unfortunately I can't detect if said meat was added to other recipes. At least couldn't find a proper way to do so
Check the crafting inside the crafting menu probably ?
Unless you're making a B41 mod ?
B41 yea
You can probably access the recipe data anyway
Maybe
Actually probably not since it's not a recipe and it's an evolved recipe
i checked the api and couldn't find a method like evolvedrecipe:getIngredients() or sth
eh? Know of an easier way than sprite overload?
No like imagine having a box, and you create tiles that are basically objects placed on different spots of the object, and they would show up correctly inside the box thx to 3D depth maps
oh yeah
So you could have multiple of these, with variants, and anytime the item is placed in the box, it's item as a tile is created as a tile on the container
Tho tbf that sounds complexe as shit, and placing 3D items exists for this reason
I suppose it'd be possible
I think the best application is a single slot tile
That's what I'm doing; I have the table already created as a base tile, and I'm using that as a template to position the different items so they fit on the base tile and within all the other items.
But you're not limiting what item can be put inside the container ?
I will be limiting what items can be placed.
ie: you can't hang a whole battery on a workbench pegboard.
Standard IT stuff, people blame whatever they think changed before the problem started that makes it someone else's job to solve.
It's probably a 42.9 issue, maybe with erosion - similar to one particular piece of grass reaching a point several weeks into the game where it becomes red ???s in the air.
Look at the the item script for an OnCreate function, look at what that function does - for things like fliers it's usually "pick a name at random from a table"
Hello everyone, i'm trying to hide a recipe in b42 apparently the new system doesn't like some of the old calls, how is this achieved in b42?
local function hide_recipe(name)
local recipes = ScriptManager.instance:getAllCraftRecipes()
for i = 0, recipes:size()-1 do
local recipe = recipes:get(i)
if recipe:getName() == name then
-- WORKING TIL HERE --
recipe:setNeedToBeLearn(true) -- NOT WORKING
recipe:setIsHidden(true) -- NOT WORKING
end
end
end
The new object type is CraftRecipe: https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/scripting/entity/components/crafting/CraftRecipe.html
I assume CraftRecipeManager is the namager for these.
I am already using "getAllCraftRecipes()" and i get response until after "recipe:getName()" then the two old commands just throw error and i can't find a way to disable/hide the recipe
I can't see any obvious functions to disable a recipe
Maybe pull the ArrayList of tags with getTags() and remove the tags that let it get used
AFAIK every recipe needs a tag for where to use it - AnySurfaceCraft, InHandCraft, PrimitiveForge, etc
nope, getTags wraps the ArrayList into an unmodifiable object.
Probably because the game hates tags changing after the recipe DB is initialized.
Yep just noticed ๐
maybe trying to remove them from the character could work
like unlearn
Im working in b41
How do objects get added to the globalobject system?
I'm sort of copying the C/SRainBarrelSystem and C/SRainBarrelGlobalObject,
and for now I have isValidIsoObject returning return instanceof(isoObject, "IsoThumpable") and isoObject:getName() == "Wooden Picket"
later I'll replace the Wooden Picket with my own buildable, but building wooden pickets dont add them to my client or server global objects list.
Assuming it works the same as B42: SGlobalObjectSystem.new(self, "campfire")
(ans store the return somewhere for later use probably)
Are you making a new type of object that needs to be globally tracked?
yeah I am
I'd have a look at the existing vanilla files like SRainBarrelSytem.lua, STrapSyetem.lua, SCampfireSystem.lua, SFeedingTrouighSystem.lua
yeah thats what I used to model off of
new gets called in newLuaObject, but I cant figure out where that gets called
looking at campfire I think the chain is: campingCampfire:create or a timed action calls SCampfireSystem.instance:addCampfire(square)
SCampfireSystem:addCampfire calls local luaObject = self:newLuaObjectOnSquare(grid)
yeah. saw that as well. for rain barrels it must get called from the carpentry building file
Not helped by the half-assed "object orientated" system in LUA passing the self variable between different "classes"
At least it looks like creating the globalobjects is all in lua so you can do it...
What is the new globalobject you are creating?
BuildingObjects/RainCollectorBarrel.lua doesnt directly add to the system either, nor the ISBuildMenu
a pipe/water relay for multi story plumbing. all the current mods for it dont work or are gimmicky
my logic for the water stuff is fine atm, just cant figure the global system
It's really hard to search for because of the lua inheritence
There was a lua "javadocs" posted here recently that would probably bea big help... if I could find the link
This deserves a pin!
RainCollectorBarrel has this
So add "uses events to do stuff" and "different in single player" to the list of reasons this is fun to track down. ๐
ah I see my issue. wooden picket (my temp tile) doesn't have its one create file tha calls OnObject add. I'll just create the carpentry option now then
thanks
is carpentry different in b42? would rather use a future proof method if i can
very different lol
That specific thing probably hasn't changed.
But the entire interface is new.
In theory, that won't matter at all if what you're doing is in the "the object has been made, now what do I do?" phase of things which I think it will be... doesn't matter if a map creator put it there, or it was crafted from a menu, spawned by a script, etc. at that point.
Has anyone tried to make the player character ragdoll?
Yes.
I mean I actually tried to make corpses ragdoll when dragged
But did it to the player
It was hilarious and very wrong, some body parts moved with the animation and the rest were like jello
All you need to do is add a ragdoll variable to the animationset xml
But to make it useful, I think you need to do it when there is no animation controlling the player... Maybe with so new falling over animations or something
Mind sending me the documentation on you doing this? I want to do some experimentation to see whatโs possible.
What I just posted is the documentation lol
Download melee ragdolls and it's easy to see what they added to the files
Then add that same thing to some player animation XML files
When would you want to have the player ragdoll?
Working on adding the bows to zombies. The outfit system is horrible to work with. At least strippers don't wear many clothes.
i have a roughly 100% suspicion that tis have some tool that generates outfits for them and that's why the system is so gross to work with
Looks like OnCreateZombie triggers too soon to do anything with clothing.
Agreed, then us poor chumps have to work backwards.
How I can find source if mod calls some kind of function?
If it's a lua function, it's in one of the lua files.
If it's a java function use ZomboidDecompiler for an easy one-click tool to generate a nicely decompiled bunch of java files.
I recommend opening the games media folder in VSCode for an easy way to search. (and open the decompiled java as well if you have it)
Fun Facts about Strippers in Rural Kentucky, 1993
- There are no white strippers. There are legends of a
StripperWhitein the code, but no such outfit exists. - The Stripclub Zombie Zone definition is broken; it re-uses "FiremanStripper" as the index for over half the entries.
- So then where do strippers come from? They are hard-coded in the java classes
RBStripclub("random" building) andRDSStagDo(random house of dead "survivors")
Thanks for extended answer, I'll proceed with research
if (self.srcContainer:getParent() and self.srcContainer:getParent():getOverlaySprite())
tricksy tricksy... was wondering why updateOverlaySprite wasn't firing for this new object; it's because the game code won't trigger if there isn't an overlay sprite assigned.
Imagine if it worked and updated null to null_2.0
I got a method if you want, but I really need to make an addon for it
Bcs too many people seem to need it
I'd love to hear it.
And I have the solution to it already
Because what I have so far is the desires to open a bug report "No white strippers in rural Kentucky" ๐
What I had to do was add the zombie to a temp list to process a tick after
Go up from here
It should be that
Jvla, remember the workbench I've been working on; I realized a shortcoming with this idea. Since I'm using a tile overlay to render items, the entire tile is limited to 128x256, but the item is only a tiny fraction of that.
Regular items are 128px in size, but the entire size of the object has all those pixels to play with.
But good news.... it's working in full now, (just looks like rubbish)
Lol
So on createZombie throw the zombie into a list, then process that with a an onpdate or similar?
It checks later if the zombie gets its clothing set
Hi. Can you use debug mode to edit a tile's zone attributes?
@bright fog that's a great design - I can use that approach and make an extremely stripped back version that is basically "wait a tick, and if they are wearing stockings add bows"
I checked my code a bit but I'm a phone and it's been a while
Possibly was this function
But I remember something else
I found the bit that adds new functiosn with the zombie as a parameter to a list and the delayed function event thingy that calls a function on them
Tomorrow I'll have a proper look and either add that a dependency or code up something that does the 2% I need.
No don't add it as a dependency
I don't need proper consistency, just little bows
lol
Not ready for B42 use yet?
That's B42 actually
But don't use the framework
It's not what it's for
I planned on making a custom event anyway
But you can use it for now if you want
The mod is fully open source in fact now
OK, well it's enough I have a viable design for what I need to do now.
Thank you for that!
Anyone happen to know what I need to do to make custom animations sync in multiplayer?
Do I have to send a server command or something? I haven't really messed around with multiplayer modding at all
"Fun Facts about Strippers in Rural Kentucky, 1993
- There are no white strippers. "
Got me very confused for a second lol
Is there way I can change weight multiplier of held/attached/worn items?
Turns out, yes, gotta basically send a command on client which triggers an event on the server which sends a server command which in turn triggers an event on the other clients saying that the first client's player is doing a custom animation.
With that done, B41 bicycles with mp support is a go
damn Github.... I forgot how to append a pull request
It's hard coded in java.
Heya, for some reason (this worked perfectly yesterday) when trying to add my tileset and define properties it now looks like the following screenshot, but when I open it in pack viewer everything is normal? I didn't have this issue yesterday
like add more commits? just commit to the branch as usual
I thought that was the trick, and vaguely remember GH doing it gracefully before, but can't seem to get it to tie that last commit to the PR for some reason.
and I have no idea Silent; never had that happen before
You can add a tag to make an item weigh 30% when attached instead of 60%. And you could probably use Lua to change the actual item weight when attached/held
Damn ๐
In your 1024x2048 png which the pack is built from, did the image positions change?
The Tileviewer, (at least in my version), pulls the image previews from that .png, NOT the .pack file.
Nope
there have been new images added but I'm making a new .tiles file
and not using the old one
Damn that's bad 
oh.... github is just being REALLY slow right now. ok
I've tried remaking the png exporting again always the same jagged chopped up result
can't find anything online about it either
The exact same file from yesterday now has the same problem
should I just reinstall Tiled or som, nope still broken and unusable
So I'm kinda stuck with a forever broken tilezed now can't load a tileset properly in the tiles definitions, is there another support place somewhere?
Hello, i am trying to get a function to replace one or more items when loot is generated but i can't get it working, here's the code:
local function SwapItem(roomName, containerType, itemContainer)
local items = itemContainer:getItems()
for i=0, items:size()-1 do
local item = items:get(i)
if item then
-- if item:getType() == "XXX" then
itemContainer:Remove(item)
local lighter = InventoryItemFactory.CreateItem("Base.HottieZ") -- THROWS ERROR
itemContainer:Add(lighter)
-- end
end
end
end
Events.OnFillContainer.Add(SwapItem)
-- ERROR: General f:205, t:1750191512781> ExceptionLogger.logException> Exception thrown
-- java.lang.RuntimeException: attempted index: CreateItem of non-table: null at KahluaThread.tableget(KahluaThread.java:1667).
-- Stack trace: ...
A specialLoot rule would work too (but i haven't quite grasped how to handle it)
In case anyone ever figures this out or reads it please ping me, I've tried everything and this shit does not wanna work
It's because in your path to the tileset you have to remove the 2x
No the path is already correct
tile's are split up very weirdly too not like the ones who have the 2x error
already tried those internet fixes
thanks for taking the effort too answer at least tho
on Linux there's ~/.local/share/Tilezed (or something like that...), check if you have a tilezed data directory in your home and delete it. I've had to do that multiple times when Tilezed freaks out and acts weird.
Ohhh alright, guessing it's gonna be in appdata or user folder then in windows
probably
Oh, it looks exactly like when I had the 2x path error, down to the weird corners and everything
Are you using the steam zomboid tools or the unofficial tilezed release?
Ah okay, probably something else then because I think you access it differently iirc
Did you ask in the mapping discord?
Yes but that one's completely dead
Currently looking for that temp folder cdp mentioned
maybe a caching issue since the exact same image worked yesterday
yup
Got one
Please work
Nope same issue
Hmm, we might be thinking of different ones because the one I'm talking about is pretty active, like there's people talking there daily
Wanna post/send the 2x tileset? I'll take a peek at mine and see what it does.
Honestly dunno what more I can check
ait gimme a sec
Sprites are still lined up with the expected positions, so that's good.
Yup and I made sure to not mess with any export settings too
it's just weird that the exact image from yesterday suddenly didnt work either
nothing changed
and this is a new image ofc but the exact old one also broke
and opening them as a new Tile positions them correctly.
So this whole past hour was my tilezed being broken even though I reinstalled
๐ญ damn
thank you for testing btw!
Potentially. Steps: I closed Tilezed, put it in my 2x directory, re-opened Tilezed, clicked 'Tilesets...' to pick up on the new image, created a new tile named whatever, and added the spritesheet.
Alright I'm going to strangle tilezed one of these days
Thank you btw, without your help would've probably given up using tilezed alltogether
Your welcome, and it's understandable; Tilezed can be quite the PITA.
welp i have now created my second Zomboid mod!
all it does is buff the crit chacnes of the craftable two-handed long blade weapons, keeping it shrimple https://steamcommunity.com/sharedfiles/filedetails/?id=3502137508
Alright, it's coming together; have 2 sets of items that can be placed, lower-res boxes, and independent left/right sides of the pegboard.
B41 or B42? The way to create an instance of an item changed in B42 and no longer uses ItemFactory.
try instanceItem("Base.HottieZ")
You can also use newItem = itemContainer:AddItem("Base.HottieZ") and just create it directly in the container.
Hey guys!
I'm new in pz modding (literally 0 experience) i know C and java, and i started to take a look over lua, doesnt seem to be difficult, but i'm scratching to understand how to make changes in pz, i do a "scooby snack" item but i cant attach a 3D model on it (cereal box but scoobySnack texture)
If anyone has a full guide to share it could be awesome, i already explore the pinned material and the wiki but still unclear for me
A quick and simple tutorial for making a new mod for Build 42!
I might make more in-depth tutorials or showcases of how some of my B42 mods are set up at some point. :)
Feel free to ask any questions in the comment section!
My Discord can be joined with: T4FhKzxUJj
I think this video teaches how to create an item
Thanks im gonna take a look on it!!
I'd call it a day, THANKS!
im trying to make a mod where you can set your age and get skill bonuses the older you are, and a fitness debuff after 50. I have it written (i think) and I can even enable the mod in pz, itt just doesnt do anything
any help would be apreciated
This a general question, is there a publicly usable library out there for armed vehicles, like tanks and stuff?
First questions: any errors related to the mod in console.txt (like lua files failing to load)
Second Question: if you add print statements to the code to confirm the code is actually being run, do they print?
Third question: isn't that just free skills for 49 year olds, given the typical zomboid character lasts a lot less than year?
Forth: is that AI generated? setPerkLevel isn't a thing in B42, there is setPerkLevelDebug
I'm also not sure if that level is the level 1 to 10 or the amount of XP.
https://theindiestone.com/forums/index.php?/topic/84571-4290rev29660-white-strippers-are-a-myth-no-one-hires-strippers-wearing-pink-and-there-are-not-enough-strippers/ lets see if this gets fixed as quickly as the "no gay porn in Kentucky" bug.
[42.9.0][rev:29171] White strippers are a myth, no-one hires strippers wearing pink and there are not enough strippers. Version: [42.9.0] Mode: [Singleplayer] Server settings: [N/A] Mods: [None] Save: [New Save] Reproduction steps: While working on adding cute little bows to stockings I found two...
None I know of - a few big vehicle modders have their own libraries with common code/features/templates but looking at KI5 all the armor code is per-vehicle instead of being in his core library.
Thanks to this and looking other mods and the source game scripts itself i manage to do it! 
it was confused at first but it has a lot of sense now
i didnt attach the lua distribution code yet but for sure im gonna do it tomorrow!
and yes, i was since i receivde that info doing this item haha
Rather amusingly it transitions perfectly between any currently existing animation the player might be doing and seems to inherit the motion of the body.
smash
can anyone tell me where the file for blacksmithing recipes is?
i remenber that progammable VHS-recorders in 93, i think .... is there a mod for that?
Record over video tapes with broadcast shows?
VCRs that could do that existed in the 1980s, but the interface for setting the record time... lets just say it was so complicated it became a running joke, and President Bush The First said "By the year 2000, all Americans must be able to set the clocks on their VCRs"
Which was a joke. You can tell it was a joke because the republican party has never been big on improving education.
Even the Avengers struggle with VCRs:
Tired rambling aside, a mod that lets you record shows over an existing VHS cassete with a suceess rate based on your electrical skill or better yet, recreate the interface and make players fix the flashing 00:00 and set the timer, would be great. I hate planning my first week around the TC broadcast times.
๐ค ๐ค
If you want a really easy way to do distributions Easy Distribution API let's you copy an existing items loot table (with optional modifier) instead of needing to write dozens of entries by hand
hey quick question.
I've removed all the possible spawns and replaced then with my own.
How do I restore the worldmap.png to this screen?
Hi! In build 41, debug mode, how do I use the cheat mode for growing crops faster? I just tried the cheat option "grow" but this doesn't seem to have any effect for me.
Edit: Problem resolved...
Before I make a fool of myself, I don't have any experience in lua programming or programming in general for that matter. Does anyone know if the Tooltips for Moodles can be modified to draw vertically rather than horizontally? I read somewhere before the way how tooltips for the moodles between 41 and 42 work differently, that they don't support html line breaks anymore.
@gabes There are a few moodle frameworks (Moodles in Lua, Moodle Framework)
But, I don't know if those touch the tooltips.
moodles don't really support modding in any way
Item tooltips are deep in the java, moodle tooltips I'm not sure on but I suspect they are too
moodles are one of the most hardcoded things in the entire game
I think moodles in LUA straight up removes the java ones and then recreates everything via lua.
that's what i did for statsapi too, i don't really plan to port that to 42 though ๐
Whcih is one way to handle lack of modding lol
We're all playing B42 unstable and this guy is already on the NPC update!
Nice
Reminds me of when I had to up the joke for people to get
How do I apply lua patch to item, so I change one specifical property?
DoParam()
An example:
local function NepItemParam(item, newparam)
local x = ScriptManager.instance:getItem(item)
if x then
x:DoParam(newparam)
print("NepTweaks: item updated: "..item.." "..newparam)
else
print("NepTweaks: unable to find item "..item)
end
end
local function NepChangeSomeParams()
print("NepTweaks: Adjusting weights...")
NepItemParam("Base.Plank", "Weight = 0.3")
NepItemParam("Base.SheetMetal", "Weight = 0.2")
NepItemParam("Base.SmallSheetMetal", "Weight = 0.1")
NepItemParam("Base.Key1", "Weight = 0")
NepItemParam("Base.CarKey", "Weight = 0")
NepItemParam("Base.Key_Blank", "Weight = 0")
NepItemParam("Base.Log", "Weight = 0.9")
end
Events.OnGameBoot.Add(NepChangeSomeParams)
You can use DoParam to replace any line of an item's script file.
Never tried dealing with things that can appear multiple times, it probably just adds an extra entry in that case but there are not many of those in item definitions.
Thanks, got it
Thanks, im gonna take a look at it! i feel a little lost in the modding wiki, and i use the search bar here to see if there is some disscusions about my same issues
It's overwhelming at first, but just break what you're doing into small pieces and ask here if you get stuck.
Damn, chatgpt is really good at explaining code
Had troubles reading it
(Understood like 50% of it at first time, now I see it all)
So basically is it possible to ask chatgpt to create you some lua code and modify it?
Or it will give you shitty code that made you suffer more then creating it from scratch ?
Nah
You probably can, but you have to know what you're looking at
To see if chatgpt made an error
Because it is not familiar with PZ API
yeah, for sure, step by step i learn a lot doing that item and is just a txt + 2 png images 
Yes of course also like don't give it the whole mod idea you just ask him step by step then combining all the coding
Still, chatgpt is unfamiliar with zomboid API at all, if only there was a way to feed him whole guide on it ๐
It's not THAT bad, I tried the other day, it's gotten better but you can't trust it
You still need to learn how to use the java doc for example
And learn how stuff ACTUALLY works in the API
He is pretty good at explaining syntaxis tho, it can even understand the purpose of rather unknown functions
I tried feeding him other lua files as well
It's more work fixing CHATGPT's code than it is making your own
ChatGPT is good if you have a specific question
"If I have two lua tables how do I remove anything in table A that is also in table B?"
or stuff like that
That's a good idea true
Well that would be a good start
Then it writes code though it is a language model
so it puts in things that look like godo words, even if they are made up
Yeah, if chatgpt doesn't knows the answer, it won't tell you it doesn't knows. It will make up something just to answer you
Ask for something impossible like "how do I make my flashlight red in project zomboid" and it will tell you something like flashlight:setColor(red)
instead of "flashlight color is hardcoded in the java rendering engine for both flashlights and vehicle headlights`
He has no idea. If there was a way to feed chatgpt whole PZ codebase and Lua API, then it would work like a clocks
But models like this aren't for public iirc
no it'd still be terrible, chatgpt is a language model, it does not understand code
It would still be bad because ChatGPT is not for code; you need a more specifc model
the only thing chatgpt knows is what kind of words usually appear after the words you gave it
It doesn't understands anything, cause this is an algorithm ๐ค
ChatGPT (and LLM's in general) is about saying the words it thinks you want to hear.
Just use any AI made for coding
so very generic questions it can answer with pretty good accuracy, but the more specific a question is, the more likely it's just stringing words
Chatgpt has become a household name for neural networks
"Here's a question and a few billion floating point numbers, please hallucinate an answer" it's crazy it works at all.
A marvelous technology that people make fun of ๐ญ
Stable diffusion for image generation makes more sense to me, but it's still insane that a download of a few gigabytes can figure know how to reproduce so many things
Even then my understanding of how you take source images, turm them into a model, and then get an image out is very very surface level.
(not how to use it, but how it actually works)
Better way to call it is "fabricating information"
As referring to google AI overview lol
People shit on it, but it is actually good
"Markov chains but better"
I honestly skim over the Gogole AI rubbish when searchin for a technical problem, better to find teh stack overflow posts it stole the answers from
when i'm looking for information i need it to be right, so this technology that does not guarantee anything that it tells you is actually true is not that useful to me
It's also very bad at program architecture/design. But to be fair, so are a lot of actual programmers.
You could see the source if you would just scroll down
must've been trained on java
It is not like it takes data out of nowhere
I can assure that most of bad AI responses is the human fault, not AI failure
As a human I wrote "print" in a shell script today because I'd spent too much time in LUA
The AI is mixing up every programming language in existence lol
It's not just bad source data (which is a problem) but also how it processes it and the lack of validation. I expect more and more specialized tools in the future; for example there have been multiple cases of legal research via AI making up cases, but an AI with a bit of non-AI wrapper could validate any case cited is at least a real case.
The reason for hallucinations is the reward system.
If it can't validate info, it'll just start fabricating because that's the command
In this case, this is coding fault
tile definitions can be anything right? people are just advised not to use the same one as other mods?
AI companies are working on the issue they've created lol
I wouldn't call it a coding fault when a program doesn't do something it was never supposed to be able to do.
It's a sales & marketing fault that people expect it to do that lol
the id number? yes, though keep in mind it's 'advised' because it would create a hard incompatibility with another mod using the same number
AI already can fool people and pass turing test, isn't that insane?
if it's e.g. private use then the id number you pick doesn't really matter at all
There's a wiki page that references a lot of tile defs used already
Even more insane is passing the Turing test turned out to be less important than being able to make a short video that 90% of people think is real and repost on facebook.
i think if you were going to design any program specifically to defeat the turing test, the concept of a language model is exactly what you would end up with
Yeah, thats what I heard toooo. A big shame about it too.
it made me a function that turns lua table into hash table or some shit
dont remember the details
good stuff

nor do i have the code anymore as it became obsolete
but ye for general purpose stuff its great
Has anyone done item serialization on b42? Low-key thinking about trying it so I can make my bicycle containers work better, but also feels like it could be a disaster
especially since it's an unstable version and any update in the item scripts could mess it all up
don't do this
the item format changes in some way basically every update
you're just asking for regressions, item deletion, missing item properties, etc
starlit had an item serialisation module in b41 but there's just no way for something like that to be stable with updates
it can only really be added on tis's end, or through java mods that hook into the game's existing serialisation
Is there a way to tell whether an item is from vanilla or from a mod?
It will have identifier in description
Vanilla items don't
item:isVanilla()
thanks~