#mod_development
1 messages · Page 542 of 1
sorry
anyway, your mistake is that you should be passing it your own function which then calls the timed action queue function
the user clicks the option, it runs your function
your function then sets up the timed action
Yes I though that...
But then..
Okay wait a sec
Okay surprisingly the game doesnt crash now
But that doesnt help in any way as the button doesnt work
😂
pastebin
local function OnPreFillWorldObjectContextMenu(player, table)
local player = getSpecificPlayer(0); -- Java: get player one
local inv = player:getInventory(); -- Java: access player inv
if inv:contains("Antidote") == true then
table:addOption("Inject Antidote", player, fireTimedFunction)
end
end
local function fireTimedFunction()
ISTimedActionQueue.add(MyTimedAction:new(player));
end
um
you declared fireTimedFunction after OnPreFillWorldObjectContextMenu
so it's basically a nil value
oh that matters?
yes, because it's a local
Oh well Lua
functions are first-class in lua
as in, they're basically just variables
local function fff() end is the same as local fff = function() end
Well, I was treating them more like Methods/Functions in typical OOP language
I see your point
though
yes, I see that, don't
Might be interesting 🤔
the game does this itself to a modest extent with a lot of the code
Why is this happening to my helmet? :0
@calm depot Hey man, I got it to work using getTextureName(), thanks a lot for your guidance.
Olipro here are my examples why did you disappear where are you examples Olipro where are they?
You need to use the .X format for helmet
No. It worked fine when i just did some ctrl + a
@undone crag what?
I was looking into doing a sound mod but then noticed for all the "replace zombie sounds" ones you have to manually install stuff. No good. Then I noticed the handful of "no startle sounds" mods are using a script to redirect the game to the modded sound file. Would this work for the zombie sounds?
module Base { sound ZombieSurprisedPlayer { category = Zombie, clip { file = media/sound/Silence1.wav, } } sound ZombieSurprisedPlayer
Hey guys, I'm new to modding. Are there any resources on how furniture works, and how it spawns in on the map?
it's a movable, it doesn't spawn, it's part of the map
that's why if you zoom in on houses on the PZ map website, you can see all the furniture
Makes sense. So I would need to edit the map to add any custom furniture in the world? I assume furniture works similarly to normal items in the code? I suppose I can look at furniture files in the game to reference.
Alright thanks!
Hello i'm trying to begin modding and idk where i can find all class relative to the player
I'm on the API and idk where i need to search
it is that ?
in exemple this function i don't find it in doc
I wonder if it's possible to add sound channel interpolation in zomboid
Half-Life 2 did that one for distant gun sound
For one stereo sound
Left channel is for playing Near Gun Sound
Right channel is for playing distant Gun Sound
So based on the distance, the gun sound actually interpolates
from left to right
if FMOD has that feature
i would happy to show the example for everyone
wow LootZed is so useful, turns out I've been playing with broken distribution for a long time
The sound propogation is already pretty solid. If you're using True Music, you can hear the bass thumping through walls and stuff
Im not talking about frequency modulation
packing two sounds
in one sound file
and playing them with interpolation rule
is what i meant
anyone know how to add a mapmarker via lua?
Is there anyone accepting vehicle commissions here?
canibalism mod ?
u can cook and eat people in dayz
theres a special trait that doesnt allow you to take negative side effects of eating people
if u eat someone without it you get like really sad or anxious
Can i drop a dm?
sure
theyre not similar to items they are tiles
they can be placed from lua but editing the map is likely a better way of doing it
movable is an item you receive when picking up a tile which stores the tiles data in it so you can place the tile down again
lua manager
IsoPlayer
Is it possible to check if a placed down radio is turned on?
Is there any map makers, that can replace the map in game. I’m not experienced with that but I have a custom server and I want to replace the in game map with a fully custom one is there a easy way to edit the base game map or is there some one who can make one for me for a commission?
Let me rephrase, the map you view to get around. I don’t need to make a custom like game world I just wanna edit the map you press m to view in game. (To add street names, house numbers, named markers, pvp areas, and safe zones.) so players can login and view where everything is.
You can click the message I replied to and what that message replied to and what the message that replied to and what that message replied to and what that message replied to where you asked if I had an example.
Woo, I got it to work. My recipes are only available when next a powered on ham radio.
hello everyone, I land in the modding of pz and am looking for a mod allowing to play poker as well as blackjack (find out if there is a mod doing this currently before embarking on the creation of this one )
Sorry for m'y Bad english :x
Hey there. I'm looking for mods that could help turn Project Zomboid from a zombie survival game into a game similar to The Long Dark where the main hardship for survival is nature itself. The weather, resources, and such. What might you recommend? Thanks in advance.
someone can explain me the error ?
i try a similar code but .. the same error
i just add the first code in a working code so it's logic it's not working but why ?
i'm doing it like the tuto idk '-
you used Event.OnHitZombie instead of Events.OnHitZombie
omg
thx man wtf '- i'm an idiot
Thank you, this is really helpful
How can I check if an item already exists in the player's inventory?
This mod might help
thanks
Another question.. how would this function work with translations? Would it break if for example the recipe title was in spanish?
knownRecipes:contains("Discover Weak Serum Formula") then learnedWeakDiscovery = true end
Should I be using Recipe_Discover_Weak_Serum_Formula somehow instead?
is there a guide in general how to create/use translations with the lua code? I got a bunch of custom functions that have the player say something in English, but how do i make it so others can made a translation if they choose?
an example:
player:Say("The virus is present in my blood stream.")```
How would I create a translation file for something like this that is currently hardcoded into my LUA code?
this would be correct for creating a Vector2 object, but there exists a old unused garbage file at media/lua/shared/Util/Vector2.lua that creates a Vector2 table (thus overriding the exposed java class that you need). to properly create Vector2 object you'd need to overwrite that file with a blank (it wont break anything if you do, its old garbage)
**edit, sorry: tired here, not quite correct. once that file is replaced to properly create a java instance you'd have to call Vector2.new(10, 10)
Thanks bro i will try this 🥲
Omg it’s working 😭😭
Ty bro
okay question. is there no animation node for when you are carrying a generator?
i can't setup a carrying heavy things animation if there's no node
is there a way to fire full auto without relying on Recoil Delay?
can anyone tell me which code is good for playing only sound for player?
playSound working for everyone around.
I just need to work it like level up sound or zombie surprise sound.
yes, they only changing the sound file
howdy, just a general question, what do I have to look out for when making a mod multiplayer functional?
i heard the split between client and server is a bit messy
Depends what you do
I set the hit and crit chance right before every shot
(which depends on how much the player moved and how long theyve been aiming)
ugh.
Don't sure that will work in MP, but need test
Easy way to test on 1 pc MP - is run 2 client in -nosteam mode (1 in debug, 1 in nodebug) and -nosteam server and connect to it
I could just print out isClient() to figure out which instance runs the actual gunshot evaluation right?
isClient() just said that is MP game or non MP (and said that this is not server)
oof
but lua files in server folder get only run by server right?
i know a trick to make it work then regardless
how do I get the character index of the local player clientside?
or just the character in general
ive just been picking 0 for my local tests
but idk, thats probably not gonna be working in MP is it?
Maybe this will work
wont this contain other players on the server?
ill give it a shot
or look around some other hud elements
they needa access the local player somehow too i bet
self.chr seems to be what im looking for
huh, seems like everything is working without issue
lucky me
so im guessing the entire shooting logic is done clientside?
guys need help I'm stock at the loading script i think my mod doesn't process by the game.
im a dumb ass i forgot to put a bracket in the code.
@spare hinge clients do currently load lua files in server
is there a list somewhere with all the strings for this function "getPartById("Heater")" , i'd like to target certain vehicle parts by their names
How difficult would it be to create my own radio channel?
I think in vehicle scripts
But also you can like this:
local c = vehicle:getPartCount()
for i = 0, c do
local part = vehicle:getScript():getPart(i):
end
thanks
guys, how to add new types of these for make new variant of dressing cloth? i tried to just insert it just as a text but it doesn't work
Reason: Bad word usage
Or is the mod just simply broken in mp currently? It was fine yesterday.
Hey guys. Does anyone know how to get the type or id of the clicked inventory item?
Hi, im looking for full tutorial on how to setup IntellJ with binaries, the one linked in the Wiki page still lacks how to export the binaries, if anyone have some tuts on that i would be grateful!
I just started modding today so take this with a grain of salt.
The way I think it works, is that the different "versions" of an item need to all be set separately. I made a bag, and you can carry them in both hands or your back. I had to create a GUID for that item, then add the different versions of the item for the back, and both hands.
If you are unsure how to do this, check your "scripts/clothing/clothingItems" folder to get an idea of how it works maybe.
Probably looking for pzstorm/Capsid #mod_development message
Dont understand how but go damn
I thought custom zombie models were like """"impossible"""" lol
I might hold off for the NPC update to do custom monsters, I dunno
@austere pecan looking at the mod it looks like you have the custom models as FullSuit clothing?
Will check it out thanks
Was looking at planetalgol's flare mod, because I'm not sure if it's doing what I want (not like he'd tell anyone), but saw this Class WorldFlares.Flare, does anyone have any idea what this does? It's in the base game. I wanted to turn the map markers off for my MP game but add in the ability to shoot signal flares that would temporarily show up on the map or something
Is there a function just add a marker to every player's map automatically?
hey guys, is it possible to capped skills to a certain level? Is it moddable?
I'm sure you could do if skill > 5 then skill = 5 or something?
hey guys, recently I've been interested in trying mods for the game, so I need to ask, is there a mod that allows me to wear my bunny ears and a helmet at the same time? I can't be a war bunny without my ears! 
I believe the game runs through where accessories are placed in slots. In this example, bunny ears are placed in the same slot as the helmet, replacing it. Try and find a mod that adds bunny ears as some sort of cosmetic item, where it allows you to wear them both. Or just go with a tactical outfit with bunny ears. 🤷
hmmm, I see, thanks for your help ^^ I will see if I can find a mod in the workshop that adds more rabbit ears to see if it puts them as cosmetic items
Np!
Anyone know what mod causes 100000 errors when transferring items with the new update
How can i safely remove a mod from a hosted server without breaking the save or the game enabling me to load the save without force downloading the mod?
I accidentally used westpoint expansion without checking the comments, i didn't assumed it was abandoned by the ratings.
is there a way to get...
local Item = Player:getPrimaryHandItem();
but instead of primaryHandItem(); to be a headItem();?
local sort = function(item, equippedHeadItems)
if item:getCategory() == 'Clothing' and item:getBodyLocation() == 'BODY_LOCATION' then
table.insert(equippedHeadItems, item)
end
end
function isEquipped(character)
local equippedHeadItems = {}
character:getInventory():getAllEvalArgRecurse(sort, equippedHeadItems);
for _, item in ipairs(equippedHeadItems) do
if character:isEquipped(item) then
return true
end
end
return false
end
is it possible to create a mod that automatically quits the server and gives warning messages before restarting? or does such a thing already exist?
Hello, I have a question. Is it possible to disable a recipe when a certain mod is not enabled without making a separate patch? Like with Obsolete?
I know with lua you can do if getActivatedMods():contains("somemod") then but that won't work with recipe scripts.
I'm not sure of what you mean by not making a separate patch, like not overriting the item directly ?
For that you can use the ItemTweaker API and clear the concerned recipe from the items it is attached too.
You can do that in a Lua script where you can use the getActiveMods() function
Basically I'm making a trading mod that adds "recipes" to trade. Problem is, every mod support I add must be its own patch. And I end up with 10+ additional patches that clutter the mod list
So I'm trying to reduce clutter with some way to enable/disable those recipes if the mods in question are enabled/disabled
Yeah will the ItemTweaker API can help you then
Itemtweaker can remove recipes?
Right now the recipes still show even if them mod is not there, so you have a lot of uncraftable things that my OCD wants to see gone 😛
Well maybe it can't
If scripts would use functions other than, say, OnTest, OnCreate or OnCanPerform I could do it quite easily
What do you mean by adding recipe to trade ?
Basically a "trade" disguised as a recipe. Needs money and a ham radio to do
So they are indeed recipe scripts
Like this for example
` recipe Sell Jewelry - Nose Ring for 5$
{
OnCanPerform:HamCheck,
NoseRing_Gold/NoseRing_Silver/NoseStud_Gold/NoseStud_Silver,
Result:Money=5,
Time:200.0,
Category:Trading,
}`
I could get something to work if there was a way to unlearn a recipe, though.
Oh well. I guess patches work until I find something.
Yeah went a bit over my head thinking you could do something with an EvolvedRecipe but it won't be a solution for your problem
It's not complicated on paper. If mod disabled, delete specific recipes.
If I could, say, changed Obsolete to true or false with a super easy function, I'd be golden
Well a bash/batch script will do that neately for you, but that would require an additionnal installation step, and well, some obvious security flaws
Let's not
The way I did it is make separate mods (I call them patches) with the recipes. Requirements set to my own mod and the mod I add recipes for.
It works perfectly, but then I have 10+ patches in my mod list for my own mod, people might take offense to that XD
@kindred dagger
getScriptManager():getRecipe("Recipe Name"):setNeedToBeLearn(true)
if you dont teach it anywhere its effectively hidden
That is true, and I've thought about that, actually
But, let's say for whatever reason they remove a mod. The recipes would remain learned, right? Is there a way to unlearn a recipe? I haven't found it
OH
I get your idea now
You don't need to learn the recipes at all
But doing that, you effectively hide them
That's so genius
anyway i have a vendor based trading mod
currenty unlisted on the workshop for testing purposes
My trading mod doesn't use a vendor. It requires you to stand need an activated ham station however
When I get the motivation, I'll add a channel requirement too. So you'd have to be on the "trader" channel, with some banter from times to times
I'm not sure how the NPC update will change trading mods, but I'm looking forward to it
Hey guys where is the watch alarm sound located in the sound file? i have some trouble finding it
I have no idea, I haven't dug through sounds yet
Try to search through media/sound maybe?
i already did, no luck
According to the wiki it's called watchAlarmLooped
still didnt pop up
Those are regular alarms. The watch alarm might be in a bank somewhere
sound WatchAlarmLoop
{
category = Item,
clip
{
event = Character/Survival/AlarmWatchRinging,
}
}
The next step is to dig into the FMOD soundbank files
Do you guys know if the most recent update broke multiplayer engine repairs?
does anyone know where i can find the download for the old ultimate sound overhaul mod from last year? the discord invite link is dead now and I was hoping to port those zombie sounds to the new version
After hundreds of hours of work, the Ultimate Sound Overhaul - Complete project is complete.
It replaces every single sound the player could hear in Project Zomboid (and a few of the unused ones) with self-recorded, hand-crafted high-quality samples.
It is the single biggest audio project ever for Project Zomboid, replacing well over 600 sound e...
I may have an old zip of it on my PC
It was on his discord that I think he deleted as I no longer see it in my list.
oh nice
yeah i think its probably been gone for a while now
i just tried adding raven on steam to see if i could ask them in case i cant find it
Shall I DM it to you or post it here?
I got it
I'll DM it since idk if it's against any rules to post here
anyone know how to hide client strings when u press escape as in viewing the menu?
found it, if not MainScreen.instance:isVisible() then
pretty sure it does
but only if you are in offline rendering i think
i had to futz with it
and it made a difference
Hey I saw a mod that lets you change the look and sound of zombies to look like clickers from the last of us. I was wondering if there is away to make this only apply to sprinters?
particularly with moving parts
how do you have your dev env set up? I tought about a second install with no workshop items to have a clean dev env?
not sure if I understand, add -debug to game launcher and disable all mods.
@buoyant sky
yeah i just dont want to enable & disable all mods everytime i try to mod or try to play.
https://steamcommunity.com/sharedfiles/filedetails/?id=2694448564&searchtext=modmanager
doesn't take a lot of effort
Events.EveryHours.Add is this functions real or game hours?
I made a world object, but I can't seem to place it anywhere. It is modeled after the basic mattress and uses all of it's data pretty much. Any idea what the problem might be?
game hours
whats with that sus head bobbing there, sport?
is there a fast reload of lua/items/models while in an scenario?
i can break these cuffs
you cant break those cuffs
AUUUUUUUUUUUUUUGGGGGGH
Hey guys. Is this the right place to ask something about dedicated server (invoking commands like servermsg) here?
nope
Ok where would I go than?
check #old_techsupport
Appreciate m8t!
I don'y know if scenario means there are important differences but in debug mode F11 opens and closes something that can reload Lua files, and reportedly fbx models reload by themselves. You can reload vehicle models by reloading them in the debug mode vehicle thing.
Will try thanks, also is there a default value for rotation & position etc in PZ (Especially for blender) please ping (also i know we already have a cooler)
thx
please tell me there is a mod that adds some sort of search function for items in inventories
or a way to cycle the category of loot instead of just sort from oposite ends?
if you click on the category box on the top that should sort it by categories I think
im pretty sure it is the same as weight, theres a bottom catagory and a top catagory and all it does is flip it
hey i'm new here, i'm making a mod, i want to reduce the character's boredom when it does something, why is there "boredom", "Boredom" and "idleboredom" and what do they do
https://zomboid-javadoc.com/41.65/zombie/characters/Stats.html#setFatigue(float) using this as a resource
Javadoc Project Zomboid Modding API declaration: package: zombie.characters, class: Stats
Is there a reason you guys can think of why a modded bag that was working fine no longer functions, and can only be held in the left hand no matter what? I can post some code and images if you need em
Not off the top of my head. The game just recently updated so have you checked the patch notes?
The mod worked just fine today. I was tweaking it a little, and I must have done something to it, but I have no idea what. I even reverted the version back but it still seems not to work. Can I upload the folder for you to have a quick look?
I just need the .txt and .lua files no zip compression for me please dm me
This is the latest version and not sure if I deleted a file or something?
Dont post it here
My mod Item Searcher (https://steamcommunity.com/sharedfiles/filedetails/?id=2789003239) is a little roundabout for this, but one of its search options is for the player's local inventory
Oh I seemed to have missed your previous message, just a moment
Tearless couldn't see an error. Can any of you guys test my mod out and see what it does for you?
local? like chests and vehicles or do u mean local like your own inventory
There are options for searching the player's inventory, nearby containers, and every container in a room.
ohhh thats really weird, thank you 😄
np, like I said kinda roundabout for what you want
Any idea how to duplicate a movable item? Like a floor tile.
like create a movable object in my inventory of said floor
I'm trying to setup IntelliJ using this tutorial https://github.com/Konijima/PZ-Libraries/blob/Tutorial/README.md
For the "5)" I can't figure out how exactly should I decompile the game. I tried to decompile it using IntelliJ decompiler but it just gives me a bunch of code, how to turn it into required libraries? Or am I misunderstanding it entirely?
Probably looking for pzstorm/Capsid #mod_development message
thank you, it worked, I think 😁
Sure thing!
I was looking at making a recipe for a primitive stove, but apparently furniture items are kind of a pain to mod in... is there anything like that as a mod already?
@runic bear a couple of mine spring to mind - Craft Metal Barrels & Rain Collectors & Steam Powered Generator
the former uses the metalworking context menu, the latter uses an actual recipe
Oh cool, thanks. I forgot about the Metal Barrels mod. I looked at the Improvised Cabinetry mod and made the "kit" for a primitive stove (just an altered campfire kit)
Any way to set a floor tile's texture through LUA? I'm basically trying to either set a floor or be able to give my character an item (specific floor) but I can't figure out a way
i've replaced a function in a timedaction but as soon as it hits "ISBaseTimedAction.perform(self);" it says that its trying to pass in nil
@astral tendon take a look at client/BuildingObjects/ISUI/ISInventoryBuildMenu.lua
they alter tiles when you pour out a bag of dirt/sand/gravel in the base game
@winter bolt that doesn't provide enough information to debug your problem
you will need to pastebin the code
anyone know of a mod that adds some sort of mining?
Alright, I added a recipe for a Primitive Stove item, the item looks like this:
item PrimitiveStove { Weight = 6, Type = Moveable, WorldObjectSprite = axebeard_primitive_stove_1, DisplayName = Primitive Stove, Icon = TZ_CampfireKitWood, }
I have a placeholder sprite, and I copied the .Tile properties from the Antique Stove. When I craft the item in game, it's weight becomes 1.0 and I am unable to place it. What did I miss?

we meet again, old friend
💀
No modding guides that are up to date that I can find
You can get a pretty good handle on things from the guides in the wiki https://pzwiki.net/wiki/Modding, but some of them are pretty outdated, so you have to feel it out. Checking existing, working, high-quality mods is a big help, too.
hi there! does anyone know whether one of the last updates (41.69 +) made changes about how the script files or the xml-files work when you are trying to construct clothing mods? i have the following strange problem with my mod: when entering the character creation screen in game, the first character model (which is randomly created by the game) is not aligned with its displayed gender. (cf. one of my example screenshots: the model is male but the displayed gender is female. the game also seems to treat it as female since it doesn't display the beard options and displays the skirt option.) this is strange since my mod does not contain any lua code. only the folders and files to define new textures, 3d-models and stuff (cf. the other example screenshot). i can solve the issue by either removing the "scripts" folder or by removing the "clothing" folder (the latter contains the xml files).
has anyone encountered such a problem? if so, has it been introduced by one of the more recent updates?as far as i remember, i didn't have the problem when play-testing the same mod on older versions. (i think in 41.68, it worked without any issues.) many thanks for any ideas!!! 🙂
oh.... also should add that the problem disappears when i manually change anything then. for example, when i change clothing, press random button etc. the character suddenly becomes correctly aligned with the displayed gender. it only happens for the very first character which is created.
West Point is getting a livery change or is that specific one only for the highway units?
Anyone know of a way or mod to refill gas stations from fuel trucks?
any experienced modder around? i had tested this mod on a self hosted (my pc) MP server and it worked, now i've uploaded the exact same on a dedicated server, and its bugging out
But, aren't you supposed to take gas out of them and store in tankers? Seems like alot of effort game wise
A mod allows you to choose gas station with more or unlimited gas in the game parameters (the one you choose in custom game mode). It's Fuel API if I remember well. Can be a good place to start
Or, consider that you're basically doing the opposite of fuelling a vehicle
when you're fuelling a car, the script calls setPipedFuelAmount on the pump - you're just doing this in reverse
known issue
Aloha! Any news about an API?
Hi, what do you mean ?
tried adding an online count but it only seems to update when the player views the "players online" page in the menu or when i have the scoreboard up as admin, anyone know whats missing or where i should look?
It should update every 10 mins:
Events.EveryTenMinutes.Add(TFA_DisplayInfo.updateSurvivorsOnline)
Maybe if they paid you more, you would work faster 
btw, love your info site....big help for us mod newbs
info site?
Does anyone know a mod that adds a new, smaller map I can use? Looking to make a smaller server and smaller area for a group of mine. Preferably overgrown.
Anyone got a working script to add to a mod that
gives the key of the building you spawn in
is mod options broken? :c
Is there a docs page for Lua reference? Like zomboid-javadoc but for Lua? I swear i had found my way to it once before but didn't save it for some reason
pzwiki has a list of events, that's the only one I know - though you can just dump it yourself
Ha, yeah, trying your hand at some PZ modding for amusement or something more?
I answered your question Olipro how about you answer mine Olipro yeah Olipro where's my answer Olipro?
Hi there, I'm trying to remove a mod from our server to respect the instruction of the mod creator. We are trying to convert some of the items to vanilla item. I have a fix to do that but it still keeps the label of the original items (all other stats are vanilla and the rest of the mod is being removed). That doesn't seem to be good enough to the mod creator. Anyone can point me to a mod or provide me with instructions that we could use to have the server convert an item with "LabelA" to use "LabelB" without disappearing from the server? At that point all the items from the mod would be gone and be full 100% vanilla including the labels.
Can I know which maps take priority from
getWorld():getMap()
I want to know which map is used in case of overwrites.
Or is this list random order.
What do you mean by label?
Was tryna sort out a server that my friends and I play in, it crashed and rollback the placement of certain floors. Thanks for the tip btw, found what i needed 
I was looking for a mod with a crashed plane model for a server, anyone knows any?
what map pack you recommend?I'm trying apex map mod but having crashes and black squares in places
I was using AIZ map pack but its not updated
Anyone have a resource on how to create a sandbox option? My mod is very simple and only has one value that the user might edit but I can't find anything.
Plenty mods create sandbox options. You can look at https://steamcommunity.com/sharedfiles/filedetails/?id=2781963981 for example.
Thanks
(dont know what channel is best for this)
https://github.com/Vam-Jam/wrench
Made a small program for server's to figure out if they need to restart because a mod has updated
- Small executable, designed to be used with bash/cronjobs
- Can send notifications to discord via webhooks if a mod updates (https://files.vamist.dev/sarcastic-wheat-komododragon/direct.png)
- Reads the workshop acf file passed to it, so it always knows what mods are currently used in the server
is there a way to get the value of an item's parameter through lua like "Insulation" and stuff like that?
can anyone help me figure this out lol, for some reason i got no issues at all when running my mods on my pc, but when i run them on my server i get this error.
things ive done: i have updated all the mods , deleted previous mods that gave the missing file error
nvm i disabled lua checksum its working now
I just use the media/lua folder's contents directly, either include as an external library or write a quick script to convert them to EmmyLua/Luanalysis doc comments and include that as an external library and you're gold 👍
does anybody have any idea about integrating sonoran cad into project zomboid?? the plugins are writting in .lua and i was just curious if it was possible
there's no HTTP API exposed to lua so you'd have to do it with some java mods
the SonoronCAD Lua is basically useless because it's for GTA5/FiveM
Can someone help me with map modding?
I'm having an issue with an expansion showing up as blacked out in the areas it's supposed to be on the map.
Well in theory serverside mod will work
But im still not sure about sending serverside info to clientside
If its possible sending image data would be possible
... if it does not get abused
I already see some abusing points but yeah
the bigger risk is the client, not the server
suprised people haven't made frank west or chuck greene hair/outfits tbh
Authentic Z would like to know your location.
wait fr?
FUCK IM AN IDIOT
instant install lmfao
outfit mods like this are fine to enable mid save right?
OH MY GOD IT HAS THE TRUE EYE CULT TOO
jittering with joy rn
Trying to make a mod that changes the speedometer from MPH to KPH and was wondering if there's any better way to do it other then directly editing 'U12.pack' under 'texturepacks.' It works how I have it set up now, but I feel like this'd cause compatibility issues or something considering how many things are packed in there together. Pretty new to modding so I've been mostly winging it so far
Tadaaa
https://steamcommunity.com/sharedfiles/filedetails/?id=2812458579 published my first mod
💪
Guys, anytips where I could find something about creating furniture containers (removable/placeable). Accordingly all the docs I only see custom clothing or item creation.
Wanna try on creating a Vendor machine for my server.
Is there a mod that reduces inventory lag, for having many items?
You could see if there's anything similar on the workshop and reverse engineer it? Maybe the pinned posts above can help ya?
yeh, ur probably right. I have to go with similar mods probably
does anyone know of a mod that enables me to add padding to cars?
metal not leather
this is new but works nicely https://steamcommunity.com/sharedfiles/filedetails/?id=2809595776
Oh I'm using that already
Idk if it helps when you somehow end up with 5000x the same item though
oh gotcha, it helps for most use cases
It is a very nice mod though yes
I decided to make conversions to save space and reduce lag
It was for money.
I used the seed back and briefcase assets to make a "bag of money" and "briefcase of money"
Nothing crazy
Basically that.
And that is "drained" when you purchase items
I like that idea
That'd be a better alternative to conjuring a bag/briefcase from the unfathomable void when use the packing recipe
(Has anyone ever wondered where the box comes from when you box nails or ammo?)
How bad on performance would a drainable item with 10000 units be?
Hey does anyone know how the current version of the only cure works? trying to cut my arm off with a saw and its not working
I don't know, I prefer to use They Knew. I like having two arms
Anyone got any mods that revamps player PVP
Are firearms b41 and brita compatible?
i’m pretty sure but there’s 0 reason to use both.
Ok
Is there a mod that allows me to edit my perks mid game? I choose speed demon and ii dont really like it.
While setting up Capsid i got this error: Process 'command 'C:\Program Files\Semeru\jdk-8.0.332.9-openj9\bin\java.exe'' finished with non-zero exit value 1 while running setupWorkspace (exactly at :zomboiVersion) from gradle, any idea how to fix it?
Also getting : ```Execution optimizations have been disabled for task ':zomboidVersion' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: 'C:\Users\Haqz\IdeaProjects\pz-map-mood\build\classes\zomboid'. Reason: Task ':zomboidVersion' uses this output of task ':zomboidClasses' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
Exception in thread "main" java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=zombie/core/Core offset=6```
Hi guys. Hope you are well.
I plan to develop a special zed with a little more 'intelligence'. It should be able to follow the player, give chase, also evaluate the current state of the player and react based on this.
Can you instruct me on where I can find the necessary documentation to start the development?
are there any mods that disable the whole dead zombies making you sick and you expload thing
by admin or debug you can change it
Quick question about modding, if I add any mods to a MP server after the world has already been started (not including map mods) will that then mess up the world or will I be able to add them in no problem?
Depends on the mods, sometimes authors explicitly state on their page that this is safe. If they didn't, then it might be a bad idea.
I think you need a later JDK version, possibly 15
When I change first letter of the name of my lua file from lowercase to uppercase, it throws me an error when loading the mod:
"java.lang.RuntimeException: attempted index: start of non-table: null"
At this line: "local HMFCheckFuel_start = HMFCheckFuel.start;"
Looks like it misses the reference to another mod, even though it's still there at the top of the file. And it only misses this specific reference, not the other two. With lowercase name it works fine, tried a few names.
Why would that happen?
Other references are to game files, so it might be specific to mods
Upgrading the Java version from 17.0.1 to 18 would not impact a modded instance? Just changing JDKs
ARGH
FUCKIN ERRORS
I can't even find out what's causing them
it's already at fuckin 23k
I don't even know what the errors are talking about
like
"ERROR: General , 1653529310105> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in ZLEDressZombie at KahluaUtil.fail line:82.
ERROR: General , 1653529310105> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: Object tried to call nil in ZLEDressZombie"
fuck does that mean???
like is it that hard to just SAY what mod is causing issues????
fuck it, just gonna assume it's a mod adding clothes or something
so brita's is gone
gonna see if that fixes it
oh
I found it
"ZombieLootExtendedDistributions.lua line # 1987"
over 1 million errors
whoops, misread it
150k
gets hard to read sometimes
👆 that's just gold
Is there a mod to turn off this icon in foraging mode?
Was trying to debug something and possibly ID a troublesome mod, does anyone know how PoisonPower actually works?
I think I will make a phone mod to send message with it.
For the rp and fun, I imagine make like a T9 phone. Use 9 key like the phone pad.
Do you think that a good idea or I just should lets them use the keyboard like a normal one ?
Hey, just finished working on my second mod with @dry heron !
didn't know where else to post about this so ill just post the mods ive made in here
https://steamcommunity.com/sharedfiles/filedetails/?id=2717792692
https://steamcommunity.com/sharedfiles/filedetails/?id=2812828771
Switching to JDK 18 fixed, thanks. The Capsid docs are not well perserved 😅
That’s a awesome mod
awh thanks :)
hello, sorry for bothering someone, does anyone have a guide, or program or someone knows how to put new items, for example: food, objects etc, it's that I want to create a mod but I can't find anything that I want to say hi to.
Agreed
@candid light I spent an unreasonable amount of time adding support for... a lot of mods out there for your Vehicle Zones, do you want the files?
Is there a method to organize recipes other than in alphabetical order?
oh, same goes to you, @craggy furnace @sinful vessel
I still gotta do your kentucky car overhaul but yeah, idk if you wanna leave it to gads or do it on your end (or both)
nice, we are going to do our own vehicle zones but idk
I would suggest that you create addons for the VehZones. (assuming you don't need extra classes)
The extra classes are useful. Though I can see some modders wanting a few more.
Tread's mil zones are handled in a pretty smart way that don't necessarily require to bake in support. But baking in support from the start is p nice
ain't done yet (since I still need to do the SCVP) but ye, have a looksie
yeah, a separate submod was always the idea due to how major of a change it is
this is good stuff
Feel free to use it, I'm not really attached to it. The spawns not being used triggered me, so I made the mod 
My end goal is to completely revamp all spawn chances, but unless I somehow get a convenient full SpawnList, it's gonna take me about 550 years
(more info under #modeling message and below)
this will be mad helpful as i am going to be zoning louisville cops into the city proper and militarizing the border proper with some vehicles on the to-do possibly
not to mention survivalists
Cyt suggested doing it in an automated manner which would be huge, but until then, I'll have to do it by hand. Problem is that it requires the player to have most (if not all) mods, in order to make the most of it, since these numbers always have to be put in in context to other vehicles 
sadly I don't really have the skills for that (referring to the automated method)
the best way to "automate" would be with NPC events
rather than having something that magically appears you can just spawn them dynamically and contextually
this will take a bit but i am very confident this is the best way forward
Yeah, most likely tbh.
The current problem is that if you have a spawn rate of 1 (for a rare vehicle) is still a lot when you compare it to maybe 5 other cars with a rate of 5. That single point adds up really quick when you iterate 1000x over.
So my current plan is to tweak the spawnChance from running 1-10 to run 1-100ish instead. I planned to go with 1-1000 but I fear that it might make super rare vehicles too rare. I'm still trying to run the numbers through my head atm
But doing this for FRU, FHQ, KI5, your vehicles and many others (bearing in mind that it all needs to be contextual) is gonna be rough 
i wouldnt fret over this as not every vehicle needs to specifically exist per se
if its a vehicle in a pack of say 20 hypothetically then having one missing thats out of place/rare isnt that much of a loss
Yeah. I think that if I require FRU, FHQ and maybe the 1993 American Pack, it'll have enough spawn pool dilution to not create problems, even if you end up not having a mod here or there
exactly, the majority wont give a shit anyways since its only going to cause an issue if you cant find something that logically should be there
then again, its your mod and you shouldnt give too much of a shit
I wonder if there's a way to get the full spawnList of all loaded mods. Otherwise I'll just have to go one by one and condense it down by hand
i am not too up to date with lua atm to know, if i find a way ill throw it to you

You could also try checking to see whether the vehicle scripts exists to evaluate whether to add the vehicle to the spawn tables, instead of using loaded mods?
local vehicle = ScriptManager.instance:getVehicle("Base.SOME_MOD_VEHICLE") or nil
if vehicle then
-- add to spawn tables
end
caveat: I haven't used ScriptManager.instance:getVehicle but it's in the java.
I'm way too smoothbrained for that stuff, sadly. I'm pretty sure you could do a pretty elegant solution pretty easily by using certain parameters which could be baked into mods, as well as foregoing the whole loaded mods thing, but that's far, far beyond my skill. I can barely read code and sort of understand what's going on.
I tried reading your Vehicle Scenes script and it flew right over my head 
i feel like 1-100 would be nice, cause it would be percentage then
Yeah, that's some old shit, ahahaha, could be rewritten a lot better nowadays,
Basically what my example does, is that instead of asking "Is this mod loaded?" to know whether to add vehicles to the tables, it instead asks "Does this vehicle exist?" to know whether to add the vehicle to the table.
ie it basically "cuts out all the middlemen" and allows for foregoing the whole loaded mods thing.
it's misleading, sadly.
There used to be a time where the spawnChance had to be calculated by class and the total had to be 100. Here's the problem, though. What if you have 101 vehicles? What about 1000? Assuming you don't want to deal with rounding errors due to decimals, ofc.
So now, every vehicle just has a certain spawnChance. To make it simple to understand, imagine that every number represents a ticket. Every vehicle puts in X tickets into the hat, the game then calculates whether it should spawn a vehicle and if it does spawn one, it then checks which it should spawn, it randomly chooses one of these tickets.
The difference here is that it isn't a chance of 100. you could have 100 cars with a spawnChance of 500 each, then the game would choose one out of these 50.000 tickets.
I'm terrified now.
The game should output all the vehicle spawn chances as percentages to console shortly after game start anyways.
Here's the other side of the shtick, though
If you have a low amount of vehicles and a low amount of tickets given out, the relative chance of a rare vehicle being picked is higher.
So you want to create a situation where you either dilute the spawn pool (by adding more vehicles) or by creating more tickets artificially (by giving vehicles a higher spawnChance).. or both, so rare vehicles remain rare
wasn't aware of that, actually 
Might have to be in debug mode?
only recently got into modding pz, but with every mod being plaintext, it's pretty easy to understand
I'd have to look into debug mode more. It's quite overwhelming at first. I'm good at tweaking things, bad at figuring them out from 0 
Here's an example from console
LOG : Lua , 1653574679178> Vehicle spawn rate:
LOG : Lua , 1653574679179> parkingstall: Base.CarNormal 20.0%
LOG : Lua , 1653574679179> parkingstall: Base.SmallCar 15.0%
LOG : Lua , 1653574679179> parkingstall: Base.SmallCar02 15.0%
LOG : Lua , 1653574679179> parkingstall: Base.CarTaxi 5.0%
LOG : Lua , 1653574679179> parkingstall: Base.CarTaxi2 5.0%
LOG : Lua , 1653574679180> parkingstall: Base.PickUpTruck 5.0%
LOG : Lua , 1653574679180> parkingstall: Base.PickUpVan 5.0%
LOG : Lua , 1653574679180> parkingstall: Base.CarStationWagon 5.0%
LOG : Lua , 1653574679180> parkingstall: Base.CarStationWagon2 5.0%
LOG : Lua , 1653574679180> parkingstall: Base.VanSeats 5.0%
LOG : Lua , 1653574679180> parkingstall: Base.Van 5.0%
LOG : Lua , 1653574679180> parkingstall: Base.StepVan 5.0%
LOG : Lua , 1653574679180> parkingstall: Base.ModernCar 3.0%
LOG : Lua , 1653574679180> parkingstall: Base.ModernCar02 2.0%
I'm mostly doing it for the group I'm playing with. But if it exists, I might as well release what I have to the broader community. If nothing else, other people can at least build on it
oo, that's pretty neat
The dark side of that is this is right after that is this:
WARN : General , 1653574679196> VehicleType.initNormal> vehicle type "Base.PickUpTruckLightsSmashedRight" isn't in VehicleZoneDistribution
Which is itself innocuous, it's just "developer nagging", in case they miss something, but that vehicle is only spawned for crash events so shouldn't be in the tables.
But people trying to figure out why their server is bricked or their 200 mod behomoth is crashing latch onto those messages like crazy and think that's the clue to solving their issues.
Yeah, I'm currently facing an error each time I fire a gun and I still haven't been able to hunt it down, even after like a week lol
haven't really been able to find much on it
do you have a stack trace?
I'll get you one, sec
just don't ask which mods I'm running unless you're prepared to read a bible's worth of text 
I've been trying to disable all the mods I thought could've caused it, but no dice. And a binary mod disabling is gonna be pretty rough with approx 300 mods/modlets
All I can say is that it has only been happening after the switch to .71 from 68. Running Brita's, but I didn't really find any people Ree'ing on the mod page, so perhaps it's something else.
4 errors, right at the bottom
All right when firing a shot
are there any mods to allow turning off electrical appliances to prevent gen fuel use? is it even possible? cannot find anything on google and such a feature would be handy
Are translations done manually/with help from others (like in #translations or similar)? I couldn't find any autogen or tutorial in the wiki.
Is there a way to organize recipes other than alphabetically?
sure, randomly like in the scripts/recipes.txt file 🤣
I think with filtering and such it kind of reduces the need to be super specific about how they're arranged in the file
I mean in the ingame recipe browser. Filtering might work, I guess
Hello!
Is there any place in the debug where I could see the player animations?
In debug panel - animation viewer (I think name like that)
Will check that!! thanks!!
Well, I don't really know where that is, thougth it was inside F11 - Options but I think I'm wrong. Where is the debug panel?
Nvm found it
How do i force a sound to play in a recipe?
Guys, is it possible to edit and add new zombie zones to vanilla map?
@drifting ore you around?
@faint jewel did you ever end up releasing your reefer trailer?
Reefers would be amazing!
On a server I play with a small community, I am essentially a truck driver transporting things across the map to various groups. A reefer would be great for food items.
Sound: (SoundName),
I tried that and the sound doesnt play in game Sadge
Something to do with it cant find the file
this is my old mod script
recipe Sell Silver Ingot
{
SilverIngot,
Result:100Zed=5,
Time:30.0,
keep TradingStation,
Sound:Ching,
CanBeDoneFromFloor:TRUE,
Category:Sell,
}
the sound must be in ogg or wav format.
Oh sweet, yeah that'd be great. I actually planned on dropping an update for the mod soon, so that works out nicely
I'll drop the files that I have so far when I crawl out of my bed. They're not all fully complete but they should cover it about 80% of the way
It is surprising that zomboid is actually pretty open for adding custom render stuff
since zomboid does not supports custom fonts (still don't know why)
I had to assemble improvised bitmap font rendering code
which is unfortunate
That's pretty cool. At first I thought It was meant to be a range finder telling you how far you are aiming. Kind of a strange place to put a bullet count imo.
It is a nightmare to figure out where to put any things on screen in this game
since there is no standardized position
Also limitation applies: There is no lua event related with character render
so there is no way to add models or details when the model becomes texture-ized
technically
if any binding is avilable
we can make shit like attachment visible
even better, if any binding is available for model rendering (with model attachment access)
you can even add some bullshits like functional laser
or volumetric flashlight cone (if there is any depth based shader - which is highly unlikely)
also i see "a thread" is allocated to lua
but multithreading (or concurrent) is bitch thing to do i guess
finally, a gun mod that isnt trying to dupe tarkov or just fill the zone with stuff
this is great shit
anyone?
If it does not appear in the workshop, it is indeed dead
never heard of the mod, so I wouldn't know. But it might be taken down temporarily, who knows
😢
does anyone know why my weapon is upsidedown
Wow! Can you share it?
can still get this if you need it, just saw your msg
Probably you're in australia
i got it i just had to restart the game
Heyhey people, is there any way of changing the ingame skin of chars? with any effect or alike, i know for example shaving has a model effect change, but i'm not that deep into zomboid modding yet (please @ me without remorse 😛 )
I'm one stop closer to finishing my trading mod.
thanks, I have it, but I saw it was removed so no updates 😢
yea :( glad you got it tho! you can usually download workshop mods taken down with steam console if it happens gain
really? steamcmd?
i tried once and it said the ID doesn't exist anymore
make sense
i don't know what i'am doing.
are there mods for multiplayer which mute surprise sound? or is it possible to remove the sounds on server's side?
Maybe it's just me but this is a godsend for someone like me that gets tunnel vision in hectic situations
Heyyo! Hopefully this is the correct place to ask, but is anyone taking mod commissions? It would involve some heavy scripting, changing how dead zombie bodies work/adding an effect to them, and making a new item with it,
And the 2nd one being a new economy system I can go into detail via dm.
I have a question.
If text appears on the screen like in this mod: https://steamcommunity.com/sharedfiles/filedetails/?id=2398253681&searchtext=conditional+speech
Is there a built in way to add sound to it?
I wanted to add some voiceover work of my own, but I'm not sure if it's even possible.
What mod is that from
What are considered some of the better QoL mods?
YOOOOOO hahaha
Hey guys, I wanted to know if there's a way to increase the length of a VHS
I would like for them to last a lot longer
(custom ones)
a bit hey
Does in-game engine power of cars equivalent to some amount of real horse power?
given that I've seen a VW bus with 500hp, I'd side with no, though I could be wrong
@willow estuary What do you think about this? 
#pz_b42_chat message
#pz_b42_chat message
#pz_b42_chat message
You can also find and follow me on:
- Flickr: http://www.flickr.com/photos/19bozzy92/
- Facebook: https://www.facebook.com/19Bozzy92YT
- Google+: https://plus.google.com/100567781241722617164/posts
- Instagram: https://www.instagram.com/ste19bozzy92/
I don't know why but I'm ust in love with the crazy and epic builds ike the one you saw in th...

y tho
this thing is fucken speeeeeed
I'll think of a reason when it comes time to report in on it
lul
heyo!
Im planing on a coop run with my friends but given that we are all "veterans" in this game i would like to make it an absolute nightmare in terms of difficulty.
We are max 8 people and i am looking for some mods that make the game hard, realistic and punishing without making it tedious
anyone got some nice mod combinations for me?
Pref would be version 41.71 mods
Is there a way to stop weapons that are big from warping
That’s so epic
when I call an instance method on a Java object, does Kahlua need me use : to ensure self is properly set or...?
does it just like, figure it out?
in other words, how is the transition between self in Lua and this in Java handled: by me or by Kahlua?
piss to get good crosshair texture
that looks really good
is that your mod?
Hey all I'm doing a simple mod to change a generator's max condition. Trying to add sandbox options to it, but can't seem to make the mod work.
If i leave the value static and just do this it works
But if I try to make it conditional based on sandbox options it just defaults to 100 ingame
have you tried changing the 100 line to something else?
because my first guess is that none of those lines are executing
so change the first case, and if you still get the default, something is wrong with the sandbox var you're accessing
Yep. I can change ConditionMax = 100 to any value, 200, 300 etc and it works. But the minute I involved sandbox options it defaults to 100
so option always == 1
I haven't tried changing option 1 yet. But I have tried numerous ways of getting user input from sandbox vars and it doesn't work
For instance I also tried this, and entered 200 on the sandbox options screen to test, it defaults to 100
when does your code execute
Oh, sorry. I'm super new. Let me just post the whole thing
Ideally it should be running when a world is generated, but here's the only .lua file
I've also got sandbox-options and translate files set up
if what you're saying is correct, that code will execute exactly once, when lua gets loaded
But why is it not using sandbox variables? When I leave it like so, with the value hardcoded to 200, in-game a generator shows as having 200 condition. When I use a value pulled over from sandbox vars it always defaults :/
Here's the sandbox-options.txt
it sounds to me like the order of execution is:
- game loads, lua executes, value is 100
- you set the sandbox variable
- lua has already executed, so nothing happens
I made a bubonic plague retexture that makes the fingers of zombies necrotic and adds necrotic boils all over their body, do you think its worth uploading?
sometimes sandboxvars are weird during load
Hmm.. so there's no way to do this concretely? I'll just have to reupload the mod with different ConditionMax values then, I suppose :/
That's what I was afraid of, that's a whole nother level of depth. Currently the mod is like 10 lines lol
mm, also, I'm fairly sure each individual IsoGenerator instance has its own, separate ConditionMax
ah but you're setting the mod data, that'll work for anything spawned in subsequently
Yep I had no problems with the mod initially. Just doubles condition to 200, every gen I spawned looked correct. It's when I introduce anything else that it starts defaulting to 100
the thing is, for it to work properly, if someone changes the sandbox var while the game is running, you need to not only change the moddata for future spawns (although, only admins are going to be spawning generators at that point) - but also change every IsoGenerator already on the map
I'd be fine with the mod requiring a wipe to work properly, and notifying users of that in the mod's description
you would also need some code that runs whenever they go and change the sandbox var, which, right now you just run once at loadtime
maybe you can get away with putting it in Events.OnPreMapLoad if you're happy for it to be at init - but the sandbox var still needs to have been customised before this
Primary reason for developing this mod was to use it on my own server so that should be fine
Still have a lot of reading to do because I don't even know where to start with events
Thanks for the help
they're just callbacks - you pass in a function and the game takes care of executing it at the appropriate point in time
Excuse the dumb/spaghetti code, something like this?
yup
Would I add Events.OnPreMapLoad.Add(SetGenConditionMax) to the bottom is that wrong?
huh?
Do I need to add that function to OnPreMapLoad as well?
no, just whichever one works
Ah ok. Testing time 👍
Sort of like this?
Gotcha, item and name are now local vars
also, I would go back to the original, simpler method of simply concatenating the sandboxvar straight onto the string, but worry about refactoring it once it works
Should I try and sanitize the input later for best practices or does PZ kinda handle that with default min/max values?
usually, the answer is yes, but since this is something the server admin sets, it's on them if they bugger up the config
would it be possible to edit a britas item to be a different category
im wanting to attach a non-accessory gasmask to my backpack that needs the mask to be an accessory to attach
or is that not how it works
this is the backpack mod i use
nevermind
Just tried the mod with either of those Events in mind, still not working. I'll just have to play with it
Is there a lua event that triggers when the name of a player is appearing on screen? Or at least a way to get players' X/Y coord relative to screen. Trying to display something beside player's name like faction or admin do.
AFAIK, the text displayed above the player is done in Java
yeah, it's in IsoGameCharacter.updateUserName()
When I call an instance method on a Java object, does Kahlua need me use : to ensure self is properly set or...? Does it just like, figure it out?
In other words, how is the transition between self in Lua and this in Java handled: by me or by Kahlua?
Alright folks, need assistance.
I have a couple custom posters working, to the point where I can craft them and place them on the walls. I ended up following Aza's tutorial on it however...
...I cannot figure out how to make it so you craft one, and can place it on either North or West wall.
I think depends on method. For create some new java object need use . (Like SomeClass.new()). For other methods usually used : (like array:size())
ye
perfect, thank you so much 🙂
class method = :, static method = .
some exceptions may apply
Also, if you need more info about this one
you may check about the term metatable of lua
which is the reason why this self and this thing is being a thing.
my question was really more about how Kahlua treats self in terms of Java's this and whether I need to be explicit about passing it
depends on the context
but mostly refers the class method's instance
unless you do the nested class method
or overriding some __index table
to screw with the lua's metatable
the lesson is, play by the book
yeah I'm trying, the mod I've adopted as my learning project has some... interesting practices 😄
but I've had the Lua reference open all day every day, as well as the PZ wiki on modding, plus some other assistance
I usually try to write "good code" 😄
You need to remember some of Lua native library is not available due to Kahlua author's policy
so if you need to see what lua can do
right, that's where the questions start pouring in 😭
you need to decompile the PZ code
and see what's open for lua
and what's the global methods
like things defined in the LuaManager.java
yep, not only did I do that, but to make it easy to use, I wrote doc comment implementations for everything used 🙂
document when the code is finalized.
i know its kinda dicky to say without knowing how many you've worked on this industry but that's my personal experience so far
since i don't know PZ so well
so i tend to change things so often
that's why i do the documentation in the late state for this one
less work, better job
well the problem is that when you want to use a function from Java, since it's in a different language and the language support is... not great, you kind of need something to reference, e.g.:
--- Java zombie.characters.IsoPlayer
---@class IsoPlayer: IsoLivingCharacter
---@field public getNutrition fun(self: IsoPlayer): Nutrition
---@field public getPlayerNum fun(self: IsoPlayer): number
---@field public isLocalPlayer fun(self: IsoPlayer): boolean
---@field public getJoypadBind fun(self: IsoPlayer): number
I have that for everything that's called from Lua, so that I get IntelliSense
tbh that's not our job but yeah
haha tell me about it
i usually localize things
my very first question here was "is there a tool that does this" and the resounding answer was "NO" 🤣
me too!
since any kind of interface is "the" overhead
my trick is make a table
and put everything in there
like a module (which is everything suppose to be)
my rule is if I access it 2x or more, I put it in my main table lol yeah same 🙂
nice
but when i get lazy
i say fuck this and just go brr on global table
expecting the game to break
It's kinda sad that
there is a lot of things can be done
but some of neat things is not available
due to lack of lua events
such as "rendering additional model before the model sprite get rendered and registered"
or "when rendering the model"
You can suggest this ideas for events on forum 🙂
mind if i know where to put that thing?
choosing a UI mod was a bad choice lol
UI is the pain in any game
Yeah
there's tons of stuff about "how to add a cool hat" or "how to make weapon damage 10x"
there's nothing about "how to properly inherit from ISWhateverTheHeck" so you don't litter the global space with a bunch of copies
but I'm figuring it out
yeah your stuff you've been putting here is awesome, very boundary-pushing 🙂
great imagination tbh, keep it up
after doing this i get the reason behind why PZ modding scene is somewhat "stale" in terms of uniqueness of the mod
a lot of good methods are hidden behind
@white crag and @tame mulch you both seem rather knowledgeable.. any chance you could point me in the right direction with the issue I'm having, posted a bit above?
its a bug. there is nothing we can do about it right now
A... bug? With creating a mod?
If will be good ideas for mods and request what need to add for mod - later we can add this.
Btw do mods by hacks if fun 😄
I can write some list of suggestions but I don't see any place to post them
maybe
i typed sugestion
so that's why
You set for item sprite? Only 1?
So, I followed Aza's tutorial on making posters, and I have one working that I can craft in-game (image below). I have no idea how to make it so that the poster can be rotated to the other wall for display.
Bear in mind I'm completely new to creating mods for PZ.
do you have four directional sprites?
I have 2-directions...
You checked how work current ingame posters?
Like I said, I followed a tutorial by Aza on it.
And in Aza mods posters can rotate or not?
I suppose that's a good question (I'm not sure), but her tut also seems to be the only semi-recent one, and the only poster mod I know of.
Kinda why I'm here lolz... I'm not asking for anyone to do the work for me, but I've spent like 3 hours on this, and I'm kinda looking for someone that might be able to point me in the right direction haha
see, I should have picked posters or hats
I'm at 60+ hours just understanding the UI 🤣
Try pickup default poster and try rotate it when place. If it not rotate - then will be harder to do it. If can - then need check how it works in default game
the above was actually a specific request from a member of a community server I run. I didn't even pick posters out of convenience lolz
so this is where I think a lot of folks get lost
scripts is one place, where else?
Heh, but now you can do UI 😄
What mod you do?
I'm trying to adopt Minimal Display Bars
I have.. no idea what this means.
it's been dead for yonks now
PR piling up on GitHub (clean ones too), and problems reported on Steam page
Try find in new game painting, pick up it, and try rotate when place it
Keep in mind I'm coming from years worth of making mods for SoD2 which is in .uasset files, and writing apps in C#
Pretend I'm like 5... lolz
Like the default paintings in-game? Yeah they can be.
I thought so, so now what... what dictates that action?
Hmmm. How you set sprite to item?
AFAIR at least... I'll confirm that in a second
This part, I'm not sure what you mean..
Can you send me tutorial or your code?
probably "How are you telling the game 'this item description belongs to this sprite'?"
It's in three parts:
https://www.youtube.com/watch?v=YGi5E86fDeU
https://www.youtube.com/watch?v=8P9h4Wo30oY
https://www.youtube.com/watch?v=z96sAiJFiiA
I'll DM my files to you as well.
The thing I'm stuck with is the tutorial itself, doesn't go over rotating them.
I presume there's something like this in your mod's media\scripts:
item Mov_MapUSA
{
Type = Moveable,
Icon = default,
Weight = 0.5,
DisplayName = Moveable,
WorldObjectSprite = location_community_school_01_22,
}
so you can link the sprite to the item
Pretty much
module ZGal88Posters
{
item InvaderZim1
{
Weight = 0.2,
Type = Moveable,
WorldObjectSprite = zgal88_posters_0,
DisplayName = Invader Zim Poster 1,
Icon = Poster,
}
recipe Invader Zim Poster 1
{
keep Pencil,
SheetPaper2=1,
Result:InvaderZim1,
}
}
cute, Invader Zim is 👍
Yus. Had one person mention it, and then like 4 others want it as well LMAO
ok so there you're missing the sprite yeah?
WorldObjectSprite
oh never mind
I am blind
The sprite isn't "missing" per-se
It crafts and places on wall fine.
Shows up and everything (posted an image of it above)
<#mod_development message>
so you did, that'll teach me to eat dinner 😂

Yea, the issue is moreso... how do I tell the game, that the North and West images are for the same object, depending on the direction it's facing?
Correction: South and East*
Kahlua
waves hands mysteriously
I have idea how to fix it. You can add recipe with name Rotate, that will swap item on other item with other sprite 😄
😮
I have no clue how to do that haha
wait the actual fix is to make it into... a recipe??
I don't know how work vanilla paintings, but this will work like temp solution
Yeah, I will check again, but in item script you can't set second tile
I think it worked in another way
looks like ISMoveablesAction.lua has the code for it
Oh wait... I think I might understand the recipe...
media\lua\client\Moveables\ISMoveablesAction.lua
yeah that's a clever stopgap, even if it's a bit... clunky 😄
Something like:
recipe Rotate Zim Poster South
{
InvaderZim1=1,
Result:InvaderZim2,
}
recipe Rotate Zim Poster East
{
InvaderZim2=1,
Result:InvaderZim1,
}
obviously you'd like to be able to just click and drag or press R/Shift+R
?
yeah that seems like exactly what Aiteron was saying
That's... a very hacky way to do it, but it should work haha
I'll go try that method and see if I can get it working properly :3
Will report back either way
best of luck 🙂
That... worked LMAO
Thanks @tame mulch @native shore
I'll go do up the other 5 posters the same way, but it looks like that'll be the solution, for now haha
mmm
release PLS
Nice work! Do you use lua or java to do that ?
lua
well I let you finish it and I will take a look at what you did, that could help me for something else
@drifting ore you can check in 10 mintues
I hate to be that guy, but it would be amazing if there was a mod that allowed you to remove rust off cars. I know Paint Your Ride lets you do that, but it doesn't work in multiplayer
can i share mod gameplay here?
i hope it can help others
Shout out to mod owners!
Paint Your Ride: https://steamcommunity.com/sharedfiles/filedetails/?id=2281256511
ZuperCart - Carts & Trolleys: https://steamcommunity.com/sharedfiles/filedetails/?id=2478768005
Vehicle Repair Overhaul: https://steamcommunity.com/sharedfiles/filedetails/?id=2757712197
Vanilla Vehicle Enhancer: https://steamcommunity.com...
paint your ride mod
Run if you need to survive, don't be a hero die for small mistake move! :)
Dear owner undead survivor, i borrow your mod image XD
Credit to mod owner!
Undead Survivor: https://steamcommunity.com/sharedfiles/filedetails/?id=2713921292
Sound Direction Indicator: https://steamcommunity.com/sharedfiles/filedetails/?id=2560478285
undead survivor
I’m just wondering if it’s technically possible to add full parkour mechanics to pz, I mean the ability to climb walls, roof jumps etc
it is
Why might the in-game debugger ignore my election to "Break On Error" in the case of an error? I know there was an error because the log shows it, but it didn't break and highlight so I could inspect the state... any ideas?
happens with minor bug, don't remember which one
tried to call a non-function
doesn't seem minor to me, and considering the line it points out is a for...in (and not the subsequent line), I'd consider it worth at least some attention from the person debugging 😄
My favourite is when debugger gets error itself
I mean, in order to effectively troubleshoot it, I'd have to iterate over the keys and values in the table, getting us back to the same problem lol
double click one of the items and get a bunch of new errors
😭
who wrote this thing again, lemmy? I remember seeing a forum post from a long time ago...
Okay so since the debugger isn't cut out for the task - which, Early Access, fine no problem - I am in a bit of a catch 22 here. I am managing persistence via the aptly named persistence module (https://github.com/hipe/lua-table-persistence), gently modified. If I save a table of config options as the table, e.g., local myCoolTable = {--table stuff here} and then return the table at the end of the saved file (return myCoolTable), I can either return the result of that as raw or as a call (result vs. result()).
If I return it as a raw result, everyone is happy until the aforementioned line where I'm iterating, which is likely what's causing that problem; however, if I return it as a call, it says the table has no __call metatable set. Damned if I do, damned if I don't.
Would it be better to just switch to a more modern storage format like JSON and parse in and out, or continue to troubleshoot this built-in language feature of being able to load and store chunks? Is there some Kahlua limitation I'm missing?
Do Ridiculously Rare and EHE work with CDDA?
EHE will
It will? I figured since CDDA starts you months into the apocalypse the whole start system with EHE just wouldn't work.
Also the fact you cant disable the vanilla heli
the vanilla helicopter is completely irrelevant
we recommend it off because its annoying as hell and people will easily confuse it
we have a check that mostly works to disable it anyways on game start
ah. what about the whole start date? does that matter?
i am writing a trait mod and i wanted to know how i could allow the player to sleep in almost any circumstances aside from extreme ones
since you cant edit those settings with CDDA
not sure, but you may get earlier helicopters
I've been searching the place that handles rendering the player's name / faction name above people's head. Anybody knows where that would be?
I feel like I'm going crazy trying to get a WorldStaticModel to show up. I think my code looks like every other example I have seen, the model in hand works fine, but it just doesn't appear at all when placed on the ground.
item Moonshine
{
DisplayName = Moonshine Jug,
DisplayCategory = Food,
Type = Food,
Weight = 1.0,
Icon = MoonshineJug,
AlcoholPower = 5,
Alcoholic = TRUE,
CantBeFrozen = TRUE,
EatType = Bourbon,
Packaged = TRUE,
ReplaceOnUse = MoonshineEmpty,
HungerChange = -21,
ThirstChange = -20,
UnhappyChange = -20,
Calories = 1800,
Carbohydrates = 0,
Lipids = 0,
Proteins = 0,
CustomContextMenu = Drink,
CustomEatSound = DrinkingFromBottleGlass,
StaticModel = MoonshineJug,
WorldStaticModel = MoonshineJug_Ground,
Tags = Liquor,
}
model MoonshineJug
{
mesh = MoonshineJug,
texture = MoonshineJug,
scale = 0.4,
}
model MoonshineJug_Ground
{
mesh = WorldItems/MoonshineJug,
texture = MoonshineJug,
scale = 0.4,
}
The models referenced are the same, just in different folders. Is there supposed to be a difference between the hand model and the ground model? I've tried adjust scale and such, it just won't appear at all.
EDIT: I partially fixed this, turns out the model in Blender also has to be at 0,0,0. It now appears in the placement preview at least. For some reason it only appears on the ground if I rotate it even a little bit, or drop it instead of place.
@craggy furnace Wait im confused. If you dont have "Continue Scheduling Forever" will that mean that no more helicopters spawn after the end date?
basically
is it possible to mod a fireplace so you can craft one?
does anyone know of a mod that allows this?
More Builds
zombie.core.SpriteRenderer has drawModel(ModelManager.ModelSlot model) :o
ah shit thanks, just tested it and its right there
Finally figured out the problem with my code. Sandbox option works now. Thanks for the help earlier @calm depot!! https://steamcommunity.com/sharedfiles/filedetails/?id=2810514843
Is it possible to make all furnitures, walls, doors & etc. to regenerate damage dealt to them?
Active repair - Regenerate damage while being attacked.
Passive repair - Regenerate when not being attacked.
Regen amount per tick
Number of Ticks to Regen
is there a reason why only of the hammers can remove barricades
hardcoded that way right now
wdym, they removed tag from script
and only one hammer can unbarricade now
the options in the context menu (right click) tend to be hardcoded with things like tool checks etc. The tags option might not be used for barricades
took a quick look at code and it does check for tag
if not self.character:hasEquippedTag("Hammer") then
but hasRemoveBarricadeTool would be false ?
an item can have multiple tags, so any item you mod into the game can be a hammer, amongst whatever else you tag it as
my question is why they removed the tag from some of vanilla hammers. 3 hammers have hammer tag, only 1 has removebarricade tag
the claw hammer, right?
I guess so yeah
Thing is, I usually grab the ball peen hammer and now I have to find the other one.
I would imagine it was changed for realism reasons
a ball-peen hammer is not going to be the tool of choice to pry a plank off
by which I mean, it would be nigh impossible to do IRL
Daily icon work.
Made a new box for the Allsorts candy.
Gonna do all the rest of the new sweets too.
guys how make a firearms fire burst mode in the game.
Hello modders, would anyone know how to change the label of an item without causing it to disappear from the game world? For Example if I have a mod with:
item ModdedCandle
{
DisplayCategory = LightSource,
Weight = 0.4,
Type = Drainable,
UseDelta = 0,
DisplayName = Candle,
Icon = ModCandle,
cantBeConsolided = TRUE,
StaticModel = ModCandle,
WorldStaticModel = ModCandleGround,
}
And I want to change it to a vanilla candle:
item Candle
{
DisplayCategory = LightSource,
Weight = 0.2,
Type = Drainable,
UseDelta = 0,
DisplayName = Candle,
Icon = Candle,
cantBeConsolided = TRUE,
StaticModel = Candle,
WorldStaticModel = CandleGround,
}
without causing the ModdedCandle Item to disappear.
I can already change it to and use vanilla stats but I'm trying to also remove the reference to the label (without causing the item to disappear):
item ModdedCandle
{
DisplayCategory = LightSource,
Weight = 0.2,
Type = Drainable,
UseDelta = 0,
DisplayName = Candle,
Icon = Candle,
cantBeConsolided = TRUE,
StaticModel = Candle,
WorldStaticModel = CandleGround,
}
I'm trying to do that to remove a mod from our server pack and have no reference to the Labels from the original mods, since although we removed all the codes from our server pack and converted the item, the mod creator is not satisfied by that since we are still using the label names from his mod.
I'm trying to find a way to change the label without causing our players to lose the equivalent vanilla items (plus those spawned in the game world already) and not having to manually do it through an admin account (would be too much work).
We thought of a method that we will try by adding to the ModdedCandle:
DaysTotallyRotten = 0,
ReplaceOnRotten = Candle,
The above methods work, you just need to include:
imports
{
Base
}
At the top. that way if you ever decide to change the way you use a server from linking directly to the workshop to using a server pack and don't have permission from the mod author to use their mods in your server pack you can convert their items to vanilla items before you remove their mod packs so that your players and spawn containers don't lose everything (assuming you want to keep corresponding vanilla items.
You will need to teleport to each cell on the maps to ensure the rotten code gets triggered. There is a probably an even more efficient way to do it by modifying the item list on the server but the above method works and you can get rid of the conversion mod as well once you are done converting the item to vanilla.
Method above limited to Food Type.
I have yet to see a armored vehicle In a mod have practically indestructible doors or frame.
Is if even possible?
hey vhere to dovnland vorkshop mods
the vebsite I use is dovn
and there is nothing I could do
Stean Vorkshop
Don't mock his vords
Hey guys, Im new to lua, do any of you know how I can remove a two handed weapon from the players hands? The weapon always stays in the secondary hand even when the item is dropped on the ground for some reason
dont be rvde hes jvst trying to be fvnny abovt victor the vindov vashver
Does anyone know how to get the Expanded Helicopter Events working in multiplayer?
Seems impossible
Lol... Looks like I had "Better cubes" and "Better video games" mods, that allowed to solve Rubik's cube and play that video game you can find in various places to fight boredom and depression. Those mods literally disappeared from workshop, their pages are no more...
Anyone has any news about them? What even happened?
I need some help or advice. So my mod has addon capabilities but I feel like my instructions aren't quite clear enough for people to figure out. Can somebody look over my work and tell me if it's good or how I can make it better?
I would ideally like to make it super easy to digest but am about as much of a teacher as I am a modder...
@ or DM me if you don't mind helping me out
instead of directly offering to help, because I feel my bias would be really academic and maybe even useless, how about considering similar mods (even in other games) that have done that well?
I've tried but true music is the only one I can thing of but mine and theirs are quite different
I'm not aware of any other mods that allow for addon content
especially one that is similar to mine
well, in RimWorld, for example, there is a modular mod collectively known as "Vanilla Expanded", and while most of the addons are by the main author, several others have contributed their own
Fallout 4 has Sim Settlements which allows for tons of new content to be created by the community and even submitted to a user collection, and has extensible systems, etc.
in Project Zomboid, I think Mod Options could be considered, though really that's just configuring your mod to work with that one but the idea is similar in that you're using something that exists and adding your own "hook" so-to-speak to make them work together; the documentation is fairly well done, and has been simplified to the bare minimum, then expanded upon in a Discussion
I'm not sure if that will really help me though. I hardly even know what makes my mod tick since I'm not much of a coder and I got a lot of help. I know how to add to what is there but if asked to work it all backwards and explain how I did it I kind of lack the experience to get it down properly. The way I went about leaving instructions the best way I could was leaving "fill ins" in the code itself but I feel like that might not be inherently obvious to most people.
I personally think that's very clear, but will you just paste that screenshot on the mod's Workshop page? Probably not right? You'd at least give some steps or something for people like you who are trying this out for their first time.
at a minimum you need to document for me the answer to "how do?" 😄
that's what I have
it's not much and that's the problem. I'm not sure how to put it down into documentation
Where are the instructions?
that's exactly it. the instructions are IN the code becuase I don't really know how to write the instructions...
does that make sense?
I basically left them in comments in each file
one person managed to figure it out but they also cross referenced my mod
- Download [this](linky go here) file.
- Where it says DO THING HERE, do the thing.
2.a. Item is your item, look at the game files for examples
2.b. GUID is a magic code that somehow makes things work correctly, you can generate one [here](linkaroni and cheese) - Great job! Enjoy waifu!
😄
something like that, but with real information and links is probably the bare minimum
yea, alright. Makes sense. lol
also remember, not everyone is max level in their English skill, so short, clear, and concise is the goal (I say, not following my own advice) 🙂
I believe in you!
2 more things came to mind:
- Do it yourself with a new one, document the steps, take screenshots, describe and/or put big red arrows
- Collect those answers you've given so far and put them in your instructions, including things like the one about "no you can't turn them over" at the bottom
hopefully that wasn't all just confusing and unhelpful 😄


