#mod_development
1 messages ยท Page 384 of 1
it's always stored as an int, it's only used as a float
Yea, and thats completely cursed. PICK A LANE!!!
also its literally wrapped in
if (worldVersion >= 220) { so the fact that TIS bricks our saves over the smallest of changes is just a few missing if statements -_-
i mean they picked int, i don't think it's weird to treat 'int out of int' as a float percentage
the only thing really unintuitive here is that it's not displayed as an integer in-game, but i don't think that really matters at all
they picked int, but store it as a float in memory
or rather, store useDelta as a float
instead of just having maxUses be an int
My thought would be you give items a rightclick 'upgrade' menu thing that tags em with some mod data and changes their internal uses.. or something -_-;
I genuinely can't think of why they chose a float over an integer
I feel like
ItemUses = 420,
would have sufficed
not to mention that I'm pretty sure the game math can mess up the usedelta total due to rounding numbers
like 500 uses turns into 490 something I think
Is there a genuine reason why they chose 0.01 to define an item as having 100 uses instead of just straight up having it be set to 100 uses ?
i can't think of any reason
Can you set the usedelta to like,,,, 2 ?
what happens if you do that
ik you can set usedelta to 1
it probably just goes to zero after one use
a lot of code that checks if you have enough uses might just fail actually
I was asking if Zomboid throttles network traffic yesterday.... The answer is yes. To about 32KB per net tick, 10 net ticks per second. And it's all constants in the jar, not configurable settings
Also that's a drastic oversimplification, but approximately its right heh
@sour island wonder how long till I get bored of this concept
(TBF I already had all this code ready for my respawn item mod)
...Saving items to disk is exactly what I'm doing!
takes old mod, changes some of the tooltip descriptions, bingo, new mod!
Oh?
My PZDos mod. I'm doing network file transfers to cache dos games on client machines coming from the server heh
Oh, Im trying to literally save parts of the world to disk
so you can import them into a new save
the unintuitive thing to me is just that the item scripts suggest that useDelta is a fraction, and that lowering useDelta will slow the consumption of items. that's true for new items, but because existing items' internal state is an integer that was initialized to 1/useDelta as it was set when the item spawned, we don't affect already-in-save items. if it were a [0,1] float internally, it wouldn't have that problem. that's all 
Uhm, definitely keep trying to do that, saving parts of the world sounds super useful lol
its so you can continue a run next version.
even more so if you could somehow load em up in the map editor... but I'm pretty sure the new map tools stil laren't released
Nah, you wouldn't be able to load the file in anything except PZ to overwrite part of the world
why? are the tools on steam now, broken?
I mean.. you COULD make it load in the map editor. Just decompile everything, manually figure out all the formats, write conversion tools, do free work you could earn over 100K/year doing professionally...
at this point just write a save converter, doing it this way seems like more work for everyone involved
Save converter only converts saves though, that could be badly broken
this will let you import to a new world, new sandbox settings, new mods, etc.
new server if anyones dumb enough to let you import stuff from another server lol
i suppose
Anyone know the API to create a directory in username\zomboid\lua?
Oh, right, \ is an escape character.. duh
notepad issue ๐
I mean I should be using / anyway...
i just use / for paths since the game is expecting and converting to that format anyway (even if it's finally converted to \ again for windows users)
Yea
boo, makes me close the file and everything. whatever happened to my magic memory management. /s
java blows is what happened
Ok one very poorly saved container
containerCount:1
itemCount:2
type:Base.Belt2
maxUses:1
currentUses:1
condition:100
type:Base.Socks_Long
maxUses:1
currentUses:1
condition:100
since garbage collection doesn't guarantee when an object is destroyed (or, crucially, that it will *ever* be destroyed) you can't really use object destruction for any kind of logic in a garbage collected language
later java versions have an alternate way of doing this kind of thing, but lua wouldn't be able to use it anyway ๐ lua also gets a different way of doing this much later
Hu, never thought id have taken destruction at loss of scope for granted in C++/etc languages.
to me, that is *the* reason to use those languages
woah let's not get crazy
i like destructors because they can be used to make things safer (i.e. with file access, it is essentially impossible to not close the file), manual memory management makes things unsafe ๐
stupid job exam giving me a C# exam when I only said I knew C++. And then they asked me to reduce all the garbage collection this code was doing.
not that there's no need for it but i don't work within a realm where you need to be the one thinking about that
Like so first I had to learn what garbage collection was. Then after I was done being disguested, I learned how to pool objects to prevent destruction and allow reuse
Yea, the memory management should be pretty much instrasinc nowadays to the structures you use (smart pointers that keep track of instance count for example)
And if you want a memory pool, there should be a few templated ones ready to go
(unless you really enjoy writing memory pools.. and TBH I kinda do)
hello - the useful barrels mod is (discontinued) but also broken currently due to not a mod issue, has anyone experienced this with similar mods/same mod?
from a forum post: the function ISWorldObjectContextMenu.onFluidInfo = function(player, fluidcontainer) causes the issue from the ISWorldObjectContextMenu.lua file.
local c = ISFluidContainer:new(fluidcontainer); is defined inside of an if statement near the bottom of the function despite being called in a different if statement earlier on. Am I crazy or is there a reason for this? Swapping the definition of the variable fixes the bug, so I am unsure why it is the way it is ๐ฅน
fixed size object memory pools are so simple, yet such a powerful optimization
its like the poster child for "Want speed? Spend a little more memory"
it's definitely just a mistake
๐ญ
possibly a vcs mishap
I hope they can hot fix it. I am unsure how having modified client files impacts multiplayer, but I am sure (I hope) there is some check that would prevent me from playing MP with this modified client side
yeah you wouldn't be able to play online
You could release a patch that requires the original mod.
Java GC is a hoe to deal with if ya never did before
easy way to watch it is in debug IG, bring up your FPS meter. you'll have a bar graph bottom left. showing memory used, free etc in text above the bargraph
i wonder how mods like the only cure disable arm use, It could be fun to try and make a straightjacket
Anyone know how to get/set the color of clothing? like how socks come in different colors?
its set via the XML controlling it to be randomised
but i have seen lua to force specific textures on clothing
Cleaned up texture (forgot to include padding so there was alpha layer seams)
Added the tape colors.
Will be experimenting with textures tapes instead of just color swaps.
Basic stuff like camo tapes
yea im trying to figure out how to read/write it via lua
getColorRed/etc always returns 1...
getModelIndex is always -1...
there is likely no referance for the clothing so returning 1, is it just being literal
you .. would have to find that RGB float, likely a proper command for it. that isnt just getColorRed for instance
fidn the color picker code from the character creator UI? it should have it
CURSED. getColor():getR() works, getColorRed() does not.
but getColorRed() is also used over the codebase -_-;
items have TWO DIFFERENT COLORS SOOOO CURSED
feels like one was literal, the other was float
both are float, both are SUPPOSED to be the same value...
but apparently not all code properly syncs them
zomboid things
how hard is it to remove flags from an object like 'streetlight' apparently just found out xmas string lights are some reason flagged as streetlights so when power dies. so do they...
Likely need to do a full file override
Not sure if its doable from Lua
thats what I was afraid of sadly
See if the getFlags (Or whatever) function returns a container object
oh I dont know lua at all, java I'd be somewhat versed but no pro at it.
hard enough me just trying to figure out like for debugging errors I find how to set up my workspace to be able to grind thru the code
Sexy Ewe
Just checking that this isn't against the rules before I link it; am I allowed to post a steam workshop link to a simple mod (designed for MP communities) I've just published, and invite people to test it and see if there's any issues they identify? Or is that breaking the rules?
its fine.
Designed for multiplayer servers so the four classic starting spawn towns don't get overpopulated and trashed so often. Just adds a bunch of hand-curated spawn locations to every named town other than LV.
think you'd be better off in #1478418176516558880 or #mod_portal ? not sure
Definitely keen on getting testers to make sure there's nothing wacky
oh interesting i didn't have those channels in my channel list for some reason
Now I need to make a file dialog, ugh ๐
also need to save stuff on the floor too I guess... meh.
he's so special
Is here somebody experienced in making multiplayer mods ? Im like 80% finished with my mod but like even tho im trying to make it mp it only work in sp and i dont know what im missing
What does this mean? I'm using math.floor and math.max, is there some changes related to that?
you tried to multiply two things that can't be multiplied
unless you're doing weird metatable shit that means something isn't actually a number
sounds like something that one guy with lizard pfp would do

(not prog, other dude)
i just dont know how to formulate that question ๐ i would send the files for somebody to check if he can find something that i cant
I can guarantee nobody is going to do that
because console is not telling me shit
then start adding prints
i thougt so
its like when i start in sp console have prints and mod work as soon as i press "host" and start game console is quiet and it looks like mod no longer exist :d
Is your code in client folder?
so i just found this .. the last is my mod this is in coop console and in sp it works but this is closest i've been to solution or at least i know what seems to be the problem i guess
WARN : Mod f:0, t:1775809091372, st:55ย 906ย 052> ZomboidFileSystem.loadModAndRequired> required mod "MoodleFramework" not found
WARN : Mod f:0, t:1775809091372, st:55ย 906ย 052> ZomboidFileSystem.loadModAndRequired> required mod "MoodleFramework_SafetyPatch" not found
WARN : Mod f:0, t:1775809091373, st:55ย 906ย 052> ZomboidFileSystem.loadModAndRequired> required mod "RadiationStormRedux" not found
are there any functions for getting a list of files in username\zomboid\lua ?
stop my fear of radials
i love it
idea for you guys: can you make us be able to melt butter and put it into bottles/containers
just basically treat it as a transportable drinkable callery liquid
i cant spell
its like im doing gtav yoga โค๏ธ๐คฉ
Good news @sonic needle, @vast pier and anyone else wanting custom reload types on weapons: I've figured a workaround for the changes in B42.16. Whenever the game tries to set the the reload type to a value from the enum list, we set it to what we want instead!
Meanwhile im surprised those two events exist.
Drop that into shared, rename it to avoid any conflicts, change the gunFullType and desiredReloadType and (very important) change the two occurances of NepOG_setAnimVariableFix to something else. Literally anything else, it just has to be different so multiple mods using this fix can play nice with each other.
Extensively tested for approximately 5 minutes in single player. ๐
won't making ISBaseTimedAction.NepOG_setAnimVariableFix = ISBaseTimedAction.setAnimVariable local also work?
as long as your override is still global
nice
I knew we had to hook into the time actions, I just got so lazy about and never looked into it cuz I know we will eventually have a way for it 
I'm working with Ash to see if we can also make thinsg work when aiming... since a bow also needs different aiming animations
yeah ash bow needs a fix like this now, else it wont work or will look weird so makes sense
in my case, since I am just owkring with guns I was fine waiting for now
let me know if yall need help with anything I had an idea of possibly where to target but never got around looking
struggling to detect, and force bow to use new aim state
@silent zealot @sonic needle idk if you still having problems, i try the code earlier but the reload was having a bit of issues
try this perhaps
require "TimedActions/ISBaseTimedAction"
require "TimedActions/ISReloadWeaponAction"
require "TimedActions/ISEjectMagazine"
require "TimedActions/ISInsertMagazine"
require "TimedActions/ISRackFirearm"
local customReloadAnims = {
["MWA.FAL"] = "FAL",
["MWA.G3"] = "MP5",
["MWA.M1_GARAND"] = "m1reload",
}
local function overrideReloadType(action)
local gun = action.gun
if gun then
local reloadType = customReloadAnims[gun:getFullType()]
if reloadType then
action:setAnimVariable("WeaponReloadType", reloadType)
end
end
end
local origReloadStart = ISReloadWeaponAction.start
function ISReloadWeaponAction:start()
origReloadStart(self)
overrideReloadType(self)
end
local origEjectStart = ISEjectMagazine.start
function ISEjectMagazine:start()
origEjectStart(self)
overrideReloadType(self)
end
local origInsertStart = ISInsertMagazine.start
function ISInsertMagazine:start()
origInsertStart(self)
overrideReloadType(self)
end
local origRackStart = ISRackFirearm.start
function ISRackFirearm:start()
origRackStart(self)
overrideReloadType(self)
end
...I forgot to check guns with magazines
altho the problem is the aim right
Since the ones I was was working with all have no serate magazine object
Yeah, and it's tricky because aim is not tied to a timed action
And I don't understand the quirks of the animation systems conditionals very well.
Just do that on hundreds times and run it in a second long loop.
Also, check the animation monitor with the show ticks enabled and see if you can tell what is ruining it
Anim monitor can show all the animations happening and evey change to an animation variable
it just means, that performing the action, reload succeeds in true, for a fraction of a second while aiming,
it cant be permenant
need another way to force it
gonna try a custom action.
so i finished the mod maybe if there was somebody bored and wanted to play i would appreciate any playtests ๐ i have no friends so im not sure about multiplayer but it should work - it has no visuals yet but it has like storm through whole map with one safezone but it cycles every few days to other place if u stay outside safe zone for long you will be loosing stamina, doing smaller dmg and much more or less
https://steamcommunity.com/sharedfiles/filedetails/?id=3703792549
@red tiger is working on an API (java mod) to allow custom shaders ๐
although you could prob do some simple screen overlays. (static type effects are popular for radiation)
that would be awesome i really need that i was trying to add some visuals but i was able to only just make smaller view distance simmilar to read while walking
i didnt even think of that ๐
I'm caught up getting HTML emulation for UI/UX framework stuff atm but yes shaders.
yea just have a couple noise textures, maybe not 1:1 but like 1024x1024 and display say, 90% of the texture over the screen, randomly switch between 2~3 textures and offset them randomly, should look random enough
or stretch to fit on the width, then scroll the texture up/down at random (so it covers the screen but different parts are shown each frame)
Black Moons did you try listFilesInZomboidLuaDirectory (from LuaManager.java)?
Nope I missed that, lemme check
Nice, looks perfect.
i think i would maybe like to make it more complicated later like adding working hazmat suits and gas masks but i want to have the safezone visually be different from rest of like radiated zone just hope that i did everything right rn because after i finally made it work on hosted game it made safezone outside of map but i fixed it then the main thing i wanted to work with it the "rv interior" didnt work that is like my main focus rn to make it work with that
Yea you'll have to give like a safezone to the RV interiour area of the map
I think its just across the river or something... use fast move cheat to just walk outta your RV walls
yes but only if the rv is parked in the safe zone on regular map
You'll have to hook the enter RV stuff for that
i was going through that mod im not sure if i saw there anything that i could hook it on
Tested, works ๐ thanks! I missed that looking for files and directory in the javadocs somehow
Now its just the simple matter of... writing the entire rest of the file save/load dialog.
discretely deletes #mod_portal request
todays free shitty code of the day: Save/Load of tables to disk
local function writeTable(writer, tableToWrite)
local entryCount = 0;
for k, v in pairs(tableToWrite) do
entryCount = entryCount + 1;
end
writer:write("entryCount:"..tostring(entryCount).."\r\n");
for k, v in pairs(tableToWrite) do
writer:write(tostring(k)..":"..tostring(v).."\r\n");
end
end
local function readEntry(reader)
local text = reader:readLine();
if text == nil then
return nil
end
local it = string.gmatch(text,"[^:]+");
return {key = it(), value = it()}
end
local function readTable(reader)
local header = readEntry(reader)
if header == nil then
print("Header not found in readTable");
return
end
if header.key ~= "entryCount" then
print("Incorrect key. Expected entryCount, found " .. header.key);
return end;
print("entryCount " .. header.value)
local tableToRead = {}
for entry = 1, tonumber(header.value) do
local entryData = readEntry(reader);
tableToRead[entryData.key] = entryData.value;
end
return tableToRead;
end
I usually grep over all the lua and decompiled java files to figure out if something exists
Same. but directory and files where not great keywords
Yeah. It often returns way too much stuff on the first search
Doesn't help that theres like, entire file classes and such that im sure are not LUA exposed
Like, I didn't even bother checking because I knew the chance of them being exposed in B42.16 was next to nil.
Also lots of stuff that just isn't used in the lua anywhere
That function wasn't used once
if there was going to be a 'scan directory for files' function it would have been a global/specalized with security function like you found -_-
Yea, and yet it has the new double dot security measures and stuff
Clearly its for modders ๐
listFilesInZomboidLuaDirectory doesn't even show up in any of my installed mods -_-;
Theres is also listFilesInModDirectory that is exposed to lua
Guess im one of the few whose wanted to make generic file I/O -_-;
Yea I don't get that one lol.
same with the mod file writer
"Cool, I can make my mod self-fail the checksum tests"
Make a mod that purposefully just erases some other mod.
"Common sense patch" (just deletes common sense)
"Now with 0 errors!"
But then coudn't you just overwrite those with empty files without lua
Sure, but your ruining about the only use case I can think of here. ๐
"Here as TIS, we support security... And self modifying code"
Maybe you could use it to save stuff that then gets automatically deleted with the mod
I guess?
Honestly kinda cruel though. "I'll erase all your saved data if you unsubscribe from my mod, even just for an instant!"
(especially considering how often you need to unsub/resub just because steam)
Maybe could be used for cache data or something, like if you spent time rendering something and wanted to save the results? dunno.
I assume loading a texture from \lua is more problematic then your mods media\ folder...
Do textures trigger the checksum or just .lua files?
I was thinking more about the lua folder being filled with unused files over time
Yea but mod folders are super volatile since they get fully erased on unsub
@dry stone might be interested in the concept
store your mods cached downloaded files in your mod folder so they get cleaned on unsub-resub, instead of \lua where they persist forever
(since presumably, if those files get deleted it just causes a re-download)
And might even let unsub-resub fix some weird edge cases where the files get corrupt
(instead of trying to instruct people to find a folder and delete files...)
plus hes actually downloading gasp entire megabytes of floopys.. and maybe even a whole 40meg hard drive or two.
while most people throwing stuff in \lua are filling it with kilobytes.
(and complaining about file count itself is a bit rich when zomboid uses 100,000+ files per savegame)
can you guys add a mod that lets me free fall turds over my garden plots for fertalizer?
seems realistic
Sure. Will we? unlikely.
i need to fertalize my potatos they demand nutrients
theyre growing vines

potatoboid
irishboid
๐ ๐ when ifinish my mod i can look into that
but it will come with diarhea and food poisoning expanded
so its not just butterflys and rainbows but i focus on other mod rn after that i can check it out
guarenteed food poisoning even w/ specific traits
if youre gonna add shitting you might aswell add the whole package
add the foods
different types
of stool
etc
shit (no pun intended) let us store it
for the future
i will dedicate my self to making a pooboid vault a basement dedicated to turd storage
my potatos must prevail
Nice, iv been wanting to add a new food poisoning system to the game TBH
My thoughts so far: Instead of killing you, it should get you killed
I was thinking it could either limit your max endurance (maybe that sucks too much especially with people wondering why resting isn't removing their moodle) or cause extra fatigue/endurance loss from actions
(or just a constant fatigue/endurance loss)
You'll have to do some playtesting on that ;0
Considering the first level endurance/tiredness is 50% damage, and 2nd is 20% damage... those are huge debuffs that are right up their with outright murdering the player if he gets into a fight he can't avoid
Honestly, I think the 50->20->10->5% damage on exhaustion/tiredness should be more like 75->50->25->10, especially considering exhaustion and tiredness stack -_-
25% is already a near death sentence, 20% is crazy, 10% is just murder, 5% is 'WHY WON'T YOU DIE IV HIT YOU 30 TIMES'
my radiation currently is doing pretty much the same although it add some anxiety too i think it wouldnt be that hard i just suck with models
I wanted to add food poisoning for my realistic cooking mod, if you cooked while covered in blood/dirt
Someday I'll give it a proper release ๐
omg that sounds wonderfull i love cooking in this game so much like im allways experimenting with spices and stuff that is something i love the most right after the annotated maps ๐
you mind adding worms to the turd mod
so that way they increase hunger usage
if you eat your own shit
or trash food
like rotten
why do i have so many ideas for a mod about shitting
maybe you should do it
i cant be asked to try wiht this game
i cant even work on my c# projects for > 5 mintues
this is better this is lua it is simpler :DDDD
i know
ive done roblox lua before
for many years
it makes me wonder if they support bitwise
on pz
haha no
PZ doesn't even have support for ints in LUA
thats one vector of attack gone so it makes me wonder how the 0d worked
i thought they supported bitwise
so i thought they did some weird memory shit
i guess if there is ever a study released or whatever then maybe we will know
ah they didnt add it to their luajit?
nope.
AFAIK latest LUA has some kinda support for it (And IIRC some people have made extensions to do it) but no native support
ahh i see
and PZ lua is very old
why is all the pages in the wiki for modding empty? i cant figure out what halve of the item params do
decompile the java source
just go through game files then ๐
download, install, set JAVA_HOME=yourjava25 dir, run .bat file, done
Worlds shittyest file open dialog, DEPLOY!
what is that? something you wrote up?
Yea. file dialog for my container saver/loader
nice
step 1 in being able to move stuff from one save to another.
bro if you can make a SP to MP converter that would be epic
Hoping to entice @sour island into expanding skill recovery journal into allowing someone to port a character between saves with it.
Love the "Bullshit_File_Dialog"
Technically "Base Saver" but yea ๐
I wouldn't be opposed to it, but I'll be traveling for a week
oh I want a character saver esp when Im testing stuff from SP <> MP
No rush, you have until B42.17. j/k.
I wanted to tackle EHE when I return - but also SRJ seems to have some serious sync issues with timed actions
Making it server authoritative would probably be the next step
I was hoping to stick to simple item modData ๐
I used to use the game's mod folder to store dos software... But now i don't save anything beyond the normal static assets there. Software library got moved to Cache_Folder\Lua\PZDos_Files and driven by a new package manager. I DO use the save folder to store per-save computer filesystem data, but that's only because I have/require a Java-side component anyway
Finn you work for TiD?
TiD?
roger was gonna ask yas for the love of god please add a 'server is ready' dialog at the end up dedicated bootup
Lol I just type indie stone and then fix all the typos
I have a workshop role for light moderation purposes
I dont use error correction hel I dont see colors, images, icons or any of that stuff I got discord running in IRC mode.
Yea, Mainly I was just suggesting the mod folder instead of \lua since an unsub/resub would clear any cache data.
er you mean unsub/resub clears the MOD folder right?
Yea they got to a report I made to spiffo in a few minutes. I guess they are all up in the morning
was very impressed.
afaik the LUA folder is just kind of a "random junk from mods" folder.
you should abeen in salamander chat last night oh boy someone was going off in portugese
So, i found the culprit or atleast one possible variable for the self moving trailers for the w900 mod, setting stoppingMovementForce to 0, stops the wheels from spinning and the trailer in response to move, but then why when its set to 3 its over 20 times slower moving than when its set to 1? And why is the petyarbuilt trailers fine? car physics are bonkers <.<
no yhou didnt
because those trailers move in vanilla its not mod related
ya might found the reason but its def not mod 'caused'
yea but then again, why is petyarbuilt trailers fine? atleast in my last test and they dont have 0
I dunno I cant explain it. I was the one who actually caught this first and put in a bug report about it but still havent even seen a reply about it (correction I was in the middle of typing it up but somenoe else posted it so I added to theirs mybad just got done mowing )
yea i mean even when the trailer is not moving when alone, if you attach it, it still moves the truck^^
Does anyone know if i can use SharpKnife as a crafting requirement? that way i don't have to add every knife and be mod friendly.
Version: [42.16.1] Mode: [Multiplayer] Server settings: [Host] Mods: [None] Save: [New Save] Reproduction steps: Attach Trailer Car may flip If car doesn't flip it will flip when you get in it Trailer and car continuously make crashing noise Say goodbye to your car and trailer, everything is now ...
item 1 tags[base:sharpknife] mode:keep flags[Prop1;IsNotDull;MayDegradeLight],
if its too light
a big van or stepvan it wont move it
guess its force vs mass/tire friction in that sense.
biggest issue is why it even movingt at all makes no sense.
working on stable release, but that probably answered the question. thanks
well you didnt specify that ๐
T R U E
sorry @knotty stone if I came off standoffish litterally dying here for air after mowing my 45 deg lawn hillside..
nah its all fine man
yeah after 16 dropped I started noticing every time I would log on my car was moved with the trailer somewhat then go to LV (vic was in muld) I come back and I found it crossed two parking lots lol. so then started doing some testing and soon as I unhooked it noticed it inching up to the car then flipped it over. I was like okay.. thats not right lol started typing then seen Alargetophat's post about it so I added to it
found another thing ~.~
not moving by itself even with stop force = 3
moving
so when its completly horizontal its kinda accelerating? xD
so yeah somehow some force is pushing them. for no reason.
too bad there isnt a bug discussion channel. hate going off topic like this
In my mod, I have an item... When that item is created, I need some script event to set a bit of mod data on it with a random number.
is there a "best way" to handle this?
math.random?
I mean the actual event
oh cant help there my lua knowledge sux atm
in recipe you use OnCreate = function
Will that go off if it's found as random loot in th world?
Ah, drat.. I was looking at OnCreate before too, but it seemed not flexible enough
Well if I find a way I'll leave a message here. In case someone else searches the discord later with the same question
i mean you could always check when events.OnFillContainer fires if your items is there
Textures still not done, I plan to add in some details like the blade having an actual edge, and possibly adding in visible welds to parts that are welded on instead of threaded/taped.
I plan to start adding in some more cosmetic variants, stuff like camouflage tape, and I also plan to add compatibility with my survival additions mod, which would allow you to attach parts using duck tape instead.
The synthetic parts will also have cosmetic versions like the tape, maybe even some fictional brand logos.
I figured it out. You do this in the item definition:
{
* usual fields here *
OnCreate = PZDos_OnCreateRandomFloppy,
}```
Then you make a little function in LUA to catch it (very proof of concept code):
```lua
PZDos = PZDos or {}
function PZDos_OnCreateRandomFloppy(item)
if not item then return end
local md = item:getModData()
if md.PZDosRandomized then
return
end
local n = ZombRand(1, 11) -- 1..10
item:setName("(3.5HD Floppy) Random Software (" .. tostring(n) .. ")")
item:setCustomName(true)
md.PZDosRandomized = true
md.PZDosRandomValue = n
md.PZDosDescription = "This item is " .. tostring(n) .. "."
print("[PZDos] Randomized " .. item:getFullType() .. " -> value " .. tostring(n))
end
It does go off when i create items in the debug item list window.. I think its always supposed to go off on item creation. I'm gonna try making it random world loot and see if it's still working there too
Why create PZDos and then not use it
That LUA file will eventually grow
wouldn't it need to be PZDos.OncreateRandomFloppy
oh... hmm...
xd
I get what you're saying.. I used the underscore in my OnCreate= in the item def as well
so if I swap that for a period which would make more sense, I hope it still works
I mean it will work either way, it just wouldn't get put into PZDos
It technically doesn't NEED to be in my PZDos with ..basically the rest of my entire lua-side of my mod...
but its kind of a code smell if it isn't
I don't bother with it for my oncreate functions, haven't had a reason to
I'm sure there's reason to, I just personally haven't needed to
Writing software made me a bit of an organization freak over the years
its completly not moving 
now all it needs is a massive explosion at the 6 second mark
and then insert clips from the end of terminator 2
Hey guys, Iโm still working on my mod an now im trying to make a hazard/safe-zone system use the vehicleโs real world position when the player is inside a vehicle interior, instead of using the interior map coords but itโs not working.
Right now I fall back to:
return RSR.getPlayerPos(playerObj)
And when the player is inside the interior (from rv interior mod) I try to use:
local rvData = ModData.get("rvInteriorMod")
local interiorData = vehicleBucket.interiorData[interior.interiorInstance]
return interiorData.vehicleX, interiorData.vehicleY
Then the actual check is just:
local px, py = getEffectivePlayerPos(playerObj)
return RSR.dist2D(px, py, st.safeX, st.safeY) <= radius
So the idea is:
inside vehicle interior -> use stored vehicle world coords
otherwise -> use normal player coords
But in practice it still doesnโt work for some reason. Am I missing some catch or am i dumb pls help
im desperate ๐ ๐
if you have enough debug prints you should be able to find where your construct is failing
Hmmm... no wonder you sometimes see ppl attaching trailers and they freak out, vanilla cant handle over 90ยฐ vehicle to trailer 
Guys... What would be the correct BodyLocation for a suit that includes boots, trousers and torso in one item?...
AFAIK animal trailers now bug out >50% of the time on attach (vanilla trailers)
Thats what iam fighting right now, will have to build a coupling with the physic boxes <.<
Does that command to directly cause a thunderstrike still exist in B42?
for admin yes supposedly
Seems like it is just "Trousers;Jumper;Hands;Shoes"...
So glad they took this opprotunity to make car physics.. worse somehow.
oh you can fix the physics of vic with the vehicle editor
'but no we can't fix any of the car bugs because we're going to rewrite it all someday!'
move the center of gravity forward 3-4 grids they dont squat anymore and drive level
@frank lintel Honestly moving the CG forward makes the cars drive so much better too, no more massive understeer, but then they squat forward.
(and wheels start clipping through the ground again)
well thats why I dont move it too far
def helps with vans and step vans
was gonna make it a mod if that was even possible cuz any update/or file verify those changes gone poof.
just like the fix for rainbarrels
Eh, LUA can override existing vehicles
most of the values anyway.
Yea.
Im pretty sure you could just scan all cars and move it forward. I considered doing as much with RCP, but the forward squat annoyed me... Was hoping someday TIS would have per-wheel springs or something but meh, I think id need to alter baseVehicle to get that working
there actually is some disabled code in baseVehicle for hydraulics (But they extend so far and so fast they just phase through the ground and sloowwwllyyy lift your vehicle up)
lowriders incoming? xD
hey here's a question what Lua version we using IG? 5.4?
k thanks I was looking at reference manuals wanted to make sure I got the right version before wasting time
So.... I'm kinda horrified now...
?
Well...
I tried to make a mod which would add two hazmats. For one of them I've decided to make options to wear it:
All suit without helmet
Trousers and boots
Just trousers
And now I've realised that I need 3 XML files for those extra options
And I do not know what models should I choose for it
The m_MaleModel and m_FemaleModel confuse me
heh I was thinking of a hazmat game mode where you had to worry about getting infected from any cuts if you had blood on you etc
In multiplayer b42, is the game code built in a way such that executing player:setWornItem(bodyLocation, item) always triggers a clothing update on the client?
That could be a cool idea tbh
why Im digging for Lua reference manuals lol
So... Would you maybe have some advice on those xmls?..
me no Im a total newb in this game modding.
Fair enough.. Thank you anyways
@dry stone Saw this on the other PZ modding discord, by @stuck siren
https://cdn.discordapp.com/attachments/1405935727442792510/1492237128959262841/Video_del_2026-04-10_20-56-09.webm?ex=69da999f&is=69d9481f&hm=f94dab83b93f49de0fe2196d884c25352693950d1e3d1e46182b5b1155d170f1&
for a second I thought the computer skin was for your dosbox mod
i just got my first comment on my mod im so proud lol
That's pretty cool. It's something I want to do, but it's not that easy.
like you'd need to come up with good in-world text to put on files and such for the player to read
so..writing skills.
Question: Can Kahlua2 (PZ's lua) since its made for java implementation. Still call C functions? ๐ค
no
Just wondering if it works side by side with Java and C or it replaces C.
there is no c involved, kahlua's vm is implemented entirely in java
okies thanks rather ask then guess. reading 5.1 manual atm.
How can I make fluidcontainer under 50ml ? I think java limit the minimum amount
item Naloxon
{
DisplayCategory = FirstAid,
ItemType = base:normal,
Weight = 0.05,
UseWhileEquipped = FALSE,
Icon = AmpouleYellow,
DisplayName = Naloxon (5mg),
Medical = true,
StaticModel = Ampoule,
WorldStaticModel = AmpouleGround,
component FluidContainer {
Capacity = 0.05,
ContainerName = Ampoule,
Fluids {
fluid = Naloxon:0.001,
}
}
}
When I spawn it that show "50ml/50ml"
could be wrong but 0.05 would be 50mL wouldnt it?
Same thing with 0.01
it could be the bare minimum like you saying then
or its coded not to go lower (hard coded)
Gonna check in java how can I change it, I send it here if I find something
Maybe engine limit ig
public void setCapacity(float capacity) {
this.capacity = PZMath.max(capacity, 0.05F);
}
found
yeah thats what Im thinking like there is an absolute range you have to work within..
heh nice
you gonna make epi pens?
No, I made a remake in b42 of iMeds
(Immersive Medicine)
that sounds almost like ACE medical level type stuff from Arma3
different bandages, epi pen, morphine pen, and a few others then go thru the process of bandaging each body part etc
able to go uncon not just outright die etc
Fuck its hardcoded 
not at this realism x) Last year i made a mod that reuse 3d model from tarkov
interesting
@frank lintel look 
would but it got yanked
Oh, no I was just talking about the way his window looks like a computer
It did look really nice. Used to have an old 286 when I was a kid that looked a lot like it
you want my old cpu I got laying here? its a....
grabs a box....
AMD Phenom II Black x4 965 still in the box..
My mod adds 35 CPU items to PZ ๐ ... and not a single one of them could run PZ lol
also got a spare 1950x threadripper new in a open box never installed
PZ only java really prob even win7 boxes can run this
I just went looking about and I ended up finding a 4 disc set of 1996 Slackware official in the case... lol
From Ye Olde Days of buying linux on discs for a few dollars.
Then sharing them with friends, except that lacked the excitement of piracy because it was legal.
I'd have to look up what the price of that was I cant remember
$40 according to google in 1996
Standard Set: Walnut Creek CDROM, the official distributor, sold the Slackware 96 4-CD set for $39.95.
I remember it being cheaper than that, because anyone could make the discs themselves and there were a few groups doing so at cost.
But that's specific to Sydney Australia and being near a university with linux users groups
they also prob had access to a drive burner which wasnt that common either back then
Yeah, I had one in 1996 and would copy CDs for cost... $7 per blank.
think my first cd burner drive was a creative one made by the same people of soundblaster
Then disc prices went down when I found really cheap ones in 25 disc spindles for $2 each
Burning at a blazing 4x speed, so 15 minutes of being extremely careful not to bump the desk or the disk would be ruined.
yeah I remember them days
now I got a Pioneer BluRay burner
never use it, just sits in the box when I occasional need to back stuff up
It's been a long time since I had a DVD drive hooked up
years ago I was adding a hard drive and went to steal the sata cable from the DVD drive to use, and realized I'd already done so.
I figured if I'd not noticed the drive not being hooked up for 2 years I didn;t need it ๐
Now I have a case that doesn't even have a space for a DVD drive, instead having better cooling.
whyI love this pioneer its a portable USB one so just pull it out of the laptop case and plug it into my desktop or laptop when needed
no wasted space
I mean honestly at this point if it was installed in the case it be nothing but a dust collector
Most computers will boot off a USB drive these days, so even a recovery CD has limited value these days
I just prefer hard copies of stuff old fashioned
Dear developers, can the pz module currently link to databases such as mysql or sqlserver? I made a module here. Part of the code involves data storage, which needs to be stored according to the player's steam64id. Because the ID is usually 17 bits, the current pz will force the last three bits of the ID to be ignored, resulting in abnormal data recording. Is there any case linked to the database?
you could probably do that through java modification, or if you're on a server then probably through lua, and have another code read out the output of the server (where you would inject specific data you want to store using the lua code) although the 2nd option would limit you to a 1 way communication, with the first you would have to burn in and store your credentials locally, which usually is a bad practice. you could also create an api server and have the game talk to that, which talks to your sql server
there might be other ways of doing it though, I do know the savegame is stored in a database, but that's local
I am trying to update a trait mod of mine (I only made changes to the lua script and trait costs) but it wont let me update it as an existing item. keeps saying "Error requesting Steam to update item." Maybe someone knows why this could happen?
well just googling... To fix the "Error requesting Steam to update item" (often Error -3 or generic failed update), first restart Steam and log in again to refresh authentication. If that fails, clear the Steam download cache,
also last part was... (had to look it up) repair your library directory...
`
Repair Library Folder
The Steam library folder contains all of your installed games on disk. These folders need to be writable by all users in order to update properly. Sometimes these user permissions break and need to be refreshed.
Navigate to your Steam -> Settings -> Storage -> ... -> Repair Folder`
albeit Ive never seen that happen
Do you guys know some good reference mod that add item that uses vanilla battery ? I cannot find it in vanilla nowhere or maybe idk im just dumb how it works like i want to add like radiation scanner to my radiation mod so you would know where the safezone is only when it would be turned on and had battery so its more hardcore but i also want to tweak it so battery would run out quicker then from other items
I tried using URLClassLoader to attach MySQL connectors, but PZ seems to prohibit attaching jar packages through mods
It's the use delta
Java mods need manual installation
not seems, outright blocks io.* and os.* I believe
Oh so i just go use delta then okay
If I remember right yea, give me a sec I'll verify quickly
UseDelta = 0.006,
Yea that's it
Increasing this number will increase the amount of uses are consumed from the battery
Thanks
SimKDT you'll likely know this... in mod ordering (this isnt always so Im not assuming) is it top down for depenancies.
Ive seen games being wierd where if B needs mod A to work they have A below B oddly albeit common sense would say A needs to be loaded before B...
Camo tape, and rusted textures
It's top down. Mods at the top will be loaded first
In general however, if load order matters, it's either that you did something wrong, that your mod is a patch to a script mod or you are being very aggressive with you are doing (for a good reason or not)
For Lua mods, load order literally doesn't matter, because if you depend on the Lua files of another mod, you should require those files at the top of your files that need to be loaded after those. It's more problematic if you want your Lua files to be loaded last however but there's no good solution for that however, in B41 it was easy to do, and now we're kind of fucked
thank you. someone was saying they had a mod kept getting disabled when using 'auto mod ordering' I was thinking they missing a dependant mod so auto order was disabling it. and they couldnt grasp what I meant by dependancies
so rather ask so I knew how ordering went rather then assuming
Oh, no thats if you have a 'load before' in your mod, the autosorter just pukes and disables half your mods
EVEN IF THAT OTHER MOD ISN'T BEING USED

I fixed it in like, an hour for bugzapper but never updated bugzapper past B42.14 or something.
also reported it to TIS, so we should see it fixed sometime around... B45
Yea like Black Moons explained
๐
I have no idea how drunk TIS was when they wrote the autosorter code because I couldn't even figure out how it worked nevermind how it didn't work.
yeah just without knowing to me that was screaming 'hey I cant find your needed mod so Im turning ya off incase..' type shit.
I got half as drunk and it was pretty easy to write a replacement
was gonna say maybe I'll dig thru java source code and look
the ordering code is Lua wut?
Heres my fix
Lua* 
The whole UI is Lua
The majority of stuff related to UIs are Lua
hmmm
That means the Mod manager is Lua
ModLoadOrderPanel:autoSort() is what you wanna find in the vanilla if you wanna edit it
Or just use my code and mention who wrote it if you include it somewhere shrugs
ofc
Don't implement that in your mod, make that something standalone ๐
Yea. I really just need someone to go through bugzapper and see what bugs still exist -_-
maybe re-release it since its been hidden long enough nobody remembers it anytmore
also need to rename the files so that they don't cause conflicts with existing mods..
If I can get my IDE to start playing ball cuz I been out of the coding world for about 5 years now... if this was pure java I'd be already rolling but just seting up a workplace is new stuff for me. Netbeans dont have this.
ModOptions.lua was.. a poor choice in filenames
writes in Programmers Notepad
and nor does it have the Lua stuff I need so Im going fresh into VSC
Has syntax hilighting.. what more do you want? Kids these days...
that or Im writing up a plugin for netbeans for Kahlua2 lol which Im not wanting to try
moons Im 55
why in my day, I had to program in edlin
checks.. Edlin was released 1980
honestly my first editing was done echo and cat I think
echo's Ctrl-D to Moons terminal
jeez wtf
I think it was like 1992 or somewhere before my first PC, but I was only like 7 at the time.
I had an atari 800xl but that was more just a console with a command line
I think it was a 8068 later upgraded to 286
I owned a very rare 80186
I miss the old expanded memory card... DIP's in sockets as far as the eye could see.
think they were only on market less then a year
omg I forgot about memory card. wow
Back when a gig of ram cost... as much as it does now!
lol
did you see the photo I posted yesterday of a old CD rom case I found I still had?
At least iv heard some of the datacenters are no longer going up anymore after they realized its not worth building datacenters with ram at 3x normal costs...
nope.
I still had my FF7 box till awhile ago... was pretty bad condition after all the moves so I ended up throwing it out.
I think I still have the CD's in a binder somewhere...
I was surprized I still had them in the original case
now that Im thinking about it might as well break out the portal blueray drive and test if the discs even still undamaged
wow talking about flashback 2003 Microsoft Works & MS Money on official CD install
@red tiger honestly it just feels like some really weird legacy BS where they should just make GetColorRed call getColor():getR() or just delete GetColorRed already.
Just wait until people start learning how to hex color values. :)
the fact named colors exist (and we can't make new ones?) bugs the hell outta me, especially since it seems the only way to color fluids.
Extra cursed: you can have multiple fluids with the same translated name, and the tooltip displays them as a single fluid
At one point I was considering forcing people to judge their oil quality by the color of the oil.
we lucky its not CMYK....
Does anyone know where I might be able to look at the code for Graceful's sound dampaning effect?
... Should I tell him how dyes have fancy dancy special color blending code?
lol
I'll be adding CMYK and all the color conversion algos.
oh I for a short time worked a book printing company colors goes deep deeper then most people even know about
Then you should be made aware that TIS blends fluids in the improper gamma colorspace.
why am I not suprized...
they think 0,0,0 mixed with 255,255,255 50/50% should be 127,127,127 -_-;
Yeeep.
lol
they forgot the 1.4 gamma correction -_-;
(or was it 2.2 for lighting colorspace? its been so long since I did that part of my engine shaders)
this is exactly why I tell people for example.. Im looking at a Orange color and they like no its red... facepalms
Yea, the hue shifts are where it gets really apparent your 'doing it wrong'
alot of times thats also on the monitor not being calibrated too
the human perception leads to errors cuz they keep trying to correct for something wrong when its their perception that is 'off'
My fav is those old games where the dark shadows become a mess of saturated greens and purples
heck people forget even the ambient lighting around them effects what they looking at.
Yeep.
Ambient light simulation is a pain in the ass too. In brutal nature I just hacked it by adjusting ambient light by depth as you dug deeper lol.
Didn't even bother loading a terrain map into the shader or anything.
took me forever to find even lightbulbs that had accurate sun color so my eyesight of colors dont get effected from going from day to night. (used to take photos alot and noticed this was a real issue actually)
Comix Zone?
I was thinking thief
hahah yea, I made my own product photo booth. Its really hard to find leds with the same spectrum that don't cause weird rainbow shadows
can't mix CFL and LED's at all
(at least, hard to find cheap leds that match)
im sure if I paid like $500 for proper photograph booth leds everything would be fine.. but that buys a LOT of $10 led bulbs to try out
yeah if you want legit color matching those lights gonna get expensive
too many times got a bulb that was 'sun color' only to get home and put it in and its got a slight green hue to it... imho
yea all the CFL's I tried where very green compared to the leds
ah great to know it wasnt just me lmao
I just been going thru all my saved CDs/DVDs and omg feeling old... just pulled out a copy of BF2.... Joint Operations... Task Force Rising... the original Halflife on full disc set... FML
pretty sure I still have my apache and hind CD's
I even got a copy of... Freespace and Unreal Tournament..
did you know you can fly the apache upside down in that game by tilting back at like 45 degrees? lol
(yes under full collective)
oh I do that in helos very rarely in DCS with a lil bird cuz how light they are if you can get it flipped over in time and reverse the collective make it go fly upside down for a brief moment
thats a odd physics bug.
I mean, the helo wasn't level upside down, it was 45 degrees or so off upside down so it had a very high forward velocity.
You'd get level flight once you got going forward fast enough, to presumably get enough lift off... something, I dunno ๐ the rotor? the fins?
Sure, but I also wonder if helos with big enough 'wings' could do that at some angle.
thats normally why helos got the small wings on the tail rotor to eliminate it
Like, a helo at 90 degrees with big ass wings, is basically an prop aircraft.... with wings at 90 degrees.
makes it wanna fly level
So presumably, if you can tilt those wings forward a bit, you can get lift off them by moving forward.
The question then becomes can you move forward fast enough to get more lift off the wings then your rotor sucking you down into the ground.
... Now makes me wonder about making a helicopter with tilt-wings so it can just fly with its rotors full frontal
... you'd prob be able to fly faster that way, just because now you no longer need to worry about your rotor exceeding the speed of sound so soon (And no tailing rotor stall) with your rotors no longer spinning off axis to the direction of travel.
Yeah it'll be fun getting all the dimensions and color formats put into my webcalc engine.
Sorta like the inverse helicopter version of an osprey.
Tilt the whole craft to move the prop around, and then just angle the winglets for lift at 300kph+
If you don't need your wings to work at landing speeds, they don't need to be nearly as big to generate enough lift.
planes also rely on the body itself as a lift surface
People, getting this error on a trait mod on multiplayer:
ERROR: General f:9, t:1775939615622, st:3,036,394> Lua((MOD: Infinite Endurance - Mugen!)).stamina> Exception thrown
java.lang.RuntimeException: attempted index: getStats of non-table: null at KahluaThread.tableget(KahluaThread.java:1441).
Stack trace:
se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1441)
Lua((MOD: Infinite Endurance - Mugen!)).stamina(MugenTrait.lua:18)
se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:458)
se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:161)
se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1749)
se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1581)
se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:60)
se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:131)
zombie.Lua.Event.trigger(Event.java:55)
zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:244)
zombie.GameTime.update(GameTime.java:661)
zombie.gameStates.IngameState.UpdateStuff(IngameState.java:594)
zombie.gameStates.IngameState.updateInternal(IngameState.java:1497)
zombie.gameStates.IngameState.update(IngameState.java:1298)
zombie.network.GameServer.main(GameServer.java:1015)
ERROR: General f:9, t:1775939615623, st:3,036,395> KahluaThread.flushErrorMessage > dumping Lua stack trace```
Apparently line [18] is causing the problem? I dont really know if thats it:
``` Lua((MOD: Infinite Endurance - Mugen!)).stamina(MugenTrait.lua:18)```
The line:
``` [Line 17] local player = getPlayer();
[Line 18] local stats = player:getStats()```
Is there somethin wrong here?
Is it done differently on multiplayer? Code is same as last time:
local player = getPlayer();
local stats = player:getStats()
local endurance = stats:get(CharacterStat.ENDURANCE)
if player:hasTrait(HoginsTraitRegistries.mugen) then
if endurance < 0.99 then
local infi = { endurance = 1.0 }
if isClient() then
sendClientCommand(player, "HoginsTraits", "UpdateStats", infi)
else
stats:set(CharacterStat.ENDURANCE, 1)
end
end
end
end
Events.EveryOneMinute.Add(stamina);```
Works on singleplayer fine
Whose the player on the server? ๐
Idk, i used to do it like that on b41, i have no idea on what they changed
Server = Has more then 1 player. Or maybe 0 players.
getPlayer() returns.. a player. So of course its not valid on a server.
Ah, i mean, i was in there as a player testing the mod, but thats the error i was getting, and the trait was not working, the function at least.
Is there something else i need for it to work?
and send command to each
How do i do that?
i mean currently you send command from client to server to update the stats, no?
cuz that looks like client code
then why its ran on server
is it in shared folder?
move it
Yes
why?
The mod i was copying had it on shared folder, and it works on multiplayer.
The mod is "More Traits".
move relevent code to client folder
shared folder loads both on client and server
thats why on server your code errors out
Moved it to the client folder, i don get the error anymore but the trait still doesnt work...
is it possible to use the vehicle window reflection shader thingy on other models?
it's not possible
sad
<@&671452400221159444> :(
Cheers
Forgot to mention that now your whole workspace scripts are parsed instead of just the currently and last opened files
There's gonna be a few normal camo patterns, and then grayscale colored camos.
I'm also going to be adding in compatibility with my survival additions mod to include the duck tapes as a binding option.
It's not gonna be a dependency, I'm just gonna have a lua check if the mod is present which will enable/disable it from the data/loot pool.
Meaning if you remove SSA while your gun has duck tape straps on it, nothing breaks and it keeps the straps attached while still preventing random loot spawns from having duck tape straps.
It's really really funny that I've been workshopping this mod concept for over a year now
Didn't think I would ever get this far tbh
More malicious mods doing the rounds... not surprising when lack of proper mod support means users are installing ASI overrides with who knows what code in them.
I'm sure there will be a malicious Zomboid Java mod before too long.
Hi everyone, can somebody help me to make sense of this error? it happens when i kill a zombie thats using modded clothes:
ERROR: General f:15789, t:1775972991960> IngameState.updateInternal> Exception thrown
java.lang.NullPointerException: Cannot invoke "zombie.characters.WornItems.BodyLocation.isMultiItem()" because "location" is null at BodyLocationGroup.isMultiItem(BodyLocationGroup.java:119).
Stack trace:
zombie.characters.WornItems.BodyLocationGroup.isMultiItem(BodyLocationGroup.java:119)
Is it because incorrectly setting up body locations?
does it occur on aim? or
whenever the zombie dies and turns into a container, then the game crashes
reference a z with a sc, then kill to confirm the crash.
then scan said image to see what clothing it has
Track the clothing to the mod. and check the script for it
Got it will do, thanks!
My guess is the modded clothing has not properly defined bodylocation and/or bloodlocation, but in a way that doesn't crash until it's trying to make a corpse; probably when "dressing" the corpse object.
No idea how you'd make clothing crash there and not earlier though.
Is this modded clothing you made? if so share the item script.
could be that the mod is switching out the clothing model on death for another one?
that could explain why it only crashes when thr zombie dies
Is there a IsoFlag or whatever way to differentiates a wall built by player and a wall part of the map?
Possible, seems unlikely though... I'm guessing the rendering of the corpse to the 2D texture atlas is doing something.
I have no idea how, but there must be given zombies can attack player construction but not pre-made map constructions.
yeah, that could be as well
When modding B42 multiplayer, is there a debug option which can be used to spawn zombies?
When I host an mp game via the "Host" button, I don't have such a right click debug menu. (I only have it in single player.)
You need to enter admin mode I will assume
Also you should see the option regardless if you are on debug
Anyone know how to make a container I spawn like
local object = IsoObject.new(getCell(), square, getSprite(tileName))
square:AddTileObject(object);
not have items in it on spawn?
if object:getContainer() then
print("Found items ".. object:getContainer():getItems():size());
object:getContainer():clear();
object:getContainer():setHasBeenLooted(true) -- Testing if this removes spawn items.
end
Doesn't work, it shows it initially has 0 items in it and then items spawn in later anyway.
nm, figured it out, setExplored(true)
Project base saver: GO!
though comically, since I didn't copy the roof, you can do this:
How do I enter admin mode?
/setaccesslevel {name of char} admin
yo does anyone know how can i make a mod for the main menu? like change the music and picture, is there maybe some guide or sm?
Where do I put this command? (sorry for asking again but I wasn't able to find anything about it via web search).
what ever you use to open the chat in mp to write
thanks! I'll try this!
Progress. doors now work properly.
Looks like terrain isn't quite blending properly on import though. grr.
I love zomboid souls
shotgun porn
Does anyone know the best way to test a MP mod? Like how I can connect two separate instances of the game to my own local server so I can test the MP features?
For clothing items worn by the player character, is there a java command to make it invisible? Something like clothingItem:setInvisible (true)?
say guys I'm noticing a large rise of newer mod makers putting the games mascot (spiffo) though AI gen or using ai gen images for their mods, is there any rules about that or the indi stone just okay with it?
people have been doing that for years, i don't think they care
When an event like OnClothingUpdated is triggered, is there a way to find out which function has triggered it?
little treat for the cowbows out there
hell yeah
cowbows? :P
someone add the epstine files and make them readable with real file pictures that were officially released by the DOJ
theres no reason why such an interesting topic cant be copiously read during an apocalypse
should give +10 sickness and +5 depression but -10 bordom
and slightly increase panic
"the knoxfiles"
In multiplayer, is it possible to view the debug console without being in debug mode?
well unless ` shows it, no.
in the zomboid folder you should have the console.txt file, that should contain the data whether it's from single player or multiplayer
mp logs arent like console.txt sadly they broken down into several log files
wish they had the whole thing in one file would make it easier to look thru like how it is for SP
wait did you get custom gun anims working
I did
oh lol typo haha didnt realise
for a minute before I watched I thought you meant you added crossbows lol
All hat and no cowbow.
sup BM
Making mimic houses
Now with 90% mimicery.
(actually working on saving/loading entire bases to disk)
nice, I've just been doing some wiki stuff for PZ and helping in discord taking a break from the game today.
lol at deleted floor
gotta burn that carpet!
Need to replace it with some kinda tile
lmao i thought that was just burnt
thanks for telling me, that could of been bad!
yea im not sure if you fall through or not but black tiles = bad mojo (From a fellow black tile creation enuthiest)
nothing actually happens, thats why i thought they were just burnt tiles lmao
Hmmm, I THINK I might be missing some kinda... corner wall special thingy?
Iv identified the buggy piece of wall as a 'dual' corner
... cool visibility glitches there TIS
lets just see right through the walls with no windows, sure
Know what? Someone else can fix this bug. yep. It works well enough so long as your not trying to duplicate/move your base.
what yall think about an in game map editor, well basically it allows you to walk into any structure, press a keybind, the entire building gets saved inside of an UI and you can spawn it where ever and when ever
You mean like whata im working on right now? ๐
๐
Also saves it to disk.. so you can extract your base to another savegame.
now THATS something i couldn't figure out..
the way i did it was throwing the buildings orientations and sprites into mod data layer by layer then having another lua be able to capture it
@sour island says he might allow Skill Recovery journal to do the same (save to disk) so you could port characters too.
i thought Lua couldn't write?
Only to very specific directories, in text only.
ah okay,
... also to the entire mod directory, incase you wanted your mod to self-fail the checksum on any MP server.
have you run into the problem where doors and windows dont work?
Yep and solved it
took me weeks lmao
they are all different types of derived isoObjects
i render the tiles out so it shows the whole building and where exactly you will place it
... I can't post my source apparently lol
lemme try a smaller chunk
if instanceof(object,"IsoLightSwitch") then -- Isn't properly detected
writer:write("tileType:IsoLightSwitch\r\n");
print("found tileType IsoLightSwitch");
elseif instanceof(object,"IsoClothingWasher") then -- Isn't properly detected
writer:write("tileType:IsoClothingWasher\r\n");
print("found tileType IsoClothingWasher");
else
local tileType = getSprite(object:getSpriteName()):getProperties():get("IsoType") or "IsoObject" -- Handles most but not all objects.
print("found tileType "..tileType);
writer:write("tileType:"..tileType.."\r\n");
end
writer:write("attachedSpriteCount:".. tostring(object:getAttachedAnimSpriteCount()) .."\r\n");
for attachedIndex = 0, object:getAttachedAnimSpriteCount()-1 do
writer:write("attachedSprite:".. tostring(object:getAttachedAnimSprite():get(attachedIndex):getName()) .."\r\n");
end
there we go.
i've pretty much given up on my grand ideal, but since you're already taking over, i have no worries lmao
thats my special sauce saving code ๐ that saves sooo much elseif instanceof() BS
You wanna work on the weird culling bug when you move a base? lol
MOVING the entire strucuture after you've placed it is out of my leauge lmao
the only thing i can offer you from my script is the render for all sprites so you get percision placements but im guessing you already have something like that
no I mean, when you place it somewhere it wasn't, the roof and walls don't quite... appear correctly
its just a couple of them but
probably just need to tell the cutaway system to refresh
oh, the roofs are special objects or something like that right? i had that problem too
thats the weird part though, its so.. few tiles
And that one inside corner tile has the glitch too
Not that I can tell -_-;
because most of the roof is there
comically I figured out some code that lets you turn entire buildings thumpable lol
Yea, it shows up fine from like 80% of angles
ohhh so it IS there it just vanishes from certain angles?
Yep
same with that bottom right corner
saving/loading the save doesn't fix it either ๐ (does fix some other weird visualization bugs)
im 90% considering this a mod to drop a base in the same place it was, but I kinda wanna see what happens when someone moves a 'player built' base with it.
Like, do player built bases move properly? Do they suffer any bugs? Do player built bases inhairently suffer the same bugs that my reproductions do and hence look the same anyway?
Much of my code is based off lua\shared\Moveables\ISMoveableSpriteProps.lua aka the ingame building code, so I feel like it would have similar bugs
Im not too upset about.. slight graphical issues, considering TIS just shitcans our bases to oblivian every 30 days anyway...
this might be a longshot but what if it's missing a room defininition?
what if the invisible pieces happen because the game failed to assign it a room definition, when you place normal walls and they're not making a full room (enclosed) some of them are invisible from certain sides/angles, i think this could be the same thing
Also oddly enough, the graphical issues don't occur if I replace the house in the same place it was.
palyer built bases never have room definitions
Yea I looked into that a bit but I couldn't figure out how to do room definitions
interesting,
just think about it
if you go and place a 3 by 3 by 3 brick wall leaving a side open, the side of the walls are invisible from some angles until you full enclose the box
Also why I wonder if my save/loader would convert player bases 'fine' because they 'suffer from the same bugs' my reproductions do
Im now also kinda wondering
it seems like tis is working on a room editor, and it seems like it's not supposed to be a debug tool
Yea
the weirdest thing though
the lights work!
lightswitch and everything
Like in the reproduction building
have you tried recalc all neighbors?
what about IsoRegion.isDirty
yea I do RecalcProperties() on every tile once all the changes are done, then do RecalcAllWithNeighbours() (in a seperate pass, just to make sure..)
IsoRegion.isDirty?
square:setObjectsDirty() i think it is idk
from google
"Function: It is used to tell the game engine that the objects on a specific map tile (square) have changed and need to be re-rendered or updated by the rendering system."
DirtySlice?
i dont know i just remember using it when i was attempting to build it lol
damn i guess there isn't one ๐ญ
im almost certain its some weirdness with 'corner' pieces being two walls
because it only happens on that one inside corner piece
(and I assume the roof has its own weirdo corner pieces)
death to corner pieces
anyway, I'll be releasing a test version soon if you wanna help me test it
im down
Cool ๐ It also has a container saver/loader
(that was gonna be my backup plan if saving entire sections of the map failed to work, lol)
Plus... teleport shit across the map ๐ Or have startup gear sets
idk about something that can upload/write words or anything outside of zomboid, after those recent security issues ๐ญ
it only has access to users\zomboid\lua and subdirs of that, lots of mods (and the game itself) use this file writing functionality.
oh so it uploads to the Zomboid user folder?
yep!
on servers it will prob stay on the server, because... Lets be honest, you'd only want admins to have access to this anyway lol
with my version i was able to copy the entire Crossroads Mall lmao
(and prob have the admin backup the entire world before importing a whole freaken base)
or have a function that can purge spawned bases
did you handle loading areas outside of what the player had loaded?
that'd require saving the existing map... TECHNICALLY DOABLE....
Actually, that'd be some interesting anti-griefing too
potentialy for accidental duplication but if your base burns down or something, IMPORT
why cant you have the house have a specific tag for each room that allows the lua to know its a imported base so it can purge, additionally let non admins have a limit to how many tiles can be spawned and how many bases if that makes sense
Oh no, id just have it save a backup of what was there when you import something, and then you could import that backup to purge the base
oh
also, seriously you'd never want non-admins to be able to just spawn a base lol.
the point of this is less 'playing around ingame' and more 'TIS just nuked our saves, AGAIN. Lets just re-import our base into a new world and continue'
but you can detect how many tiles (literally every tile and sprite) that the building you're spawning has, maybe have a limit implemented for non admins if you ever tried something like that
idk what im yappin about im trying to finish up a script for someone lol
Nah, if someone wants to make a mod that calls my save/load functions go ahead but I really don't have any interest in letting non-admins play with this lol.
its just... far too powerful lol. If players wanted to use it, it would be soooo rarely done, you can just beg an admin to do whatever for you.
thanks lol.
Right now iv got the majority of isoobject subtypes loading, and seperate container loading, with selectable filenames on save/load (And 0 safety to make sure you load the correct file because blahhh lol)
will prob add extensions and filtering at some point ๐ or two sub dirs
Right now though I just like going SAVE... empty container ... LOAD like a dumb magic trick
or smashing a few walls and reloading a building
God, I HATED basebuilding because 1 wrong move with a sledgehammer? Well now, better restart the whole damn server to a save I hope you took 5 minutes to make because you can't undo that!
Come to think of it, that might be another use of it... 'autosave' for deco, but doesn't actually restore container contents
has anybody ported wolfenstein into zomboid yet?
local function OnPlayerGetDamage(character, damageType, damage)
-- your code here
end
Events.OnPlayerGetDamage.Add(OnPlayerGetDamage) Is there a way to use this event before instant death like car crash, when damage exceeds a players health this event doesnt seem to fire
Looks like that events tends to get called after damage is applied.
the last is damagePlayers from BaseVehicles which would cover car crashes.
I just basebuild using dev mode brush tool. I've done things the hard and slow and tedious way often enough!
@silent zealot How do you find stuff like that? Is it just experience or do you get them from a specific resource?
I have a VSCode window open to a "reference workspace"
This is the games media folder, and the decompiled JAva (thanks to ZomboidDecomiler which is super easy to use)
Then I just search for "OnPlayerGetDamage" and in this case there is a reasonable number of hits to look through.
Since the event name has to show up anywhere in the code that triggers it.
Thanks. I've bookmarked the wiki page on Zomboid Decompiler
a lot of what I'm doing is just staring at the game files in the install folder. Looking through the wiki and sometimes other mods and just guessing. Takes me a long time to accomplish things that way.
Highly recommend VSCode - both for making mods, but also as a super quick way to search lots of files.
Okay, I've book marked that also
i like vscode a lot. there's a nifty plugin which auto-decompiles the class files into readable java 
I'm literally just writing everything in Notepad++ lol. I use it for everything. Brainstorming, taking down phone numbers, grocery lists. But I should probably get some proper tools to help me.
Proper lua syntax validation alone is worth it.
If you install the umbrella extension it even has some knowledge of zomboid's functions/variables.
I'll add that bookmark too
So much pain though, its like it was designed by a guy who hates efficency
several clicks to delete or copy a tile...
Yo, I heard you liked tables so I put tables on your table so you could table your tables.
and that's how lua came to be
Apparently my base load/save code, still has a few bugs reguarding multi-tile objects
Also, im amazed somehow tables stack.
Yea im gonna say something sus is going on
Pretty sure one cell shouldn't have quite that many tiles...
Hu, TIL you can stack crates onto tables
Iv honestly never considered doing it before for some reason.
And.. crates ontop of countertops...
though because countertops are taller you can only stack 1 crate on them
Oh this looks nice though:
I just kinda assumed stacking was a thing limited to crates
never thought I could stack stuff onto counters or tables
In B41, as far as I remember, if you placed more than 8 containers on the same tile, it would corrupt your save
people still using fixed sized arrays in 2026 to save memory -_-;
or.. whatever they are doing it for.
this is good but pls follow the rule of max 3 containers in a single tile like vanilla D:
this is nightmare (from other mod)
try fills all those containers with extra item mod data and boom! map chunk bloats
can it still performance-oriented in MP server with 150+ mods and 20/32 players ๐ค
its more designed to move stuff from one save (or PZ version) to another
So in that context it doesn't really matter how long it takes to load/save a base
Weird...
deleting a multi tile object does nothing if the entire object isn't 'complete'
And yet for some reason, when it is complete, you still get a warning(?)
Ok, now my code only has issues if you cut a multi tile object in half by having it on the edge of the copy zone... acceptableish, for now
Hey cool, adding my container load/save code worked first time.
seen your zombies explode finally inspired me to finish my grenades concept using hot brass

M
M
Is anyone aware that TIS seems to have patched the 64kb Player ModData buffer overflow issue in the last patches?
I was optimizing my mods ModData usage because players tend to report rollover-like issues after long sessions with my mods in MP
Anyway the limit seems to be 1MB now
I had to add 12,000 modded items to my playerInventory to get the crash on dedicated MP
What was that ?
A limit in storage of mod data ?
Yeah, when a player disconnected in dedicated, or the world saved, the NetworkServer code allocated a 64kb bytebuffer that wasnt auto-expanded constrat that to the SP path which was designed to expand
You end up with the following if you broke it:
ERROR: General f:873, t:1776091388063, st:8,596,866,632> ServerPlayerDB$NetworkCharacterData.<init>> Exception thrown
java.nio.BufferOverflowException at ByteBuffer.put(null:-1).
Stack trace:
(reduced trace cus its ugly and the server yelled at me for putting it in backticks earlier)
So if youve ever had a long running MP server and ppl report items going missing etc... its because of that most likely
I was going crazy because I had 42.15 decompiled source and it has the old code path that would crash once u tried to save more than 64kb to the buffer, and finally decompiled 42.16 and saw the code path changed
if you wanna know the sauce, you knock down the zombies and players in a certain tile radius of the blast, then you TELEPORT them very quickly and smooth it out over ticks to make it look legit
i completely chose the wrong reply message
it was about your grenade launcher lmao
I was wondering about this
I cant make zombies ragdoll with custom force with new grenades
i had the same issue, i dont think its possible to force zombies to ragdoll with lua,
i manage to apply custom for params to bullet types but explosives its killing me
