#mod_development
1 messages · Page 533 of 1
Did you play around with this?
thanks bro, i didn't know there was an attachment for muzzle. i was gonna go with Rigging if it works.
Where is API documentation?
When is API documentation?
Good evening, I am working on a mod that add traits, on multiplayer, the server does not seem to know the the new traits and throws errors like:
IsoGameCharacter$XP.load> unknown trait and lead on how to fix that? My code is located in the lua/shared folder and loaded by OnCreateSurvivor to avoid duplicates of traits.
I tried to add it to OnServerStarted too but the error still occurs
why is punching not punching

game blueballs me by giving me punching animations
couldn't find a way to actually put them in a weapon of sorts
game doesnt even give me an error it just defaults to swinging a weapon
Shit this looks great
Hello ! Is there a mod where you can claim any safehouse even if its non residential or spawn
Yup
Would you mind Giving me the name ?
I guess this works
thats such a cool idea
Cool! Havent thought about fist weapons yet
Finally another use for plaster of paris 😉
no refs to help the zombies
Is there a way to spawn in custom map mod tiles, like the ones seen in Grapeseed?
I can't use any duplicate method, as the tile disappeared once placed.
Hello everyone
some mod are giving this error
someone know how find this mod?
Oh I think thats the wrong topic
Sounds like a #mod_support talk
Hey there! I am trying to add different versions of a 3d model (the pool balls) to the game.
I made a basic mod already, but it didn't use 3d models, just 2d textures, now I want to try something with 3d.
So I made a new mod and copied the pool ball item
item PoolBall
{
DisplayCategory = Sports,
Weight = 0.2,
Type = Normal,
DisplayName = Pool Ball,
Icon = Poolball,
WorldStaticModel = PoolBall,
}
The pool ball has an 3d file, the PoolBall.fbx in media/models_X/WorldItems and a 3d texture Poolball.png in media/textures/WorldItems.
So my plan was to add the different versions of the balls in the script, each items WorldStaticModel pointing to a different 3d model with it's unique texture in my mods media/models_X/WorldItems folder.
So I imported the PoolBall.fbx into blender and replace the texture with a different one and exported the fbx to my mods media/models_X/WorldItems folder.
This also didn't work, ingame it would simply drop the 2d texture of the item on the ground.
This is where I am stuck. Does anyone know what I am doing wrong? I read that the game uses .x files, I converted the fbx to x, but it also didn't work.
you don't need separate model files, you can simply add new model scripts that use the same file with different textures
The game uses both .fbx and .x files, and is phasing out using .x files, so there's really no reason to use .x files considering what a gigantic pain in the butt that format is.
anyone know where the 2d sprites of 3d variants are stored?
most of those if not all are packaged
IIRC
I'm looking for the file path RN
/media/texturepacks
took a while but I've found the unpacker 😄 https://theindiestone.com/forums/index.php?/topic/3511-pz-unpacker/
I wrote a tiny tool, for Un/Packing .pack files. .pack FormatThe .pack files contain all used textures in PZ.The structure is the following: Features:1. Unpack: .pack files into seperated .png files (extra info is saved in a .xml file)2. Pack: .pack file is (re)pack with the .xml file and all .pn...
Where did you see registerAsLoot?
It's used in another mod but i just found out that its used in combination with table.insert(ProceduralDistributions.list[allocation].items, item); so its the same as the other option in my question.
but is table.insert(ProceduralDistributions.list[" "].items, " "); the right way to add items into the loot pool?
https://www.tutorialspoint.com/lua/lua_tables.htm
table.insert (table, [pos,] value)
Inserts a value into the table at specified position.
You would also need to look at the distribution table you are adding to to see what exactly you should add to.
Actually maybe this one is better https://www.lua.org/pil/19.2.html
Lua - Tables, Tables are the only data structure available in Lua that helps us create different types like arrays and dictionaries. Lua uses associative arrays and which can
Thanks.
Is there a similar explanation for how to add new forageable items or how can i search for them?
You are amazing thank you
hello, i am here to ask, i have 0 knowledge about creating mods. I'm wondering if there's someone here who is able to (in my eyes) make a rather simple mod
being weightless cassettes.
lol yeah i figured it out.
could anyone tell me why custom models/meshes dont show up ingame but do show up in the attachment editor
go back to build 41.65 or 41.55 that's work for me. or maybe the location, rotation and scale in your model doesn't match to the Base game.
@smoky meadow didnt work, still getting the error i didnt mention before + knife still only shows up in attachment editor and not ingame
what even is a weaponsprite
weaponsprite is an icon
so is icon, no?
if you drop the item to the ground and that item has no model it display an icon instead.that's a weapon sprite
try to resize the model in blender. that fix my issue when my firearm model is invisible when equip
Someone should make a mod that makes all of the zombies die over time
there would be no apocalypse if all the zombies died, no?
I’m talking about like a year later
The name is confusing, but that's what your weapon model reference should be.
Probably a remainder from earlier builds when PZ used sprites.
No zombie scenario will have zombies that live that long without food
You need to have a model and a texture.
You need a model script that correctly references the model and the texture.
Then you need to correctly reference the model script in the item script.
The vanilla files are the best reference for how to properly do that.
so i make a new script with the model info?
I dunno if you need a new model script, but you need to ensure that the model script you want to use is properly formatted and references the model and textures properly?
hey blair, here's a challenge for ya. how do i get each seat of a car to play a different idle animation.
It looks like it's properly done above, looks like you just need WeaponSprite = Butterfly_White_Wave
But a model can also be invisible if it's either too large or too small as well?
local function PA_Bike_Enter(player)
local vehicle = player:getVehicle()
if not vehicle then return end
local vehicleName = vehicle:getScriptName()
if not vehicleName:contains("AM2") then return end
if vehicleName:contains("Commodore") then return end
sendClientCommand(player, "PA_Bike", "PlayerEnter", {
vehicleId = vehicle:getId()
})
local seat = vehicle:getSeat(player)
if not seat then return end
if seat == 1 and vehicleName:contains("Sidecar") then
player:SetVariable("VehicleScriptName", "")
return
end
if vehicleName:contains("SkullKing")
or vehicleName:contains("Camel")
then
player:SetVariable("VehicleScriptName", "AM2_Bike_SkullKing")
elseif vehicleName:contains("Kaiju") then
player:SetVariable("VehicleScriptName", "AM2_Bike_Kaiju")
elseif vehicleName:contains("DirtDemon")
or vehicleName:contains("Warhorse")
or vehicleName:contains("Wendigo")
or vehicleName:contains("Yeti")
then
player:SetVariable("VehicleScriptName", "AM2_Bike_DirtDemon")
else
player:SetVariable("VehicleScriptName", "AM2_Bike")
end
end
okay so the bikes.
local seat = vehicle:getSeat(player)
if not seat then return end
if seat == 1 and vehicleName:contains("Sidecar") then
player:SetVariable("VehicleScriptName", "")
return
end
BUT i do see something ...yeah that
Are you using a module other than Base?
If so try WeaponSprite = WHATEVER_MODULE_YOU_ARE_USING.Butterfly_White_Wave
which file was that?
Using modules other than Base is a fucking pain in the ass, and causes no ends of headaches IMO.
Or also try WeaponSprite = Base.Butterfly_White_Wave if you are using a non-Base module.
resize your model
i was using module butterflyknives for some reason
i know
Right on.
So you can use Scale = 0.1 in your script item paramters to scale it down as well.
You can use that, just you have to be rigorous in ensuring that references to the item uses butterflyknives.WHATEVER in the scripts and code.
But honestly, IMO, and I've gotten shit for saying this from some people so I could just be an idiot, but again I think using modules other than Base causes no end of confusion, such as in situations like newbie modders trying to get models to work and the like.
You can also have this sort of statement at the beginning of you script file, using vanilla as a reference
module camping
{
imports
{
Base
}
thats what i had before
Ah, maybe it doesn't work for models? Like I say, I don't fuck with modules other than Base?
Even if I could be wrong for doing so.
¯_(ツ)_/¯
Just saw this on Reddit and reminded me of skizots lawnmower lol
If someone wants to tackle this and needs someone to folley some awesome squish sounds for them, I’d love to work on some custom sounds lol
There’s a bulldozer on the workshop that clears trees
It’s right up your alley lol I didn’t want to just be like, bro this is all you, but I mean how could I not 
oh course i could.
BUT my original plan was another function....
it would repair cracks in the roads.
Oooh thatd be neat. Maybe if you run it over a dirt path, trees won’t end up growing there? Almost like a paver
replacement them with that black tar square that covers cracks in roads lol.
Hell yeah thatd be dope.
Im drawing out plans for a possible windmill mod, but I could use some ideas, specifically for how a player could reasonably build a windmill tower (think of a fan windmill, the ones featured in dying light 2) without building a bunch of stairs. Any ideas are welcome
you could make it so its a wall furniture of sorts where it has requirements in order to work, like 3 floors high and cant be enclosed
this way people have to build an actual structure to install a windmill
instead of being a big structure itself
from there you could make other machinery that can be installed for it to work
Yea I’m planning on the windmills being it’s own separate thing so you can’t just attach some blades and some electrical stuff to a side of a building in Louisville and have power
That gave me an idea: have 3 buildable layers (bottom, middle, top) that can be climbed up and serve as a requirement for the windmill blades and the generator
Sort of how pre-activation windmills in dying light have parkour elements to them for how you get up to the top
1 more thing @willow estuary is there a way to position my weapon without messing with the model in blender, or is there an easier way to find the correct positioning in blender other than just blindly trying over and over again
You should be able to have PZ open, and when you change and save a model into the mod directory it should update in real time ingame.
Now, you might have to be in debug mode. And I'm not sure if it updates in real time with .x format files, as I use fbx format myself.
weapon models work with fbx?
All model do. They will be smaller or larger (don't remember which) ingame, but you can use the scale parameter to adjust for that.
But yes, x format is being phased out in favor of fbx, and also x format is a pain in the ass to work with, so, IMO, there's no real reason to use it?
What is that?
butterfly knife
Yeah, if you scale it down to 1% of its size it should be its old size again.
what the hell man. I KNOW this animation is here and it still says it dont exist,
Yeah, I'd recommend using the scale parameter in the model script for scaling instead?
Just in that when models get scaled down too much in blender they become hard to work with and render strangely?
what ive been doing is using scale in export settings
is that fine or should i use scaling in script
Ah... ... I didn't even know there was scaling in export (I'm an idiot with blender), ahahaha.
Not sure TBH, I just know that when I've downscaled models in blender to make them small in PZ they got hard to work with sometimes? So just something to keep in mind; whatever works for you is the right way.
Looks good! Keep up 👍
Great idea.
whats wrong with the position?
What animation is that?
Oh no wonder lol I thought you had found it and I was racking my brain trying to think of where else it would exist
strippers
Oh I’m dumb I thought the guys hand was clipping thru the truck
it's the handle lol.
Yea it blended in with the truck
right side guy is more brave... grabbing onto the back like that. left guy would rather use the handle.
Fleshed it out some more: each layer would need to be built 4 times, as in the bottom layer of the windmill would be built (facing inward) facing a different cardinal direction, making a square space in the middle
If it sounds weird it’ll make sense once I do the tilesets
Basically like each corner is built individually?
Well, side, but yea
Once the 4 sides are built, the player can climb up and start work on the middle layer, again building the 4 sides (tho a bit more complicated as it’ll be 2 stories high compared to the bottom layers 1)
Then once the middle layer is done, the top layer can be built, from which the generator and windmill “fan” (is that the correct word?) will be located
I’ll prob make a cardboard model of it once I get home so I can get a good idea of what it’s gonna look like
ok thanks for the info! But do you also know why my mod isnt working correctly? Are my files in the wrong folders? Or do you notice anything else wrong? Edit: nvm, I found my mistake and fixed it
Good afternoon, I see that you can upload a gif to the workshop for the preview of the mod, do you know how I can implement it?
is it possible for items to have custom animations
Yup, totally makes sense. I’m a mapper, not a modder so the technical side of it is totally lost on me, but if it’s feasible in the code then what you’re describing sounds super cool.
hi there! just joined to start wokring on a mod, i guess this would be the right place to ask questions?
Not a terrible spot, that's for sure. 😉
haha fair enough
If I had to give guesses about it, I’d say the hardest thing would be the whole layers thing, but maybe it’s possible to jury rig something similar to how plumbing works currently, only instead of a sink being required, it would be that layer.
That means I could go about this 2 ways: make 4 parts of a layer into one single object in the eyes of the game, or I could make every part of a layer separate till the top layer, which would need everything else under it.
Just a quick question so I get pointed in the right direction. What files/APIs should I be reading into for inventory UI stuff. I wanna be able to create a inventory UI separate from the current/game that has items listed in it.
I got a neat idea I wanna experiment with.
Would need to talk to someone who knows about buildables to get a professional viewpoint for if this is possible
what did i get into.. lmao
will need to do some testing tomorrow to see when the wiki says on an event you get an object (lua ref) or a table, and learn how to start logging debugging etc
alright, i'm in for a ride 🙂
Trying to figure out how to create a blank inventory panel/page
I'm just blindly trying different .lua files to see which one is gonna work.
require "ISUI/ISPanel"
Events.OnKeyPressed.Add(function(Key)
if Key == 34 then
InventoryGroupPanel = ISPanel:derive("ISInventoryPage");
InventoryGroupPanel:setPinned()
end
end)```
I don't know which API I need to use to create a blank inventory page
Just for debugging/testing I have it hooked to pressing G
Like, I don't need a walkthrough on creating the blank inventory I just need to know which is the right API/file to require
I dont think I showed my newest mod here!
oof. shading?
quite so old chap
yeah I guess it is a little too weak
easy fix luckily
@faint jewel is this better?
Is there any functions to create a inventory template data only? Or do I have to use ingame containers/storage for inventory?
the black is on the detail layer so it is above the shading :(
is there anything i can do about that?
I'm completely lost on this, I have no clue what I'm suppose to be doing when creating a blank inventory page.
my lastest attempt ```lua
require "ISUI/ISInventoryPane"
Events.OnKeyPressed.Add(function(Key)
if Key == 34 then
local Player = getSpecificPlayer(0)
InvTest = ISInventoryPane:new(100, 100, 250, 250, Player:getInventory(), Player:getCharacter(), 1)
end
end)```
i have nno idea but, shouldn't UI stuff make sensee to be created on the render event?
bear in mind zgain, i havee no idea
:) it looks so much better now. Thank you
documentation for modding is so messy it's confusing everytime I try to look into it.
When I get home I'll show you some stuff to make it better
rear view

im making a mod that play some sounds when a button is pressed, im using the getSoundManager() function to get the sound manager and using playSound when the sound doesnt have a wav and playSoundWav when it have it, but only one sound play, the "doorclose", the rest dont play, i copied the name of the file without extension to pass as name parameter
Daniel
the cooler Daniel
never mind, the playsoundwav isnt working, but work with playsound
How simple is adding the internet to pz, or, a fake version
Holy crap wut?
No in pz
I want the ability to troll the forums
And it raises boredom
That's it
bro those are dope!
So I'm taking another shot into seeing how VHS/CD files are able to be complied
I can't seem to find out how the creator of More VHS did his, so I asked, in the meantime, since WordZed still isn't updated, I'm downloading translationzed to see if that works out for me.
I'm gonna make it so they can spawn with different paint patterns on top of the main color
Flames?
the flame color is the car's main color, which the game randomizes, the black overlays on top, so the can be any random color :)
(I just wanted to say that I found the strings the game uses to figure out, I just need to get it in a format the game can understand)
no worries
Nice Flames
to test the paintjob i made the hotrod super common to spawn
here's some of the randomly spawned ones with randomized colors
ofc not all of them look good due to it being randomized (black with blacker flames : | )
Hey guys, I'm new in modding I just want to know if anyone has an idea how make Brita's weapon pack more rare?
can anyone tell me what is the error of this line ?
local posX = getPlayer():getX() + ZombRandFloat(distOffset)-distOffset/2;
it keep being stopped on the debug break
which one? I have 3 (colored flames, white flames, and white symbols)
and then also the plain one with no pattern
Plain please
dear god man.
i know, it sucks U-U
its not hidden, its just got very low transparency
otherwise it looks super super strong in-game
do you want the psd file?
looking at that, i would have to redo the uvws... and that's a bit much.
are they that bad?
sounds... laborious
it is
especially if you forget to leave margins
because then you'll realise halfway through that one of your UV islands overlaps a tiny bit with another so it has the wrong color
Can you show the debug info?
error on ZombRandFloat, just tried ZombRand and it worked
ah
question, there is a way to force a character to enter a animation for x seconds ?
and lock the control for the player
AYYOo
and where i get a list of animations ?
I have the power to make two types of UVs
-It's a literal box
-Auto-UV
also done rusty version
ah, the amphibious car. truly majestic
If we don't get a variant of this with fenders I'll riot
the one with fenders is this one :')
Idk how I didnt see tbat
hahaha
yeah but then i'd have to get into the whole shenanigans of having to model an interior and render the player
so not for now
Iirc the player is constantly rendered
Could anyone help me figure out why my custom map isnt showing up in game
i don't think that is the case. if you make an invisible car and get in you disappear
ah yeah sorry I didnt see that channel, thanks
Strange, didnt know that
A specific parameter must be used in specific spots in the vehicle scripts for passengers to be visible.
passenger FrontLeft
{
showPassenger=true,
hasRoof = false,
position inside
{
offset = 0.0055 0.3626 -0.1978,
rotate = 0.0000 0.0000 0.0000,
}
position outside
{
offset = 0.5549 -0.3022 -0.1429,
rotate = 0.0000 0.0000 0.0000,
area = SeatFrontLeft,
offset = 0.0000 0.0000 0.0000,
}
}
and then they also need animations and all, right? and i've seen people getting bugs where the zombies can't reach them and stuff, plus i'd have to mess with the parts to remove the windows and stuff
so its a whole mess just for a convertible variant xD
maybe i'll delve into it in the future but not worth it rn
Yea understandable
Also
Might I suggest white wall tires
Because imo white walls would look more fitting
I agree with you, but those aren't custom tires
they're from Filibuster rhymes' used cars (which my mod will require)
idk if i wanna go through the trouble of making custom tires atm either
i got my hands full with trying to make my amphicar float
Alright i'm going to need lua help, i give up trying to make this work by myself
i'm making an amphibious car using the code of aquastar boats as a base (got permission)
i got it to be a car, and then you can get out, open the vehicle context menu and toss it in the water (launch boat command) and it turns into a boat
but I can't figure out how to do the same thing in reverse
Is there a fast way to debug my mod? Do I really have to close and open the whole Zomboid all over again?
What have your mod and what you want to debug?
precisely, this
only an UI so I can add or remove weight
If this just lua thing, enough quit to menu and load again
oh, thxxx
Debug by print or breakpoints
how do I attach a debugger to my IDE, to use breakpoints?
you can use ingame debugger
f11 - choose lua file - double click on line of code to set breakpoint
f11 not working here
You in debug mode?
I guess Im not, dont even know what it is
Now Im seeing it, thanks!! But Im more used to my IDE (Visual Studio Code), do you know how to attach a debugger from my IDE to Zomboid?
I don't sure that this is possible
Hello. Has anyone had an idea for an admin mod where you can spectate the player, like in a Dayz?
I don't know exist this mod or not, but create this mod not hard. Just auto teleport to player when you far from him in invisible mode
if you do auto-teleport, you still need to control the character in invis. but I want to just press a button - spectate, lean back in my chair and watch.
why need control char?
watch the action, while remaining in a certain place on the map.
@tame mulch Im having a problem with my script, can you help me?
Im trying to change the player's weight from its nutrition, but Im getting an error on line 3 from this code:
function MyNewPanel:onIncWeightClick(button)
local nutrition = self.char:getNutrition();
local currentWeight = nutrition:GetWeight();
nutrition:SetWeight(currentWeight + 1);
end
The error is: Object tried to call nil in onIncWeightClick, but it doesnt make sense to me since the object Nutrition isnt nil nor the other functions Im trying to call.
Other important parts of my code:
function MyNewPanel:createChildren()
self.incWeight = ISButton:new(20, 20, 100, 20, "+1 weight", self, MyNewPanel.onIncWeightClick);
self.incWeight.anchorTop = false;
self.incWeight.anchorBottom = true;
self.incWeight:initialise();
self.incWeight:instantiate();
self:addChild(self.incWeight);
.
.
.
end
function MyNewPanel:new(x, y, width, height, playerNum)
local o = {};
o = ISPanelJoypad:new(x, y, width, height);
setmetatable(o, self);
self.__index = self;
o.playerNum = playerNum
o.char = getSpecificPlayer(playerNum);
o:noBackground();
o.txtLen = 0;
ISPucePanel.instance = o;
return o;
end
Tried to google it but I couldnt find anything that helps me 😦
not nutrition:GetWeight() -> nutrition:getWeight();
OMG, THANK YOU SO MUCH ❤️ ❤️ ❤️ ❤️
Changed to:
function MyNewPanel:onIncWeightClick(button)
local nutrition = self.char:getNutrition();
local currentWeight = nutrition:getWeight();
nutrition:setWeight(currentWeight + 1);
end
but still the same error 🥲
same bug 😄
need setWeight
If this not helps - send me console.txt
I couldnt understand
where it needs setWeight?
Oh, you changed it in last code. Then send me console.txt with last error
the script name is ISPucePanel
Script:
@tame mulch I rebooted Zomboid and now its working
🤔
Next time I will try rebooting sooner, sorry 😅
And thanks for your help, Im not gonna bother you again, have a good night
question, im trying to force the player to do some animation and stop the character from moving for the animation duration but the getPlayer():PlayAnim("pushups") isnt working, is this the right method to do it and there is 3 list of animation, the folder animsold, AnimSets and anim_X, what list should i use for the animation name ?
Does anyone have a list of the AntiCheatType settings and what they do
how do i make food frozen?
Put it in freezer
.... i mean via code.
ah
i made a freezer and it gets to -150 degrees. shit still says "fresh" instead of "frozen"
maybe something wrong with food idk
Alright today is a new day and brainstorming progress has been made with the windmill mod. I’m gonna ditch the whole “4 sides” thing since I don’t think it’s gonna be easy to code. Rather I’m planning on the layers being one whole building, only concern then is just having the materials needed available.
Idk about modding much, but maybe the food being frozen is dependent on the food being a certain temp instead of anything in a freezer becoming frozen at a certain temp?
Just my 2 cents take it with a shaker of salt of course
Oh
it just never gets marked as frozen
Any experienced modders interested in creating a CAD system? For use by emergency services like police officers in game. I’m creating a role play community and I’d like to have one so if anyone has a good knowledge of making one or think you could let me know! 🙂 of course I’d pay!!
that sounds kinda like a pain in the ass lol. i mean it could be done... but would probably be better off as an external webpage like some of the gtav servers do.
what'd you ask scuba?
and it also helps if the people you ask aren't at thier son's baseball practice.
damn them and having lives.
help is not guaranteed
in my experience, people usually only help with easy issues :p
in chats it is worse, because it only needs 4 or 5 messages for your question to disappear into the void
i missed a message from him last night while i was at my kids practice...
he threw a veiled dig at me lol.
Adding clothing items is fussy in that, in addition to the model, the texture, and the clothing item script, there also needs to be a fileGuidTable.xml + entry for the item (https://dislaik.github.io/pz_modding/scripting_manual/clothing_mod/#register-clothingitem) and also a .xml file for the clothing item (https://dislaik.github.io/pz_modding/scripting_manual/clothing_mod/#set-clothingitem-properties)
If you don't scrupulously set up those .xml files properly your clothing item won't appear.
You can use an equivalent vanilla clothing item from the vanilla pz files as a guide for your own new clothing item.
Official Dislaik's Documentations
still told him to send it my way and i'd take a look at it.
cuz i'm a boss, i'm a beast, repping the coast from the east, i'll chew him up like a fat kid at a feast.
does anyone have an updated guide, or any sort of info on adding new crops? all the stuff I've seen so far seems to be outdated
darling, if there was an API, and official documentation on how to mod the game
then, only then, you can expect help, even demand it
but as far as it goes, its a request for help, may or may not get fulfilled
Youre very entitled people have lives and dont exist to answer you
this does not define a community as great or not, specially on such a specific case like this
To be honest, albeit I'm sure this won't be appreciated, but being dramatic about stuff will discourage people from helping you instead of encouraging people to help you?
This is how i feel when i follow a lua tutorial
its not much, but i am proud that i understood a tutorial about lua 😄
(Oh and no, i am not adding a cheat into my mod, its just for easier debug)
right now I myself am trying to look into crops, and I expect to not have any sort of help because as far as I've seen, crops are not commonly touched on
Awesome! Keep at it. Everyone starts somewhere.
glad this uses lua, otherwise i wouldnt understand anything thats going on 👍
also you can specify locals player and inv once, at the beginning of the function for example to make the script a bit shorter and easier to read/modify in the future
local function addUndeadSurvivorOutfit(keyprepper)
local key = keyprepper;
print(key)
local player = getSpecificPlayer(0);
local inv = player:getInventory();
-- rest of your code goes here!
end```
True that, thanks!
np
to make your code a bit more readable (or cleaner /shrug) you could remove 1 tab from the if statements and add a tab before the inv:AddItems
you dont have to do it if it works but i just find it a bit more bearable to work with (ocd bruh)
You mean like making them aligned like so?
TAAAAAAAAABS
Clean 😄
it aight
adding a completely useless severely ineffective butterfly trainer to my mod
In that context it works
But in a lot of scripting languages you need the tab
Since it identifies code under a certain function, for example
we are looking at you, python
I've fixed/modified 3 mods and would like to upload them to the workshop
-properly translated and edited the sling mod to fix the crafting and be more durable
-fixed the clothes holes that come with using ted beer's skins
-cut down + edited the weight void mod so all it does is allow you to add a weight void that reduces the weight you're carrying by 100
ah it seems I gotta do it through zomboid itself
=ac name HARDCORE QQ
i was gonna mention python but didnt since its lua, good
python, my beloved
ok so I got my error log, what can I search for when looking for issues, most of my errors seem to be missing translations but I can't seem to figure out what mod isn't letting me place a campfire
Anyone know the possible min and max floats of methods like SetBetaEffec() and SetBetaDelta()?
Anyone here dabbled with fmod in zomboid? Can i add a separate bank if i just want to add sound files or do I have to replace the original? And if so, is it as straight forward as naming the repack the same thing and will it work in mp?
Or just general how they are meant to be use in the Betablocker code
Fmod?
If you're just looking to replace a sound for like a item, you don't need to remove the original, just change the sound name in its script or lua
No I know how to replace stuff like that. I want to add my own engine sound without using just a single idle loop
Ahhh gotchu, Well I don't know about not having to use anything else other than a idle loop. Made the vertibird mod but just got my own engine 2 second loop to replace the original
The issue is that everywhere I look most people just kinda shrugging about it, so theres not much information on it, especially after the mp build. Figured i'd try asking here.
No for sure, you can make really decent stuff using just the normal sound loops, i'm just a real sucker for cars and I want some eargasmic sounds for the mod i'm working on. I've made a function that calls turbo flutters and anti-lag depending on which speed the car is in when it starts to decelerate. It's cool but i'd much rather be able to control the rpm and idle sounds, stuff like that.
Okay I found out you can't without replacing game files. I'd love to see added support for it in the future.
Hey everyone! New to the pz game but have watched lots of nurse and private like content. Just jammed 6 hours straight with my friend. Looking for some good quality of life mods while staying pretty vanilla!
Is it possible to mod electricity to shut off between specific hours of every day instead of a date range?
yeah it should be.
How do you do that? I’d like to try to figure it out myself but I don’t know where to start.
who on the pz team do i have to bribe to get a physics box object that doesn't have any actual collision?
with sphere physics objects we can create a counterweight to balance vehicles, but this only works if those sphere objects don't collide with any other world object
I have a modlist that I use that I could link you to get some inspiration?
It's mostly vanilla friendly, and has quite a few QoL mods that are really nice but took me a long time to find because they were buried in the workshop
How can I stop / pause / mute a sound of an object like a fridge or generator. Need only one of these.
Unless someone else has done that exact same thing before you're more likely to have to find it out youself, i say this from experience. But I can point you in the right direction. Here's a list of variables tied to sandbox option, including one called "ElecShut", as well as another list tied to date and time.
https://zomboid-javadoc.com/41.65/zombie/SandboxOptions.html
https://zomboid-javadoc.com/41.65/zombie/iso/weather/ClimateManager.DayInfo.html
Javadoc Project Zomboid Modding API declaration: package: zombie, class: SandboxOptions
Javadoc Project Zomboid Modding API declaration: package: zombie.iso.weather, class: ClimateManager, class: DayInfo
So probably something like, turning off the global electricity shut off, then making a lua script that calls the hours and if they match up it feeds back "true", which in its turn activates or deactivates electricity.
media > scripts > sounds_object.txt both all generator and fridge nosies are in there. Simply change them out or delete them.
what if I want to change it for a specific item, not all items
Is there a mod to craft containers with more capacity? Currently boxes have 50 and metal boxes have 80, with is WAY too low for a co-op play with 3-4 people
Just stack 3 tall and use the organized trait
Isocontainers are huge, try asking in mod support maybe
jeez, and i'm here like, containers are all way too big
especially many mod vehicles have way too much space.
I'm of the opinion that such vehicles have an immense impact on the loot dynamics/economy in MP, and not in a good way.
People single-handedly clean out loot spawns/towns, haul everything back to their base, and repeat every loot respawn.
Loot areas get cleaned out quickly by a couple of people, the servers increase the frequency and amount of loot respawn.
Soon afterwards nothing is rare, and everybody has more stuff than they will ever need and the survival game gets stale.
Meanwhile, based on my experience from both admining and base raiding, the loot hoarders have triple crates stacks full of 100% condition screwdrivers/guns that have never been fired/etc.
Granted a lot of people play the game for looting and hoarding, not hardcore survival. But I think it's all a bit much myself.
You need to specify that a bit more, you mean removing sounds from a single generator as opposed to removing sound from all generators?
Yeah, i had to patch every single trailer on my server and nerf them.
yeah, trailers are the worst offenders
it all started with the first trailer mod 😄
now you cant do reasonable values anymore, because it will spawn endless comments about "x is much better!!"
In b40 MP the Hydrocraft toy wagons etc with 150-250 capacity were awful for that as well.
Filibuster has been sticking to his guns with his vehicle capacities and getting no end of shit for it for years now 😄
some of them i feel are a bit too low (250 for big truck), but i think it is more reasonable than 2k trailers
Better to err of the side of caution I figure, given how the trickle down and synergies can just torpedo the loot economy and such? 🤷
problem is that cargo weight influences vehicles a lot
so big carry weight causes lots of other potential issues
it's why for our w900 truck, we even had to implement scripted solutions to reduce mass
I've been using this in the new car mods I'm making, reducing the base weight of my vehicles but then adding a "weight module" that adds weight, letting people strip parts to reduce weight.
yes something like generator:setSprite but for the emitter
yeah but low base weight is also not good, because it makes vehicles easier to tip over or bump into the air when driving over dead bodies
basically ... there is no good solution right now. everything is bleh.
What's the application of this? What about just creating a new generator but without the noise, then manually spawning it in and replacing the old one.
Oh snap! Feel like a gigantic dummy for not figuring that out before, but that's the solution for making vehicles more "tippy/wobbly" then?
Center of mass and suspension
in my experience, if they are wobbly, they lack balance and weight
wheel position has serious consequences
Yeah, getting stuff in the sweet spot for wobbly-ness is something I've spend many many hours on 🤪
i spend countless hours on trying to improve our w900 dry van trailer, but i'm about to just give up
Yeah, it's fussy fussy work alright.
the best way i found to fixing it was to add a counterweight behind the trailer, but as physics boxes have collision ... this is not a solution
Some fun results i've found playing around with suspension
😄
this whole endless try&error is what demotivates me so hard
there is no documentation and nobody who can help, so all you can do is push random numbers, reload, hope for the best, repeat
Yeah, honestly I wish there was some sorta graphing application for vehicle physics?
It's like a 50/50 motivator and demotivator for me, sometimes you figure out new stuff and see the things you could spawn, sometimes you spend days working on something only to find out it's impossible to apply properly.
i still dont really know what exactly the physics boxes are doing. do they have fixed weight? do they have weight based on size?
if i add 10 physics boxes at the same location at the end of my trailer ... why is the trailer tipping forward?
you know what. maybe i should add 10 physics boxes at the front of my trailer ... maybe it will tip backwards then 😄
wouldnt be surprised if there is some number overflowing
I've making some code the past few days inspired by the W900's air horn to make turbo flutter and anti lag activating different noises depending on which speed the car starts to decelerate, but it takes so long to load sounds so it always feels off. Then i started learning fmod because i wanted to make my whole new engine sound, until i also found out through trial and error that it's currently not supported.
needs sound events, but we cant add sound events right now
w900 truck horn is a bleh implementation, because it lacks rules
The main issue with it is that it spawns a sound emitter on the ground, instead of having it attached to the car i'm guessing, so it loads each sound seperately instead of having it loaded with the car.
i think that issue is with other sound sources as well. for example vehicle door sfx -- it spawns in vehicle center, not on player who opened the door
so if a long vehicle is standing at 50 rotation, the sound can come from your left speaker, if it stands at -50 rotation, the sound can come from the right speaker, etc
Yeah, that's why I'd like to have some sorta graphing output for tuning vehicles? I think a fair amount of stuff like this happens when playing with values where you have values shooting up to infinity/negative infinity or such when vehicles start behaving in an insane fashion of of the blue when tweaking values.
This is a WIP, but trial and error can lead to some really interesting handlings.
This is a mod I'm working on for project zomboid.
The cars used in the video are customized versions of
Filibuster Rhymes, and fhqwhgads cars in the links below:
https://steamcommunity.com/sharedfiles/filedetails/?id=2698655004
https://steamcommunity.com/sharedfiles/filedetails/?id=1510950729&tscn=1640102334
I will not upload this at its curren...
I saw that, you're using FHQ's tune right?
I was inspired by it, i've been in contact with him. He's letting me use all of his cars as a foundation for my tuner mod. Essentially im making variants of cars that have complete bodywork disassembly, with tuner bodykits and engine tunes, with switchable differential that can toggle between drift and race mode.
jesus... this aint need for speed man.. it's a java zombie game XD
I can send you the tune, just please don't release anything with it until i've released my first pack.
i'm just kidding.
Yeah but i'm a gas head and It's more of a passion project.
Cool! Love your stuff btw. Great quality.
🙂
i alwys end up finding some dumb gimmick and making a vehicle that works with it.
the garbage truck was TWO dumb gimmicks.
that became three because of a suggestion.
Haha yeah, so is the drift car isn't it. Noones actually gonna use it for anything. Thats why i included the option to just tune it up into a good race car so you don't have to slide around everywhere. I originally planned on making a trailer for it but i was like... Nah it's not a boat you know.
well the trueno is meant to spend all day sideways... yay anime.
the thing that gets me... someone found my ko-fi link on that page.
freaked me slap the fuck out.
The only issue with that fhq tune is that you need to get up into high speeds to slide, and then you'll just end up slamming into a tree anyway.
feel free to use the trueno in a video lol. people will poop over it for some reason
do a run through a forest track with someone in a red car chasing you.
Awesome, i was gonna make one but that would make it easier to just add some kits. I wanted to ask as well. Did you have to ask permission to use Tsars headlight script? I'm kind of new to modding and i'm not completely sure how it works, especially since it's a team and all.
it's an API.
as long as you have tsarslib installed you can write scripts to access it all day
that's the point lol.
he will make a whole ass car to show off a new gimmick in the tsarlib.
Oh okay! I was just a bit confused on how that worked, i've been using tsarslib for my beta version of the car and i was gonna switch over to rotators because they gave me permission to use any of the code. But if I don't have to do the switch that'll make stuff a whole lot less painful.
For sure, thanks for the clarification.
but hey, question for ya.
think you can retune the go karts a bit?
they kinda DIE the second they hit offroad.
I can take a look at it in a couple of hours sure, i'll send you an updated script if i figure something out.
You could repay the favor by telling me how different shaders work, if you know.
sure what are you trying to accomplish?
hey how do i retexture clothing? i want to retexture the trainingjackets
find an existing texture then change it.,
start editying files.
5 hours later curl in a ball and cry
2 days later release!
lmao
i mean i already created a mod folder with the mod but how do i replace a texture now
ah okay thanks
If you can't figure it out shoot me a message and i'll walk you through it.
Ah skizot already offered.
i cant find the pin bruh
it's the one with the pepsi guy ^^
you know slaughter.... if we could find a GOOD UI guy... we could start our OWN team, lol.
ohh
making money off of mods, the new hip
What do you mean, "good"? 🙂
i aint say nothing aboot no money.
I'm using mods to make money in the sense of having experience to put on my resume, as i'm hoping to get into game development. But i'd never ask money for a mod.
and will the clothes spawn like other clothes or do i need some scripts for it?
can make this a real thing @chrome egret
Hi All, i'm learning how to make my first vehicle mod for PZ, i'm now just finalising everything, how to i export/convert my 3d file into the format the game requires?
I can't seem to find any up to date resources
thank you!
I've got a good friend on my server who is real good with UI development, he's working on his own unity game right now though.
i keep half making unity games.
Oh boy. Seems complex but doable
just like this ig ? and replace the names with the cloth i wanna replace
lol it was just an idea. so it could be changed up.
It's a really cool mock-up
you could also do it like the forests backpack. that would be hilarious.
where it's just a smattering of items laying around.
just to add a whole new level of difficulty.
As long as they are in the same directory that the item calls from and is and named the same things as the original texture. You'd be better of making new clothes though, it's fairly easy if you just use some templates.
And that's not the correct mod folder if you want your own mod, you have to make the folder in Users > Zomboid > mods > mod directory --- or: Users > Zomboid > workshop > workshop mod name > mod directory.
i haveb it there
Sorry I could be more clear with that, shoot me a message if you need more help and i'll get to you. I gotta get some chores done right now.
the mod directory is best.
If you're just doing a retexture you can use the mask from the original item.
So you don't have to add one.
it works but for some reason only the pants work and not the jacket
now it works lol
Oh good!
how do i change the item pictures?
In the script, change the "icon" variable, then create a new 32x32 png in the main texture folder named Item_"icon" with "icon" being what you put in the script.
Did you create a new clothing piece or retexture?
media\scripts\
just retexture
Oh, then you cant unless you use itemtweaker api
Which at that point, just make a new one.
I think? Maybe just find out what the name of that clothing items icon is and try adding one with the same name.
yea i will try that
yay i made my first "mod"
but the texture isnt even mine lol, just using it for private server with a friend
Its fun right? Rewarding in the end. Now make me a script that calls shared server sounds instantly.
I'll be expecting it by sunday 12PM GMT, or you can kiss that executive position in mine and @faint jewels mod team GOODYBYE!
lmao
Could someone help me figure this out? I want to call wheelFriction using this formula, but whenever I try it gives me an error. What I'm most confused about is the letter before each variable, like fBrakingForce and iEnginePower, what do they mean and how to i apply it to Wheelfriction?
what's that from
It's used in traits related to driving.
This specific one is from the driver skill mod.
f would be float and i would be int i think.
Aaah, I've only been learning java and lua for a few weeks. Still trynna get the hang of it, but that makes sense. So do you mean it might be that it changes the value without using setEnginePower for example?
i think it modifies it real time.
use of a lowercase single letter at the start of a variable name in programming is often done to show the type of data the variable holds. f for float, i for integer, s for string, b for boolean etc. sometimes g is used as a prefex for global variables
I see, thank you! I think that actually might have helped me figure it out. I thought it took values from VehicleScript, but then it means these are from BaseVehicle, so that means forcedFriction is the correct variable.
Goddamnit, I can't figure out how to call the vehicle scripts wheelFriction, only the wheelFriction of the tires, which is seperate and barely changes the performance.
i thought only tires had friction?
I did too for a while, turns out its just a modifier on top of the one in the actual vehicle script, but it wont go under 1.2 or above 2.5, so theres not much control.
Is it possible to script a mod where zombies burn and die in direct sunlight? I’m looking for a project zomboid modder I can commission to make this for me. I’ll pay you.
@ me if you reply so I’ll see it
Probably, theres a mod that sets zombies on fire if they step inside churches, so you could probably make something similar that checks if they are outside, and what the current time of day is. I don't have time to do it, but it sounds very much possible.
Is the guy who made that mod in this discord?
I don't know the person, so I can't really tell you how to reach them. But here's the mod, and it looks like the persons currently working on their own indie game. So chances of them taking comissions are pretty low at the moment. But I'm sure you can find someone else willing to do it.
https://steamcommunity.com/sharedfiles/filedetails/?id=2710217688&searchtext=church
I know the Tsar team takes commissions from time to time.
Do they make similar mods?
They make all kinds of stuff, great team of very talanted modders.
Do they have a discord or do you have the @ of any of them?
Oh i'm not allowed to send invite links lol.
I'll send it in pm, i've never spoken to any of them, and the discord is very limited unless you join their patreon. But give me like an hour, i actually wanna see if the script is as straight forward as i think.
hey can i use brand names like adidas in workshop?
I’d appreciate it. I really want to play this game as my own little Omega Man/I Am Legend thing.
Ok so I need ideas for how to connect a windmill to buildings for power
i think my next mod is gonna be simple... just a plain ass golf cart.
but there's a cooler on the back.... DAMMIT.
Cooler calamities 2: electric boogaloo
Also holy fuck I’m in love with your ice cream truck mod
lol
well there's a hidden link under the grid off my stuff.
feel free to abuse it 😛
Also what’s the name of the song that the siren uses? I know it’s some old ragtime thing, forgot the name of it
they are all old ragtime.
I mean the one that “wail” uses
The entertainer
I KNEW IT WAS FAMILIAR
I'm gonna have to say no only because I know a Rimworld modder got a cease and desist over just using a name based off a company
he made a fake company based on a real one
with a similar logo
and mod went byebye
but I see people make car mods and use the real names so who knows
those are awesome
fuck corporate i'm taking this shit to federal. lol.
As a southerner, I take great offense to golden corral's representation (read: i completely agree with that assessment and actually have no complaints)
am I missing a mechanic to do with distributions in mods?
as a southerner myself, ryans or bust. crappy corral and the disease train can rot. XD
Sorry if I ask in the wrong section, I need help to make this function only active inside the player safehouse, what should I add
function self.TeleportTo( items, player, pointName )
IPZtoNPC.Transporter.MoveTo( items, player );
end
I made the same chances, the same locations
obviously that doesnt guarantee a 50/50 perfectly, but finding 3 for every 1 is not a balanced roll
even tho it should've been
good to know golden corral is terrible everywhere and not just here 🙂
look up the documentary on thier choclate fountains.
Wordzed Tutorial just dropped uwu
hello everyone and welcome to my basic tutorial on using wordzed!
Here's the link to download the program -- https://drive.google.com/file/d/1vY-08QJBIzh8gxzIzhGuyLs-RP-CV2T3/view?usp=sharing
Parody signs…
Is greggs popular in the states?
nah it was requested by some dork from this channel.
dealing or something like that.
not against greggs, just thought it was a random inclusion aha
So I’ve seen it talked about, but couldn’t find a real conclusion; is it possible to read/write to (SQL) databases in PZ? I saw someone got around this by reading the server files which would work just fine, but I feel there’s a better way
If anyone knows of any examples please do let me know
@faint jewel my mods kinda blew up
I made them both today and they got so many views and stuff already
20 whole subscribers?! that's awesome!
is there a way to receive a server's console? maybe an rcon request of some sort?
I thought I might have been doing something wrong but....are the army surplus lockers broken? or are they suppose to be empty?
same with the army quarter lockers
They have been empty when I have checked then before as well
ty for confirming.....lol I don't know how many times I reloaded thinking I messed up something on the loot distribution file :S
I have a simple request, that I can't seem to figure out on my own. if someone could pm with some help that would be great. I want to add the ability to shoot, and swing melee weapons on Dislaik's Skateboard Mod. And I haven't been able to figure out how to add those options in. Any help would be awesome!
looking for modder
Hey, I was wondering if I could get some help
I'm making a prop pack, and some of the models work well, but some are WAY offset from where they are meant to be and I'm not sure how it happened, or how to fix it
Anyone got any advice?
The first one is less extreme, but still irritating
The second, however... utterly fucked
vroom vroom
I mean uh oh where I could find modder?
Hey hey, anyone know what this option means in the "haistyles.xml"
my 3d model is rotated 90 degrees anticlockwise to the car base, how do i fix please?
If that's the value only one hair for each stage has as true, then it means when hair grows it will change to that model. Sorry, I don't remember if that's the one. You should keep it as is and use false for any hair you add
Tiles don't necessarily use a specific item ID when picked up. The game can create an item on the fly for them and the ID is movable.Mov_(sprite_texture_name_here) If I remember correctly
I found this (Moveables.carpentry_01_19) but it does not work with Item Tweaker API
I tried to increase the capacity
TweakItem("Moveables.carpentry_01_19", "Capacity", "90");
It will never work because crates'capacity is defined by tile definitions not item stats
Oh ok ty 🙂
Anyone know of a way to change the color of snow?
Does anyone have any insight into the vision system? Specifically I'd like to check whether a given cell is within the character's vision radius
What I'm really after is natural-seeming behavior for walking the room looking in containers, so if someone has a bead on that I'd also be grateful!
hey i made a simple emote hotkey script can someone check if i did anything stupid? its only a few lines. pls pm me or reply
its working too
What are everyone's favorite 5 map mods that add to the vanilla map
What folder is the sprite for snow in
i feel like its really obvious in the textures and im just stupid
i can find fog
package zombie.iso.weather.fx;
public SnowParticle(Texture var1) {
super(var1);
this.recalcSizeOnZoom = true;
this.zoomMultiW = 1.0F;
this.zoomMultiH = 1.0F;
}
So, in the vehicles script theres a value called "wheelFriction", and then there's the wheelFriction thats tied to the actual wheels, I know after extensive testing that these two are seperate. those ones tied to the wheels call back to getWheelFriction() and setWheelFriction() in VehicleScript. Can someone help me figure out what the other wheelFriction ties to?
https://steamcommunity.com/sharedfiles/filedetails/?id=2772575623 How come the doors opening are clientside?
the vehicle animation portion is using still WIP code from the base game https://projectzomboid.com/blog/content/uploads/2019/08/image-6.png
from before the multiplayer builds
Question. Will boats spawn around Kingsmouth Island if I have Aquatsar Yacht Club?
anyone know if there is a mod that let's you push a vehicle by hand?
@thorn cipher - I believe Better Towing let you. I believe it's broken in multiplayer, not sure about single player.
I sometimes forget to put things into the perspective that multiplayer is super recent so when i see code like that im like hmmmm oh yeah
Awesome! Thanks, that works!
espace is coming along nicely
giant enemy cra🅱️
The silliest vehicle custom horn sound.
As well, it only works when the engine is running.
Yep, far too giant x_x
I think the size is part of the issue, because it works when the model is at full scale, but when I scale it down in the models script, it becomes more and more offset from the square the smaller it gets
actually, Im thinking more about making a face with the makeup on it so I can get it instantly during the character build screen, got any clues on how to make it?
Making a makeup mod should be pretty much like making a clothing mod.
In Steam\steamapps\common\ProjectZomboid\media\textures\Body\MakeUp you find the textures, then you also need the same folder structures like in clothing mods i think
To have them directly at the character creator screen you can turn on "unlock all" in the sandbox settings to have access to all clothings
Here are 2 clothing tutorials:
https://theindiestone.com/forums/index.php?/topic/37647-the-one-stop-shop-for-3d-modeling-from-blender-to-zomboid/
https://steamcommunity.com/sharedfiles/filedetails/?id=2648115890
Hello and Welcome! Here you will find a concise and comprehensive guide and tutorial of making 3D models for Project Zomboid. Currently, this will mainly pertain to custom Clothing creation but may include weapon creation in the future. This will present how to create models from scratch with Ble...
so wait I can just make like a cosmetic that replaces my head wit the one I want?
It does not replace body parts, but overlays a transparent texture
so I can replace a face texture?
If you take a body texture and a make up textures and overlay it in a painting programm you will see how it works
No replace 😄
make up is the one that requires you to get the foundation makeup and a mirror right
If you want to do it like that then yes
well can I make like a face cosmetic for the beginning's character customization?
Yes, you can choose makeups if you have set your sandbox settings to "unlock all"
After all the game does handle it as "clothing"
Hmm... looking through the game's files to see if I can find a solution to my issue and found rotate and offset...
Wondering if those relate to the world model, or are specifically for dictating how the item is held by a player
I think those are related only to the world model when item is on ground
Ooooh, then this might solve the issue if I can find the correct values to de-offset the model
God I hope so, this prop pack has proven to be far more of a pain in the ass than I expected so far
How a weapon is held on hand are defined by the attachment points:
And your mesh in relation to the origin
I would not recommend to mess with the vanilla attachment points tho as it can break alot of items 😄
But you can add new ones
Nah, dw, I'm not messing with any vanilla stuff
Basically what I'm doing is adding in some monster props, basically items you just place down and boom, got a monster of some kind sitting there in the world
We use them on our server for turn based combat
This is how my models script is set up currrently, had to fiddle with the scaling a lot
Most of them work, except for spider and arachnid
When I scale spider and arachnid down, their model becomes severely offset from the square the item is being placed on
Just curious if there is a mod where to get food from a vending machine, it requires money?
I bet you could easily make that with a crafting recipe, but would need the vending machine to count as a station
Is there a mod that shows where other players that are in your faction are on the map?
That's a good point! No idea how to make mods like that unfortunately 🇫
we all start somewhere
I've been looking at working with makeup to. I want to use it as a form of face customization. Add a bunch of anime character faces. Cosplay in the apocalypse 
I am playing a cracked zomboid on my school computer and trying to add mods, but I cant access my c drive, is there a way to add mods to the mods folder some other way?
why would you come to the official discord and ask for help about an illegal copy of the game?
I own the game on steam, I just can’t access it atm
I would appreciate help not criticism
is there some way to change what the playing is wearing other than "setwornitem"?
im trying to make a vanity slot mod
basically like terraria, you use your normal clothes/armor for protection etc but you can put another cloth in a vanity slot to make your character look different without affecting your stats
some way to hide belt/holster items could be really useful too
I'm updating art for my Relaxing Time, if anyone has a good screencap of the police helicopter mod please share so I can add it to the newspaper
Im working on a trailer for my mod, and im trying to capture some video. In debug mode, how do i make myself invisible and also make it so i can phase through walls and turn of fog of war?
Soo anyone used this mod.
https://steamcommunity.com/sharedfiles/filedetails/?id=2713055926
Trying to recycle jewelry with no luck. Do you need a certain metalworking level to break them down into scrap?
Anyone know where the code for "DigFurrow" is located
Looking in TimedActions thinking its burried somewhere else
Is there some sort of clever workaround to make a recipe not have a "result = X" item ?
could add a certain item and then remove it with the on create
RemoveResultItem True
Thx, this worked!
My mod is being loaded, but it doesn't look like my lua file is being run. It's supposed to print something to the console, but it doesn't. No errors are printed to the console either.
The console confirms the mod is being loaded. The lua file is in the "shared" folder. It's supposed to load automatically, right? The file doesn't need to be registered or anything.
I assume any syntax errors would be reported on the console
Fixed it. The mod structure must include media/lua
lmao, i put the actual version of that into super weird helicopters
I had the original in my mod, now I'm looking for a better look for my newspaper images so I'm recreating it
ah
You could check the translations.
Hi thee !
I would like to make a mod that places installations on a specific map (cell) instead of spawning items, is there a mod or information site that would be helpful?
For example, placing a TV in a specific location.
Is there a way to check if a player is speaking thjrough voip?
Are recent versions of js-eclipse java decompiler not able to decompile the latest PZ classes, or something wrong with my install?
Nice tip thanks
Is there a way to override and/or disable (vanilla) recipes? Nothing I searched for yielded results, occasionally someone answered them but then the original person asking said it didn't work and it stopped there
Tried adding a new recipe with the exact same name as the base recipe and added Override:true (also tried all lower case and upper case too) but it just creates a 2nd recipe with the exact same name instead of changing the original, and Obsolete:true doesn't do anything (whether alone or together with Override:true)
Never mind, after doing this for an hour now I feel stupid, finally pieced everything together the right way (realised things like override = true didn't work because it wasn't the right syntaxt in recipes), and now ultimately my error was starting the recipe with module base instead of module Base, and now it works (obsolete still doesn't remove it just like someone said who decompiled some classes and found the code for it doesn't apply to an overriding/new recipe, just for the original, but at least I can override it with gibberish and put an impossible/nonexisting recipe as requirement so it effectively removes it)
When using Player:Say("text") in multiplayer, only the client running that command saw the text
is there a way to say text in multiplayer?
I think possibly the code that is only running on the client has something that makes it only run on the client, something like if player:isLocalPlayer() then? You could check for that.
Sup guys
I was thinking
If that's possible to make zombies blind?
Or better
Give them very small Field of vision?
So they'll see me only when they're closer than 2meters for example?
I would be very grateful for your help
You can limit their sight in the sandbox before starting a game?
I know but even with poor sight they can see you from pretty far
I would like to set them to notice me only at a very short distance
But give them good hearing
So basically make them like the creatures from A Quiet Place
thatd be cool actually
Yeah that's why I'm looking for someone who can help
Look inside the mod on steam workshop which adds the ability to camouflage with zombie guts
It's a way to do it
But does it make you invisible
Or makes zombies see you only from a small distance?
But i think that I'll be able to do it with that mod
he probably means look how that mod does make the character invisible and replicate in your mod
Need help optimizing code. More specifically, doing loops.
local function OptionalTweaks()
local LightBDurability = SandboxVars.VPP.LighbulbDurability
local LightBulb = ScriptManager.instance:getItem("Base.LightBulb")
local LightBulbRed = ScriptManager.instance:getItem("Base.LightBulbRed")
local LightBulbGreen = ScriptManager.instance:getItem("Base.LightBulbGreen")
if LightBulb then
LightBulb:DoParam("ConditionMax = " .. LightBDurability)
end
if LightBulbRed then
LightBulbRed:DoParam("ConditionMax = " .. LightBDurability)
end
if LightBulbGreen then
LightBulbGreen:DoParam("ConditionMax = " .. LightBDurability)
end
print ("VPP Debug: Lightbulb durability set to:" .. LightBDurability)
end
Events.OnNewGame.Add(OptionalTweaks);
This is the "base" code. It does what it needs to do. I have other instances of similar code that run longer, and I noticed it impacts (lengthens) the game start. So I need to solve two problems with it:
- Do a loop
- Find out why ConditionMax resets to vanilla default when the game is loaded.
For the first, I did this code
OptionalTweaksItems = {}
OptionalTweaksItems["LightBulbs"] = {
"Base.LightBulb",
"Base.LightBulbRed",
"Base.LightBulbGreen",
"Base.LightBulbBlue",
"Base.LightBulbYellow",
"Base.LightBulbCyan",
"Base.LightBulbMagenta",
"Base.LightBulbOrange",
"Base.LightBulbPurple",
"Base.LightBulbPink",
}
function OptionalTweaks.LighbulbTweaks()
local item;
local LightBDurability = SandboxVars.VPP.LighbulbDurability;
for k,v in pairs(OptionalTweaksItems) do
item = ScriptManager.instance:getItem(k);
if item ~= nil then
item:DoParam("ConditionMax = " .. LightBDurability);
print ("VPP Debug: Lightbulb durability set to:" .. LightBDurability);
end
end
end
But I can't get it to work. Anyone knows what's wrong with it?
NVM I will try some examples from here
https://pzwiki.net/wiki/Looping_Through_Tables
To see if I can make it work.
...
for k,v in ipairs(OptionalTweaksItems.LightBulbs) do
item = ScriptManager.instance:getItem(v);
...
try that
you have a non indexed table without
Yep, that was it. The ipairs and V instead of K. I absolutely have no idea why but it worked. Now to try and optimize other codes in loop-form.
Now I only need to solve problem 2: When I load the game values get reset.
Thanks for the help!
guess you'd need an event to trigger your code right after world load
I use OnGameStart and the "debug" shows the altered values but once I load the game the bulbs condition revert.
Are there ressources on how to make an object like a table that snaps to the tiles on placement?
Already existing items dont get changed
So I've been brain storming and maybe someone else has already tried this but is it possiable to create a "Locking Metal Double Doors Mod". Like the wooden gates but metal and able to lock from either side but only unlockable with a key.
That sounds amazing
Anyone know what the game's default value for critmultiplier is for a weapon?
like when it's not specified in the weapon's stats
I got a recipe an item, .pack and .tile file. How do I combine them?
How does the game know that my specific item got those tiles?
There is one problem
I don't know programming languages
Crappy buffet lul
Can someone edit that mod for me?
Because I don't think that I'll be able to do it
Or at least tell me what i need to change
Because I think that it's possible to do that but i just don't know how to do it
Is it possible to make Ui mods? like a new window for new information coded in with a mod
yes it is there are several examples
I shall look into that then
I followed MrBounty's tutorial on making custom UIs: https://github.com/MrBounty/PZ-Mod---Doc/blob/main/Make an custom UI.md and cribbed some other stuff off of vanilla UIs. MrBounty also has a UI API mod that you can build on.
Result being:
IT is possible to make a trailer for carrying car?
like a car fload like in real life where u can put 4-5 car
What's the proper event for catching slash commands from players?
Is it possible to get a username from a character object?
Javadoc Project Zomboid Modding API declaration: package: zombie.characters, class: IsoPlayer
Javadoc Project Zomboid Modding API declaration: package: zombie.characters, class: IsoPlayer
there are other for different names too like steam or surname
I just learned kahlua automatically casts IsoCharacter to IsoPlayer if it is an IsoPlayer object.
I tried IsoPlayer.getUsername(), but it returns the characters name. I'll look for one for the steam name.
thats not true
an isoPlayer is an IsoPlayer which is a subclass of IsoGameCharacter that means it inherits the fields and methods
Yeah, Java is passing an IsoCharacter (which is really an IsoPlayer) to my lua script.
I'm used to strongly typed languages that don't let you use subclass members without casting. I should have known better.
So I’m trying to make a mod that allows you to reskin weapons (turn a hunting knife into a scalpel that is statistically identical to hunting knife, etc) but i can’t get recipes to appear. I have the recipes and in the user mod folder (not steam files) as a text document.
Issue is the recipes never appear in game. Do I need to have files in the game’s location on steam as well? Does the file type need to be .lua or is .txt fine?
Really new to modding so I’d appreciate help
I am having this exact same problem right now @tawdry moss
I cant seem to get any recipes to appear in the game
Even ones downloaded from the Workshop aren't appearing
Mod files go in the <userprofile>/Zomboid/mods/<modName>/media/* folder
They belong in specific subfolders of that folder
I think recipes are scripts, not lua code, so they shouldn't have the .lua extension
These are the subfolders where script/code files should go: https://github.com/FWolfe/Zomboid-Modding-Guide/blob/master/structure/README.md
In your case, the recipes go under <userprofile>/Zomboid/mods/<modName>/media/scripts
Thanks
Is there a way to get a player's steamID as a string instead of a floating point number?
How can I edit zombies AI?
I want to make them see me only from a close distance
Because poor vision is not enough for something that I'm trying to achieve
I'd really appreciate your help guys
From what I understand by doing a little bit of research, it's not possible to change the engine sound for the cars right?
I only managed to add a file to the mod and define it in the script but right now it's just a static sound in-game (not changing with the RPM)
Hi all, I've currently set up a dev space using IntelliJ, got decompiled sources attached, but the I'm not getting any code completion for 'Events', such as Events.OnPlayerUpdate. Anyone using IntelliJ for development?
what are the arguements for context:AddOption
You can check by looking for where the AddOption function is in the Lua.
Trying to create a recipe for my flag mod and I just can't seem to get it to even appear in the game. Is this formatting correct? Does the txt file itself need to be saved with a specific encoding? (Don't mind that it creates a stone axe, that's just to test it creating something before I dive into getting it to display custom sprites.)
what programme is that?
I am using Sublime
Okay, update: I got it working by splitting my mod up into two parts. The first part is the tiles themselves (the flag sprites) and the second part is the scripts txt file.
Been struggling with this for two days now, glad to have a solution that worked
Follow-up question: Is there a way to hide the craftable item from the right-click menu if you click on one of the recipe ingredients? I have like 350 flags with two versions each, a 700 item list would be SUPER annoying for players
someone needs to do chernaus from dayz
Would it be possible for someone to make a mod that allows you to start a fire without matches or a lighter, perhaps using two tree branches to make a crude firestarter
I wanted to do a playthrough relying mainly on foraging, fishing, etc, which is possible with my current modset…but noone has made a mod for a very basic firestarter?
NVM I looked into it, I never realized a drilled plank does that, im dumb lol
Is there a way to get a player's steamID as a string instead of a floating point number?
i would second that
while I'm here, does anyone know the file I need to be using to create a blank inventory page that I can customize with what items are visible in it?
Not asking for code
Just asking what file I need to be reading to use
Does anyone know how can a server admin change the loot table that zombies have?
I would like to add a vanilla item to zombies inventory on a probability
I'm two years from my computer science degree and the fact that there is a lua console in debug mode to run code through went over my head forever
and i feel like an idiot
i've been like "man I SURE WISH I COULD SEE WHAT THESE FUNCTIONS DID WITHOUT LAUNCHING MY GAME OVER AND OVER"
Are there any issues with having crafting recipes and items in the same .txt file or does it not matter?
it doesn't matter
Thanks
Is there a way to get a player's steamID as a string instead of a floating point number?
After searching the existing lua scripts, the apparent answer to this is no.
tostring
It doesn't work. As soon as lua receives the steamid from Java, it converts it to a floating point, mangling the id.
?
IsoPlayer.getSteamID() returns a long (e.g. 71234567890123456). When that gets passed to the lua code, it gets converted to a floating point (e.g. 7.1234567890123454E16).
Then, tostring() just converts that to a string: "7.1234567890123454E16"
use the global function getSteamIDFromUsername
public static String getSteamIDFromUsername(String var0) {
if (SteamUtils.isSteamModeEnabled() && GameClient.bClient) {
IsoPlayer var1 = GameClient.instance.getPlayerFromUsername(var0);
if (var1 != null) {
return SteamUtils.convertSteamIDToString(var1.getSteamID());
}
}
return null;
}
though probably wont work serverside
Oh, so close
print(string.format("%.0f", getPlayer():getSteamID()))
the last digit with this is inaccurate tho
Thanks. Yeah, the last digit is lost to floating point precision. There's no way to get it back without a Java function that returns a string.
And I do need it server-side
Has changing the vehicle sounds as in driving not just start stop and idle been discovered yet??
does anyone know the RCON command to enable/disable thunder?
What's the command to send a blue system message to a player
the jd-core it uses is kinda outdated. jd-gui wont work on pz anymore so i'd assume jd-eclipse is also broken
Ouch, is there another tool that works?
the decompiler from intellij works fine, i just run it from the command line to bulk decompile the code and skip using the ide itself
so can use intellij to browse, or just use it to decompile then use w/e your preference is
Cool, thanks @quasi geode
Anyone think we'll get a "Day One" mod for PZ when they add NPCs
So in a mod of mine, there are some recipes that use guns as ingredients but broken guns don’t work. Is there a way to include broken guns in the ingredients?
How possible is it to edit the range of power/consumption of fuel used by a generator?
I think you can give yourself infinite trait points in sandbox settings
How do you call this static function from lua?
public class GameServer {
public static UdpConnection getConnectionFromPlayer(IsoPlayer var0) {
Long var1 = (Long)PlayerToAddressMap.get(var0);
return var1 == null ? null : udpEngine.getActiveConnection(var1);
}
}
I tried GameServer.getConnectionFromPlayer(playerObj), but it errors: "attempted index: getConnectionFromPlayer of non-table: null"
It's like it doesn't see the GameServer class
I misunderstood the interface between LUA and Java. The lua appears to only have access to Java functions exposed by LuaManager.class.
QUESTION: I don't see any function in LuaManager.class that allows you to send system messages to a single player. Does one exist?
how do I best extend another mod? if I wanted for example to change the behaviour of another modded gun, or if I found a bug in a mod and fix it myself? do I just re-define the item in question and call it done?
I'm looking for a mod that adds a space heater that hooks up to electricity in my base, someone said there is one but I cannot find it in the workshop
is there tarkov mod
Send message to a player? Like select 1 player from multiple and send them a function / message?
local players = getOnlinePlayers();
local playerindex = math.floor(ZombRand(0,players:size()));
local myplayerobject = getOnlinePlayers():get(playerindex);
sendServerCommand(myplayerobject, "MyModule", "MyCommand", {msg = "Test"});
wouled send the comand only to that player
it is possible to create a mod, like the sleeping bags are your respawn point just like RUST, that would be cool.
I mean to send a blue text system message, like the welcome message when you first join a server or when you teleport. The purpose is to give the player written feedback when they attempt to perform an action.
add text to chat?
Yes...
local function AddTextInChat(text, tabTitle)
local chatText
for i, tab in ipairs(ISChat.instance.tabs) do
if tab and tab.tabTitle == tabTitle then
chatText = tab
break
end
end
if chatText.tabTitle ~= ISChat.instance.chatText.tabTitle then
local alreadyExist = false;
for i,blinkedTab in ipairs(ISChat.instance.panel.blinkTabs) do
if blinkedTab == chatText.tabTitle then
alreadyExist = true;
break;
end
end
if alreadyExist == false then
table.insert(ISChat.instance.panel.blinkTabs, chatText.tabTitle);
end
end
local vscroll = chatText.vscroll
local scrolledToBottom = (chatText:getScrollHeight() <= chatText:getHeight()) or (vscroll and vscroll.pos == 1)
if #chatText.chatTextLines > ISChat.maxLine then
local newLines = {};
for i,v in ipairs(chatText.chatTextLines) do
if i ~= 1 then
table.insert(newLines, v);
end
end
table.insert(newLines, text .. " <LINE> ");
chatText.chatTextLines = newLines;
else
table.insert(chatText.chatTextLines, text .. " <LINE> ");
end
chatText.text = ""
local newText = ""
for i, v in ipairs(chatText.chatTextLines) do
if i == #chatText.chatTextLines then
v = string.gsub(v, " <LINE> $", "")
end
newText = newText .. v
end
chatText.text = newText
chatText:paginate()
if scrolledToBottom then
chatText:setYScroll(-10000);
end
end
Nice. Can you send the text just to a specific player?
this is client side
Ah, I need the server to send a system message to a player.
you can send a server command to a specific player to cause this code to run
Cool, thanks
@drifting stump sorry for the ping, but do you know what .lua file or API I need to be looking into to create a blank inventory page I can use to add/remove items?