#mod_development
1 messages Β· Page 320 of 1
yup
never ever seen how splitscreen zomboid looks like honestly
it's weird
a function that uses getPlayer() is just inherently less useful than a function that accepts a player
agreed
because the way viewing works you get chartacters appearing and disappearing on your screen as teh other person moves.
Plus you need a controller for one of them and I have no idea how people play with a controller.
today i played without keen hearing and it felt very weird
you really can see everything around you
yeah, keen hearing is so good I hate playing without it.
my view got like 8 zombies from one sec to another
that never happens with keen hearing
lol
try a 360Β° vision mod, so weird. But also good for getting screenshots for your mod or being able to see in front and behind while working on a headlight mod
i tried one once actually
it was a 360 + extra zoom tho
only activated extra zoom cause 360 felt like cheating
I don't like it for normal play, though I spin around to keep awareness by habit after so many hours of playing, even with the mod
feels more like cheating than the cheat menu π€£
haha true
it's just weird to see everything all the time
keen hearing is kinda that tho
thats why it is OP
keen hearing is at least a short radius around you
There's also a version of 360 degree vision that stops things being hidden if you can't see them
So you can see zombie trhough walls etc
it's so bizzare
yeye, that does feel like cheating
i think i mightve actually accidentally left it present because ive seen one thru walls more than once
it's just that it is a java mod
so annoying to remove properly
it will have been uninstalled w/ 42.7
i play on 41 :b
Oh right I keep forgetting that's still a thing
waitin for stable b42, have tried it sometimes tho and it feels really good overall
main complaint is the ui cuz with my 1366 it feels all too big
but you get used quickly
Given B42 multiplayer is probably a year away, I should remember people are still playing B41.
oh i only play b41 SP anyways, haha
lol
its mostly for the mods and because i dream of having a long term save file someday
and unstable would kinda get in the way of that
I've kept a save since 42.2... but I did wipe the world after the 42.6 great generator incident.
I found what reset one chunk of my base:
it was p cool trying it out when it released
loool, the one and only
...no clues as to what it didn't like, but something in that chunk made it unhappy
how even, isnt this like some kind of logger stored in appdata?
that's from console.txt
they'll probably end up making IsoSurvivorCharacter as an NPC class and put it as a subcllass to IsoAnimal or something lmao π
that's a discord thing when you paste in lots of text
They need to restructure it I think. Like IsoGameCharacter and IsoLivingCharacter feel lkie they serve the same purpose, and IsoAnimal shouldn't be subclass to IsoPlayer. If they need a similar player API but for animals, why not put the API in LivingCharacter
ohhh i see
itd be funny if this somehow made easier to use an animal as a character in a future though
sounds like a fun mod
well their classes seem backwards
like IsoLivingCharacter, but IsoGameCharacter can be alive and dead, why calll it living character lol
i guess living only works when you're alive...?
no idea
never seen it get called at all even
it is superclass of IsoGameCharacter/IsoPlayer/IsoAnimal
Usually you have like Character class/interface which is a game character that may or may not be controllable by the player and may or may not have AI stuff
then you have a Player class which only the user can control and not AI (some exceptions though)
then you have something like AiCharacter or GameCharacter/NetworkCharacter something like taht which is the basis for ai controlled stuff (which zombies/animals can also inherit, so you have all your core AI code in one superclass)
entity is more fitting name I think but it works however you name it
I think you mean IsoEntity π€£
this isn't correct, it's game character -> living character -> player
'living' here seems to mean not a zombie
i didnt mean it like in order, I just meant it s a superclass of all 3
it's not though, game character is superclass of living character
oh true lol
i forgot isolivingcharacter is in between them
prefixing everything with iso π
that class doesn't really do anything, i assumed it's meant to store common code for npcs and players but they put isoanimal under isoplayer so who fucking knows what the plan is
Huh, hm. So i have a question, i used jumping and falling for damage to scratch and bleed on my shin. But why doe both of my hands also loose health? (Also very, very slowly) Kinda weird.
so I want to make a mod in which a user can load their model or at least load my own model into the game, the thing is, I don't want to replace the main user, as I don't want to break the entire game models like zombies or other players in multiplayer, so my current idea is to make clothing and hide the player model so only the custom model clothing is visible, is this possible to do?
Uhm, first: are we talking about remote controlling a second model or just flying clothing worn by an invisible character?
I believe thats how a few people are doing similar mods to make monsters and stuff
how could I do such thing?
I'm not sure myself but I saw it here a few days ago #mod_development message
I would suggest looking at some of their mods to see how they do it
grab a mod that does it and look at their code
So, i have a bit of a weird question and dont quite now how to formulate it. Is there a way to make event listeners kinda self destruct? As in, i want to remove them but i dont want to use a nother listener for it since that would kinda defeat the whole purpose of doing it. π§
what do you mean use another listener for it?
local function myCallback()
Events.EventName.Remove(myCallback)
end
Events.EventName.Add(myCallback)
```avoid doing this for single fire events, since an oversight means that the next callback will be skipped when you do this
it usually doesn't matter for ontick but for stuff like oncreateplayer you might break another mod randomly
Uhm... i guess it didnt work because i used Event:Remove(myCallback) in the function? Works from outside tough, so i didnt know...
What do you mean with i remove them all tough, dont i just remove the callback i handed over to the remove command?
it's an oversight with the way events are triggered
it just loops through the list of callbacks in order, if one gets removed, then all the ones after it get shifted down to take up the empty space, which means the next one moves to where the removed one was, and gets skipped
Oh... dang, that could break a lot of stuff. Are the callbacks at lesat in their own lists (i mean by events) or are they all in one big one? I want to remove exactly the OnTick and OnDamage event callback since they are quite hungry, so when not needed, id prefer to not have them run idle. But since i want the mod to be used in MP, and there will be a lot of other mods? ouch
per event yeah, and it's only skipped once (per removal anyway)
a damage event seems dangerous, but ontick is pretty safe
if you remove it outside of a callback it's fine though
the problem only happens if it's being removed during a callback
i imagine the damage one can probably be removed during ontick (i assume they need the same condition?) so that's safe to do
Oh? Oh! so its only if i call it from inside the callback? Yeah, that solution should work. They are both for the same purpose. thx a lot, that will help :))
It's a general programming rule that you don't remove stuff from a thing you're iterating though, unless it's a test question for Comp Sci where they love stuff like that.
"Remove the current node from a singly linked list and reverse the order of all preceding even numbered nodes"
nah it's really useful to do when you're erasing some elements off a list
but for everything else it can throw people off a lot yea
Hmm, would it be a bad idea to use the tags in an item script to be able to retrieve custom stats that I want to make customizable?
For example Tags = RepairWithTape;RepairWithGlue;5, and then I just use ScriptManager to get the tags and doParam to change it?
Or is there a way to add a completely new stat variable and retrieve it? From looking at the item object it seems there's specific getters for all the stats
if you set a parameter that doesn't exist (e.g. MyParam = 5) it becomes default mod data for the item
this would mean (when the item first spawns) item:getModData().MyParam == 5
if it doesn't vary per item instance though this bloats the save file, in that case it's better and easier to just have a map of item types to their stats
Ah fuck yeah, that's way better, cheers Albion! π
Hi! In b42, the zomboid devs applied various changes to Muldraugh (overhauled buildings, some position changes of buildings etc.). Does anyone knows whether they applied similar changes to the other old starting cities, i.e. Riverside, Rosewood or West Point?
PZ modding makes me really doubt my myself. XD
So i triggered the setPlayingDeathSound from the IsoPlayer set it later to false but it still shows it as true when i use isPlayingDeathSound later on, even when that one happened minutes ago. So even if my setting to false didnt work, shoudnt there be a time out?
Anyone played around with that function and knows what it does? I get the feeling im misunderstanding the usage of that function. π
do you know any mod that can do that?
I've seen a bunch that are "replace the entire player model with a new model", is that what you're after?
Then they recommend using transmog to hide other gear.
sort of I want to replace the entire model, without affecting the multiplayer or the zombies, so my idea to do so, was to make clothes that hide the entire player so only the custom clothing is visible
I'd assume the clothing will show up for eveyone in multiplayer.
(since everyone will need the mod installed to match the sever modlist)
I'm not sure what is in Widnows 11 chan mod
That "Lady Hunk" is from someone who has made a lot of model replacers
How to wear a costume when creating a character STEP.1 Go to Sandbox Option > Character > Check All Clothing Unlocked STEP.2 Go to CUSTOMIZE CHARACTER Window You can select a costume from the shoes tab. How to make a costume STEP.1 Press B to open the crafting window You can create cos...
Done!
But I had to commit the sin of using OnPlayerUpdate Otherwise I would have needed to cap all stress from all sources.
But the game is already calculating the sound stress every tick so shrugs
why is it a sin? curious
Performance.
I've seen mods that do things like Check where a zombie on every tick for every zombie... that's a lot of workload to add.
It's OK if you keep you OnUpdate function as light as possible, and there are plenty of ways to help with that (only do stuff every X ticks, cap the number of things updated per tick, etc)
but onplayerupdate only triggers when there is a change right? and i have to use on tick atm too, also my querry is small, its still one tick so.. if you are a sinner, you're in good company. π
Sometimes there is no way to avoid it, so you just make your code low-impact.
if anyone reads this, we should make a Zombotany mod
Go full plants cs. Zombies with wold placable plants.
Tallnuts are thumpable construction, peashooters hoot zombies, etc.
...it's a lot of work and you'll be fighting the game design on every step
So, don't so what I just said unless you're insane.
if you kill a zombie on the grass it may drop seeds and more zombies can appear
More fun than vanilla B42 agriculture!
how do I download a mod from the workshop in order to disassemble it?
subscribe
the files will be downloadde by steam
C:\Games\Steam\steamapps\workshop\content\108600<number from mod URL>
how about you plant and if you let your plants die, they turn into plant zombies and if they drop seeds and you dont collect them fast enough, they turn into zombies. make agraculture fun for the whole family... XD
(adjust path if steam is installed somewhere else)
No need to disassemble - the mod will be a bunch of text scripts/lua/models/textures/sounds etc
It's very rare for modders to use texture packs or java files (which need manual installation)
Well I just updated my "mod ideas" notebook.
Now I'm going to bed.
gn8
when making clothes or COS/costumes is it possible to resize the user? in case I want it to make the model taller or shorter?
no
This would go hard
A PVZ mod in general would be sweet
Closest you can do is bulk up with big clothes.
Like "fat zombie" outfits.
might be able to go skinny too with model replacing clothes
But that's all using the same skeleton/animations.
steamapps/workshop/content/108600/
Looking at others code has help me so much with modding lol
Agreed, having mods in an easily readable format is a huge help.
Compared to stuff like unreal mods.
I feel like that's mostly cuz the documentation is horrible
Where you are getting a "baked" result.
The documentation is perfect and 100% accurate! it consists of the media folder in your Zomboid install directory and a decompiled copy of the Java files.
and even then it's a pain in the ass to find how to do actions
The good news is you have every vanilla action to learn from.
like all you get is a list of the events, but good luck trying to figure out how to know what functions are actually available to you beyond just scouring for stuff, 0 way to search things
Do you use VSCode or a similar IDE?
I keep a VS code instance open with the media folder and decompiled java folder in teh workspace, it's super handy for searching.
I'm just pointing that out
Uhm, there is a api doku tough?
"The code is the documentation" is not good documentation
It also helps that vehicle mods are fairly straightforward once you understand them
It's not good code either. π€£
Yes, but only by spenidng a huge amount of extra time, effort, money and mangement to make an excellent codebase.
I don't think it's possible
if the codebase is big enough
like if you don't need it to ever change then yes
Consider extreme examples like the code used on deep space probes.
but if it needs to be refactorable then it'll always have other downsides that people will hate
I think code that has an extremely specific purpose and extremely well defined features that will never ever evolve can be excellent
but games? never
...and ignore that tiem one group used pounds-per-square-inch and the other used newtown-per-square-meter and the probe exploded.
Maybe games in the olden days
You've got to love fast inverse square root.
Things were a lot smaller then so code had to be more elegant to run.
I'm trying to align the model to the clothes topology is there any better bone reference?
I don't really understand thisone
Nah I'm talking now, today
any codebase that has to add stuff that wasn't planned for is just necessarily a mess
language features that allow for refactoring without trading off performance or debugging options are simply not advanced enough yet
I think I found the correct shape of the bones
Compatibility with inventory tetris
Hey people, never made a mod, but considering making one to fix a bug that has been flying under the radar for a while now (reported it), specifically about leather gloves and fingerless leather gloves.
The bug itself is the fact that loot tables only seem to contain: Gloves_LeatherGlovesBlack, Gloves_LeatherGloves (and Gloves_FingerlessLeatherGloves).
To craft fingerless leather gloves, you need Gloves_LeatherGlovesBlack or Gloves_LeatherGlovesBrown. The Brown variant isn't even in the loot table and the variant without colour cannot be used for the recipe at all.
Easy mode would be just adding the non-specified variant to the crafting recipe, but that would cause the resulting fingerless gloves to be always random colour.
The proper and a bit harder mode is probably changing all Gloves_LeatherGloves to either Gloves_LeatherGlovesBlack or Gloves_LeatherGlovesBrown. Question is, can I make a mod that edits the existing stuff in the loot table, without replacing the entire loot table?
Yes you can edit the distribution table to modify or add items to the loot table without overriding everything
Awesome, thanks
You put it in C:\Users\ <user>\Zomboid\mods
It also may not be that hard converting the gloves
Well, honestly, the non-coloured variant should probably not even be in the table at all.
Maybe that was the mistake, the put in the non colored varian instead of the brown xd
Yap
By "playing" it, basically (playing it in a way where you're trying to make it bug out)
but of course you can use cheat mods alongside it, or debug info stuff
another small issue is that the brown fingerless gloves have a different name, so they don't stack, lul
AuthenticZ does all kinds of crazy stuff with items, you might find what you need there
You can easely rename the fingerless glove in the script/clothing/clothing_gloves.txt file
Also there the fileGuidTable which defines wich item is which, I have no idea if this would work but maybe swapping the non colored version and the brown one would work ?
<files>
<path>media/clothing/clothingItems/Gloves_LeatherGloves.xml</path>
<guid>2b0756ac-57f3-415e-bfed-24b28d1ca4d6</guid>
</files>
<files>
<path>media/clothing/clothingItems/Gloves_LeatherGlovesBlack.xml</path>
<guid>096acc98-7ac1-4867-82dd-af77afb6a87b</guid>
</files>
<files>
<path>media/clothing/clothingItems/Gloves_LeatherGlovesBrown.xml</path>
<guid>349a92a8-e06e-4da0-8c55-172a358e0173</guid>
</files>
Oh, would that mean that renaming the ClothingItem value of Gloves_FingerlessLeatherGloves to Gloves_FingerlessLeatherGloves_Brown automatically makes all Gloves_FingerlessLeatherGloves spawn as _Brown?
Editing the fileguid would replace all non colored variant with the brown (in theory) like they were totally different items
So all gloves in any inventory and all the ones which would spawn
Worth a shot
welp
when I craft the COS
the item never gets on the inventory
if it just despawned stuff
will try, thanks
do COS models require any specific configuration on the FBX export?
I tried directly replacing frog
but the model does not seem to appear
as if I was wearing nothing
oof
a bit cursed but it works
"a bit cursed" means it will fit in the always-slightly-janky aesthetic of Zomboid
oh this is weird asf. They have the correct display names in the files, but not in game... So not as easily fixable as it seemed.
The names are different in the tranlation file
ItemName_EN.txt under ProjectZomboid\media\lua\shared\Translate\EN
Ahh. Right. Thanks
Also, I wonder if there is a fast way to test spawning of an item... Apparently Golf Bags have quite a high chance of spawning leather gloves, but can I somehow spawn a bag with its loot table filled, instead of empty?
I have no idea
cranked clothing and bag loot up to 4, which is max, maybe that will help
Can the game be run from the executable when in nosteam mode ? I only seem to be able to launch it from the batch file.
.exe definitely worked for me in B41 when I tried.
But it only made a difference in multiplayer, so it is currently irrelevant for B42 (I was trying to join a locally hosted server with 2 zomboid clients)
are microwaves broken right now?
Trans flag, peak
Yes, mine at Home stopped working ando now I have to eat My dinner cold
Yes
This fits in so well. With a certain crowd especially haha. good job.
Thats what most of us do here. It's fun, even if lua arrays start at 1 but most zomboid object lists at 0 
Yeah, I want that hour of my life back too.
thanks for the knowledge
For the purpose of the standard library and the length operator tables start at 1, but if you're feeling real wacky you could start them at 0 anyway (not a real recommendation, just joking π)
Hehe I am not complaining. This would get into programming philosophy. I guess when lua authors made that choice back in the 90s they didn't envision the kind of tight integration with Java APIs π
Now for something different: How many squares around a car spawn should be checked to be "empty" to avoid undesirable π¬ side effects? What else to watch out for?
I can experiment but maybe somebody knows.
Tables start at one, if you're using default "I just put in values and let you choose the keys"
If you get an array from a java function call that's a different thing and starts at 0
And you need a different syntax to iterate through it
i see
Yeah iterating through ArrayList is what got me
And Right Click To Wear now has B41 support !
https://steamcommunity.com/sharedfiles/filedetails/?id=3453580134
oh, that's pretty cool!
oooo this looks so useful actually
good job!!
Me
does anyone know of the mod that lets you right click on the ground and clear trash tiles... i have it and wanna turn it off. but have no clue what mod it is.
lifestyle, perhaps?
bikini?
If the yes = true line is never met?
i will trust my own instinct
i defined it as false by default so in case "AutoSave" is NOT present on the file i'm reading then it wont be true
i dunno why intelliji is saying it's always gonna be true
probably just a small problem with it
which one lol
but the yes = true line is gonna get eventually met in case the file actually contains that π€
you know maybe
i'm doing this in the wrong order
uhh, hobbies i think?
let's you clean blood and trash
with a broom for trash, specifically
here
now it actually checks for the file to exists in a first place
wait you intend to return?
uh, it stops the for, right...?
no...
oh, damn i see
in other languages i've used it does so lol
this is an admin option that removes all trash tiles in an area.
well in any language it will stop the for loop, by stopping the whole function
when you return, no more code gets executed
so the if (autoSaveTime == -1) wont run
i actually had the feeling that could be the issue
so i tried exit too but saw it didnt seem to exist her at all
that is probably why it was complaining, because the code cant even be used past the return, same as why yes is grayed and warning'd
B41? try Common Sense. B42? I think that is vanilla now.
it's actually nice i have this setup
all i have to do is to double click the compile cmd file and boom
- get teh exact text of the context menu option
- search your mod download folder for any .txt or .lua file containing that
- profit
ouch
is there anything wrong with these...?
my game's crashing
and i dont really know how to check a java error log lol
they get used like this just in case
you're closing the reader and then trying to use it again
yeah
don't bother trying to use a native array here, use an arraylist, it's far simpler and doesn't require you to already know the length
sure
i'm just more used to the first one but it's true the latter is more useful in this case
thanks
oh, also, you always initialise the array as length 1, so you likely write out of bounds too
i thought i was done with my mod but just before starting to make the workshop page i stopped to think how would this work on a fresh install and by testing so i found it did crash π
good thing i thought of that in time
grrr... this sucks
there we go, much better
i think this will result in it skipping every other line
i think you can use fileInput.ready() to check if there's still lines to read instead of checking null
was thinking of something else but sure i can try that
(just in case, this was my idea)
it'd result on having one single empty string but for what's it's worth, i wouldnt really bother
but if yours work then that's better
i'll try it rn
yeah! it worked! no crash
cool
everything's working just fine, i think I'm actually done now!
thanks a lot again, albion
just saved me a lot of time lol
yup, just made sure it worked on b41 and it did
gonna work on the workshop page now, finally
Finished it!
gonna try adding a proper B42 tag tomorrow
gotta go eat now
buh-bye!
Just a suggestion, you can guarantee a save isn't a softlock if you "save but don't make the save available until 5 minutes after, if and only if they are still alive"
save wont work in case character is dead, thats for sure
lmao
that's not what I mean
I guess you might not have the tech to "hide" saves as a mod
but that'd be the idea
you make the save, you "hide" it, and you "unhide" it 5 minutes later if the character is alive, otherwise you delete it
i did think about making it so it wouldnt work in case character was in danger or panicked, but i thought it could just be more annoying
thats just the equivalent of saving with 5 minutes delay lol
Which, seems to be what the thumbnail is saying your mod does
but I guess not
when you load zombies will forget completely their task. the only case this'd turn into a softlock would be if the player's hp is ridiculously low the moment the auto saving happens π€
oh, there is a youtube video attatched to it
here, let me link it
I'm good thanks
This is my mod for Project Zomboid!
Download it at: https://steamcommunity.com/sharedfiles/filedetails/?id=3460681779
oh,
well i sent it already lol
watch it if you want, i guess
but in reality it just creates a separate save file
so your main save file is always a different thing
Forgot to take a picture but itβs just about done!!
Gonna need one last day on it, something happened and I took a break for a bit, all thatβs left is masking and re-textures
Will either be the jeep forward control next or the zip van
Nice!! Congrats!
Thanks!!
Iβm debating on releasing a closed beta or alpha (whichever is the proper term) for people to play around with since Iβm so open and active with posting progress, but Iβm unsure yet
@gilded crescent here you go, it's done
hope you enjoy it lol
Oh sick, I definitely will
Maybe you could try it out with friends, so it isn't as overwhelming
This is true!
I donβt play enough anymore to properly test balencing and such, Iβve got one or two friends who play a bunch that I could send a link to
I included a sandbox option to kill trees with one hit because after recreating an entire java functions in LUA and then also recreating a secondary function inside that just to change a single 1 to 0 because TIS screwed up... I HATE TREES.
Three hours from start to Workshop upload is the quickest I've ever done a mod, usually I come up with an idea and screw around for along time before completing it.
Including my extensive research into lumberjacks
Is there any way for an object to have multiple types? Example, a clock can also light up
Tags?
I want to try and make a molotov/firebomb launcher, but I'm not sure how throwables work. Where can I find the throwable logic/lua so I can take a look and reverse-engineer it?
But adding light... do you want this for placed alarm clocks, or the watch the player wears?
I think Tags only serve for search filtering.
Tags do lots of stuff.
wear
Let me check my "all watches, all features" code for a sec
Ok, sorta bad news: the type AlarmClockClothing is what controls the clock appearing
sorry that was all wrong - Torches/lanterns are type Drainable.
So what you could do is what this mod does: https://steamcommunity.com/workshop/filedetails/?id=2766033079
just create a world lightSource under the player and constantly delete/recreate it as the player moves.
so there can be multiple Types?
A warning: this will be very janky unless it's a large area of dim light, because the light source is always in teh centre a tile.
No, just one.
In an ideal world more things would be like fluidContainer which is something you add to other items; so you would make an item and attach a lightSource and alarmClock... but that is just wishful thinking right now.
But for now, an item can be a Drainable OR AlarmClock OR AlarmClockClothing
It might be possible to make a type=AlarmClockClothing emit light like a torch, since the various light parametrs are in InventoryItem
declaration: package: zombie.inventory, class: InventoryItem
which means AlarmClockClothing inherits those
If you assign the various light properties to a watch, then you can activate it with setActivated() BUT it will only act as a light source if it is an attached item (ie: on the hotbar) or held in a hand.
is there a possibility for java mods to be supported by workshop? or is modding gonna just be lua forever?
On one hand, nothing is impossible. On the otherhand, official modding support for java mods might as well have a 0% chance of happening..
But, there is work on a thingy you hack into Zombod that allows for java modding, which I was menat to look at last weekend and did not.
But in practical terms, for now mods are all lua or they require manual copying of a java class that the mod author has to keep updated.
Portable radios already exist, you could probably make them glow when in hand/attached by adding properties to the item script (might need some lua to turn on/off)
i see
do you know if the devs have spoken abt it?
No, but I've seen the pace they work at and can guess how much work official java modding would be to implement as well as how low it is on their priority list.
They may also just not want it to be easily done to avoid thousands of poorly coded java mods causing havok... lua is much more isolated from the core engine
There's a mod that adds a Pip Boy to the game, but it only acts as a watch, and I'd like to add other things to it. Like the lighting and radio capabilities like in Fallout.
ah i see that makes sense thank you
I've got a suggestion on how you can do that:
- the pipboy adds two hotbar slots for "pipboy modules"
- pipboy torch module is a torch
- pipboy radio module is a radio
because the modules are attached items (like if on a belt slot) they will do their torch/radio jobs without needing to be held in a hand.
The model for the modules would be something small you can "hide" inside the pipboy
Or do some more modelling work so they look correct when attached, adding a torch lend poking out one end and an antenna to the other or some such.
quick question, how difficult is it to modify some mods so that they could support case sensitivity on linux and all?
depends, like drainable combos. not everything can be set tho.
mostly its just the drainables i think
and maybe the containers. you should do further research im not that 100% sure
you need to do some codes for them to work i suppose.
Probably not at all; just find the thing in the mod's lua you want to change and change it.
Or make the case what is expected instead of relying on a case insensitive filesystem
But, thats for case sensativity OF THE MOD - not of the java stuff that runs the core game.
yeah well I'm coming from a player standpoint on linux, and some mods are having some issues when I'm trying to host or join a server, meanwhile for my friend who's on windows, everything is fine
therefore im just thinking of patching the mods myself to make them work
You'll need to figure out what in the mod makes it fail on Linux. If they also fail single player that will make troubleshooting easier.
E.G: if a texture is named myitem.png instead of MyItem.png the fix is to rename that file.
yeah i do get some errors on game startup aswell, meanwhile my friend doesn't
(and let the mod author know, since they are likely unaware of this)
What are the errors?
it seems like they're mostly file not found errors
somehow i managed to mitigate one error by just copying the missing file in all lowercase into my game's folder itself instead of it being in a mod
but then later on that didn't work for other files?
question: how do you guys make mod have two selectable suff in mod manager.
like difinitive zombies have:
[ ]Definitive Zombies
[ ] Definitive Zombies WIP
are they just two folders inside or something?
that's just two mods, a workshop item can have any number of mods in it
Without knowing the actual error messages no-one can give you specific advice.
you just have to make another mod in the Contents/mods/ folder
Thank you.
Thank you π
Edit mod.info so they are incomatible with each other, or one mod requires the other, as appropriate
thanks so much π
on it, i'll quickly start the server and try to join. weirdly enough it only prevents me from playing on servers, not singleplayer
ZNet: CloseConnection: checksum-File doesn't exist on the client: but both files exist, hell it even gives me the file paths for them and i can successfully print their contents with cat which would definetely complain about the file not existing
huh, really? znet was made case insensitive years ago
most of the game just treats all paths as if they were fully lowercase to prevent mismatches like that
it used to be a really prominent issue
ERROR: General , 1744187201279> 0> DebugLogStream.printException> Stack trace:
java.io.FileNotFoundException: /home/a/Zomboid/mods/media/scripts/??????.txt (No such file or directory)``` and these are the errors that i get when starting the game
Hi guys, i'm not an expert modder, i did a mod that adds a lot of traits and professions, all the logic was based around getting around the game limits and excluding traits and professions to each other via inserting a free trait for each profession added which handled all the exclusions for them.
Unfortunately the latest game update broke something in how trait exclude each others and my mod no longer works.
I tried to understand what exactly was changed, in the changelog I read this: "Fixed free traits with mutual exclusive traits set not returning their removed traits back to the list." and I am convinced that this change generated this bug, but I can't find the logic in the game that defines mutual exclusivity to understand what change has been made and how to act.
Can anyone help me to understand?
zombie.characters.traits.TraitFactory.Trait has a field called MutuallyExclusive which is an ArrayList<String>.
is that what you're looking for?
it appears to be used in TraitFactory.setMutualExclusive(string, string) and TraitFactory.Trait.updateMutualExclusiveTraits()
i think the changelog seems to be referring to TraitFactory.Trait.addFreeTrait(string) :
public void addFreeTrait(String string) {
this.FreeTraitStack.add(string);
this.updateMutualExclusiveTraits();
}
but it intellij idea says it's not used anywhere though.
how is it not working anymore? what happens?
just started using Intellij Idea recently, what do you mean by it says it's not used anywhere? did you just open the zomboid code as a project and then search the files through Idea?
if so is there a way to mass search?
yeah double tap shift
Too many times digging through game files to find a singular item
holy moly you're amazing
i right click the function and click on find all usages
gotcha okay, does that work only within the open files or the entirety of the project folder?
the entirety of the project folder i think
sweet, the double tap shift thing will help so much, I'm sure I'll end up using the other one as well, thank you
np
also this btw
Sorry I should have clarified, I wasn't the person you originally responded to, sorry for kinda taking over the convo, I was just really curious
thank you, so that's in the java part
oh lmao my bad i thought u were
it's all good lol, I can see how it happened
Hi! What parts of the lua code determine which clothes are worn by zombies?
that's really weird ans makes me wonder if you have filenames with weird encodings... unless the contexI aoround those errors helps don't think you'll be able to isolate it with doing the "try again whiel removing/adding mods to isolate teh problem mod(s).
its done in java i think but the outfit spawns are set in media/lua/shared/npcs/ZombiesZoneDefinition.lua
yeah i did see some files being in a foreign language
from the mods
Do you happen to know where the outfits like "Priest" or "Classy" are defined? Or is this java side?
This is where it's helpful to have a copy of VSCode open to the games media folder
try media/clothing/clothing.xml
Difficulty: it's all in guid references to clothing objects.
<m_MaleOutfits>
<m_Name>Priest</m_Name>
<m_Guid>c7b4f6ab-f087-466b-b6c1-b205d835944b</m_Guid>
<m_Top>false</m_Top>
<m_Pants>false</m_Pants>
<m_AllowPantsHue>false</m_AllowPantsHue>
<m_AllowTopTint>false</m_AllowTopTint>
<m_AllowTShirtDecal>false</m_AllowTShirtDecal>
<m_items>
<itemGUID>22cf3dec-2614-4ff3-ad37-6d25756da612</itemGUID>
</m_items>
<m_items>
<itemGUID>52acd769-424a-4cbb-b02a-441cb723b747</itemGUID>
</m_items>
<m_items>
<itemGUID>593bea3d-c127-4574-ac1e-2197dc56e486</itemGUID>
</m_items>
<m_items>
<probability>0.1</probability>
<itemGUID>6d702d88-4ca0-4bcb-9aee-d88f2be29e69</itemGUID>
<subItems>
<itemGUID>02b1eb52-8492-4e6e-b0f4-4bda5501fd69</itemGUID>
</subItems>
<subItems>
<itemGUID>62ef5f1f-8eca-4ef2-8ade-fd4fa604762f</itemGUID>
</subItems>
<subItems>
<itemGUID>9df22d1f-96cd-4d2c-88f2-4e7423d93649</itemGUID>
</subItems>
</m_items>
<m_items>
<probability>0.3</probability>
<itemGUID>5fc22466-2942-4ba1-8c33-2a8528b73021</itemGUID>
<subItems>
<itemGUID>ce1a8520-7120-432e-8a3a-aa7b3094f0bb</itemGUID>
</subItems>
<subItems>
<itemGUID>c7cc655b-284a-4087-85a6-d7c116385fb0</itemGUID>
</subItems>
<subItems>
<itemGUID>0383956a-3fbd-4001-9749-69e2ba70b134</itemGUID>
</subItems>
</m_items>
<m_items>
<itemGUID>a1209137-d0a3-4c77-ae25-b0e5f24b7cf8</itemGUID>
<subItems>
<itemGUID>56d487e0-b329-45cd-8b35-8463491891fa</itemGUID>
</subItems>
</m_items>
</m_MaleOutfits>
Many thanks! That's what I was looking for! Bonus: Oh no! Why those guid-only definitions???!!!!?? π
Because there was a huge sale on the numbers 0 to 9 and letters a to f a few years ago.
So they starting using guids for clothing to keep costs down.
Or maybe it's because a guid can be stored as a 128bit integer for fast processing/compact storage when dealing with thousands of zombies and thousands of clothing items.
And making you put guid's in the files means the program doesn't have to worry about computing unique hashes or what to do if something changes that alter the guid hash.
I assume the devs have some sort of system to build the xml from a database, or at least an excel sheet... but we don't get that.
Ya... I think it isn't too hard to automate the generation of such an xml file using simple scripting techniques.
its in media/clothing/clothing.xml
Guys anyone knows what parameter roll influence does in vehicle settings? I tried different values but there are no effect
Does anyone knows how I may use the methods from the OutfitManager class in lua? These ones: https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/core/skinnedmodel/population/OutfitManager.html#GetSpecificOutfit(boolean,java.lang.String)
I already tried
local outfit = OutfitManager.GetSpecificOutfit(true, "Generic01")
but this gave me a Stack trace error.
declaration: package: zombie.core.skinnedmodel.population, class: OutfitManager
try the other two below it and see if they work instead maybe
Same results. Maybe I have a stupid sytanx error or do not access the OutfitManager in a proper way. Btw I call the method on game boot...
What I try to do is adding a specific clothing item to a predefined vanilla outfit so that it may spawn on zombies (without overwriting the outfit's xml entry in clothing.xml). So I am wondering whether it is possible to do this in lua coding.
Try specifying the instance by doing OutfitManager.instance before the method call.
I know it's needed for ScriptManager so maybe it's the same for OutfitManager
Thanks!!!!!
is it getOutfit()
or was it getOutfitName()
im afk cant check
theres also a getPersitentOutfit()
oh nvm you found the answer and i was way off mark lol
no luck again π
Dang :/
So aren't there any mods which achieve adding a new item to predefined zombie outfit? All examples I've seen so far add a full new outfit with the new item instead.
how do i make it day in debug mode?
Good Morning everyone!
Is setPanic() deprecated in B42 or have the acceptable argument values changed? In B41, I passed an int of 50 as a value and it was accepted without issue. I've tried in B42 with both 50 and .5 (just in case it is now a float) and both threw errors.
Thanks in advance! Learning about this game has been a joy! 
In build 42 , are there any problems of running mod code in the mod's server folder??
My code in the server folder doesn't run!!!! Is there anything special I have to do to make it run? Putting stuff in the common folder or smth? Btw code in client and shared runs fine, as expected.
So, if it doesn't work, how can I add new items to the spawn tables so that they spawn in the game world?
so what I tried is just running code with a print command but the print doesn't appear in the console.txt...
It's pretty easy, you just make a .lua in lua/server/Items where you add lines like this:
table.insert(ProceduralDistributions["list"]["CampingLockers"].items, 0.7)```
Where the first line is the item, and the second is the chance.
You can read more here https://pzwiki.net/wiki/Procedural_distributions
hmm... ok. but any idea why my print command doesn't run properly when put into the server folder?
Love to my fellow Linux Gamer.
Not sure tbh, what does your lua file look like?
πͺ±
In some cases, this might be due to naming conventions. Linux is case sensitive while windows isn't. So the modder might just have some wrong upper-lower-case issues in their code and file names.
It is just
print("TEST_OUTPUT: server code runs")
end
Events.OnGameBoot.Add(testFunction)```
and this doesn't produce output in the console. I also tried running simply print-command without an event. Also doesn't work for me.
Anyway, I just tried running the code during game via the EveryOneMinute command and this seems to work...
Hm, so i wanted to look at the zombie population on my (whole) map, but the only thing always refers to the zombie popluation monitor in debug. Is there really no way to see it all? Was hoping there was at least a mod for it out there, but no dice (or im looking wrong, which is very likely. XD ).
tested on fresh save in b42 from console: getPlayer():getStats():setPanic(50) works fine
yeaaaa thats what ive been guessing
The vanilla code contains a file Distribution.lua in the server folder but the main table is local. It goes like this
local distributionTable = {
-- some items...
}
table.insert(Distributions, 1, distributionTable);
--for mod compat:
SuburbsDistributions = distributionTable;```
Can I still add items to the table somehow? Maybe applying "table.insert" to the global "SuburbsDistributions" or "Distributions" tables?
Yeah exactly, you do table.insert on the ProceduralDistributions. You just need to have a lua file in your lua/server/Items folder where you add to the loot distribution tables like this:
table.insert(ProceduralDistributions["list"]["CampingLockers"].items, 0.7)```
Thanks but I do not mean the ProceduralDistributions table. I am specifically asking for the table defined in the Distributions.lua file I mentioned above. This seems to be a different table.
Isn't pretty much everything controlled by procedural distribution now?
possible that these are some irrelevant and older lists. but I am not sure...
What are you looking to do? Because if you are trying to make an item spawn in a specific place, then I'm pretty sure the ProceduralDistributions list is the way to go
the server folder doesn't run until after the ongameboot event has triggered, so if you put something on that event there it will never be triggered
the server folder doesn't run until you actually start/load/join a game and ongameboot happens on the main menu
That makes sense! Thanks for explaining!
I have a new clothing item and I just want to give it exactly the same spawn rate as the vanilla Trousers_Denim. The latter also has an entry in the Distribution.lua table so I thought I just add my item to this table too.
So i read in one of the tutorials you should save functions locally when they are very often used (like in a loop), since they become a local copy. That i understand, i just dont quite get why some functions work while others throw a fit? For example i can save instanceof this way, but getSpecificPlayer would throw an error, even when both are declared in global?
that shouldn't happen π€·ββοΈ
Well, it does, let me just get back to it and fish out the error (something about _sub if i recall?)
how weird... suddenly it works?
Then i retried it with saving os.time that also made problems before... and that one works too? O_o
Albion, did you run a bugfix on the matrix when i wrote that to make it work? XD
Is there a handy command for making a certain vanilla not spawn in the game world? Or is manually removing it from the spawn tables the only way of doing this?
you mean like removeing it from teh distribution table?
i think there was a command for removing items from the distribution/proceduraldistribution but i cant find it. but you can always go with table.remove that works just fine if you know what you whant to remove
Ok, here is an example
table.remove(ProceduralDistributions["list"]["MovieRentalShelves"].items,
By iterating through the table, you can stop at the item of your choise and then use the remove command
thanks! that was the solution I already thought about! π
Ok, just to make certain i fully understand and its not helpful, back to my question about saving methods locally.
Im runing both on tick and OnPlayerGetDamage, so i want thm to run as little commands as possible.
So if i write in my OnPlayerGetDamage an if controle with `
character:getBodyDamage():getOverallBodyHealth()
i imagine this to be more perfomance hungry then say:
localOverallBodyHealth(localBodyDamage(localPlayer)))
But is that correct or are they pretty much the same at the end of the day? (just curious π€ )
Lua learning pains.
"You almost never want ipairs unless:
You're working with ordered numeric lists
You're explicitly relying on order or index"
that little shitty "i" slips in so easily ..
you actually literally never want ipairs
it's slower than a for loop (usually not so much, but in pz the implementation is so bad it's massively slower) which does the exact same thing
noting that one down, thx π
the locals are a little faster yeah
Ok thank. Was imagine that they should, but not sure if it was worth it. Ill just keep to it then. π
Probably a long shot, but there doesn't happen to be an easy way to change the collision box of the player? π¬ I found something about collision size for animals, but before I start digging deeper I figured I'd check here
I dont think its code based. The code has lots of stuff about collision, but i dint see anything about seting up boundary boxes. They might just fire when hitting a texture that is set to be colidable (at least from what i read). So maybe just pump it up and see if it collides with the texture of your player?
Interesting idea, I'll see if that could be the case
I want to make it so my bike wheels don't clip through walls, but if it's too much of a hassle it'll just have to do.
Was thinking maybe it's connected to the character bones, so pushing the size up maybe could do it. But I have no idea, will have to dive deeper
Isnt your bike like a movable object or something like a vehicle set up? Sry, no idea about modeling, cant even set up a gun with a custom texture, so there is that... XD
It's a wearable item that "gets worn" on the prop bone that I can animate freely in Blender, so it's like wearing any other clothing technically
Oh? Hmmmmm, i dont think cloth have collision tough? I dont even know if weapons have collision, would have to check in on weapon swing to see the details
Yeah I don't think it has collision by default, but if there's a way to increase the player collision box then it would be easy to just make it bigger while on the bike. But I doubt it's gonna be simple π¦
Ok, might sound totally crazy, but how about you make your bike thumpable?
Hmm, it's worth looking into, but I'm not sure if items can be thumpable, I've only ever seen entities be thumpables. I'll check it out!
Has anyone seen this kind of issue? Vehicle canβt move
Okay I lied, I'm not making a molotov launcher. But I still need to figure out where I can modify the molotov behavior to bend it to my will. Is throwable logic defined in Lua, or elsewhere?
lemmy check, wanna have a wizzard in the game
- The Beginning Has Released
A new gamemode challenge based on CDDA but More Evil can be started from the main menu
You have 12 Hour ingame, apon start to decide your fate
Should you not decide, a 10 Kiloton Nuclear bomb is Dropped Apon you. And All of kentucky is Gone for good.
- The Choice, Dweller, Is yours
https://steamcommunity.com/sharedfiles/filedetails/?id=3461117277
Uhm, cool? dont know cdda or about decide your fate, but every mod done is a good mod. π
a good mod indeed
burn baby burn
( its 90% of the entire game map lol )
how did you do it without the game going down to 0 frames? XD
what do you mean exactly with trowable logic? i checked and you should be able to find everything you need in handweapon, but the throwing itself is in java - and the molotov behavior too. What exactly do you want to do? If its just doing fire or a custom explosion, you migh be better off doing it yourself.
When making a new clothing item, in which folder do I put its icon?
Right now I'm interested in making it potentially travel faster, or be able to impact zombies. Right now it seems to fly for a fixed amount of time unless it hits something like a wall. I know basic programming concepts but I'm really unfamiliar with zomboid itself, sometimes I feel like its all kind of spread out. So, wheres handweapon and the throwing Java in the game files? Would looking at those two be enough for me to figure out how to make behavior like that on my own, or should I learn more elsewhere?
I guess while I'm asking about this, I'm also curious about how shooting guns works. I think it'd be good for making chain lightning
Uh, you might have to check out lua for that. Modding in java is more of a nono. https://zomboid-javadoc.com/41.78/zombie/inventory/types/HandWeapon.html Thats the handweapons. As for throwing stuff, sorry, i didnt find an example in the source files so you'd have to check it out youself. Maybe one of the big guys here can tell you more, im also rather new to pz modding. π
Javadoc Project Zomboid Modding API declaration: package: zombie.inventory.types, class: HandWeapon
Try re-logging
If itβs a nod your working on, also make sure the wheels arenβt in the ground/are actually touching the ground
I had this issue when I was developing my C-series but I donβt remember exactly what the issue was lol
I think you're out of luck, too much is in java. Also worth noting that TIS mentioned reworking throwables to be like the aiming system with actual 3D projectiles, but given how they are struggling with "shoot a gun" I think that will be a while away, or even dropped from scope.
You can fake some things, like spawning an explosion directly on a square (IsoGridSquare:explode(), but it takes exactly zero parameters so you just hope it is the size you want)
And we have nothing for stuff like "draw a line of lighting between two points" π¦
That is a shame, but I guess since bullets are invisible, invisible arcs of lightning wouldn't be too bad. As long as I can find a way to "shoot" a zombie like a gun and then have chances to "shoot" other zombies from that position.
Is there something to spawn fire directly on squares?
In B42 Bullets are visible, as a tiny white line.
IsoSquare:startFire()
Uh, im not certain about the invisible bullets, ive seen shotgun pellets fly
I can't ermember how it looks in B41 anymore π
I don't have the best of eyes, haha. Perhaps I need to take a closer look at guns in-game, too!
there's also IsoFireManager.StartFire(...)
Wizard with a Gun is an established genre!
Was playing when it lagged on mp VERY badly and i was talking about with others how we could see the shotgun bullets fly in slowmo ^^
Anything new in modding news? I hate being so swamped in work I can't enjoy anything but the embrace of my pillow and blankets lolll.
In official modding? I'm not sure.
In my modding world? Released a rewrite of a way-more secure anti-cheat for Build 41 multiplayer.

Hahaa that's awesome ngl.
PEAK
Current Powell progress
Mask and lights are just about done (gonna continue work tomorrow)
Re-texturing was, honestly making me angry so Iβve still gotta do that, aswell as wheel models and the model varients
what the hell loooool
I've been experimenting with my fireballs and it seems like there might be a limit on tiles that are actively on-fire. I don't mind it so much but I'm curious if the limit can be raised.
https://steamcommunity.com/sharedfiles/filedetails/?id=3459875383
try this one and say goodbye to betterfps π
I figured out why chunks occasionly reset in B42.7: https://theindiestone.com/forums/index.php?/topic/82825-4270-rev28118-failure-to-validate-saved-items-texture-index-causes-entire-chunk-to-reset-when-loading-due-to-out-of-bounds-error/
Version: [42.7.0] Mode: [Singleplayer] Server settings: [N/A] Mods: [None] Save: [New Save] Symptom: after loading a game a chunk of the world will have been reset, destroying all items and placables within it and reverting back to the initial world state. It may also spawn zombies, presumably as...
Is it possible to get a world inventory item's rotation on build 41 ?
Check the B41 Javadocs
Here are B42 methods:
B41 might have a smaller number of methods for this (since items can only rotate around Z) or it might have all of them (even though there is no way in-game to rotate X or Y)
Already check for javadocs, B42 as InventoryItem:getWorldZRotation()
But B41 doesn't
There is a public field worldZRotation in the InventoryItem java class but It doesn't appear to be accessible in lua
Starlit will let you read public fields of java objects that are not exposed via methods
No. You can't get it with get fields, because it is hidden by the extended classes of inventory item
But getting the InventoryItem's is possible ?
If you could have an instance of InventoryItem class, you could get it, but every item uses some extended version of the class, so it is hidden. Only the public fields of the extending class are visible by using it
I do have an instance of InventoryItem, I did not require the WorldItem's one specifically
But thanks for the tip, now that I'm starting to play with get fields, I could have taken a long time figuring that out xd
Did you check the type of the item? It was my understanding the every InventoryItem is actually some extended version of it, like ComboItem, InventoryContainer etc.
But if you did actually get an item with the "base" class, I would be interested in knowing how
I was trying to figure out the same thing for a while, and failed. That's why I requested the getWorldZRotation for B42
Well no I don't have a base InventoryItem instance
hi guys, im having problem, trying to port a mod into build 42
And now I see the problem
You need a 42 folder and a common folder in your mod
Oh an item, I read the mod doesn't exist mb
no prob
I'm not an expert on the subject of Item, I'd suggest trying to add it in a different module but appart from that π€·ββοΈ
Make certain there are no exceptions in you console.txt about things failing to load.
If you can't see a problem, remove the recipes so the game starts up and make certain the items are available in the game.
One typo will make the item parser give up, and then no further items are loaded and then recipes can't find things.
Or you could do what I did and put the item script in media/lua instead of media/scripts and wonder why it does not get loaded.
i thin;k i found the problem
for some reaons... output items need to be outside a bracket
i dont' know why..
when inputs they are in table form
while output is not?
the recipe parser is barely holding on when you give it exactly what it expects. Don't confuse it!
I think she's ready
https://steamcommunity.com/sharedfiles/filedetails/?id=3461415167 Still pretty basic, I need to add custom sounds and some more animations, as well as make the spawns more dynamic, but it works well enough for now!
Yeah it's something I've been wanting since I started playing, just a quick/quiet option to get around on small loot runs.
Once I get the attachment system working I'll make it possible to attach stuff like saddlebags and other types of containers to it, but they decrease the top speed if filled
Hell maybe even a trailer in the form of those baby carriages
Oh shit and gotta make a baby seat that you can put a spiffo doll in
And Like Clockwork, THE ADDON From ME >:D
ACRO BIKE!
Prof Ash: Now Is Exactly the time to ride that!
The animations are Smooth
i quite like them yes, they suite it very well
I need a "!remindme" bot like Reddit to sub to these when I am done working a bajillion hours a week hahaa.
Hi! I am currently adding new zombie outfits and make them spawn via editing the tables in ZombiesZoneDefinition.lua (B42). Is it possible that editing those tables can somehow reduce the overall number of zombies spawing? I just did a test run of my mod and have the impression that the pop is somehow ultra low (might also by RNG though). Or did the devs lowered population in a recent vanilla update?
that model looks pretty cool!
Well I'll wait next week to release my thingy, looks amazing !
With bugs, anything is possible. There's been no change to the spawn rates in B42 updates, though. I would look at other mods that do a similar thing and see if there's any major differences between what they do and what you do. If there is, then that's probably your hiccup.
I think I did the same things as other mods adding new zombie outfits. Still possible that I forgot smth ofc.
Aye this is cool
Isn't/wasn't there a bicycle mod in b41? with MTBs etc. what happened to that one?
There was one by Braven yeah. I tried reaching out a few times to see if they wanted to collab on bringing the bike to b42, but I never heard back.
Our methods are very different, theirs is technically a vehicle, so it's affected by vehicle physics, and it adds some difficult limitations in general to work around.
Mine is an item that you wear basically, so I'm essentially just animating the character and sometimes the position of the item, making it a bit more flexible in some ways. There is apparently a way to animate individual parts of items now, so I'm gonna play around with that and see what I can come up with.
Theirs was way more extensive though in how the bike was structured, every part could be swapped out/damaged, and it had animated parts like the wheel spinning.
you can animate parts of items? π
Yup, that's why they treated their bike as a vehicle. The vehicle physics was more a trade off for the way they wanted to incorporate the damages and parts swapping. It's what I'll have to do to incorporate the "final vision" for the ZuperCarts B42 fork (most likely); if I ever get to that point.
Ash was telling me about how things have changed since b42 and they now accept different kinds of armature, including non-character ones, as part of making animals work. Unless I misunderstood (I still have to look into it deeper) there's for example some doors now (like in the video) that have the animation exported with the model, and it animates one mesh separately from the other one.
that's true, i'm not sure you could leverage it for items though
mostly i just don't know how you'd even trigger an animation for an item
i'm actually the person who worked out how animal models even work π
Oh nice haha, makes sense! π
And yeah that's where I'm at now, trying to see how these animations are triggered
I feel like it should be possible to kind of mimic that by making the bike a weapon and then making the parts different weapon attachments, and then just modify the item stats based on the attached parts. But I say that as if I have the slightest idea of how the attachment system works, which I absolutely do not lol
I don't see why that wouldn't work.
Did you solve the collision with walls? If yes how? curious
Nah I never did, I looked a little bit but couldn't find an obvious solution so I'm gonna leave it for now
Ok, thats a pity tough. Hoped you'd find a good solution. π
I don't think you can. It doesn't recognize the object that way.
Unless you mean something other that what I think that means.
Yeah I was trying to see if I could just manipulate the player model collision, rather than trying to add collision to the item. But couldn't find how to do it
If I try again and find something, I'll let you know! π
That would be nice π
Wow that sounds amazing and complicated. I loved driving around the bicycle with a little trailer π₯Ή, put a propane tank inside and I disassemble the neighboorhood quietly. A simple life is still a life.
So I guess if its not vehicle-based that's not coming in so easily.
Did anyone find out how to change a characters movement speed? Its single player only, so i dont mind if its a dirty hack or anything, its just for me messing around.
Do anyone use Militek mod? How do i set the hotkey of my helmet that turn on the night version? Cause everytime i click A it will turn on
might want to ask in support and not in development? except the developer hangs around?
The "correct" way to do it is to make a new animation where you animate the translation_data to travel further in the same amount of frames.
You could also increase the SpeedScale of the walk/run/sprint anim set, but it will make the animation play faster as well
The quick and easy way is to use the TchernoLib speed framework
Man, I like vscode with EmmyLua-style annotations
ahhh awsome
your method breaks away from vehicle limitation but at the same time reduce the functions you can use tho (like passenger, and trailers)
you might not really need them since youre making a bike
hmmm... pretty cool man
if youre having problems with turning i think ican help you with that(if youre using animsets to do this)
Thanks, will have to look into that one. Also i guess ill realy have to look into modeling sooner or later. π¦
Just wanted to speed up the character freely, not realy caring about the animation honestly. The whole thiing was mostly me messing around since i cobbled yesterday someting together while being drunk that could be fun for a bit, at least for me to make i mean . XD
Cheers! The part I'm trying to figure out is how to animate parts of my bike independently from the other parts.
Right now all my animations just affect the player, so the bike is just attaching to the Bip01_Prop2 bone which I then animate using Paddlefruit's rig.
In order to animate for example the wheel of the bike to spin while I'm "on it" (wearing it) I'd have to find a way to trigger an animation that is exported with the model, without having it be a character or door.
Since it seems that B42 accepts different non-human armature, maybe there's a way to do it. Just no clue how lol
Been thinking about decompiling the java to take a closer look and see if I can figure out how it all works, but I also don't know if I have the time or energy lol
i didn't search too deeply, but i took a look after we talked about it earlier and it didn't seem possible
Dang, yeah it seems too good to be true. Maybe at a later time if TIS release more info/tools
i did briefly consider 'what if the item was actually an animal you're grappling' but i decided such thoughts must end there immediately
I think I can kind of cheat it a little bit and animate at least one part per item by using Prop1 as well. So I'd make the wheel a different wearable item completely that gets spawned and equipped with the bike, attach it to Prop1 and then in my pedal animation I just rotate that bone.
But it's bloaty, and feels very limited in what I can do still
there are no .. animated textures, eh?
I was told there's a texture cycling trick, but I haven't looked into it yet
I think my game is haunted lol
Oh haha, it's the dancing door debug thing, makes sense
Is it save to overwrite a clothing xml file by a new one with the same name? Or can this cause trouble (for example because of the guid numbers)?
Hello. Does the item tweaker functions still work? I'm trying something simple and its just not working
whats the difference between mod development and mod support chats
afaik, item tweaker does not work on 42. It should be fine on 41
mod development, talk about developing mods.
mod support, get support for mods
what chat would getting ideas from be better
I'm on 42. All I'm trying to do is reduce the firefighter gear protection by 25% but its acting like item tweaker function isnt there
item tweaker wasn't even ported to 42
if you're looking for ideas for a mod to make, you can try https://discord.com/channels/136501320340209664/1075939080287834113
Sorry! I'm on 41. Not 42
I thought someone had tried. I might have dreamt it
we've been encouraging people to stop using it for years and b41 cleaning the slate on mods was the opportunity to finally can it
I tried using a script and it worked then but the icons were all question marks
i don't know why it's not working for you but we always tell people not to use it and just do something like this instead:```lua
local function tweakItem(item, parameter, value)
local script = ScriptManager.instance:getItem(item)
if not script then return end
script:DoParam(parmeter .. " = " .. value)
end
tweakItem("Base.Apple", "HungerChange", "-20")
this is basically what item tweaker does (it's literally just saving you a couple lines of code, it doesn't do anything crazy) but without all the performance issues and risk of mod conflicts
Does this look ok? lol Or should I do it like you got it
Sorry yall. I'm coming from Dayz and this is all a little strange
literally every single function and class here does not exist, where did you get these from?
Haha don't ask
ai?
Yes...
I've used it a bunch for Dayz stuff and it did the script just fine but now its broken itself lmao
ai + pz = bad time
You have to spend days force-feeding the AI and give a very strict project-briefing that includes links to offical B42 API docs etc. I am not sure that what I did to brief AI was entirely legal so I'm not gonna comment haha.
what people say here. Check the lua code yourself, search for the functions. Build yourself a dump function and Use getmetatable(obj) to explore the objects live.
I am just scratching the surface as I am fresh myself. Didn't feel like decompiling the java code yet, we'll see ..
you'll want to do it like albion shows but you'll need the clothing item names, like "Trousers_Fireman" and what exactly you want to modify, ie ScratchDefense or BiteDefense
I know I know. It did make it work but the icons were just question marks. I made the mistake of telling to try another method
Alrighty. I'll give that a shot
someone will correct me if I'm wrong, I don't mess with that stuff much
AI is a great servant but a terrible master
The icons for what were question marks...?
The fire fighter stuff that I edited
yes and for b42 it is particularly stubborn. It's maddening. Takes a long time and you have to be super suspicious of every function and parameter it adds.
{
item Jacket_Fireman
{
DisplayCategory = Clothing,
ClothingItem = Jacket_Fireman,
BodyLocation = Jacket,
BloodLocation = Jacket,
Icon = Jacket_Fireman,
RunSpeedModifier = 0.95,
Type = Clothing,
BodyLocation = Jacket,
/* Hereβs the part you want to lower: */
ScratchDefense = 10,
BiteDefense = 5,
Insulation = 0.5,
WindResistance = 0.5,
}
item Trousers_Fireman
{
DisplayCategory = Clothing,
ClothingItem = Trousers_Fireman,
BodyLocation = Pants,
Icon = Trousers_Fireman,
Type = Clothing,
BodyLocation = Pants,
/* Again, lower these: */
ScratchDefense = 10,
BiteDefense = 5,
Insulation = 0.5,
WindResistance = 0.5,
}
}
Should I not do it like this either?
simple and generic lua stuff though: really nice.
And, I was impressed, It taught me about resolving thunked fields as a pattern for async object building. I am not from game-dev domain so that was interesting and useful.
Haha ok ok.
Causes issues with anything else that touches that file.
I just asked ai how to change the "armor" of the firefighter clothes and it was good advice until it told me to change the base game files...
It's fine if you're not going to publish the mod tho. Before I published my first PZ mod I had been editing my mods in various ways and I've done it like that before.
But you've gotta jot down what you edited and double check nothing is messing with it (every time you add a mod).
"Just delete the whole zombie folder and the game won't have any zombies." - ChatGPT, probably.
ai is good if the human driver understands its suggestions
Is this a good way to track the time (3 hours): ``` if player:HasTrait("Deaf") then
local startTime = modData.startTime or 0
local currentTime = getGameTime():getWorldAgeHours()
if currentTime - startTime >= 3 then
traits:remove("Deaf")```
Or a burden if the human driver understands its suggestions hahaa.
Basically trying to make Deaf only last 3 hours
The be fair I never asked it to build a new mod with dayz. I would usually feed it a mod and ask it to adjust certain things.
yeah you have to know when to throw gpt out the window and think for yourself
Yeah it'll... sometimes... be okay with that. But a lot of the times it'll be like "yeah, I can adjust that function," but literally will give it a "new" function that does nothing good lolll. At least with my experience in PZ.
Totally understand. I'm not a modder tho. The only reason I even ran with it was because it did it right the first time minus the question mark icons
I would prefer not to attach it to modData if there's a better way
Something like this.
local function tweakItem(item, parameter, value)
local script = ScriptManager.instance:getItem(item)
if not script then return end
script:DoParam(parmeter .. " = " .. value)
end
tweakItem("Trousers_Fireman", "BiteDefense", 15) -- or whatever value you want
tweakItem("Trousers_Fireman", "ScratchDefense", 25)
-- do the above for the other items you want
You need to have a search through the games clothing scripts to find the name of the items you want to modify
could you attach it to the players mod data?
Thanks guys!
probly would work the same
maybe use the EveryHours event?
you can setsprite the hand items
fr? wtf lol
Hahaa no, I was just messing around. I could believe it, tho.
You gotta tell me where you get that emote now tho @ancient grail hahaa
I'm not sure I know what you mean
does anyone have tips for doing server-side dev for MP? ideally I don't want to bounce a [local] pz server every I need to test a change
unless your mod really depends on multiplayer on a basic level you can do most of your testing in singleplayer and just check everything works in multiplayer when you've got things working
code designed for multiplayer will usually work in singleplayer
There ya go
what about code that relies on the client or server using send[Client/Server]Command (plus the corresponding "listener" funcs)? I'm thinking that, for single player, creating a custom event for the use cases that require sendClientCommand and similar will keep the execution flows similar so that it's not a pita to understand/maintain. Does that make sense?
local script = ScriptManager.instance:getItem(item)
if not script then return end
script:DoParam(parmeter .. " = " .. value)
end
tweakItem("Trousers_Fireman", "BiteDefense", 15)
tweakItem("Trousers_Fireman", "ScratchDefense", 25)
tweakItem("Jacket_Fireman", "BiteDefense", 15)
tweakItem("Jacket_Fireman", "ScratchDefense", 25)
Does this look right?
client commands work in singleplayer anyway, for some reason server commands don't, for those i do recommend either manually triggering the event or directly calling your callbacks
in vanilla server commands are just used to sync things back to the client so it doesn't actually matter that they don't work, the server code already did everything, but with mods you might do stuff on the client exclusively
Name suggestions for my mod that adds hearing damage from shooting?
might want to fix my typo in script:DoParam. parameter is spelled wrong. otherwise, looks good
yeah server would be sending significant stuff to specific clients in my mod. thanks!
I fed GPT:
Captures the severe aftermath and lasting impact of loud gunfire.
Sonic Aftermath
Implies that the sound from shooting leaves a lasting, damaging effect.
Blast Trauma
Conveys the idea of physical trauma from the powerful shock of a gunshot.
Echoes of Impact
Suggests that the sound echoes beyond the moment of the shot, causing gradual harm.
Ringing Recoil
Combines the concept of a physical recoil with the persistent ringing that follows.
Acoustic Fallout
Implies that just as radiation fallout lingers, the destructive sound effects linger in the ears.
Decibel Damage
Directly references high decibel levels and the damaging effect they have on hearing.
Sonic Wounds
Conjures a vivid image of wounds inflicted by sound, paralleling physical injuries.
Gunfire Reverberation
Emphasizes the idea that the reverberations from each shot lead to hearing damage.
Auditory Aftershock
Reflects the concept of aftershocksβin this case, the lasting stress on your ears.```
Acoustic Fallout lmao
Bang Bang Ouchie
We went to an A7X concert about 7 years ago and stood in front of the speakers. I still feel the Acoustic Fallout from it.
I was thinking this https://youtu.be/ZK85OXiValM?t=20
Archer Vision Quest Season 6 Episode 5
Archer fires his gun when the gang are stuck in an elevator.
Ear Today, Gone Tomorrow
Just saw this. Very noice
Hrm. I guess I'm not understanding. Can't get it to do anything
Ah nvm. I fixed your typo and made my own π
endless appreciation for you blaming my typo on yourself
I figured it was more believable
Thank you! β€οΈ It's gonna be fun expanding on the three rideables now
finally excluded, bicycle, scooter and skateboard from generating footprints. at the end something cool happened π
https://imgur.com/a/33TgkWU
Hahaha well shit π Nice job excluding them, I should definitely disable emotes while it's active lol
I mean, I spent 5 minutes trying to figure out why this was bugging out when I tried to assign a value to newGameSpeed
and no, it wasn't AI. it was my dumb arse
it was actually fun, rode it like that for a while lol. π
Gave me an idea to add a flip-off animation when riding a bike, so you can ride by a horde and give them the finger
or well, I guess the character doesn't have fingers haha
I could make this instead
jesus christ that guy is staring way too intensely
give it a small radius sound event so they seem offended by teh flip off xD
hahaha yes good idea
they do that 'HUH' turn around aha
If I wanna play a sound effect after a player gets a trait, would this work: traits:add("HardOfHearing") getSoundManager():PlaySound("tinnitusfx", false, 1.0); end
Yes it will work
So all I need to do is add the audio to the sound folder?
I had the sound also set up in my item script when I tried it, but I don't think it's actually needed, so yes I think you can just drop your sound in media/sound and it will work
No, leave them! Classic Zomboid jank, and entirely controllabel by the player.
The "play a sound a player hears" and "make a noise in teh world that zombies hear and maybe it stresses out players" are 100% seperate.
So you can use WorldSoundManager.instance.addSound() as an "attract zombies here" method. (though obviosuly reliant on their hearing)
hey guys?
is there a vanilla single play option
for a character to respawn on dead location?
i know in multiplayer they have it
but not sure if there's a way to do the same thing in single play
Do you want a new character where you died, or to respwan as the dead character (but alive)
the first one
new char on the location where i died
I don't know of a mod, but it would be possible to make one.
i saw there's a mod that lets u respawn the dead chracter(alive)
There's a spawn mod that lets you put any co-ordinates into mod options and spawn there, a variation of that would track where you last died.
Then you fight your old body to reclaim loot I guess.
oh? could u give me the link to that mod if it's not a hassle for ya?
i guess i can use Events.ondeath.add(playerlocation)
to run that
I also found the bicycle kinda do the wheelie when doing the surrender emote. Just need to align them feet to the pedals haha
https://steamcommunity.com/sharedfiles/filedetails/?id=3287958074&searchtext=anywhere not the one I was thinking ofm but same idea (but sandbox options, not mod options)
hmmm yea
i guess i can take a look and come up with something
it might give me hint of how respawn/spawn functions work
thanks
actually I think that is the mod I was thinking of, but they updated to use sandbox settings instead of mod options.
i see
i wonder why vanilla decided to take the option away in single play
they could just simply give checkbox sandbox option
to make it on and off
I didn't realise it was an option in MP
lua question! I store this function in a table for use in a different function:
JB_SpeedKeeper.defaultStopConditions = {
function() return not ISTimedActionQueue.isPlayerDoingAction(playerObj) or
playerObj:getStats():getNumVisibleZombies() > 0 or
playerObj:getStats():getNumChasingZombies() > 0 or
playerObj:getStats():getNumVeryCloseZombies() > 0 or
playerObj:pressedMovement(false) or
playerObj:pressedCancelAction() or
playerObj:isRunning() or
playerObj:isSprinting() end
}```
in the other function, I call:
```lua
if JB_SpeedKeeper.defaultStopConditions then
for i = 1, #JB_SpeedKeeper.defaultStopConditions do
if JB_SpeedKeeper.defaultStopConditions[i] then
resetGameSpeed()
return
end
end
end```
will the check above keep the reference to the playerObj defined in the defaultStopConditions table?
and I spelled conditions wrong and what else is new fixed it because it bothers me
My Mod:
Mod's FAQ:
Pretty sure there are still files and code in there using "alligned"
in typos we turst
I like it when the IDE notices these things for me.
And if it doesn't, the compiler does.
I like when it notices and I still ignore it
jetbrains ides constantly nitpick my usage of capitalisation or commas in comments and it drives me mad
or my sentence structure π
And there there's lua. "Optoins? he probably mean Options but maybe some other mod will add an Optoins so that's cool."
This guy igneds.
i made them
this seems to work. I didn't think about it being a closure.
-- a temp setup for stop conditions
JB_SpeedKeeper.defaultStopConditions = {
function(playerObj) return not ISTimedActionQueue.isPlayerDoingAction(playerObj) or
playerObj:getStats():getNumVisibleZombies() > 0 or
playerObj:getStats():getNumChasingZombies() > 0 or
playerObj:getStats():getNumVeryCloseZombies() > 0 or
playerObj:pressedMovement(false) end
}
-- this is in a closure inside another function that has access to playerObj
if JB_SpeedKeeper.defaultStopConditions then
for i = 1, #JB_SpeedKeeper.defaultStopConditions do
if JB_SpeedKeeper.defaultStopConditions[i](playerObj) then
resetGameSpeed()
return
end
end
end```

uhm, quick question, when i use player:say("test"), do i have to sync it through the server or is it to be seen by all close players too
I don't know why I can't remember that
yeah, its one of these things you cant really test on a server if you cant run two instances π
trying to find the answer in the search, maybe someone has a clear 'yes' or 'no' thing going on in their talks back then ^^
my gut says yes but my mind is a void
yeah, i thikn so too, but with pz you can never be sure XD
someone mentioned :sayShout() would do the trick?
if it's only running on the client, I would think only the client would see it. if it's on the server, everyone should see it.
I know there's sayChat or something. This is killing me. I might have to reinstall 41 to find out
...after I figure out if I can concatenate a string to make a function
i think there was a tool among the util: something to do that?
also if i do it server side, i have to activate it client side too
They're great hahaa.
I'm looking at load and load string
tho that might be too slow to evaluate in an ontick function
yeah, might as well just use find XD
my issue is I want to define conditions when the game loads and then evaluate them later in OnTick. the only way to do it without getting too funky is to make every condition it's own function
evaluate? not sure i follow? i mean you could put the functions in a table and then use starting parameter to just link to the right entry?
or just fill the table on game start with the right one? should work, no?
Btw yall, end of day Powell progress report
Iβve got everything except the loot distribution done
For whatever reason, it simply just does not want loot to spawn in the trunk of both the Powell and the enclosed trailer
I know itβs something Iβve done wrong but itβs such an annoying thing to work with
I do still have to do re-textures but every time I look at the texture files my brain feels like itβs going to explode so Iβm gonna work on the next vehicle before doing that
that's what I'm doing, I was just trying to make it a little easier for others to use if they wanted.
since they seem to have broken the reset speed after timed action
k.i.s.s. I tell myself
Trying to complicate it is how I end up spending 2 hours on a simple thing
Nothing more fun then bashing your head against a wall and seeing the wall crumble. π
Just wait for B42 multiplayer, ther'es no way to predict how much is going to change.
I already got my "disable comments" finger ready
hahahhaaha
I'm considering just deleting any comment that says "does not work" with zero details.
my most popular mod only has like 8500 subs and I can't imagine if there were 10's of thousands
But I should probably add to the description FAQ for every mod:
I posted "this mod does not work" in the comments wthout providing any details about how it was failing and my comment was deleted, why?
Depends how stable everything is.. if nothing goes wrong 20,000+ people will use a mod quietly.
I don't blame modders like KI5 disabling comments at all lol
my problem is, I like to engage and it's like a flood gate of "can you do this"
Same.
Just do it right :x (jk lol)
Oh you added a new car? Can you also add boss zombies?
like, you know that's a good idea, but I have like 4 other mods I want to work on
like like, like. you can tell I'm drinking
Friday Eve
hahaha
Friday Lunch for me
Just got held up for an hour because I am apparently the only person able to use Visio
And we use Visio to make shit that would be much better made in Powerpoint
I would bet you are the only one who can use Visio
or one of the countless free "draw a basic diagram with boxes and lines" tools.
I got some crayons and printer paper
I know how to make new anchor points on shapes, apparently that makes me the expert
Have one for me hahaa.
I also know Visio is not the tool to use when you care more about presentation than what connects to what.
hahaha
I'm going to get lunch
drink lunch
I feel like I might drink during the 3pm Friday meeting.
advantages of work-from-home
Tip: any brown mixed drink looks like coffee on a webcam if you put it in a mug.
And you can do shots if you use a little expresso mug.
Float some bailys on top and it becomes a latte.
I work for myself at home and you have to be pretty persistent to even get me on a phone call
and the whisky stays on the desk
I'm not even a big drinker, just that some days one or two standard drinks worth of alcohol is needed.
I like a little buzz. I'm old enough that a hangover can take me down for days
Drink it Zomboid style: 1/4 bottle minimum
I don't think I've been drunk for over a decade
In my teenage years I discovered tipsy was more fun than drunk
I was 34 and passed out on someone's lawn in Omaha, Nebraska. Last time I was drunk drunk
only a buzz and maintain for me please
and little something else to help me sleep
And once you realise you don't have to care what other people think if you're not drinking much, easier to maintain a buzz only
Also how do people even afford to drink these days?
I'm not rich enough to get drunk at a pub!
I get my alcohol from Aldi when they have good or interesting things available.
Segue to back on topic: once the fluid system is stable I want to rework the way things get named so different alcohol mixes get named.
too many people at the bar anyway
when they get the grapple figured out, I want everything to grapple every thing
Vodka + orange == Screwdriver, milk+coffee liquor + vodka = white Russian, etc.
zombie grapple a car? yes. racoon grapple a zombie? yes please
hahha
Equip a car using Alex's kick scooter logic
Then emote so you wave it in the air
I have a vision of zombies being on the hood of a car, or holding on to the bumper getting dragged
ha
I thought about "car in your pocket" but never looked in to it
Mod idea: https://youtu.be/gYsSsdplqLg?t=3
Thatβs one way to make an exitβ¦ 007βs jet pack from THUNDERBALL was built by Bell-Textron and originally designed for the US army β but was deemed too dangerous to use. βYou could only fly for 20 seconds, then you ran out of fuel and you had nothing,β said Production Designer Ken Adam.
page up/down to change Z-levels.
There is a "pink slip" mod that lets you convert a car in near perfect condition with nothig in it to a pink slip, then restore the car. But it's just making a new car with the same skin
Actually storing a vehicle object without some java modding is not possible as far as I can tell.
Tsarlib trailers moves every single VehiclePart to a hidden VehiclePart location on the the trailer, then records enough information to remake the same vehicle type/color and replace the parts with the stored ones. Very clever hack.
Oooooh... with Alex's stuff we can now put a bicycle on the back of an RV!
since the bike is an object!
If there was a true way to make a working vehicle hauler it would make me soooo happy
they're killing it with these mods. just phenomenal
...I'm going to write up a request for the modding requests thread
I think it would be easy to implement provided all they do is make the data structure available and leave all the UI/vehicle design up to modders.
Shame we can't submit pull request for the java code. (but that would need the whole game source to be posted and a dev would have to spend a lot of time going through the requests, choosing what was reasonable and then assessing the proposed code change for quality... not a realistic thing)
is there a way to add a custom event in lua? i want to do something for when a zombie enters and leaves the player's view and i don't think theres an api for that
Adding a custom event - yes.
BUT the hard part is where are you putting the code to say "this event has triggered"
Zombie enter/leave the view based in the lighting engine - you can see that in the mod that does 360Β° vision & see zombies through walls by editing LightingJNI
Technically you could put a "Do I have line of sight to the player and has that changed?" check on OnZombieUpdate, but bye bye performance.
ah ic. how do u do that? rn i just use Events.OnTick
