#mod_development
1 messages ยท Page 272 of 1
can you show the mod info
and open cmd on the mod folder
then enter command
tree
then it might be duplicated mod which is the issue
The original texture come straight from Project Zomboid so it makes since it was originally saved years ago.
I did use Gimp, but I've always used Gimp for this kinda thing and it's never done this before.
It's really strange.
I've made 2 textures just now and put them in a new mod folder.
I want to see if something is wrong with the export.
I placed it in a folder with other textures that I am 100% sure work just fine.
Ok
I made the textures in the same way
I think it has something to do with me using the copy and paste tool for some reason.
The original male texture works fine.
But the female texture which I copied things from the male texture onto.
Doesn't work
I'm not sure why though.
This is worrying because the copy paste tool is the only thing that allows me to add rot layers to my textures.
It seems to work if I copy-paste but avoid merging the 2 layers.
I'm not sure why, if anyone does know why that is please tell me so I can hopefully fix the textures.
At the very least I have a way to keep it from happening.
Hey all, was doing some random looking through Github code for mods on the workshop and I noticed this code in a pretty widely used mod. It seems like the code is obfuscating something but I'm just unsure on why that would be needed. Is this a common thing to do for PZ mods?
partly deobscufated
at zomb ie.GameWindow.WHY(GameWindow.java:101)
at zomb ie.core.profiling.AbstractPerformanceProfileProbe.ARE(AbstractPerformanceProfileProbe.java:32)
at zomb ie.GameWindow.YOU(GameWindow.java:115)
at zomb ie.GameWindow.READING(GameWindow.java:33)
at java.base/java.lang.Thread.THIS(Unknown Source)
(why are you reading this in caps)
stacktrace
๐ Ah so it's just an easter egg?
I haven't looked into it , i can send you the whole thing if you want to check it out
How did you go about deobfuscating it? Did you just run it?
I took the numeric values being passed to string.char() and converted them back into their corresponding ASCII characters.
Ah I see, the first ascii translator I used gave me a bunch of garbage output. Interesting that it's included here
you could also probably just send the string to gpt and have it done for you haha
yeah it does look dodgy
you can hide payloads like that
Exactly what I was thinking. ChatGPT gave me some random answer about a lua debug function that made no sense so I figured I'd ask here
I guess it'll remain a mystery to me but thanks for checking it out anyway hahaha
is for people who repack to mod
Who would mess with repackers like that?
But yes, it's a fake error that has a message in it. I may make it easier to read though as most people don't figure it out anyway.
It's my understanding for B42 (or later) mods will use their workshopID and modID together for identifying which folders to use. Which should prevent the incorrect folder being loaded due to matching modID
So I'll be able to stop using this snippet
Hi all. I was trying to make a mod and rn I'm changing item type from normal to clothing. After that item doesn't show tooltip and making errors..
at zombie.inventory.types.Clothing.DoTooltip(Clothing.java:215)
at zombie.inventory.InventoryItem.DoTooltip(InventoryItem.java:619)```
Is there's something I'm missing?
I'm pretty sure I've seen this copy paste before and it was from other scammer
yeah.. thats Sus for sure.
oh i completely forgot about that tutorial, thanks
๐คจ
Hello, I am new to modding. I am trying to programmatically alter the attribute of an item without redefining it but I don't know how to access the specific item attributes because I don't know the names of the functions. I've been trying to search for the place where they are defined but I can't seem to find it. I am trying to alter the sawed of double barrel shotgun and alter the attribute ConditionLowerChanceOneIn using this script but it errors out because I don't think that function exists:
local function alterSawnOffDoubleBarrelShotgun()
local item = ScriptManager.instance:getItem("Base.DoubleBarrelShotgunSawnoff")
if item then
item:setConditionLowerChanceOneIn(100)
end
end
Events.OnGameBoot.Add(alterSawnOffDoubleBarrelShotgun)
Do you know that you have 'tem' instead of 'item' in tem:setConditionLowerChanceOneIn(100)?
yes, sorry, it was because I copypasted and the line was commented and removed the i alltogether with "--" ๐ ๐
Try changing this line to item:DoParam(ConditionLowerChanceOneIn = 100)
It errors out
media/lua/client/Items/alter_sawn_off_double_barrel_shotgun.lua
ERROR: General , 1733497938621> ExceptionLogger.logException> Exception thrown se.krka.kahlua.vm.KahluaException: alter_sawn_off_double_barrel_shotgun.lua:4: ')' expected near = at LexState.lexerror
My bad, try this item:DoParam("ConditionLowerChanceOneIn = 100")
Oh yeah, this absolutely works. Thank you! I will use DoParam as a setter for attributes.
If anybody can help me out with acouple things before I release this mod of mine it would be a MASSIVE help..
1: How do I import custom sounds?
2: How do I create a custom crafting recipe for my weapon?
Is there any way to add new skintones? Asking because it's possible to add new hair colors to character creation.
Most mods adding new skins are realizing this by simply overwriting the vanilla skins. This would then not add new ones but only replace the vanilla ones.
Adding new skins without overwriting the vanilla ones is definitely possible but requires a lot of coding to make it work properly. So there is no easy way of doing this (at least no easy way I am aware of...)
thank you for the information! that explains why documentation isn't really there
Would you also happen to know a function call I could use as a getter? For example If I want to check if "ConditionLowerChanceOneIn" is nil or exists and its current value how would I get it?
Uh.. I don't know actually
anyone know if its possible to reinitiate animsets handlers or whatever java uses to load animsets
i would really love it if i could add and remove xml files without having to restart the game every god damn time
check out my "TheRising" mod
i have a code to force change textures for zed
but i dont have them defined to auto automatically show up on zeds using vanilla outfits
this is just an option for you if you want to do it this way but i would suggest that you still add it as outfits
note i added the texture not overwite
Is it possible to define clothingItem using model from another mod?
yes if you require the mod
then add another xml clothing item that uses that mods model
just note that you shouldnt just take from other mods
requiring them is ughhh required
thank you! your "TheRising" mod is one of the ones i really like, too, so it may be worth checking out the code
Last time I tried working with clothing it was painful.. I'll try again
And how do I set path to models from another mod?
should be the same as how you would if the model is there on your mod
basically everything is sorted and merged virtually
so your mod should still be able to access that as if the file is there
So.. Something like skinned/clothes/somemodelname?
same as what you do with vanilla
you dont need to copy the files
since you alreeady have access
yepf
Okay.... I hope there'll be no errors this time
btw for clothing mods (unless its a lua question) i would suggest asking #modeling as they should know more
Nah, I'm just trying to make compatibility between two mods
yeah if thats the case then require do mods and you should be good to go
Might write some documentation today for Pythoid, a Java mod that adds Python 2.7 support for modding PZ.
Okay, I still have this problem with tooltip and I don't know how to fix it
Like, it doesn't have wearable model, tooltip, and doesn't render 3d world model
How do I print messages in console.txt?
Hello does anyone know how many items are in the game?
guys can i write a mod code with chatgpt?
because i want to create a mod where sneaking reduces the zombies hearing distant (so that becomes a better option) and shooting atracts way more zombies.
i opened 2 windows with chatgbt and asked one of them to write the code so i can send it to the other one. the other thinks the code has methods the game doesent have and writes me a new one. now the first one says the same and so on
this is the current code:
if not getPlayer then
function getPlayer() return nil end
end
if not Events then
Events = {}
function Events.OnZombieUpdate() end
end
if not Events then
Events = {}
function Events.OnZombieUpdate()
return {
Add = function() end -- Dummy-Funktion
}
end
end
-- Zombie-Hรถrverhalten anpassen
local function AdjustZombieBehavior()
local world = getWorld() -- Ruft die Welt-Instanz ab
if world then
local zombies = world:getCell():getZombieList() -- Holt die Zombie-Liste
if zombies then
for i = 0, zombies:size() - 1 do
local zombie = zombies:get(i)
-- Wenn der Zombie existiert, passe das Verhalten an
if zombie and zombie:isUseless() == false then
-- Reagiere auf laute Gerรคusche
zombie:setTargetSoundRadius(zombie:getTargetSoundRadius() + 20)
-- Reduziere Sichtweite bei Schleichmodus
local player = getSpecificPlayer(0) or getPlayer() -- Fallback
if player then
if player:isSneaking() then
zombie:setSeeThroughAlpha(0.2) -- Schleichen macht schwer sichtbar
else
zombie:setSeeThroughAlpha(1) -- Normale Sicht
end
else
print("Kein Spieler gefunden!")
end
end
end
end
end
end
Events.OnZombieUpdate.Add(AdjustZombieBehavior)
you can view the methods defined on the class here https://projectzomboid.com/modding/zombie/scripting/objects/Item.html - in this case
getConditionLowerChance() looks suitable
This is basically useless
So the answer to your question is "no".
Yeah, ChatGPT is an assistant. In order to program something you need to fully understand what ChatGPT is saying, scrutinize it and basically call it out whenever it "fabricates" something.
More so with PZ stuff
But also the code provided is just very very wrong even for Lua standards lol
yeah this is the most insane code i've seen it output and it also does literally nothing you asked it to do
i'm guessing passing it back and forth between itself just caused it to amplify its own errors over and over
Pretty sure since it's making Events = {} it has even less context than normal
Hi! I am currently trying to help a user of my mod to fix a problem and the problem is really weird and confusing. They are playing multiplayer with +250 mods (not good... ๐ )
So, they get an error of the following form and it is apparently caused by one of my mods:
attempted index: Hair of non-table: null
Afaik, this error appears when you try to call a lua table with index "Hair" but the table doesn't exist. Thing is that the table absolutely exists in my code. It is hard coded in the shared folder and then accessed in the client folder via return-require. The code in client is the one which produces the error then.
I also tried to reproduce the error but it works completely fine for me (in single player as well as in multiplayer via host button). I also play-tested the stuff with a small selection of their mods (but not yet with all of them).
Has anyone an idea why the game cannot find those data although they are actually in the code? Is it somehow possible that mod conflicts can cause this behavior? I also thought there might be some strange load order issues going on but I cannot understand how those might happen since I use the return-require construction...
how is your shared file named? is it possible another mod would use the same filename?
the only effect mod order has on lua is that if multiple mods have a lua file with the same filename, only the one from the mod latest in the load order will actually run
also be sure there is no other error - an error in the execution of the shared file would cause it to return nil which would also cause this error
it is "[MyModsName]SharedData". so I guess it is unlikely that another mod uses the same name. but you never know ofc. in theory, this could be an explanation...
seems very unlikely
What do you guys do when your mod users report mysterious errors (in case that ever happens to you)?
Should also say that my mod is no way new. I published the 1st version 2 years ago and it seems to run quite stable for most people (there are some known incompatibilities though). Last update was a month ago but it only added a translation. There was a more technical update in October (I am therefore wondering if this is causing trouble to those specific users...).
if it's crazy and only happening to one person, i give them some basic mod support but otherwise basically just ignore it LOL
haha! think I am gonna do this too! XD
also you may be tempted to consider all undetailed reports that way and save enough time to actually improve your mods or make new ones. do not resist the temptation!
Does anybody know how to apply custom sounds to a firearm mod?
damn probably the worst ai generated pz code on
posted on this chat channel
also the mod you want to make isnt easy because you cant easily make zeds ignore you
there are several ways to do so but you have to do stuff to workaround certain limitations
like for example setting them useless will make em ignore you but then they will not move
or turning ghostmode but then players wont see you
you can set their target to nil but you have to spam it
theres no function to just tell a zed to ignore you
which means you cant easily modify its attraction to you
it seems to you that the idea is simple but to execute this mod project you will need alot more than just chat gpt so NO you cant use chat gpt to make a mod for you
is it your mod or someone elses?
if its your mod it via its item script
if its not you use scriptmanager doparam via lua
this is my own mod, I have been poking around for acouple minutes since that last post and I figured out how to implement sounds into it
HOWEVER
do you possibly know if having the gun play a random sound out of acouple different sounds is possible
?
cool glad you figured it out
yes but thats probably gona require lua
you can choose not to add sound to it then onweaponswing event play a random sound
you can name your audio the same name
youraudio_0
youraudio_1
youraudio_2
then just do
local audio ="youraudio_"..tostring(Zombrand(3))
ah I see! and I assume that If I have more then 3 sound files I can up that number and it will select one out of those?
I am not great with lua-
weird my codeblock didnt work
you would have to learn to do this
here is the directory, sound names, and what is written inside the lua file
"Sound_" but your file names don't have an underscore in them
also do not actually call them SoundX, that will make it very prone to conflicts from other mods
Gotcha! Here is the revised version with the improvements you have given me ^ ^
now- what do I set for my swing sound now that I've written this or is there more
this is the past setup:
Do I just set Swingsound to nothing, or is there more steps?
function DogZedMod.getBarkSfx()
return 'DogZed_Bark_'..tostring(ZombRand(1,7))
end
function DogZedMod.playSFX(zed, sfx, isAttract)
if not DogZedMod.isDogZed(zed) then return end
local range = 50
local pl = getPlayer(); if not pl then return end
if isClient() then
if DogZedMod.isClosestPl(pl, zed) or pl == zed then
local sq = zed:getSquare()
if sq then
local vol = DogZedMod.VolumeHandler(DogZedMod.checkDist(pl, zed), range)
getSoundManager():PlayWorldSound(tostring(sfx), sq, 0, 50, vol, false);
end
end
else
pl:playSoundLocal(sfx)
end
if luautils.stringStarts(sfx, "DogZed_Howl") then
pl:getStats():setPanic(100)
end
if SandboxVars.DogZedMod.HowlAttracts or isAttract then
addSound(zed, zed:getX(), zed:getY(), zed:getZ(), 50, 10);
end
end
this isnt exactly what you need but this is what i used for my zeds
you would have to comeup with something else
use onswing and then play the sound from a function like
what i did with DogZedMod.getBarkSfx()
thank you! this is so much help you don't even know
I didn't know those were your custom zed mods!
I love the psycho oneโฅ๏ธ
AWESOME! so it plays a random sound now!! I am working out the kinks right now so that it doesn't play when the gun is jammed or the gun is out of ammo
I can figure that out though
awesome! I'll come back later once its done with one last request! I appreciate all this help, thank you all so much!
Neat, seems like a pretty clever snippet! I appreciate your response, hope it didn't seem like I was trying to make you seem suspicious. Just wanted to learn a little more about what it was doing ๐
you could probably use onweaponhit event instead
then check if the weapon is your weapon
then do the sound function
always opt for itemscript over code. every person making code for no real reason is why PZ lag's all the time -_-
eh? doparams don't have a gameplay time performance impact, they just guarantee compatibility with updates and other mods for no real downside
the itemscript is right there i mean, its adding steps to a new modder's workload that isnt required
if you edit the item script, you are inherently incompatible with other mods that also edit that item script, and if the original script is changed in a mod update, your edit will still be based on the previous version
it's not difficult to do, has no meaningful performance impact and has several compatibility benefits
im quite used to avoiding code due to pz being, not great in 41, i do hope its better in 42
like albion said
using doparam is the only way to overwrite item script properly
code was, never something i was strong at in the early days of modding suprisingly
for a gun modder such as yourself you might find it useful to learn just a few of the gun related stuff
like firemodes or control the sprite to produce unique mods idk just sayin
i might be lightyears past that these days at worst..
not bad advice, but hasnt been applicable to me in a very... long time
gotcha well anyways if ever you comeup with an idea just ask and hoepfuly its feasible we can point you to the right direction and give you ideas of how to do it.
Peace and blessings be upon you and your loved ones. Does one need to pay for the Better FBX Importer?
What exacly you mean by "Better FBX importer"?
I wass hoping someone in Mod Development would know the thingy used in #modeling for porting models or something along those lines. I'm very new to modeling. I want to make clothes for Zomboid.
Blender is what you're looking for. Its Good and its free
However you will require to watch some tutorials to start doing anything in blender
I am using Blender. The FBX thingy apparently allows for the model pinned in modeling to be imported.
I'll just go back to that channel and hope someone responds.
im trying to improve the structure. is there a place to put my table besides hiding it in modData?
that really depends on what the table is/what it's used for ๐
just a table to look up values
it doesn't sound like it needs to be in mod data at all then
mod data is for saving data you might still need after a game restart, if it doesn't change there's no need for it
right, so im trying to look for a place to hold while event callback is still able to access it
why not just```lua
local myTable = {}
i tried, but the entire function is nil
this is frustrating i just learned that the mod doesnt work on MP now
first it works on MP not SP now its for SP not MP
how can i alter vanilla game textures like the flag for example and have it change for everyone in multiplayer
what do you need to affect tho
maybe put lua in shared folder?
override the texture as a mod, let the server use the mod to load it locally
the animsets?
thge lua files are the same for both mods only the xmls are changed
https://steamcommunity.com/sharedfiles/filedetails/?id=3380377270
feel free to test it out when it is public. thank you ๐
Quick question, is SoundRadius The distance Zombies can hear the sound, Or is it the distance Players can hear the sound?
Ay dumb question but i cant find it, is there some sort of documentation or API i can look at? Also i want to locally enhance a mod i downloaded from the workshop, is it enough to just edit the .lua files in steam/steamapps/workshop/content/108600/...?
mods are deployed from PZ's source storage locally,
mods in 108600, are the downloaded result, Meaning,
while you can edit them there, you will need to remake a shell template with all changes
in order to upload it to the WS
Im not looking to upload it, just for myself, its a small tweak and idk if the modder wants me to distribute so i was just going to keep it to myself
so then i can edit it in the 108600 folder right?
and i should be able to see the changed code after i reload lua or the whole game?
it should be placed on the workshop folder or mods folder otherwise it will just get updated everytime
its fine if its private afaik
to expand on that, if the mod updates your changes will be lost - it's a bad idea even if the mod doesn't get updates though because you won't be able to join servers using that mod
think he just wants to play SP tho
but thats good to note down
well even if you only want to edit the mod for singleplayer it might come up as a surprise annoyance later
Fair point, i only really play sp, feel like mp is too much of a learning curve i dont really have time for (i.e silent rules on etiquette lol). Thanks for the help though ๐
Is it feasible to write a script in which whenever a zombie/entity is struck, a png is applied on the entity and disappears after a few seconds?
I know this seems unusual, but I swear the payoff is enormous.
There is OnHitZombie event https://github.com/demiurgeQuantified/PZEventDoc/blob/develop/docs/Events.md#onhitzombie
you probably will have to put a timer in OnEveryMinute event to get the whole image disappearing after x seconds
or use OnTick if you want more precise timing or fade, but if you only need it to instantly disappear after >= 1 second, I'd use OnEveryMinute
idk how to draw sprites on screen tho
Workin on a lil somethin (no vanilla character creation, partly working in-server character creation/loading): https://i.gyazo.com/c0fc2618b05360bf9e9ed6aafebca758.mp4
Does one of you know for sure the nb of nails in a nail box ? My memory tells me there is 50 nails in a nailbox. but the code I read tells me 100 (20*5 as the item is created by group of 5).
@bronze yoke
great job with the repairable windows
i peeked at the github and saw wizardry
omg amazing stuff as always rj
noticed the outfit on the preview did not match the outfit when the p
char spawned . just a heads up incase you didnt notice
Thank you! Also yeah, I know lol. That's why I said partly working. Still a work in progress! ๐
but it seems no change to the file
If you uploaded mod, that means you had proper files in workshop folder in user/zomboid
And to update it, you change things on that folder where is mod that you did upload
Not in...i dont know, mods folder
mods folder in user/zomboid is for local mods, where workshop one is for uploading to steam, but will also work localy
yes, but the change didnt reflect somehow
Then maybe you did something wrong with said change
user/zomboid/workshop right?
EXACLY same folder that you uploaded to workshop
i was only fixing the sandbox variables names so it shouldnt break it (?)
I mean, i have no idea what you did so i can't tell. Also to test changes you don't need to update mod, you can always unsubscribe it from steam if you had it subbed and use local files, then if youre certain everything works, update it
nvm, something seems wrong on my understanding of some sanbox naming
You name them/translate them in lua>shared>translate>EN or other langauge>Sandbox_EN
yupyup, i might understand the relation between these files'
wait, it just didnt update. weird
is there a cooldown for uploading?
there are no cooldowns
but if the mod is being used by an online server the that would make em need to restart everytime you update
just something to keep in mind when updating
gocha
That's really cool
My brain feels like a bowl of mush. Thoughts all tangled in a rush. Too much coding, too much drink. Now I can barely even think.
Hey guys, anybody knows how to view getModData of each save? I currently print it on the console but was thinking there could be a better way for sure haha
what even is logic?
marker = addGridSquareMarker => getWorldMarkers():removeGridSquareMarker(marker)
it was all bad logic. one of these days I'll learn how to annotate
and maybe use more descriptive variable names
this is the way
using the print command while actual game is running, it will print stuff to your console.txt as well as to the debug window bottom left at your screen (assuming you are running the game in debug mode)
don't think that there are any better ways to print stuff or seeing what is currently contained in the modData
vanilla debug allows to see global mod data. TchernoLib mod gives the same function for players mod data (in debug mod, still). For items mod data, there is nothing afaik https://steamuserimages-a.akamaihd.net/ugc/2478739569991162660/00C2A1DB5BD4F93F6119D2220EF6E1E1EF05DDE1/?imw=637&imh=358&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=true
Community Modding Debug Tools lets you inspect item mod data but it has to be in your inventory or in the world
yeah but like, for SP tho....? >:)
Nah this is going to be for a roleplay community
Thank you so much guys @small topaz, @mellow frigate and @queen oasis
I will check TchernoLib, wasn't aware that it existed
its for a specific roleplay server
he didnt make it for public use
(replied without reading, already answered lol)
https://steamcommunity.com/sharedfiles/filedetails/?id=3381189357
pumping out more animal crossing mods! Here's squirrels
Spend about 6ish hours to automate a couple of things that doesn't really take much time to begin with? Done did it.
https://steamcommunity.com/sharedfiles/filedetails/?id=3381181930
I have a question about Azakaela's NoteMaker / generator, does anyone use it ?
I think I followed the instructions, and didn't modify the size of the given template.
Zombies are spawning my notes like expected, but reading them opens a blank square..
I feels something is wrong with the boarders or scalling, like ia zoomed image?
Is there something I could be missing with my overlayPNG ?
Thank you for your help and sorry if it has been answered here previously.
neat. reminds me of the corpse auto move mod. idk if you've seen it https://steamcommunity.com/sharedfiles/filedetails/?id=3158132115&searchtext=move+bod
you're talking about Azakaela's Survivor Notes? thats kind of an old mod that appears to not work anymore
The modding tools available here
https://steamcommunity.com/sharedfiles/filedetails/?id=2998120058&searchtext=azakaela+tools
But it might've been the base of Survivor Notes... so I guess this method is old too
Well after more testing and reading, I got it to work ! I've found @marble folio 's post regarding a similar issue.
Azakaela's program almost worked, just needed to work a bit on this line
mapAPI:setBoundsInSquares(x, y, x + texture:getWidth() * scale, y + texture:getHeight() * scale)
and overlayPNG line
Thank you both ๐
The framework (called FrameworkZ) will actually be available to the public once it's in beta
hey ๐
Happy it was of use for you!
Gotta get back to that guide project someday, but yeah it was a PAIN to figure it out lol
am i missing or wrong (i got it now)
can anybody tell me how can I make on my server Louisville only pvp? I've been trying to figure it out and it seems like https://steamcommunity.com/sharedfiles/filedetails/?id=2939521600&searchtext=pvp+zone is not really working well for me
hello
can someone reccomend a modding tutorial for the game I want to try and make a mod
No background knowledge on programming but oh well
If you know a tutorial you can recommend give it to me I will search for tutorial for now
hello
This guy explains the basics pretty well and also how to debug: https://www.youtube.com/watch?v=ikRcbRHc45k&t=4307s&pp=ygUOcHogbW9kZGluZyBsdWE%3D
Learn to write your own mods for Project Zomboid build 41! Make it multiplayer ready from the start!
Some Resources:
For Items and Recipes
https://theindiestone.com/forums/index.php?/topic/15188-item-and-recipe-script-variables-brief-description/
LUA Event List
https://pzwiki.net/wiki/Modding:Lua_Events
IsoPlayer
https://projectzomboid.com/m...
i added my mod in workshop but it says there is no content/folder
its a template from this i copied https://steamcommunity.com/sharedfiles/filedetails/?id=2933186564&searchtext=flag+mod
Use the same structure as the ModTemplate in your Workshop foler
Can someone tell me what I did wrong with my mod
Because it is not working
Lemme find the files rq
shared with file.io - super simple file sharing
Why do these websites suck? Why would they make you download it instead of just viewing it
upload to a google drive
it will let you view folder structure if you really care
or preferably use github
Had a look at your file, your poster has 2 .png extensions.
among other things
you just have file extension issue, you need to turn on display file name extensions
in "File Explorer Options" view tab
Does that break it
yes
fuck
file extensions need to be correct
also you have a 2k res texture as a jpeg btw
Is that baddd
Which one needs to stay
if anyone cares, zip with texture removed
just in case the website is too sketchy for some reason even though its a legit website
any
it just needs .png extension
poster.png
same with other files that you messed the extension up for
I fixed extensions
for example, Hat_MicahRDR.xml.txt needs to have only .xml like Hat_MicahRDR.xml
hello, i am hoping someone in here can help me with the last steps of a soundtrack mod if you have experience with fmod or fmod bank tools.
i have all the music swapped over, the names are all matching, right format, they are the correct song length and the songs are ready to go back into a bank file, all of the songs together even managed to stay the same file size. but when i hit "build" fmod bank tools 1.6 gets stuck in an infinite loop and doesnt actually do anything. I tried extracting the vanilla file and rebuilding it without touching anything and fmod bank tools still couldnt build the .bank file. For any soundtrack mod people how do you get it to rebuild the .bank file? I have been using sokolov's "Change Zomboid's in-game music and sound effects." steamcommunity guide and it has gotten me through without issue until now. any help would be greatly appreciated. i have had no problems extracting the .bank files into seperate .wav songs
Make sure the format is 16-bit wav (as in wav with bit depth of 16) with a sample rate matching the original files in the bank (if you can't find it or don't know, 44.1 kHz or 48 kHz is usually it)
other than that idk really
oooh i should add this to mod resources
This is specifically for banks, I assume the game doesn't except 32-bit wav either (or anything above 48 kHz) but I surprise myself every time
Hello a basic question:
Is this better using getSpecificPlayer() instead getPlayer() for future compatibility if i can??
I recently joinned on PZ modding, and I had used both for my works, however i'm getting worry about MP compatibility in these days. I've never played MP and I'm not planning to play MP tho but you know good is good.
getPlayer() essentially does getSpecificPlayer(0). getSpecificPlayer is used for splitscreen mode, not exclusive to multiplayer. If you do not care about splitscreen (probably 90% of people do not) then you can just use getPlayer.
thank you ๐ because it was hard to say "sorry, I don't know, I can't confirm about MP." always when someone asking.
And there can be up to 4 players for splitscreen, so getSpecificPlayer(screenNum) basically
Hello, wondering if anyone knows how to use drawRect(). Tried using it to draw a rectangle on screen, but the script errors and lets me know drawRect is nil. Do I have to import any thing into the script? Like this?
Base
}```
I don't think you have to import something like that in lua. about drawReact, sorry I'm not friendly with UI..
how do i make a trait that's like organised but better so u get a lot more weight capacity
just a lil bit more than organised
InfiniteWeightCarry = {}
InfiniteWeightCarry.DoTraits = function()
local InfiniteWeight = TraitFactory.addTrait("InfiniteWeight", getText("UI_trait_InfiniteWeightCarry"), 0, getText("UI_trait_InfiniteWeightCarrydesc"), true );
TraitFactory.sortList();
local traitList = TraitFactory.getTraits()
for i = 1, traitList:size() do
local trait = traitList:get(i - 1)
BaseGameCharacterDetails.SetTraitDescription(trait)
end
end
Events.OnGameBoot.Add(InfiniteWeightCarry.DoTraits);
this is what i have
i dunno how to change players weightr
capacity
oh organised does not change the default weight capacity?
afaik, drawRect() should be applied to an appropriate self coming from some UI object like ISPanel. See vanilla code in client/ISUI/ISToolTipInv.lua for examples. (There are probably a lot of other examples in the vanilla code.)
thanks guys for the help and tips
have you tried "setCapacity()"? see here: https://projectzomboid.com/modding/zombie/inventory/types/InventoryContainer.html#getCapacity()
declaration: package: zombie.inventory.types, class: InventoryContainer
no guarantee that this will do what you need but maybe worth a try?? the similar command "getCapacity()" actually returns the capacity of an inventory, so "setCapacity()" might be related...
can anyone help me? it appear that the shirt is diffence from each other but it get the same texture on the shirt
then you have pbbly given them the same texture. it is possible that different clothing items have the same texture.
look the same but not the same
you may check the clothing item's xml files since the actual textures for the items are defined there
maybe that both xmls link to the same texture
that doesn't look like the clothing item's xml. xml for the clothing item should look like this:
m_BaseTextures links to the actual textures
only need male?
here bro
then you might have created one and the same texture for TShirt_KDMV and TShirt_2KDMG??
ah wait... they both have the same GUID number. this could lead to weird behavior
each clothing item should have its own unique GUID number! you also have to make a correct entries in the file GUID table
typically, most problems of the type you describe are caused by setting up your files, guid numbers and/or naming conventions incorrectly. just double check everything until everything is correct
still the same.
can we both talk and i share my screen so you know what wrong with it
won't be able to help you more. sorry. you just have to debug your stuff
For guid numbers, I would always use the same format as the numbers in the vanilla game btw
btw, this might be helpful in case you don't use it already: https://guidgenerator.com/
Free Online GUID / UUID Generator
you could check any clothing mod on steam. also could check the vanilla game files
in your example, the two items still have the same guid btw... (maybe you changed already...)
Did you give one shirt unique guid that is different than the other shirt?
already did
If yes, did you apply correct guids to guidtable too?
this?
oh when froget to mention when i use import base it missing
it working guy
thank you shit driving me crazy
GUID thing. i change it all jesus
getSpecificPlayer(0):setMaxWeightBase(int)
do getMaxWeightBase() to find your current value, its not linear
InfiniteWeightCarry = {}
InfiniteWeightCarry.DoTraits = function()
local InfiniteWeight = TraitFactory.addTrait("InfiniteWeight", getText("UI_trait_InfiniteWeightCarry"), -1, getText("UI_trait_InfiniteWeightCarrydesc"), false );
InfiniteWeight:setMaxWeightBase(int)
TraitFactory.sortList();
local traitList = TraitFactory.getTraits()
for i = 1, traitList:size() do
local trait = traitList:get(i - 1)
BaseGameCharacterDetails.SetTraitDescription(trait)
end
end
Events.OnGameBoot.Add(InfiniteWeightCarry.DoTraits);
so somthing like this?
you must also tell the game that the player has more inventory capacity in case they choose the trait. don't think your code will do this
oh how do i do that
you could try using lua events when the game starts like OnNewGame (when a new game starts) or OnGameStart (when new game starts or when game is loaded). You may have to try a bit to check which event is appropriate for your purpose.
see here for more info on lua events: https://pzwiki.net/wiki/Category:Current_Lua_Events
Hello comrades! How to add your mod in Project Zomboid workshop? Thanks for answer!
Hey @flat robin, I would recommend checking on youtube, just type "lua modding project zomboid" at the end of every video, they upload the mod
Hey guys, quick question, I want to create a mod extension for an existing mod that uses local functions Kill Milestones (Zombies) instead of completely re-writing the existing logic, is there a way to utilize the author's local functions?
no
oh rip then
I'm trying to write those characters in chat from code: 'ฦ', 'ยข', 'ยค', 'ยฅ', 'ยง', 'ยฌ', 'ยฐ', 'ยถ', 'ร', 'รธ', 'รพ'
They are printable when copy/pasted in the chat but I get ? instead when printing them from Lua.
I am guessing this is a charset issue. Any idea how to do this?
If it's local function then it will be hard. i've never tried also. but i heard that it's not impossible.
Aww man I don't wanna be that guy that republish an entire mod just to add few features in a outdated/not maintained mod :/
yeah I fully understood of that ๐ฅฒ
I found a way
LanguageManager.UnknownCharacters = {
-- 'ฦ', 'ยข', 'ยค', 'ยฅ', 'ยง', 'ยฌ', 'ยฐ', 'ยถ', 'ร', 'รธ', 'รพ'
0x83, 0xA2, 0xA4, 0xA5, 0xA7, 0xAC, 0xB0, 0xD7, 0xF8, 0xFE,
}
local newUnknownCharacters = {}
for _, c in pairs(LanguageManager.UnknownCharacters) do
local newChar = string.char(c)
table.insert(newUnknownCharacters, newChar)
end
LanguageManager.UnknownCharacters = newUnknownCharacters
(yes I could write the number directly...)
(alright, fixed)
I'm an animal crossing machine
https://steamcommunity.com/sharedfiles/filedetails/?id=3382295489
why not just turn on unlimited carry cheat
same thing when i had a project that involved korean characters
you can require the OG mod as dependency to your mod
i figured out how to get the zomboid soundtrack compiled! all the settings were correct, its just that fmod bank tools 1.6 doesnt work with bank files that have too many songs. a unrelated fmod forum for a different game suggested 1.4 for larger .bank files and it worked. I can hear the songs ingame, just need to boost certain ones before a final version is uploaded
if anyone could point me in the right direction on how to get an edited body model working in the game that would be awesome.
What a weird issue
If anyone knows of a better way to pack game files if FMOD even provides a good compression benefit lmk
outside of zomboid scope specifically
has anybody made a mod with different smoke colors?
I've looked around and can't seem to see anything, I have something in wip but I might just give up lol
@grizzled fulcrum i would just recommend fmod bank tools 1.4 for soundtrack stuff over 1.6
i would expect fmod to use pretty competent compression since it's so widely used (and even if it didn't compress sounds at all it'd still naturally result in smaller file sizes than loose files just because of how disks work) but either way the decision to use fmod isn't really based on how well it happens to compress sounds, it's the sound engine
I can understand if you put all your long music tracks in there, but sound affects too?
unleess I am mistaken
I don't think it's worth it to trade the CPU time for slightly less memory
no, actually it benefits smallest files the most
disks are basically split into chunks and a file can't take up a non-integer amount of chunks so one big file is generally a lot more efficient than many loose files as most files won't align to the size of a chunk exactly
edited body model? not sure about overwriting but you can add models
refer to any zombie mods i have
each file can only waste (most of) 1 chunk so less files inherently wastes less space
yes but I am specifically talking about decompression time
You probably save a couple of megabytes to a gigabyte at most, just to lose that efficiency to cpu time
especially when storage for a gigabyte or so doesn't cost nearly as much as it used to
I can't speak on how much storage it really sves though because I don't know how much compression it does
considering audio files are nearly compressed already (mp3, ogg) I dont see the point
this itself doesn't cost anything whatsoever
there isn't a meaningful gap in cost between 'look in this file and read it' and 'look x bytes into this big file and read it'
hmm turns out their decompression time isn't that much anyway?
compression
I am talking about
when you compress something, to use it you have to decompress it
now I was wrong because according to FMOD it's not that much cpu time at all but I only just knew about that
i don't really know what kind of compression fmod uses but i'd assume it's pretty adequate given that it's so widespread in the industry
audio is like 90% of the disk size of most games so i'm sure compression is a persistent issue to them and that they weigh these things carefully
and then you have workshop mods taking up 20gb for a couple music tracks and there's nothing we can do about it ๐ญ"
zomboid definitely doesn't have any performance issues related to decompression (it noticeably could use some actual streaming for long sounds but vanilla doesn't use long sounds so it makes sense there isn't support for it)
also, how are loose files (like files in mods) played if they aren't in banks?
Unless they use FMOD core since I (think) that you dontn eed banks for core, only FMOD studio
it is fmod directly playing them, and i believe loading them too, but i wouldn't know the specific implications like that
i haven't worked with fmod itself but i've looked around some of zomboid's sound code and that's how i remember it going
I'd imagine the only delays are just the loading time for audio streams which is extremely low
and then why not just use that method for audio files in vanilla too? i dont get it
definitely not my field though, I've never really touched FMOD
All the previous games I've looked into must have their own simple like audio engine or something
i've only worked with openal and it feels dishonest to even compare that to fmod ๐
i do know that fmod banks aren't just like, raw audio storage, they contain some fmod specific concepts and formatting and stuff
i'm not sure they can easily use loose audio files within the sound engine, and if they can it must certainly be a lot more annoying and might lack functionality they need
all we can really do with loose files is 'play a clip of audio' with no extra complexity
but i don't know exactly how much of that is because they're not in banks and how much of that is because luaside we have a very limited sound api to start with
as i understand it most of that stuff is done with fmod to begin with and it's just the game's job to trigger things and set variables and such
ok I will have to come back to that
but it seems fmod has no problem playing files loosely anyway so its not that big of a problem
anyone have experience with the file reader/writer? I just want to know how to get it to work outside of zomboid/lua
you can't really
as far as I know
there are some specific functions that write to certain folders like write Log iirc and it writes to a log file in Logs but isk anything else
Thanks you sir!
there's mod file writers to write directly to mod directories if that's what you want to do
but you can't freely write anywhere unfortunately, it'd be a security risk
Are you referring to require=ModName?
This is what I'm doing already but that doesn't make the local functions accessible :/
I need to re-write the logic and add a "side-effect"
Like if the original mod adds player.modData X
I need to check if X is added then add my side effect
yesh thats something hard to deal with you have no choice but to overwrite. try contacting the mod author and see if you can request him turning the function into global
you can sometimes do cheesy stuff by hooking functions the local function calls
Yes that's a solution
depends on the lua file actually and what youre trying to do
I have no idea how this works (I'm new to LUA but have typescript/javascript background)
also, if the local function is added to an event, you can actually get a reference to it through that
how
ahh by removing it
and initiate your version instea
make your file load earlier, hook Events.EventName.Add to save the function reference somewhere, and then require the file
they said they are new to lua
i'm just explaining it to you, don't know yet if that'd actually even help here
So in this case, the child mod is going to be loaded before the parent mod but in mod.info will have require=ParentMod ?
oh, no, sorry, load order doesn't affect the order in which lua files run whatsoever
they just load alphabetically, lua has a require() function which forces a file to load (if it hasn't already) and returns any values it returned
so in this case you'd make your file alphabetically earlier so it loads first, then mess with the functions it's going to call, and then require the file to make it run
but that's assuming the function you want is added to an event
Oh wow that's very interesting, I really appreciate you taking the time to explain all this!!
Since I'm kinda new to this, can you refer me to any article that explains this or even a mod you made that does this, I can subscribe and study the files
i'm not sure i've actually published anything doing this and documentation is very sparse ๐
Or at this point it's too messy it would even be better to either contact author to make functions public or just copy/past the entire existing logic and extend from it (which means that the mod author can reclaim the new mod any time)
I'm not sure if there are any policy regarding mod extension, like if you don't have time to maintain (fix bugs) in your mod, is it okay if others do it for you and then you can include the changes in the original mod?
Also lot of mods are not in github so it's very hard to open pull requests
the game's modding policy outlines that it is okay by default to extend mods that are clearly abandoned (i think an attempt to contact the author first is encouraged), but not if they've expressed somewhere that they don't want anyone doing anything to their mod or if they gave a license that forbids it
I see! thanks again for your support, really appreciated especially with the lack of resources haha
Is it possible to make new line in sandbox tooltips? "\n" didn't work, so idk..
try <br> and <BR>
the difference being <BR> creates a larger gap between lines than <br> does
worked, thx
Where should I start to learn how to mod Zomboid? I want to make a GOOD first aid overhaul and maybe some map mods at some point
I think you may be thinking of <LINE> vs. <BR>, unless I'm mistakenโI don't remember this distinction being a thing
i think <LINE> literally draws a line between the two lines
There are a few guides out there & some resources are pinned, but generally just checking out how other mods do things is a good way to learn
Nah, that one does do a newline; that's what the chat uses
I'm unsure there's a horizontal rule one
if i remember right <br> is part of the translation system and just gets replaced with a \n and <BR> is part of the text renderer
Ohh, that makes sense. I was thinking of just the code that handles the latter
well i'll double check anyway
i've learned how easy it is to be 100% sure of something you completely made up so i never trust myself too much
Definitely been there ๐ but you could swear it's real when it happens
The translations handling <br> thing does sound familiar though
yeah, from Translator.getTextInternal:```java
if (translated.contains("<br>")) {
return translated.replaceAll("<br>", "\n");
My evil plan to put entire html documents in PZ strings, foiled again
Hello, does anyone know how I can make the sandbox configurations of my mod remain when I exit the game? Because when I go back in my weapon spawns again even though I have already deactivated it from the sandbox option.
i did this and it stops appearing but when I leave and enter it spawns again
-- Thompson
if SandboxVars.MHFirearms.BaseThompson_Enable == true then
table.insert(ProceduralDistributions.list.GunStoreDisplayCase.items, "Thompson");
table.insert(ProceduralDistributions.list.GunStoreDisplayCase.items, 0.1);
table.insert(ProceduralDistributions.list.FirearmWeapons.items, "Thompson");
table.insert(ProceduralDistributions.list.FirearmWeapons.items, 0.1);
table.insert(ProceduralDistributions.list.PawnShopGunsSpecial.items, "Thompson");
table.insert(ProceduralDistributions.list.PawnShopGunsSpecial.items, 1);
end
add your distributions during the OnInitGlobalModData event, and call ItemPickerJava.Parse() when you've finished editing them
e.g.```lua
local addSandboxDistributions = function()
if SandboxVars.MHFirearms.BaseThompson_Enable == true then
table.insert(ProceduralDistributions.list.GunStoreDisplayCase.items, "Thompson");
table.insert(ProceduralDistributions.list.GunStoreDisplayCase.items, 0.1);
table.insert(ProceduralDistributions.list.FirearmWeapons.items, "Thompson");
table.insert(ProceduralDistributions.list.FirearmWeapons.items, 0.1);
table.insert(ProceduralDistributions.list.PawnShopGunsSpecial.items, "Thompson");
table.insert(ProceduralDistributions.list.PawnShopGunsSpecial.items, 1);
end
ItemPickerJava.Parse()
end
Events.OnInitGlobalModData.Add(addSandboxDistributions)
Okok thanks a lot, if I have more weapons to add, should I do the same with each one?
I want to do is have the players activate or deactivate the weapons that they like the most, or don't want, that's why I made the sandbox vars with each one.
thats what id like to do. i really just want to write script files and have the game read it. can i feed the file to script manager?
yeah, you can do them all in this one function and just call ItemPickerJava.Parse() once at the end
local addSandboxDistributions1 = function()
if SandboxVars.MHFirearms.BaseThompson_Enable == true then
table.insert(ProceduralDistributions.list.GunStoreDisplayCase.items, "Thompson");
table.insert(ProceduralDistributions.list.GunStoreDisplayCase.items, 0.1);
table.insert(ProceduralDistributions.list.FirearmWeapons.items, "Thompson");
table.insert(ProceduralDistributions.list.FirearmWeapons.items, 0.1);
table.insert(ProceduralDistributions.list.PawnShopGunsSpecial.items, "Thompson");
table.insert(ProceduralDistributions.list.PawnShopGunsSpecial.items, 1);
if SandboxVars.MHFirearms.BaseFNP90_Enable == true then
table.insert(ProceduralDistributions.list.FirearmWeapons.items, "FN_P90");
table.insert(ProceduralDistributions.list.FirearmWeapons.items, 0.1);
table.insert(ProceduralDistributions.list.ArmyStorageGuns.items, "FN_P90");
table.insert(ProceduralDistributions.list.ArmyStorageGuns.items, 0.9);
table.insert(ProceduralDistributions.list.PoliceStorageGuns.items, "FN_P90");
table.insert(ProceduralDistributions.list.PoliceStorageGuns.items, 1);
table.insert(ProceduralDistributions.list.GarageFirearms.items, "FN_P90");
table.insert(ProceduralDistributions.list.GarageFirearms.items, 0.6);
end
local addSandboxDistributions2 = function()
if SandboxVars.MHFirearms.BaseFNP90_Enable == true then
table.insert(ProceduralDistributions.list.FirearmWeapons.items, "FN_P90");
table.insert(ProceduralDistributions.list.FirearmWeapons.items, 0.1);
table.insert(ProceduralDistributions.list.ArmyStorageGuns.items, "FN_P90");
table.insert(ProceduralDistributions.list.ArmyStorageGuns.items, 0.9);
table.insert(ProceduralDistributions.list.PoliceStorageGuns.items, "FN_P90");
table.insert(ProceduralDistributions.list.PoliceStorageGuns.items, 1);
table.insert(ProceduralDistributions.list.GarageFirearms.items, "FN_P90");
table.insert(ProceduralDistributions.list.GarageFirearms.items, 0.6);
end
ItemPickerJava.Parse()
end
Events.OnInitGlobalModData.Add(SandboxDistributions1)
Events.OnInitGlobalModData.Add(SandboxDistributions2)
like this?
you might want ScriptManager.instance:ParseScript(totalFile) instead, actually writing script files is problematic as they're checksummed
sorry for so many questions jaja
that should work but you can just do it all in one one big function instead of having SandboxDistributions1 and SandboxDistributions2
i was attempting that. does it take in a string or just the file path? is the path then in the zomboid lua?
the argument would be the full text of a script file
thanks a bunch 
need a advice. what best lua book, or your better way to learn this language specifically for this game
from scratch with no experience
The phrasing of learning the language โspecifically for this gameโ makes it sound to me like you're looking for more of a modding guide than a language guide. I don't know how to judge those too well, but there are many. But for learning the basics of the Lua language, Programming in Lua is what I'd typically recommend. The first edition, available online for free, is written for 5.0; PZ uses Kahlua, which is similar to 5.1
Of course, you'll need to disregard some things here, like basically everything about coroutines and io. For basic language features though, it's plenty. See also: https://learnxinyminutes.com/lua/
I just ran out of my Jameson so morale is low.
The Jameson shortage will continue until morale improves 
actually, coroutines are available and work fine - i hope you didn't get that from me because i used to say they didn't a lot ๐
I haven't ever had the need to use them, so I think I just said it based on that lol
I suppose it's not a need to disregard in the same way io is, though
they aren't spectacularly useful, no
thank you exhaustively, in bold text i wanted to give you understand that i am interested learn only for the sake of creating mods for PZ, versions and their differences this that puzzled me, but you made it clear
so the game is made in java, but all scripts work in lua through kahlua? and i don't need any experience with java at all, right?
fun SpriteRenderer$RingBuffer.next> Buffer overrun..
Oh, Hello!
Correct, you can mod without knowing Java. It's helpful if you want to dig around in the decompiled game code to understand how things work, or if you need to get into some advanced things that can't be done via Lua. But for most purposes, Lua and script files (domain-specific format for the game that you'll come across) work just fine
Question, how hard is it to make both models and textures for an Anthro Survivor Mod?
(Edited) I seen an Anthro Jolteon and Sylveon in the workshop and wondered how to make an Eevee one
can i make changes to a game code? more precisely, are there any pitfalls in this? to be specific, I remember Aiteron helped to implement something for my friend's mod on scripting part, but there was a problem that it was hardcoded in engine
Hello lua fluent people (and you: End Game Boss) How do I distinguish false from nil in lua ?
just do var == false or var == nil
false ~= nil
``` returns true ?
yeah
Thank you EGB ! 
i think you need to watch something like a "ps1 character in blender" to understand how hard, because PZ style is very similar to this thing
Hello is there any guide for timed action?
I want to do some more of fine tune(?) my work.
this is what I've made, "just reload no matter mag type blah blah"
it's actually functional without any error but you know, it's not enough to me. ๐คฃ I want a perfect.
Java mods are a thing you can do, if that's what you mean. You can also sometimes get away with patching stuff from Lua, if it's only called Lua-side
Using just Lua is preferable & what most do, though, for many reasons
and anything originally implemented in lua should be editable pretty easily (which is a surprising amount of the game)
I'm not sure what you're trying to do exactly but you could prob dig through ISReloadWeaponAction.lua
Yummy. More people wanting to Java mod.
Join the crew.
thank you I will look into later ๐
it's about ISInsertMagazine.lua and what I want to do is : force stop and force re-start timedAction while action is on going. I was looking for re-start the action.
anyway I've got an idea just now ๐ I think I will make it
It worked, thanks a lot
๐
Hello!
I love this game and I want to take a jab at modding. I have some modding experience in JSON and Lua, but it's for an entirely 2d game...
First question though. "50% inventory transferring time", I'm trying to get a better understanding of how traits work in the game. Does 0% imply instant transferring time, and 100% means longer transferring time? Just so I'm getting this right? And do the percentages cap at 100%?
If 0 is instant and 100 is delayed, is that how every trait with a percentage works? Or can it be "backwards" sometimes?
50% transferring time means if a sledge hammer takes 6 seconds, it will be 3 seconds
how can i make something happen in like a time interval between the everyoneminute funcion and the ontick
OnTick is like too much but EveryOneMinute is slow
then, fire your function only at every 10 ticks or something like that.
yeah i will try something like that
good luck ๐
i've never used OnTick event so i don't know what is okay value tho..
good point
i will test it here
i want to make the zombies bleed
like everytime
just keep bleeding
keep in mind ontick doesn't take a set amount of real time so timing by ticks shouldn't be used for things that are meant to take a constant amount of time
it will work but the timing will vary based on lag and the user's framerate limit and settings
yep, not the ideal
that's why i don't use ontick and everyoneminute ๐คฃ
fair enough
if you want to do something a fixed amount of real time you can add getUnmoddedMultiplier() to a counter every tick until it exceeds a certain value
thx
i will keep testing things here
i'm kinda new to this so i will try things until they work idk
Hello, I've been messing around trying to add my own guns to the game and last night I got my glock to appear in game, but today I've treid the same with a double barrel shotgun and I get this error when opening the item list in the debug menu
that is the script
error doesn't happen without the double barrel
MinAngle the ,
hope it works
there is this bleeding animation from the character when it's really hurt/bleeding a lot
is there any way i can like find it inside the game files and add it to the zombies or it just doesn't work that way?
will this also lower performance by the way?
local tick = 0
tick = tick + 1
end
Events.OnTick.Add(blahblah)
I mean, this function does nothing but only counts every tick.
I know if there's something like print or actual function then will cause performance issue. but since it does something only with Var..
I always try to make something performance-friendly. I always test my mod with my old laptop at the last moment.
I tried using something like that and it caused low framerate but I was spawning blood splats every 0,2 seconds so that was probably the issue
I am also doing this through an old laptop because I actually have a good pc but the game hilariously runs quite similarly on both machines
btw it did not work, but would have been a problem either way so
not in any meaningful way
i would point out this function does nothing as local tick = 0 is defined within the function but i'm pretty sure that's just a typo
yep i understood what you mean. never thought detaily. ๐ ๐
you'll often hear the advice to avoid ontick because it causes performance issues, it's good advice to avoid it because if you do heavy stuff ontick it will cause performance issues, but it's not on its own actually going to cause problems
it was curiosity between lua and game engine (?) sorry hard to explain in English. hope you understand what i mean.
I just wanted to know better about performance thing. so i will be able to avoid clearly later.
I should point out that stuff like OnEveryMinute and OnEveryHour exist. Some people don't even know that and they use OnTick to count the amount of minutes. I always abstract the timing to one of those higher events if its not absolutely necessary to run every tick and its proved quite good for my use cases.
Bit of an old post i just realised xd
I'm far too paranoid about the one player out there that has the timescale set to real time, so I only use those for arbitrary โrun every once in a whileโ things (like clearing old cache items)
Or if I'm actually concerned with the ingame time, of course
guys, is there something wrong with this line in particular? "self.character:setPerkLevel(randomPerk, currentLevel + 1)"
I'm trying to give an level to the player but it just breaks
I've tried manually giving them the necessary XP to get them to the next level and it worked fine
there is no such function setPerkLevel
use setPerkLevelDebug
I have a question that may sound dumb, but, does it work even if you have no debug activated?
hold on, I'mma test real quick
ty
it worked
now I just have to fix the logic behind it since it can't level you up if you don't already have at least 1 level on that skill
Hi! Does anyone know when exactly the event OnPlayerUpdate is called? I did some tests and for me, it seems that it is simply called all the time. Was the same as OnTick for me...
it is the same as ontick
it fires every time a player object updates, which is generally every tick as along as the player is alive and such
thx!
@bronze yoke doing god's work on this discord channel
yeah! how does it happen that you know so much about the PZ code?
i've just been modding for a long time, nothing special
zomboid lua lowkey looks easier than roblox lua
I love making FrameworkZ (even frameworks in general), it let's me make code like this: https://i.gyazo.com/44577e6fe9055449ee728fb62f9fb905.png
Just don't look at my save function... It's not ready yet ๐ณ
We need more Lua developers that writes API with callback functions.
I gotta show you my framework sometime, this thing is intense. It's not anywhere near where I want it to be yet but it's getting there. It'll do some pretty cool things in Project Zomboid
Curious about the formatting of these doc commentsโare you using a plugin that reads that format?
Yeah wtf
Jinx
@frank elbow @bronze yoke @red tiger It's Doxygen with a custom Lua script for reading that kinda syntax to generate HTML files, the plan is to host a website at some point once I release FrameworkZ to the public for developers to reference
Is the custom Lua script yours? I've had it in the back of my mind to do something similar for LuaCATS annotations (not with Doxygen specifically, but if it's working out for you I'll have to look into it)
i think luacats has some built in thing for exporting the annotations to some other format (i *think* web?) but i never really paid attention to it
Nah, I found a half working one that I patched up. This is what the output looks like (I haven't generated new docs in awhile tho): https://i.gyazo.com/4f69959c68622667ae10a4829d9a3750.png
While cool, I'm not sure I'd like to have to open up PZ to read PZ mod documentation lol
so the json wouldn't even be a good intermediate format to generate html from?
Niceโif you still know where it's at I'd love to take a look
It'd be possible, but the json is missing some information and has some weird formatting issues. Some have been fixedโI wrote an issue for at least one that I believe has since been addressed (maybe?)โbut overall it's wonky
I have the working files still, however IDK how I got it working lol
what a shame
I could write a HTML renderer for LuaCATS annotations too.
I will convert everyone here to using VSCode one day.
VSCode is awesome
It wouldn't be hard to actually write a JavaDocs-like solution for LuaCATS.
There's many good AST parser libraries for Lua.
I used Notepad++ for far too long, I only use it for the search function at this point and quick edits
i generally prefer other ides but i haven't found any ide that supports lua nearly as well
I figured it'd be more straightforward to convert to an intermediate format like RJ described, simply due to how much existing tooling there is for this sort of thing
Something entirely custom would be neat too
They're for like programmers who used vacuum tubes.
in my mind it should be quite easy to parse, i wonder why the official implementation chokes up so much
I haven't looked at the code to confirm but I think it's mostly just spitting out partial info from what it already has for language server purposes
- The year is 1944
- The British successfully crack the ENIGMA code because it was published on GitHub and has JavaDocs.
Meaning, among other oddities, if you run it while referencing other projects you get all the information from other stuff (so, run it with Umbrella and you get an output with every type from it)
My M1 Garand ran out of RAM ๐ฆ
yeah, i guess that makes sense, i was thinking from the perspective of parsing a file but of course they don't actually do that
I am a document-aholic.
I literally write tools exactly like these so I mean the door is open for discusson.
My goal here in PZ is to help people code better and know what they're coding sooooo yeah.
That's why Umbrella exists. =D
On a different topic, I made a hook system. You can tie it into PZ's events or any which way you'd like: https://i.gyazo.com/a74ce70056ecf26d1d90c1143129d0b0.png
I needed a way for the framework to interact with the plugin system I got planned, so I made that. It's also kind of convenient to have everything flow through the framework (although not super efficient I know)
MMM I really like this thing you're describing.
I have a plugin framework as well from 2017 if you want to take a look at it.
Sure
Sec
old code but also attempted to be a plugin-based framework. It took code sent from the server machine and loaded it.
Ohhh that's pretty neat
Seriously, +1 rep for working on a framework.
Thanks ๐
what is the "bandage power" thing?
thanks for advice.
why I asked about OnTick : I've made Tarkov injectors which have delayed and time limited effects by using EveryTenMinutes. and I counted while effect is running so worried about that. but I think I don't have to worry about performance now ๐
Tooltip_EFK_SJ6 = "Injector<br>[Dur. 240min] Stamina Recovery Rate (+1/m)<br>[Del. 200min, Dur. 60min] Temporary Panic & Temporary Fatigue",
```
how can I code something to the healing context menu to like "instantly cure" any injury?
Hey, can someone give me a simple code to make the mod save the log file in the "Logs" folder in Dedicated Multiplayer Servers?
writeLog(file_mask, message);
-- example
writeLog("server_points", "[ERROR] Failed to load listings. Default configuration applied.");
what do you want to know; "how to create custom context menu" or "how to cure players instantly"?
the remove injury part actually
I believe this will restore your HP but also fix all injuries like bleeding, fracture, burn etc..
check RestoreToFullHealth()
Javadoc Project Zomboid Modding API declaration: package: zombie.characters.BodyDamage, class: BodyPart
i wish i could fix all of the injuries in an specific body part, not the whole body
yep i know. it will effect only for one bodypart. unless you loop like this:
local b = getPlayer():getBodyDamage():getBodyParts():get(i)
b:RestoreToFullHealth()
end
This will make player 100% condition.
thx
Off topic: How'd you sent a masked link here? I thought it was banned formatting in this server
sorry but what is masked link? do you mean "this" part?
Yeah, sorryโthat part. Did you just type it out like [this](link)?
- ctrl+c URL
- drag "this"
- ctrl+v
this is what i did.
Interesting
sorry if they are not allowed, i didn't know. ๐
I'm not a mod nor a narc, just curiousโalthough if they see this maybe they'll patch it ๐
๐ฎ ๐ฌ
hello i'm trying to write items into the script manager and i am getting the error
WorldDictionary: Warning script item loaded after WorldDictionary is initialised.
and my items do not show in game. anyone know a fix for this?
you cannot add items at runtime and still have them be registered in the world dictionary
this means that they cannot save
this happens on game boot. is there someway else to add items like this?
not really
if they aren't defined in a script file they won't be defined when the world dictionary is built and they won't be able to save
all of that happens before lua even loads
why give access to add to script manager at all then?
thank you atleast you saved me wasting more time lol
i don't think any other kind of script at all runs into this limitation
ok so specifically items are limited by this?
the timing on this is insane, was watching a documentary about ww2 yesterday ๐ญ
are you in my computer components
that's a good way of doing it
How does one replace the UI sprites, especially the moodles?
i have tried packing only the modified sprite and packing every moodles
still no change at all
if you have it in that pack, you either didn't give the image a file extension or your pack has 2 .pack extension
Don't know if this would be the issue but hey ๐คท
seems that you are running another mod which changes moodles. is this intentional?
We already tried to take that off. Didn't do anything.
That was one of the first things we checked.
Didn't seem to be the case.
ok. but still... if you try to mod moodles, I wouldn't do this while another moodle mod is active (except you'd like to change the other moodle mod)
This particular mod changes the frame not the moodle itself.
Though we already took it off just to make sure
Me and Lauren are both trying to do the same thing, but we haven't been able to get it working.
Somebody has to know what we are doing wrong here.
i don't understand why only the "SetBitten" part works
you have to remove bleeding time to stop bleeding. other actions(cut fracture etc) need something similar too. you have to do something more to fully restore the injury.
I can't remember because I'm on mobile.
whats the script line to eat faster
would it just be something like "EatSpeed = 0.5"
oh let me check that
Why do you send 2 booleans to these ?
To remove infection ?
If yes, that won't work
the reason they don't work is because setBleeding doesn't take two arguments
just do self.bodyPart:setBleeding(false) and the rest should work
You can remove that second boolean for SetBitten, no point sending a false in that, you can keep the singular boolean version
public void SetBitten(boolean boolean1, boolean boolean2) {
this.bitten = boolean1;
if (SandboxOptions.instance.Lore.Transmission.getValue() == 4) {
this.IsInfected = false;
this.IsFakeInfected = false;
boolean2 = false;
}
if (boolean1) {
this.bleeding = true;
this.IsBleedingStemmed = false;
this.IsCortorised = false;
this.bandaged = false;
if (boolean2) {
this.IsInfected = true;
}
this.IsFakeInfected = false;
if (this.IsInfected && SandboxOptions.instance.Lore.Mortality.getValue() == 7) {
this.IsInfected = false;
this.IsFakeInfected = true;
}
}
}
oh
i just used copy paste in a part of the game code and i was with the two booleans
why am i still able to smoke without needing the lighter if i added "OtherHandRequire"
OtherHandRequire is only used for weapon attacks
is there a way to make it for food
oh i had to edit the time first
now it worked
thank you guys
Hi, I finally finished my mod, you can take a look at it if you want.
Have a good day ๐
https://steamcommunity.com/sharedfiles/filedetails/?id=3383901556
is that code from Java? sorry but how could you find codes like that? looks very useful.
Here's an idea for a mod...... Imagine you're grilling in the game and your character is wearing assless chaps?
By decompiling the game code
Thanks for answering. i just searched for "Decompile PZ" and i found a guide ๐
Just wondering, how can I only apply panic/stress for my autism mod when the sound is close to the player? Rn it just makes them freak out from any sound over a certain volume on the whole map.
I'mma try using the distance thing someone showed me before, and just add it to the if statement that adds the panic n stuff
Is there anyway that I can change the color of a weapons muzzleflash light and muzzleflash texture?
i dont see a way to change any guns flash at will. but i think you can change the texture for all muzzle flashes
Hello, is there a way to make sure that when the character eats something, some effect is applied to him, such as healing him completely? I think OnEat doesn't work but something similar.
OnEat may work.
maybe check your function first? what code did you write for heal?
Hey team, anybody knows how to add levels to a perk?
tried:
player:setPerkLevelDebug(perk, newLevel)
but it only works on passive skills Fitness and Strength
Then tried:
player:getXp():setXPToLevel(perk, newLevel)
And I got this weird looking color:
code block:
local function applySkillBoosts(player, trait)
local boosts = skillBoosts[trait]
if boosts then
for perk, levelChange in pairs(boosts) do
if perk then
print("Applying skill boost for " ..
tostring(perk) .. " with level change " .. levelChange .. " for trait " .. trait)
-- Adjust player's perk level
local currentLevel = player:getPerkLevel(perk)
local newLevel = math.max(0, math.min(10, currentLevel + levelChange)) -- Ensure level is between 0 and 10
player:getXp():setXPToLevel(perk, newLevel)
print("Set level for " .. tostring(perk) .. " to " .. newLevel .. " for trait " .. trait)
else
print("Invalid perk detected for trait: " .. trait)
end
end
end
end
is there perhaps a way that you could change the color of explosion flash lights then?
-- Instant Health1.lua
local function applyEffectInstantHealth1(player)
local bodyDamage = player:getBodyDamage()
local currentHealth = bodyDamage:getOverallBodyHealth()
local healthToRestore = math.min(currentHealth + 25, maxHealth)
bodyDamage:setOverallBodyHealth(healthToRestore)
local function OnEatInstantHealth1(food, player)
applyEffectInstant Health1(player)
end
Events.OnEat.Add(function(food, player)
if food:getType() == "Instant Health1" then
OnEatInstant Health1(food, player)
end
end)
I wanted to deal with this but when searching for events I didn't find an OnEat I found OnPlayerUpdate but that's all I think I didn't search correctly
all of it is handled in java technically you can make a java mod to do it. nothing is exposed to lua that can be modified to do this
something like these
item MyItem
{
DisplayCategory = Food,
Weight = 1,
...
OnEat = YourFunctionName,
...
}
and code
function YourFunctionName()
print("I just ate MyItem!!")
end
Oooh in items script ok ok
i suppose you can do something like rewrite the class in lua and then hook into ISReloadWeaponAction.attackHook and replace startMuzzleFlash with your own which you would also have to rewrite in lua. really not huge feats cause those functions don't seem too beefy. idk how much of this the game will let you do though
Goodluck
oops i clicked wrong button, deleted previous message :/
Dont worry with this message is enought
Thanks
yo if anyone wants to make this real they tottally should but im playing with the rv nomad mod but im playing with my friend and we dont have space to put a second bed so if some one can make a bunkbed mod that would be sick
I spent 20 min figuring out why I can't remove the trait "Claustrophobic" only to realize in the game code
there's a typo
How hard would it be for me to create a mod that removes the clothing patches texture including clothes from other mods?
A typo? In PZ? I don't believe it.
I came across "DistanceManhatten" which should be "DistanceManhattan" and I shook my head. The 3rd grade state spelling bee champ inside me just dies.
Hello hello! I just made my first mod which only introduces a couple of new items, but it only works in single player, I'm a programmer but have no experience at all with modding pz, any kind soul could help me?
Nothing, I've compared with other mods and I can't figure out what I am doing wrong. It's a couple of new items, and a couple of new recipes, but it doesn't requires other mods or anything. It works perfectly on single player, but whe I tri to Host a game with just my mod installed from the workshop, I load in but the mod wont work. my gf and friend tried to add the mod to their servers but the server just wont start (Server has stopped during launch (Normal Termination)). Any ideas?
Ok, I think I managed to make it work. My friends were activating the mod through the mod manager, but it seems they needed to go to the server settings and to the Steam Workshop tab. Weird. I'll still eye it just in case.
In any way, here you have it!
https://steamcommunity.com/sharedfiles/filedetails/?id=3385213057
Is there a trigger or a function I can hook to run some code upon an item being placed after the timed action completes?
Nice job!
Does OnObjectAdded not run if the lua file is in the server folder?
triggerEvent("OnObjectAdded", obj)
It looks very selective on when it triggers but I haven't looked too deep yet.
I think its my issue. Seems to be triggering. My code is looking for a sprite name but Im passing the sprite object.
getSpriteName() on the object
yup I got it
I didn't know about OnObjectAdded before you asked, so thanks!
This documentation is more up-to-date, and indicates if events run client or server side
Sounds like you're getting errors and did not learn to read those did you ?
If events don't run client or server side, no code is triggered
yup i saw that
Did not learn to read the debug logs?
I mean the console logs. Did your code throw an error ?
nope, but I used debug prints to figure out what the issue was
๐
Heya, quick question:
Can i somehow check for a item's data in a crafting recipe?
More specifically, i'm trying to only accept drained batteries (0.9 delta or below) in my recipe. Sadly couldnt find anything except the OnTest: property, but that needs me to write a full on lua function.
You need to write a lua function
But yes you can do such a check, with lua
alright... time to figure that out then
Time for you to learn lua, thankfully you have hundreds of example of how to write such a check
thank you though
Well, thankfully i do know a bit of lua, i just havent used it in a good while
You should be able to find crafting functions which involve consummable delta (battery level here), which checks for empty batteries I believe
You should do fine then
Don't hesitate to ask questions
do you maybe know where those are located? i have tried to look a bit through the files but i couldnt really make it out
there was nothing under items and there is nothing like a recipe folder
server/recipecode.lua
Anybody ever use BaseVehicle.getForwardVector() ? It seems to be bugged on the Y axis. Curious if anyone else has noticed this behavior?
Thank you!
hmm i tried adding my lua function to the Recipe.OnTest table but whenever i try to call it in the recipe it says that the function doesnt exist. I seem to be doing something wrong clearly?
In my server.lua i defined
function Recipe.OnTest.RechargeBattery_IsDrained(sourceItem, result) { ... }
Do i have to define it in some other way?
thats how all the other functions were defined in the recipecode.lua at the very least
not sure if you just did that to express it visually but if you actually surrounded the function body with { }s that's not valid lua syntax
yeah i only did that to not bloat the message further
it just uses the lua end thing
your lua file should be located in MyMod/media/lua/server/ and the filename should end with .lua
I want to make a translation/localization mod, how exactly would that be done?
im kinda dumb, at least when it comes to programming and finding what i need for it. how do i make clothes spawn on zombies
i've scoured a few mods for it, ones that i know do spawn clothes on zombies but, i cant find the code that does that, unless im missing something
if anyone has an answer for this just ping me - i don't check here much
Can someone please explain addOption to me? It seems the parameters within addOption are in the following order:
- Context Label
- worldobjects
- Function to execute
- other parameters are added
containerTypeOption = containerTypeMenu:addOption(getText("ContextMenu_AddAll"), worldobjects, ISWorldObjectContextMenu.doAddFuelGenerator, generator, containerType, nil, playerNum);
function ISWorldObjectContextMenu.doAddFuelGenerator (worldobjects, generator, fuelContainerList, fuelContainer, player) --some code end
Why does worldobjects, a parameter to be passed into doAddFuelGenerator, come before the executing function and its other parameters?
because it's stupid
the arguments are:
- context label
- first argument to the function
- the function
- other arguments to the function
somebody should make an ozempic mod my 90kg fatass character wont lose weight no matter how much he jogs and starves
Saving objects in a modata table then referencing it afer a restart would break the object?
yes. mod data can only save PDS https://en.wikipedia.org/wiki/Passive_data_structure
In computer science and object-oriented programming, a passive data structure (PDS), also termed a plain old data structure or plain old data (POD), is a record, in contrast with objects. It is a data structure that is represented only as passive collections of field values (instance variables), without using object-oriented features.
can anybody explain for me what is different between client, server and shared folder? or any guide?
for now, I mostly put my files into client and everything works fine. is this about MP compatibility? GPT has never helped with this. their answer has so much noise and makes me more confusing.
The folders relate to the mods code structure, well really its particular implementation of multiplayer architecture. Client is code that runs on the players computer, server is on the hosts computer, shared is for both. Someone else might have a more detailed description but thats the gist.
for more info check out: https://pzwiki.net/wiki/Mod_structure
Does Anybody Know How To Apply Custom Explosion Affects?
I am using Advanced Trajectory for this W.I.P Pistol Mod I am developing... This would be a HUGE help
ISTimedActionQueue.add(ISGrabItemAction:new(playerObj, itemObject, time))
`STACK TRACE
function: onReleasePCZ -- file: ISPlayerConstructionZoneUI.lua line # 907 | MOD: Player Construction Zone
function: onClick -- file: ISModalDialog.lua line # 77 | Vanilla
function: onMouseUp -- file: ISButton.lua line # 56 | Vanilla.
[17-12-24 00:34:47.376] ERROR: General , 1734417287376> 260,873,287> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in onReleasePCZ at KahluaUtil.fail line:82..`
Any idea which player object and item object this time action wants?
Making a lot of changes to FrameworkZ lately. I also started on some plugins to complement the Life RP gamemode that'll be working with it. The first one I'm making is the Currency Plugin and there's a wallet item that'll store money and only protect a certain amount upon death.
https://i.gyazo.com/8abaa44aad522cee12c9eb892ca22c52.png
https://i.gyazo.com/8b02d406f060a69d02351d8fc52d75b9.png
https://i.gyazo.com/c8e7a3e412cad0821ab4733964f94fb1.png
Created a contextMenu Entry for my mod, but for some reason just opening the menu, so right clicking the item triggers my callback function already?
I thought the function only goes off when the option is actually clicked, or did i miss something here?
entry = context:addOptionOnTop("Recharge Battery",player,startRecharge(player, validBatteries))
i looked at vanilla code too and this seems correct, as far as i can tell... but it always goes off right away
local dumptable = context:addOption("reset table", localPlayer, function ()
sendClientCommand("MODID", "requestResetTable", {playerName = localPlayer:getUsername()})
end)
local dumptooltip = ISWorldObjectContextMenu.addToolTip()
dumptooltip:setName("Delete Table")
dumptooltip.description = "resets table"
dumptable.tooltip = dumptooltip
this is how i add a simple one.
i'm not sure if my issue comes from the fact that i have a TimedAction attached to it
maybe since theres no "tooltip" it just auto executes, not too sure either.
ah thats maybe worth a try...
oh but as far as i can see, in your case its for a WorldObjectContextMenu
I'm using the OnFillInventoryContextMenu
hmm...darn.
not sure if there are differences between the two on how they execute
oh! nesting it like this
entry = context:addOptionOnTop("Recharge Battery",player,function () startRecharge(player, validBatteries) end)
seems to have worked, for some reason
you're calling the function instead of passing it
startRecharge(player, validBatteries) calls the function with those arguments and passes the return value (probably nil) - if you wanted to pass the function you'd just do startRecharge with no () (the other arguments to addOption are for setting what arguments get passed to that function when it does get called)
ah, that makes alot more sense
your later attempt works because function() ... end just creates a function without calling it
Suppose I should ask here just in case, but does anyone how if :sendObjectChange("containers") works with vehicles? If not, is there an alternative or something else I can do?
Running into issues where items are updating for basically everything except for things in cars, which are updating server-side but not on the client.
who is going to patch in MP before devs do it?
So
How fucked we are with b42? 
They actually released b42 the moment I left the country for holidays 
I'm also wondering this. It's been about a year since I've touched my mods if not more but a lot of people use them
I made 3 car mods so I guess it's time to find out if they still work
It's an unstable release, so at the moment not fucked at all
Mods will continue to work in b41 & the unstable gives time to update them for b42
Time to see what the damage is
Gotta figure out how the version folders actually work now beyond what that one post roughly described
(Genuinely curious how much of Save our Station gets borked and what i will need to fix)
Eh, shouldn't be that bad
I only do texture edits, I'm hoping if they didn't change too much about the texture placement the damage is minimal.
Which post is that?
Pretty sure you just yeet a folder with version name
At the moment we are fixing and polishing our current internal build to get it ready for more formal internal closed testing amongst a slightly wider set of gameplay testers. Thereโs still a few items from the crafting revamp still to come in, and some optimization we hope to include, but overall we are pretty [โฆ]
Yeah my question is - say, in the example of Save Our Station, we have a "Core" and a "Knox Country Map" folder in the mod, each with their own mod.info files
Do i slap those into a top-level version folder, or do i need to make version folders inside the submod directories?
Thanks
that's actually pretty cool
Actually maybe updating my game would update the examplemod, so could be worth checking that
I think it's
Version -> everything rest
So you'd have multiple maps
Each for separate game ver
As a beginner modder I have no idea how this will affect vehicle mods
I hope I'll only need to redo the folder structure
Yeah but what about the pzversion string in the mod.info file?
Thats the part thats making me wonder how thatll work
Still works. In your b42 folder for example you'd have PZ version 42
if it gets deprecated
In your b41.72 you'd have PZ version b41.72
No real reason to remove it
I guess it's not needed
But like why remove
Idk, we'll see
Because it could infer the version from the folder structure
I have no idea what to do anymore.
It took me a second to understand the original folder structure.
Now I just have no idea what's going on.
like, no point having it defined twice lol
True
Yeah I haven't a clue either
Im gonna see if the examplemod updates when i delete it.
Same folder structure except now there's top folder called b42 for example
Which defines what PZ version uses it
Idk exact name
But you get the idea
Do all mods go into it?
No, each mod has version folder inside it
Yeah thats the thing, in the actual local mods folder, they're still separated. Which makes me think the version folders go into the directory where the info file sits. So when you load the mod, the game picks the version inside the mod that works.
So game knows what folder to use
[edit] bad info corrected by nasKo
Why 
80% of workshop users are pepegas who won't install dependencies
Unless game literally won't launch
So something like
Mod name -> b42 -> contents?
[edit] bad info corrected by nasKo
Probably
Wdym
It adds backslash in list of dependencies?
Which obviously borks the game because games don't like having slashes in them?
Well I gotta wait for you anyway so I can chill 
Not home anyway
Do we have a common folder that works across versions in the new structure
I believe this is new mod structure
Not sure cuz not home and can't check
Gotta check example mod
It should be updated
Yeah launching now to see if it gets created
saw the new armor system at work and my brains already ticking
it'll be neat to see what can be done with it
haven't even spawned in yet i'm just fucking around with the outfit builder
Project Fashionoid
Moodle Framework is updated to B42
How to adapt your mod for 42 unstable (a thread)
I haven't even updated yet.
My pc shit itself immediately as soon as it finished.
I hope those new optimizations save me
How to update your mods for 42 (a thread)
oooooh ankle holsters!
All praise our lord and savior nasKo
thank you nasKo
Significant changes in Lua/scripts 
Did I just see a small update for B41?
I swear to God if my 2k lines UI page not working anymore I'll commit a felony
||For legal reasons it's a joke||
sweeet
xoxo
Better to keep multiple so you have more space to edit stuff
Albion 
Woop woop

here's umbrella for build 42, for those who can install it manually - it probably won't be on the addon manager for a few days judging by the usual wait time
albion, what are you calling the addon manager?
vscode's lua extension's addon manager
me finding out about this only now
But the real question is, when intellij comments spellchecks fix 
Very nice, I need to stop using notepad

You telling me i couldve gotten by without having to mess with lua extension settings to prevent certain globals from erroring
Pls tell me you were at least using notepad+
of course, i have VS studio/code as well.
I don't know anything anymore
But, I just found them too clunky for pz cuz wasnt aware of any available addons.
Yeah i just kinda lived with manually defining certain globals in the config so it wouldnt error
there being an addon makes life a lot easier now lol
not the best workaround but a workaround nonetheless
(pain)
@iron salmon can we get example of mod.info in the thread? With example of how the new backslash thing looks
I want to make a translation/localization mod, how exactly would that be done?
will the javadoc for PZ be updated for B42 (i.e. this: https://projectzomboid.com/modding/index.html) ? or is there already an updated version?
Please tell me if it works๐ญ
I have 1.5k lines for one ui window
No idea, traveling atm
hey, u know how the mod.info need to look like ?
I have a suspicion but can't test
Waiting for this
I am pretty sure they will post the changes done for modding in few days
Ahhhh....better now 
Maybe upload them on the B41 version
You cant upload your mod too ?
Do we have to worry about our b41 saves breaking due to some people updating mods for b42? Or does the new mod folder structure allow mods to be loaded for both individually if setup properly
Yes same, my mod dont show up in the mod list
oofst
ive thrown mine into ~/Zomboid/mods
same
linux user?
nop
just made a new folder named 42 and threw the whole thing in there. works great. well, my mod doesn't but it's in the list
but there isnt a nice example as far as i can tell
it mentions something about a workshop id, but i dont exactly have one yet since its not uploaded to workshop yet



