#mod_development
1 messages · Page 349 of 1
Like Tcherno said, look at the debug code for spawning vehicles
As for Mod options, there's a wiki page about it
So I added the rest of the gold jewelry to the recipe and it broke my crafting menu again.
I got the crafting menu working again I think I'm running into an issue with the ingredient filter for the crafting recipes; where if I don't have everything in my inventory the recipe is being hidden.
I'm trying to make the recipes appear in the crafting menu as a greyed out. (e.g.: Close Umbrella appearing in the crafting list even though I don't have any form of an umbrella in my inventory)
How do i go about getting around this hiccup?
I would assume this is impossible since I've never known it to be doable but figured I'd ask: there's not any way to do file i/o in a mod, is there?
Totally endorsing https://pzwiki.net/wiki/Getting_started#Warning_on_AI_usage btw 👍 - And sorry for over-sharing but holy moly I completed a single-commit ~300 line refactor after ~3hours discussion and making changes with chatGPT pro. I did it "blind" not running the code until now, just making refinements, asking we review specific aspects together. And Boom, first test now and it works without even tripping any of the asserts.
IMHO: It's not if AI but how AI.
NO!
AI IS BAD!!!!
there is api for file io
getFileWriter and getFileReader
oh, really? cool! i’ll have to check that out
Uh, what is this wizardry?
What, the log omits everything until the second double-colon 🤯
I have tried a .lua layout and a normal plain text format for my crafting recipe. .-. I can't even get it to pop up in the crafting menu anymore. The game acknowledges it as a mod though. SO thats a plus I guess.
Ha, darn. Only it is the second double-colon, in my test lol. Something to do with log stream tagging or smth I would guess. Any other advice other than to be careful in the future with this? We shouldn't touch anything from https://projectzomboid.com/modding/zombie/debug/DebugLog.html ?
declaration: package: zombie.debug, class: DebugLog
Theres suprisingly little info about how to add custom traits to the game. Does anyone have anything that could be useful? and heres my code (which doesnt work)
I've made sure all the ID's and everything are right. Ive ensured that the mod.info is looking for this file in the correct spot. Would my end of line being CRLF instead of LF cause issues?
This mostly explains the format for making a trait, this one for example is the resourceful trait from my mod Expanded Professions (it's referred to as improviser except in the player-facing name because that was originally what I called it and I never bothered to refactor).
local improviser = TraitFactory.addTrait("Improviser", --The name you'll use to refer to this trait if you need to later, not seen by the player. I believe this also dictates the name of the icon image for it. getText("UI_trait_improviser"), --The source for the player-visible name of the trait. 0, --Trait point value. getText("UI_trait_improviserdesc"), --The source for the description. true) --If true, the trait is not accessible from the menu, usually means it's specific to a profession.
I put the UI things in a text file in my mod's /media/lua/shared/Translate/EN/ named UI_EN.txt but it may be possible to define them in a lua file, i'm unsure.
That file should be formatted similar to this:
UI_EN = { UI_trait_improviser = "Resourceful" UI_trait_improviserdesc = "Can craft shivs, aerosol bombs, and smoke bombs." }
You're probably fine to use OnGameBoot as the trigger event, but my mod used OnCreateLivingCharacter so it could be something to try if you can't get it to work otherwise
TLDR; I would try changing the event that triggers your function and migrating your ui strings to a file
you add your trait OnCreateLivingCharacter? 😨
it's in the same function that does the professions and those break if they aren't done OnCreateLivingCharacter
i haven't encountered issues with it
i have no idea if it'll actually cause noticeable problems, but that event triggers:
- when entering the main menu
- when entering the game
- any time a player loads in
- any time an animal loads in
so it's a little wasteful of performance at least 😅
i suppose it's possible that it creates duplicates i just can't see since all of mine are profession-specific but i would expect that to throw some kind of error since they'd have the same name
jeeze
i think most people hook the function that resets the professions to get around that limitation (i have no idea why they reset them, especially since they don't for traits)
oh i didn't know there was a function for that lol that would've saved me a lot of headaches
also are you getting any errors with this code, or are the traits just not showing up?
yea once i enable the mod it give me an errer when i move to the spawn selection screen then the trait just doesnt show up in the character creator
can you see what the error is? it should tell you if you're in debug mode
oh uh yeah i didn't notice that before but uh
what are the backticks for
because i would imagine those would cause issues
this is the page i was basing it on and i just kinda took them
i dont know what they do, im not too good at lua
those are for embedding the code in a markdown file
they aren't part of the code
the parser will give up when encountering them
so remove them?
yeah
now i have this error and it still isnt working
can i see the current state of the code?
yeah that's what i thought, you're also gonna want to get rid of the lua
i belive that's also part of the markdown formatting
so should this be fine?
i believe so, also i've been told you should be fine without using OnCreateLivingCharacter, but it will work
btw where in the file structure should this be? that might also be an issue
OnGameBoot would probably do fine and wouldn't be called nearly as many times, so it would be more performant
this file should be in /media/lua/shared/NPCs/
yea i had it in a different spot
ill try it again
still isnt showing up
what is the entire file structure. from workshop forward?
b42 or b41
b42
Workshop/MODNAME/Contents/mods/MODNAME/common/media/lua/shared/NPCs/FILE
i had media and onward in the "42" file, if that files even necessary idk
42 should also work but i believe generally the safer bet is to put them in common
idk i'm not well versed on the specifics of that to be honest
thank you for the help
not really, but ill come back to try it again later
alr, gl
<@&671452400221159444>
damn these mods move quick
how did you write that faster than I could press ban
I even scrambled to do it quickly
anyone know how to setup a label in sandbox options? option Label { name = "text", type = "label", title = "==== Mod text setting ====", page = EFKARB, }
Thats not working and i cant rly find any documentation.
you can't
muscle memory 
damn, they have that in the zombie options, i want that xD
yeah, vanilla options don't actually use the system mods do, so they can do a lot more than we (easily) can :(
Does anyone here know how custom mechanics UIs work? I have been trying for two hours to get it to work I dont understand why it’s not working
At least you havent spent 2 days getting a crafting recipe to show up.
ah man that sucks
im not too versed on crafting recipies or id help
I had it appear in the crafting menu once with no items needed to craft it. Added an earring as a proof it was working. Added the rest of the Gold jewelry as (One of) and it broke my crafting menu and I haven't gotten it to work since. 🙁
thats so horrible
there arent any tutorials, there is no information on the wiki and looking at/using other mods fixes nothing, because the only mods i can think of with cusom mechanics uis use that DAMNlib or TSARSlib and thus arent helpful
im ACTUALLY crashing out rn
issues im having: the base picture wont load, and some of the parts are loading in the wrong places
HOWEVER i can hover over where parts should be and they are there, but ONLY with code i KNOW doesnt work
yea i alr did that, thanks for trying to help tho
TIL: Fisher–Yates shuffle with O(n) time and O(1) memory.
local j = ZombRand(i) + 1
entries[i], entries[j] = entries[j], entries[i]
end```
Those two last lines are supposed to be translation keys values
The translation keys are not put inside a Lua file
See this page:
Also it seems you're quite new to Lua, I suggest you check out this page too, this might teach you one or two things
thank you, this will be very useful
ZOmboid recognizes the mod but won't acknowledge the crafting recipe. Any help?
<@&671452400221159444>
Anyone have any idea if "Broken" items can be used in crafting recipes? Im trying to do stuff with the broken ceramic molds but cant figure out how to allow them as a valid item in a recipe.
got it
item 1 [Base.ClayIngotMold;Base.ClayBarMold] mode:keep flags[AllowDestroyedItem],
B41 right?
Yep. I did similar to recycle broken molds back into clay with water. because getting more clay sucks
Yes b41.
Only annoying thing is I don't know of a way to make it only take broken, but meh, I guess recycling unbroken is fine too
I'm trying something with OnTest to see if I can make it only work with items with isDestroyed
that will only let you enable the craft button if you have destroyed in your inventory.
not force it to use them
You could maybe mess around in on-create to at least swap whatever mold is used for a destroyed one (or just swap condition of destroyed mold and input item)
assuming the player has a destroyed one
(could use ontest for that, or just let them use non-destroyed molds after all destroyed are used)
Does OnCreate handle the craft results if its present?
It allows access to them, and lets you do funky stuff with them
AFAIK, the game still crafts the item as instructed
Gotchaa, alright. Ima read and see if I can figure something out.
Sadly they moved most of the onCreate functions to java.. but a few still remain.. also, mods
new arts for the radial menu! 🐺
heya guys,
I am trying to make a button that would immediately complete the "Drying leather" process from drying rack
but seems like editing ```lua function ISWidgetCraftLogicOutputProgress:update()
ISPanel.update(self);
if self.craftInProgress ~= self.craftLogicComponent:getActiveCraftCount() then
self.craftInProgress = self.craftLogicComponent:getActiveCraftCount();
self:updateProgressItems();
end
local progressSlots = self.progressItems:getItemSlots();
for i = 1, #progressSlots do
progressSlots[i].progressDelta = self.craftLogicComponent:getProgress(progressSlots[i].craftRecipeData)
progressSlots[i]:setStatusIcons(self.logic:getStatusIconsForItemInProgress(progressSlots[i].storedItem, progressSlots[i].craftRecipeData))
end
end```
Wow this is so cool
from ISWidgetCraftingLogicOutputProgress.lua
won't work
if i change the self.craftInProgress to 1
it will only allow that yellow progress to complete immediately
but the progress time keeps on ticking
also changed the getRecipe time from Input lua file to 1 as well
didn't do the trick
has anyone found a way to bypass this or has anyone already made a mode that do this function so i can lean from it?
here's the image of what the problem is..
got the time required to set 1 and in progress highlight to set 1
but time remaining tick kept to 6 days
i've spent 6 hours trying to find a single file where it handles this... but wasn't able to suceed
any help or hints would b appreciated 🙂
tbh, I haven’t dabbled at all with crafting ui stuff yet (so not super experienced with this).
however one idea as a workaround…
If you can isolate the two parts of the ui (the two timers) and control the count-down on each one… what if versus of having them synced, you were to set both timers to have the same count-down? for example, if both were set to “06d 23h 59m 39s” it might read the same for the Player
hmm
from what i've found
the top "input" half and the bottom "inprogress" part are handled in 2 diff. .lua files
input and output
input file has time handling function
while the output doesn't..
this block handles the "time required:" part
in input half
right now, im guessting that output time part is handled in tooltip or something... but can't find it
hmm… yeah that is interesting. finding what handles that output is the missing piece of the puzzle
the actual crafting is controlled by the CraftLogic, not the ui
ohhh that makes sense!
it's a java class yeah
so then ill have to create a new .lua that calls any methods that are in craftlogic.class
this is it right?
yeah
ty, ill take a look at it
If I have 0 knowledge about modding zomboid and just the most basic knowledge about game development, how hard would it be if I tried to make a custom map with a few custom tiles?
Making a simple map? Easy. Making tiles? A little bit hard.
You don't need any modding knowledge to make a simple and not too big map
Tiles are a bit tricky but it's still very doable
#mapping
might want to start here
how did I miss that
hmm i might b wrong
but it seems like
there's no way making the drying leather instant
all methods are hardcoded into "private"
or maybe im just not skilled enough to make it possible
Not sure how to modify existing recipes, but you could possibly create a separate but identical recipe that completes instantly.
I've been trying to do that with my tjing, but I can't get the game to acknowledge the crafting recipe.
Is hooking a script onto an existing timed action a good idea for B42? I'm wondering what the chances are that it'll get screwed up in the next updates
Hi is there a modding discord? Wanting to learn lua and give it a crack.
shouldn't be an issue, it's about as likely as anything else getting screwed up
Yeah, well I guess I better hope they dont decide to mess with stuff
<@&671452400221159444>
Must be exciting as a moderator when you get a ping for something else than a scam 
Can somebody confirm? For an object in a square, the sprite property "Surface", if not nil, represents the z-offset from the ground that placed items should appear to place them atop visually correct.
p:getSquare():getObjects():get(1):getSprite():getProperties():Val("Surface")) 18 for a chair, 31 for a table etc.
:D
not sure if this is the right place but if anyone is doing commissions I'd be happy to chat about it for project zomboid (smaller-ish request dms open please!)
That's awesome bro, really improves the immersion
thanks!!!
You wrapping the mod up for publishing or not yet
i 100% agree, they are pretty fun to make too
I'll be your first subscriber
i have an unlisted pre-alpha thats been up bout about 6 months actually, i might release a public beta after i do one or two more vehicles
Wow, you've been working hard on this
ive been doing some refining for a while though because i haddnt gone and finished up stuff
Is it for KI5 or vanilla?
yeah!
i havent been doing work on it that whole time, and some assets i already had but its been alot
its not tied to k15 in anyway no
im working on the next vehicle right now, though its basically just ANOTHER ford c-series lol
Keep us updated bro. I'm very interested in using it when you're finished working on it
i LOVE showing off things that i make so i will 100% shar as i make stuff lol
it wont be fully finished anytime soon, i have like 70 vehicles planned lol
but the existing stuff + the mack n-series will be basically finished hopefully today
Finally back to a recipe appearing.
I win.
@willow tulip I was able to make it only use broken molds by just doing.
CraftRecipeCode = CraftRecipeCode or {}
CraftRecipeCode.CrushBrokenMoldToGrog = {}
-- Only allow craft if at least one mold is broken
function CraftRecipeCode.CrushBrokenMoldToGrog.OnTest(sourceItem, result)
local entity = sourceItem
if entity:hasTag("Hammer") then return true end
item = entity:getFullType()
if (item == "Base.ClayIngotMold"
or item == "Base.ClayBarMold"
or item == "Base.ClayBlacksmithAnvilMold")
and entity:isBroken() then
return true
end
return false
end
i did it
Interesting.
Figured out to make all types of drying racks complete instantly
just add that code, or alter it in a way you desire to produce the same outcome
for those who want to.
Other new additions
I can send you a link to the pre-alpha version of the mod if you want btw
Interesting, I recall someone was working on drying racks that might be interested in that. @tall lotus I think?
Yeah, but that change the elapsed time only in the lua side, java timer will still be running separated from the elapsed time counter. If you want to change in java as well, you will need to use reflection and change the other property which I don't recall the name from the top of my head now
Sure, but couldn't you cheat the other way around?
Set the recipe time to 999999, then intercept the lua to change the shown time, then just go 'DONE' ?
I like it. Still so high color saturation in my view it makes it stand out way too much vs the other assets and cars so far. Gives it a plastic-y feel. Just honest feedback. Respect your work big time!
I think so, but then I would have 2 different configuration times in the recipe, 1 set to 999999 (in the recipes) and doing a map for all recipes that I would run through the custom drying rack.
I think manipulating the java property is better in my case
Oh you figured out how to write to the java property?
Yeah, that's what I mentioned before... I used reflection for it
Ahhhh, I didn't know you could write to java properties from LUA
Neat! I assumed starlit only allowed reading of them
like this, reading it:
local craftLogic = dryingRack:getComponent(ComponentType.DryingCraftLogic)
local previousTickElapsedTimes = Reflection.getField(craftLogic, "previousTickElapsedTimes")
And then writing it:
previousTickElapsedTimes:put(craftRecipeData, modData.elapsedTime)
so I assume craftLogic is just any old java class you can access from LUA?
(or can be)
(and getComponent is just some drying rack thingy?)
Neat
It will return the craftLogic object which is a java only class. Then I manipulate it from there
Starlit is so cool :0 @bronze yoke 🙂
I even (optionally, if installed) use it to improve the fuel consumption and engine heating calculations in Project Summer Car by getting the current throttle position
(else I have to estimate it based on current speed and thats dumb)
The issue with that is a lot of the colors I’ve seen the v-series in WHERE high satuaration, plasticy colors
Hello friends, I'm a 3D artist and I'm planning to do mod work on Project Zomboid. Is anyone interested in collaborating?
wait, im not following what the problem is exactly.. can u simplify it for a newbie?
This is actually extremely neat for zombie modding too
So you can basically write to fields ?
This new craft logic runs in java only. The data that you see in the Elapsed time is provided by the java class.
My issue was that I had to pause that timer, so lets say that my recipe was taking 1000 to be done.
If I paused it only using the lua like setElapsedTime(500) and keep that setting to 500 until I want to unpause it, this lua call will not change the object in java memory, also java uses previousTickElapsedTimes to control how much time has passed for that recipe.
So even if I was setting the Elapsed time in lua, java was ignoring it and running the timer for the recipe. When I was unpausing it and expecting that the recipe would run for more 500 time, it was actually finishing it, because in java was still running over that "paused" time.
I hope is understandable.
But basically the craft logic uses previousTickElapsedTimes to control how much time passed for a recipe and clone that value to "ElapsedTime" in lua.
ah so u wanted to pause it
ok yea, then ur situation is diff. than mine
since what i wanted to do was to fastforward it
got what the problem was
If that is working for you only by using the setElapsedTime, is even better, so you don't use Reflection
u r right about java side timer keeps on going
no
what does reflection really do ?
is it a new function that starlit lib. has?
you can modify the object that the field points to, you cannot modify the field's value (which object the field points to)
confusing...... so.. a is not b... but b is a? XD
way advanced for me...
yea, was good to learn new thing about reflection. ty
<@&671452400221159444>
Anyone working on a horse mod?
Absolutely! There's a team of us that have been working on it for a couple of months
So that means I could have a dummy IsoZombie with specific field values to move those over to another IsoZombie ?
no
a field's value cannot be changed by lua: a field's value is either a primitive (number, boolean, etc) or object reference
if it's an object reference, you can modify that object as usual
you just can't change the field's value (which object is referenced)
I didn't mean to set the field directly
But you can modify the stat fields indirectly
LETS GOOOO
if the type of the field is exposed and has methods to modify it then it could be very similar/effectively the same as being able to write to the field
I think you can write in debug
I do think it would be awesome to be able to write/read using a generic getter -- but I can also see why TIS may not want to blanket allow that
although, perhaps subclasses of IsoObject, and a few other classes, could be whitelisted
I imagine adding getters/setters can be easy to forget
And java requires specified typings so it may get really weird to make a generic getter/setter
it's actually very easy, i just don't think tis wants to
there's signs that it's not really intentional that field writing in debug is possible, and it's probably not intentional that we can read them without debug
you know what i always wondered? why nobody ever made a pz story map where you play as a scientist and have to escape the lab as infected break out of containment, and you have to find keys and weapons and such like resident evil
From what I saw in Lua manager the read / write makes explicit if debug checks.
well actually, they do expose those classes in debug only, but exposure isn't necessary for any of the API they added for reading to work
and it's why writing is possible
it's interpretative for sure but it seems to me like the author of the debugger just didn't know they didn't need to expose classes to pass references to them
I edited to clarify/correct -- and yeah that's a good point
the debugger doesn't actually make use of the classes being exposed in any way
I'm not all that familiar with the ins and outs of java reflection -- but how difficult would it be to make exposure inherited?
There's been a handful of cases where classes existing under exposed classes haven't themselves been exposed. I also wondered why that would be default / how hard would it be to not make it that way.
as far as i know, it's not really possible
in java's reflection api the superclass relationship is stored one way, so a class knows its superclass but it doesn't know of any classes that inherit from it: i don't know if this is exactly why but what comes to mind is if a subclass hasn't been initialised yet it wouldn't be in that list and that could lead to really inconsistent annoying behaviour
Erm, So we can alter POD value though right?
so what is previousTickElapsedTimes:put(craftRecipeData, modData.elapsedTime) doing exactly?
it's calling a put method on the object stored in the previousTickElapsedTimes field
is previousTickElapsedTimes some kinda java container?
it's probably a HashMap yeah
Oh.... extremesadface...
I guess starlib can't get me an instance of unexposed classes either? (or let me call functions on them?)
you can get an instance through something exposed (either through starlit's field access or just regular return from a method), and starlit can read their fields, but nothing else
(of course you can theoretically chain field accesses to get another unexposed object buried in another one)
Hmm, so I could put some kinda java container into carcontroller for lua to read/write to. If I felt some overwhelming need to have LUA write to my java stuff, instead of just having the java poll LUA tables directly (likely faster?)
i would expect a lua table to be faster if interop is the only thing that container exists for
it should be almost exactly as cheap as a hashmap for java to work with, but on lua's side the hashmap is staggeringly more expensive to work with
yea currently I just poll steering options and stuff like once every 2 seconds or so
though manual gear shifting polls every frame for likely dumb reasons
Should prob improve it to be more on the java side later.
(right now, shifting up/down actually changes a LUA table, that the car controller then reads (and overrides/writes to if your outside the gear limit of the vehicle your in).. prob not very MP friendly lol.
Oh look, more interop discussions.
speaking of, Im now convinced bettercarphysics changes basevehicile (the 12000 line java file) just so it can have a few accessible members to call from the LUA side -_-
(mainly just to turn the mod on/off via lua..)
Wonder if id have any luck asking the devs to just expose carcontroller so we both could have nice accessable members without touching basevehicle -_-;
Anyone knows how can I get around this ReplaceOnUse for Skill Books?
I already see that from Craft Helper the ReplaceOnUse=SheetPaper is already applied to the Skill Books, but when I read them, they are not replaced. For magazine literatures, they are replaced.
for i = 0, items:size() - 1 do
local item = items:get(i)
if item:getTypeString() == "Literature" and item:getSkillTrained() ~= nil and item:getSkillTrained() ~= "" and item:getNumberOfPages() ~= nil then
print(item:getDisplayName())
item:DoParam("ReplaceOnUse = LibraryReceipt")
end
end```
My mod so far (there is now over double the Powell variants)
I assume those don't follow the same rules
Yeah i kind of figured 😭😭
You'd have to implement the replacement yourself in the Timed Action of reading
IsReadABook right?
Decorate the complete function, smthg like that
Idk. Maybe
Yeah ill try
I just saw some msgs here back in 2024 and just assumed they were working but I'll try and add some function to replace maybe on IsReadABook
I am working on something. Not that mini-story arc per-se but something to keep the player engaged, have them seek out things, do stuff, have a narrative driven "compas".
How I think about the lack of "story content":
- It is part of what gives Zomboid its unique character. Many games that are narrative driven by concept have to restrict player freedom or are otherwise designed to prod and push players. I love that PZ is a sandbox.
- Tooling isn't really entirely there or easy enough. Building quest lines, progression logic, player guidance. Narrative assets such as text/audio/video - We have basic building blocks but none that are easy to work with for non-coders to build high quality experiences "easily".
- Return on Investment: If you factor in also testing, balancing we see that that overall effort is high. And the current audience likes the game for what it is. Would a more quest/narrative expansion attract a different crowd of players? Hard to say. A risky move though for sure if you have a small team.
So I can completely understand where we are and I think its not a bad place!
That being said, personally I have found myself lacking "mid and end game motivation" in single player and I am trying to scratch that itch. Also I can imagine that as a PZ veteran even the early game could use a spice-up. You know all the tricks so well. Giving additional challenges can help but eventually things like "You start with a bullet stuck in your head" branch-"in", so to speak, into the regular gameplay loop, requiring you to die and begin the adventure from scratch to get your kick. But "this is how you died" ✌️ 
Is there a simplified function where item can be removed from player's inventory+bag
getInventory():Remove("") only removes from the main inventory but does not check the bag, or do I have to really check the bags as well just to remove the item
You can use:
local inv = player:getInventory()
inv:RemoveOneOf("ItemToRemove")
That one goes through main inventory, and any equipped containers. Just make sure to loop it if you need to remove more than one of the item
Oh god it works. Thanks a ton!
ouuu gotcha, well u have to let me know what you end up working on!!
Question on best practice for zomboid lua coding. Should I or should I not drop something like a "pz_types.lua" into my vs-code workspace for lua language server to pick it up? containing e.g.
---@class BuildingDef : userdata
---@class IsoCell : userdata
---@class IsoGridSquare : userdata``` etc.
I want to annotate functions with `---@param` etc. correctly and not see yellow warnings for that.
Mehehe link redirects to the umbrella game item but I do have the vscode extension umbrella installed and activated. 🤔 . Why then yellow warnings still.
No it doesn't
As for why you have the yellow warnings
It's because you did NOT activate it in your workspace in fact
also if you really meant 'vscode extension' that is why, it's not an extension, there is an extension called umbrella that is nothing to do with us
Yea
it's an addon for the lua extension downloaded through its own addon manager
Read the install section of the wiki page
I swear it did. second time clicking now I land there on the correct page 😄
Bcs I linked the wrong one at first
But I changed it like instantly and yet you had time to click it lol
you cheeky .. ;))))
i might create an umbrella extension in the future, the main benefit being that that would cut down on the confusion a lot
it would also be needed to distribute emmylua stubs since emmylua doesn't have an addon manager
ha gotcha. Sorry for not reading better
Ok. I had to first disable and then specifically enable the Umbrella (PZ) addon for the Umbrella extension and only the workspace folder I wanted. That fixed it. Cheers. Thanks folks. 
Don't use the Umbrella extension
That's not Umbrella, that's another random ass thing for another game
Use the Umbrella addon for the Lua extension
Anyone know how to change a zombie corpse to a skeleton? I don't think setSleleton is the right one for that
declaration: package: zombie.iso.objects, class: IsoDeadBody
Probably has something to do with its age
I still think it'd be a good time to migrate from ZedScript txt script files to something else like YAML while the scripts are being generated from Java.
Fuck no I'd rather see their shitty script format than freaking yaml 💀
Anyway, they'd still have to rewrite their entire script parser if they did that
- a lot of their scripts are not yet automatically generated
Nope. SnakeYAML and grabbing from maps and lists isn't hard.
Doesn't matter, that still requires a rewrite
And when they get there this would be the right time to consider this option.
I'm not saying it's freaking hard, I'm saying you still have to rewrite the whole thing
You made it sound way bigger than it actually would be.
Yes their end of it
Not the parser itself.
Yea ?
What ?
The file isn't written the same, they'd have to rewrite the script parser ?
If they move to YAML, at least use some libs to handle the parsing ?
YAML is one example of a language that has all the features needed for the same scripts and is widely supported, even to the point of JSON Schemas.
Only SnakeYAML which would be incredibly light.
the main reason i'd like to see them migrate to literally anything else is because zedscript is not parsed in a consistent or predictable way
it doesn't even have a concept of types
This is my main reason for considering this as an option to suggest.
Yea so they'd have to rewrite their whole parser anyway
I think I know what you're saying however the way you're saying it implies that it's way more work than it would be.
It's not.
most of the script handling would be extremely easy to convert to a new format, though actually taking advantage of the benefits would take longer
Thank you for saying it better than I could.
That's what I'm saying but it's something that TIS might not even want since ZedScript already works.
Most of the questions I see here surround the issues with ZedScript itself as a format and not the content.
Even if it weren't YAML, something that fully supports their needs and types would still be worth the effort because it's tested, proven, and widely adopted.
Tbf I'm not saying they shouldn't change it, but yea it's still quite some work for sure
Just take lines that take optional arguments like craftRecipes inputs and outputs, how do you handle that ? Make it a dict ?
YAML can't have everything in a single line can it ? Unlike JSON right ?
those are the weird exception to how zedscript works universally elsewhere -- i do think these should have been represented as objects
zedscript files are currently parsed into a dictionary-like (for the most part, there are weird exceptions remaining) object before loading, which you could just create from YAML, JSON, XML, etc fairly trivially, it's actually probably less work than their current parser is
i think it would be pointless however unless they went one step further and introduce the concept of types to the actual object loading code, currently everything is kept as a string and converted to the desired type by the actual object loader -- this wouldn't be a huge amount of work but it's a pretty boring afternoon for sure
Oh yea for sure, the whole thing would for sure be way simpler
personally i don't care if they even stuck with zedscript, i just want the way scripts behave to be less inconsistent
Serialized objects are a thing
You can use annotations and have the library polyfill classes with fields
It's surprisingly way easier and Gson does this too with JSON.
well i think they should do that too, but that's a full rewrite so i don't expect it
i have to think 'what's the minimal amount of work for the highest gain ratio'
That's what led me to my opinion honestly. It's why I decompiled and fixed up the generation code and started writing the patched exporter too.
Yea this. Zedscript is basically just another case of 'not made here' syndrome, when any other language parser has had entire teams working just on the parser for years, while zedscript is basically one persons side project.
Sure, it was good for getting something up and running in the early days.. but now it seems to be costing more time to maintain then it would be to figure out how to use <insert any other standard language parser library>
(Especially when you take into account how robust the error handling/reporting of other languages can be compared to zedscript randomly crashing in the bowels of PZ)
Hi! I'm trying to work on a patch for DoorBreacher and Fancy Handwork, I've resolved the issue with hard crashing, but now I want to add some flair. Is someone able to tell me how to refer a difference between a reinforced door and a regular door?
I thought HP might have something to do with it but all doors appear to have a HP of 500.
So I got that resolved, now an issue I'm having is I'm trying to call a custom sound for when you break your foot against the door, but it gives a warning that the gameobject for that sound doesn't exist?
You mean the script ?
You might have wrongly referenced your sound file
Make sure it's in the right folder too
Is there anything more simple than this? I want to create a context menu on waterobjects
local playerObj = getSpecificPlayer(player);
local playerInv = playerObj:getInventory()
local waterObject
local items = playerInv:getAllType("LabItems.LabTestTube")
if not (items and items:size() > 0) then return end
for _,object in ipairs(worldObjects) do
local square = object:getSquare()
if square then
for i=1,square:getObjects():size() do
local object2 = square:getObjects():get(i-1)
print(object2:getSprite():getName())
if luautils.stringStarts(object2:getSprite():getName(), 'blends_natural_02') then
waterObject = object2
break;
end
end
end
end
if waterObject then
if not isToxic(waterObject:getX(), waterObject:getY()) then return end
local getWater = context:addOption("Get Toxic Water", items, GetToxicWater, waterObject, playerObj)
end
end```
specifically just the part where worldobject is a waterobject
Yeah I ended up actually working on a backup of my mod instead of the main branch I got it working now!
You'll have a 30% chance of breaking your foot against a reinforced door.
(I didn't make DoorBreacher but I did make it work with Fancy Handwork because prior it would hard lock)
There's a 10% chance you'll actually open the reinforced door though. 
Next vehicle in my mod
hey besties is this the right way to format spawning my modded clothes? also how do I make it spawn on zomboids?
Read the procedural distribution page
thank you
where is that though?
thanks
hello this is my first time modding so sorry if this is a silly question, i am following the clothing mod guides but i dont see anything in them about how to set up the inventory icon for the clothes? does anyone know
ur amazing thank you
I'm fixing to upload my first mod to the workshop. There's the description box in the in-game uploader, but how do I make it fancy with blue/resized text and bullet points like I see on most mods on the workshop?
<@&671452400221159444>
<@&671452400221159444>
Current progress on my next vehicle, I want to add some more company liveries but idk what to do next, if anyone has any suggestions they would be greatly appreciated
Had to do a lot of completely unnecessary work for the mechanics UI
Ugh mobile hates sending transparent images, sorry
hi guys is there a guy who can help me with main menu? i want to change png to "gif"
lua script that change background png every sec
i think i need lot of pngs
It's not a good idea bcs the main menu images are of the screen resolution size
And loading multiple ones quickly could be very slow or take a huge amount of caching
in 1920x1080 should looks good
That's not the problem
It's a performance issue
That's a huge image, you'll have to load multiple ones every frames
Even at 5 fps, that's still a huge image to load in, or even to cache in based on the length on your gif
You can test it out if you want but you'll have to code it in
I know some applied this in, tho I think they had some limitations or used some tricks to gain some performance ?
@faint jewel if I remember right used it for a main menu to have rain
And @warped valve
Uhhh nope. I have regular sized background and custom coded particle rain
Aah so it was rain made with UI elements ?
No, like legit particlea
Textures that you make move ?
No a custom written line renderer
Yea so UI elements
You're using the line renders, that's just stuff
I preloaded all of the keyframe textures that I generated using VLC. The animated menu I made runs at 7 FPS with a 640x360 original resolution on the source images, but I just scaled them to screen size. I added scan lines to the video rendering before generating keyframes to make the low quality less noticeable with that effect. I also lowered the source video's FPS output to lower overall size of all the keyframes, which came up to around 50 MB for about 2-3 minutes of "video". Definitely choppy, but the slowed/reverbed music pairs well with it.
If you don't preload in some way, the images won't have time to render nicely before swapping one keyframe for another
was thinking about the following in concept:
gallant cossette gt, includes custom livery, spoiler than affects the actual grip in game(i.e +20% to handling) and a hp rating of 770 vs the 570 on the standard cossette. But it’s going to be set on a range of rarity, but as a baseline 10x rarity of standard cossette.
It would also always come with the performance brakes, suspension, and tires.
Similar to the Calloway corvettes irl
Would it be possible to hardcode the grip values like that? I have some experience with Java and Python, but nothing with games.
Did you check how much ram that used ?
Making a car mod ?
I think I did but I didn't write it down. It wasn't much RAM used beyond what the game normally uses
Yes
Hey, what tools would y'all recommend for recoloring tiles
Any image editing software
:D
<@&671452400221159444>
Does anyone know how to remove “MakeUpType_” from the beginning of my custom makeup selections? I heard it has something to do with translation?
Mhh, whats your go-to pattern for attaching (non-modData) meta-data to a userData object e.g. an IsoSquare? You keep a separate table with a reference?
My use case: For certain whitelisted sprites, read their texture prop "surface" and make it accessible for later usage of the square as a property a la "Advised Z-level that items dropped on this square should land on"
Edit: Approach taken for the moment is a weak-key table with global set and get.
local surfaceHitBySq = setmetatable({}, { __mode = "k" })```
Hmf procedural programming vibes.
You mean the text that is displayed in the game? Did you make a translation file?
You need a Makeup_EN.txt file that contains MakeUpType_XenoAwesomeMakeUp = "Aweome Facepaint"
The translation system is janky but reliable.
Thank you, that’s exactly the thing I needed ^^
What folder do I put it in other than media?
media/lua/shared/translate/{CountryCode}
So for example english is media/lua/shared/Translate/EN
Understood, thank you!
makeup has its own translation file? Weird!
PS: I looked and its MakeUp_EN.txt in vanilla. The game can be case sensative on linux/mac so make sure to match that exactly @teal fulcrum
Mod data with x y z coordinates
Thanks. That ends up in the user savegame etc. though, eh? I was looking for a simple "decorator" for runtime stuff, doesn't need to persist.
I'm sure it made sense to someone at some point.
You can simply have a table instead of mod data then so it's persistent only in the current session
Or I'm completely missunderstanding what you're trying to do, your message is a bit confusing
Yes that I know and it is my current implementation but from developer experience perspective I dislike having related properties or functions further from the object they relate to :D. OOP.
myIsoSquare.zOffset instead of zOffset(myIsoSquare)
https://en.wikipedia.org/wiki/Decorator_pattern 🙂
In object-oriented programming, the decorator pattern is a design pattern that allows behavior to be added to an individual object, dynamically, without affecting the behavior of other instances of the same class. The decorator pattern is often useful for adhering to the Single Responsibility Principle, as it allows functionality to be divided b...
I can wrap the whole IsoSquare into custom table/class, sure, but that feels kinda heavy. So I wonder what other people do and if there is a "lua modding"-way 😄
You still need to describe what you're trying to do but bcs it's a Java Lua interface and you can only do proper modding from Lua side, you have limitations
You can decorate functions sure but you can't decorate Java functions from Lua. You can but it decorates the Lua side function call, not if it's called only from Java
So here I'd rather you explain what you're trying to do really, but like actually what yoy're trying to implement in the game so I have a bit on context on your goal to properly help
If you want to associate data to an object:
- mod data for persistent data
- table associated to object ID for per session data
Ok so you want to know more about the "Advised Z-level that items dropped on this square should land on" that I referred to earlier?
And you can't use the object itself as an ID
I guess
What's your plan
What do you really need to do here ?
So ultimately my question is stylistic on what folks consider good practice.
Use Case: "Spawn items with Lua visually correct on tables or below them"
Current implementation: Look at the sprite property "Surface" of e.g. a "furniture_seating_indoor_02_33" which would be 27 high. Store found Z-offsets with a reference to the squares in a weak-key table so that other parts of my code can look them up if and and when needed for item placement.
Question: Is there a more elegant way that expands functionality of vanilla/Java-Side objects?
Not really, it really depends when you need to do the check of the objects in your lookup table
You create the item fully with Lua, so first off that makes things easier to manage
You don't have to hook up to any item placement or anything
If you need to access those stored information, it really depends when you do that
Like do you need to access when picking up the item ? When running your custom code on it ?
Bcs you can hook to various timed actions, like placing item, picking up furnitures etc etc
Yeah I understand that :). It's really just when placing. I don't intend to babysit these. The larger context is that I am building several helpers to author "scenes", a bit similar to how the zomboid "stories" work. those are all Java side afterall and we can't expand/reuse much there. And I need to gather information about the environment of the Scene. Like "Are there surfaces good to place stuff on?" because I want to give scene authors (well, myself) easy placement options like "Spawn 2 guns, one backpack on one of the tables in this house".
Simple note regarding checking for surfaces, you might want to use the same method as the game uses to check for flat surfaces for crafting. It should adapt better to modded tiles than checking the tile sprite ID
oh that sounds good!
As for your mod idea, there was such a mod in B41, and might have been updated to B42
There's lots of addons for it
Modders that implemented their own item stories
Like pillows on beds
So idk how that mod works exactly, but yea
damn I gotta look at that closer and/or get in touch! And I did do research, but this passed me by.
Your creation @jovial harness ? 🙂
How do I get actual fixed sized fonts in PZ? (like UIFont.Medium except... Not scaled when you change font options)
weak tables are not implemented in kahlua btw
i have a reference to an item in the player's inventory and i want to equip it via lua, does anyone know how to do that?
seems like it should be trivial but i've been scouring docs for like an hour now
do you want to equip it instantly or just trigger the equipping action?
instantly
player:setPrimaryHandItem(item)
oh i should have been more clear sorry
i meant like wear clothing
they also call it equipped in the docs
well sometimes they do anyway
it's weirdly inconsistent
player:setWornItem(item:getBodyLocation(), item)
thank you!
https://steamcommunity.com/sharedfiles/filedetails/?id=3589351115
public release :D
it's unfinished
we were able to get it working for the horse mod but it isn't used in vanilla and needs some lua fixes to work properly
Hello everyone, I'm creating a mod for PZ 41.X. I'm trying to create a custom item but it's not working. Anyone to help me?
could you explain further please?
are there any mods that makes zomboids starve to death
ah you want them to die, i think i saw something like a while ago
well ai says it has a decay feature
I could've sworn I saw another mod where it was called "Zombies DO Die" which was WIP but got de-listed from the workshop
Perhaps, I could use this mod for my 28 days later challenge run
That's what I've been trying to figure out
I got third at least
If anyone has any mod recommendations, please let me know
close enough!
- I created an object in items.txt for my mod
- and I spawn my object (like for Base.Sheet Paper 2 which works very well) but I have an error that I can't interpret. I use "local item = InventoryItemFactory.CreateItem("OOS.SpecialPaper")" + square:AddWorldInventoryItem(item, 0.5, 0.5, 0.0)
MB just this 🙁
I think my file structure is not correct yet because I still have the error
without "imports...Base" its the same..& witout last coma...the same
last comma is fine
imports does nothing
Most of the time
does anyone here know how to add more vehicle attachment points? (like for trailers)
trying to figure out semis again but so far ive not been succeful
just do it ingame with F7 ?
Does anyone know if there's a way to forcibly update the hotbar? I've been trying to use setAttachedSlot() and it works but doesn't actually take effect until something updates the hotbar (eg. equipping/unequipping a belt, taking something in or out of a different slot, etc.)
alternatively just like
any documentation whatsoever on ISHotbar
i can't find a single thing on it
Can I somehow make vanilla objects (like a stove, a car, etc.) run my code after reloading the world, without player interaction? For example, I need to process an item inside a turned-on stove, but when the player reloads the world, the stove turns back on, yet my item’s handler doesn’t start. How can I get such objects — not tied to the player — after reloading, like a car with my module or a stove with my item?
might work but ive not had a moment to try this, ive tried via scripts and they wouldnt attach to eachother
is there a way to force night time to occur earlier?
i have zombies set to sprinters at night but night doesn't seem to happen until 10pm or later
Anyone know of a mod that will add a simple canoe and paddle to allow you to traverse the river?
Hello anyone interested in making me a custom vehicle mod? I'll pay you and let me know how much it would cost.
Thx
-- HELP ME I spent 20 hours on this problem --
Hi, I'm still having my custom item spawn issue. Could someone please look into this in detail?
I have the error message :
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Cannot invoke "zombie.core.textures.Texture.getName()" because the return value of "zombie.inventory.InventoryItem.getTex()" is null
So I think PZ is not making the link between my items.txt file (in MOD/media/scripts/items.txt)
module OOS
{
item OOS.SpecialPaper
{
Type = Normal,
DisplayName = Special Paper,
Weight = 0.1,
Icon = SheetPaper2,
MaxCount = 1,
CanBeDropped = false,
CanBeCooked = false,
Destroyable = false,
Script = SpecialPaperScript,
}
}
and the call via:
-- CREATING PHYSIC 3D ITEM IN THE WORLD
local item = InventoryItemFactory.CreateItem("OOS.SpecialPaper")
if not item then
print(string.format("[SERVER] Unable to create item"))
return
end
the printout shows "[SERVER] Unable to create item"...
congrats blob!
Not sure if it'll help but I see in build42 vanilla lua files they stopped using InventoryItemFactory in favor of instanceItem. Which works for me and my custom items. Not having scripts attached to them though so can't inform about that.
I do import "base" too in my scripts.
{
imports
{
Base
}
item MyCustomItem```
Can I somehow make vanilla objects (like a stove, a car, etc.) run my code after reloading the world, without player interaction? For example, I need to process an item inside a turned-on stove, but when the player reloads the world, the stove turns back on, yet my item’s handler doesn’t start. How can I get such objects — not tied to the player — after reloading, like a car with my module or a stove with my item?
Events.OnGameStart.Add(function)
Events.OnCreatePlayer.Add(function)
smth like that?
you probably want to look at doing stuff when the stove is part of the active cell/when it is unloaded from active memory, not when the game starts/stops.
There is a sort of "keep track of global objects and do stuff with them" system for things like traps and rainbarrels that get updated offscreen, but I never managed to figure out how that works.
What you can do is keep your own table listing which ovens/devices need to be tracked and their location in the world, then you have an everytenminutes event that checks if they are in the active cell and if so updates them appropriately.
(and save your table into global moddata)
In an ideal world you'd be able to add to the IsoStove.load() and save() methods, but those are in Java.
So the only proper way is to save the cell the object is attached to in moddata and then retrieve that object after loading back in?
Thanks!
Hello, first time making a zomboid vehicle mod and everything works except the shadows are inverted, anyone know how to fix this?
shaders might be broken?
idk ive never seen that happen before
Setting invertX to true fixes it on the width of the car, but its still inverted front and back, so im guessing there is something wrong with my model
Hi all, I'm trying to use bodyPart:setDeepWoundTime(0) to remove a deep wound but what happens is that the wound is still visible but shows it has 0 time remaining. Doesnt disappear until I bandage it, then it finally is removed.
I tried setDeepWounded(false) and that didnt seem to do anything
clientCommands.lua from vanilla calls a syncBodyPart - you are calling that too? Might be a multiplayer thing only, but who knows ..
I wasnt, will now
Would anyone happen to know what would make a weapon do this when put in a sheath?
I tried to do my best to replicate another sheath mod, even got it non-dependant on the other mod but unlike in that mod, it appears between my legs
not totally certain, but looks like the attachment group is messed up
can i see the slot def for your sheath?
probably looks vaguely like this
oh i see
so the problem is that "Katana in Sheath" isn't a default location
it's something their mod added
I see
i'm not entirely sure how you would go about recreating it but there's a list of the default ones in AttachedLocations.lua
a belt one might be pretty close to what you're going for
For placing it on my back?
oh you want it on the back
uh i think there's one for the back you could use
probably just called "Back" or smth but i don't remember exactly
you could use "Rifle On Back", that might work
that i know is a real one
and should probably give you about what you're looking for
Somewhere here?
this is the list (for b42)
it's in AttachedLocations.lua
which is in /media/lua/shared/NPCs/
Hmmmm
nice 👍
Just need to make it so that the sheath shows up on my back too 😅
yeah that i have no clue on how to do, so best of luck
Thank you
no problem
Just one more thing, why would the mouse-over look like this? Is it something within the Lua?
not sure
is it throwing errors?
Not that I can tell
I’ll check to be sure
Yeah, none showing up, I even left on "Break on Error" to be sure
Oop, no yeah
weird
I just saw it's stacking errors like crazy
oh
Only happens when hovering over it
anything in the console?
XML issue
Either Clothing XML does not exist
Might be a typo, or if you have "extra option" to wear it or just something wrong with item script, like Missing comma or smth
If you have "Extra" option, but the item that is "Extra" does not exist similar things can happen, but i think then its when you right click
I believe that I simply hadn't matched the name in the files to the XML
Trying it out now
Still popping out errors when hovered over, very sad
Would I need to fully restart my game or just reload Lua from the main menu?
Just restart game to be sure
I don't think Lua reset does anything with XML's, but maybe?
Overall if you have non lua error, with model and such its better to restart
No luck
How do you get the weapon types like Axe, LongBlade, Blunt etc. It used to be getCategories() but it gives an error now
was changed to getWeaponCategories()
Does it still return the same format? It seems like category:contains("Blunt") always returns false but my category looks like this [Blunt]
InputWeapon:getWeaponCategories():contains("Blunt")
Item:getWeaponCategories():contains("Blunt")
thats what "even more traits" mod uses
weapon:getScriptItem():containsWeaponCategory("Axe")```
Just want to once again humbly ask mod developers and authors; please stop deleting your B41 mods with hundreds of thousands of subscribers that are used by huge numbers of multiplayer servers.
'Rainmaker' just had a huge tantrum and fully deleted all their B41 mods, including the firearms and blades mods that were widely popular for B41 multiplayer.
And now all those multiplayer servers are completely fucked. Super annoying.
tbf if you're running a mp server you should back up the mods you use. a hassle to be sure, but really what server hosts should be doing.
Not just popular B41 mods... better to not delete mods in general. Turn off comments, set to hidden and ignore is a better way to forget about it without causing problems for other people.
Also, never hesitate to click the delete button next to a comment on your mod instead of stressing out by responding in some way.
this
Your icon is prob not loading or something, or lack of worlditem or something.
Start by stealing some other vanilla items 'item' script, then make sure your mod works (it should with a vanilla item), then start changing/deleting a couple lines at a time and testing.
PS: note that your icon, while you call it 'SheetPaper2' will actually have to be media\textures\Item_SheetPaper2.png on disk (IIRC)
I'm having issues with a katana sheath throwing errors anytime I hover over it, I'm not sure what to look for in the console.txt, but I believe that this is the section that contains the errors. I am able to equip the sheath and use it to store a katana with no issue, it only throws errors when moused over
Ez kill
that happened to me, with the 'tooltip' mod, whenever I moused over something that used a slot that was 'exclusive' with something else I was already wearing
like how you can't wear shoulder armor + backpack, it would error if I moused over backpack while wearing shoulder armor, or shoulder armor while wearing backpack
(but mousing over backpack while wearing a backpack was fine)
I just ignored it, since it only caused tooltips for those items to not appear (and spam errors when I moused over them)
Well, I would like to have it not do that, personally
Is using getDisplayCategory of "PROTECTIVE_GEAR" a valid way of detecting armor on the player?
uninstall your tooltip mod then if your using one. Or ask the author to fix that bug.
I’m not using a tooltip mod, I’m making my own different mod. It’s not an issue with an already published mod
Ohh ok
zombie.core.skinnedmodel.visual.ItemVisual.getHole(zombie.characterTextures.BloodBodyPartType)" because "<local14>" is null seems like the important part, so you might be missing some data about holes?
Hmmmm
Do you want to detect the protection level provided from the armor, or just detect if they have any protective gear? If it's the latter, then yeah
I'm gonna do both
Has the steam workshop changed smth about the resolution for the display of your mod's screenshots? Everything is messed up for me since 1 or 2 weeks.
When you open them in full ? That's something I noticed too
It's weird
Yeah. Only happens in "large mode" for me when you click on a screenshot.
Why did steam make such a change??? As I created my mod's pages, I really checked that all my screenshots have appropriate resolution and now everything is broken! Lol! 😭 😂
rip
I thought I was the only one
Can someone help me with my dance mod I am trying to make. I have no clue what I am doing wrong and I don't know how to fix this error message.
LOG : Mod f:0, t:1760995301373> loading \dancemod
WARN : General f:0, t:1760995301394> TextManager.Init > font "MediumNew" not found in fonts.txt
WARN : General f:0, t:1760995301394> TextManager.Init > font "AutoNormSmall" not found in fonts.txt
WARN : General f:0, t:1760995301394> TextManager.Init > font "AutoNormMedium" not found in fonts.txt
WARN : General f:0, t:1760995301395> TextManager.Init > font "AutoNormLarge" not found in fonts.txt
WARN : General f:0, t:1760995301400> TextManager.Init > font "DebugConsole" not found in fonts.txt
Ignore this message
The game was warns and errors that are thrown in the console by default
I have no clue what the problem would be then
You need to give more detail here
What more can I give? I have checked more times than i could count that the file structure is correct, all the names, and code was ok
All you've said is you don't know what you're doing wrong; share more details about what you are doing at all. What's happening? What do you expect to happen? Any relevant code?
Well I am trying to make a keybind that opens a radial menu to select a bunch of dances like the true actions dance mod in build 41.
when you say "any relevant code", what do you mean? I am a bit newer to coding, but isn't all of it relivant?
All of it is relevant, but potential problem areas would be good to share. For example, if you're focusing on adding a keybind and it's not doing what you expect, show how you're adding the keybind
here is the .lua file that should register the "-" key and open the radial menu
Some of these methods don't exist—if this was done using AI, please do not trust it to not make stuff up. It will. Not just for PZ, but especially for PZ. Regardless, a good place to start would be comparing with how the game's Lua code creates radial menus, or how other mods do (you mentioned true actions dancing, for example)
Searching the codebase of either the game or a relevant mod for "getPlayerRadialMenu" & comparing should help show you what needs to change (display & addOption, at minimum)
I found out that I was actually learning from an AI based teacher like 2 days ago when I thought it was from a person so I just hoped it worked 😭
Ouch, sorry you were misled in that way. But no, most of the time it will not
Do you know how I could look at true actions dance files? I tried to find them in my mods folder but I cannot find them. I couldn't even track them down when I downloaded it through steam.
This is probably a given but worth noting given that context: you'll have to add animations for "Macarena" and "Thriller", they don't just exist 😅
I'll grab the path to use on Windows, one moment
Yea I have my own dance anim set
Assuming default Steam installation location, C:\Program Files (x86)\Steam\steamapps\workshop\content\108600\<mod_id>
This one I followed PZ's guide on animations
So for TAD, C:\Program Files (x86)\Steam\steamapps\workshop\content\108600\2648779556
Ok I found it
Thank you
It will be a little hard knowing what is for B41 and what would work with B42
Actually Let me look at lifestyle hobbies
On the Lifestyle: Hobbies mod, I don't see a .lua file in it at all. The media file just contains the anim sets and files
I know very little about that mod, but it certainly does include .lua files
Might be worth unsubscribing and re-subscribing, or double-checking
Mind that the file structures are different in b41 and b42, too
I found it. It is A:\Steam\steamapps\workshop\content\108600\3403870858\mods\Lifestyle\common\media\lua
It is hiding
Yea this one is b42
Weird that it does not show it
The path in that image is mods/Lifestyle/media, not mods/LifeStyle/common/media/lua
they aren't, they're xml files and i guess your browser wants to open them
these are a scripting system for animations, the actual animation assets are in anims_X
mb i meant xml
Ah ok.
Guys
The game no longer runs
Wth there is no way I broke every single mod
No that's been a stupid error log since B42 release
Has nothing to do with you
Ok phew
I didnt get 20k lines I got maybe like 100 or so
I did something! I no longer get the same error code.
The game is never going to boot into the game though
I just made the anims go into the Emote radial menu when you hold Q
Coming Soon and finaly with persistent saving ❤️
I can't find another mod that uses the radial menu similarly. The closest I could find is True Actions but that has code where you need the card to do the dance. I got the success log from the .lua file, but I have no clue what the other error is about
LOG : General f:0, t:1761006484930> bWaitForAssetLoadingToFinish2 start
It is stuck loading assets 😭
Ok now it doesnt load and I didn't change anything
I fixed this
Meant to mention earlier: a million years later I've finally addressed this, so you should see classes for those in the types for the next version
found a possible cause of this if you haven't managed a fix yet
it occurs if the code for initializing your slot doesn't actually get run or it isn't correctly added to the table
(your code sometimes won't run if there's an error in the lua)
it also seems to occur if the ClothingItem parameter of your item is set incorrectly
working car hauling?!?!?!?!?!
Car hauling is working since a while ago, but problem always was that the cars where not saved when exiting the game. And it was always my intent for the big trailer to haul more than 1 car
thats so awesome!!!!
yea i knew there was a janky system that existed, so glad to see someone this!!!!!!!!
<@&671452400221159444>
Has anyone attempted to make a TARDIS mod for this game?
Tried to make a very basic one with a bunch of placeholder models and textures that i made for a minecraft thing 😭
I guess somehow it could be connected with the RV interior mod
This is my first time doing anything related to modding the game so i have no idea what im doing
shark where is SMUI 2?????
two years into development, work on civilians ongoing feels nice to post it
any advice?
You'd do it similarly to how RV interiors work yeah, basically a custom map addition that you get teleported to when "entering" the tardis
I don't know how to make maps, but there's a mapping discord where you could learn https://pzwiki.net/wiki/Unofficial_PZ_Mapping_Discord
thank, ill take a look
Hi! Yesterday I sat down to create a mod for the first time. I’m making a mod for build 42 that adds new variations of makeup. While working on it, I noticed that my makeup replaces all the vanilla makeup🦧
Please help me fix this
<@&671452400221159444>
you could change the module name of your item script or you used the same item name as vanilla, then just change that
{
imports
{
Base
}
item notthesameasvanillaname
{
}
}
@knotty stone Hi, sorry for bothering you again, but if you have the time and are willing to, could you please check the mod that I asked you about? About the evolved recipes, since when I changed the : to =, the game doesn't give any errors, but the recipes don't use the right amount of ingredients. Thank you in advance!
Do I need to redo this?
{
item MakeUp_Test0001
{
your stuff
}
}``` your are missing {} for the module Base
are they cooking recipes? usualy its the fixing recipes that cause that behavior
They are cooking recipes
I have them, I just messed up the crop
and this is now overwriting vanilla makeup?
the file name is different from vanilla? else you are deleting all makeup in that file and only yours remains
Giving this error 14 times when I load up my save:
ERROR: General f:0, t:1761075542834> ExceptionLogger.logException> Exception thrown
java.lang.reflect.InvocationTargetException at GeneratedMethodAccessor362.invoke(null:-1).
Stack trace:
jdk.internal.reflect.GeneratedMethodAccessor362.invoke(Unknown Source)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.base/java.lang.reflect.Method.invoke(Unknown Source)
se.krka.kahlua.integration.expose.caller.MethodCaller.call(MethodCaller.java:60)
se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:206)
se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:196)
se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:182)
se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:803)
se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:166)
se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1754)
se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1582)
se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:60)
se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:131)
zombie.Lua.Event.trigger(Event.java:62)
zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:317)
zombie.gameStates.GameLoadingState.exit(GameLoadingState.java:430)
zombie.gameStates.GameStateMachine.update(GameStateMachine.java:70)
zombie.GameWindow.logic(GameWindow.java:346)
zombie.GameWindow.frameStep(GameWindow.java:790)
zombie.GameWindow.mainThreadStep(GameWindow.java:552)
zombie.MainThread.mainLoop(MainThread.java:68)
java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because "<parameter1>" is null
zombie.scripting.ScriptManager.FindItem(ScriptManager.java:1254)
zombie.inventory.InventoryItemFactory.getItem(InventoryItemFactory.java:51)
zombie.Lua.LuaManager$GlobalObject.getItem(LuaManager.java:6403)
... 22 more
LOG : Lua f:0, t:1761075542834> ISCraftingUI: no such result item nil
And this one 7 times whenever I right click a food item:
ERROR: General f:1742, t:1761075557141> ExceptionLogger.logException> Exception thrown
java.lang.reflect.InvocationTargetException at GeneratedMethodAccessor632.invoke(null:-1).
Stack trace:
jdk.internal.reflect.GeneratedMethodAccessor632.invoke(Unknown Source)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.base/java.lang.reflect.Method.invoke(Unknown Source)
se.krka.kahlua.integration.expose.caller.MethodCaller.call(MethodCaller.java:60)
se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:206)
se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:196)
se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:182)
se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:803)
se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:166)
se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1754)
se.krka.kahlua.vm.KahluaThread.pcallBoolean(KahluaThread.java:1690)
se.krka.kahlua.integration.LuaCaller.protectedCallBoolean(LuaCaller.java:96)
zombie.ui.UIElement.onRightMouseUp(UIElement.java:1695)
zombie.ui.UIElement.onRightMouseUp(UIElement.java:1660)
zombie.ui.UIElement.onConsumeMouseButtonUp(UIElement.java:1518)
zombie.ui.UIManager.updateMouseButtons(UIManager.java:742)
zombie.ui.UIManager.update(UIManager.java:615)
zombie.GameWindow.logic(GameWindow.java:298)
zombie.GameWindow.frameStep(GameWindow.java:790)
zombie.GameWindow.mainThreadStep(GameWindow.java:552)
zombie.MainThread.mainLoop(MainThread.java:68)
java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because "this.resultItem" is null
zombie.scripting.objects.EvolvedRecipe.getResultItem(EvolvedRecipe.java:744)
zombie.scripting.objects.EvolvedRecipe.isResultItem(EvolvedRecipe.java:766)
... 22 more
How can I fix that when I order the buttons with table.sort inside of OnRefreshInventoryWindowContainers the left click doesn't work correctly but scrolling does?
I'm basically adding new buttons because of nesting and then sort the table to fix the scrolling.
function ISInventoryPage:onBackpackClick(button)
local playerObj = getSpecificPlayer(self.player)
if playerObj and playerObj:getJoypadBind() ~= -1 then
for i,button2 in ipairs(self.backpacks) do
if button2 == button then
self.backpackChoice = index
break
end
end
end
self:selectContainer(button)
end
Stupid question... how does that source code work???
self.backpackChoice = index shouldn't it be self.backpackChoice = i
yes
Wait lmao
What is this code supposed to do ?
It's when you click a container button like I did in the video, it's not my code.
If only they used a language server pack am I right ? 
💀
I see
i'm honestly a little impressed that the game does function so well when it seems like they're completely shooting in the dark with lua
I'm so confused rn... I am by any means not a very good coder but I got it working with containerBtn.onclick = nil
Seems like it gets replaced by the correct onclick then? I think it's time to sleep...
I'm trying to detect the slot index of a given slot type, does anyone know how to do this?
alternatively, attaching an item by slot type instead of index would work
Anyone knows how to clear a known player recipe? I want to create some syncing when there's occupation change, but there doesn't seem to be a clear or reset function for it
B42?
B41 please
Dunno about B41, If getKnownRecipes() exists for your IsoGameCharacter, you should be able to then edit the returned list to delete the recipe from the character
yeah it exists, but i dont know if there's a function that sets the recipe for the character
there's only learnRecipe for the IsoGameCharacter
checking from this wiki https://projectzomboid.com/modding
package index
Is there a way to change a mod option value with code or do I have to work with an extra variable?
nestedOptions:addSlider("nestedDepth", "Nesting Depth", 1, 10, 1, 2)
nestedOptions:addDescription("Keybinds for changing the nesting depth on the go")
nestedOptions:addKeyBind("keybind_increaseDepth", "Increase", Keyboard.KEY_NONE)
nestedOptions:addKeyBind("keybind_decreaseDepth", "Decrease", Keyboard.KEY_NONE)
I would like to change the value of nestedDepth (slider) with Keybinds.
Actually.. I think a variable would be better so it can reset to the configured depth at the next game session
setValue probably ?
But yea you definitely can, it's all Lua sided
Should be stored in a variable:
option.value = new_value
Yes im saying you can use getKnownRecipes(), and then if you delete an item from that list, it should actually remove it from the player too
(because that doesn't return a copy, it returns the actual list)
No need for a setKnownRecipes() afterward, it should already take effect.
Ohhhh i see i see
(Sorry for not replying sooner)
In B41 it's best to hide the recipe for compatibility I'd say
Hes trying to reset recipes learned by a profession
not 'hide' them, since you might still get those recipes some other way (magazine, changing to a profession that has them too, etc)
Oooh nvm
Anyone can help?How can I add some new trees to the random generation in the game, which files should I look at?
Can someone help my understand why my server is suddenly failing to download mods?
You can't really do that, you'll have to add trees manually when loading the world
Help, I'm making a mod for build 42 that adds new makeup, but my mod somehow replaces the vanilla makeup
Hey, all good, appreciate you taking the time.
Let me know if this is good
list = player:getKnownRecipes()
iterate --
player:getKnownRecipes():remove(list:get(i))
Yep I think that about sums it up, assuming your removing '1' item in particular
are you trying to remove em all?
if so, player:getKnownRecipes():clear()
Thanks
Yep yep this is exactly what i'm looking for thanks Im gonna try this
Is the file name the same as the vanilla files name? As I don't see the item ID being an issue
No, it's not the same as the vanilla one
I made my mod based on another creator’s mod. Later, I found out that they have the same problem, and now I don’t know how to fix it. I’m thinking of including all the vanilla makeups in my mod first, and then adding my own
But I think I’ll take the hard way
Post your makeup adding file?
Maybe it has to do with the ID then? I've never seen items being replaced except when the file name is matching or the ID is matching.
I have no idea about the makeup system, but it sounds like your overwriting some LUA table instead of adding.
<@&671452400221159444> ^ another one
Thank you drive through.
@tiny osprey if you can't upload the file here, put it on pastebin or something and post the url
Oh, is this it? hmm
What is the filename?
and exact path to it?
it might be fileGuidTable.xml?
Can anyone here who does clothing modding, clarify if your supposed to name your fileGuidTable.xml that?
or if it needs a unique name too?
I don’t know, this is my first experience, and my English isn’t very good.
I don't know enough about clothing modding to say, but its the only file that stands out to me that might be causing vanilla stuff to disappear.
If nobody replies, id try renaming it and seeing if your makeup still shows up
Alright, I’ll try renaming it now
The vanilla makeup didn’t show up, but now my custom makeup texture is gone too renaming didn’t help
Wow weird.
Very strange
you have to
k. Dunno what is up with his mod then 🙁
But then I have 0 clothing experience in the game and its a weird system
I am correct to assume that mod.info gives currently no ability to "recommend" a mod that pairs well, eh?
Alright, then I’ll add all the vanilla makeup first, and then mine.
Not long ago, I had the idea to start getting into the world of modding, and it was because of a mod idea that came to me. And this one is to create an RPG mod for PZ. Do you guys think it's that difficult to create?
The description
i need help with moving text to center of lables
i find this in ISLabel.lua but im stuped
local txt = self.name;
if self.translation then
txt = self.translation;
end
local height = getTextManager():MeasureFont(self.font);
-- The above call doesn't handle multi-line text
local height2 = getTextManager():MeasureStringY(self.font, txt)
height = math.max(height, height2)
if not self.center then
self:drawText(txt, 0, (self.height/2)-(height/2), self.r, self.g, self.b, self.a, self.font);
else
self:drawTextCentre(txt, 0, (self.height/2)-(height/2), self.r, self.g, self.b, self.a, self.font);
end
if self.joypadFocused and self.joypadTexture then
local texY = self.height / 2 - 20 / 2
self:drawTextureScaled(self.joypadTexture,-28,texY,20,20,1,1,1,1);
end
self:updateTooltip()
end```
lables name is bottomPanel
I assume you aim to horizontally bring the menu text into a "center" alignment?
The code you show here handles vertical dimensions and calculates a target height based in how high the font is and how many lines there are. It would draw the text from a horizontal centre (I assume relatitive to the panel the label is in) if the ISLabel.center property is true. I am not sure if that means the text "box" is centered or only the beginning of the text lines 😬 . And there must be a setter for that property I would guess.
Depends what features you want to add. Some things related to RPGs will be easy, some will be impossible without changing stuff buried in the Java code.
If you list some specific ideas you want to do then people in this channel can give a rough idea how feasible they are.
I can see if not self.center in that code, so set that to true for the label you want centered
If you find where the label object is created you may be able to add a postfix to the function that creates it to center it
yea i know it
idk where it was created
Hello.
I'm a beginner trying to make some drink mode.
I'm writing to help you out because there's a problem.
The item I created in in-game doesn't texture.
A question mark appears when you drop an item in your inventory or on the floor.
I put the image in the mod/media/texture folder
I also put the image in the mod/media/texture/WorldItems folder.
In the source, I put the code in like this.
StaticModel = Item_LetsBeCan,
WorldStaticModel = WorldItems/LetsBeCan,
I've tried different ways.
The question mark continues to appear.
Where is the problem?
for the icon, u don't need Item_
they are only needed in item name
Guys, anyone familiar with how to get worldobject moddata retrieved from the client??
I'll look at different drinks mod.
I was going to make it in a similar structure.
Usually, the image was created in that way, so I followed it.
I didn't do fbx work.
If it's a hard way for me to do it
I'd like to put in the shape of a basic vanilla drink, is there a way?
If u don't have fbx work, use vanilla cans for worldstaticmodel
and just use icon with ur own design
but if you want to have staticmodel with ur texture of 레츠비 then u will have to have ur staticmodel
and write ur .xml file
that direct the model to texture
not sure if it changed in build 42, but at least that's how it works in build41
there's a good tutorial in youtube that shows all the stuffs for build 41
1:11 Step 1 - Know your file locations
4:06 Step 2 - Storyboard your ideas out
9:03 Step 3 - Get your files from the game or other mods
11:47 Step 4 - Build your mod files
1:01:54 Step 5 - Create the textures (mislabeled in the video, oops)
1:19:45 Step 6 - Put your mod files in the right structure
1:30:37 Step 7 - Test your mod (please back up ...
Are you saying that it doesn't apply to the image files I worked on?
Usually, works in different modes in that way are composed of two patterns of images, so I copied them similarly.
I thought I worked on the image similarly because I saw it normally in the game
I guess it's not enough.
Is there any problem with the part I coded? I wonder if there are any parts that need to be removed or have problems.
Thank you for your kind help.
I need to study a little more.
the Image_레츠비캔 .png = icon in ur script
and in icon = LetsBeCan not icon = item_letsBeCan
for 3d modeling and its texutre, u will have to design .fbx
then write xml to direct the texture that matches the .fbx
It's getting harder.
I just wanted to make a simple drink mod.
It becomes difficult with my talent.
Is there a way to borrow a simple basic vanilla drink?
search in the script folder for "Can"
and copy their staticmodel
and just use ur own icon
that's the easiest solution i can think of atm
although it won't have ur "레츠비" skin, the icon will be 레츠비 but 3d will be vanilla
The YouTube video you introduced is a video I watched and copied.
I was not good at English, so I probably didn't understand it all 100%.
I'll try to understand it by repeating it slowly again.
Thank you for your help.
It was a method I tried, but the same question mark occurred.
Was there a problem with coding?
icon = Item_letsBeCan ---> icon = LetsBeCan
thanks..!!
nice
guys, can anyone help me with retrieving moddata from global object?
the server and client moddata is saved differently. and I can't figure out how to sync them.
could anyone direct me to correct path or give me hint how to do it?
too big hahahaha 😄
okay, thank you!
I'm not good with multiplayer stuff, but I think server global moddata and client global moddata are completely separate so if you need something synced you have to handle that in your mod.
im doing it for build42,
so it's not multiplayer stuff
doing it similar how traps work
do u think ther's a method
where it calls Server side moddata
?
getIsoObejct() function doesn't work
in build42
Oh, I think I know the stuff you're talking about - it's the system for things like traps/water collectors etc that need to still do something when not loaded.
I was never able to make sense of how it worked. 😛
im trying this because I want the "mycustomobject" to have a moddata of "age" and it keeps increasing even if the player is out of its cell
exactly
Why not just record when it started and recalculate age whenever needed?
using getGameTime()?
I can't recall function names, but something like that.
so you store "startedOnDay=27" and then if the current day is 39, you know it is 12 days old.
(or use hours or minutes if more precision is needed)
Using the special globals stuff is for things that would have variation based on conditions, like rain barrels filling up based on how much rain there is because you can't just say "X days have passed since this was loaded, so add Y amount of water"
And traps are just special because they only work when not loaded in the active IsoCell, because that's the hack used to decide if the player is too close.
hmm sounds like good idea
Rainbarrels also work when the player is outside the cell right? or maybe im wrong...
i guess ill take a better look at rainbarrel lua files
and see if there's something i can use
ty
Yes, because the amount of water to add depends on the rain level.
Other times things (like food rotting) just gets worked out when you load the object again, which is why all food not in a fridge/freezer decays at a constant rate even if the weather is freezing.
hmmm
im not familiar with how food rotting works
where is it's data being handled??
like at which lua event?
i cant figure this error out been digging for hours "Caused by: java.lang.NullPointerException: Cannot invoke "zombie.core.skinnedmodel.visual.ItemVisual.getHole(zombie.characterTextures.BloodBodyPartType)" because "<local14>" is null at zombie.inventory.types.Clothing.DoTooltip(Clothing.java:215) at zombie.inventory.InventoryItem.DoTooltip(InventoryItem.java:619) ... 45 more" Everything works just when i try to equip it is invisible.
I want to register the recipe
The material does not pop up in the game.
Maybe there's something wrong with the source code
Please advise me.
Reference items in their specific modules by doing Module.
That can sometimes reduce problems
Also don't use korean characters for IDs
Use plain latin characters
I wouldn't be surprised if this caused issue
Any context on what you're trying to do ?
I remember seeing this error a bunch but don't remember the reason for it
is this for build 41?
If you search the key term "<local14>" you might find more stuff
okay thank you
yes, 41
i forgot all about how script work in build 41 but i don't think that keep: flase, is correct way
{
TreeBranch,
keep [Recipe.GetItemTypes.SharpKnife]/MeatCleaver,
Result:Stake,
Time:80.0,
Category:Survivalist,
OnGiveXP:Recipe.OnGiveXP.WoodWork5,
}```
u might want to look at the recipe from Vanilla file
and copy them
just trying to do re texture on vanilla items in the game i think its all set up wrong
okay thank you!
you? yea you can
I have all the ingredients in the recipe
Like screenshots, only certain items are not activated in black and are not produced.
Is it a problem with the source code?
I wrote "Let's B" Korean in English and tested it, and it's the same.
Only the two materials below are not recognized properly and appear in black.
LetsBeCanEmpty;1,
LetsBeCanBottleEmpty;1,
I've been tryna find good sounds from the 28 days later infected
since I kinda feel like the sprinters in the game sound like volatiles from dying light
Bcs you need to reference items as Module.Type
See the module block section
https://pzwiki.net/wiki/Scripts#Typing_syntax
I looked at the site
I changed the source code as below, but it still hasn't been resolved.
LetsBe.LetsBeCanEmpty;1,
LetsBe.LetsBeBottleEmpty;1,
Is this also wrong grammar?
Thank you for your advice.
Wait isn't it : and not ; ?
Hmm your recipe appears in-game so if that was that it straight up not work I feel like
Thank you for the advice.
I'm trying a lot of different ways
I haven't succeeded yet
I succeeded in the end.
Thank you for your help.
The solution is
LetsBeBottleEmpty,
It worked because I did it
not sure if this is the right place but are there any mods that exist that are also in github? that is okay right?
I am in full-on “frantic zombie apocalypse” mode with the codebase; waving a sawed off shotgun at all the messy String identifiers and turning them into type-safe objects. It is gruesome out there: we have already taken down ItemKeys, ModelKeys, ItemTags, CharacterStat, CharacterTrait, CharacterProfession, WeaponCategory, and more. Nothing is safe from my purge.
My goal is to move away from using plain string identifiers and switching to clear, type-safe objects in Lua. This change means fewer hidden errors and confusing bugs, if you use something that does not exist or is spelled wrong, the game will tell you right away instead of failing silently. It also makes everything more consistent and predictable, so you can spend less time guessing names or tracking down issues, and more time actually building and experimenting. Overall, this will make mods cleaner, safer, and much easier to maintain as the game grows.
My first new exposed lua object will revolve around the CombatManager. I have been rounding up all the hardcoded magic numbers, like scavenging for supplies in a zombie horde, and corralling them into a CombatConfig class. Exposing it as a self-describing Lua object via combat_config, so modders can poke around without getting bitten. I am told this will "unleash the power" for modders that love changing how PZ's combat behaves.
I will also be starting to feed on the brains of our modders. My tentative plan is to lurk around and pick the brains of anyone here that has been brave enough to venture into the guts of the mechanics.
Disclaimer: I can not and will not be able to help you with any "how to" modding questions…zombiods are selfish like that. Be gentle, I ragdoll if you push too hard.
Plenty of mods are open source & hosted on GitHub, that's totally fine
This just in: project zomboid dev wants to eat modder brains
Yes
than k u
devs eat the modders brains so they can add a mods mechanics as a base game mechanic
Very interesting, feel free to discuss with here, we're always happy to discuss modding related stuff with devs
thank god, a code janitor cleaning things up slowly 🙏
Just to clarify my understanding - if I use an itemTag like "sharpAndPointy", I no longer have to remember the exact string or manually update it everywhere I’ve used it, right? Instead, it would function more like how Skills (Perks) are handled in Lua - so we’d be able to reference it as something like ItemTag.SharpAndPointy?
That’s a huge quality-of-life improvement for modders using IDEs and Lua IntelliSense plugins, since autocomplete could now catch these references directly from defined classes instead of relying on raw strings.
If you'd like some unsolicited input - if misusing tags are a concern - where modders are setting tags are in text files. There was some discussion between modders about making a parsing plugin for these "script" files - does the described change come with something in the game's bootup that catches when there's something off in a script?
Oh hells to the yes! Access to the CombatManager is gonna be awesome, looking forward to it!
Also, if you're more than welcomed to https://discord.com/channels/136501320340209664/1125248330595848192 🙂
That message got me so hyped lmao
I'm gonna hope and assume that ClimateManager will be getting the same treatment at some point which would be amazing
Praying for a future where scripts are replaced with something which has a schema that can be validated (xml, json, whatever, I don't care)
i got progress
Would giving them an artibtary file type help with this? I was wondering why someone hasn't made one yet.
That would be so sick (hopefully JSON over XML)
I think Jab had at least started calling it ZedScript but idt any extension was given. I really just wish it was an actual established format instead of something in-house
With variations for different script types because many use different parsers
I know it's not in the scope of what Sinister was talking about, but one day soon I really hope we get more control of anim nodes and states. Trying to fight the animation engine to make horseback combat has been pure hell
I've got many wishlist items but I should probably also take a moment to say the changes described in that message sound very good (since I neglected to do so 😅)
Yeah the nodes and states being nearly unmodifiable limited some ideas I'm sure.
I'm surprised people were able to create some of the mods they did -- crawling, sitting, jumping
One of my rant-topics is how the game would be alot sicker if we had a variety of movement types
In what sense, like parkour or the modded ones you mentioned?
The modded ones for sure, and yes/no -- I don't think PZ would benefit from dying light acrobatics - but something simple like hanging from a ledge to cushion a fall, or diving into cover
Ah I see, yeah that would be neat
Or hanging from a ledge to go another window - basically realistic and risky stuff
Not to do the meme, but the artwork of Bob on a car is a cool game moment
Batman zombie style
I hope the train of thought that made me send that message is at least partially clear
Ive only played the first Arkham Asylum
I just remembering being able to do backflips off goons
Ledge hanging makes me think of almost exclusively spies and batman
Tomb raider
I just want more control over animations when in aim state tbh, being forced to turn with no way to clamp allowed angles has annoyed me more than once