#mod_development
1 messages ยท Page 234 of 1
no
you can link a lua function to a call of a java function by lua
well nvm understood that thing wrongly that Crystal showed me a while ago then
it's not the same and it means most times it isn't useful
I see
Java modding requires manual installation of files by people right ?
this is how you make sure your logic processes are super exposes
yeah
Could it be handled server side to only have the server download it for servers and in solo have players download it manually ?
Thinking of the pros and cons
And I see too many cons in that
if you only need the java mod to affect the server, yeah
I really don't like the idea of manual installation of files for people who just download the other mods that simply require the framework
People won't read the mod page of a framework
That's an interesting question... where does createZombie get called? Serverside, clientside, or both?
i'm guessing serverside
people can now tattoo each other >_>
Oh it's only for the Lua to call it in tutorial?
java would go through something else
time to tattoo a big ass dong on my friend's back when he's sleeping
I see.
Amazing.
me and shuru been fighting with code XD
I think java modding isn't the solution here. I'm probably better off updating the stats of zombies every N ticks like I'm doing. Also considering some stats don't get updated because they are checked that they are already good
Did you do this through context menus or a custom UI?
both
Sheeeeit... I am afraid to ask, but gamepad support?
Like I have 7 stats I believe I update ? And half has a check to verify if it's good, if it's good it skips it so I would only have 3-4 stats getting updated every N ticks
soon tm
Gran pa really needs to get a mouse and stop playing with a controler lol
lol I respect that it's being worked on. I asked because tattooing each other is 100% something my friend will want to do, meaning I'll need to do your gamepad support if you don't.
a lil
lol listen I am chillin on my bed slash couch and no man or god can make me sit at a desk to play.

when my cooking mod comes out i want you to know the gamepad support was created entirely in honour of you
still have to hook tattoing animation and sound to it
@thick karma Which syntax is the good one for itemname translate files ?
Very cool work to see. Can't wait to try it.
I don't think it allows dots but I could be wrong. Literally why do I bother. Every time I could be wrong I am.
I have never tried them. Except when I did.
Or seen them Except when I used them.
Should I write ItenName_biocodedCureExp or ItemName_Asilar_Biocoded_Cure_Kit.biocodedCureExp ?
IG the translation works, but seems that the module name is not required right ?
ItemName_biocodedCureExp seems right.
No wait
I'm crazy
Items have a weird format that I had entirely forgotten
Because I haven't touched them in awhile
ItemName_EN = {
ItemName_TrueMusicJukebox.InstructionManual = "Jukebox Instruction Manual",
ItemName_TrueMusicJukebox.StarterKit = "Jukebox Starter Kit"
}
You actually did it correctly afaik
ItemName_ModID.Translation apparently. @violet shell
Ok ok
I've got someone who is willing to do some voiceacting for some of the zombies in my mods
I need to know how to access the .bank file that appears to hold all the sounds
๐
Know that bank files need to be manually installed
But anyway I can link you to the right resources
Alrighty
I haven't tried modifying the files tho since I already had it
God why are item name translations so weird
what's so weird about them?
?
lol just that they are different at all from the others.
No dots in any of our other 5 translation files.
Just feels odd
actually, why don't recipe translations include the module? isn't that bad?
it's translate by fullItemType.
Someone is translating by DisplayName
I see what you're saying. I guess I find it weirder that the punctuation format varies than that they require the mod id
It does make a certain sense to require mod id to distinguish common noun translations
Just weird to me to switch between underscores and . as delimiters from file to file and even within the variable name
If they could've been using . why even make me look at underscores ๐ญ (they're so ugly)
there's not much point having modules if some systems just don't recognise them
For sure. It's just the punctuation that throws me.
i guess the more descriptive naming conventions for recipes protects them from this being much of an issue
i have always thought it looks a little ugly but it's consistent
Do they not use the module at all in determining which recipe translations to grab? They are declared within modules after all
my recipe translations don't have a module
I don't use them in the name of the variable but I figured another mechanism could be used to sort translations between mods.
mod id ~= module
i'm curious if it's just so unlikely of a clash it's never come up
I use my mod id for my recipe modules but realize now that might not be the case in a mod
loooooool
if im not wrong, here exist stuff like if zombie has target
how about apply params to zombie only in this situation
#mod_support message Any easy way to do this? @bronze yoke
Figured I'd ask before we brought him in.
I could read the code but I know you're here and figured ya might know off the top.
i think right now we don't expose anything you could do this with
i think it's all local tables
๐ญ No worries.
the unreleased version of the mod automatically grabs all tapes for them
Sick
So excited.
Someone fix that out-of-bounds error that happens <1 % of the time? (lol)
If you want to have a zombie start running out of nowhere, sure go for it lmao
I use the mod so much that I still see it occasionally and wonder.
There will be frames where zombies could have the wrong speed
Like open a door to a building, zombie gets loaded right behind because the building didn't get loaded before. Starts with massive speed, runs at player
Or have zombies switch speed visible by player
Is never a good experience even if it doesn't affect them in terms of danger at least
just starting out with exploring the modding options. If I've connected to a server and downloaded mods that way through, where are they stored locally so I can potentially edit them?
continuing on that line, if I download any mods from the workshop, where are they stored in my root directory?
Where workshop mods are stored
So you can simply look on google where workshop mods are stored and that will give you hundreds of guides
Steam\steamapps\workshop\content\108600\
More general answer:
C:\Program Files (x86)\Steam\steamapps\workshop\content\108600
specific*
Haha
look who installs games to their c drive...
true
I don't have another one lmao
Not this guy lmao
I should
thanks so much
i have a miniscule c drive that i have to desperately avoid putting anything on
Does the job well enough for what I do with it
I was lead astray for a moment
Sounds like a you issue 
it's not going well ๐
i do regularly!
Sure looks like it 
everything loves putting things on the c drive without asking you

