#mod_development
1 messages · Page 150 of 1
I comment a lot of my code because I want it to be easy to read and learn from if anyone else decides to read my code
You're the zedscript creator, right?
the problem with writing comments is updating them when you change the code
Yes.
I had a suggestion for a feature I'd like to see
I've spent a lot of time with many updates since the last beta version release.
A list for AnimNode parameters in recipe definitions
I have a reference to some of them if you'd like it
If there's a list then sure.
I didn't see any when adding it.
i'm not sure all of these work
but I know several of them do
build, craft, ripsheets, sawlog
(Lua being developed with C ideals and for C)
Are these used?
Yes
Near the bottom
First it adds the item
Then the percent chance
On mobile or I'd do a code block
Only regular chance is shown here but the others are used later in the distribution
what's the difference between create survivor and create player?
Improvements to tooltip box
At some point I want to try to scan for items, sounds, etc. and create dynamic lists for properties that are for assigning them.
I'm terrified at how long this changlog's going to be.
Why won't player:getInventory():Remove() remove stuff from player inventory when the item is on a backpack that he is carrying by HAND
getInventory only gives the direct container obj of player
player:getClothingItem_Back():getInventory():Remove() This got me to delete stuff from the main bag, but how to make it delete stuff while the bag is being carried?
the most useful snippet
local skill = selectedItem.recipe:getRequiredSkill(i-1);
local perk = PerkFactory.getPerk(skill:getPerk());
this returns the perk you give it
I'm not a dev. This is not synchronized to the minor version of the game.
Is there a way to set vehicle spawn with specific couple skins from like 6 total ?
Why not just 16.1 or something?
VSCode Marketplace doesn't allow this.
I'm use the major version to stay in-line with any changes TIS does to ZedScript.
this is what my browser looks like rn lol
I've been informed that build 42 of Project Zomboid will include changes to ZedScript.
They won't let me know until 42 is in the BETA testing stage.
Not sure how I'm going to support both 41 and 42 on VSCode.
wowwww
think my pc would have a heart attack at that point
thanks for that
i have 32 gig as well with an ryzen5 5600x my graphics is where im lacking
probably could use more upgraded storage as well
5600x + 1080
so i'm not the only unhinged indivudual. only my pc has 16 gigs and is old and full of dust.
i have 1t of HDD and SSD
basically got a stick of dynamite sitting next to me
yeah i went for the 2TB m2 last year when I got a bunch of cash, worth it
sounds about right im running the gtx 1660 oc card
i want to get m.2 but i havent moved on it yet
i bought my tower for 300 and basically threw around 600 into it
just so u know vivaldi has tab stacks as well ;)
I use chrome. I want to switch. but the idea of moving an resetting up all my extentions and scripts sounds like a pain.\
vivaldi is awesome
Hello guys and hope you're fine 🙂 Have a nice weekend everybody !
I'm trying to dev a mod for my server which start in few weeks
It's an easy idea about a little add into an existing mod, but i'm blocking on the realisation.
Idea is : making a timed system which damage the player during a certain period when he's into a designed area created by admin
Damage is FoodSicknessLevel which is increasing
Area is kind of PVPE mod : we can create its and areas are stored into a new file which help a lot to save settings
I'm trying to add the damage effect to the PVPE mod.
With a lot of tries, i succeded on solo, but on a server i'm failing to build something good
This could result into a Tarkov/DarkZone system which don't let players stay into a zone too long and, with some mapping into the map, build a special place with higher danger but higher loot
Feel u, my free android photo gallery app turned into a 14 day trial and it passed and all my favourites and settings are gone even if i paid for the new version
Is somebody is ready to help me with this creation, please let me know 🙂
Some inventory functions use a boolean value to determine if they should check the contents of bags or not. I don't know if that is going to solve your case
Do you know where to start?
Don’t know what do you mean with « start » 😬
local playerItem = {}
local BagItem = {}
local items2 = getPlayer():getInventory():getItems();
for i=1, items2:size() do
if items2:get(i-1).getItemContainer ~= nil then
innercontainer = items2:get(i-1):getItemContainer():getItems()
if items2:get(i-1):getItemContainer():getFirstTypeRecurse("Apple") then
items2:get(i-1):getItemContainer():Remove("Apple")
end
for q=0, innercontainer:size() - 1 do
table.insert(BagItem,innercontainer:get(q):getType())
end
end
table.insert(playerItem,items2:get(i-1):getType())
end
local itemString = table.concat(playerItem, ",")
local bagString = table.concat(BagItem, ",")
print(bagString)```
Mp me if you’re in 😉 (yes i’ve worked 50 hours on this, i’ve got LUA stuff to work)
With other bag (with a Pear) after you can delete it by retrieving the name of the bag
Going to work on getting vehicle ZedScript documentation implemented in the next days.
Thank you Dane. I'll look into it. It's so frustrating because the ordinary "getInventory" find the item but following the same Remove method with the base inventory it won't remove it from a bag that is equiped by hand(Not in back)
You're welcome ^^
In this script, be careful, it removes the Apple object from all the bags, then you can put a condition to have a specific bag (the one equipped... etc)
and when the object is deleted it ignores the other bags
How to make an item spawned with AddWorldInventoryItem visible? Or maybe there is another method to spawn item on the ground?
AddWorldInventoryItem should work
I mean, it is there but it won't show up visually.
Is it a custom item?
anyone know how to tell a vehicle to disconnect it's trailer??
Nope, well it is but tried with vanilla items too but they won't show up on the ground visually either. Only on the loot table.
Did you get the correct square to spawn it?
It spawns on player location.
local x,y,z = getPlayer():getX(), getPlayer():getY(), getPlayer():getZ();
getPlayer():getCurrentSquare():AddWorldInventoryItem("Base.BucketEmpty", x, y, z);
Do 0, 0, 0 instead of xyz
Thank you! Works!
Bucket you say? What are you making?
Bucket was a test, I'm actually making a dynamic mining mod.
Like, you can find traces of ores while foraging and then you have to further investigate and then it will turn out to be either a pile of rocks(in various sizes) or iron/salt deposit
nice
Hey @fast galleon
If you need any more functions for buckets or farming let me know.


get sad 😦
hi
hey hey
Everything is right again.
Thanks, daddy Interwebs.
BTW Polt I have updated my extension with all the work in the past few weeks.
stop assuming my parental status
People needing assistance with item documentation can have it now.
nice
Was a "bit" minus the "ch".
It's all in a format very close to JSON so anyone could "pick it up" and walk with it and do whatever to make something else with it.
A Discord bot or another extension for some editor I don't know yet.
I'm actually torn between either continuing on and working on getting vehicle caught up.. or begin work on diagnostics.
maybe i'll look at how realistic it would be for me to write an intellij plugin sometime
I almost want to as well. If you want to go first I will yield.
well i chose the wording 'look at how realistic it would be' because it's likely completely out of my depth
Heheh.. This is the very first IDE plugin I've ever written. =)
Again, I'm giving you room for making the decision.
I'd like to see it if it were attempted.
well if i do look into it it definitely won't be soon so if you're set on it go for it
BTW, IntelliJ supports TextMate Grammars so you can take mine if you want to avoid coding purely in recursive Regex.
Sounds good.
Documentation will save a lot of grief for newcomers. It makes me glad to see someone else even think about working on it.
If you or anyone here do decide to make tools for the community of modders, please please please write it in a way that prepares for the scenario where you are gone. Extendibility is critical.
cough
cough
Any way I can get extracted templates from this project and forward it in my extension?
templates?
A well-documented set of generated template scripts and even Lua function templates with documentation could prove insanely useful for modders.
tbh I got swamped with RL stuff + a hefty commission
Yeah like "New BothHanded Weapon" generates a template with pre-filled properties.
or "Create Heavy Vehicle"
Lua-side functions could be pre-documented for basic tasks.
The only thing in the project so far are some polished debug tools
and a bit of an API to add more debug panels
CHUCK
?
how do i make a car stop towing another car in lua.
Hmm ok. Nevermind.
Not sure, but you could look at what the UI option is called and reverse search for the translated text's usage
ContextMenu_Vehicle_DetachTrailer
heh... looks like the vanill code defines doTowingMenu twice
if vehicle:getVehicleTowing() then
menu:addSlice(getText("ContextMenu_Vehicle_DetachTrailer"), getTexture("media/ui/ZoomOut.png"), ISVehicleMenu.onDetachTrailer, playerObj, vehicle, vehicle:getTowAttachmentSelf())
return
end
if vehicle:getVehicleTowedBy() then
menu:addSlice(getText("ContextMenu_Vehicle_DetachTrailer"), getTexture("media/ui/ZoomOut.png"), ISVehicleMenu.onDetachTrailer, playerObj, vehicle:getVehicleTowedBy(), vehicle:getVehicleTowedBy():getTowAttachmentSelf())
return
end
``` @faint jewel
function ISVehicleMenu.onDetachTrailer(playerObj, vehicle, attachmentA)
local nextAction = ISDetachTrailerFromVehicle:new(playerObj, vehicle, attachmentA)
if not ISVehicleTrailerUtils.walkToTrailer(playerObj, vehicle, attachmentA, nextAction) then return end
end
sendClientCommand(self.character, 'vehicle', 'detachTrailer', args)
Looks like a vanilla clientCommand use
I legit don't know where those go
Something I've been meaning to ask a redname
there's just a server lua file that handles them isn't there?
Vehicles/VehicleCommands.lua
weird it's not in my decompiled thing
yeah it's not in mine either
but it is in my lua folder
i saw it back when i used vscode
hmm
must be a bug with pz libraries
now does that make the character go to the car? or does it just drop it?
function Commands.detachTrailer(player, args)
local vehicle = getVehicleById(args.vehicle)
if not vehicle then
noise('no such vehicle id='..tostring(args.vehicle))
return
end
vehicle:breakConstraint(true, false)
end
BINGO
I don't know why player is there but it can be down without one
I also just found constraints digging through
it's easier to just pass the player to all commands
that's odd pzlibrary doesnt have that file
I was hunting around for something related to commands prior - I wish I could recall what it was
maybe i'll drop the pz library's lua portion
apart from the library folder of course
the annotations it adds to lua don't really do that much
i love you chuck
player is the first parameter for all commnands and any additional parameter goes in the args table
Hello from the bar
hello from the other baaaaaarrrr . I can't see you it's too faaaaaarrrr.
Does anyone know if Noir still updates his mods?
mower update is out.
why is it saying category like that?
item Ecstasy
{
Weight = 0.1,
Type = Normal,
DisplayName = Ecstasy,
DisplayCategory = Drugs,
Icon = KIecstasy,
}
Cause you need to add it to the IGUI_ItemCat translations
oooo
i cannot find the folders for that anywhere
shared/Translate/EN/IG_UI_EN.txt
are you using notepad++?
ctrl+shift+f set it to the medai folder fro profject zomboid.
search for IGUI_ItemCat
media\lua\shared\transalte\en\IG_UI_EN.txt
You could open a second window or workspace with the game directory
I think the @rich hazelPack might be ready to release.
that's wild, nice job
i try to just keep the file open in the background @frank elbow
Congrats skiz. Looks dope af
I would appreciate it if I could be directed to a guide for adding 3D models for items. I have created a custom item (Box of Pencils (Not a container)) and can spawn it into my inventory but cannot place it in the world from there. I have the fbx model and related png, however I seem to be missing something that lets it be a placeable item
How do I determine if an update to my mod will require a new save or not?
Some users are commenting certain aspects of my mod don't work but I've thoroughly tested my updated code and it works on all the edge cases
So I think it's either the user having an old version of the mod or having an old version of the item before it was updated
I did update the item definition script as well as a lot of the item functions (it now uses battery) so I think it may be conflicting with previously gathered items?
old items have old defs, anytime you tweak the items or any table of ModData, it requires a new save
modData is fine, nvm, as long as you attach new defs
Also thank you very much for your comment regarding the encoding for Russian translations, I really appreciate it
👍
Can the player have modData or is it only items?
players, items and most objects
Awesome, ty
anybody recommend any item implementation guides?
im new to the modding game so i mess up quite often so it would be nice to have something to follow
ntm idk how clothing works at all
ive only made magazines and a melee weapons at this point
What's modder roadmap?
I am finally starting to see the completion of my mod after 2 days of hard work. Spent a total of roughly 40 hrs writing it this far. I am proud of myself
for actually sticking with it
Me and my partner should be releasing our mods around the same time as we are actively working on the mods with eachother at the same time lol
I do want to say thanks to those people who have helped us throughout our tireless journey
Hey, do you guys happen to know if there was a framework for setting up radio broadcasting? I could've sworn I saw a mod but I just cannot find it
like just to add a new radio station or something? i don't think you really need a framework for that
If I want to comment out an recipe, is it enough to just do like this?
I don't want to 100% remove it yet, but maybe use it later
how do you call a function on game closing/server shutdown ?
(so i can make the mod safe to remove ?)
I think the closest thing to what you want is OnSave or OnPostSave, which would run on saves & not just shutdown. Can you be more specific about what you wish to accomplish? I don't think running something on close should be necessary
Well my mod edits a multiplier, which vanilla does not, so upon removal of the mod, it stays in its last state and never gets overridden / reset ... hence i would like to reset it to default before shutdown so if the mods gets removed everything would be back to vanilla and not stuck in its last modded state..
What's the multiplier? That makes sense but it wouldn't necessarily be guaranteed to properly reset, considering the user could force shutdown
https://steamcommunity.com/sharedfiles/filedetails/?id=2940354599&tscn=1681557573
Fitness / Strength multiplier ...
the vanilla "multiplier works on passives" is a backend system and does not use this value .. so...
OnPostSave runs before exit, but I don't think it'd save the multiplier change. OnSave may work, but you'd have to reset the multiplier after saving as appropriate
I would still not mark a mod as safe to remove if I had to do something like this (that is, maybe add a note in the description about this)
WIP "Just Keep Swimming"
https://imgur.com/vhexedm
wonky animation
and i think i need a way to add a transparent thing clothing to make it look under water or just mask the body?
Good job, although this floating swimming skeleton is definitely creeping me out xD
hehe I've noticed, looks promising keep it up👏
How do we compare defense of items?
Is there a way to detect water tiles aside from its sprite? Like the grass and trees..
Looks like there's a water square* property that can be used
Assuming square is an IsoGridSquare, square:Is(IsoFlagType.water) should suffice
Thank you

