#mod_development
1 messages · Page 375 of 1
i started modding back on build 42.9, no shit i didn't know this
but fuck hahahaha
dude, i swear to god, if you were next to me in real life right now, i would pay you a beer
Yeah, I've been striggling with MP too... I didn't bother learning it in B41 for my mods, then waited for B42 MP and... it's not as simple as I would have liked.
indeed, i am only doing this because people are begging me to
There is some stuff on teh wiki about it but I can never remember the page title to find it when asked.
please, if you ever do, send me.
you have no idea how much of it i need right now
anyway, let me go back and mod
From my cheatsheet.
Trivial once you are used to their behavior, kept confusing me so much when I started.
@bleak remnant ah I wanted to ask, do you have a video of your zombies in action ? Do they have any special behavior or currently they just use custom models / textures ?
sup goat, what is this?
Documents parameters for Scripts
Uses the same dataset I have made for my ZedScripts extension
i have zombies that make horde and zombies that explode and leave pieces behind
for now only those 2
In other news, I have developed the reinforced crowbar for people who think they break too easily.
gonna save this right now
The dataset still needs a bunch of work to explain what each parameters do
yo, one last thing
i was planning to add custom animations to the zombies back when i was developing the mod
i faild
you made it on your mod
how? do you have a documentation?
about that
no
i want to do it on the necroa outbreak once i start making it
nhum... i see
When the zombie spawns in, you assign a variable to them
zombie:setVariable('WhateverUniqueNameYouWant')
i mean, porting the animation from blender to the game
And create AnimNodes for your zombie with the different animation setups
Read the animation guide
i modded your mod back in the day and chenged the animations you made to mine just to check
didn't work well
will save this right now
you help so dam much, no wonder why i added your name in my mod description
@vivid imp the fact that wiki page will be plagued forever with a resized image and look crappy in Discord lmao
Yea I noticed that thank you
you are welcome
@jagged fulcrum Minor annoyances with the new TreeZ & Visibility: these trees on not-yet-seen squares won't fade. Or rather, they totally block the view even when moving right into the area covered by their tops. (North of Ekron Community College)
Also, a lot of trees are practically invisible when approaching from topside, causing risk of unknowingly running into them. Not sure if the latter is just vanilla behaviour.
part of vanilla engine
that's also why I alwaus play with the black fog disabled
@silent zealot Fuck dude, i was having a problem i coudn't solve for a weep, i just did it, because of you. YOU ARE A FUCKING HERO, you are a hero, holy shit.
Welcome to Zomboid modding! (and programming in general)
Oh! Can yo do that in the options, or is that a sandbox setting?
Java patch
indirect fix: I find this mod very helpful. It highlight zombies in your vision arc when you hold right mouse, so fewer suprises due to stupid graphical quirks like trees, cars, and buildings in the way. https://steamcommunity.com/sharedfiles/filedetails/?id=3659137034
Ty!
I also have my target reticle change from red to green when over a valid target (vanilla crosshair options) which helps when you think you have a shot lined up and the game think a door/car/whatever is in the way
what are my choices if I want to render something below map symbols?
Is Crowbar With More Crowbar going too far?
There is never enough crowbar in a crowbar then only with more crowbar can we have more crowbar 🤪 😂
Tbh this seems to be recuring problem in the game right now
This is the ideal loadout. You may not like it, but this is what peak weapon durability looks like.
Featuring Crowbar with Sledgehead, Crowbar with Axehead, and Crowbar with More Crowbars.
- Localization clean-up. Translation files are now in json
New Modding guide/changelog.
https://theindiestone.com/forums/index.php?/topic/92433-modding-migration-guide-4215/
A guide for mod authors on how to update your mods for the new translations format introduced in version 42.15. Modding Changelog (42.15).pdfEx-Translation.zip
I think you can leave the only text files in and it supports older versions just fine lol
ah I see im not the only one 
json is good
string replace on the fly
i dont think adding more type of json is good yet, extra text mean extra byte, you can create your own jsonc and then convert it later
Is there already a script to convert automatically translation files from Legacy to 42.15+ format ?
brother you dont worry about extra line of text in 2026
when it can improve readability and answer questions that translators might have