i know with just a little more i'd be fine
Literally all of them?
lol I felt like I'd be fine when I expanded to 4 TB
I now know I'll never be fine.
Thinking about the stat updates for zombie again. It sounds like I might need to do some partial updating to zombies
:3
Update zombie stats from OnTick and access every zombies in the cell and update only a part of it
Too bad it's in russian or whatever that way we don't actually know how much space you have :>
lol
i've found that updating one per tick is a perfectly acceptable compromise
Could take a while to update ?
i used one per tick for an application that affected zombie appearances and the change was never visible to the player
funny part is to add a tattoo it takes btween 30 mins to 4 weeks
hmm alright
but to remove it from 6 to 10 weeks
i'm guessing they load far enough offscreen that no player can actually see a zombie before that would've reached them
How did you cycle through the list of zombies ?
Did you try moving around in vehicles ?
pz players will die in 1 session XD
You can go quite fast in vehicles
currentIndex = (currentIndex + 1) % numberOfZeds
it's been public in a popular addon for a year and received no reports
Classic IRL shit
unless there is a way to cut a tattoo into parts
Increment it like that.
yeah, that's the approach i took
and cut it into 3 timed actions
local currentIndex
function OnTick()
-- update currentIndex
currentIndex = (currentIndex + 1) % numberOfZeds
end
?
itll be more work than fun
yeah
Right right, although I'd init it to 0
do you know what contain here:
public int zombie.characters.IsoZombie. -- all params?
modulo numberOfZeds ?
looks like i took a slightly different approach actually```lua
ClothingOverrides.zeroTick = 0
-- this gets initialised somewhere else
local zombieList
function ClothingOverrides.OnTick(tick)
local zombieIndex = tick - ClothingOverrides.zeroTick
if zombieList:size() > zombieIndex then
ClothingOverrides.overrideOutfit(zombieList:get(zombieIndex))
ClothingOverrides.fixOutfit(zombieList:get(zombieIndex))
else
ClothingOverrides.zeroTick = tick + 1
end
end
umpf
it's the same idea either way though
@frank elbow I only have small bugs to fix. https://asledgehammer.github.io/Mallet/
The UI is pretty solid now.
Things are clean.
Where do you initiliaze zombieList ?
during an OnGameStart handler
But it should be updated dynamically ?
Yep
The list of zombies around a player constantly changes ?
where numberOfZeds = zombieList:size()
it's the same list though
Also @thick karma
You do it at the beginning of the function
Yeah I just don't see the math behind that
You can poke at the uhh yeah UI stuff.
the elements in the list change, not the list itself
modulo forces it to be in the current range of the array
She doesn't do that in her example, thus why my question :)
you can grab the zombie list once during OnPostMapLoad or OnGameStart and never have to grab it again
it's a waste to grab it every tick
oh zombieList already changes by itself
Remember that modulo is the slowest algorithmic operator. Use it sparingly.
Right albion does it differently, I just was explaining how my approach would work.
This would be once per tick.
Not an issue.
almost all arraylists can be cached like this without trouble
Still, keep this in mind for future development.
Valid
Division is slower than multiplication so you can use an inverse operation for speed.
=)
I can't think of any time I really need to do a lot of modulo at one time but I will keep that in mind.
Something I don't understand here is that you never reset zeroTick to 0 ?
So you never come back to the start ?
local zombieIndex = tick - ClothingOverrides.zeroTick
ClothingOverrides.zeroTick is the tick at which it last looped around
local modData = zombie:getModData().zReRANDOMZOMBIES = {}
modData.MyFlag = true
it's right construction?
๐คฃ
dies
no, lua doesn't support passing through values like that
You really need to fucking ditch the mod data on IsoZombie, seriously bro
basically, tick - ClothingOverrides.zeroTick will always result in a number between zero and the length of the arraylist
zombie:getModData().zReRANDOMZOMBIES = {}
local zModData = zombie:getModData().zReRANDOMZOMBIES
zModData.MyFlag = true
?
What does tick output exactly ?
number of ticks since the game started
The way you're making your table is correct. Good luck with the zombie mod data lmao
when we reach the end of the arraylist we set zerotick to the next tick so that on the next tick that operation will start counting from zero again
oh tick + 1
hmm
Can't that cause issues if the values goes too high ? I'm not familiar with that but that number go to billions of billions technically but the game can't handle that can it ?
thanks
I see but something I don't get is, doesn't the arraylist constantly change size ?
the game would already crash because tick would also have that problem
True lmao
it would take far too long for this to be important to design around
The game already doesn't handle it anyway
Numbers are so big aren't they
Tho that's an interesting thing, that means the game can crash eventually lmao ?
iirc lua numbers are represented by doubles
pretty much every game has this problem
it just takes way too long to happen to matter
And no one found a magic solution ?
why solve it? it's not really a problem
I guess
Also, if albion's method is unclear to you, here's an alternative that avoids modulo, assuming you grab numberOfZeds from some list at the beginning of tick and have a currentIndex:
-- this gets initialised somewhere else
local zombieList
local currentIndex = -1 (Will become 0 immediately)
function exampleOnTickFunction() -- Don't really need tick doing this.
local numberOfZeds = zombieList:size()
currentIndex = currentIndex + 1
if currentIndex >= numberOfZeds then currentIndex = 0 end
etc()
end
Does the same thing as modulo but maybe easier to understand (and possibly faster but Idk?)
Also then your counters never get enormous so if you're worried about big numbers crashing your game at the end of all time, well, you won't be the reason it happened.
local square = zombie:getCurrentSquare()
local squareXVal = square and square:getX() or 0
local squareYVal = square and square:getY() or 0
-- NOTE(belette) we have to include X and Y in the check to catch zombies that have been recycled
-- from _intended_ default state (i.e. RZ happened to assign it to default bucket) to _unintended_
-- default state (i.e. RZ would not assign it to the default bucket, even though it's the same zombie)
-- see IsoZombie::resetForReuse and VirtualZombieManager::createRealZombieAlways for more info
local shouldSkip = speedTypeVal == modData.BLTspeed and
cognitionVal == modData.BLTcog and
crawlingVal == modData.BLTcrawl and
math.abs(squareXVal - modData.BLTx) <= 20 and
math.abs(squareYVal - modData.BLTy) <= 20
lol
perfect notes
xD
just checked, at 60fps it will take 4.8 million years to crash from this
I think the way of Albion is smart and fairly optimized
so i'm not really worried
Sounds good lmao
Haha the end of all time as I said.
Let's see each others in 4.8 million yeah when Project Zomboid 30.9.1 is out
Actually nvm, when b43 is out
Does addition become significantly slower for large numbers? Would that be some sort of micro-optimization that could exist?

I'd imagine so but I'm unsure tbh
(I think it's similar to avoiding a single modulo on a tick, regardless. Most likely not worth it ever.)
addition is constant time
Fair enough.
what does that mean exactly ?
it (should) always takes the same amount of time regardless of the input
i say should because computers are not consistent
You know how kahlua seems to act differently from your various theories now lol
sometimes things just take longer and that's fine
you're free to test it, it'd be absolutely perplexing if addition worked differently in lua though
this isn't really implementation specific, this is fundamentals of computer science
I'm not familiar with the way to test these stuff out tbf so I'll probably not bother with it too much lol
hey yall, how likely is it for mods that add cities for them to spawn on top of each other
they can't
One overrides the other
hm
Okay here's a surprising result.
I ran this code many times with different inputs:
function increment(number)
local now = 0.0 + os.time()
for index = 0, 1000000000 do
local newNumber = number + 1
end
return 0.0 + os.time() - now
end
local theInput = 100
print(increment(theInput))
And it's actually slower for small numbers every time
wat
doing 0 + 1 over and over takes longer than 9999999 + 1 over and over
I am very confused by this

it could be because they're represented as floating point numbers
So transform them in int before ?
I'm consistently getting 8 when I run small numbers like 0, and consistently getting 5 or 6 with large numbers.
Idk why they would be... I'm sending it an int and never casting it
Only the durations are cast as floating points...
Just automatically, I see
I figured Lua automatically handled integers in a way that would be more efficient for integers.
Wasn't sure what went on behind the scenes
yeah its not getting initalized as in I can't actually see it in the item list ingame
lua 5.3? i think introduces an integer type
dunno why it wouldn't
I seeeee
All the files are named correctly and in the correct place
you reference in the path as .xml
I don't think you need to do that
I did it for all other ones as well and it works flawlessly for them
hmm
yeah it's not appearing at all
its also got the right files in the zomboid mods folder so I really have no idea
Where's the clothing item file?
Did I tell you I published that mod yesterday ? ๐ https://steamcommunity.com/sharedfiles/filedetails/?id=3232137856
Small sanity check: did you enable the mod for the save?
did you restart the game after adding the item ?
yep
do you have errors in the console ?.
nope
do you have multiple versions of the mod on your computer ? ๐
meia/clothing/clothingItems
unsubscribed from the workshop version for that reason
Does the guid in that file match the one in the guid table?
yep
this is in both xml files which I'd have to add, but they should still show up on the itemlist
I do not remember if it is required to remove the version associated to subscription manually if you are modifying the one in %username%/Zomboid/mods. It may be especially if you unsubscribed while the game was started.
I'll try some stuff and let you know if it's that
jsut changed the mod.info thing to distinguish
if it's that istg
Once every eclipse
yeah the one in zomboid is 1.01 while the one im working on rn is 1.10
That was the only guess I had about that issue as well. Never seen it for any other reason.
https://www.youtube.com/watch?v=r2QWTccBduM
local zModData = zombie:getModData() -- idk why, but stuff with {} not work for me lol(((
local square = zombie:getCurrentSquare()
local squareXVal = square and square:getX() or 0
local squareYVal = square and square:getY() or 0
-- and we can skip this IsoZombie, if they mess somewhere else, but another coordinate
local shouldSkip =
math.abs(squareXVal - zModData.BLTx) <= 20 and
math.abs(squareYVal - zModData.BLTy) <= 20
if shouldSkip or (not square) then
return true
end
-- DO STUFF WITH SPEED
-- and
zModData.BLTx = squareXVal
zModData.BLTy = squareYVal
-- I guess it's not ideal, but it's a good method to work with moddata on zombie
@verbal yew I'm unclear on what the video shows... Same zombies getting speed edits (after you teleport)?
I play random zeds with sprinters lol nothing in that video is obviously modded to me
I am probably oblivious
zombies changes like isoZombies, but still contain their moddata.
Coordinates check for exclude this isoZombies something else (to generate speed again)
like, old zombies be changed like isoZombies, but in moddata contain my speed setting, zombies get it back
I missed the part of the convo where someone explained the difference between a zombie and an IsoZombie. I thought the zombies chasing me and eating me were all IsoZombie objects, as I am an IsoPlayer object. Aren't they?
When you say "zombies changes like isoZombies", I have no clue what that means.
I think something is being lost in translation or I just don't know enough about zombie management to process this.
seems that way yeah
Sounds consistent with what albion and Jvla were saying earlier, if so.
but now it's work like with coordinate X Y in moddata to exclude this isoZombie mess something else on another isoZombie
not perfect
but work
if not use teleportation
Publish mod as Moody Zombies
to explain how zombies work:
when a zombie is unloaded, the IsoZombie has its values reset and added to the reuse pool
when a zombie loads, if there are any IsoZombies in the reuse pool, that IsoZombie is spawned with the appearance and other stored properties of the new zombie. only if there are no zombies in the reuse pool a new IsoZombie is created
"Sometimes your zeds just feel like crawling around, and other times they sprint after you and rip off your face. Enjoy Moody Zombies!"
the bug with moddata is that when IsoZombies are reset for reuse, their moddata doesn't get cleared, so when the new zombie is created it inherits the moddata
yep, here workaround for this situation
Or Really Random Zombies!
"PZ of course has random zombie settings, but what if zombies could be randomer!?"
"What? That zombie we saw earlier is walking again? So random!"
As if, yes, when we come to a point where three zombies are different (pink runner, blue crawler, yellow walker), we will always get different zombies, but the essence will remain the same - there will be a runner, a crawler, a walker.
And these zombies will be excluded elsewhere by checking the coordinates from the moddata
Get Really Random Zombies Today!
Yeah I saw it lol
People could use it to make maps no ?
maybe you can look at cdda zombies mod
In fact, just by playing, hardly anyone will understand the difference.
Only like this at the level of code and tests, knowing the ins and outs
it has also random zombies
This is probably true.
maps dedicated to Floor is Lava gameplay could be done for sure. If that's what you mean ๐
Unless people are in the habit of befriending specific zombies.
And looking for them.
this is basically how zombies work anyway, the fine details are fuzzy
And caring for them.
I mean maps with volcanos actually lmao
and this problem is literally unavoidable
the pid method that's been mentioned a few times isn't actually unique
it's just nearly unique
there is absolutely no truly unique persistent id for zombies
Yeah but it definitely is unique enough
Can someone please publish this so I don't have to do it?
local AutomaticGod = {}
AutomaticGod.deifyMeBaby = function(playerIndex, player)
player:setGodMod(true)
end
Events.OnCreatePlayer.Add(AutomaticGod.deifyMeBaby)
return AutomaticGod
I wanted to send a mod for this to someone the other day but it seems to not exist? To help people who are in near-screwed situations and would rather cheat than die and keep playing lol.
i actually was in that situation before, before i was a modder, i ended up using some weird cheat menu for it
i was editing the database to revive my character but they'd instantly die from wounds
I see I see.
That is exactly what this would be for I imagine.
Anyone please take it and publish it
I do not want to do the file structures and workshop desc and talking to users lol
and link me so I can use it in mod support lol
lol
I guess I can do it if you want
Make me some cool images to explain what it does
hmmm... no one create predying state... when you down on knee and can crawl so slow with bleeding bar, but after dead you just lose consciousness and respawn somewhere +-more xy cooridinates, in this case something may disappear from the backpack...
this has been done but it ends up buggy as hell
i was maintaining a mod that does this and it was such a nightmare
@verbal yew seems to work now
and the zombies seem nice and snappy now
less clunky
yep, i know
Mod done, just testing it
Lol what that's exactly what I don't want to do haha

but how about lose consciousness, just like teleport player somewhere by coordinate and remove zombies ~10-20 tiles around, with some kind of screen shading and animation of getting up from the floor (bandage wounds, if any, restore health to 20%)
dw I found something
It just makes you invincible immediately
Yeah thx for explaing those 2 lines of code to me, idk what I would do without you
Probably need to figure out what anti-cheat to tell them to disable
lol)
Lol you requested images explaining what it does!
I'm like wdym how could it be more obviously
Whatever, there's literally no reason to use that on a server
I wanted some cool meme image :(
A small group of people could in theory want it
on thumbnail
Say you're playing with 2 friends and all trapped
type 8
This seems perfect
It does actually lmao
Thank you! Teamwork makes the dream work @bright fog
I took this for the image
They are so horrible at figuring it out
Perhaps the other is better 
Oh they're both good
That Zeus-like god is classic
I mean listen people love mythology about gods probably a billion perfect pics for it
More importantly though, the brief connection while not allowed to become invincible before they know this might be enough to kill them.
Unsure
my loved car from gta sa
do you know best thumbnail on workshop zomboid?
Lmao love it
best, ever
this is on the second place
I fucking hate how icons work
@thick karma (ups need to wait a bit)
wdym ?
Awesome @bright fog
can't make a good texture because each icon has only a few set colours
It'll take a second, always does that for longer when you drop it quick, it'll fix itself.
yeah ik
:D
Hot sauce feels appropriate
I hope it sets a precedent and everyone gives the mod more hot sauce

Lol I'm on phone rn but I will
:)

Lol totally.
After playing for a bit, it seems that at the same percentage as the old script, more sprinters appear
Because zombies weren't handled properly before.
So I must lower it
Hey! Anyone happens to know a lua command with which you can set a ui tick box to true or false (i.e. showing a tick or remove one)? I mean the tick boxes which you can create in lua via
local myTickBox = ISTickBox:new(...)
This is how I did it:
self.boolOptions = ISTickBox:new( self.width - (btnWid + 20), y - 5, 200, 20, "", self, GlobalSoundEffects_Panel.onBoolOptionsChange)
self.boolOptions:initialise()
self:addChild(self.boolOptions)
self.boolOptions:addOption("Make Global")
self.boolOptions.selected[1] = true
Would a Nutrition testing mod that lets you know when your nutrition is within a reasonable range, as well as detect when you have bonus STR xp or penalty xp based on protein levels, be a mod that is worth releasing?
didn't tcherno make a protein moodle mod?
no idea. Lots of mods to dig through to find stuff
I'll share a snip of what i have so far. far from finished and the text isn't lined up perfectly
Many thanks! self.boolOptions.selected[1] = true did the trick! ๐
@bronze yoke this is where i'm at so far
I tried to think as dynamic as possible while using this info https://pzwiki.net/wiki/Nutrition#List_of_nutritional_values
That already exists
seems to have issues but can see in browser
oooh that's a much better way of displaying it
your gif is broken as hell lmao
i didn't really like the moodle, it feels out of place
error: cannot find symbol
return var1.getFileName().toString().matches(var1);
it's not broke it's huge you have to view in browser
hate discord not me ๐ฆ
doesn't even work in fucking browser
Why would you make your gif so huge
no idea working for me. sorry
it worked fine for me
Oh yeah that looks nice
tyty
But yeah that could be nice
That was with you we were talking about those too ?
Could be the solution lmao
i'm learnin UI
That's not bad
thanks to umbrella and zedscript
made this insanely easy
Well thank you I shall continue development
last question does this ground item look too shit?
when i see some mods like hydrocraft. my goal is not not have icons that look this way
why isnt this using the model
there also is no proper model for a t-shirt (atleast not in the skinned folder)
can I just use
<m_MaleModel>skinned\clothes\bob_jacket</m_MaleModel> <m_FemaleModel>skinned\clothes\kate_jacket</m_FemaleModel> <m_GUID>c819248b-8cf4-474e-824f-379f8b542149</m_GUID> <m_Static>false</m_Static> <m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomTint>false</m_AllowRandomTint> <m_AttachBone></m_AttachBone> <m_Masks>13</m_Masks> <m_Masks>14</m_Masks> <m_Masks>3</m_Masks> <m_Masks>5</m_Masks> <m_UnderlayMasksFolder>media/textures/Clothes/Jacket/Masks</m_UnderlayMasksFolder>
Would anyone mind sending me the .java for the vehicle events? It should be where RVSChangingTire.java is located
Ending?
sending*
You can double-click / open the .class file from IntelliJ IDEA. It will decompile it for you.
Unless you're asking as a small commission.
This is my area of expertise for PZ modding / general modding.
yep, im at my work laptop atm so I dont have the dev environment setup
Feel free to shoot me what you need and for how much via DMs.
Make it a 3D model ?
I don't feel comfortable paying for source code that we didn't develop so I'll just wait for someone else to offer or just wait till I get home
Okay. Good luck.
Thank you for all your efforts in making tools for modders. I know Albion and Omar deserve thanks for Umbrella too so thank you both, but I can see you are about helping modders succeed and it's no small undertaking. Thanks
Thank you for recognizing and appreciating my work. Yes I've modded games since 2003 and I've only seen the best works when modders have the resources to get the job done. This is all a labor of love.
Hey Jab
Why do I get this error when I try to play around with LuaManager?
error: cannot find symbol
return var1x.getFileName().toString().matches(var1);
^
symbol: method getFileName()
location: variable var1x of type Object
private static void deleteSavefileFilesMatching(File var0, String var1) {
DirectoryStream.Filter var2 = (var1x) -> {
return var1x.getFileName().toString().matches(var1);
};
try {
DirectoryStream var3 = Files.newDirectoryStream(var0.toPath(), var2);
try {
Iterator var4 = var3.iterator();
while(var4.hasNext()) {
Path var5 = (Path)var4.next();
System.out.println("DELETE " + var5);
Files.deleteIfExists(var5);
}
} catch (Throwable var7) {
if (var3 != null) {
try {
var3.close();
} catch (Throwable var6) {
var7.addSuppressed(var6);
}
}
throw var7;
}
if (var3 != null) {
var3.close();
}
} catch (Exception var8) {
ExceptionLogger.logException(var8);
}
}
I didn't touch this method but its still complaining about getFileName()?
This is from LuaManager.java
Guys
how changed icon name for burnt, rotten or another food?
if you use zedscript ๐
nothing here
you suffix the name with the parameters
i'll show how it says in zedscript
yes
thanks
i wanted to make sure i worte it correct ๐
I'm being distracted by the tornado outbreak rn.
So that method in LuaManager.. Are the right objects / params passed?
I never used the method its just when I try to compile the IDEA complains about getFileName() not being recognized
Oh.
This is a generic thing that you may not know.
So for the lamdas in there, most of them use <Path>
Try adding this to those objects. This should fix those.
I think that looks pretty cool. I say keep up the good work and if you need help adding a basic close action for gamepad players, ping me.
Yes my plans are to support joypads! sounds good thank you!
I'm sorry but I don't understand what you mean by adding <Path>
Joypad API is one of the things I plan to document for Umbrella.
thank the gods. multiplayer joypad stuff seems easy once you get it but there is alot to it
I also worked on radial menus as a DOM element for the JSX factory I was writing in January of 2023 for TypeScript TSX modding.
Yeah it's actually possible to write HTML for UI with that prototype.
Was a fun experiment / tech demo.
Roughly anyone writes mods in TypeScript here so it isn't worth pursuing unless I wrote a HTML & CSS parser.
that's crazy
My project this week is Mallet, a program that imports & exports JSON data that compiles into Lua typings for Umbrella.
DirectoryStream.Filter var2 = (Path var1x) -> {
return var1x.getFileName().toString().matches(var1);
};
Incompatible parameter types in lambda expression: expected Object but found Path
Filter<Path>
aah that fixed it, why was it not included in the decompiled file? Is it a problem with the decompiler missing this?
Yeah it's generic. Generics are erased when compiled to bytecode.
The JVM doesn't see anything generic. It doesn't need to because the compiler ensures any generic logic is consistent with the rules of the language.
This is also why you sometimes see boolean values assigned to integer local vars.
Compiler optimization.
Once you know what needs to be generic and their types, fixing these files becomes trivial.
oh so I just need to learn that Filter uses <Path> etc?
Filter uses anything IIRC.
You need to know what the implemented code is calling and assign the correct type.
So you'll see HairStyle and BeardStyle code erroring out below that. You'll know that they'll need to be placed as generic types in that code.
You should also take the time to optimize the iterator while loops as foreach loops.
@LuaMethod(name = "getAllBeardStyles", global = true)
public static ArrayList<String> getAllBeardStyles() {
ArrayList<String> var0 = new ArrayList<>();
if (BeardStyles.instance != null) {
ArrayList<BeardStyle> var1 = new ArrayList<>(BeardStyles.instance.m_Styles);
var1.sort(
(var0x, var1x) -> {
if (var0x.name.isEmpty()) {
return -1;
} else if (var1x.name.isEmpty()) {
return 1;
} else {
String var2 = getText("IGUI_Beard_" + var0x.name);
String var3 = getText("IGUI_Beard_" + var1x.name);
return var2.compareTo(var3);
}
});
for (BeardStyle var3 : var1) {
var0.add(var3.name);
}
}
return var0;
}
When decompiling, generic redefinitions will be the majority of your work.
@LuaMethod(
name = "getAllHairStyles",
global = true
)
public static ArrayList<String> getAllHairStyles(boolean var0) {
ArrayList var1 = new ArrayList();
if (HairStyles.instance == null) {
return var1;
} else {
ArrayList<HairStyle> var2 = new ArrayList(var0 ? HairStyles.instance.m_FemaleStyles : HairStyles.instance.m_MaleStyles);
var2.sort((var0x, var1x) -> {
if (var0x.name.isEmpty()) {
return -1;
} else if (var1x.name.isEmpty()) {
return 1;
} else {
String var2 = getText("IGUI_Hair_" + var0x.name);
String var3 = getText("IGUI_Hair_" + var1x.name);
return var2.compareTo(var3);
}
});
Iterator var3 = var2.iterator();
while(var3.hasNext()) {
HairStyle var4 = (HairStyle)var3.next();
var1.add(var4.name);
}
return var1;
}
}
error: variable var2 is already defined in method getAllHairStyles(boolean)
String var2 = getText("IGUI_Hair_" + var0x.name);
Didn't touch, not sure why I get that error
Check my code.
I named one as var1x
The decompiled code is optimized here for the JVM by reusing that var2.
works now
kinda weird that every clothing type has a somewhat different syntax when it comes to the xml file
I assume I can just rename the var2 inside the lambda to var2q for example?
Yes. You can see that I did this above.
does anyone know if you can attach weapons to bones?, trying to make a clawed glove type of weapon and use the bat swing anim. but it kind of floats off of the hand when walking/swinging and its impossible to line up, was wondering if its possible to attach it to the hand bone
asking cuz i noticed this on the wiki
but doesnt seem to do anything, so wondering if its just not possible or im doing something wrong
If I want to add a method from Java to Lua can I just do it like this?
@LuaMethod(
name = "testMethod",
global = true
)
public static void testMethod(String var0) {
...
}
I tried to do so but when I use it in Lua it says its nil? Do I need to register it elsewhere too?
Hahaha.. Redis.
Okay yeah that should work if it's in the globalobject.
You can add it externally but it's a couple method calls.
All right but why do I get nil then ๐ค
If you're expecting a return you made the method void.
lmao I haven't slept enough ๐
Thanks!
Wait a minute ๐
I am not expecting a return, I am running a method and not returning anything
Object tried to call nil in OnServerStarted
could it be because of this:
Illegal/unsupported escape sequence
String[] var1 = var0.getAbsolutePath().split("\\" + File.separator);
Those errors didn't stop my copy from working.
When I call getText("ConextMenu_TrimBeard_For") the game outputs Trim Beard for %1 where %1 seems to be a place holder for another string by which it can be substiuted. Is there a way to delete the %1 from the output so that I just get Trim Beard for? I already tried the gsub command:
text = string.gsub(text, " %1", "")```
but this resulted in an error for me.
why does this work??
cuz lua uses % already
so two cancels out
i look on lua website quick also just now
Are you aware you can use the getText command with 2 args?
You can send it a variable to sub into a marked position of the string
would be what lua uses % for normally i thinks. still new ish to lua
Thanks! Thats also a good trick in this situation!
It's used differently in strings
I still need to upgrade some Jukebox translations to use this style myself, for languages that write right-to-left
I'm sure a lot of my lazy concatenations will look like Yoda-talk in Japanese
hand model's? yeah. plenty
BIGGER.
Kentucky's trying to out-weird Florida here.
A landlocked state with fish bigger than gators.
xD it's commission
bruh why is
public static Faction createFaction(String var0, String var1)
Not actually used? The constructor is but this function isn't called from anywhere?
I can use the constructor to check when a faction is made but how do I check if its removed?
This does not seem to be used either:
public void removeFaction()
Legacy / deprecated code is common in PZ.
A lot of hands in the pot that have differing philosophies / code-practices.
There's a bit of code in there that's 10 years old.
I can tell you in a bit
I'd have to review the code.
I guess they just edit the arraylist from some other class lmao
It was a safehouse teleport packet which was client-auth so hackers teleported players to a spot and killed them instantly with another exploit.
Was really bad. This exploit is what pushed me to write my anti-cheat originally.
No not hands, items in hands
Do we know or is there anywhere to read about planned changes code wise for B42?
Only public-facing API for Lua access and then it won't be complete. B42 is too monolithic of an update to get everything.
The best I can do is update PIpeWrench which is generated Java API typings and it'll show all the literal differences.
PipeWrench is cool because it shows the differences through Git commit diffs.
staticmodel = itemsmodelnamehere,
All You Need In One Line ๐
For recipes, same deal, modelname in
prop = Modelnamehere
Say that to the guy I pinged the message lmao
You need to link the model to a bone right ?
The guy was saying he was trying to get his fbx to x
To have the item in hands
u do it
๐ ๐ ๐ฅฐ
Hi ๐
I got a clue by AuD
Seems I need to add in my item def : primaryAnimMask = HoldingTorchRight, secondaryAnimMask = HoldingTorchLeft, but couldn't try it yet
i was about to type all that, but now ill type 75% of it
item ScrapMetal
{
DisplayCategory = Material,
Weight = 0.1,
Type = Normal,
DisplayName = Scrap Metal,
Icon = ScrapMetal,
MetalValue = 30,
SurvivalGear = TRUE,
StaticModel = ScrapMetal, <-------------------Make sure items have this for in hand in world usage in recipes as well as a secondary source
WorldStaticModel = ScrapMetal,
}
you don't have to use .x models, that's at least confirmed
Just like I told you, don't even aproach .x
If you can just not use it, don't use it
recipes that load a model,
prop = MODELNAMEHEREPLS
prop1 = MODELNAMEHEREPLS
these go in a recipe, so the player will, do the Human thing and HOLD the item
Remember, Anyone can always @ me, for related things / insight for PZ,
what are prop & prop1 ?
This essentially, is the recipe bit, but for Clothing, same trick, forces a static animation
when you craft something, you cna instruct PZ's engine to attach a model, in each hand, these coincide with a marker on the male and female body FBX model's placed by the dev's
this is ALSO why EVERY animation mod that does POSES is Wrong. All the TIME.
Annoys. me. to. HELL.
when you make a pose anim, or anim in general, the Marker assigned to each hand, left and right MUST BE MOVED WITH THE HAND
:)
Highlighted for you.
Wherever these go in an animation. Your GUN, ITEM, ETC WILL FOLLOW AT ALL TIMES DURING IT.
this does mean you can break the system and chuck a firearm, football etc by yeeting the marker.
zombies don't have items in hands thanks god 
they CAN tho.
I completely ignored these for my zombie animations
you can make those zombies fire guns, etc. Anything you can do ingame. They can TOO
just doesnt make sense in default unmodded pz ๐
But Modding wise? yeah you could
Can you give me an example ?
Sure can. uno momento~
tyvm
recipe Saw Logs
{
Log,
keep [Recipe.GetItemTypes.Saw],
CanBeDoneFromFloor:true,
Result:Plank=3,
Sound:Sawing,
Time:230.0,
Category:Carpentry,
OnGiveXP:Recipe.OnGiveXP.SawLogs,
AnimNode:SawLog,
Prop1:Source=2,
Prop2:Log,
}
- EXAMPLE ABOVE ^
- Prop1:Source=2,
- Prop2:Log,
These refer to the MODEL of the Log itself and not the ITEMNAME ID
- Further INFO
CanBeDoneFromFloor:true,
Bypasses the XML AnimationLock system.
Allows the player to do as stated. interact directly with ISOworld during an animation
but probably isnt limited to that
You've got an issue with spaces I swear lmao
-
ANIM SELECTION
-
AnimNode:SawLog,
[ SawLog ] is the anim name for the action used, an x file has the data.
i type. way. too fast.
adhd meds
I mean, you can just not put that many spaces no ? 
i run with it, at this point
Ok, I start to get it. Can I use those prop & prop1 without an animNode ?
oh he wants more SEETHROUGH.
should be capable of it yes. it is a designator for the animsystem aha
ok, my goal for now is just to have the character actually have the item in hands when they use it
local YourModule = {}
YourModule.FactionUI = {}
YourModule.FactionUI.destroyFaction = ISFactionUI.destroyFaction
function ISFactionUI:destroyFaction(button, modal)
-- Do what you wanna do.
YourModule.FactionUI.destroyFaction(self, button, modal)
-- And such.
end
return YourModule
if it is a radio, or scrapmetal / real item,
staticmodel = modelnamehere,
Add that to the itemscript ๐
at least for the first one. For the second, it's a serynge, my dream would be that the character actually use it like we use a serynge
people watching me mod the quantity of 30 people a day
I just took the granolabar model and changed the texture
I don't have time in my life these days to mod as mod haha
@untold orbit
need anything for it ? ๐
nah
ill be looking into the patches for PFO soon
Last time I stopped on the fence animations
This shit made me go crazy
But here I'm getting back to the coding part, the part I love most to change a bunch of stuff I marked
Got a bunch of interesting stuff to do
I'm happy. Already having code that detects Lua classes and their properties, building profiles in my software to document.
anims are hard work. i know.
i hope the dev's truly fix the flaws for us.
the flaws ?
direct X ".x" Locked anim files.
the fix? make them .fbx

