#mod_development
1 messages · Page 383 of 1
I dont think it would trigger checksum though if you are creating new files-- the problem is steam wont delete them either
not that I did that once, totally nope, totally didn't cause weird conflicts with another mod, nope....
that's one reason superb survivor was so bad
I feel like the checksum would be broken if it allows the client to have/execute .lua files that arnt part of the server -_-;
if you mean the cache/Lua folder- yeah... if you aren't naming your file uniquely you're going to have a bad time
I've made a serverside mod that way lol
had the lua loadstring from a local file only the host had
I had a modoptions.lua in my mod and didn't realize that mods could cross-override each others files without so much as a dependency/requirement between the mods
oh yeah that too
that was.. an interesting learning experience lol.
'what do you mean my mod has a conflict with totally unrelated mod? hows that even work?'
It's normally a low poly model. With more details in the texture
man im falling in love with substance painter. just my second day messing around with it, but just by adding shadows the model already gets much better
to think that originally I had it like the first picture in zomboid
jajaja
Sorry for the question but where is an items name defined? \scripts\generated\items and media\clothing\clothingItems don't define the item name itself?
Of course not, the game needs to translate those names
They use translations
thanks a lot
I want to start getting into map modding, where do i start what program should i use?
Creating my own tiles, textures etc
#mapping pinned messages
Is there an event for the vehicle radial menu? I want to disable it for a specific vehicle
I don't think so
Not sure about an event, but this is how I did it in a loop: local radialMenu = getPlayerRadialMenu(player:getPlayerNum()) if radialMenu and radialMenu:isReallyVisible() then radialMenu:setVisible(false) end
Might be more optimized to wrap around ISVehicleMenu.showRadialMenu or ISVehicleMenu.showRadialMenuOutside and use ISVehicleMenu.getVehicleToInteractWith or similar to get the vehicle and return early with the specific one
Agreed
This is what worked:
ISVehicleMenu.showRadialMenuOutside = function(playerObj)
local vehicle = ISVehicleMenu.getVehicleToInteractWith(playerObj)
if vehicle and vehicle:getModData().isExtractionHeli then
return
end
origShowRadialMenuOutside(playerObj)
end```
Thanks!
yeah that looks way better but i feel like u added too many scratches to the paint personally
in game is barely visible haha
fair enough + it's the zombie apocalypse
yeah thats why I exagerated the details haha cuz in game once you lower the resolution you barely see them
Where are the settings kept for like windows sizes and stuff. or are they hard coded or in some files somewhere?
Good day everyone,
I’ve been working on improving the game’s visual quality by upscaling assets to 2× resolution. After being told it wasn’t possible, I decided to investigate further.
I analyzed the engine, developed a Java agent that enables support for higher-resolution textures at runtime, and reverse-engineered the .pack format. Based on that, I also created a Python packer that allows repacking textures in higher resolution.
Game load with custom .pack file, but there still no scaling so textures are to big but not cut to tile size!
Still work in progress, just wanted to hear what you think about it
texture size for comparison
plan is to upscale all assets x2
One of those documents was even linked in the modding wiki, which I hadn't noticed had AI-generated documentation at first. The person even contributed to the JSON schemas for translations, and yet provided this kind of documentation, which rips directly from the modding wiki, adding some wrong information on top of it.
Be careful what documentation you might find when they are shared around, and please just stop doing that. It's useless, serves no one, and lacks proper knowledge.
LOL . You are kind of write your own standards and serve to the closed community . I now regret spending so much of my three months on this channel and server
We have discussed this in the past, "own standards", you're spreading straight up wrong documentation that you didn't even write. You took the wiki page, fed it through a LLM and the output you got was basically the wiki page + extra stuff that were wrong
good luck
- extra stuff that were wrong
I don't ever force you to validate those files, you are kind of content eater whos want read any single public related to blame just in this discord server
Good. Gonna remove that repo for kind of don't feed and repost, because this is not useless with me anyway.
And talking about A.I in this server is kind of useless because no one gonna get anything out of it.
Lack of communication
"But AI is good man, you don't get it, you won't even learn or listen anything regarding it"
A classic, because I never expressed AI is bad, just that I have yet to see any proper demonstration of it when it comes to writing documentation that won't output bullshit. Like I mentioned in that section about AI docs, we didn't just have one case of AI documentation in the past month, but 2 or 3. Sure it can give something good, but all of the people who made AI docs have given us a documentation that is basically what's already on the wiki, but worse and with extra bits of misinformation
So no I'm not going to trust any documentation that is written with AI because every time I've seen such documentations it was bad, and the person who made it is just as bad of a person

Calling Sim of all people a content eater is rich coming from someone who ripped public information to plagarize it.
most of which sim wrote 😅
Honestly this dude has been nothing but combative when he's clearly in the wrong
I specifically didn't name drop you or anyone who's at fault with the AI documentation in the summary because that is not necessary. But since you kindly asked to be shat on, here you go then, be a clown in front of everyone since that's so much what you desire for
Of all the reasons to be against AI the sycophantic fans that abuse it are #1
Like ffs I myself use AI for some stuff but I have the decency of noticing when it outputs crap most of the time. No respect, no decency, selling services to basically steal mods
selling services to basically steal mods
This is just your thought
With the kind of bla bla bla
That's not my thought
No reason to continue talking to this guy- honest to goodness goalpost shifter, the more you bring up the more the convo will get derailed.
That's TIS thought too 💀
Just stick to 'you plagiarized work poorly'
😂
It's not easy learning a skill, one day you'll work up the maturity. 👍
Imagine bringing up a cursory mention of something you did indignantly and getting roasted tho. 
Oh yea I found that back of you ripping off the Procedural distribution page lmao
See 😂
You are the one whos don't want to listen the explaining, so why do I need to explains
Just to be simple, we can ignore each others in this discord server
Just type into chatgpt how to get out of this conversation
You brought it up though- what was your expectation?
Am i talking to you?
Yes
Do we know each others?
Sure, why did you bring up this conversation then ? It's only the reality of who you are that we are discussing here, you started it
Ego most likely
The first, I mention the source, let others know that can be wrong
The seconds, I said I can remove the content in case any org author are pissed off.
The 3rd, Ive removed that repo already, because after time, this repo is useless with me.
Good luck.
I'll never read pzwiki/Modding again. Thanks for everything lol
We all know you will if you continue modding. But you do yours man
I mean, you can continue to feed the wiki through a LLM, get shitty docs and mod upon that, you'll get success I'm sure of it
plagiarizing*
He didn't just keep docs for his own reference, he shared them here - got called out fairly quickly, and began deflecting and acting offended. Now he's trying to play up the victim when he brought up the mention of someone using AI to generate and submit documentation.
Instead of taking it on the chin and growing up he rather whine.
Not even mentioning that he's selling commissions using AI, not to mention round-about'ing updating on other's works regardless of license for money.
'it doesn't count because I wont publish it' means he knows what he's doing lol
For others whos worried about stealing mods
Once you make the mod public, anyone can get the code and mess with it in secret.
Who knows if the guy you talked to is stealing your code without you knowing? 🤨
Even if he hasn't written anything suspicious on his Ko-fi page. 😂
I wasn't
Not me
.. lmao
P/S my ko-fi page can be something not cool to you, but i'll not explain to strangers. Hopefully, TIS can provide me some guidance
Obtuse, deflect, appeal to authority. nice
You're turning things around again, no one said anything about reading others code, learning from it etc
The problem is proposing people to steal other creators their content to change it without their authorization. Money or not, that's not allowed and that's about it, there's no arguing around it 
Its not a crime if no one knows and its something boring and innocuous.
But also let me advertise and share that I did it with out the justified ridicule 😤
How can I save a costum variable that is persistent across one save file? Or point me in the direction of saving/loading stuff
You can use the (global) modData object, or use filewriter to create txt/json
thanks! will look into it
Depends what the variable is needed for-- if it can be tied to an item/player you can save it to their respective modData
you guys are saints

is global mod data tied to one savefile or globablly accessable?
it's per save

local playerData = getPlayer()
modData = playerData:getModData()
if modData.myString == nil then
modData.myString = "Hello World old Data"
end```
Is this an okayish approach?
it works so theres that
Weekend modding spree... My usable-computers mod now has the full range of parts from 8088 through 586. Working sound cards, SCSI hard drives, MCA expansions, VLB expansions, an early CD ROM drive, mouse support (finally) ... tons of stuff. 176 new items so far.
So much polish and bugfixing this weekend. The big new thing, I'm finally at a point to add in games and software to find/install. I've got a bunch of installer disks in game now. Just need to round out the library
this is insane
Can it load any era appropriate rom, theoretically?
can you make the zomboid alpha be part of the loot?
That would be legendary (but even the tech demo is way more advanced than an old rom)
I was wondering about importing a gba emulator into pz 😅 -- this is awesome
I got DOOM working a long time ago. Literally the second game I got working lol... the first was a much simpler old side scroller
There's an old video of me playing it somewhere in this channel... If you find it, I've since totally fixed the framerate. Then nerfed the framerate like crazy depending on how crap the PZ computer you made is.
This is incredible
I'm not sure the legality, but if you were to put era appropriate roms around this mod would be massive
Oh, it's not ROMs... This mod simulates old DOS computers from the early 90s
You can run ancient spreadsheet software on em too
Oh my god ive never wanted to run excel inside of PZ more than I do right now
Back then, people distributed games on dial-up bulletin boards "BBS". You'd download a "shareware" game over a super slow modem
Its well before my time but I've heard of BBS
And.. this mod is born from me being super nostalgic
I'll keep watch, this stuff is super cool
shareware is a dead concept these days. Someone makes a game, releases episode one as totally free - send checks to my address for episodes 2 and 3!
I think that shareware has been replaced by open source projects
Even DOOM was shareware. Episode 1 is totally free to this day. I an distribute it with the mod legally
If I may be so bold, I don't think thats necesarially a downgrade
Kind of ... they are very different, but they're both things meant to be free and shared, so the philosophy does align in a lot of ways
I was not really around during the shareware days so you are more of an authority on that than me haha
There have always been games, though. The PC was never as big as like, the original NES... But it had plenty of good games.
I want to run Bryce3D or Windows Movie Maker inside of zomboid now
Well, keep in mind, it's just DOS emulation. Windows 95 onwards is much later, modern programs won't work at all
True, true
If you're not familiar with DOS, it's "Disk operating system" by Microsoft starting in like the early 80s... Back when Bill Gates pulled a fast one on IBM and started one of hte world's biggest monopolies
tons of good history there.. and the mod will touch on whatever it can
every part has a description
is it possible to make http calls via lua scripting? like returning json weather data?
I didn't look that hard, but I didn't find anything myself
I had to sync computers with the server, though, not reach outside URLs.. so I ended up doing it through normal server commands.
no
Nope, best you can do is open the system webbrowser to a steam.com url
No clue how i'll make textures for this, I am not a texture guy
But i've always wanted one of these sports motorcycles in PZ to fit my character
Well.. Got this working. One Must Fall 2097
Made by the same company that does Unreal Engine today
Nice
Wow I used to play this 😮
Wow, there was only 1 change in the files realistic car physics edits in B42.16
oddly enough, it was to carController.java too, not itemContainer
OMF was great, it was my favorite game for awhile back then
Civilization was made in 1991. Wink wink.
ooh that looks fun to texture. want help?
so i converted Warframe 1999 stuff to PZ
sure why not!
Dm me ! 😄
Hello, extremely new modder here, just wondering if there was a way for a mod to point at entire groups of clothing such as "dresses" or "pants" without needing to add a tag to every piece of clothing.
--Get the item's BodyLocation
local ClothingType = item:getBodyLocation()
if ClothingType then print(ClothingType) end
--Says Meow if it's the right clothing type
if item:isBodyLocation(InsertClothingType) then
print("meow")
end
{
DisplayCategory = Clothing,
ItemType = base:clothing,
Icon = DressShortWhite,
BloodLocation = ShortsShort;Shirt,
BodyLocation = base:dress,
ClothingItem = Dress_Knees,
FabricType = Cotton,
Insulation = 0.15,
WindResistance = 0.1,
WorldStaticModel = Dress_Short_Ground,
Tags = base:canbedyed;base:ripclothingcotton;base:noragdoll,
}```
Script's body location should give what you're wanting.
Idk what exactly it would output when doing getBodyLocation() so the code uses a placeholder
do know there's more than one body location for dresses
depending on the dress type
This may pick up items that aren't dresses, but this is probably your best bet without manually tagging items afaik
If you're wanting it for recipe purposes, you would need to add an onTest to the recipe function to check the input item since you wouldn't be able to filter without manual tagging
something like
function OnlyDresses(item)
--Function cancels if the checked item isn't a piece of clothing. Used to skip stuff like scissors or any other ingredients.
--This always returns true if not a clothing item.
if not item:getItemType() == "clothing" then return true end
--Returns bool
return item:isBodyLocation(DesiredBodyLocation)
end
I'm typing all this code off of memory in discord, so take it with a grain of salt
should i countinue on this?
Yes
Absolutely
can modData save float values?
Why wouldn't it be able to ?
I wanna start modding zomboid,
the first mod I wanna create is a whole martial arts system.
where should I start-
Now hear me out a zombie mod that progresses zombies to be stronger overtime is a common and popular idea but nobody figured to just use the vanilla settings as the basis
Zombies start at their weakest slow shambler
a determined amount of time passes between 1day or 1month limit 12months
The zombie upgrades into a fast shambler
You could use this to have zombies evolve over time increasing in intelligence speed strength and defense making the game actually harder later game to make the overwhelming amount of ammo you have.
Could also add a toggle to have them start forming larger groups and traveling further and attacking doors windows etc without any player presence
necroa is NOT the same thing i just said
Necroa is a mod that is inspired by plague inc.
This would be a vanilla friendly evolving zombies mod
Yes and it makes zombie stats evolve
Yeah it also replaces most of their visual features with new ones
it also makes zombies go in groups
Sure, but that's a good basis of a mod that does something close to what you want, thus why I sent it
Id rather stick to the vanilla+ style
Now that it doesn't do perfectly what you want, that's your problem 😅
And to my knowledge, no one has made that
Necroa and the last of us zombies mod change lots of things and are incompatible with so many mods
same thing with the upcoming resident evil mod
and cry of fear
Incompatible with what mod ?
Mostly clothing and model mods with some clipping sometimes
Because they are all using custom models
They don't. The way I designed TLOU Infected allowed it to not be incompatible with clothing mods
Only clickers and bloaters had custom "models" (it's just a body clothing), and even then, Clickers still could use clothing mods
Maybe its just newer clothing mods are being too different
Not really no. Only clothing that add body texture clothing can cause problems
Those will no appear on the zombies with body clothing (not visually, they will still drop)
But that's about it
I still think using the vanilla zombie models for a mod like this would be compatible with more things
And also it would have some cool sandbox options
It will just be visually different, that's about it
Like having a DECREASE in their functionality overtime
start as sprinters and get weaker over time
Walking dead style
Based off the comics specifically
where zombies used weapons and ran and climbed and could open doors and windows
But later on cant
They also had cordination and variants in the comics
like lurkers etc
Random zombies is becoming outdated slowly
So anyway, why are you here ? Is it to learn how to do that yourself or just for a mod idea ?
Because I can tell you directly that your mod idea will get lost, no one will implement that unless you pay
So i think we need a new vanilla+ zombie management mod
I could probably make the mod myself
Im just here to talk about it
It's definitely possible to do, and wouldn't even be very hard to do
Random zombies is probably the only mod that changes zombie behavior i think that i enjoyed alot
Because it could be played on vanilla style modpacks
That's not true ?
That i enjoyed alot
Random zombies doesn't change zombie behaviors
It lets you change them
It doesn't, it changes their stats, not their behavior
In a more detailed way then what u can in vanilla
Necro and TLOU Infected objectively change way more
Even CDDA zombies
Or you could even put Bandits in there since NPCs from that mod are zombies
Its cool how b42 has screechers in a way
In the vanilla
They are sort of just sprinters that scream now
I dont like how buggy bandits mod is
I mean it is fun if you do a youtube series
It's definitely the best NPC mod out there
I mean maybe the Knox Expanded mod too is better
Just not the most stable since its basically turning zombie ai into a whole new thing
Soon tho it can do some insane things with the new npc api's coming in b43
There has been zero confirmation that it is still planned
I mean we can hope
Npcs probably wont be around until b45
But the devs still responded to me when i asked what features they WANT to add in b43
Which i actually want to make mods for b42 - b41
For
They want the basics of npc tools in game
and dismemberment
This will probably come first
They seem to really love this idea lately
There's already basic NPC tools
Id love to make a dismemberment mod
Its not as advanced as they want for this games npcs yet
Spongie had started work on that
Thank you, I think I can start here and get to where I want to
They seem to have some pretty crazy ideas for how detailed they want zomboids human npcs to be
If i was them id just add fallout style raiders
but they want full on factions
and stuff
And to be able to have npcs group up and use basic tactics to kill zombies or the player
Not just shoot at player or zombie
or to seek out zombies or players to kill
More like do their own thing until you stumble upon them or zombies get too close to them
it actually reminds me of the monsters and npcs in zelda
Specifically breathe of the wild
They have their own little lives even off screen
Just to add immersion
Surroundeads npcs work like this
i hope that game redoes their npcs soon
This hasnt been talked about for awhile tho
So they could be changing how detailed they want them to be
But last time i heard anything about how npcs could work it was that way
That mod DAY ONE tried to sort of do that
it was a fun mod
But really crazy
I still think the horse mod should just be polished up and added to the base game
It won't
Maybe the models touched up some to fit the base vanilla a little more like minecraft did horses
The model and textures already fit the base game
Theres always something a little off
Feel free to say what then
The saddles look very strange
The tails are very tiny and not fluffy at all
and just dont look like horse tails
The actual gameplay of the mod is very very high quality
I just dont like the saddles or tails they use
And the textures for them are higher quality then the horses
It just looks very
Conflicting
realistically that isnt how a saddle looks
You're aware there exists different saddles right ?
Im well aware there are different kinds of saddles
That basic saddle there just looks very weird
the one in these images
looks nicer
But the tail is still so silly looking
And the bag texture is so high quality it doesnt look like any of the bags in the base game
That's the exact same saddle, just a different color for the saddle
Its probably just the texture i dont like then
it doesnt look like leather
It just looks very
Strange
Feel free to propose a texture change on our GitHub then
Same thing, feel free to edit that yourself and do a pull request
Most horses
Have much longer tails
Down to around their ankles
The tail just sort of looks very small
Well i guess their knees technically
horse anatomy is very weird
I actually do like the horse model alot
Just the tail gives off a very not horse tail vibe
Like
One of those dogs with a tiny tail because it was cut off
As a puppy
Again, for the third time, if it bothers you that much, feel free to edit that in the mod itself and do a pull request
Contributions are welcome
Hello, i need help with a function that i stole from "More Traits", im a bit stuck here, dont know codding at all, no much idea of what im doing:
I used "SecondWind" trait as a base.
The idea is to set endurance back to full everytime it goes below 90%
But its not working:
function stamina()
local player = getPlayer();
local stats = player:getStats()
local endurance = stats:get(CharacterStat.ENDURANCE)
if player:hasTrait(CustomTrait.mugen) then
if endurance < 0.9 then
local infi = { endurance = 1.0 }
if isClient() then
sendClientCommand(player, "CustomTrait", "UpdateStats", infi)
else
stats:set(CharacterStat.ENDURANCE, 1)
end
end
end
end
Events.EveryOneMinute.Add(stamina);
I get the classic:
Tried running on singleplayer, get a error:
Stack trace:```
Do you have a registries.lua file that actually creates CustomTrait.mugen?
Yes
One sec
CustomTraitRegistries.mugen = CharacterTrait.register("CustomTrait:mugen")```
is it placed in 'media'?
Checks out?
I did a few traits for b41, still confused on the new way
Yes
"Scripts" goes as follow:
{
character_trait_definition CustomTrait:mugen
{
IsProfessionTrait = false,
DisabledInMultiplayer = false,
CharacterTrait = CustomTrait:mugen,
Cost = 1,
UIName = UI_trait_mugen,
UIDescription = UI_trait_mugendesc,
}
}```
Apparently the problem really starts at checking if the trait exists, but how do i do it then?
CustomTraitRegistries.mugen != CustomTrait.mugen
yea this
Also CustomTraitRegistries = {} is way too generic of a registry name
You better change that if you don't want to cause problems in the future with your mod
I suppose that's the name of your mod tho
Yeaaa, thats a good way to bulldoze other mods. Either make it more unique or at least use the less problematic version of CustomTraitRegistries = CustomTraitRegistries or {}
I suppose that could do it, but that's only if other modders do that too 😅
So that's a bit of a fake solution
I thought it had to be "CustomTraitRegistries" for it to work
No, where did you get that info from ?
No, its just some global name you use
And i thought that i should refer to the trait as how it is registered "CustomTrait.mugen"
No, that's the id you gave it
You need to refer to the variable that holds the trait registry
What would that be?
Ok one sec
What Black Moons said
Nope, you use the global variable now to enforce 'type correctness' such that you can't typo things without a serious null explosion in your face.
Lets go back a step, im not getting any of that.
If i register it like this then:
The module goes like this:
Yes, that is you
Also you don't need to require the registry, ETWRegistry is a global in the above code
But how do i refer to the trait on the function then?
if player:hasTrait(X.Y) then
ye true
The register function in your lua file returns the trait reference
And you store in a variable in a global table
By using the exact same name as your regestries.lua names it.. in the global lua variable space
HoginsTraitRegistries <-- global table
mugen <-- variable in the global table
So HoginsTraitRegistries.mugen
Like this then?
if player:hasTrait(HoginsTraitRegistries.mugen) then?
Yes
Bruh
I dont know how you guys do it.
jesus you people are wizards
I was bashing my head against the wall for so long now
The main problem here is confusing with how Lua works I think
If only did i knew how it worked...
But yeah, looking back, what a huge slip up i made
TBF, until a version or two ago, it was player:hasTrait("CustomTrait.mugen")
(note the quotes)
now we use actual registered objects, so that you can't accidently typo player:hasTrait("CustomTrait.nugen") and then spend hours wondering why it always returns false after you alerted to the bug.
Becaause as you have seen, if you typo the object name, java goes kaboom.
I dont really get it, but it seems like a good step
By the way, on debug, when you get those infinite popping errors
Like this
Why don they show up?
check your console.txt in c:\users\username\zomboid
java.lang.NullPointerException: Cannot invoke "Object.equals(Object)" because "this.id" is null at BodyLocation.isId(BodyLocation.java:69).```
It is from a old mod that i had that broke on 42.13
You know what, im a fuckin moron, nevermind
I was doing some rocket science back then and it broke my mod, only now i noticed:
group:getOrCreateLocation(ItemBodyLocation.get(ResourceLocation.of("leg:penguin")))```
This was crashing the game
hey guys i cant get local mod data to work for me in MP, should i switch to global mod data or just cut the losses and rewrite the save/load functions using filewriter?
or perhaps mysterious 3rd option
You have to write the mod data on the server, then use the moddata sync functions
so i cant bypass the server for a UI mod to save packet limits?
nope
filewriter it is
is this a UI mod that changes nothing gameplay wise?
not for other players
Use mod options
(And maybe sandbox options that restrict what mod options are valid)
i will need to update item lists during gameplay, mod options supports that?
item lists as in?
tables of base names
If your updating it during gameplay, do you need to save it? what kinda data are you storing?
its a loot filter, i want to track what people add during gameplay
and dynamically sort
ah, then you prob want it saved per-server differently...
Id recommend players mod data or just command packets or something.
nah i need it local thanks for the help tho
unwanted list setting sends enough packets as is
Is there an easy way to make it so you can consolidate different drainables into each other
Why does the normal pot version not have the pour on ground option
{
DisplayCategory = Material,
ItemType = base:drainable,
Weight = 2.0,
Icon = Pot_Water,
Tooltip = Tooltip_FixItems,
UseDelta = 0.05,
ReplaceOnDeplete = Base.Pot,
UseWhileEquipped = false,
StaticModel = CookingPotRice_Ground,
WorldStaticModel = CookingPotRice_Ground,
Tags = base:hasmetal;base:glue;SaltysSurvivalAdditions:Adhesive;SaltysSurvivalAdditions:LiquidAdhesive,
SoundMap = DumpContents EmptyPot,
ConsolidateOption = ContextMenu_Merge,
PourType = Pot,
}
item ForgedPotAdhesive
{
DisplayCategory = Material,
ItemType = base:drainable,
Weight = 2.0,
Icon = Pot_Forged_Rice,
Tooltip = Tooltip_FixItems,
UseDelta = 0.05,
ReplaceOnDeplete = Base.PotForged,
UseWhileEquipped = false,
StaticModel = CookingPotForged_RiceGround,
WorldStaticModel = CookingPotForged_RiceGround,
Tags = base:hasmetal;base:glue;SaltysSurvivalAdditions:Adhesive;SaltysSurvivalAdditions:LiquidAdhesive,
SoundMap = DumpContents EmptyPot,
ConsolidateOption = ContextMenu_Merge,
PourType = Pot,
}```
wait is it because there's two spaces in ReplaceOnDeplete
if so, that's so dumb
no because the casein saucepan also has that double space and can be poured
It's literally just the Base.Pot ones ?????
everything else pours out correctly
Oh something is wrong with ReplaceOnDeplete = Base.Pot, ??
what ??
I’m so confused
It properly turns into the Pot when I use debug mode to set the Delta to 0
but doesn't provide the pour option ????
Isn't the pour option only for food items ?
For your information, the texture for the saddlebags is a modified vanilla texture—the small leather backpack—but altered without the stitching, and it’s 256x256
Do you guys think it makes sense to have fictional characters available on radio for in-game communication? If there is engagement, I'll create a quest system + skill learning through this
I think it would give Players more reasons to Travel to certain Locations for example if you are given a quest or something, how about intercepting Random Radiofrequencies? Like government or Even Aliens 😄
Yeah could be anything. Malicious government agents or aliens hahaha. The framework allow for any character description to be available on radio
In practice, I use AI to have the communication done, so literally anything is possible
There is a basic karma system implemented. With enough karma, you could ask the (currently only) character available, that is an electrical engineer, to teach you how to use generators, for example
How did you implement AI?
Well, it was far harder than I expected. Initially I thought of using a java mod, but then I just created a relayer system that delegates the processing to a 3rd party application
The radio communication is still a bit flaky. I use a naive broadcast system and replace scripts at every pulse. If there are users, I'll fix/improve it
That is insane I thought network calls Like this are Not possible?
Sorry Im very new to zomboid lua modding itself
It's not possible indeed. I had to hack my way through xD
So you fetch the data from an external App?
Yeah, I created a relayer that will do the network stuff
I put the architecture here: https://github.com/codx-dev/doom-frequency-mod?tab=readme-ov-file#how-it-works
Also made the API very easy to call from other mods, who wants to build on top of that. Just call this guy here and you're inside the system
I'm not sure @ terms of service level, but technically speaking you can put anything there. The user will have to execute it manually anw
What I did was publish a python package that will do the magic. Since it's all open source, it's verifiable that I didn't put any malicious code there
So I don't need to bundle the whl package inside the mod (tho the first version had the whl file, and it was published to steam)
True and it looks awesome, I want to try to make something similiar now 😄 Maybe a small program that retrieves and writes json sporadically and zomboid reads it, two way should also be possible like this
Yeah, it works on my machine xD
But the Lua API is very limited. I had to do crazy shit like implement my own sha2 there
Asynchronous “multiplayer” is awesome. Like rimworld trade mods with other players 😄
So much to learn from
Yeah something like that. I was thinking smth like a cross-server radio communication, but I think it would kill the roleplay a bit
Yeah but I see lots of possibilities
How long did you work on it?
For it to be playable
Hmm didn't rly count. I struggled a lot to onboard, but after I understood the system, I think like 3 days? Not sure tho
Spent a lot of time onboarding and understanding the thing
Community here was very helpful tho. Whenever I had questions, I posted here and got very fast replies
I’m always impressed about all the niche knowledge here
This whole thing is more of an experiment too. I want to see how the AI thing performs and scales. Was thinking of implementing a MCP server to handle private convos scheduling, but that was too much overkill xD
Small steps
Looking at the code that controls this in ISInventoryContextMenu:
if not instanceof(testItem, "Literature") and ISInventoryPaneContextMenu.canReplaceStoreWater(testItem) then
tests.pourOnGround = testItem
end
So 1) you can't pour out a book and 2) this function:
ISInventoryPaneContextMenu.canReplaceStoreWater = function(item)
if item:hasTag(ItemTag.NO_POUR) then return false end
if item:getReplaceOnUse() then
return true
end
if instanceof(item, "DrainableComboItem") and item:getReplaceOnDeplete() then
local itemType = moduleDotType(item:getModule(), item:getReplaceOnDeplete())
return ISInventoryPaneContextMenu.canReplaceStoreWater2(itemType)
end
return false
end
PotForged has CanStoreWater while Pot does not. But Pot is IsCookable while a forged pot is not.
So not sure it's falling back to those.. I think Replace onUse was supposed to become replaceondepelete?
It works for delta use items with a pour type
well idk if it inherently requires a pour type, but it normally works with items that have replaceondeplete
It’s mainly confusing me because it’s working for literally every other item, except base.pot
try using teh lua console to manually check item:getReplaceOnUse() for a pot and forged pot
try equpiing it in your main hand and print(getPlayer():getPrimaryHandItem():getReplaceOnUse())
and print(getPlayer():getPrimaryHandItem():getReplaceOnDeplete())
maybe a print(ISInventoryPaneContextMenu.canReplaceStoreWater(getPlayer():getPrimaryHandItem())) just to be sure.
Does anyone know if there's an event when the player eats something?
Oh, Twincrows food allergy traits might tell me. Gonna look at that mod.
good morning, i looking at adding b42 compatibility to my older mods, what would be the correct folder structure so i dont break it for all the ppl still using it on b41?
mods/Modname/42 for the b42 version and
mods/Modname for the b41?
I don't know if there is an event, but there will be a timed action for eating.
Note you also need mods/Modname/common
It can be empty, but it has to exist.
ah yea its there thanks for reminding
its for files shared between versions right?
I think translation files -> json is the only other structure change, but obvioulsy the content of scripts/recipes/etc needs to be redone and any lua has a good chance of needing updates.
yeah i already did the update not that many things needed maintenance
yeah, this idea is you can put stuff like models/texture into common so there are not three copies when you have /42, /42.13 and /42.16 folder.
and they added the function i needed so i no longer need the zombie folder to override the class either
ah makes sense
b41 had no way to query an item for metal contents
B42 doesn't really have a system either then some tags for small/medium/mediumlarge/large
Yea, that arnt used and the info isen't defined yet in items, AFAIK
yep inventoryitem, hasMetal() and getMetalValue()
all i needed was hasMetal really as its a check for putting unsuitable items into the microwave
Yea, getMetalValue() isn't actually used AFAIK
oh fair, i only really quick tested with a spoon and it got correctly marked using hasMetal
right now the game looks at if (item.getMetalValue() > 0.0F || item.hasTag(ItemTag.HAS_METAL)) {
so its using the HAS_METAL tag
i see, so in theory it should work in the microwave case for all items that cause the fire right?
Hu, they have started adding MetalValue's to items now... 391 results for it.
good timing for me to update haha
Yep, thats what the microwave uses (hasMetal())
thanks for confirming!
Some weird tidbits though:
Microwaves are explicitly forced to not hasMetal() so you can safely put a microwave into a microwave.
Also, it recurses into containers to check for metal
so a backpack doesn't have metal, until you put a fork into it
No wait.. only the isoStove version of hasMetal does that, nm
hasMetal on an inventoryItem does not recurse
i need to do some weird testing
Heres the isostove version:
private boolean hasMetal() {
this.hasMetal = false;
if (!this.isMicrowave()) {
return false;
} else {
int size = this.getContainer().getItems().size();
for (int i = 0; i < size; i++) {
InventoryItem item = this.getContainer().getItems().get(i);
if (item.getMetalValue() > 0.0F || item.hasTag(ItemTag.HAS_METAL)) {
this.hasMetal = true;
return true;
}
}
return false;
}
}
reading it a little more apparently it always returns false if its not a microwave (but is isostove)
inventoryItems is just ```java
public boolean hasMetal() {
return this.getMetalValue() > 0.0F || this.hasTag(ItemTag.HAS_METAL);
}
i wonder if some deployables count as metal but wont get caught by the inventoryitem function, all deployables are inventory items when in inventory right? i remember seing them in script manager i think
yeah ill need to test with those i cant believe i didnt try putting a microwave in a microwave
yea I misread the code, apparently its testing if the item itself is a microwave and refuses to ever return 'hasMetal' if its a stove
oh its only 5 capacity vs 10 weight
so... I guess you should be able to put a stove into a microwave safely? or something I dunno lol
Looks like its not an isostove while its in inventory though, sad
yea it wont fit either way, unfortunate
retexturing my gun mod
How much detail will be kept is unknown, figuring out stuff still
Will definitely be scaling down the texture
maybe not even tbh, as I'm remembering how many objects the singular texture file is texturing
will test how it looks in game tomorrow and go from there, going to bed now
@torn igloo Yea that lack of recipe hiding in B42 really annoys me too -_-;
B41 had an isHidden or something but it got lost in B42
I tried for a day to hide recipes in B42 and only found 15 new ways to horribly break the crafting UI
since they added registris you couldnt have passed string in hasTrait
it has to be CharacterTrait
you know i wrote this to say that you're incorrect but then I realized that they indeed rolled out this like 2 minor versions ago
felt like so much longer
wasnt it 42.13
Yep somewhere around there.
yet another 'lets break all the mods' update.
I really wish they could like, schedule the mod breaking changes to occur on one update instead of.. every update.
(though I guess B42.16 wasn't bad)
At least keep the known-breaking updates to 42.X releases, not 42.something.2 which they did once.
@silent zealot there are ways to edit recipes via Lua, but yea the tag thing is very valid
Iv previously asked they move the tag cache build to later (after the global mod data event)
Hi guys, anyone knows how do you make a second option for wearing clothes? Like being able to wear a pilot's helmet with visor down/up?
I wanted to add an option to wear my modded hazmat with helmet on/off. What should I do? Will it need another item coded, with its own stats (for example, the clothing area so it does not protect the head), how to link them to each other if so?
Many thanks to whoever answers or even points in the right direction to move.
I thought only certain things were editable in recipes, not all the properties.
Look at the vanilla hoodie for an example
The short version is you make two completely separate clothing items and add a "this can turn into = that" and optionally "text for turning into other form = translate string"
Oh. Roger that, thank you
item HoodieDOWN_WhiteTINT
{
ClothingExtraSubmenu = DownHoodie,
ClothingItemExtra = Base.HoodieUP_WhiteTINT,
ClothingItemExtraOption = UpHoodie,
}
item HoodieUP_WhiteTINT
{
ClothingExtraSubmenu = UpHoodie,
ClothingItemExtra = Base.HoodieDOWN_WhiteTINT,
ClothingItemExtraOption = DownHoodie,
}
And the other stats change too (model, clothing slot, coverage, neck protection, etc.)
You can do more than two choices in a loop (The Frockin' series of clothes sometimes have 5 options, that loop back to the start) and some of those also have a menu for sleve length though that might be done in lua.
Also, that means one shirt is 15 different items for 5x various levels of unbuttons & 3x sleeves rolled up.
Yeah, makes sense
Because the author is insane... but I appreciate the results of his insanity.
Well... That level of dedication is something to be appreciated
Neat!
Hmmm... You could combine clothing swap with @hexed arrow 's approach to animating items to do a marvel superhero armor transformation item.
Which sould not fit the tone of Zomboid at all but would be cool.
And Superheros vs Zombies is a genre! Just... not a very popualr or common one.
Maybe some day. Rn I'm just learning to do simple mods adding the items I need. But I am hoping that I can slowly learn more methods to implement things that I come up with
Hazmat suit with helmet up/down is a much more sensible idea.
how does one get the player object server-side having the nick reference (the one above your head/login), i am using this but getting nil errors in server console, while foodItem:getChef() prints the nick correctly.
local player = GameServer.getPlayerByUserName(foodItem:getChef())
print the getChef result, its prob giving you character name or something
also note there is: getPlayerByUserName and getPlayerByRealUserName
GetChef returns a string, so I'd assume it's the crafter's name.
But it may be the character name, not the player name
it prints the nick above my head, also i checked them both in decompile, real user name should take the nick only and username has the option for both
public static IsoPlayer getPlayerByRealUserName(String username) {
for (int n = 0; n < udpEngine.connections.size(); n++) {
UdpConnection c = udpEngine.connections.get(n);
for (int playerIndex = 0; playerIndex < 4; playerIndex++) {
IsoPlayer player = c.players[playerIndex];
if (player != null && player.username.equals(username)) {
return player;
}
}
}
return null;
}
public static IsoPlayer getPlayerByUserName(String username) {
for (int n = 0; n < udpEngine.connections.size(); n++) {
UdpConnection c = udpEngine.connections.get(n);
for (int playerIndex = 0; playerIndex < 4; playerIndex++) {
IsoPlayer player = c.players[playerIndex];
if (player != null && (player.getDisplayName().equals(username) || player.getUsername().equals(username))) {
return player;
}
}
}
return null;
}
wtf at playerIndex < 4
there's also getPlayerByRealUserName()
yeah, that one!
so it should be that one and i have a mistake somewhere else? 🙂
Could be.
put some crafted food in your main hand and see what print(getPlayer():getPrimaryHandItem():getChef()) outputs
when my function runs, it prints the getChef correctly
but in local console
not sure about the server 1 sec
no prints GoDziO as well
getChef returns a string this takes a string i dont get it
try print(getPlayerByRealUserName("GoDziO")) and print(getPlayerByUserName("GoDziO"))
I pet one of those wants the character name
Or something weird
print(tostring(getPlayerByRealUserName("GoDziO")))
To handle nulls
or maybe toString
one of those
on both btw
it shouldnt matter if its the only argument in the print
tostring in lua
I know it shouldn't, but it also should not be able to cause an error.
I doubt it.
Maybe getPlayerByUserName does not work on the server, but that would be super weird
no there is no separate method for admins, i guess thats not it so
Are you doing it on client or server?
(as its scanning connections, 99% sure it only works on server)
both, but in MP on server
this logic is after an isServer() check
but the chef print is before
so what error are you getting?
getPlayerByRealUserName isn't used in the LUA btw.
in the java its used like IsoPlayer p = GameServer.getPlayerByRealUserName
try the global getOnlinePlayers() and then scan the ArrayList returned for a player that matches
I don't think getPlayerByRealUserName is exposed to LUA
I must say:
I am so happy that I've decided to join this server. I really got the help that I needed to figure out how to make mods and what I'm doing wrong.
Thanks guys for being so supportive and helping towards the beginners in mod-making. I appreciate your help and am sure that many others do too
sorry for the delay, the error broke all of my stoves had to reset the world, this is the server console:
LOG : Lua f:1320, t:1775569915929, st:1,970,734,344> Chef=GoDziO
ERROR: General f:1320, t:1775569915930, st:1,970,734,345> KahluaThread.flushErrorMessage > -------------------------------------------------------------
attempted index: getPlayerByUserName of non-table: null
Yea, it doesn't exist in Lua
getPlayerByUserName? or real username?
getPlayerByUserName
ah ok thx, was going by the javadocs, so what do people use? should i go digging? 🙂
i somehow missed the getOnlinePlayers() tip, that works perfectly hats off
javadocs tell you whats in java, but not 100% of java is exposed in Lua.
yeah i learned that lesson with the item variants, still hard for me to predict that stuff
still dont understand why the Flier or Brochure class is exposed but Magazine and Photo isnt
I don't get it. Why a simple mod adding two hazmats just prevents the whole game from loading in MP?!
It freezes either on "This is the story of your death" or on the black screen after that
Could anyone maybe look at the code? I feel like there's something obvious I just missed
I got a prototype of my mod working 😄 it revives and heals the player two times as of now
its not that big when its finished just wanted to see how the model looks at all
side by side comparison
It's not just a retexture, I touched up on the models a bit as well to fix some lighting bugs
still very in progress, haven't looked in game
how are updates made with the climate manager? I can get a reference to it but no settings seem to take effect
You likely need to retrieve its instance
getClimateManager().instance (I might have made a mistake in the fct name, I can't check rn)
already tried that but maybe I made a mistake, thanks!
forgot to join the model parts together for testing lol
Are you doing a custom crafting section like "Homemade" or something to go with this?
There's no custom section, but the mod exists already
I still haven't made a guide for how the gun crafting works though
there's several steps to it, as you have to assemble the gun piece by piece, with there being several different parts to choose from
I'm currently just doing a remesh and retexture of it, as the currently uploaded version reuses textures from Ramshackle, and has some minor issues with the models
Here's some demonstration vids of the gun being fired
https://youtu.be/8JSIGxCMheo?si=rJ7XsdMXuS1eYOSd
https://youtu.be/s0N7dMACdmo?si=kTtEj24fA7iYghK5
There's over a million unique combinations to choose from during weapon assembly, and it grows exponentially as new parts are added in.
Most parts have stat differences between them, but a few are purely cosmetic (like the tape colors)
Since I'm redoing the textures and meshes, I plan to add in some more texture variations in this upcoming update
One thing I plan for is to have higher level skills produce cleaner finishes on parts
so a minimum level part will have scratches and dings, but a masterwork part will have a smooth finish
Like how as you level up your carpentry, your buildings become visibly less thrown together
oh by the way is https://demiurgequantified.github.io/ProjectZomboidJavaDocs/ the goto documentation?
package index
Hi, I'm very new to modding and I'm having an issue while trying to create a clothing mod. When I find the item in-game, it shows up without a description—only the title—and when I drop it on the ground, the screen fills up with these errors.
Sorry for my english, not my first language
Yes
Yey thanks to lots of your help guys Im almost done making my first mod 😄
Are there any tools to generate a mod setup(folders,xml and item declarations)? Otherwise I thought about programming an app for this 😄
At least for simple clothing items and such
Might be that something is missing in item script, check for commas, make sure clothing item is right (XML)
Check if file guide entry is the same as XML of clothing item name and guid just to be sure
I just made a "Nep Template" mod that I copy whihc has the basic mod structure.
Then I forgot to change the modid before uploading so now one of my mods on Steam is NepTemplate and the template is NepTemplate2
For item scripts, I usually want to copy a vanilla item to start with. Clothing might benefit from a better way to manage item scripts/model script/xml file/that file that references the xml file/outfits.
anyone got a second... https://pzwiki.net/wiki/Mod_structure
~/Zomboid/Workshop/ ??? MyExampleMod ??? /Contents/mods/ ?? MyMod1 2 3...
kinda confused what the MyExampleMod should be. because they explain my different mod(s) the naming is done at the MyMod1..2... level
Sorry if I'm asking too much but... Could you maybe take a glance at my mod and tell me what I'm doing wrong? For some reason when I add the second hazmat to it, the game just freezes on a black screen when starting to play. To be honest I have no idea why this happens and everything seems fine but it won't work
Well, you see.. You create a folder in Workshop, create Contents in it, then mods, and there you put the actual mod folder. From my understanding, "MyExampleMod" is the name that displays in Workshop built-in to PZ
(the workshop that you use to upload the mod. Yeah)
okay so use it named as they show
check console.txt for clue - if it fails to start there is probably a script parsiong error, if it fails when you equip the item in game it's probably an issue with the model.
I think anything kinda works. For your own convenience you can just type in the name of the mod
Alright... Thanks, I'll try it
MyExampleMod can be anything that makes sense to you. So can MyMod123.
well thats what it implied but I got lost cuz few levels down is where ya build all your mods and name the folders accordingly so was headscratching for a good min
The names people will see are in workshop.txt (name on steam) and mod.info (name in the in-game browser)
Oh
Highly recommended that you name the folders after the mod to make life easier for you, but you can call them Alice and Bob if you want,
no I was gonna use the mod Id actually
That works too.
Why didn’t you panic update the mod with the right Id
By the time I noticed there were a few hundred people using it.
ah okay so lemme make sure Im grasping this correctly if I make more than one mod.. Im going to be making more than one ~/Zomboid/Workshop/MyEXampleMod folder and easier to just name it as such
I made a personal use mod and now around 6 people except those I know are subscribed to it... I'm horrified :D
Correct. Every folder under workshop is a single upload to steam. You can put multiple mods in one steam upload; for example "MyNewGun" and "MyNewGunPinkVersion"
By having all the mods under .../Workshop/MyGun/content/mods/...
👍
https://steamcommunity.com/sharedfiles/filedetails/?id=3161578967
finally done with that MP support, thanks for the help
https://theindiestone.com/forums/index.php?/topic/93781-42162-unstable-hotfix-released/ 42.16.2 is out.
GAMEPADS AND CONTROLS - Right-click no longer toggles forceAim conflicting with RMC menu. Now waits slightly longer before engaging, so that RMC menu doesn't pop up. - Gamepad interactions with UI and Vehicles. -- Controller users can now move or perform actions while the inventory is open -- Veh...
random thouht
but can the vehicle behaviour of the animal trailers be put onto drivable vehicles instead of trailers?
You mean putting animals in the vehicle ? Not sure
like replacing the backseats of the cop sedan with a animal compartment
I don't think animal spots in vehicles are seats, so maybe but you'd have a seat and an animal place
I suggest checking the vehicle script of the animal trailer
To see how they define it
thats fair
im more of a texture guy so i just thought id put forward the question to any actual modders
just an idea for if they ever add dogs, we can have K9 vehicles
I`m making a hair mod with fluffy hair and apparently my mesh doesnt seem to show in the game. I wonder if somebody could help me with this.
When I change the mesh into something else it shows, so it probably is not a script problem.
also already tried scaling and still didnt work.
rigged wrong. is likely
I see... so, is there like a certain way zomboid render its models? Im quite new to modeling.
Try adding animalTrailerSize = 500.0, to the vehicle script. And it needs a trunkDoor but most will have that unless you're using a weird template.
And an AnimalEntry location will be needed
Dogs should sit on seats and if you roll the window down they stick their heads out.
Which is only a vast amount of extra work compared to shoving them into a "animal trailer" purgatory.
Not sure what you mean or expect by thag
did you just hit "Export" on blender without reading the export options?
if so. its wrecked.
i followed the wiki`s recommended settings.
upload the FBX file.
Is there even a right way to add properties to a vehicle template? Or do all of the mods that tweak the very tweakable looking vehicle scripts conflict?
Car ID override usually works fine for outright patching
I've not done any modded vehicles, but for a proof-of-concept test just back up the vanilla files and edit directly.
congrats. on your new skyscraper teto hairstyle. its 100x the size it should be
You're going to need to do more work if you want to convert cars between seats/animal storage, as opposed to making a car with dedicted animal storage.
oh really...
I would totally commit to it, if editing a vehicle template didn't mean it conflicts with other mods that edit that same template
As an alternative idea, animals are sort-of-but-not-really inventory objects and you might be able to make it so they can be picked up and placed onto car seats like anything else, taking up storage space.
There may even be a mod for that
They would probably starve to death
Idk
Sure, but how long are you leaving your dog in your car?
It's PZ, people blame the game after running through a horde
until recently all isoanimals were in fact, using the isozombie hit damage scaling
I'd just say "don't leave your dog sitting in a car or it will starve to death"
Is four hours between updates a new record? https://theindiestone.com/forums/index.php?/topic/93791-stable417819-unstable42163-hotfixes-released/
STABLE (41.78.19) - Security Vulnerability Update UNSTABLE (42.16.3) - Fixed an exception in Server Browser - Security Vulnerability Update
Literally the first thing I said in the discussion for it lol
see the ragdolls yet ?
go turn em on for funsies.
zomboid space program on ragdoll
oh, it really was the scale. that was quite dumb of me I only did on 1/1000 and 100x
thanks a lot
lol I will look tomorrow, I need to go to bed. Except my legs have been attacked by mosquitos and I'm itching too much to sleep.
One of those nights. 🙁
OR i could ask vaguely advanced coding questions to annoy you in dm
Any idea where the error is coming from?
bodylocation error OR XML name error > clothingitem
Tyy
For model scripts, is it possible to put a color mask on the texture, or does that have to be done with entirely new texture files?
perhaps you could use a decal, with a texture made wrong to do that in a fun way
You can do that in the item def usually
There's a hue or color parameter that I remember of
wouldn't work in my use case
Attachment models/textures are predetermined
and have no real connection to their parent item
Too many framez
why is the cape humping you
its animated
You have to be more specific on what you're doing, bcs attachments are still items so if you want to color attachments you can
I know they're still items, but when they're attached to a gun they don't display their real model/texture
show?
Gun attachment's models are determined by the item they're attached to, through the ModelWeaponPart param
Uh ?
The actual model of the parent item can be anything, all that matters is the model defined in ModelWeaponPart
every modelweaponpart gets its texture pre defined, its the easiest way,
I know, I'm asking if there's a way to color a model definition without editing the texture directly
{
mesh = weapons/firearm/PipeRifle_Remesh/Tape_Mag,
texture = weapons/firearm/remesh/Tape,
}```
Like, is there a param I can put in here to add a color mask or anything like that?
i have seen dynamic texture swapping before
You could make them have a connection by updating attachments to match the parent when attached.
Is it possible for one player to be immune to the draggeddown death without changing the Sandbox variables?
No idea if the rendering system will respect things like that though, but it should.
Someone is finally making the cover-yourself-in-grease mod?
I'd search the code for "ZombiesDragDown" and see where the sandbox setting is referenced.
huh, you're immune to auto-kill via dragdown if you sit on the floor.
BodyDamage.java
But that's deep in the java so not something that can be changed per-player with a lua mod.
How does god mode go about making you immune to drag down
Maybe that could help them
Only if they can can turn it on and off for each hit, and avoid having it on when a player update happens or it will fully heal the character
Also that function handles all the damage/stagger from a hit so even if you could isolate it somehow the character would never take damage from zombies
Maybe track who is near zombies and constantly turn sandbox settings for drag down on and off, but I hate that solution.
Thanks a Lot as always
Well,it happened.
On April 7th, we received reports from multiple users regarding a mod that was allegedly generating malicious code when run. We immediately investigated the mod in question, which contained heavily obfuscated code, and confirmed that it was creating malicious files outside of the Project Zomboid ...
On April 7th, we received reports from multiple users regarding a mod that was allegedly generating malicious code when run. We immediately investigated the mod in question, which contained heavily obfuscated code, and confirmed that it was creating malicious files outside of the Project Zomboid directory.
Further investigation revealed that the same user had uploaded a total of 14 mods, all containing the same exploit. These mods had been installed on between 500 and 2200 devices. The user has since been banned, and all affected mods have been removed from the Steam Workshop.
At this time, the full scope and behavior of the malicious files have not been fully determined. However, because these mods were capable of creating files outside the game directory, we strongly recommend that anyone who downloaded them take appropriate security measures to ensure their system is safe. Simply uninstalling the mods is not sufficient.
Looks like the update added more "check that the file path does not contain double dots" but I don;t have a 42.16.2 to compare to, I only have 42.16.
they arent even touching the fact there tons of copyright violations alone with that modlist
roblox, MC, MG Rising, Bebop, all these OST wanna be 🎣 OST's
btw shouldnt all mods not be obfuscated? (not sure if thats in the agreement or not)
it's not
It's not forbidden, but it's also not a great modding practice overall
Dane did that for his 10 YL mod for example
wasnt sure I know some games they say 'okay everything gotta be wide open' no tricks here... etc why I asked
Let me verify quickly
Maybe that one
Eh not really
Bcs obfscating your code doesn't mean it doesn't do what's on the workshop page
yeah its seems like its a grey area.
Not exactly
It's morally a grey area
In the modding policy there's nothing stopping you that
wonder if that falls under 3.2 possibly, as thats intentionally hiding its usage in part or full to PZ.
i don't think it does
well regardless thats lawyer level stuff I was just wondering cuz Im trying to get into modding and just didnt wanna waste time protecting something if I make anything and its not allowed
It escaped lua containment, releasing the zomboid virus into the real world
Yeah...
Was this using 41? 42?
42
my anticheat used obfuscated lua code sent via strings through PZ's multiplayer API to run anonymously and salt itself to prevent API comms tampering / MITM null-routing / ignoring packets for multiplayer anticheat stuff. It doesn' t break this rule but it also calls into question the vagueness of it.
(Or the ability to ship code like this at all)
i don't think it's 'vague' i think it's obviously not intended to address this kind of thing at all
2.6 is concerned with mods having undeclared features
On one side, yea, unknown code is a security issue.. but on the flip side.... the LUA API is supposed to be secure
Legal vagueness yeah it has to be defined as clearly as possible. That's what I was saying. Not the general sense of the paragraph.
And nobody is really looking through mods code before joining a server anyway
Obviously I'm doing a good service and the contents of my mod is well understood.
Honestly its just another use case for proper permissions system for mod
Like how android cellphones now work for everything you install
Been a long-time advocate of API permissions groups / flags
one reason I dont ever log onto anyting in my phone
the problem with security through openness is that it requires us to actually read the code before using it, which we don't
yep
on a large scale there's an argument that at least somebody will do it, but pz mods aren't on a large scale (and there's plenty of cases of 'nobody checked this obvious exploit in a massively popular dependency' outside of pz)
Like: 'MusicModAddon wishes to: Write to your hard drive, allow?' would have been pretty sus
given I started modding back in like 1.3.2 MC days I def look at mods I install or require clients to use.
Not entirely. You can define what groups to ask permission for when the mod is loaded through configs and then gatekeep those calls.
So you're saying a mod used a function like this to escape the Project Zomboid Lua sandbox? 🤔
WorldMapEditorState.checkInstance():fromLua2("writeAnnotationsLua", path, content)
Wow, interesting!
and likely would have exposed that mod to inspection wayyy sooner
Even then it'll take 10,000 USD+ for dev time and refinement which is too expensive for low return for user experience.
fromLua2 lol.
what happened to fromLua1? is it still in use? 😛
yeah all the debug uis have dogshit api, i've never been sure why
Or are they now using fromLua3?
o.O
i've wondered if they predate the wider lua API or something but i doubt that (the older ones at least, they still add new ones exactly the same way)
Ok my bad, I still have trauma from finding control_forward() was dead code and only control_forwardNew() was used
that or caught their HD going wonky for no reason
@willow tulip Any additional API in Sickle will be gate-kept through grouped permissions defined in a sickle config file for mods.
Nice.
The same reason why permissive URL policies was planned was to permit access but only by the user explicitly when enabling mods or manually editing their policies.
I remember waking up because my HDD access patterns where off.
4 drive raid5 was noisy back in the day 😛
Can't believe I used to sleep near such a racket...
so much energy wasted spinning those things 24/7 for years... little heads zipping back and forth...
well when I seen my GC filling up and down and doing nothing in something and then seeing my HD light just going ape. I know typically something 'wrong' not exactly what but it gets your attention. I didnt know about the zero day stuff till I seen that link not that Im dealing with it sorry OST's I get copyright flags by 3rd parties enough as is for music that I made and sole holder of as is.
GC? You got infected? My comment was on years past when I used to have a raid, generally was just windows doing something dumb like indexing everything (again)
nah it was a memory leak in a hotpatch nothing crazy so it made GC go wild ( not this game either)
yeah actually run some GC tweaks for this game helps out big time but thats offtopic
gonna DM you a link from Oracle check it out if ya want.
Wondering if people want me to update my anticheat engine to 42...
@minor perch Did you want that?
I know you worked with ModLoader which it ran in.
I'm going to try and work on getting my CSS parser done this weekend lol. I don't think I'll have a browser emulator UI framework done until like June.
I'm always going to be happy when security fixes go live. :)
hello! did you mean etherhammerx?
Yes and ModLoader / asledgehammer_utilities
wish I knew how to poke to look at code fixes cuz someone posted a fix for broken rain barrels
I don’t know. I’m already using a version for 42 modified by me, as you know. If you think something can be improved, let me know.
In terms of compatibility with 42, there’s not much to do—if I remember correctly, there wasn’t much to change to make it work on 42. There was maybe some reflection used in Asledhehammer to put an event at the top of the callback list, but unfortunately that can’t be used—nothing too impactful though.
As for the modloader, I don’t know if anyone besides me even uses it haha. For the anti-cheat, I already have a rough version inspired partly by EtherhammerX and other anti-cheats, plus my own stuff. Still in development and needs improvement, with features yet to be added, etc.
Let’s say I’m still heavily testing everything, but I don’t think I’ll release anything to the public—not for now at least. if you want we can talk in pvt
Hey so it seems like if I set a weapon's reload type using
item:setWeaponReloadType(BOLT_ACTION)
It causes the gun to crash the game when attempting a reload.
java.lang.NullPointerException: Cannot invoke "zombie.scripting.objects.WeaponReloadType.toString()" because the return value of "zombie.inventory.types.HandWeapon.getWeaponReloadType()" is null at IsoPlayer.checkReloading(IsoPlayer.java:3758).```
Am I doing something wrong, or is setWeaponReloadType() currently unusable in 42.16?
kinda off topicish but was looking at doing debugging for the client game itself more in detail so where should my IDE workplace/root folder be? at just root folder of the game install or down inside the lua folder?
If it's broken then I will need to use a different method of controlling my rifle's reload type, but I'm hoping I'm just doing something wrong so that I don't have to change too much functionally.
zhenja has attempted to get in touch with you twice but there it is against my wishes to bring SMUI to 42 in any way
please put that effort toward your own project, we are trying to push guns and leather in 43
No worries bro, I've updated it only for my use
good to hear, i was hoping that was the case
Yep, I also updated some other mods, but all of those are only for my consumption
happy to hear it, ive tried to keep SMUI up for people like you since we've considered getting rid of it entirely 43+ for guns and leather
what is a gun and a leather?
Textures still not finalized, but here's a current look
The synthetic stock got a remesh, overall rounder and more generic stock looking instead of a weird rectangle
sad that I cannot do the proper reload but for now
Ohh I see, btw I wish the best for your future work! Looking forward to it 
thanks, happy modding
hello yall, do you guys have any idea on how i can make an outfit unusable by players but still usable by zombies without removing them from the zombie body?
im making a nemesis mod but i don't want the players to acually use the nemesis skin, just the zombie that i'm spawning
Any Lua experts awake atm?
got a code block of a fix for rain collectors so wanted someone with Lua experience to take a peek at what was posted and if it looks safe/okay to keep changed as it does solve the problem.
https://theindiestone.com/forums/index.php?/topic/93595-42161-bugged-rain-collectors/#findComment-465217
okies sweet I tested this and it works makes the menu work again but just wanted to run it by some Lua people first cuz its not java :)
sadly doesnt fix the crash bug from the composters
birdy
Feather Cloak?
full body replacement for specific zeds 
i'm using the api in truemodelz to make this possible
@mellow frigate Hi. There is a massive error on the B42 AquaYacht mod. This function is giving multiple errors per second. The mod (and it's requirements) are set as the last in the mod order and there are no red errors in the mod order (or yellow). I tried to DM you on Steam but for some unknown reason it's saying I'm blocked from DM'ing you?!
what im i looking at
Project Zomboid Mod Updater/Downloader
👑
Update 1.1.6:
- added this changelog file to the program.
- updated SteamCMD executable.
- updated most assemblies.
- merged all changes from RimWorld Mod Updater to this program (which are relevant).
- cleaned leftover files.
Instructions: - download and extract the archive preferably into your PZ installation folder.
- if "mods" folder doesn't exist (weird...) in your PZ installation, do create it.
- if C:\Users\yourusername\Zomboid\Mods folder doesn't exist, please run the game once just to create the settings environment.
- run with PZModUpdater.exe
- minimum screen resolution required 1600x900
If you have any feedback/bug reports/good vibes, do tell and share...
https://drive.google.com/file/d/1_yCDaG3yRhWBo6Vdz6LH6rz8PJCUjs4S/view?usp=sharing
Hope it's fine to post here
I mean, it's not a mod, it's a program
Hi Everyone, I'm the creator of Project Thiccener (https://steamcommunity.com/sharedfiles/filedetails/?id=3659585445), and I've hit a bit of a roadblock trying to implement my persistent zombie morph memory, I want to ensure zombies have access to the same data between game reloads and when they are turned into corpses. I added in an item which contains my data, my problem is that to me it looks like we cannot add any items to alive zombies (ModData gets wiped between reloads, and when they turn into corpses), does anyone know a way to get around this? according to my research zombies do not have an inventory, and I can only add the item to their inventory when they die, which defeats the purpose of reload persistence. their ID also changes when they get turned into corpses. so I can't even rely on that to save their old morph state between the "alive" and the "dead" zombie
You need to use persistent outfit id but that is only unique for that specific outfit combination. So if there are several of the same outfit on other zombies they will also have that id
yeah, I thought about that before as well, but it's not really a great option sadly :/ but thank you anyways for the tip! 
I even tried saving the xyz coordinates of the zomboids when they die and trying to use that on the corpse (to save the data between alive zombie and corpse), but that doesn't help with the game restart, either :/
you want the #1478418176516558880 channel... this is the development channel
The corpse probably will persist but I'm not certain there is an identifier you can reliably fall back on.
Container id maybe
well, the zombie IDs sadly change between reloads, for the container ID I'm not sure, but I don't think that would work, due to zombies not having an inventory (or if you mean corpse item persistence, that definitely does work between restarts)
oh well, it was a long shot, if the zombies can't keep their size, I guess I'll have to accept it, unless if I modify the game's java code any more to add our morph changes to the saves directly (although that would lead to other problems). Thanks for the help Lect :)
That's an external mod manager ?
I suggest reading the IsoZombie wiki page
thanks, but this is how I figured out zombies do not have inventories
It explains about mod data and gives alternatives on that same page
See Object pooling section
If you send out a lot of server commands, it seems the client takes its sweet sweet time getting through the queue and actually calling your LUA with them. Is there anything that can be done to make it less sluggish?
This is localhost so it could be practically instant.
Don't send that many commands ? 😅
I have to.. I'm doing file transfers.
Or send commands together to process
the alternative is to get the zomboid server and client talking on some other port purely via java....
You get to send payloads of up to 32KB and i'm already at that limit as well
Do you need to do file transferts instantly ?
Bcs overall that sounds heavy on the network ?
Technically the mod isn't dead / broke if it's slow, but it should be a lot faster than this. Like a LOT faster
and yea, it will be heavy. it does tons of caching so generally things only ever get downloaded once
interesting, sadly it still only suggest the persistentoutfitid, which would lock me into the problem that zombies that have the same clothing would also have the same morphing as well, instead of unique zombie sizes, it would just be the same. but thank you anyways :)
That's the only way unless you set a custom outfit on the zombies
Bcs that custom outfit is persistent
OR the other method is to make the zombie a revived player
Which the game does save
BUT you should not do that for lots of zombies
right, but apparently that could lead to other problems down the line, no?
Bcs you'll bloat save files
yeah
Depends how many zombies you need custom morph on
we're morphing every zombie, and player character that is loaded into the gpu
Yikes
it's very performant
Also it's not zombies with the same outfit share the same pid
it's done through shaders
So no Java ?
there's a lot of java, we have to hook into a lot of calls, I had to rewrite a lot of the render pipeline for this to work properly
Back then I did a test in LV to see how many zombies shared the same true ID and it was like 10 or so zombies ?
Why through shaders then ?
What do you do with this morphing ?
it's not a mod
yes
I think you can still post that there it's fine
as I posted the last update here, OK then
before I did through the VBO, so when we got the clothing / player model into the VBO, we would do the morphs on the CPU, changing the sizes of the characters, the problem with this was that some modded clothing were set up inproperly, and in the VBO we only had access to the raw vertex data for the meshes, but not the skeleton, not properly anyways, so some clothing did not morph correctly, with shaders this can be avoided as they run much later, when we have the skeleton data again, and we let PZ itself set up the clothings properly (so their location, rotation, and scale is correct compared between the clothings and playermodels)
Interesting
here is an image of what our code does, it changes the sizes of different zombies (making them thinner, or fatter, or more muscular), it also works on the player as well, and this is synched between clients in multiplayer, so the same zombie would have the same size (morphs), my problem currently is persistence, between game reloads, and zombie to corpse transformations this ModData is lost, not from the players (as that's calculated out from their strength and weight data, and the dynamic morphs, which are stored as ModData on the character)
Sadly there are no other solutions to my knowledge
the nice thing with our mod is that we do not need to create different meshes for each of the clothing (and then a mesh for each value of the morph per clothing), as it's all just vector calculations, so if in the future we want to add in a new morph, it's really easy to do so as we just need the "maximum" that morph can be, and then we can control the morph through our dynamic morphs (here is a quick video i just made of how that UI works), or through custom lua callbacks to our java code, so we could manipulate how zombies work (for example making them thinner the longer the game has been going, to simulate the zombies "starving") [the ui currently doesn't change sizes, this is due to me changing over from the VBO calculations to the shaders, I'm planning on fixing this, this is why we can see the character model in our custom ui window]
well, thank you anyways, you have given me some good ideas on how to fix this in the future (I could modify the java code of the game to store another variable, so that zombies will have a true persistent ID on them)
no no, Moons. was talking about a memory leak making GC going ape in another game. but java is java
i think you're misunderstanding, the persistent outfit id is 'essentially' unique
it's true they're not actually guaranteed to be unique, but zombies with the same outfit usually won't have the same one
each outfit has 500 male and 500 female ids, so it's very rare that there will actually be two of the same id on screen (and if there is, in your case it won't really matter)
oh, okay, then i definitely misunderstood it! in that case that is going to be really useful then, thank you! :) (I thought there would only be 1 persistentoutfitid per outfit setup, but if there really is multiple per outfit then that is indeed very useful)
afaik persistentOutfitId is constructed from 2 parts - outfit ID + some number that is incremented for every new zombie
it's not incremented, it's just a random offset
btw know yas talking about outfit ID's and missing ones is a major problem I see spam in debug window constantly for that.
LOG : General f:97574, t:1775754532356> ItemPickInfo -> cannot get ID for container: inventoryfemale (hope this is relative to what you refering about)
i see, thank you so much for telling me about this, that is really smart, especially if we use the trueID (thank you SimKDT [and Chuck]!) I remember very early on i looked into this, but for some reason or another I abandoned it, probably due to me incorrectly assuming that it's only 1 trueid / outfit
I ended up rewriting SimKDT's code in Java, and getting access to the outfitID directly with this: entity.getClass().getMethod("getPersistentOutfitID");, and then just flipping the 16th bit pID & ~(1 << 15);
interesting... should pass that on to them maybe they'll implement it so we stop getting invalid lookups?
"Further investigation revealed that the same user had uploaded a total of 14 mods, all containing the same exploit," the developer said. "These mods had been installed on between 500 and 2200 devices. The user has since been banned, and all affected mods have been removed from the Steam Workshop."
i remember mods using "heavily obfuscated code" somewhere.
automatic flag for me to not use it :P
non tech peoples never checking any mod files, even me, i tot lua "sandbox" is safe
true most people also never decompiled reverse engineered stuff either
So.... Guys... You've already helped me with how to add an extra option for clothes... Now I need your help once again. If there are several options, how do I code it?
You mean different ways to wear the clothing ?
Yeah. Like the vanilla hoodie up and down options
In that case there are only two options. In the mod I'm working on there are supposed to be three (per piece of clothing)
So I was wondering... How
Can you quickly remind me which parameter you used for the secondary option, I can find that quickly
ClothingExtraSubmenu
ClothingItemExtra
ClothingItemExtraOption
item Ring_Right_MiddleFinger_Gold
{
DisplayCategory = Accessory,
ItemType = base:clothing,
Weight = 0.1,
Icon = Ring_Gold,
BodyLocation = base:right_middlefinger,
ClothingExtraSubmenu = RightMiddleFinger,
ClothingItem = Ring_Right_MiddleFinger_Gold,
ClothingItemExtra = Base.Ring_Left_MiddleFinger_Gold;Base.Ring_Left_RingFinger_Gold;Base.Ring_Right_RingFinger_Gold,
ClothingItemExtraOption = LeftMiddleFinger;LeftRingFinger;RightRingFinger,
Cosmetic = true,
WorldStaticModel = Ring_Gold_Ground,
Tags = base:hasmetal;base:tinygoldscrap,
}
You can define multiple ones via an array
Oh
Thank you
I hope everything goes well...
But for now... Good night (or any other time of day) to ya, nice people. Thanks for your help
@lost tartan Yea the useDelta stuff really annoys me too, especially when making a mod that changes items useDelta onto existing saves
"yay more lighter uses.. wait why do all my lighters show min now?"
yea, a TCPIO socket would be nice
its possible, but it's extra setup because server admins might need to go open another port and stuff
really trying to avoid anything that makes this monstrosity i've created any harder to get going
yup! was an unpleasant surprise after thinking "oh wow, so straightforward" lol 
I think they stored it as an int at one point... and now its some cursed floating point thing
I think it still is an int, the cursed floating point thing is the wrapper around the int 
in zombie/inventory/InventoryItem.java
return (float)this.uses / this.getMaxUses();
}
public void setCurrentUsesFloat(float newUses) {
newUses = PZMath.clamp(newUses, 0.0F, 1.0F);
this.uses = Math.round(newUses / this.useDelta);
}```
original useDelta is forever baked into the item state, since this.uses is the storage variable, but getMaxUses() for a drainablecomboitem is
return (int)Math.floor(1.0F / this.useDelta);
}``` so one adjusts with changed useDelta, but the other doesn't 
Yeaa... so stupidly cursed.
'oh but we can't change that, it would break saves!'
- Company who breaks everyones saves every minor version
atleast you know what semantic versioning is :P
Its actually far worse.
if (header.hasFlags(1)) {
this.setCurrentUses(input.getInt());
}
its stored as int in the save file