Saves me loads of time writing like sprite based check
Cuz idea is
If water sprite is infront pf player then swim
But now
Prpblem is going reverse
But i guess ill justcheck if its a valid square and its not water and theres nothing blocking and can see iguess
Are you referring to clothing defense? Clothing items have getBiteDefense and getScratchDefense, if so
To automatically switch to walk
Swim to walk
Looking forward to seeing how this turns out, swimming sounds neat
The texture is the main problem id have to add an ovelay clothing or just mask the body
With a clothing thing
I think one of the bone controls the shadow so i just have to figure that out
Hey, does anyone know what is "isInfected/setInfected" method in InventoryItem definition used for? I don't recall any usage of this in vanilla game.
How to open lua error window?
It's checked in ISApplyBandage to infect a body part if the bandage used is infected, but it's not set anywhere as far as I can see
If you mean the debugger window that covers the screen, F11. If you mean the console window, tilde/grave key (~)
You want make swimming?
Then render it like boat 
Im not making a boat
Im just making a swimming animation mod
So render swimming animation like boat
What's problem?
Theres no problem really
Then cool, who ordered tho?
Hell, my client can only render stuff
A significant portion of a body is underwater while swimming. The same is not true for a boat (not that none of a boat is underwater, just not a significant portion of it)
I dont understand what your saying. Swimming mod
Not boat mod
Client
Person who hires us for commission custom mod projects
Idk what IBrRus mod does but i know it has a swimming function
Thats not what im going for
Render like the person underwater? Ye im working on that
Depends how you want implement it too
So im still not sure what you are talking about but ill just put every possible relevant info on the table
Just not render part underwater, or make it partially visible
Yeah
Using masking
But im still going to try some stuff
Cuz i already did the legs animations
I might add an overall blue suit to parts submerged
So it's mod for private server?
Its going to be public
Same as all the rest of our commission mods
Good morning.
Good Morning
Good morning / day / evening or whatever it is now at your place.
I'll try my luck again. The puzzle I have to solve is:
I have couple coords set for vehicle spawn. Now I am trying to find a way to force these vehicles spawn looking at certain direction and with certain skins (2-3 from the total list of 9).
Any chances anyone have a solution?
i am really struggling to figure out what's happened- my game's started crashing whenever i right click on the modded gun i'm working on, and the debug log claims that seemingly every sound in the game is erroring. could someone help me figure out what's happened?
something about your tooltip is messed up
yeah, i'm trying to figure out what it is- i don't think i touched anything related to the tooltip, though, so i'm not sure where the issue lies
this is my current script for the gun; anything jump out at you as an issue?
ahhh, yep, there it is
thank you! i should've guessed it was just a typo, haha
huh, it's still giving me the same errors
I'm going to love this channel when I get a working formatter for ZedScript.
i tried pruning it down to only the weapon file and the models/textures and i'm still getting the tooltip errors, so it's definitely in that mp5_weapons file
but i can't see anything in here that even refers to the tooltip
are tooltips declared in another file that i'm missing?
i'm poking through the files of another mod that adds guns, and their file seems to have just about everything that mine does. i really cannot figure this out
do you still have this ModelScript.check> no such model "Item_Mp5" for EaMP5.MP5.
yeah, first thing to suspect was the icon
Best IDE for PZ modding?
I think the most commonly used ones are IntelliJ IDEA and VS Code. I prefer the latter
Can use anything, of course
Vs code use plugin for code completion? When IJ real code from game?
VS code is dependent on third-party?
To do what?
the tooltip in game is completely blank, save for the name of the gun, and i'm getting constant errors as long as i'm mousing over it- the icon is definitely showing, though, so i'm not sure what's up with that no such model error
IntelliJ does have a decompiler built-in, if that's what you mean
Oh. Yeah, but I believe the same is true of IntelliJ (for game code, that is)
You have to compile it from source in IJ
Compile what from source?
I made VSCode a far more effective editor than IDEA.
I have two libraries you can use: PipeWrench (Typescript for PZ) and ZedScript VSCode extension (WIP)
Why I would need other languages?
I like lua because there no trash like lambdas, interfaces, generics etc
https://github.com/LuaLS/lua-language-server is an option for a Lua language server in vs code
& tools like pz-zdoc (https://github.com/cocolabs/pz-zdoc) can be used to generate type stubs, although you may have to tinker with the .bat/.sh file. I did, anyway
Eh.. Your funeral.
Have fun with EmmyLua, or whatever it is.
That one is LuaCats
Say your best vscode setup, I'll test it and say why it's worse than IJ
As long as it's objective.
Why did you ask which is the best if you've made up your mind already ?
But I feel like that's not going to happen.
Because using third-party things is not advantage of IDE
Okay
You are calling people's work in here "trash". I don't think you'll get the help you came here for with that approach. I suggest "being lovely" and what not.
Dramatic guy that can't even read properly, how you supposed to help someone?
Quote where I call people there trash
I'ma keep things a buck-fifty. Keep your emotions out of here.
Regardless of what you said, you seem to have brought up the topic just to talk bad about vs code for no real reason. You're free to use IntelliJ, others are free to use VS Code—hell, people can use Notepad++ if they want. There's zero reason to try to have needless debates about IDEs
Asking which IDE better, getting answer VSCode because you can use language that not supposed to be used here, gotcha, times better than IJ
"I think the most commonly used ones are IntelliJ IDEA and VS Code"
You're free to continue to argue with yourself, I suppose, but I'm gonna go ahead and duck out of this one
i've tried a lot of different things to try to fix this icon issue and i'm getting the distinct feeling i'm missing something obvious- it's just supposed to look like this with Item_MP5 in the textures folder, right?
Wait I think that doc is wrong. Double-checking.
Hmmm.. PZWiki says this too..
@tame mulch Is this actually a model?
If so that's an incredibly confusing name.
i always assumed it was something old
I think it's mean name of model script
Yeah.. It says sprite and relates to models. That's confusing.
Wanted to double-check.
Thanks for checking.
ohh, i think i see it then, let me try something
Same.
i think it is? i don't want to say this with too much confidence but it doesn't look like it does very much
i could see WeaponSprite making sense if it's a holdover from pre-animation update
I feel more confident because of all these small things I'm seeing now, going through every part of ZedScript.
public String getStaticModel() {
return this.staticModel != null ? this.staticModel : this.weaponSprite;
}
```this was the only place i could find where it seemed to actually do something and not just it being passed around everywhere, and obviously this shows that it gets overwritten by static model
Planned deprecation?
Looks like forward compatibility.
from what i can tell it already is deprecated
unless there's vanilla scripts that still only define a weaponsprite
Not to ignore the person here asking for help, however I think it would be good to know more about where these properties will go.. what will happen to them and what might replace them too..
If WeaponSprite is in-fact deprecated, I can add a deprecated tag.
i actually don't see where staticmodel gets passed to the instance
which is fine since InventoryItem's getStaticModel invokes the script, but since HandWeapon's doesn't, it might actually still be needed there
it does look like it is basically equivalent to StaticModel though, so that description would be correct
Hmm.. Ok. That's good to know.
The legacy name is misleading but it actually has something going on.
it looks like, then, that StaticModel does nothing to weapons
huh, i'm still getting the error for no such model- if it's referring to the model then it should be like this, right? first one is the file for the item, other one is for the model
So the property isn't exclusive nor is applicable to Weapon.
looks right, is the model script's brace closed outside of the screenshot?
This may have already been asked, but which folder have you placed the model file in? & what's it called?
media > modelsX > MP5.x
models_X, or modelsX? Unsure if Discord just stripped out the underscore
oh yeah, it's models_X
Maybe it has to be in the weapons subfolder? I'm not sure what else would be the problem, everything else looks right
the magazine works perfectly, and the files there are in the same spot
oh i can try that
The vanilla ones are in weapons/1handed, weapons/2handed, weapons/firearm, and weapons/parts (all within models_X)
no luck, still getting dozens of errors per second when i mouse over it
honestly, i can send over the whole mod folder if it'd help? there might be some issue in another file that i'm missing
any good references for creating new farm plants?
Some of the properties on PZWiki might need more detailed examples on how to link files.
There are a couple of mods that do this; looking at their code can give you some hints
Probably best to start with sending console.txt
@frank elbow ok ill take a look
oh, where's that? i've been looking at the DebugLog.txt file up until now; i thought that was all there was
oh wait no i see it
I guess that means that I'm going further down the rabbit hole.
It's all fun and games until you realize that the item-scripts page's 1000+ hyperlinks are all purple.
So far I've probably edited around 40-50 of them.
Language support is also a concern.
here's the console log file; it's throwing a lot of audio errors in there as well which. i have no idea where they came from but i assume they're unrelated to the tooltip error
the fmod 'no such event' spam? that's normal
oh, huh, weird. i assumed hundreds of errors were probably not supposed to happen
Those are just warnings for (presumably future) missing audio files associated with events
Are the tooltip errors something you're unconcerned about? I don't think it'd affect the model issue but the repetitive errors certainly stand out
Looks like they're just due to a missing item for a* magazine/ammo type. I'm unsure what would be causing the missing model from looking at the log
well right clicking the item brings me to the error screen and shows multiple of those instead of showing the right click menu
let me grab that and screenshot it
Okeydoke, can you also send the full item script?
And the magazine type, EaMp5.MP5Mag, is already defined and working (i.e., showing up ingame)?
Is the case right? I notice the p is lowercase there
yep, i can fill it with ammo and place it in the world and everything works fine
Maybe the item is unable to find it since they're different modules, assuming it isn't case insensitive
I don't know whether this will affect anything, but can you change the name of the module in mp5_weapons.txt to EaMp5
i was inconsistent in my naming capitalistion between the model and the item itself, that might be it
So is the mag in the EaMP5 module (as opposed to EaMp5—boy this is confusing)?
I'd try changing the MagazineType field to use a capital P instead then
yep, trying it now
it's always the little typos that get me
aha, yep, that was it
spent 2 hours trying to figure this out because i forgot to capitalise a letter 😔
thanks for the assistance!
Nice! Yeah, finding out it was the little things is always a bit of a pain
the gun's invisible now, but hey, at least i can hold it and fire it just fine- time for me to look for more typos probably, heh
it's pretty common that the model is either so huge or so tiny you can't see it
the model was visible at the proper size while i was testing a few hours ago, albeit upside down

Code concerning file-discovery should be handled with no case-sensitivity. Always leads to problems like this.
Unless that's not a file?
It's a module, which would also make sense to be case insensitive imo
it was script modules i think
Ah ok.
I would've assumed they are, never had to look into it (until now & I see that they are not)
Case-Sensitive fields.. in an undocumented and non-integrated text document even..
The devil's playground.
I could make that trashy 3rd-party extension do diagnostics like this in the future.
It'd be cool to discover all the sounds, items, modules, etc in folders set in the extension's settings so that it can detect unknown items, sounds, models, etc. in certain fields and raise a warning.
A dropdown suggestion box would be nice for those fields too..
Could save modders like this one 2 hours.
Warnings at least for items in similar contexts that are a case-insensitive match but not equivalent would be nice for anyone who doesn't want to pull in folders—that's what came to mind for me
Non-invasive yet powerful.
That's the balance I'm targeting for the extension.
It's also why I dropped the formatter I spent nearly 60 hours on.
xD
Will it work?
no
lots of made up methods, made up event, and the logic doesn't actually make sense anyway
damn shame
The treasure of modding is the journey. Don't forget that.
got the gun working, visible, and playing sounds! now to fix the spawning, and i'll be done
Hello together, is it possible to debug ZombiesZoneDefinition ingame, cause my custom zombies does not spawn even if the chance is high
What zones are you adding them to? The default table should work basically everywhere in the map, even if not at the standard spawn chance
table.insert( ZombiesZoneDefinition.Default, { name="CustomZombie01", chance=50 } ); also default one
i checked AuthenticZ to find the definitions
and i include require "NPCs/ZombiesZoneDefinition" in the code
And you have a zombie outfit with that exact name?
yes and over horde manager its working
is the file generating an error in console?
no everthing fine
could it be that i use the table.insert in a for loop with a table of data for the custom ones in a init method which get trigged by Events.OnGameStart which not works
I don't add mine through an event, so maybe that could be the issue
okay i will test it, thanks so far for the answers
how hard would it be to step away from the traditional farming method of planting int the ground and allowing the ability to plant in a pot or bucket?

Hello lads, (I might need to post this in mod_support but I make an "update" to the mod and re-upload it for who ever wants it)
I downlaoded AIZ3 today and I am getting this error (everything seems to work fine?)
"function: MCOverlayMap.lua -- file: MCOverlayMap.lua line # 3 | MOD: AIZ Expansion 3 -- overlayMap["location_shop_generic_01_96"] =...
ERROR: General , 1681600657996> 0> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index of non-table at KahluaUtil.fail line:82"
Could this be as simple as adding local overlayMap = {} on line 2 in MCOverlayMap.lua? I am not too sure what it means, i am just trying to get the mod to not throw errors
There was an old mod that had plants in pots, but I have no idea if it was ever updated after build 41
Hello, theoretically, on a scale of 1-1000 how hard would it be to make a mod that lets you make safehouses in spawn zones?
Any ideas on how it would work?
Would it be attached to some safehouse-making script or would you need to go around making every spawn zone claimable manually or something?
If you dont need to fix every individual spawn zone manually it could work with any spawn zone from mods too, right?
Because one of those Louisville spawn mods makes my favorite place in louisville into a spawn zone so you can't make it a safehouse if you want to keep the mod.
Something like:
"If > safehouse = Remove > spawn zone
Else > keep living with the agony of this mod not existing"??
(I'll give a ⭐ to anyone that replies)
i'd be surprised if it was complex at all
So, like 250 on a scale of 1-1000?
I've looked for years after a mod like that, and none seems to exist... so that tells me it might be harder than one might think, or outright not possible
They will be teleported outside after i think
i haven't seen the safehouse code but my guess is that the only check for spawn points would be in the ui - but i haven't really used that mechanic so i'm not sure if it would lead to strange behaviour if someone spawned inside one that you would have to fix
People who happen to spawn there? That doesn't seem too bad.
Hmm okey yeah i figure that's an issue, maybe you could have some check that if you spawn in a building that has the safehouse tag on it, just spawn like 20 meters down the road or something... or just automatically remove the spawn zone tag from any building thats designated as a safehouse, that seems like the simplest solution? But i have no idea. I mean its not like you'd need to reinstate the building as a spawn zone afterwards if you release the safe house either, because that sounds like it could be trouble.
as long as its placed after spawn zone mods in the mod load order it would cover those as well i guess?
If a player that isnt part of a safehouse stands within the safehouse bounds they auto teleport outside
You can observe this by placing fence then make your character hop inside (shouldnt be an admin)
the problems with that approach is buildings aren't linked to spawn points in code - spawn points are just sets of co-ordinates, the only way i can see doing this would be to scan all the spawn points to see which lie within the bounds of the building
I think the spawn points are determined by the map
if glytch3r's right about that then it wouldn't be an issue
How does other mod add spawn points ? I bet panopticon knows
You mean if a player spawns there?
No im just saying vanilla behavior
Cuz there should be some failsafe and thats the telepprt
If you cant do the fence thing i mentioned you can also do this
Have a person logout on a building
Another person claim safehouse
Then person A logs back in
You will see what i mean
Since player a would be re spawning to a safehouse
I don't know, the specific ones im using is https://steamcommunity.com/sharedfiles/filedetails/?id=2706495780 and https://steamcommunity.com/sharedfiles/filedetails/?id=2830299604
Aah i see
I'm bumping this up again, still no clue how to fix it. Today i tested with literally just the two mods on. Here's singleplayer, then multiplayer. And yes, I double-checked the load order, I checked that there's no server file for the names, and at least I couldn't find it. I really need some help here, It brings me nuts that I literally created this mod just to not have my immersion broken by mixing fictional cars with real ones and every time i go into multiplayer it just happens anyway :(
I am wondering whether it could be something related to localization since I know zomboid is known to have some issues with that in servers and I'm spanish, but I don't know, and I'd really appreciate someone with more experience taking a look at it
@river tree you still around here?

Who develop mods with Linux here?
you want to add linux to in-game computers?
Does the IsoThumpable:addToWorld() method spawn the item from the isoThumpable in the game on the square that you used to create it?
Is it possible to create screen overlays somehow? For example, upon a certain condition I'd like to apply something like a tunnel vision / blacking out overlay
blind trait uses an overlay
there is linux specific modding functions?
I don't think so
hey there,
is there a way to change single Zombie Speed, Strength ... without change the complete Sandbox setting ? by modifing the fields maybe ?
why are you asking?
hello guys~
i created a movable npc
which has tiledefiniton
and it works
but i created a script .txt with item
but it isn't working
i can pick it up
but when i spawn the item from debug item list
and press place, it doesn't work
two items have different properties , i don't understand why..
i don't know how the mod info comes to be, but probably they were spawned in a different way or at a different time, even between versions
As joy said there is blind trait and there is also immersive overlays https://steamcommunity.com/sharedfiles/filedetails/?id=533622988
I have a newbie question: A lot of the beginner tutorials I've found have code like this:
local player = getPlayer()
player:say("Hello, World!")
end
Events.EveryTenMinutes.Add(tutorialHelloWorld)```
But the game breaks on error every time, with Object tried to call nil in tutorialHelloWorld
what is messing me up here?
Solution: F me, it's Say not say
how do I get predictive code in VSCode? 😅
Microsoft has an extension for it. Rather than predictive code, though, I'd urge you to go the intellisense route
Good Morning
If you'd like to stick with Lua, you can utilize lua-language-server and a doc library generated with pz-zdoc to get intellisense recommendations. If you'd prefer TypeScript, you can use PipeWrench
(neglected to reply so I'm doing it here)
What does the item script look like?
{
DisplayCategory = Furniture,
Type = Moveable,
Icon = default,
Weight = 0.5,
DisplayName = npc1,
WorldObjectSprite = ivery_npcs_request_1_00,
} ```
So it's fixed now? By “your own name” do you mean Wuro or 우로? I can see why Korean characters wouldn't work in module names but I'm unsure why “Wuro” wouldn't
yea it fixed it by putting the moveables.tilename
for some reason, vanilla moveables "item script name" starts with Base. bla bla
but when i create on from TileZed, it saves by name Moveables.tilename
i wish to change that module "moveables" into my own
but can't figure out where i should do thtat
this is what i mean
and this is vanilla
{
imports
{
Base
}
item ivery_npcs_request_1__0
{
DisplayCategory = Furniture,
Type = Moveable,
Icon = default,
Weight = 0.5,
DisplayName = npc1,
WorldObjectSprite = ivery_npcs_request_1_00,
}
}```
so i had to do this to make it work
so im having an issue that is probably really simple and i may be overthinking it. How does the base game keep the cooking pot after using it? Do they use the oncreate thing for it?
i have the recipe that is to create the uncooked pot and then later the cooked pot is used to make the tray. I tried uysing keep pot in the recipe but the problem is that the recipe then makes the meth and i still have the pot in my inventory. I tried removing the keep and make it so that when the baking tray was created it had 2 results. with one being the pot.
I think i just figured out what i did wrong. I used / instead of , seperating the result
in front of the name of item
u put "keep"
for example if you want to keep "pot"
then do "keep pot,"
i tried that
is it possible to have 2 results from a reciope
function Recipe.OnCreate.MakeBowlOfStew4(items, result, player)
for i=0,items:size() - 1 do
local item = items:get(i)
if item:getType() == "PotOfStew" then
result:setBaseHunger(item:getBaseHunger() / 4);
result:setHungChange(item:getHungChange() / 4);
result:setThirstChange(item:getThirstChangeUnmodified() / 4);
result:setBoredomChange(item:getBoredomChangeUnmodified() / 4);
result:setUnhappyChange(item:getUnhappyChangeUnmodified() / 4);
result:setCarbohydrates(item:getCarbohydrates() / 4);
result:setLipids(item:getLipids() / 4);
result:setProteins(item:getProteins() / 4);
result:setCalories(item:getCalories() / 4);
result:setTaintedWater(item:isTaintedWater())
end
end
player:getInventory():AddItem("Base.Pot");
end
thats a snipet of code from base game
recipe Make 4 Bowls of Stew
{
PotOfStew,
Bowl=4,
Result:StewBowl=4,
OnCreate:Recipe.OnCreate.MakeBowlOfStew4,
Time:80.0,
Category:Cooking,
OnGiveXP:Recipe.OnGiveXP.None,
OnCanPerform:Recipe.OnCanPerform.SliceCooked,
}
this is the recipe that goes to it
and you want to keep what item?
pot
this recipe do not have pot
or what you could do then
have AddItem
in the function
so giving a new Pot to the player inventory
function Recipe.OnCreate.MakeBakingTrayMeth(items, result, player)
player:getInventory():AddItem("Base.Pot");
end
Found this Trait mod on the workshop, anyone know how I can edit it so It increases the perception range by XYZ? Like Eagle-Eyed/Keen-Hearing but more effective
local function initMagDrillsTrait()
local MagDrills = TraitFactory.addTrait("MagDrills", getText("UI_trait_MagDrills"), 2, getText("UI_traitdesc_MagDrills"), false, false);
MagDrills:addXPBoost(Perks.Reloading, 3)
end
Events.OnGameBoot.Add(initMagDrillsTrait);
get any error msg?
o i just figured it out i forgot to change something
in my recipes list
quick question though. Should i be creating these as local functions so as not to mess with anything
just whats in my mod
Yes. If it doesn't need to be global (which is only really the case if you need to reference a function from a script), you should default to local
function Recipe.OnCreate.MakeBakingTrayMeth(items, result, player)
player:getInventory():AddItem("Base.Pot");
end
Looks like the visibility bonus/malus is done Java-side
thats all im doing so its really not calling out to anything outside my mod
cant find a single thing related to this anywhere
Shouldn't that be doable with "keep"?
IsoGridSquare.CalcVisibility and LightingJNI.updatePlayer
It's java so you'd have to decompile the .class files to see it
it was not working as i intended as i would craft the object then i would have an empty pot still in my ionventory
as well as the resulting item
Oh, so you want to destroy it instead? I think the keyword for that in recipes is destroy
ok can i dm you so im not cluttering this up trying to explain what i did
I don't think cluttering this up is too much of a worry
You could always make a thread if that's a concern—don't want stuff getting lost in DMs
ok
so give me a few to figure out how to explain my madness lol
I have the first recipe to create meth and it works fine after removing keep pot which is what i wanted, Then after it is cooked i have another recipe that puts it in a baking tray, The last recipe is bagging the meth up. What i was running into was that i would try to add the pot as a result so i could get it back from the adding to baking tray recipe, the same with the baking tray from the bagging recipe. It wasnt giving the m back
sorry im bad with words
yea its been a long time i been working on this mod
i did 40 hrs in 2 days the i did roughly 12 hrs yesterday and im working on about 4 hrs today already
adding roughly 47 items
and too many recipes
any ideas why switching it to local would do this
For one, read the parenthesized bit up here
But to actually answer the question, a function that you're defining as part of a table cannot be a local function
That is, function x.y(...)end is equivalent to x.y = function(...)end, where x is a table. A table field cannot be local, or global for that matter, but a variable that references that table can be
ok
the local keyword is for declaring a var within the scope of a block - be it the entire lua file, or an if/while/for/function block. When you declare a function as above, that's actually just syntactic sugar for setting a key in a table - in this case, a key called MakeBakingTrayMeth within the OnCreate table
Is there a way to get the coordinates of player made safe houses 🏚️ from the server directory ? Should I look in one of the database files?
Hello to all! I wanted to reinstall the server and export the safehouse from the player and import it to the newly installed server. Does anyone of the experienced server survivors know how to do this? thank you for the answer a translation from deepl I don't know English
Ouch. That's bad news.
I don't think there is a way to read the map.bin files so no idea how I would get the coordinate data. 🥺
If this is from the context of a mod, SafeHouse.getSafehouseList() should suffice to get a list of safehouse objects, which have a number of methods related to that
If this isn't from the context of a mod—you may be in the wrong channel 😄 But you could very well decode the .bin files, it just takes a while and a lot of reading through the decompiled source to see the data sizes & what's in each location
Actually..
It would involve some programming but yes you should be able to view them.
I think this is the fourth time that I've seen this sort of request.
I'm a pretty good python scripter but I've never done anything with Java before.
I can write an unpacker for it.
My goal is to make a utility that identifies chunks where player safe houses are located and then deletes the chunks not near the safe houses.
But in order to do that I need the cords for the safe houses.
You can do one of two things here:
- You can write a Lua mod that goes through
SafeHouse.getSafeHouses()ArrayList and do the magic yourself or - You can modify the files when the server is offline.
I believe that everything you'd need to do it in Lua is exposed.
What does exposed mean ?
So you're not a modder?
Not yet no.
Hmm ok that explains your wording.
Yeah it's definitely doable.
The problem is deleting chunks from files when a server is active.
Got to be really careful.
If you delete them from the game's code then it shouldn't be much of a problem.
So I need to learn Lua and some basic zomboid modding then dig into SafeHouse.getSafeHouses()
How do I add a mask to the game? Heres what I have so far
i think the model needs improving too
let me fix that rq
cause you need too like uh
i forget what its called
but its like hte skeleton mesh
I havent added the model yet because i have no idea where to put it lol
this could be of some help
it has some assets
ah yeah thats gonna help, thank you! : D
np man
i can help with file struct btw
so wheere the folders go and code
oh btw
remove some of the spaces in your code name
alright, im gonna have to figure out the occupation thing eventually
and its called .txt.txt
a normal text file is by default a .txt
btw i can help with melee items
if you ever need that
alright!

Is it safe to get rid of these since I dont want any blood, dirt, or holes in it?
I'm sure by the time you look into it you'll find this out anyhow, but it's SafeHouse.getSafehouseList()
Also, you wouldn't necessarily need Java to read the .bin files—I've done something similar for GameTime & player data with Python before
https://grabofus.github.io/zomboid-chunk-cleaner/
https://lordikol.github.io/PZ_MapCleaner/
The only problem with both of these tool is that you cant, to my knowledge, select multiple areas to exclude. So if you wanted to reset the whole map you'd only be able to save one safehouse, or you'd have to include the areas between the two safehouses.
So if you manage to make such a mod (or tool rather), include that functionality and/or automatic deselection of safehouses you'd have a unique selling point. 
is the IDEA intelliJ mod tool nessecary to mod?
No, you can use whichever IDE you'd like. Some options may have better support, though—I believe most people use that or VS Code
I use that tool all the time. It's awesome. As far as I know it doesn't know where safe houses are.
Another limitation is that if you use a rented server you have to download your backup, uncompress it, run the tool, then upload the world again.
The server service I use will delete map chunks if given the string of file names. It would save a a lot of time to skip the downloading and compressing.
That's why I'm looking for ways to generate a file name string that excluded safe house locations.
that effects weight and blood area
i would stay on the safe side
alright
Found this 360 view mod online but it doesnt seem to work. Know whats wrong with it possibly?
I'm not sure what you're asking or how it's related to the attached .class file
nvm
Yeah that sounds useful! Ill have to keep my eyes open if you manage to code it
I'm working on VSCode tools for modding PZ as we speak.
The PipeWrench environment is for Typescript + Lua for modding. The ZedScript extension is for handling scripting files.
=)
Currently writing a passive tokenizer for formatting script files.
I don't even need to look at it to know what's wrong with it. It's outdated and the game's updated code doesn't match the calls.
I'm going to bet it's either a NoSuchMethodError, NoSuchFieldError, NoSuchClassError, or a stackdump because the error originated in the eden of the JVM.
Almost every person asking about Java patches not working is exactly that.
This is so useful, thank you!!
No problem.
what tools would be appropriate for a "lobotomize" action
screwdriver? needle?
metal pipe?
icepick, hammer, screwdriver, needle, pretty much anything sharp as long as you have something to drive it in with
a needle may be to flimsy though
i didn't even know there was an icepick in game
that's perfect
well, its for a small thing
||its for stuart little||
about time
i dont know if there is one actually
finally, that twerp gets what he deserves
im trying to figure out the mask stuff still ;-;
i need to download that mod lol
Is there some way to modify the saveInfo during OnSave()?
that's very vague
What are you trying to modify? The OnSave event is triggered after saving map_ver.bin and map_sand.bin but before saving other stuff, so for a lot of things you should be able to set it normally
Stuart Little is a rat
actual misinformation
what do the lines on these mean? its a stupid question but i wanna make sure im understanding it correctly
Each indentation level is a subfolder
That was a poor way to explain that, what I mean is every indentation level signifies that the above element (the one with a lesser indentation level) is the parent folder of that file or folder
oh so L___ means the folder above it is the one it goes into?
this is my first time coding anything lol
Yeah, so SteamGuideClothing is within Workshop
No worries, it's not a stupid question if you're unfamiliar with those kinds of text representations of directory structure
He's a mouse in the film & a human (that looks like a mouse) in the original book
well the way he acts hes a rat
Fair enough
I think Stuart Little is trustworthy and kind 😇
i hope his stupid little boat capsizes in one of his stupid little boat races and he gets trapped inside while it sinks
🙂
does vscode make all text file things in .xml?
i already did the mod stuff once but it wouldnt work so i restarted it
What do you mean? VS Code doesn't force file extensions* to be .xml, if that's what you're asking
let me send the guide im following lol
im trying to make the masks from Hotline Miami and im having trouble understanding the code lol
If you want to make an .xml file you just need to add that to the end of the filename
ah, no wonder why it didnt work last time lol
thanks for the help!
also the mask would go in "Static" and not "Skinned" right?
Making progress on my formatter today.
nice!
now i just need to figure out how to make an option to flush him down the toilet
and I haven't, sorry
i'm not very good at blender so clothing mod scary
I just learned how to use blender yesterday and its better then coding imo
Heresy
im gonna get my mod working with the one mask, then do a fresh reinstall of pz to clean out some of my mods lol
I hate "this", proceeds to add "this" to the game 😅
accurate
Planning on getting a pet birds mod made for 42 when it becomes a thing.
do I make those folders in my mod folder or put it in the base game folders?
Cool. It seems like I have a controllable tokenizer and formatter setup to begin implementing the formatting options planned.
Hmmm
Perhaps
But I'm not too good at blender so I feel like it would come out poorly
But the option to skin him alive then make a costume out of his flesh seems like a good feature
that would make it even better lmao
yeah, you got a bit mad while skinning him and it hurt his skin
also what do you guys think about this being the icon for the 50 Blessings Member occupation when i make it?
I would maybe add a drop shadow to the whole thing personally but I think it looks good
alright, I wanna make it to where the mask traits are locked to the occupation and you are only allowed to choose one mask trait
like Richard provides no stat boosts and Rasmus provides a foraging stat boost
I just saw this
You can make a local cached version of zomboidb
Which will be separate from your main game
i didnt even think of that lol
So you can have different mods loaded (I only load the mod I'm developing or testing)
Makes it super fast
i do need to clean out my mods though, i get like 100 errors before i even load my character
least modded pz game
I've only played vanilla PZ.
Im thinking about making the first 4-5 masks in the game before i release it on the workshop publicly. Then just steadily updating it as I make make more masks
also is a clothing item like a helmet or mask a "static" clothing item thing or a "skinned" clothing item thing?
also does anyone have a guide or template on custom occupations and traits?
oh I can change the modfolders option!
doesn't work with -nosteam
mods: works
workshop: doesn't work
steam: doesn't work
You can only make it not load mods at all.
is there a way for me to make a mod that removes parts of another mod?
do i turn "Skinned" to "Static" for a mask or do I leave it like how it is?
<div>Hello, World!</div>
Cool. I have nested scope formatting for inline brackets working.
Now onto the madness that is property-value whitespace fixing.
Also going to add my donation links to the extension when I update it today. =)
Going to include the very first formatter code most-likely.
Before:
After:
Now I'm working on the spacing between the = signs to get rid of the whacky and inconsistent spacing in the vanilla files.
The reason why the = spacing looks weirder in the formatted result as of now is due to \t.
This is a great sign. It means that I'm closer to writing diagnostics than I thought.
It means I can squiggle / underline things like deprecated or improper values for properties.
TIS could actually take this tool and clean the game's scripts with it.
=)
so I cant get the mask to be added in game, does anyone wanna look over the code i have and tell me what im doing wrong?
aaaaaaaaaaaaaaaaaaaaa
Looks like my formatter breaks recipes.txt however there's some really weird commenting in there..
Yeah. Looks like it's the fault of the file itself.
@tame mulch Bug report. Improper enclosure of comment block in recipes.txt. =/
Not sure if the parser for PZ scripts is treating comment blocks like nested brackets..
Which isn't the proper behavior for this asm-syntax comment-block structure.
It could also be causing unnoticed, undesirable side-effects.
Hey folks, quick question.
I'm trying to adjust Brita's Armor Packs' insulation forthe GORKA 6 jacket. It has two models accessible through the context menu. These are the stats for the items as defined in the related scripts/clothing file
Jacket without hood on:
item Gorka6_Hoodie
{
Type = Clothing,
DisplayName = BARS Gorka 6 Jacket,
ClothingItem = Gorka6_Hoodie,
BodyLocation = Jacket,
BloodLocation = Jacket,
Icon = Gorka6_Hoodie,
RunSpeedModifier = 0.95,
NeckProtectionModifier = 0.5,
BiteDefense = 25,
ScratchDefense = 30,
Insulation = 0.35,
WindResistance = 0.60,
WaterResistance = 0.50,
Weight = 2,
FabricType = Cotton,
ClothingItemExtra = Gorka6_Hoodie_ON,
ClothingItemExtraOption = Gorka6_Hoodie_ON,
clothingExtraSubmenu = Gorka6_Hoodie_Back,
WorldStaticModel= W_Gorka6_Hoodie,
}
Jacket with hood on:
{
Type = Clothing,
DisplayName = BARS Gorka 6 Jacket (Hood On),
ClothingItem = Gorka6_Hoodie_ON,
BodyLocation = Jacket,
BloodLocation = Jacket,
Icon = Gorka6_Hoodie,
RunSpeedModifier = 0.98,
NeckProtectionModifier = 0.5,
BiteDefense = 30,
ScratchDefense = 30,
Insulation = 0.70,
WindResistance = 0.70,
WaterResistance = 0.70,
Weight = 2,
FabricType = Cotton,
ClothingItemExtra = Gorka6_Hoodie,
ClothingItemExtraOption = Gorka6_Hoodie,
clothingExtraSubmenu = Gorka6_Hoodie_ON,
WorldStaticModel= W_Gorka6_Hoodie,
}```
What I noticed is that the insulation for the hood doesn't cover the head, see the attached image.
im having a bunch of confusion with my mod but I think those are the stats lol
I just sorta learned how to code today though so i dont think i can help that much ;-;
I assume this has to do with the "BodyLocation" definition being "Jacket", and insulation settings being applied from there, right?
that makes sense so that could be it
If that is the case: Does the BodyLocation definition support multiple parameters so I can have the hood actually provide insulation for the head, if using the "Gorka_6_Hoodie_ON" item?
bodylocation is just a 'slot' system to stop players from equipping conflicting items, i don't think it's where insulation is determined
i've worked with a lot of the body location code and i never saw anything about it
if it is (it might be hardcoded somewhere) then i do know that you definitely can't have two bodylocations on the same item
Thanks for keeping something of a format on your ZedScript.
Hm, damn, so that might not be it... I've not dabbled with anything much, that might just give me an excuse to learn lua...
hey albion, is it ok if you take a quick look at my mask code? Im so confused because it wont even show up as a mod ;-;
if it won't show up as a mod at all the issue is with your mod.info
either it's in the wrong place or it's unreadable
RichardMask should be in the mods folder
so the RichardMask folder?
No it should be in a file called mods
yeah, so the structure would end up being like contents/mods/RichardMask/mod.info
Best I can do is at least make the stuff readable, eh? 
Visual murder. I'm writing the formatter for ZedScript.
Plus, wouldn't be much fun for anyone to parse that if I posted it in a single line.
i've always seen Contents capitalised too but i don't know if you actually have to do that or not
alright, is it okay if i ask a few more questions on stuff?
People literally do this.
sure!
what?
I refuse to implement this style of formatting.
is any of this correct and gonna work?
You can upload files or do this:
print('Hello, World!');
it looks like it's the BloodLocation that determines the insulation area, you can have multiple separated by semicolons
i haven't worked with the clothing xml so i can't help you there, i am familiar with the format for another game though and it does look like it is at least valid xml
alright thanks!
Thank you! I’m gonna try that, see if it works.
Screenshots of code…
@bronze sinew, my man, don’t do that, please. Makes it hard to read, hard to diagnose, hard to everything.
If you wanna work with code samples here, try enclosing them in triple backticks. Formats the code in monospace font, makes it easier to read, etc.
alright, sorry this is my first time doing any coding ;-;
It’s okay, we all start somewhere. You’re gonna do good, mate.
i just tested it and it sadly wont show up for me to enable it
is the 50Blessings folder in User/(your windows username)/Zomboid/Workshop ?
yeah
BloodLocation now looks like this
BodyLocation = Jacket,
BloodLocation = Jacket; Hat,
Icon = Gorka6_Hoodie,
and Zomboid throws the following error when loading a save after the change was applied:
ERROR: General , 1681688765923> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "java.util.Collection.toArray()" because "<parameter1>" is null at ArrayList.addAll.
ERROR: General , 1681688765923> DebugLogStream.printException> Stack trace:
java.lang.NullPointerException: Cannot invoke "java.util.Collection.toArray()" because "<parameter1>" is null
at java.base/java.util.ArrayList.addAll(Unknown Source)
at zombie.characterTextures.BloodClothingType.getCoveredParts(BloodClothingType.java:229)
at zombie.characterTextures.BloodClothingType.calcTotalBloodLevel(BloodClothingType.java:606)
at zombie.inventory.InventoryItem.synchWithVisual(InventoryItem.java:1492)
at zombie.scripting.objects.Item.InstanceItem(Item.java:2257)
at zombie.inventory.InventoryItemFactory.CreateItem(InventoryItemFactory.java:68)
at zombie.inventory.InventoryItemFactory.CreateItem(InventoryItemFactory.java:150)
at zombie.inventory.InventoryItem.loadItem(InventoryItem.java:1119)
at zombie.inventory.InventoryItem.loadItem(InventoryItem.java:1089)
at zombie.inventory.CompressIdenticalItems.load(CompressIdenticalItems.java:299)
at zombie.inventory.ItemContainer.load(ItemContainer.java:2891)
at zombie.characters.IsoGameCharacter.load(IsoGameCharacter.java:5524)
at zombie.characters.IsoPlayer.load(IsoPlayer.java:972)
at zombie.iso.IsoObject.load(IsoObject.java:987)
at zombie.iso.IsoCell.LoadPlayer(IsoCell.java:6131)
at zombie.iso.IsoWorld.init(IsoWorld.java:2654)
at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:268)
at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:225)
at java.base/java.lang.Thread.run(Unknown Source)```
Wait.. Are you saying that the game doesn't trim semi-colons?
That's very bad if true
Adjusted, is now
BloodLocation = Jacket;Hat,
Icon = Gorka6_Hoodie,
Still throwing the exact same error.
Then I'll need to adjust the format code I just wrote for semi-colons to not use clean spacing.
Just let me have access to the script Java files. I'll immediately clean up a lot of the issues with parsing.
x_x
Throw me some stupid NDA lol
I didn't spend ~200 hours on a project that'll format script text to be ugly.