$files = Get-ChildItem -Path . -Filter *.txt -Recurse
foreach ($file in $files) {
$lines = Get-Content -LiteralPath $file.FullName -Encoding UTF8
$result = [ordered]@{}
foreach ($line in $lines) {
$trimmed = $line.Trim()
if (-not $trimmed) { continue }
if ($trimmed -match '^[^=]+=\s*\{$') { continue }
if ($trimmed -eq '}') { continue }
$trimmed = $trimmed -replace ',\s*$',''
if ($trimmed -match '^\s*([^=]+?)\s*=\s*"(.*)"\s*$') {
$key = $matches[1].Trim()
$value = $matches[2]
$result[$key] = $value
}
}
$jsonPath = [System.IO.Path]::ChangeExtension($file.FullName, '.json')
$json = $result | ConvertTo-Json -Depth 10
$json = $json -replace '\\u003c','<'
$json = $json -replace '\\u003e','>'
$json = $json -replace '\\u0027',"'"
$utf8NoBom = New-Object System.Text.UTF8Encoding($false)
[System.IO.File]::WriteAllText($jsonPath, $json, $utf8NoBom)
Write-Host "Converted: $($file.FullName)"
}
Read-Host "Press Enter to exit"
checked and it works
- make new file in folder with translations
- change extension to
.ps1 - right click -> run with powershell
- it converts all .txt in its folder and subfolders into jsons. It assumes that your stuff is already in UTF-8 so it'll work for most of translation files but not all. Good enough for me
if you find some other replaces needed to be done, just add them the the list
I'm trying to access the documents here about the mod changelog but I can't create an account of the forums. Are they available anywhere else?
https://theindiestone.com/forums/index.php?/topic/92433-modding-migration-guide-4215/
A guide for mod authors on how to update your mods for the new translations format introduced in version 42.15. Modding Changelog (42.15).pdfEx-Translation.zip
There
So we need to create a new translation dir inside 42.15/ ; And the old common\media\lua\shared\translate dir still valid?
im pretty sure you can keep both txt and json its jsut that pre-42.15 will be reading txt and post-42.15 will be reading jsons
The -modfolders launch arg is neat. -modfolders mods,workshop,steam
now that levers are out
you should release that as a standalone fix
this makes me think... L92 carbine seems a bit too small
vanilla models in general feel a bit small
scaling them in blender around 1.2 should make them ok
did anyone manage to get translation jsons to work? 
sandbox.txt
option EvolvingTraitsWorld.AffinitySystem
{
type = boolean,
default = true,
page = ETWSettings,
translation = ETW_AffinitySystem,
}
Contents\mods\Evolving Traits World\common\media\lua\shared\Translate\EN\Sandbox_EN.json
{
"Sandbox_ETW_AffinitySystem": "Affinity System"
}
???
oh wait maybe we dont need to attach sandbox part anymore
no, it auto-attaches it
dafuq
yea no i got no idea
pls ping me if someone figures out how to use translation jsons, shit just ain't working 
remove _EN to the json name maybe. also I chose utf-8 (without BOM)
oh i haven't tried that one yet
here are my UI_EN.txt & resulting UI.json:
ah ye now it tries to load them and crashes the game 
progress
Caused by: org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
???
I validated all 3 jsons and they are all valid
I had the same problem and did: remove BOM + restart PZ. one of made that error disappear
or was it the ending comma I forgot to remove, maybe? 😄
nah its BOM cuz I also have BOM and it crashes the game
utf8 only pls
some editors consider "utf-8" & "utf-8 with BOM". for those, select utf-8.
some editors consider "utf-8 without BOM" & "utf-8". for those, select utf-8 without BOM.
updated to write jsons in utf-8
xd
the _EN is no longer needed at the end
of the game file
check vanilla files and look how the translation files are set up
Will updating translations to .json break the lua checksum? I seem to recall that removing a file from a mod could historically do that.
what do you mean, lua checksum check .txt or .json now ?
Oh. Duh. So it only checksums the lua files. Makes sense. I was over thinking I guess
tbh, i'll hop on 42.15 after a week.
zombie.Lua.LuaManager$GlobalObject.getClassField(LuaManager.java:6450)```
I guess `getClassField` is `-debug` only now?
yes
nikkkkkkkkkkkkkk can I mess with your lever action animset 
could you possibly pass me the alternative animset as well?
The one where they twirl it ? :3c
I don't have files on me localy anymore
All i can offer is to sub to mod and search to your heart's content
I thought you had this specific one local ?
question: say i have
local bool = false
Something = {}
function Something.ABC()
bool = true
end
if bool then
Events.EveryHours.Add(someFunc)
end
how does it behave exactly? 
say other mod does
require("file1")
Something.ABC()
will event be added or not?
I know for a fact I will get complains from 42.14.1 users
no
it's just plain order of execution
make sure you return Something
by the time require() returns, the entire file is guaranteed to have run already
Oh, this one i have anim only i belive
Nik when are you gonna teach me how to animate?
just think of files as functions... because that's *literally* what they are in lua, this isn't a metaphor, they are the same thing
By having that i mean that i still have DM open with Rainmaker, where i send her the anim
But it hinda hurts to go through it, as there is lots of insults
oh that where that person got the racking anim
Or just not good language
Is there any idear why the %s and %s%% placeholder currenly appear with the new Translation?
hmm, ok. Then I can just inside func unregister events if not bool that way I do add events but if they are not needed they are removed
If you wouldn't mind passing it over, it would be neat to have
Yep, you can. Tested it myself right now couse I don´t wanted to make 2 Mod folders 😄
That's just spin rack. The normal racking you have to get from mod itself
It probably includes player model, thats why its bigger than usuall, but it works
Nik will teach me the skillz
i just wanna ask if updating the mods to current version is easy for modders
depends
most mods are fine, however in most cases mods that used field reflection are impossible to fix
Thanks, I didn't understand why it wasn't working and by removing _EN, I solved the problem.
nevermind, was some game shenanigans, it works
Friends! I want to learn how to create mods and try my first game mod. Could you tell me where to start and how to learn? I'm a beginner, but I'm really interested in this area. Sorry, I'm using a translator. I'm really happy to discuss mod creation in private messages.
42.15 modding changes
- Reflection is now not possible without debug mode
- common and versioning folders are no longer both mandatory, you need at least one
- In-game uploader now allows for 512x512 previews
Translation changes
A pdf file and an example zip are provided. mod.info can now have translations.
The translation wiki page is now updated for 42.15 too
- Official forums (need to be logged in with an account to download!)
- Archive
- Wiki link to TIS Guides
- Shared files on this message
You can find translation convertion tools archived here.
Pinned messages
@bright fog this also works really well btw for translation migrations if u wanna add it to ur msg 
How do we run that ? I don't even know what language that is
msg under
converted my 25+ files without problems
except that gotta remove language prefix at the end, so it's Sandbox.json and not Sandbox_EN.json but imma just manually do that later, as long as I dont have to manually convert thousands of lines into json 
Ah that's powershell
i've been using it, it works well
Some files don't use UTF-8 tho
I think I'll make a small Python script lol
go for it, didn't wanna bother with it myself :)
am I correct to believe with versioning I can put my entirety of 42.13 in common and my 42.15 can have just the translation folder? I don't need to duplicate my lua/ folder, right?
you can leave everything in 42.13 as long as its not limited by max ver
you can just add the new translations if you didn't have to make any code changes, they don't conflict with the old ones
and put json translations alongside txt translations
^
game will read txt or json depending on game ver
Here is a small C# project & executable to convert automatically the translation of your mods from txt to json on Windows. https://github.com/katupia/PZTranslationConverter/releases/
Contribute to katupia/PZTranslationConverter development by creating an account on GitHub.
@dull moss wait but every translations use UTF8 now ?
Nice, Windows only sadly 
But I'll still link that in my message
no
i think not?
turkish and some others are still in diff encodings, no?
yippie
I haven't checked ALL the languages, but I know some that used other encoding and they are UTF8 rn
I'll do a better check sec
Yup
Added links to the guide on the wiki
after this update i can transfer items that are hidden if i click "trnasfer all", anyone how what the problem is?
How do you know you can transfer them ?
can you change the link to the following ? This allow to point to the latest. e.g. 1.1 handles duplicate lines. https://github.com/katupia/PZTranslationConverter/releases/
Contribute to katupia/PZTranslationConverter development by creating an account on GitHub.
Of course
if you use https://github.com/katupia/PZTranslationConverter/releases/latest it will always open to the release marked as latest
I'll change it to that then
i have my zombies with custom clothes, ok, when i kill them and click "take all" it transfer a literal invisible mask
there no other way to transfer it
only when you click "transfer all"
Ok but how do you know it transfers the mask if you can't see it ?
Saw that there were two lever actions added to vanilla, but for some reason they use the bolt action animation ?
Nabbed nik's animations, and they look great on it :P
when i click transfear all, the zombie body is wearing the mask, after that the mask disapears, when i drop evything on the ground, it drops things with "?" on it
i can only take those items if i click "take all" from the ground/container
it started to happen after the update 42.14.1 i guess
not sure
it is the 4th time that they break this fucking thing, i don't know why they like to mess around with the items scripts so dam much
@sour island did you need all of parsescript or does load() work for your usecase?
Im honestly not sure what parsescript does differently.
Parsescript let's me feed an entire script.
Load to my knowledge requires an existing script, and the load is additive - to overwrite requires exposed access to clear
Ah.
Im pretty sure there are some people managing to clear and fully reload scripts but the API calls they are using to do it give me pause
local recipe = getScriptManager():getCraftRecipe("PressOil");
recipe:PreReload()
recipe:Load("PressOil", new_recipe_as_script);
recipe:OnScriptsLoaded(nil)
recipe:OnPostWorldDictionaryInit()
CraftRecipeManager.Reset()
CraftRecipeManager.Init()
this.
PreReload() may give you access to clear()
I feel like ```
CraftRecipeManager.Reset()
CraftRecipeManager.Init()
is there a way to store movingobjects as a reference to teleport them once the chunk is deloaded?
if im using rv interior i want to bring a pig with me but i cant reference the pig anymore upon chunk deloading
I also haven't tracked down what OnScriptsLoaded or OnPostWorldDictionaryInit does.
I feel the whole codepath is either crazy, genius or AI nonsense.
I use that to finalize the clear
ah.
Or one of those
PreReload() seems to just clear every indivual member/member array/etc
Shiny! Unified Carry Weight Framework (UCWF)
as a traits modder setting weight haunts me in my dreams cuz there other trait mods and clothes and sandbox and whatever fuck else 
now ican jsut tell ppl to complain to other mod authors to use the framework instead of adding compatability on my end to everything
Yeaaa.
And the dumb 50 limit -_- (That Total Capacity Overhaul allows adjusting, lol)
bro no threats.
The way i solved it was blocking the items from being transfered to the player's inventory. fuck unecessary feature from this game, for fuck sake dude.
not even as a joke
Quick question, I just woke up (it's 7am here in Australia)
TLDR we run a big MP server; did new update break most mods yes or no?
Yea im saying don't even joke about it. its not cool.
even obvious jokes, not cool
its bad enough that steam community is.. such a charming and non-toxic place.
it def broke all translations

but does that stop a mod from working
no
How did it not break Realistic Car physics is my big question -_-;
I heard it broke some more technical mods, dunno the details
Like im sure i have to update something in that mod
nothing different for meuntil now
Ik nobody cares about small stuff like this, but I do want to point out that the color of the brass plating I used for the winchester icon, is the same color value I used for the keys icon on KeyRinger
I like to keep material colors consistent in my mod icons
Those are nice thumbnails
Starlit library causes issues, that may be a problem for some parts of it
My mod doesn't use Starlit
Ah, that was Project summer car, which uses yours, my bad
working on a chopper attachment
I make them usin https://game-icons.net
So uh, is there some pinned post or something on how to do translation files now?

Yeah it sure would be nice if there was like, a pinned post or something.
Especially for this new update.
A pinned guide would be very useful.
hehehehehe

Guess I'll just have to wait until a guide is made
and hopefully it gets pinned
to this channel
in particular
a pin that is.

If only someone listed all possible ways to get the official TIS guides for that new awesome update
Definitely
waste of time
@ nasKo
This attachment will work as a bayonet, though I intend for it to be weaker than the actual bayonet attachment.
Shorter and slower in particular.
Also, the improvised attachments will have rusty variants
Opens steam. sighs Type-type-type. Ctrl-C Ctrl-V. Ctrl-V. Ctrl-V.
When people complain about a mod not working because a mod-breaking update came out a few hours ago I lose a little bit more motivation and all my mod updates are delayed a bit longer.
Also I'm just going to delete those comments instead of making grumpy and inappropriate personal responses.
I kinda like seeing what unexpected thing broke this time.
Today it was.. reading the throttle value for fuel consumption in project summer car.
And realistic car physics broke sinks due to some Soap API it didn't have 🙂
They impleneted SOAP somewhere in zomboid?
And the translation files are JSON?
Holy $#@^% we're getting some industry standard systems!
Yes, Don't drop the soap API or your sinks won't work.
PS by soap API, I mean literally an API to get the amount of soap a player had... don't get your hopes up 😛
oh
...
damn.
A soap API, not a SOAP API lol
still, json translation files is nice. Or at least better than the not-lua text files.
Monkeys paw: Translation files are now JSON, but the slightest error stops the game from loading and doesn't tell you what filename the error occured in, only what line.
I'll take it, there are plenty of json validation toals available. 😛
just stop using notepad 😭 json validation is possibly one of the most solved issues in computing history
every language has 5 json libraries, and none of them serialise things the way you want them to, but most of them are good enough
Im just waiting for someone to upload a mod with badly formated json. -_-
Considering it will cause the game to just crash to desktop at 'loading translations' phase lol.
Maybe the Monkey's Paws will be: config files are all in JSON, but the JSON is interpreted by TIS's custom hand-written JSON parser.
Then we get XML for items but it's parsed with a pile of java regexps.
.... First it was sunny and nice out, then I got a weather alert.. for snow. then it was dark. then hail. Now sunny and hard rain.
In real life or in Zomboid?
soap wasn't working right in multiplayer, so they decided to make a whole api for it 😎
plz help, my local weather is very poorly simulated -_-; (Real life)
I need someone to change the sandbox settings for the local weather and lower the max humidity.
speaking of I need to empty my dehumidifer
OK, morning meeting finished so now I get tio start Zomboid and see how much it explodes.
ooooh.... Added support 512x512 preview image for Workshop Item.
Is this new and I'd just never heard of it before?
Neat.
-modfolders is not new, but i didn't think the order mattered
so that part might be new, or i was wrong
This is important cuz spear type weapons can stab through fences 👀
and fish ofc
ScriptsDocs
Now linked on the PZ Scripts Data which it is made from, you can also easily find it by searching for "ScriptsDocs" on the Wiki:
https://pzwiki.net/wiki/ScriptsDocs
It is also linked in the main Scripts page in the section "Scripts blocks":
https://pzwiki.net/wiki/Scripts#Script_blocks
I need feedback to improve it further. (tho I already have plans on how to improve it)
is there anyway to set any computer path as a mod repo source ? I wanna use my steam repo as secondary with -nosteam launch option
sadly no, the locations are hardcoded
@sour island Don't forget your getter() requests for your mods. Best to get em in early incase they might make it to a hotfix drop or something 🙂
I'm not sure if you mean spears can also stab fish, or that fish can also stab through fences because TIS defined them as a short bladed weapon.
I do like th idea of using fish as knives
somebody should make that
"Can't find a sledgehammer? Use a hammerhead shark!"
Tip: if you want to find every single badly formatted json (because you updated 15 mods at once and now the game will not load and will nott tell you which file is bad) you can use powershell (6.4 or later):
Get-ChildItem -Recurse -Filter '*.json' | ForEach-Object {if (-not (Get-Content $_.FullName -Raw | Test-Json -ErrorAction SilentlyContinue)) {$_.FullName}}
Also, @willow tulip you have commas after the last element in your jsons, which is against the json spec though I wouldn't be suprised if Zomboid does not care.
BTW> Thanks for the super quick update of Realistic Car physics
You can use symbolic links in Windows, they allow you to create folder links that are pretty much indistinguishable from normal folders. This way you can have your mods folder anywhere on your harddrives
don't you have mods to rip off ?
🙄
Vanilla files have , after last element too, I wouldn't be suprised if PZ just outright crashes if you don't 😛
For me only IG_UI.json has the extra comma, the other vanilla files do not.
Also, this does not work.
Damnit jason...
Oh, thats the one I based mine off of... Also, if they are using a script generator, how did only 1 end up with the extra comma?
My guess, the script they use to generate the files leaves the last , in and they have to manually remove it and they missed one.
My guess? its a conspiracy from hiding the last few entries that would break this whole case wide open. /s
Can Item names not have numbers in them or something?
usually i have a problem at other stages of adding clothing items but this wont even show up in the item list
item should be lowercase
I am amused by the thought that you created an item which is a pile of exactly 93 boots.
I barricaded myself in the shop after robbing the shoe store and need my pile of exactly 93 boots
93 just to imply yknow, contemporary with the game's date
that's also probably why my gas masks weren't working! i'll try and get those reimplemented, and return to working on the modern swat outfit and bundle those up and release the mod!
did you have actual gas mask problems because I know their API a fair bit.
I was but it seems like the issue at this exact moment is I just imported the fbx incorrectly since its not rendering!
Ah
so I'll sort that out and come back around later if I keep having issues with it
if you need to figure out the crafting recipe/etc, only make the 'has filters' variant, don't make a 'nofilters' variant
and make your crafting recipe call this oncreate:
function MakeImprovisedGasMaskOnCreate(craftRecipeData, character)
local mask = craftRecipeData:getAllCreatedItems();
mask:get(0):setNoFilter();
end
Ahhh okay, I did make two,
so I only need the one and that creates a no filtered variant when its drained?
yea, vanilla uses modData now instead.
ahh okay cool
gotcha, I'll get some Z's for now and when I wake up dive back into that!
I think the name changes via some API thing?
But basically, the vanilla 'create improvised gas mask' recipe doesn't work, because its missing the above onCreate and creates the no-filter variant that isn't used anymore
You could also just craft a mask with filters by requiring filters as ingredients
and I believe that'll do the whole filter thing properly by being spawned with filters
if loot tabling, just always spawn with filters, lol
Yeah, gotcha! thanks
if I wanted to make said filters last longer would there be an easy way to do that?
I dunno, I didn't look into the time mechanism of it. Id kinda suspect its in java but might be worth making a java patch or something to make all filters last longer (or sandbox configurable time?), it seems kinda lame how short they last now
(Could be optional part of your mod for people who want it?)
I just wanted to make this be like, an older heavy duty gas mask, heavier and more discomfort but makes filters last longer
but theres probably some other upside I can do for it
Maybe you could have some kinda event triggered 'everyminute' and 'restore' some of the filter?
doable in LUA at least, and likely not exploitable if the player doesn't figure out how your doing it 😛
Or I could maybe make it take its own propriatary filters that are a bit cheaper to craft maybe?
yea that could be an option
true true, I do wanna avoid player exploitation, Sidegrades good, busted bad
or cheaper to refill at least, the vanilla filters arnt that cheap IIRC
Yeah I might do that then, heavy and crappy to wear but cheap to run
like only takes more charcoal to refill instead of (I think vanilla needs fresh glue/rags/sponge/tape for every recharge?)
fresh charcoal+rags would be fine
sponge/tape/glue isn't very renewable
yeah, its essentially a coffee can full of activated charcoal
So I'm cool with that, heavy but cheap
Yea that'd be cool, especially for people running mods that make filters essential to not getting infected
loot for the epic light pre-zombie filters, or DIY the lame attach 2lbs of charcoal to your face way.
yeah exactly, choices, in your gameplay?!?!?! how strange!
Yea zomboid could use more side-grades
Doesn't durability/condition on mask dictates the usage of filter?
Oh! i had a feeling that might have been what determined it since 3 seemed very low
I'll give that a try too, thanks!
Yes, change the useDelta of the filter object. (which will change the longevity for all masks usingg that filter object)
Important note: filters decay based on how many corpses you are near, which is why you always need extras when do you go to silly places liek Guns Unlimited/Crossroads mall.
okay! and does usedelta go UP or down? im guessing Down decreases the rate of drain?
Smaller == last longer.
A full item is 1.0, use delta is how much each use takes away.
Friends. Did the mods break with the update? The mods work for the translators, and they've disappeared. Can you tell me how to update them? I'm a newbie?
Also, the text used to be fine, but now it's all messed up. How can this be fixed? I'm guessing the button descriptions are simply gone.
All translations broke with 42.15
Could you tell me how to fix this? I would be truly grateful, friend.
check pins for a tool
Damn, I'm new to this and I don't understand anything 🙁
Do I need to do everything as per the link above?
For example, the old and new localization formats are attached. (json - new, txt - old)
I updated the translations wiki page too
Friend. Am I understanding this correctly? I need to switch from txt to json?
You should include both, TBH
Thank you! I'll try it now and definitely give you feedback.
Use one of the many converters in #translation in the zomboid modding PZ, or do it manually by copying the file, removeing the _EN or whatever postfix, renaming to .json and then converting the entries yourself
(theres like 4 or 5 converters now though lol so if your doing more then a couple translation entries id grab one)
I'l archive those tools in a repo later today
Should it be like this?
if the blue icons are .json, yea? you forgot itemName though.
in the file itself, remove everything before the first { on the first line
^ and then do these changes.
Is everything right?
do note, PZ will slap you with a fish if you miss one " or , or : etc.
yes
btw, when you edit itemName
you actually end up removing itemName
errr
In a txt or json file?
So I need to delete ItemName txt?
in the json file, just of ItemName.json
"ItemName_Base.Crankshaft1_1": "Crankshaft", so you might think your file should look like that
but it should actually be
"Base.Crankshaft1_1": "Crankshaft",
they removed the ItemName_ part of each tag, inside of just ItemName.json
(maybe others I dunno)
I need to change the ItemName in the json - ItemName_Base.AVCSClaimOrb To the next text -
Base.AVCSClaimOrb?
yep
Thanks, I'll do it now
Yes you need to change it. Do this ^
.. I.. don't... even?
I feel very safe in knowing that PZ will likely crash on you for this crime against... whatever it is against.
just...
{
I'm a beginner and this is a bit difficult for me. Am I doing something wrong?
I have to delete everything before { in txt files, right?
ok post your .txt file with just like, 1 translation tag k?
or 2
I'll convert it for you, you follow along
please post it as normal text and not an image
surround it by three ` (tidal key.. ~)
ContextMenu_AVCS_ClaimVehicle = "Заприватить авто",
ContextMenu_AVCS_UnclaimVehicle = "Снять приват с авто",
ContextMenu_AVCS_UnsupportedVehicle = "Ошибка привата авто",
ContextMenu_AVCS_ClientUserUI = "Список заприваченых автомобилей"
ContextMenu_AVCS_AdminUserUI = "Админ список заприваченых автомобилей",
}```
Ok for context menu, AFAIK you don't need to remove the prefix ContextMenu_ on the indivual tags
so it becomes:
{
"ContextMenu_AVCS_ClaimVehicle": "Заприватить авто",
"ContextMenu_AVCS_UnclaimVehicle": "Снять приват с авто",
"ContextMenu_AVCS_UnsupportedVehicle": "Ошибка привата авто",
"ContextMenu_AVCS_ClientUserUI": "Список заприваченых автомобилей",
"ContextMenu_AVCS_AdminUserUI": "Админ список заприваченых автомобилей",
}
So, it doesn't need to be deleted everywhere? But where should it be? 🙂
(note the added , on the end of clientUserUI line, SUPER IMPORTANT json is picky)
I think JUST "ItemName_" but not 100% sure, see if it works as is first
"Админ список заприваченых автомобилей", - > "Админ список заприваченых автомобилей"
uh, other way around?
the , at the end is important in Json
the last comma is extra
oh, that one is fine actually
1 vanilla file has it too shrugs
technically shouldn't be there, but yea
Needs to be on that 2nd to last one though
In my case, the comma was removed everywhere before the closing bracket }
From my experience either is fine on the last line
@willow tulip Realistic car physics is breaking ragdolls; zombies just freeze in place when shot. B42.15 added a getBulletFrameNo() to zombie.core.physics.WorldSimulation which is not present in the java files with the mod, and it's something to do with Ragdolls. (I tested with just that mod running, after doing a file validation)
ERROR: General f:3261, t:1773132784528> ExceptionLogger.logException> Exception thrown
java.lang.NoSuchMethodError: 'int zombie.core.physics.WorldSimulation.getBulletFrameNo()' at RagdollController.addToWorld(RagdollController.java:266).
I was sure I did a did a diff on worldSimulation -_-
I was lucky with the Java High Beams mod I could just re-copy the updated decompiled java and copy-paste the three functions I changed, and that was still a hassle. No idea how you stay sane after putting out a much more involved Java mod!
sigh I missed that in the diff
It would have also been easy to miss in testing, since you probably didn't shoot anyone when testing a car mod
Lesson learned. Always shoot the hell outta people while testing car mod. maybe we wouldn't shoot our own cars while riding shotgun if everyone took this lesson to heart.
there's a this.bulletFrameNo++; in updatePhysic()
But an API to get -1 would match the large number of item parameters in scripts that are only in the code in save and load functions
ah.
public int getNegativeOne() {
return 2;
}
too tired to release patch, will fix tomorrow
And everything breaks if you change it.
If you want a quick solution to post on teh mod page:
@willow tulip Friend. I did everything correctly and decided to check if everything worked. As a result, when I log into the server, I see the main menu image and nothing happens. Is this somehow related to a file change?
turn that off.
Any exceptions in console.txt?
any tiny mistake = crash. I recommend removing all the json files except one, try again, add another file if it works, edit that file if it doens't... console.txt only tells you line number of json error atm, not what file its in
You could also put the .jsons into an online json validator.
^
Or use powershell's test-json , or any other json validation tool.
Even opening them up in Visual Studio Code will help with proper syntax highlighting/detection of format errors.
eh I'll just fix it tomorrow
im sure i'll only get 1~2 downvotes for not updating everything within 24 hours
people need to learn patience. Or how to fix mods themselves.
Plus they will appreciate the mod even more after a day of playing without it. 😛
shrugs my bad for fixing the whole 'car tires fall through the world' bug.
wanted more accurate collisions between cars and stuff.
A bit like this.
yep been working all day on PZ and shaving down knives
I hate it when my knives get hairy.
shoulda also glued some together or wrapped em but got distracted by things.
also, I get to take a break from making knives for schools.
Now, I get to make knives... for prisons!
I have no idea whats going on with this timeline and at this point im too afraid to ask questions.
At least the kids will have a fighting chance
Classiv shiv style! Something small and pointy with a handle so you can hold it.
Also, nice looking tools.
Thanks.
Still not even sharpened yet 😛
(or laser engraved logo on handle, for that matter)
so we know what controls the spawn of items outside of containers?
@willow tulip Am I correct in understanding that the items are now Base.text instead of ItemName_Base.text? I'm guessing the translation failed because of the ItemName_Base in the JSON.
Yes
... hot
wanna do that with my guns lol
I am not replacing anything vanilla
but I do remove from spawn tables
which they dont spawn in containers
but in the world idk
unless they are added directly into the world???
Wait that's vanilla ????
yeah
That's amazing
Not feeling like making mine anymore. You got ones I wanted and more 
what mod is yours?
noooo, its a different artstyle!
I feel like with the new vanilla weapons there's a real opportunity out there for a mod developer to create a new weapon attachments pack. Add in silencers, slings, better scopes, etc. But no new guns and no new ammo. I reckon a mod like that would be really popular.
would be cool, but myself I started this pack long a while back
rather than vast amount of weapons I am more focus on modular and features rich
example one of my goal is to have multiple permisible magazines for weapons
without right click interation to install them
Those will let you change the magazine a weapon uses. Then you hook into the reload timedaction where it searches for/selects a magazine, and come up with logic on how to choose if there are multiple viable magazine types available.
With right click?
ah, I thought from your comment that's what you wanted to do.
which is implemented already
But you have already done it!
ah no, sorry. I precisely want to avoid right click context interations
and thats why we implemented this magazine profiles system
Yeah, figureing out the UI is probably the hardest part
Or you go full Britas with 37 keybinds to control your weapon
(please don't do that)
no no
the only thing where I am using keybinds is for underbarrel attachments
which was the only way I though would give control to players
New "Random" building story: RBGunstore.java
Looks like it takes the loot from counters/display cases and if it is a certain type moves it on top
fewer guns in my test world than yours, so I don't get the see teh wall displays!
I lied. They are additional spawns from a list hardcoded in java.
Yeah I was speaking with other in the modding discord

I have to find a way to handle it
The new vanilla lever action rifles use bolt-action animations. 🙁
Still, nice to have them round out the weapon range. Also, I thought the JS-2000 held 7 shells but apparently thatt because it's been so long since I saw an unmodded one.
When they mentioned higher capacity shotgun I thought they adde one of those crazy 15 round or 25 round pieces.
Looks great. I will definitely check it when it comes out
it drove me insane haha thats why on the VFE update I left them but change the anim to use VFE lever ones
this is the only lever so far on my pack
You can spawn items at a set location in the world by making a table fo stuff to spawn, every 10 minutes check if the squares are in range, and if so spawn stuff & remove that entry from the the table. Excalibar is a mod that is a good example of this, with specifc items/zombies.corpses at set locations. You could also use the same logic to clear out any existing world placed items on a square.
So you code up the gunstores so the game periodically checks if they player is close enough for them to be loaded, and if so it goes trhough each tile in a list, removes any placed items and regenerates placed items using your tables.
I was gonna try an approach of attaching a custom oncreate to vanilla weapons to replace themselves wit ha random item from a list
but that second approach is what I had in mind
its a bit more intrusive I thinl?
For 42.15.0, is the global moddata ModData broken?
literally so good bro
So they converted all their translations to json files in the recent update? How are the translations for mods are supposed to work now?
So. it's essentially just renaming or translate files to .json instead of .txt? EDIT: solved, I see how it works.
... hmm and replacing "=" by ":" and adding additional quotation marks ... refactoring hell is going on 😭 😅
Haha! Good tool! Even thought about writing a small script by myself to do it automatically! Thanks for the link!
can request @bright fog update the ZedScripts vscode extension to have the convert function too
I plan to do that actually yea
I already have all the tools needed to do so, I just need to write the data to json files
Tho with all the tools available, I'll see how hard it is for me to do it
i think the script will support with json soon 👀
The problem is that the extension doesn't retrieve the diagnostics of files you haven't opened yet
at this rate
That's my guess too of why they did that
the HTML translation converter one is good tool, and sees to do all in JS
and then they have json schema
If they provide that it would be cool, but we can easily generate it automatically ourselves anyway with the data I've made
I just want to say it's really nice being able to use standard tools to validate syntax and I hope the rest of Zomboid's scripts also move to json.
For sure
not work with newest framework
One thing tho is that translation keys for specific files take specific key prefixes
Json doesn't allow that by default if I'm not mistaken
So maybe smthg to look into myself later in ZedScripts
It's like that old proverb, "The best time to plan your syntax was ten years ago, the second best time is today"
You are literally in unstable
If not now
When ?????
That's the exact moment to be doing such improvements to the core game code
It's like the Simpsons, no matter how much time passes it's still 1993
An eternal moment of endless early access
hi guys, im making a small mod, where i can find one of characters voice in game sound banks?
i mean, character voice when he screams, or injured
thx for report
If you've found a reliable way to predict the future, many of us are interested. If not, like the rest of us, you may wanna consider changes will be required forever.
I have a problem with the naming of sound files, I found game files signed as MS_MalePlayer__ShoutingHey_04, and I don't understand what to do with it
I am sorry for taunting you.
Hello guys! Here is how you can use the new translation JSON format with built-in schema validation.
File Path: ..\media\lua\shared\Translate\EN\ItemName.json
{
"$schema": "https://raw.githubusercontent.com/escapepz/pz_translation_json_schema/42.15.0/schemas/ItemName.schema.json",
"Base.Apple": "Apple",
"Base.Hammer": "Hammer"
}
Why use this?
This method automatically validates your JSON keys against the official vanilla keys in Project Zomboid, preventing typos and broken translations.
Full details & Documentation:
https://github.com/escapepz/pz_translation_json_schema
yes IG_UI.json only, can check vanilla folder or Ex-Translation.zip in pinned messages
Oh shit you can use regex to verify prefixes
I didn't knew that
Yes, JSON Schema is awesome. 😎
Also I have a dataset for translation files and properties you can use maybe
In the same dataset as scripts
Wait setting up those schemas seem a bit rough ...
I need to look deeper into it later
The updated version for 42.15 is in the dev branch until I update ZedScripts to be able to version control
json schema can not validates the file name, only the json key, your .yaml version is better
Those are just data, they don't do anything themselves
But I use these datasets in ZedScripts, and now in the ScriptsDocs and I used it to make the updated translation page
Also the filename is a bit complex bcs map translation files need to be named after the map
So any .json named file can exist in the translate folder anyway
What can i do to make it compatible with ZedScripts in the future?
So I can make a PR..
For short: Refactor to a single source of truth with legacy support for older versions.
IMO, the ZedScripts extension should include a command like ZedScripts: Add ItemName Script.
This would automatically generate a file using the vanilla naming convention, so users don't have to guess the correct filename.
Nothing, that's my job to do it
Your stuff is already compatible
Ah you wanted to contribute ?
I had already planned to automatically create the translation keys for items, recipes etc
I just need to add an option to control the version of the scripts data you use
Lots of ideas but I need to take time to do it
The thing here is that I need to make sure to be smart about it so users can setup different scripts data versions
I might also need to split translation data into separate repos
Yea that might just be the solution ...
We can use this verification script to automate schema validation: https://github.com/escapepz/pz_translation_json_schema/blob/main/.agent/skills/translation_schema_management/scripts/verify_translation_keys.py
I think my schema version 95% matches your dataset
yeah, this can be a template repo of scripts dataset
@bright fog do you know if this was valid for the old format?
ItemName_IT = {
ItemName_RepairableWindows.GlassPane = Pannello di vetro di grandi dimensioni,
}
tcherno's converter dropped it but it's formatted weird so i want to check if that's even valid before i report that as a bug 😅
i know the quotation marks and commas are both optional but i've never seen no quotation marks with comma
No definitely not
Quotes are mandatory
Wait wtf quotes are optional ?
i think they were anyway, i always used them so i couldn't say for sure
I'm pretty sure they aren't else that would cause problems with that last comma ?
Like should it take that comma or not ?
The goal is for this dataset to serve as a source of documentation
@mellow frigate your converter seems to misname PTBR files
thanks for the itemname update though, you've saved me a bunch of time
Yes
Have they found a solution for the buggy moddata?
I'm trying to post a request (only text) to the mod_portal, but the automod is blocking it. Is there any way to see what is not allowed, or do I just have to guess what is triggering it?
the main thing it doesn't like is embedded links
otherwise i've seen it occasionally get weird about code before, presumably seeing a . and thinking it's a link
I only have code blocks and unformatted text
there might be things i'm not aware of, i'm pretty sure it's a lot stricter on plungers
ModData.transmit(key)
ModData.request(key) + OnReceiveGlobalModData
Broken!!!
I was certain it would be that Transform.origin is a valid URL format, after you pointed that might be an issue, but changing that didn't help either
How does the role thing even work? Is it based on the message count?
yeah
Hey guys, quick question to all the modders here, i had an idea for a mod which some people seemed to love, and i wanted to ask how difficult it would be to impliment such an idea
Im not a modder btw
but any help would be greatly appreciated
I was able to post it now. It didn't like me using formatting for the header...
Do I abuse if I ask you to test https://github.com/katupia/PZTranslationConverter/releases/tag/Release_1.4 on mods with PTBR &/or PT translation ?
i don't have a PT translation unfortunately, but PTBR is working as expected now, thanks!
anyone?
It depends on the idea
Posted my idea here, some said it could be easy to do.. lmk
i don't think the zoom effect is possible
I do not know if that would do the trick but there was that mirror mod in B41: https://steamcommunity.com/sharedfiles/filedetails/?id=2901615211
The author of the mirror mod made countless awesome mods. They are probably one of your best bet.
Alright, ill give it a shot
@main pasture oh so thats how flying vehicles worked lol
Yes. They get the jniTransform of the vehicle and change the origin of it every tick
Setting the position constantly works surprisingly well. You just have to get the controls right
Anyone knows in what folder we can store the profession picture referenced by a modded profession in B42 ? => media/textures folder
Sometimes the support just makes things worth it.
First time modding PZ, but not the first time an update has caused mods to break... so I decided to fix a bunch of them so I could keep playing. Fortunately the lions share has just been translation updates.
we got drone warfare lmao
does anyone know how complicated it would be to create a mod that undoes the vehicle damage to zombies changs from B42.14?
Definitely adding support for dropping pipebombs/molotovs to it. It's also going to be a framework to easily add new rc vehicles
Don't forget noisemakers
It is almost certainly in java, not lua, which makes it much harder to make and maintain a mod.
A noise maker drone to bait a horde would go crazy
Have noise makers been fixed? Last time I tried them they seemed to have a lower radius than my watch alarm going off
It would also be fair to make the drone itself into a loud noise source... those things are not quiet and they drive dogs crazy. (or be nice and make "engine noise radius" an option for players to change)
Idk, but the character emitter isn't working (for inside a vehicle at least, vanilla hotwire noise is broken to confirm), spam honking a vehicle horn immediately stops all music, sounds in general are fucked.
for now, the only workaround I've found is to hide the symbols, render my stuff and then render the symbols on top, which is not ideal for sure
Can you make your renderstuff() function happen before the symbol's renderstuff()?
afaik it's not possible to touch symbol rendering directly and every place I tried to hook on to map rendering it seems to already be too late
when updating the translation, does deleting old translation file cause checksum error like the lua files?
I won't bother making a converter within ZedScripts, I don't have the structure to automatically detect every script files in the workspace rn, so it would be file by file, while there's already plenty of tools made by some other people to do that
Lot of work for not much gain, for a tool which I'd have to remove like a month later from ZedScripts anyway
im trying to rename the guns and make a mod based on personal preference and i was wondering if this was a way that would work
as in
is ItemName_Base.Pistol a valid way to do it?
or would i just do Base.Pistol
the new syntax is just "Base.Pistol" as the key
no trailing comma, and add {} around it to make valid json
thanks
Very last comma is acceptable AFAIK, but otherwise yea
(One vanilla file has a last comma)
(But your right in that PROPER json doesn't have the last comma)
Not according to the json specs! ...but a lot of interpreters don't care.
Also not having it means I can use powershell's Test-json without false positives.
sure 🙂
Nope, my mod is also broken in multiplayer for this reason. There is a post about it on the forum with a suggested fix for TIS, but I don't know if they've seen it yet.
What is broken with modData?
ModData.transmit does not work, everything else is fine
That sounds like it could cause all sorts of hilarious fun.
Have any of you messed around with non-weapons very much? I'm trying to make a flashlight but it takes both staticmodel and worldstaticmodel? I think I just might have messed up the syntax in my model file?
i have a trouble creating custom voice mod, it doesn't work right, i can choose voice type in game but it silent, anyone know how to make correct player sound script?
100 randomly generated rifles (again)
@sour island Maybe the english translations for what each sandbox value is for dropdowns too?
(I dunno how to phrase that)
(Mod_portal request)
like when its 1= shamblers, 2= fast shamblers, 3= sprinters
that like REALLY needs some clarification for server setting editors.
if I counted correctly, that's 8/100 times that a chopper spawned, and 1/100 times that a bayonet spawned.
Chopper technically has the same spawn rate roll chance, but the bayonet will often get skipped on spawns due to there not being an end cap on the rifle
hope you add a debug function to do that lol.
totally not gonna abuse it
wdym
GUNSPLOSION
spawning the rifle runs a lua function to randomize the attachments
yes, but also placing em down in a patten like that, lol
ah
for uh reasons.
I manually placed em lol
Understandable, doing gods work lol
I just opened the debug menu, spawned 100 into my inventory, then placed each one like a funky lil game of tetris
I fixed it directly in the Java code on my server. Everything is 100% here.
nice. Oh so they autospawn rng with just item selector in debug? shiny
So lame when all the guns in town have the same 2 attachments!
if I find another JS2000 I swear im going to use it on myself.
GO B42.15 ADDITION OF NEW GUNS
Yup.
I merged like 6 rifle types into 1 gun item this way
Back to basics. Lets focus on the core PZ features. Like guns, melee weapons, zombies, food, cars.
Iv been so looking forward to balancing passes on B42.
Single Shot - Bolt Action - 1 rnd
Single Shot - Semi Action - 1 rnd
Mag Fed - Bolt Action - 15+1 rnd
Mag Fed - Semi Action - 15+1 rnd
Specialty Mag Fed - Bolt Action - 35+1 rnd
Specialty Mag Fed - Semi Action - 35+1 rnd
I plan to expand this further with converting ammo type, and also possibly burst n' lever action
Like converting it to take 12 gauge would lock it out from the normal mag fed options, and would primarily be bolt/lever/pump action
The mod was originally going to have multiple core types with different item IDs, but I have ideas for how I could make more of this work off of a singular item ID
Like yes, your drum mag fed bolt action rifle shooting 38 special is treated the same as your neighbor's lever action shotgun
Would it be simpler to have multiple weapons so that their stats are saved directly to the item script ?
Sure, probably.
Is it as interesting as having hundreds upon thousands of unique combinations for a single gun in the game? absolutely not.
Still looking forward to Marz's framework he and his mates r' workin on.
Would love to be able to do more with gun stats being determined by what ammo is loaded in the gun
Yo guys is there any mod for washing machine fix?
try use this next time for translation json. it will help a lot with validation
Wait but linking the schema in the translation file isn't even in your doc on your repo no ????
Ok dude like your tool is useful but my god you need to clean up that readme
Why is there a million ways on how to use it and none of those list linking the schema directly in the translation file ?
https://github.com/escapepz/pz_translation_json_schema/blob/main/how_to_use.md
The 'How to Use' instructions are advanced, while the README provides basic, no-install examples that cover most use cases.
The section #quick-ide-setup-vs-code
ok ive forgot the single file, my bad
by Salty Oreos
Introduced melee lugs which have been added to loot, and recipes:
Improvised Bayonet [Basic]
Improvised Spade Bayonet [Basic]
Improvised Chopper [Basic]
Improvised Bayonet [Rusty]
Improvised Spade Bayonet [Rusty]
Improvised Chopper [Rusty]
Fixed bug caused by equipping non-weapon items.```
https://steamcommunity.com/sharedfiles/filedetails/?id=3676018580
done
Only those broken?
ModData.get works? Because yesterday I test it, the table was empty unless the update wipe out the global data stores.
Also a lot of the things you have written are the documentation on the wiki, I'd be more interested that you document extra stuff there instead ...
Bcs your repo rn is a whole documentation in itself which is kind of sad considering the wiki covered/covers most of that
You can also cover the schemas on the translation page now that'd be good too
And since people don't really have to step in the repo itself to access the schemas that's perfect
Or maybe my local test server was empty which is why it returns empty. 😂 😂 😂 😂 😂
If ModData.get works then I will just use sendServerCommand as workaround.
TBH, I'm not really a "Wiki person". I created the documentation in the repo specifically for the content at that time, and I know it might become outdated later.
That said, I'd be happy to contribute to the pzwiki when I have some free time. I'll check out what needs to be done. Thanks for the suggestion! 😀
Planning to rival Borderlands?
Is there washing Machine fix mod?
I think this is one of the guns I had the most fun making
Not much it's very easy to contribute but since you made these docs, best to do it straight in the wiki imo
Especially since the structure is already there to provide docs about translations
FR, broken in 42.15
Hello i am a beginner in lua . I want to add a second (or third) item to the mod blackJack to play it.I have copied the code below and replace the item carddeck with a new item ,but it dont work.Have anyone a advice for me to solve this?
Friends! I'm trying to translate a mod, but when I join a server with it, the game freezes in the main menu, and nothing happens after loading. The problem is due to the UI file. How can I fix it? 🙂
So, my mod broke for 42.15.
What went wrong? And how can I update them for the new build?
https://steamcommunity.com/app/108600/discussions/0/780947379776115936/
Are these guys trolling? Seems like the mod is still around, so I have to assume they're just making stuff up.
There was someone going around claiming TIS announced something related to the caught (unexploited) security issue- but this post is from February. 
Upon further inspection (someone telling me to read the description) it appears the mod is just an example, and the "tool" is on GitHub and what was most likely pay-walled(?) at the time.
Is this even possible?
I did see that mod in the update tracker
Seems misreported - but if they're just installing tools off GitHub yes
Even if they packed the tool with the workshop item it would require you to run it
Unless it used the exploit but that's doubtful considering their tool is just a mod builder for music packs
I think is a 3rd party tool. More like a script, can just use AI to make the tool anyway. AI can do all small personal project nowadays.
I asked AI to make me a tool that can reverse engineer the pz map, and it literally did that. Kek.
Looks like they fixed global mod data
I pushed a patch 1hr ago for my global mod data and they fixed it?! >.<
I have a weapons mod. It uses melee weapons and people are sayings it's bugged out now.
Your weapon mod use global mod data? o.O
Idk. I'm getting bug reports that it's not working, and the update says they changed the translation system from .txt to .json.
So I have to update it I think.
There are translation conversion tool, even without translation, it shouldn't break the mod since it will just revert to translation key
The versioning thingy within the mod structure doesn't work in the way I thought it would, very disappointing.
I thought it would goes like load common then load 42 then load 42.1 then load 42.2, unless mod.info explicitly says versionMax. Yet nope, it simply load the common and the latest 42.
Yeah I find the claims in the thread to be overblown in terms of the maliciousness -- but I don't out it past someone to try charging for a relatively simple tool
I'm more concerned people will run with this narrative and I'll eventually get comments about malware or some such when their unstable saves break with updates 
Yea, im glad comments are off on realistic car physics. Can only imagine java mods are getting some meh comments about now.
Does anybody enjoy loading into a server very fast?
The obvious first question is "in what way is the mod broken? "
If it's just text not getting translated and everything else works that's very easy to fix. (And it's fine to keep using a mod with broken translations)
how? you preload all the textures and map chunk? or lazy load? or background load? The video is good tbh
It finally happened in vanilla, wow... https://www.reddit.com/r/projectzomboid/s/qSIuCMSdbv
That's a sign of world corruption
We had such a problem in the horse mod at some point
Did they reset when you left the world and came back ?
Erm, that original image was taken ~6 months ago, I've completely scrapped that method and world at this point ha ha
I don't remember what happened if I reloaded the world
I wonder how that world corruption is triggered then
When a player leaves, before they fully disconnect they are teleported into "limbo" (a location with only a valid tile beneath their feet). The next time they rejoin, they spawn there which has very little to load. Then they can load their character from that menu you saw in the video.
Where can I find the translation conversion tool?
The translation is bugged out and it is bugging me.
interesting, do you have a port for 42.15 yet?
No
Forgot about borderlands doing this lol.
It wasn’t inspired off anything in particular, but I did notice months ago that it is sorta like fo4 weapon parts
in b41 there used to be setStressFromCigarettes(x) function but it's gone, do we have alternatives? 
probably CharacterStat.NICOTINE_WITHDRAWAL
Yo guys did anyone had washing machine bug problems if yes can enyone make a mod fix please
upd: yep
Quite general question: did something change with permissions or whatever? In b41 you could've added traits to player on client side, but I'm getting some random reports that it doesn't work anymore in MP and I'm not sure if something changed or am I doing sth wrong 
in b42 mp i haven't yet seen anything that made me go 'why isn't that server auth'
You will need to be more specific: what washing machine bug?
lemme rephrase, I mostly
- update CharacterStat
- add/remove traits
were those moved to server side?
add/remove traits I guess you already answered, what about stats
oh and carry weight updates 
You need to add them on the server. Have a look at Expert Driver, that is a trait that can be toggled on and off so has the client send a request to the server and then the server adds it.
yes
Hi thanks for answering i played with my friend washing machine works normal in our base and in random moment it bugged up when we click turn on caracter goes to machine "klick it" and nothing happens we cant even switch from washer to drier or other way arround... (power and water still on everywhere) and when we go out of our chunk of map in other houses all machines work normally but houses in our chunk are bugged still..... hope this will help
Client:
local function ToggleSpeedDemonTrait(active)
local player = getPlayer();
local traits = player:getCharacterTraits()
local hasSpeedDemon = player:hasTrait(CharacterTrait.SPEED_DEMON);
if active and not hasSpeedDemon then
if isClient() then
sendClientCommand(player, "overdrive", "addSpeedDemon", { })
DebugSay("Request to ADD SpeedDemon sent to server")
else
traits:add(CharacterTrait.SPEED_DEMON)
DebugSay("SpeedDemon ADDED")
end
elseif not active and hasSpeedDemon then
if isClient() then
sendClientCommand(player, "overdrive", "removeSpeedDemon", { })
DebugSay("Request to REMOVE SpeedDemon sent to server")
else
traits:remove(CharacterTrait.SPEED_DEMON)
DebugSay("SpeedDemon REMOVED")
end
else
DebugSay("SpeedDemon no change")
end
end
Server:
if not isServer() then return end
Overdrive_OnClientCommand = function(module, command, player, args)
if module == "overdrive" then
--print("Overdrive: Received command "..command.." fpr player "..tostring(player))
local traits = player:getCharacterTraits()
if traits == nil then print("Overdrive: ERROR: unable to get traits"); return; end
if command == "addSpeedDemon" then
traits:add(CharacterTrait.SPEED_DEMON)
--print("Overdrive: Server: Added trait."..command)
elseif command == "removeSpeedDemon" then
traits:remove(CharacterTrait.SPEED_DEMON)
--print("Overdrive: Server: removed trait."..command)
else
--print("Overdrive: ERROR: unknown command: "..command)
end
end
end
Events.OnClientCommand.Add(Overdrive_OnClientCommand)
in a lot of cases, you can probably just move your code to the server entirely rather than using commands
What is triggering the trait/stat change?
like what does getPlayer() return
nothing, you'd use getOnlinePlayers() instead to get the server's player list
i hook to events, so zombie deaths, weapon hit character, everyminutes,etc
Some of those events will include the player involved in them. Others like every10minutes you'd just loop through all active players
And if there is a trigger that is client only, see the example code I posted for a way to make that work.
Yea, if the player is important to an event its passed in
Yea its been a nice rewrite of MP
So glad they didn't try to peicemeal B41 MP into something that worked
@silent zealot Hi thanks for answering i played with my friend washing machine works normal in our base and in random moment it bugged up when we click turn on caracter goes to machine "klick it" and nothing happens we cant even switch from washer to drier or other way arround... (power and water still on everywhere) and when we go out of our chunk of map in other houses all machines work normally but houses in our chunk are bugged still..... hope this will help
b41 mp was more like a piecemeal of b42 mp into something that worked
it wasn't really intended to be like that ever
lol
Daww cute new PFP @bronze yoke
thank you!
what if i run my stuff on client and send command to server with player object?
you can also do that, but it's less secure and likely more complicated
client commands come with the player who sent them passed into them
I was going to use this as an alternative. But I preferred to adjust the Java version.
im having hard time wrapping my head around this change, I'm too used with my stuff running on a client, need to get used to this change. Like let's say I have
function UnifiedCarryWeightFramework.recomputeAll(player)
player = getPlayer()
-- some code
player:setMaxWeightDelta(deltaToSet)
end
local function recomputeCarryWeight_EveryHours()
UnifiedCarryWeightFramework.recomputeAll(nil)
end
Events.EveryHours.Add(recomputeCarryWeight_EveryHours)
well it now needs to run on the server, so do i jsut loop over all players and do it for each? will it work for SP as well or do I need to add separate support for it
wait but isnt it just worse from performance standpoint? Like instead of having each client running its own code now server has to loop over players and run code for each?
Yup
it's the same total amount of work
you probably aren't doing anything that expensive, and even if you are, you do it every hour, it would be trivial to do it for fewer players more often which would result in better frame times
k, I'm slowly starting to imagine what needs to be done

can a lua in client folder require a file in server?
or in that case server file supposed to be in shared (i mean probably)
there are workarounds to do this, but if you need server code in client you are probably doing something wrong
I have a lotta prints that are togglable in mod options so moving stuff to server is a bit annoying 
local function initializeModOptions(playerIndex, player)
modOptions = PZAPI.ModOptions:getOptions("UCWFModOptions")
end
Events.OnCreatePlayer.Remove(initializeModOptions)
Events.OnCreatePlayer.Add(initializeModOptions)
local log = function(...)
if modOptions and modOptions:getOption("GatherDetailedDebugUCWF"):getValue() then
print("UCWF | " .. ...)
end
end
this won't fly on the server 
is it possible to load localserver with mod not from workshop but from my Zomboid folder?
yeah
Yes but trusting clients to not lie is insane once you start considering cheaters exist
dont we create mod options in client?
so if i got code in server folder (which runs in SP, and therefore I can utilize mod options in SP), i need to require a client file in server folder

or do you jsut put return into mod options so it doesnt run the file if it's not SP 
ZedScripts can now be downloaded directly from the GitHub releases
@paper ibex I saw you linked your schema at the bottom of the translations page, I'll see to straight up make a section on how to use it directly in the wiki. But also what would you think of merging your work with the pz-translations-data repo I've made ? (aka you becoming a contributor to it)
What do you need to now and do to make a simple gun mod?
I have a very original idea, more vaniller guns
Thank you, this will be a project I am likely to abandon. But god damn do I gotta try

Good luck soldier, if you ever need more help, don't hesitate to ask around here and #modeling
Cool, how do I contribute to pz-translations-data repo?
Pull requests but I could also make you a contributor (or whatever it's called)
I think generating these from the dataset would be nice, I could have looked into making that myself but since you already kind of worked on that I figured it's more fair to propose you that
A PR will be simple.
I just need to edit translation_files/*.yaml, translationFiles.json, and schemas/translation_files.json.
Then I'll verify it with pre-commit and it's all set, without setting up pz-scripts-data or ZedScripts?
So ZedScripts won't use that dataset anymore since translation files are json based now, I'll deprecate anything related to translation files for modders that mod older versions (and remove it completely when those old translation systems are lost to unavailable unstable versions)
As for what you should update, that's up to you but the data I have setup is already good for B42.15 in the main branch, pre-42.15 data are marked with a tag with that name
The schema folder I have rn is to verify the syntax of my own yaml data files, so they aren't used for the translations themselves actually
So we should probably rename that folder from "schema" to something most modders won't look into since it's just to validate the dataset
My idea would be to make an extra pre-commit which formats the actual schema files used for translations automatically with the latest information (tho it's also very overkill since those translation files are unlikely to move)
Tho if you have other ideas, don't hesitate as pre-commits is what I found to handle setting up the data properly
@dull moss hey saw your new framework, I'm curious but why not put the example simply in the repo outside of the mod files?
https://github.com/MusicManiac/UnifiedCarryWeightFramework/blob/main/Contents/mods/Unified Carry Weight Framework/42.15/media/lua/client/UCWF_example.lua.txt
Okay, so pz_translation_json_schema also has a pre-commit hook that verifies the JSON schema matches media/lua/shared/Translate/EN on change.
That can work too
Hello all. I have a question about modData for a WorldObject vs an Inventory Item. It seems that the modData stays for a world object unless it's removed from the world, or you exit the cell and re-enter. I've tried saving the data to the item's modData itself, and then resyncing those values to the worldObject modData afterwards, but I was wondering if there was an easier way to keep this info persistent for items that may be placed in the world. Does anyone have information on this?
Can do both tho I'm not a fan of shipping the game files in the repo
I'd rather not do that if that's not necessary
Or change it to check locally on your computer
you need to transmit the complete item
If your idea is for ZedScripts to clone the entire pz-translation-data repo into the user's workspace, that would be redundant since the schema works with URLs—unless the user wants to develop offline.
That's absolutely not the idea, I already expressed those translation data are not used for that, also ZedScripts simply fetches the singular .json file for last updated data but I just locked the extension to use the file from the pre-42.15 tag
Renaming the folder was simply about organization
Bcs that schema folder is NOT for the translation schemas
Thanks for the response. Do you have a reference for this that I could follow?
They are for the repository dataset schemas which validate the parameters used to define the data
This is also for B41 still, not B42, FYI.
If the extension still needs a directory for future development—for example, if pz-scripts-data evolves into a JSON schema like the translations—I would suggest renaming 'schemas' to '.schemas' for consistency.
javaObject:transmitModData()
javaObject:transmitCompleteItemToClients() -- transmit to clients that already loaded the java object```
This is for object modData, correct? Not global mod data?
its the mod data that you mule onto the object
Okay, great. I'll have to try this out. Thank you!
global mod data is called differently
There will most likely always be a directory to verify the data files themselves. Idk about naming it .schemas, because where do we put the translation schemas directly ?
Inside that .schemas directory—specifically pz-translation-data/.schemas/. The pz-scripts-data repo will follow the same .schemas/ structure in the future when possible. (The dot means it is a hidden directory.)
Yea I know about the dot what it does but what about the translation files schema we automatically generate ? Do we put it in a subfolder named schemas ? That sounds awkward lol
Just .schemas/Attributes.schema.json . Because pz-translation-data repo only contains translation-related schemas. Unless you have a different design for the file names and language codes.

So you're mixing the schemas that are used by users for translation files AND the schemas that are used to validate the data files ? 
I'm wondering if there's a missunderstanding here
No lol pls explain
Provides a dataset for translations of Project Zomboid with the different parameters and properties as well as possible filenames. - SirDoggyJvla/pz-translation-data
This is NOT a schema for modders
This is a schema to verify that the data of the repository are well structured
Tho I'm realizing now that my schema references in the data itself got nuked when I ran a Python script on it 
This is how it is used for example
# yaml-language-server: $schema=../../schemas/translation_files.json
version: 1
name: Attributes
description: ''
fileName: Attributes
fileStarter: Attributes_
function: getText
So the .yaml file is used for ZedScripts to validate the filename and lang code
btw JSON schema can not validate the filename, if your idea is use single json file for ZedScripts
No those are formatted into the singular json files. I had to do that because requesting a download of files to GitHub is limited to 50 per day if I remember right
So with all the individual files for scripts data and translations, we would easily go over that limit
the refresh zedscripts-data stuff? why not use git clone
nvm i have not been looking at the ZedScripts ext source
Because it needs the computer to have git then 😅
And I wanted to extension to work on the go
cmon' git and IDE is the world standards
You'd be surprised lmao
or do you wanna make the extension fully web-based, like vscode.dev