I'm pretty they are not going to change how animations are made in the game
That definitely is not changing
was planning to invest to Full MoCap, to help modder's get Easy anim's for things.
Still the plan
The fact they didn't mention anything about that and that they keep adding stuff to the system, doesn't give me hope they'll do any improvement on it
i doubt they can mention it,
Counts as Spoiler info, of which there would be a great deal we have not seen
i would, assume B42 would have a seperate NDA at this rate, based on how much is inside it
NDA ?
{
myItem,
CanBeDoneFromFloor:false,
Result:recipeResult,
Sound:mySound,
Time:120.0,
Category:Health,
Prop1:myItem,
Prop2:leftHand,
}```
@sonic needle This should do it or not ? how I can point to the second hand ? or a arm for example ?
each prop, is a Hand
prop2 is right hand
prop1 is left
your item, is in the left hand ๐
i may have just thought on how to juggle an item. by breaking the system XD
{
myItem,
CanBeDoneFromFloor:false,
Result:recipeResult,
Sound:mySound,
Time:120.0,
Category:Health,
Prop1:myItem,
}``` This ?
yep, item held in left hand,
can you paste the item statblock ? ( its script )
item Autotest_Knox_Infection
{
DisplayName = Biocoded Autotest,
Icon = Autotest_KnoxInf,
DisplayCategory = FirstAid,
Weight = 0.1,
StaticModel = Autotest_KnoxInfStatic,
WorldStaticModel = Autotest_Ground,
}
recipe Use my item
{
myItem,
CanBeDoneFromFloor:false,
Result:recipeResult,
Sound:mySound,
Time:120.0,
Category:Health,
Prop1:Autotest_KnoxInfStatic,
}
a working one, would be this ^
so long as the Modelname, that is loaded, is called "Autotest_KnoxInfStatic"
model Autotest_KnoxInfStatic
{
mesh = Autotest_KnoxInfStatic,
}
model Autotest_Ground
{
mesh = WorldItems/Autotest_KnoxInf,
scale = 0.4,
}
model Autotest_KnoxInfStatic
{
mesh = WorldItems/Autotest_KnoxInfStatic,
texture = WorldItems/Texturenamehere,
scale = 0.4, "<--- not needed: is optional"
}
^ example, but do your own testing ๐
yeah, but I named my textures strictly the same as the model so it applies it seems
yes that works fine
Can I bother you more ?
My other item is a serynge, and I would like that when the character uses it, it have it in right hand, and move the serynge to the left arm. Can I do that without an animation, just with props ?
keep biocodedCureExp,
Result:BiocodedCure_Result,
Sound:BreakAmpule,
Time:120.0,
Category:Health,
CanBeDoneFromFloor:False,
NeedToBeLearn:False,
OnCreate:injectBiocodedCure,
RemoveResultItem:true,
Tooltip:Tooltip_Inject_CureExp,
}
item biocodedCureExp {
Type = Normal,
Icon = Biocoded_Cure_Exp,
Weight = 0.1,
DisplayName = Biocoded Experimental Injection,
Tooltip = Tooltip_Biocoded_Cure_Exp,
StaticModel = Biocoded_CureExp,
WorldStaticModel = Item_Biocoded_CureExp,
}
model Biocoded_CureExp {
mesh = Biocoded_CureExp,
}
model Item_biocoded_CureExp {
mesh = WorldItems/Item_Biocoded_CureExp,
texture = WorldItems/Item_Biocoded_CureExp,
scale = 1.2,
}```
this would require an animated file to help sell it,
hmm.
I cannot tell that prop1 = the left arm ?
pz is simple. and that is its Greatest asset.
Meaning a simple thing, can often get you most of the way there creatively speaking,
A player wont look as close as you will,
- for the Arm thing, you can make it use the left Hand, atleast
it is, the dev's themselves, that need to hook function tag's to the bones to support full body Location Usage,
Which, i would imagine, B42 will have, if not, Then, it should probably have that added
ok so recipe Inject_Biocoded_Cure { keep biocodedCureExp, Result:BiocodedCure_Result, Sound:BreakAmpule, Time:120.0, Category:Health, CanBeDoneFromFloor:False, NeedToBeLearn:False, OnCreate:injectBiocodedCure, RemoveResultItem:true, Tooltip:Tooltip_Inject_CureExp, Prop2=Biocoded_Cure_Exp, } should do the trick ?
this needs an animnode call
to add to this, something like,
prop22 for animhooking, "Bip01_L_Foot" for instance
Sorry, you lost me lol ๐
AnimNode:SawLog,
AnimNode:Disassemble,
AnimNode:RipSheets,
add one, of those lines, to that script
you will see what i mean
"Disassemble" is a solid choice
general results, of this should be,
"eh its fine, as is"
or,
" does a better animation exist or can i make it?"
ok ๐
Is there an animation catalog/list somewhere ? so I can try with trial & error ?
i beleive the wiki has that, or atleast a wiki thing,
i dont use any of those. for good reason
Side question : does VOIP attracts zombies in MP ?
there's a mod for that now ๐ but in vanilla no
ok thanks :)=
gonna find the mod then ๐
this is better, but not good enough ๐
I would need to have it smaller, and horizontal rather than vertical
is it where I have to add attachement world { numerical values I don't understand } in the model script ?
add your own syringe model, and have it edited to ONLY be loaded and used by this recipe,
Angle it for the exact Anim etc
this is not the serynge ๐
this is the Autotest
This is Autotest Static Model, with primaryAnimMask = HoldingTorchRight, how can I fix that so it's smaller and oriented as it should ?
rotate the model in blender. ctrl + A > apply transform's export model to wherever it was.
the above ^ assumes you are following my, recipe only, seperate model info
at least scale is working, but I still need to rotate it ๐
but I don't understand, the scale didn't apply to the recipe
Also, do you know what number is for what in this : attachment world { offset = 0.0000 0.0000 0.0000, rotate = -90.0000 0.0000 0.0000, }
it's in models scripts
I don't get it. Why the model called in recipe is not the same as the one in Static Model and called in item (with primaryAnimMask for example) ?
am hungry, Ignore Comment Clothing uses a seperate model loading system
I don't use clothing models. I think I'm lost lol ๐
me too. need to eat xD
Gonna go to sleep, thanks for you help and maybe you'll be around later. Thanks again !
i'm always around
Am I going crazy?
the weight moodle's are
o.weightIncTexture = getTexture("media/ui/chevron_up.png")
o.weightIncLotTexture = getTexture("media/ui/chevron_double.png")
o.weightDecTexture = getTexture("media/ui/chevron_down.png")
but I do not seem to find chevron_double?
any idea what i'm missing here?
this seems to be how it's done in game or what am I missing?
self:drawTextRight(getText("IGUI_char_Weight"), self.xOffset, z, 1,1,1,1, UIFont.Small);
local weightStr = tostring(round(self.char:getNutrition():getWeight(), 0))
self:drawText(weightStr, self.xOffset + 10, z, 1,1,1,0.5, UIFont.Small);
if self.char:getNutrition():isIncWeight() or self.char:getNutrition():isIncWeightLot() or self.char:getNutrition():isDecWeight() then
local nutritionWidth = getTextManager():MeasureStringX(UIFont.Small, weightStr) + 13;
if self.char:getNutrition():isIncWeight() and not self.char:getNutrition():isIncWeightLot() then
self:drawTexture(self.weightIncTexture, self.xOffset + nutritionWidth, z + 3, 1, 0.8, 0.8, 0.8)
end
if self.char:getNutrition():isIncWeightLot() then
self:drawTexture(self.weightIncLotTexture, self.xOffset + nutritionWidth, z, 1, 0.8, 0.8, 0.8)
end
if self.char:getNutrition():isDecWeight() then
self:drawTexture(self.weightDecTexture, self.xOffset + nutritionWidth, z + 3, 1, 0.8, 0.8, 0.8)
end
end
It's in UI/UI2 pack files
from media is where by chance?
You have to open media/texturepacks/UI.pack in TileZed
If you have the game on Steam, install the Project Zomboid Modding Tools (comes with game purchase) and you can use TileZed easily
Otherwise you can install it on IS website https://theindiestone.com/forums/index.php?/topic/59675-latest-tilezed-worlded-and-tilesets-september-8-2022/
ah crap it's packed? Can I call it using the same naming conventions or will I need to use those graphics in my mods specifically?
does it pull from base game when i use
getTexture("media/ui/chevron_double.png")
or will it always only look in the mod directory?
np I don't mind doing it if I have to. but I may just make custom ones
sometimes you need that push to do it and this might be that for me
Yes. When the game loads the pack files, it loads the textures inside the pack file, so you can use getTexture with anything in the pack file like a normal texture.
ooo okay good to know TY so much
I think specifying your own png in the media/ui/chevron_double.png will possibly override the vanilla texture (not sure)
it's going to be more complicated from here i think
What are you trying to do with the chevron png? If you want to load it like normal, just do it how vanilla lua does it like above. If you want to override it/replace it, try overriding that path in getTexture function.
not famliar with how to make that smaller sorry
I am not sure you can xd
goal is that it dynamically handles the values and color codes based on the range of the values
I see, is that to change the colour of the icon or something?
middle is sweet spot except for proteins
the text changes color on tick essentially
and is smooth transitions between red/orange/yellow//green
so if fat/carb etc go out of wack it will tell you
and also let you know what is causing your weight to go crazy, also lets you know when you are getting bonus xp from proteins or less xp from low
overall goal is something similar to a device that is drainable with 5 uses for testing nutrients without using moodles or other methods. something that feels more built in. has some sandbox options also atm. may tie it into nutritionist trait
more levels, more features, not sure
mainly i'm barely learning to mod zombid and lua and also want to learn the UI
good luck! I have yet to do much UI stuff and I hope I don't have to, it looks scary lol
Thank you! appreciate ya.
Hello good day! Anyone know what else can we use to permanently persist an object moddata from client to server? transmitModData only seem to persist when you're within the chunk but gets removed when you get away from that chunk
i think here problem like with isoZombie
but for isoDeadBody
ohh so there's really no way to persist it to the server?
not sure... 
i think if we take body and drop it
be same things
if you use search you will find lots of into around it over time
i see diff methods depending on usecase
I was thinking once you took a blood sample you remove the zombie from the server so you won't have to worry about persisting the moddata ๐คฃ
@verbal yew
Just need to tweak where it skips the zombie that is not valid for autopsy then we're good to go
yeah, i see
But yeah the autopsy mod data can be a problem when players got an RV Interior because they can exploit the autopsy
i think I remade it like loot around zombie after dead
no no, 2.0 use old system for it
i mean i should do it in future
like loot
not autopsy
workaround for abuze with moddata
Good morning. (3:50 AM)
So yesterday I wrote some code that dives into Lua class definition code and extracts methods, functions, fields, and static fields and builds JSON data for documentation.
=)
Hi Jab, do you have a link?
Hey @desert kelp. I do! The software / tool I'm writing is web-based. https://asledgehammer.github.io/Mallet/
Make sure to read the greeting modal and you'll get a good understanding of the basics of the tool.
If you want to try out the Lua wizard I'm writing, it's the fourth button on the top-left. Open up uhh the ISUIElement.lua file to test. It's in media/lua/client/ISUI/ISUIElement.lua
I'll be working on the Lua wizard today.
Will do thankss!
No problem. The Lua Wizard isn't done yet so there'll be missing generated data noticeable.
Will you add support for documenting mods?
So this is a solution that allows for the lua language server extension on vscode to read documentation for things like Umbrella 's typings which can include rendered documentation from this tool.
I wrote a project over a year ago that is a sort of middleware for documentation called PZ-Rosetta. It works with Lua typings, not specific to PZ. Mods should work in this case yeah but you can also write your typings in your code.
PZ-Rosetta is designed to document PZ's Lua and Java API.
I see, I can't seem to open a class file from my mod
Mallet is currently limited to a specific type of Lua class that PZ implements but PZ-Rosetta has full support for Java and Lua stuff.
Yeah. It's because the open file thing is for .json files.
The Lua Wizard is limited too.
I provide a link to an example json file to load in the greeting popup when loading the page.
I opened it with lua wizard, it didn't work because I had 2 classes in the same file 
Haha yeah I haven't tested what happens with those cases lol.
The wizard is for speeding up getting a classes' properties loaded in so I can spend more time typing out human documentation than clicking to add the elements manually.
I don't see many people using the tool directly. I do however see people using the fruits of the tool's labor.
=)
just annotate your mods when you're writing them ๐ this is more complex and less accurate than manual annotation, it's only necessary because it's a gigantic codebase entirely unannotated
definitely, I annotated fully my mod, I just found it interesting to maybe use this tool
I plan to first document the entire ISUI library.
thumbnail moment
Hello guys, is there a way to block the inside-building-zombie-spawn ?
Just released my first Zomboid mod ๐
https://steamcommunity.com/sharedfiles/filedetails/?id=3233459645
Yes I believe so
Or at least alter it for sure
You're a boss ๐ Thank you very much !
99999 zombies into LV high builds was an issue for me ๐
hey guys is it possible to convert .x files to .fbx?
Erm...
item:getID() value will change as you modify the item?
On MP, if you use sendClientCommand to send item:getID() to do something on server-side
Then immediately after that line do item:getModData().something = "hello" on clientside
The item:getID() value seems to change thus become invalid, well, the server-side fail to obtain the object
On SP, no such issue
It works fine but still have got an issue with the "LV MALL" type buildings
This kind of buildings are always full of Z : nothing to do to control the spawn rate ๐ฆ

Hi ๐
Will this work ? ```function SpawnPoints()
local randomX = ZombRand(299)
local randomY = ZombRand(299)
return {
unemployed = {
{worldX = 44, worldY = 15, posX = randomX, posY = randomY},
{worldX = 43, worldY = 27, posX = randomX, posY = randomY},
{worldX = 34, worldY = 24, posX = randomX, posY = randomY},
{worldX = 32, worldY = 23, posX = randomX, posY = randomY},
{worldX = 31, worldY = 27, posX = randomX, posY = randomY},
{worldX = 27, worldY = 36, posX = randomX, posY = randomY},
{worldX = 23, worldY = 23, posX = randomX, posY = randomY},
{worldX = 22, worldY = 35, posX = randomX, posY = randomY},
{worldX = 19, worldY = 29, posX = randomX, posY = randomY},
{worldX = 16, worldY = 22, posX = randomX, posY = randomY},
} --end unemployed
}
end```
I think no
Need to delete the last โ,โ of your code I think
Thanks for the typo. But the thoery about calling for ZombRand and using it's result in posX & posY values is ok right ?
It'll be the same two random numbers all the way down
Not sure if you want that
trailing commas within tables are fine
It will not be different each time the player respawns ?
No
Well
It depends
ok, so I should put the ZombRand(299) directly in the posX and posY ?
How often are you going to call that?
My idea is to have the players spawn more randomly every time they spawn (after each death)
map spawn points define themselves in files like this, i have no idea what the call condition is but i imagine it's cached when the game loads
Whenever you call that process it'll randomize again but all of the world positions will have exactly the same posX posY
I don't know whether your randomization will be applied
But that is what would happen to the table
return {
unemployed = {
{worldX = 44, worldY = 15, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 43, worldY = 27, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 34, worldY = 24, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 32, worldY = 23, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 31, worldY = 27, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 27, worldY = 36, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 23, worldY = 23, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 22, worldY = 35, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 19, worldY = 29, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 16, worldY = 22, posX = ZombRand(299), posY = ZombRand(299)},
} --end unemployed
}
end``` better ?
Yes that would give them all random posX posY
Again unsure if changing it in game would be too late
and SpawnPoints is called on character creation right ?
Idk
SpawnPoints() is called by SpawnRegions()
I have to find when SpawnRegions() is called then ๐
lol ๐ any hint where to search ?
eugh, looked at it myself and it's not even sandboxed
it literally does goes load file -> call SpawnPoints() in a loop for every spawnpoints file
affecting the global namespace when it could literally just return the points directly ๐ญ
anyway from my best look it seems like this will be called only once when the game starts?
if you want to be sure, you could add a print to your function and see how many times/when it prints
ok ๐ I'll do that, thanks ๐
This ?
spawnpointsLoop = 0 = spawnpointsLoop
print("Number of Loops = "..spawnpointsLoop)
return {
unemployed = {
{worldX = 44, worldY = 15, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 43, worldY = 27, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 34, worldY = 24, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 32, worldY = 23, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 31, worldY = 27, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 27, worldY = 36, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 23, worldY = 23, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 22, worldY = 35, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 19, worldY = 29, posX = ZombRand(299), posY = ZombRand(299)},
{worldX = 16, worldY = 22, posX = ZombRand(299), posY = ZombRand(299)}
}
}
end```
no not needed to delete that last one
nor a need to add it back of course...
Also, in this, idk what spawnpointsLoop = 0 = spawnpointsLoop is gonna do, but I would be surprised if that were meaningful and worked.
typo, second = is a +
0 + x = x. Best case a no-op (in an arithmetic sense), worst case an error if the variable is nil
I assume you mean x = x or 0
Where x is your variable name, of course
so as I want to increment it each time the function is called, I should write :
x = x+1 or 0 ?
I erased all the spawns possible besides mine
and mine was defined, so it means that my spawnpoints() has not been called right ?
Game doesn't like the ZombRand call in spawnpoints.lua ๐ฆ
is there an Event I could add a function call at character creation ?
OnCreatePlayer ?
Damn, I found the bug and it works now !
so you can run lua stuff in spawnpoints.lua ๐
@thick karma but according to coop-console.log, the SpawnPoints () function is called only 1 time at the server load, and not after. Is it possible to call it back with a require call for the spawnpoints.lua and then a Events.OnPlayerDeath.Add(SpawnPoints) ?
function resetSpawnPoints ()
return
end
Events.OnPlayerDeath.Add(resetSpawnPoints)``` If I put that un a lua file in /lua/shared/ will it work ?
x = (x or 0) + 1
it assigns 0 if x is nil, else it uses x, right ?
Yes. Note that that'll start the variable off at 1
You could also do an if statement, if preferred. I didn't notice this was just a debug thing anyhow until after I sent the message before
I need a hint about the "require" (again)...
I have a file in media/lua/shared/myFileWithRequire.lua
And I want to call for a file in
media/maps/myMapFolder/myRequiredfile.lua
I tried require("maps/myMapFolder/myRequiredfile") but the server doesn't load, and I don't have a trace in logs