FML, I misread "Blood" and "Body" when grabbing the definition for head gear. Thanks!
I either need sleep or coffee. But it's already 2am, so sleeping ain't gonna be enough. More coffee!
HAH!! That did it, many thanks, albion!
Time to patch the jackets with hoods to they reflect accurately.
@bronze yoke Guess I'll need to create a list when I finally write my mega-thread.
yeah I never had luck putting spaces in between semicolon'd terms
If there is a creator that I want to talk to about their mod, and have not gotten a reply on steam- Do yall think it would it be better to drop an @ in an open channel like this? Dm them directly in disc? Or just assume they think I am too stinky 🥸
Actual question tho, bc I know how annoying it can be to get a bunch of notifs or dms about a mod you make, but also don't want to miss out on the potential to work with / learn from someone if they just don't have their steam notifs on or whatever lmfao
Not abandoned, it is currently in dev. Just figure it is better to talk to people working on same/similar mods to things I have been working on too- Either to make sure that they will be unique, get tips from each other, or even collaborate. No sense having multiple different people pouring the time and energy into seperate projects when collaboration could lead to a project that is much much better in the end. If that makes sense
Team Orbit looking to recruit 1 Modder
Specifically for Code related projects
Pls dm me and join the discord server (links on my profile) if you havent yet
.thank you

Unfortunately it does, meaning the example in that screenshot should work as intended
In that case then I'll need to mention that.
I remember seeing it when looking into the script parser; comments are stripped by matching starting from the end (i.e., last index of */) then looking backwards, so /* /* */ results in /*
The oddest behavior.
That should be rewritten.
I scan through them left->right on a 1-dimensional string.
The behavior there is not how ASM block comments behave.
Yeah it's certainly odd
It's bad to scan and move backwards unless you are destructively / invasively formatting.
Tokenizing you go forward as much as possible.
i am definitely doing something wrong in this code, most likely in the vehicle part of it. fails on line 31 and things don't spawn in any of the places i've tried to assign them to. but hey, to be expected with my first time touching lua
VehicleDistributions.list[MP5TrunkDistribution[i]].items should be VehicleDistributions[MP5TrunkDistribution[i]].items
ahh, gotcha
yeah i'm just sorta... looking at what other mods do and frankensteining it into my own thing at the moment to learn, i must've looked at the wrong thing for this part
the rest looks good, i'm not sure why it wouldn't be spawning
is your item in module Base? if you don't put the module it assumes base
oh, no, it isn't! yeah that's it, i forgot to add that to this one
that's just a
module EaMP5 {
//code here
}
right?
oh, code doesn't go into script modules, but you should reference your item as "EaMP5.MP5" instead of "MP5"
ZedScript is a storage / settings format.
"Script" is a misnomer here.
Nothing executes in ZedScript.
hm, gotcha
A lot of progress today.
My third attempt at writing a less aggressive formatter is doing well.
Going to wait on releasing the next version of my extension until I get my formatter more rounded out from things like bugs or technicalities.
Can't wait to show off diagnostics when I get there.
hmm, the game seems to be crashing whenever it tries to spawn something in the loot table. log says it's something about getting a null value instead of what it should be?
yeah, i saw that but i'm not sure what it's referring to
weaponparts are attachments, but i'm testing now and there are attachments spawning just fine
it looks like the related code is to do with spawning the weapon with a random attachment, does it work okay if you cheat in your item and add attachments?
hm... all of them work except for the red dot sight
well, the laser just sort of floats in the air since i apparently got the positioning wrong on that, but it attaches just fine
red dot doesn't show in the menu
ooh, hang on... looking at another mod and it seems like it has a file listing out what attachments a weapon can spawn with; i probably need that, huh?
oh that might be it!
Question about modifying an existing mod:
We have a dedicated server with the "Blacksmith" mod. It uses item tweaker to adjust the "metal values" of items that can be melted down in a stone furnace. The problem is there there are many metal items in the game that can not be melted down. If I decided to modify this mod, would I simply modify the existing .lua file which tweaks the items, or should I create a separate file and add that to the same folder in our server?
Follow up question, when a mod updates does it remove extra files from its folders or does it only modfy files where changes have been made (leaving our custom file alone)? Thanks in advance.
just create a new mod that requires other mods that you would like to modify
Thank you, I was trying to be lazy but even our guys suggested we do that. Preciate the validation!
I hope you understand what I meant correctly and not making a standalone mod
Also, lots of people suggest not using Item Tweaker
better go with DoParam
as far as I know, your additional files won't be deleted
The mod folder might be missing when you unsubscribe from the mod, but when you resubscribe, the folder structure will come back and your additional files will be there.
Good night.
Hi All, is there a way to access (read/write) nutritional values( cals, carbs, ...) for items via lua ( not inventoryItem). What I'm trying to do is to copy those for consistency from closed to open cans without duplicating the values in the scripts.txt file . Thanks.
i'm not sure how you could do it without accessing inventory item. Maybe you could try accessing modData on the nutrition parameters?
i was actually just writing something that uses inventoryItem
one sec
require "TimedActions/ISEatFoodAction"
local base_eat = ISEatFoodAction.perform -- make a copy of the vanilla function
ISEatFoodAction.perform = function(); -- override vanilla function
local carbs = self.item:getCarbohydrates(); -- variable containing item carb count
local o = base_eat(); -- let vanilla function run to create "o" object
return o; -- returns o object so that the rest of the vanilla functions perform
end
How can I make a characters stat decrease over time? I tried looking for the vanilla pill functions but couldn't find anything other than the timed action which doesn't have anything relating to stats.
Basically, I want the character to either craft a recipe or start a timed action that will then reduce a certain stat by 5% every 20 minutes or something. How can I do that time calculation? I don't want the stat change to be instant
my only guess is setting a bool that the everyTenMinutes events checks and changes it based on that
but there might be a better way?
pill effects are handled in java
it's a bodydamage thing, i don't remember exactly how it works but you might be able to set the same values it does?
problem is that its not using a default moodle like stress or something
i'm using a custom modData parameter
then your other idea is probably the only way
Use Moddata
And it should be a float
Slowly reduce that float till its gone
While applying the reduction to the players stats
Then just add a checker first saying if its zero then nill that noddata and remove the event
When Taking the pill check using ontest
If the playyer has the moddata already
If it has then
getPlayer():Kill(nil)```
Hehe
ERROR: General , 1681720797257> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: getEmitter of non-table: null at KahluaThread.tableget line:1689.
this is what i'm running into rn
Shw code

local base_perform = ISEatFoodAction.perform
ISEatFoodAction.perform = function()
local carbs = eatItem.item:getCarbohydrates();
if carbs and carbs > 0 then
isBloodRising = true;
local glucoseIncrease = carbs * carbToGlucoseRatio;
glucoseDelta = glucoseIncrease / 6
maxBloodSugarFromFood = ((eatItem.character:getModData().bloodSugar) or 80) + glucoseIncrease
end
local o = base_perform();
return o;
end
Maybe remove the sound?
that would remove it from literally every item though
since it's a problem with the vanilla function
Right
wait
I wouldnt use on eat if possible





