#mod_development
1 messages · Page 507 of 1
In your steam installation place there's a folder called workshop.
i could put together a soundtrack list but i have no idea how to implement it
Also I'd like to add, my mod has no errors, it just doesn't do one of the methods properly but I'm trying to see which exact part it stops at
and i dont mean like adding music to the game i mean like changing the music built into the game
from what i understand the soundtrack is like a dynamic thing
it has events set up to play certain songs at certain times
you can throw out print() which will log to the console.txt
though i wish it didnt depend on yhat
and instead played a random selection of songs at certain times of days
i figure splitting it up in between day and night could be a good soundtrack
alright, so I'm assuming that means there's no way to print to the F11 menu
that's kind of disappointing lol
i'm not sure, honestly
but i think one full day in zomboid is about an hour right
by default yes
do you think it would be easy to achieve what i wanna do with this
i actually wish i just knew someone who could help me w it i can provide the music n stuff but i have no idea how to make it work in game
I don't really know, all I can really suggest is looking for a mod that might have a similar function and peaking into the source code lol
basically what you're aiming for is to have a mod where it plays a random song from a list, depending on if it's day or night?
I'm braindead, just realized print shows in the in-game console but my problem was I was putting it after return so it didn't work and was giving an error 
how do i write to the global ModData
glad you got it sorted out 
thank you lol
can anybody tell me why the wheels are not visible despite them being properly referenced in files and being there in the first place
IMPORTANT TO NOTE: Project Zomboid IWBUMS beta update 41.51 contains significant optimizations to our save game system. As such any saved games played in 41.50 will NOT be operational. A separate Steam beta containing the previous 41.50 build has been provided so that you can continue and finish ...
Does anyone have any idea why zombies wouldn't reanimate until you grabbed them and placed them back down?
I'm trying to make a mod that reanimates zombies after a certain amount of time, and it works perfectly in single player, but not in multiplayer
It's based on the Event OnContainerUpdate
Hello I have a problem with sendClientCommand. I am trying to use it to run a method on a zombie which seems only to run on the local client. But I can not put a zombie in the KahluaTable in sendClientCommand without getting an error message.
ERROR: sendClientCommand: can't save key,value=1.0,zombie.characters.IsoZombie@381de54c
Is there a way of doing something with a zombie on more than just the local client?
Try on the modeling channel, it's more they stuff
Wilco
Anyone have a tutorial or example mod for multiplayer features? Especially doing a timed action from one player to another
I would also be interested in such a thing. Passing a player reference into sendClientCommand a gives an error message like ERROR: sendClientCommand: can't save key,value=1.0,zombie.characters.IsoPlayer@4811979a
could it be similar to the networking they describe for ModData?
where you have to transmit() and request()
Hey that's a good idea maybe that will work.
also, i must be passing the wrong parameter to mod data because i can't get a table to initialize
i'm doing ModData.add("name", { One = "One" })
What is your whole code for that, including what checks if the table has initialized?
It seems that nothing in my game is drying...how peculiar.
Seems like i have a problem with this functions.
Does anyone know how you add "hoodie up" and "hoodie down" properly?
For some reason i cannot wear the piece of cloth with "Hood up".
But if i choose "Hood down" and then when is equiped i can choose "Hood up" and it works.
Okay, sometimes it works the other way around. Super weird
Now i cannot wear them with "Hood down" initially but "hood up"
sorry if I bother but is there a command to change the time?. for ex., change the hour to 12AM to 12PM, or to change to day to night?
or for make time pass faster
On the top right there is by default a button to speed up time (SIngleplayer tho)
If you just want to skip the night and you play with a few friends then you can go sleep all at the same time
we tried but time only skips like 30 game minutes
I had a similar problem, for me the clothes items (.xml file) were poorly defined. An identical GUID or forget to put it in the fileGuidTable
and my friends get bored for that
Yea, sometimes its one of those mistakes. 😄
But i trible checked everything, and booth variations work properly if i equip it and then switch. So i think booth variations are properly defined
Yea all have to be very tired.
In my MP sessions we usually slept alot longer like 10 hours
Eventually you have to turn on in your sandbox settings "Need sleep"
There is one for that you are allowed to sleep, and one setting that you actually need it
okey, thx for the help 
How to define a "safe zone" in multiplayer, and where are these settings saved on the server?
Alternative you can also make the nights brighter:
It may make nights not that annoying
I’m thinking about playing raven creek when it’s updated, but I’m a bit confused about having to set randomised houses to never. I know it’s to stop entire apartments being safe houses but does that mean annotated maps will still work?
How hard do we think it would be to make a mod that adds color values to things like car doors and hoods. So that if I replace the hood on my white car with a hood I ripped from a black car it would keep it's original color.
Actually after doing texture for a car I know how hard that would be
Hmm, wet drainables don't dry.
anyone know how to create an infinite endurance trait?
setEndurance() if player has the trait seems pretty simple
Is there a mod that changes the texture of beds to add a blanket to it ? Having a bed without blanket in my bedroom looks weird
If you find a mod for that let me know I am curious to see how they would replace textures
does ANYONE here have ANY idea why a zombie WILL NOT RESURRECT until you have PICKED IT UP and PUT IT DOWN in multiplayer
PLEASE for the love of god this doesn't make ANY SENSE
@lapis stump please man they're going to have to put me in a straitjacket if this keeps up
I'm kinda new at modding Zomboid, but I have some questions if anyone could help. Does anyone know if there is a way to disable the vanilla boredom increase? I'm looking to tweak how it works, but boredom seems wonky in vanilla already. It seems to only increase if you are in a map-generated structure, so if you build your own room elsewhere, that does not make you bored (or it considers you still outside so it negates the boredom gain?)
I'm guessing this might be in the Java somewhere, most likely, which would be unfortunate.
if i were the devs, and i wanted a 3 letter string to represent FITNESS and STRENGTH, but it wasn't FIT and STR, what would I make them?
Guys , what does "Heat:-0.22," mean in recipe?
Why is it - and why is it -0.22? It's one about heating
@steady sparrow FTN, STN 🙂
Oh my god
you're my king
my sweet summer jesus
out of curiousity, where do those values come from?
Are you asking what is it in reality, and it's not documented?
I take back my compliments unfortunately
no problems 🙂
yeah, I am asking because the VHSs have their skill XPs like this:
FIS+100 (Fishing)
COO+100 (Cooking)
damn, so they decided not to use standard skill names
weird
it's also possible that it's some kind of alias and they didnt even expose str/fitness in such a way
yeah that's what i'm wondering
interestingly, they have Stress, but Stress is STS
But yeah, it would be fun to watch a movie and become hulk 🙂
which would lead one to believe that STR would be Strength, but no dice
holy shit i found it
if anyone has this question, media/lua/client/RadioCom/ISRadioInteractions.lua
I’m thinking about playing raven creek when it’s updated, but I’m a bit confused about having to set randomised houses to never. I know it’s to stop entire apartments being safe houses but does that mean annotated maps will still work?
you should ask in #mod_support
waht does "StopPower = 2," in gun scripts do?
Does anyone know, with the current modding support, can a bicycle or motorcycle could be added into the game?
Yes
They can
someone is already making a good motorcycle mod
Terminator 2 (Project Zomboid cover)
True motorcycles mod in progress. Will be released soon.
We can develop mods thanks to your support at Patreon: https://www.patreon.com/_tsar
And ko-fi donations: https://ko-fi.com/ki5mods
Only Tsar's Fans are here: https://discord.gg/xkCEcwGZMW
Music: Terminator 2: Judgment Day - Original Soundtrack by Br...
I would wait for this mod to release, and then add your own motorcycles ontop of it?
trying to do a onAIStateChange in lua and i don't know how to get the name of the state i am in from the object so i can conditonally on leaving the state i care about trigger something in the Zombie the "if(oldstate ????" is where i am stuck
local function update(character, newState, oldState)
if(character:isZombie() == false or oldState == nil)
then
return nil
end
if(oldState ??????????? == "ZombieEatBodyState")
then
print("-------------------------")
print("-- Zombie was eating body")
end
end
Events.OnAIStateChange.Add(update)```
That is beautiful! I thought with the current tools it'd be impossible to implement. I'll check if I can start with a simple bike then 🙂
function ISfunctiom:perform()
self.character:getInventory():AddItem("module.Item");
end
does anyone know how i could add an element of chance to this line, should i try rng or is there a system already in place within zomboid for this
ZombRand exists
if not player:getClothingItem_Hands() and ZombRand(3) == 0 then
local handPart = player:getBodyDamage():getBodyPart(BodyPartType.FromIndex(ZombRand(BodyPartType.ToIndex(BodyPartType.Hand_L),BodyPartType.ToIndex(BodyPartType.Hand_R) + 1)))
handPart:setScratched(true, true);
if ZombRand(5) == 0 then
handPart:setHaveGlass(true);
end
end
the pickup broken glass timedaction uses it in this fashion
Thanks heaps
Anyone have any idea how to change the image (texture) of the body in the health menu?
I found the file who manages the panel but nowhere in the file are the textures used.
Textures: media\ui\defense
Panel file: media\lua\client\XpSystem\ISUI\ISHealthPanel.lua
The only place I have found that male_base.png is used is here media\lua\client\XpSystem\ISUI\ISCharacterProtection.lua on the line o.bodyOutline = getTexture("media/ui/defense/" .. o.sex .. "_base.png") but it seem to never be use
Confirmation that o.bodyOutline = getTexture("media/ui/defense/" .. o.sex .. "_base.png") is useless, I changed it but nothing in game
Seems that all I found in media\ui\defense is for the defense menu (make sense) but even that panel don't change if I change the image. So I don't even know where the image that is used for the health panel is stored
But I seem like it's the only image like this in the game file. So I'm totally lost
@drifting ore my guess is you'd have to open and repackage some game files with FMOD. Its what I did when they first released Noiseworks to turn off the heartbeat before they balanced its volume.
Im sure there is a way to force a lua script to overwrite things, but idk how
I know there are images related to that in UI2.pack, but I have no idea how they're referenced
What is fmod ?
Thx, I will take a look
Is easiest way to open the game's files that arent loose
That I know of at least
this also lets you unpack and repack files
https://forum.bigant.com/thread-5237.html
I Have a feeling i have discovered a bug where
zombie.ai.states.ZombieTurnAlerted
zombie.ai.states.ZombieEatBodyState
zombie.ai.states.BumpedState
In lua appear as non-table objects as you can't getName for them causing errors. repeatable code below just run around some zombies and get them to be alerted / eat you and bump them by running into them.
local function update(character, newState, oldState)
newState:getName()
end
Events.OnAIStateChange.Add(update)
Documentation i am looking at: https://zomboid-javadoc.com/41.65/zombie/ai/State.html
New to modding so not sure if i am looking at bad doco etc as errors don't align with other types.
Ok so it's for open compressed file, thx, I didn't know that PZ use that
is anyone collaborating on a larger project? id like to learn how to do some things myself if possible
Is there any list of the working mods in build 41 multiplayer?
Wanted to ask, is there any easy way to set the temperature to a constantt -20?
Thank you
Any russian to play on b41?
Hi hi!!
Does somebody ever used the applyTraits function?
I'm trying to "recalculate" the XP boost based on traits during a game.
Chuck already explained and helped me a lot so I made progress but I'm still missing something and I don't want to only bother him 😂
So I tried to run this in the Events.LevelPerk.Add event but it simply crashes the game
player:applyTraits(getWorld():getLuaTraits())
So I tried to do it a little bit more manual and only pass the list of current traits the player has
local playerTraits = player:getTraits(); local array = {}; for i=0, playerTraits:size()-1 do local trait = playerTraits:get(i); array[i] = trait; print(array[i]); end
This is working because I can see that every time the LevelPerk Event runs the print of the current traits is correct but when I then use this:
player:applyTraits(array);
I'm getting this:
ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: at MethodArguments.assertValid line:123.
So that "array" that contains the trait names, is not being received as an "ArrayList<String> var1" right?
i made a mod and i want to add localization. i dont have much time, so trying to prioritize the languages that people most play the game with. does anyone have data on the most used languages for this game?
anyone have experience with translate files? and getText() ? its like mine dont want to work at all
context:addOption(getText("Test_Test"))
and then i have a file in media/lua/shared/Translate/EN/mytranslate.txt
which look like this
Test_Test = "test field"
}```
when when i then open the game and test what the option is called it only have "Test_Test" as name and not test field
paste usage?
oh, you did
im so blind
you used a string literal in your getText call it looks like
instead of TEST_EN.Test_Test or w/e
just becausse all the example i found in vanilla game is used like that. hmm
also didnt work hmm
ah youre right, looking at other usages
player:getTraits() returns a TraitCollection
here:
local playerTraits = player:getTraits(); -- Returns a TraitCollection
local array = {};
for i=0, playerTraits:size()-1 do
local trait = playerTraits:get(i);
array[i] = trait;
print(array[i]);
end
you are "converting" this collection to a LuaTable, but the player:applyTraits(arr) method only accepts an ArrayList<String>
https://zomboid-javadoc.com/41.65/zombie/characters/IsoGameCharacter.html#getTraits()
I can't help with more stuff because I've never modified zomboid, and the documentation doesn't help much
Hmmm yeah I supposed it was something like that 🤦🏻♀️ damn
Thanks, will try to convert that lol
Anyone know where clumsy perk is applied? How do I make a character louder or quieter?
cant seems to get it to work at all hmm
Has anyone made a left 4 dead style mod? With tanks and witches maybe?
if you have a Lua file in the exact same location and with the exact same name as one of the vanilla files, will it overwrite the vanilla file?
Does anyone knows in which file the can opener distribution exists? And is there someone who can answer just a few more questions about distribution lists?
in lua/server/items/proceduraldistribution.lua you should be able to ctrl+f for the can opener item name
for some reason there is none O.o
no "canopener" no "can opener"
hmm maybe "tinopener"
I guess that is it
you can try looking through the files in media/scripts for the ingame display name to find it as well
So I have a quick question about this then. Let's say I want to add my new item into this procedural list.
One list the can opener is listed in is this
BreakRoomCounter = {
rolls = 4,
items = {
"Bowl", 10,
"Cereal", 6,
"Coffee2", 10,
"Honey", 4,
"Mugl", 4,
"MugRed", 4,
"MugWhite", 4,
"OatsRaw", 8,
"Popcorn", 8,
"Spoon", 10,
"Sugar", 6,
"SugarBrown", 6,
"Teabag2", 8,
},
junk = {
rolls = 1,
items = {
"DishCloth", 50,
"Kettle", 50,
"Saucepan", 25,
"TinOpener", 25,
}
}
},
Lett's say I wanna add my custom item here under junks of breakroom counter
should the correct line be like this?
table.insert(ProceduralDistributions["junk"]["BreakRoomCounter"].items, "ID.CustomItemName");
You need a second line for the spawn chance.
just a heads up you don't need the [""]
Yes I know about that
table.insert(ProceduralDistributions["junk"]["BreakRoomCounter"].items, 4);
i think you have to switch the junk and container name
x["y"]["z"] = x.y.z
so breakroomcounter.junk instead
hmm
isnt junk a list inside breakroomcounter?
Oh yeah, the junk part s no beuno, but you got the foundation down.
ProceduralDistributions.list.BreakRoomCounter.junk.items should be the correct formatting to spawn them in junk.
yeap
alrighty I will try this soon
I couldn't grasp these lists notations by trial and error
@sour island do you know how to add translate txt files ? have few problems with it so far
yeah lua takes getting used to lol
Translation is a mess honestly - but you have to encode txt files to the "correct" encoding per language
also they have to be in the correct language directory, and the script inside as to be named correctly
I don't know if the txt file names matter - as other scripts they don't
You may have to add something to Test_Test for it to get picked up by context
ContextMenu_EN = {
ContextMenu_DownHoodie = "Hood Down",
ContextMenu_VisorUp = "Visor Up",
ContextMenu_VisorDown = "Visor Down",
ContextMenu_Tighten = "Tighten",
ContextMenu_Untighten = "Untighten",
}
I think each translation block has to be in it's own file
I don't know if the file name matters but I have it named "ContextMenu_EN.txt"
hmm i will try that
I need help to make the following adjustments:
- Adjust zombie speed
- Adjust player speed
- Adjust zombie hearing
- Adjust zombie sight
- Adjust player loudness
- Adjust player hiddenness
please help 🙂
Items_EN = { DisplayName_Civilian_Helicopter_Helmet= "Civilian Helicopter Helmet",
displayn ames have their own file too
Is there a way to make a backpack change its model the more items it has inside it?
I would assume the specific menus try to look for certain phrases to be faster
If anyone can point me to something or another mod or give any help, feel free to @ me.
Thank you
Hey hey!!
I need a little help. Doing my first translation mod.
So I'm trying to translate Arsenal mod to PTBR and the majority of my translations it's working fine but when it's related to the UI_PTBR.txt files the game don't recognize the Foreign Characters, and instead it shows the translated option Characters like this.
Is there something I need to do for the game files recognize the Foreign Characters in the translated files?
I can use the help for these 2 questions if you insist 😄
-
Is there a recipe/action in scripts about car battery uninstalling and installing it back? I've created a mod item which should have screwdriver properties. But even though my item has screwdriver tag it doesn't seem to work with car batteries but I couldn't find any script about it.
-
Is there a way so that I can make my model appear when using screwdriver actions, bcz for screwdriver actions, a screwdriver appears instead of my custom model. However, my model appears for can opening and slicing. These are all actions my item can do.
you need to change the encoder on the text file
you'll have to look up what encoder to use for the language you want though
thx dude , this change fixed the problem 😄
nice
look up customizable zombies
yeah fairly certain this is bugged where do you report issues with the API?
Hey all. Hoping someone can help me here. Is it possible to make it so my server has, say, 1% sprinters?
Or if this is even possible with the current sandbox settings because I don't think it is.
Hi
Can someone help me with the following :
-
WaterShutModifier = 30 and the server day is 30 -> electricity will be turned off till a player fixes it. Will this event happen again based on WaterShut param?
-
WaterShutModifier = 30 and the server day is 30 -> electricity will be turned off
If I manually update the WaterShutModifier = 100 , will the electricity be automatically turned back on ?
Where I want to get is the scenario where a player doesn't necessary have to fix the water or elec, but can wait X days , with the chance of it happening in the future ?
Hi,
I would like to know please, if i took a barrel mod but i change the .tile, when i make spawn the Item, it's gonna spawn a barrel or my custom tile ?
Sorry for my bad english
-- dice roll followed by if statement with the following to make them sprint, have the function fire on zombie spawn
zombie:changeSpeed(1);
zombie:DoZombieStats();
I take it Sandbox+ is still not updated for Main branch B41????
Fuck I know NOTHING about modding - I would gladly pay someone to make this a mod on my server. Or to make me a custom mod pack for this.
What is sandbox+
hmm tried with contextmeny and still dont work xD
did you change:
TEST_EN = {
Test_Test = "test field"
}
```to
ContextMenu_EN = {
ContextMenu_TestTest = "Test field",
}
ContextMenu_EN = {
ContextMenu_Test1 = "test field",
}
``` what i did
then: context:addOption(getText("ContextMenu_Test1")) ?
from vanilla files 'ContextMenu_' is needed
that one still not work
Are you sure the addoption is firing?
yea i am
where are you putting the translation file?
/media/lua/shared/Translate/EN/ContextMenu_EN.txt ?
the file probably needs to be named ContextMenu_EN
you're also not stacking multiple blocks inside right?
{ } is a block
renamed its only one block
and this time it work thx hmm but sometimes it look like other modders have other random names for the translate files but thx chuck 🙂
yeah i'm not that wel lversed in it either
As long as it stays in lua code, you don't need a specific name. But for files in scripts etc, yes
I wish they'd just add a UI for it
What is tiledef please ?
but i just though by default the game would check and read the file from the dic but no 😛
anyone know how to make it so your recipe has [number] of [various items]
so like, 10 pairs of shoes, of what ever type?
i currently have it as
keep Item1/Item2/Item3
keep Item1/Item2/Item3
keep Item1/Item2/Item3
but that looks really uglyu
A mod. It has settings that you are trying to create, such as varied zed speed and percentages of zeds that will be that way
I like to use it to make 5-10% of zeds slow shamblers so herding zeds to move them isnt as easy, as there will always be stragglers to round up or forgotten about.
Be careful with sandbox+ as it overrides something that impacts modoptions and similar menu altering mods
Oh wow this is exactly what I need!
does keep Item1/Item2/Item3=4 work?
no; that allows 4 of each type, but as a stack
that it would allow Item1 {4} or Item2 {4}, but not Item1 {2} and Item2 {2}
Think it's safe if I just do it for sprinter %?
is there any way to overwrite vanilla functions in a local table without overwriting the whole lua file?
no, that's the point of the local unfortunately
great, I just want to change some logic with car repairs but its all in a local Commands table, guess im overwriting the whole file
Anyone know if it’s possible to disable buildings burning but not disable fire?
Is the voiced tv and radio mod released or still being worked on?
Forgot what it was called
survivor radio?
Ah
It's directly related to the menu changes it makes.
Thanks 😄
If you try to use modOptions and Sandbox+ the settings for modOptions won't be able to save
I use mod options but never modify it or change anything in it
And never have.
Would I still be safe?
If you're on default modoptions sure...
I am and have no plans on changing anything in it. So I should be ok . Worth a test maybe. Ty!
I just want like 1 or 2 percent sprinters.
What are you trying to change I’m curious
We don't like how engine parts only repair a tiny bit and you barely get any from a 100% engine, so we were going to change it to be a bit more reasonable on engine repairs
If you figure out where things like that are located let me know. I want to overhaul the storage in cars so that if I take x amount of seats from a car the storage increases by y. Same thing inversely. It’s gonna be a pain but I’m thinking more long term.
serverside Uninstall and Install part logic is in VehicleCommands.lua. You could perhaps overwrite that and use some logic to determine how many seat slots are empty and add capacity to the trunk
are there any mods that allow altering professions and/or profession related traits for MP?
dm, I'd put a semi-colon instead of a comma
how to do you escape ' characters in the Item declarations
is it not possible to have an apostrophe in an item name?
Anyone know of a good mod to add armor to vehicles? i cant find any
Anybody know how I can lower Brita guns spawn rarity? They spawn way too frequently.
I think there's a setting for options in the options menu
Assuming you have Mod Options turned on.
I can access the Admin Panel
And the server files etc.
I just don't know where to do it
Is there any quick tutorials on creating custom car mods?
@normal meteor @deft jacinth you should ask in #mod_support
Is the ability to upgrade backpacks using tailoring a mod or vanilla?
A mod
Any idea what mod it could be?
Authentic Z I think
Hi Guys I am new to PZ modding and I am facing a problem that seems silly but I can't get to the bottom of it.
vary basic with three lines of code:
local player = getPlayer();
local item = player:getSquare():AddWorldInventoryItem('Token.DeathToken', 0,0,0);
item:setName(player:getDescriptor():getForename() .. "'s Death Token");
when I run this in local it works creates and renames the item properly
but on a server setup the items gets created but not renamed. no error raised and in the debugger it seems to execute in the exact same way
getPlayer is a problem on multiplayer
oh
how should I approach it on the multiplayer side?
the weird thing is the item spawns properly so seems line 2 runs fine
Some way of picking the player, maybe getspecificplayer with the player index, and some way of getting which player index.
just the renaming does not go
getPlayer would just be a problem with more than one player perhaps then
seems player:getSquare() resolves well otherwise the item would not spawn in the tile the player is
You may have to use a client command to send the new name to the server and then have the server send server commands to the clients telling them to rename it?
This person posted a series of examples
is there any documentation on the changes the MP build introduced when it comes to modding and server/client communication?
I do not know :d
😛
how do I know what runs on client Vs server?
I mean for example when I subscribe a function to an event like Events.OnPlayerDeath.Add(myFunction);
is this going to run on the client side or the server side 😄
I am just trying these things myself and it seems if you do an event thing in lua\server, it also runs on the client, so I've just added if isServer() then to some server code to try again.
Lots and lots and lots of testing. You can launch more than 1 instance of zomboid and do testing on your own dedicated server. You just need to change '-Dzomboid.steam=1' to '-Dzomboid.steam=0' in the bat files that launch the game/server:
\steamapps\common\ProjectZomboid\ProjectZomboid64.bat
\steamapps\common\Project Zomboid Dedicated Server\StartServer64.bat
It takes a long time to something. :/
This is hard. transmitModData is failing to actually transmit the mod data in one context it seems.
Also you can not put a zombie reference in a client command, so I tried putting the zombie in the player's mod data and transmitting the mod data, but here also it gives an error message receiveObjectModData: index=-1 is invalid x,y,z=10839,9887,0
anyone playing hydrocraft mod can advice me on finding measuring tape ?
can't find that darn thing
Nooo this is for making mods not playing mods :|
this is a mess. with no proper documentation it becomes a lot of work to figure out things 😄
Is voip a moddable feature? Or only the devs can implement stuff on it? I really miss radio for long range voip (playing with some friends and discord gets chaotic when we split the party, usually is around 8 ppl playing together) something around project winter radio or barotrauma idunno only talking about this hoping that it will reach a dev one day
this is supper weird I isolated it to the Item:SetName(string) function it works on solo mode but doe snot work on server
I do not get it
I did not succeed in getting an update function on the server, so I tried transmitting the player's moddata, and then using a client command telling the server to read the moddata, but the server says receiveObjectModData: index=-1 is invalid x,y,z=10840,9888,0 and sees modData.ClientCommands as nil . :/
the client/server layer is very obscure
Maybe the client could tell the server to tell every client to do it.
I think to be able to run certain zombie methods on multiplayer, it will be necessary to come up with a way of passing the zombie reference to each client correctly. Perhaps the x y and z coordinates of the zombie could be passed, and each client could pick the closest zombie to the point. But then if the client states differ too much this could fail. I think I will just disable certain buggy functionality in multiplayer. :<
oh I see is it because with the new networking code the zombies can be controlles by different clients?
¯_(ツ)_/¯
😄
I keep getting an error pop up when I launch the game with my mod enabled but I can't seem to find anything in the console to point me towards it. Does anyone know how to find this error?
Have you looked for the word "stack"? The console says "error" a lot by default.
looking at some in game items that allow renaming like "Sheet of Paper"
the code is straight forward:
item:setName(button.parent.entry:getText());
item:setCustomName(true);
it works on client and on server setup
however it does not work with my custom item
that is very interesting
ctrl f'ing stack didn't come up with anything.
:|
ctrl+f for your file name. Not sure if you'll see anything after that if it's crashing, but worth a try.
Can anyone help me with my playable instruments mod?
I've been getting a lot of requests to fix it
scale the model down
it's scaled the same as the other .x weapon models
i mean scaled relatively, clearly not that big lol
and scale was applied before export
so idk
Double check the export settings. It might be applying a scale on export.
I can't remember if there's a scale in the scripts for weapons, but there is for cars. Check that too.
On my server I am doing it manually but you have to restart also. So I have a monthly algorithm for the Water and Electricity shortage. but I cannot yet write a mod for this game. 20 hours in.
And if you adjusted anything in object mode, make sure you apply the changes before you export.
That's all I can think of for what the issue could be
ok this is funny, seems the problem is because I am running the code on the onPlayerDeath event. for some reason it misbehaves there but in other places runs fine
what's the issue?
How do you bind lua to a Vehicle's update function dynamically?
or a vehicle part's update function?
well I used to do it a really janky way, through recipes that played a sound
I need to make it so it's a context menu option instead, I think
And then do stuff with emitters
hmm
you can have it emit a sound at will basically
(I was just digging around the Radio/TV code so i'm familiar now)
Oh you should look under the hood of SR then too!
Survivor Radio that is
I was able to get it to play sounds by hooking up the media line code of drunkeness to a table that has all the songs
yeah the media line code is troll as hell
but it seems pretty robust
you wouldn't happen to know how to bind to a vehicle's update hooks would you?
I haven't really worked with vehicles at all~
What are you planning on doing with that?
Also any help on this is appreciated
#modeling message
any information on how to parse vehicles.data from the vehicles.db
When creating a custom spawn point.
How do you get those coordinates right?
{ worldX = 40, worldY = 23, posX = 77, posY = 180, posZ = 0 },
How is those coords relevant to the x, y of a player when the player coords are like 12200x6900
If you are talking about vehicles you can turn on the debug mode and view vehicles in an editor where it shows how coordinates relate to the vehicle. I assume it works the same for whatever though.
I have been doing tests all day the item:setName function is silently failing in some situations and I can't make sense of it
I want the server to spawn an item and rename it . I got a server side function that does it and call it with sendClientCommand. everything works except item:setName
😦
oh wait it does reflect the name after I log of and login again
seems the problem now is the client is not updating or refreshing
Anybody knows how to refresh the client side UI
What's the difference between Nutritionist and Nutritionist2? ( Just a sample ) What the number following the trait indicates/refers to/means?
is there some sort of modding utility to update mods in-game
like to make changes to a mod and see effect immediately
affect, effect?
yes start the game in debug mode and press F11 in game
you can reload script files from there
and setup breakpoints and stuff
cool beans skinny jeans
Found the answer by myself finally...I report it just in case it could be of help for others...
If the trait is followed by the number 2 it means that the trait ( in the traits selection menu ) CAN NOT be deselected/removed by the player. In brief 2 = Locked.
Without the number, the trait of interest, CAN be removed by the player at will.
Maybe because the item's name is updated on the server, when a client rejoins, the client downloads the server's data for the item instead of keeping its own where the item's name has not been changed.
Have you tried having the server send a command to each client telling them to update the item's name?
Do i need " DoLuaChecksum " as closed coop server? I mean, one of the mods just got updated and my own MP mod test playground got angry at me, LOL.
Or any way to disable this mod version thing for my own server?
Good thing our live coop server vanilla.
Any mods with flamethrowers?
has anyone figured out how to make custom CDs yet?
im noticing some mods ive downloaded before that no longer exist in the workshop, is it alright to reupload those?
no
unless you get the author's permission
i figured
is there a way to completely disable this version to server checkup in MP?
Im running closed server to myself and maybe 1-2 friends, basically private coop, so that " anti-cheat measure " is kinda...more annoying then useful.
There's not really a good reason to, honestly. Even if it's just you and 2+ other people, if 1 has an out of date file and others don't all sorts of weird stuff could happen, probably desync. Also, #mod_support
Hardly gonna happen, since we play only together.
The error wouldn't happen if it wasn't already happening lol.
It's not just an anti-cheat measure.
If the mod affected zombies or players or vehicles, it could lead to some pretty nasty desyncs due to differences between predicted and expected movement.
Hey there. Is it possible to edit a mod? I've downloaded a mod and i wanted to change the color of an item in it
does anyone use ItemZed for making mods? I am working on a mod trying figure out how to do it.. got the items spawning in world atm but there is a few things i cant work out how to do and need some help if possible
Like i said, when 3 real life friends play only with each other or in solo, while using only all approved mods, that were downloaded from loading to server first time, chances someone would have different conflicted version, are rather slim, are they not?
at least way less, then doing all these jumbo jambo with game files
N
No, because
if you're having the issue at all where it stops you from joining
you have conflicted versions
Then any way to make server update WITH workshop and not be " stuck " in past?
since I do not see this problem with solo, which means gameworld shouldn't " bork " itself if some random mode from the list gets an update.
restart the server
That would be just fine, if it worked
, that problem is server is not even letting me, the creator in.
The only thing that worked was that " super convenient " way of deleting all mods from steam folder and zomboid folder, then redownloading them, then manually putting freshly downloaded mods into zomboid folder.
And doing that eeeevery single time someone gets and update is rather irritating.
where is the code that does the actual loot generation?
like whatever is interpreting the loot tables
and placing stuff in containers
that's ItemPickerJava
it also fires an OnFillContainer event for scripts to take part in loot generation
ah i see
oh it's only rolled the first time the container is opened:
if not object:getContainer():isExplored() then
if not isClient() then
ItemPicker.fillContainer(object:getContainer(), playerObj);
else
object:getContainer():requestServerItemsForContainer();
end
object:getContainer():setExplored(true);
end
didn't realise it worked like that
im trying to make my generator let me connect it to base and add fuel etc.. but not sure how to do this?
what do you mean? that's how generators work in vanilla
yes.. but when i place it on ground its only a small icon and when i right-click it the option to connect is not there..
i made a new book for teaching how to use it.. but that dosnt help.. reading normal book dosnt help either
you've made a new generator item?
how are you spawning the generator item?
right now only can get it using admin and spawn items menu.. works for normal generator like this
what is the name of the generator in your script?
im using ItemZed and its Enhanced Generator for now not sure on name just yet
can you find it in newitems.txt and see what it's called?
i.e. vanilla one is
item Generator
{
...
}
so, when you drop an item it ends up calling IsoGridSquare#AddWorldInventoryItem(...)
item Enhanced Generator
{
DisplayCategory = Electronics,
Weight = 40,
Type = Normal,
DisplayName = Enhanced Generator,
Icon = Generator,
Tooltip = Tooltip_Generator,
RequiresEquippedBothHands = true,
MetalValue = 500,
ConditionMax = 100,
}```
which does:
if (arg0.getFullType().contains(".Generator")) {
new IsoGenerator(arg0, IsoWorld.instance.CurrentCell, this);
return arg0;
}
weight etc is going to be changed
try making that item Generator Enhanced
ok renamed it.. loading to test
Put the mods in a collection, every time it desyncs, unsubscribe and resubscribe.
Much faster than manually deleting and reinstalling.
If you're not using the workshop, you're SOL anyway.
ok so that gives me option to connect.. testing make sure book works
but does it help the host?
It should.
or host still needs file jumping?
The server should just need to update the mods and restart, while the players just need to unsubscribe and resubscribe.
ok so reading the new book didnt make it so i can connect generator.. using the old book does.. any way to make it only the new book lets me connect generator?
not without changing ISWorldObjectContextMenu code
it does this
if not playerObj:isRecipeKnown("Generator") then
so the recipe needs to be literally called "Generator"
can i add that line to the generator code?
no, the game will always let you connect it with the old book with its own code
ok i can work with that haha
is there away to make it to let me add upgrades to it?
I.e connect a barrel to it to increase fuel capacity?
and a range extender?
nope, those are constant for every generator in the Java code
I'm trying to upload my second mod to the workshop but it's uploading it under the same ID as the first one I uploaded. Any tips on how to change the ID or generate another one?
if you try to give a generator more than 100 fuel it just does
if (this.fuel > 100.0F) {
this.fuel = 100.0F;
}
ah ok, can i make a new item that will extender the generator range?
and a item to connect a 2nd generator as a backup that auto starts when first runs out of fuel?
I think you probably could, but that's not something I have a quick solution for that I can suggest
hehe no worries.. hopfully someone else can tell me how to do it ^.^
Figured it out
so for anyone else that might be able to help dont mind if its short / quick or complicated
How can i increase the range of my generator either by a extender item or otherwise and how can i make a item that will let me connect to a 2nd generator and use it as a backup that will auto start if first runs out of fuel?
thank you in advance
Can someone make more funny mods
no u
Is there a limit on the size of a building? like can it cover multiple cells?
Nevermind, 300x300 limit in building editor
Is there a way to stop players from picking perks and only allow the random option?
where can i find the code that shows all spawning locations of items?
media/lua/server/items/ProceduralDistributions.lua
Distributions.lua also has the item spawns for stuff inside of bags
thankies
has anyone ever had the scrap mods working in multiplayer?
they seem like a great idea, but none of them work on my multiplayer server
so there is doughnut spawns, yet for some reason i dont see any on riverside donut shop
huh
weird
There is really not much you can do with generators. It's very limited what is exposed and what can be done.
damn ok.. i know that there are some solar mods that power bases etc was hoping i could do similar to that with the normal generator
Trying to translate to other languages, what did i do wrong tho?
same happens with tooltips
and when i try to translate other mods in other languages, sometimes they just wont translate no matter what
you need to change the encoder on the text file
what about that?
Is there a way to print in the logs?
Btw its UTF-8
isnt UTF-8 enough?
which one do i change to tho?
no idea, you'd have to look up what encoder you need to use for the characters you want
russian characters, seems like UTF supports them
you need Windows 1251 i think
in notepad++ you do this
Hey, how can I activate the well-known Build 33 Creative Mode in the current build? 😄
This one
Sneak peek at upcoming build 33's new Creative Mode. http://projectzomboid.com/blog/2015/07/the-creative-revolution/
The Creative Revolution
Today we come to you with an awesome new mode for Build 33 that should have an explosive impact on the Project Zomboid modding and mapping scene, as well as providing a fun new way to play the game.
Crea...
it was never finished and all the code is like 6 years old now
kk
also i gues it would be hard to intergrate that with the world builder tool ^^
When NPCs arrive, I'm hoping to make a mod on base building, settlement building & factions
theres that one mod i remember called littering mod
and i remember there was a patch to make it iwbums compatible, but i doubt its even updated to the current stable build
it wouldn't hurt trying to convert the code for current build right?
Anybody know how to lower the spawn rate of Britas weapons?
one way would be to manually change the code, but i know theres a mod that rebalances it and makes it that only weapons that is before and on 1990's, unsure if its updated for full version though
anyone know how to make a lootable map with the new map system?
all the current mods on the Workshop are broken
In options menu you lower the spawn chances
Which options menu? I could only find the default one, and they're already set to as rare as can be and we still find a bunch
How about changing loot settings to extremely rare for ranged weapons?
Hey guys, am working on a mod that contains books, I was wondering how I can make a book not disappear after being read. Does anybody know how to do this?
Found an older mod using set DisappearOnUse(false);, However this does not seem to work anymore
books always consumes unless its a magazine for recipes or skill book
No way to mod it to not disappear?
itd the same for comic book and newspaper in game
i honestly dont know
you could try checking some book mods
maybe their code might help ya a bit, im no modder yet
Well geuss I"m going on a wild hunt to find where in the code the disappearing is coded
whats the book supposed to be anyway?
It's a bible
and its supposed to remove boredom and stress right?
yep, but it should not be used up, because it's a bible
maybe, but then again, pretty much all of the ones that decrease boredom, stress, and unhappiness makes the book just thanosd out of existance once you used it
if it isnt a recipe book or skill book, its gonna disappear
wait i worded that wrong
lol
presumably both of those still have the same base, so there has to be some condition that makes it disappear
Anyone know what mod this is from? Helicopter dropped it on the server I'm on
Does it drop next to you, or did you had to find it?
It's probably expanded helicopter event
Is there a way to stop players from picking perks and only allow the random option?
Anyone knows how to get a string of the instance of an object? I've seen instanceof being used but it works by giving you a true/false of the class you want to check against
It is
So I've found where the reading of books is handled, but don't really see anything about books getting removed after being fully read. One solution I've thought of is just adding the item back to the players inventory after he's read it, but that feels like such a cheap fix
If it works, it's not a cheap fix XD
Any information on how to parse the data field in vehicles db?
Hi, I'm trying to find an addon to import .x files in Blender v.2.93.1 but this one I found doesn't work:
||https://github.com/spamandeggs/directX_blender/wiki||
Could someone guide me in finding a solution? Thank you!
convert to .dae and you should be able to import it
https://3d-convert.com/en/
Convert any 3D files easily and quickly with our free online converter. Whether it's STL files for 3D printing, OBJ files for computer animation or CAD: we can easily convert them all. Give it a try.
I want to add a new custom item to Police Zombie inventory only
table.insert(SuburbsDistributions["Police"]["inventorymale"].items
Is this correct?
so i am a bit curious about what the limits of the modding API would be. I want to make a mod that would make it possible for the mappers to add in basements, sewer systems etc. would that be something that would be possible to make ?
Hey guys ! I'm interested into making a mod for this game but i literally have zero experience in modding at all. I had an idea of making a 90's clothing, makeup and possibly hairstyles modpack, so only cosmetics, do you guys think it's going to be hard for a beginner like me ?
I downloaded Blender and i'm going to start watching tutorials to learn how to use it but what else do i need to make that idea a real mod ? Any advices are welcome 😄
hairstyles are really easy but clothing is kind of a pain because you have to make sure they dont clip
how do I make my drainable item useable ?
can anybody confirm if "Standardized Aiming (Gun) XP" works in MP?
How can I get one player to do a timed action on another? Do you have any idea for a mod that does this that I could check?
Is there a good location to find all of the in game inventory item icons?
Check the vanilla code for the health panel, maybe? It's under media/client/xpsystem, I think
What would be useful to me? I can't see
I recall there being timed actions when you treat another player?
I don't have a working desktop computer at the moment so I can't point you to a specific line
there is, i.e., ISMedicalCheck
relies on the server transmitting you info about their health though and it won't start doing that until you tell it to
They are all in media/texturepacks
But it's from the health panel ? I never try MP
yes, you can bandage/treat another players wounds
ISMedicalCheck contains timed actions targeting another player, I'd use it as an example of how to do that
Ok thx, I will check that
from the medical check window you can start e.g. a ISApplyBandage action, which will handle bandaging another player
though it relies on the ability to send that information over the network
you send a bandage packet to the server, server relays that to the correct player
Could anyone here help a guy successfully mod his nitrado dedicated server? I have the steam id's and workshop names and map names in the server config files, and i enabled the mods through the pz main menu, do i have to fully reinstall my server after doing all that? cause it said it'd erase my configuration files and all my saved settings if i did that. ALso do i have to put all the mod information directly into my steam files? as you can tell i dont really know what im doing, and i cant find the right resources on gurgle or reddit so i came here, big thanks to any and all helpers.
@drifting ore around?
I'm wondering, for your last update of The only cure, did you remove that file?
./mods/ModTemplate/media/lua/client/TOC_Update.lua
Yes. You could find the Lua file that creates that new character menu and delete code.
Damn i only started to watch a turorial on Blender and i'm already lost, there are so many things to learn ahah
bumping own msg
This is to change the location variables. Before it was at the root of modData. I changed that to put everything in a TOC table, it is to transfer the variables to the new tables. I would remove it in a future update. Tu veux dire quoi par around ?
question is there a way to take over a mod that the owner has abandoned> or is the owner the only one who can do anything?
The only thing you really could do is reach out and ask them for permission to take the project over or try to recreate it yourself
Well what do you want to use it for?
pills
:|
my item appears in game but has no context option "take pills" like pain killers etc.
pills are handled specially
there's no way to hook into adding your own for the built-in "Take pills" with Lua
you'll need to create a custom context menu option and action
well you can override ISTakePillAction:perform I suppose
to get the "Take pills" option to appear your items definition needs to start with "Pills"
like item item PillsMyCustomPills { ... }
thx ill try it
i can do OnEat on food to trigger custom functions what do pills use ?
Not sure if this is where the question belongs but does anyone know how to edit non-pvp zones via server files?
so ill have to make my own context menu and action?
that, or you can override ISTakePillAction:perform
do I override in my items.txt ?
you can't easily, they're stored in the binary meta file
no, Lua, there's probably some examples you can find of replacing an existing Lua function to add some additional functionality
I see, i've been trying to figure it out as doing it manually has been quite tedious
Yo does night sprinters & nocturnal zombies work?
is it possible to just detect when a player eats pills?
hey did you find out anything on this? I would like to do this as well. I found in java documentation that there is a a class called IsoFire that has a boolean check for 'Fire_IsSquareFlamable' that checks the gridsquare. It would seem if you could set that value off you could disable it; but I don't know where that data is stored & therefore what file to modify to do this
Whenever/ wherever you update the amount of pills left in the bottle to decrease it. Otherwise if you check when they choose to take the pills it could still be cancelled by sprinting or otherwise.
Sure, just change the ISTakePillAction:perform(). You add code at the end of it
the binary format for them is pretty simple and has a fixed size, so you could create a bunch of empty pvp zones then edit the file with a hex editor if that's easier
thx guys it works
Has no one made a lootable map of louisville mod yet ?
What's the best way to go about spawning zombies through lua right now? I'm currently using createHordeFromTo but I can't quite figure it out
https://zomboid-javadoc.com/41.65/zombie/Lua/LuaManager.GlobalObject.html#createZombie(float,float,float,zombie.characters.SurvivorDesc,int,zombie.iso.IsoDirections) I think.
3 float should be x, y and z and the int, the health [0-100]
Javadoc Project Zomboid Modding API declaration: package: zombie.Lua, class: LuaManager, class: GlobalObject
thanks much! ❤️ will take a look and see if that works any better
You'r welcome. check spawnHorde() too
yea I just found spawnZombies() in IsoRoom which seems promising as well
Anyone know of a way to differentiate between different UIs?
I use UIManager.getUI() to get all the UIs but I can't tell the difference between the bar at the bottom and the menu at the top left for example.
And ui:getUIName() is empty for all menus except the two inventories.
is it possible to add a custom /command to chat?
by empty do you mean created where i'm standing with a block size of 1? Also the only thing I could find was binary.DAT, is this the file im looking for? I appreciate the help and feedback 😄
yeah, and no, it's map_meta.bin
what is the event for a character being created?
so like OnPlayerSpawn? OnSurvivorCreate doesn't seem to be firing?
I use OnCreatePlayer on my mod for that
OnSurvivorCreate is intended for NPCs (or maybe an older NPC system) afaik
Riddle.AddMapToPlayer = function(index, player)
local inv = player:getInventory();
inv:addItem("Base.Milk");
end
Events.OnCreatePlayer.Add(Riddle.AddMapToPlayer)
any reason this wouldn't be occurring when starting a solo game?
Try inv:addItem("Milk");
I got it; for some reason my LUA is not reloading when i back out of a game. What's the best way to force files to refresh on the main menu? I have been going solo -> quit -> solo and it's been working fine for a while
Does setWoundInfectionLevel work? Can't seem to add regular infection
You can enable/disable a mod to reload lua. The debugger had a button to do it too, but I don't think it's working at the moment
guess i gotta set my mod name to AAA modname lmao
any idea why zombies spawned via lua will despawn when the character dies? dunno if this is unique to singleplayer or not
I have had some mod ideas but one public class is not exposed to Lua, and one function crashes the game when called from Lua, and data sending between clients doesn't include zombies. I have another idea but I will have to put some time into working out Vector3's with the bullet physics :s
how to print to log?
print(stuff, moreStuff)
And in \logs
could anyone let me know if it's possible to assign several randomized sounds to one event like a player levelup?
and perhaps also why sound would distort (go in and out of each ear) when moving your character after it starts playing?
this helped me, thank you
👍
what is the best way to detect if it is a Solo vs Hosted Vs Server game?
try isClient(), isServer(), and isCoopHost()
Is it possible to make custom zombies spawning with some chance?
With custom strength/speed/seeing&hearing stats
For the class Clock https://zomboid-javadoc.com/41.65/zombie/ui/Clock.html
When I use UIManager.getClock():setVisible(false) or ui:setVisible(false) the watch is still displayed, any idea? It should go invisible, like when you press V
Javadoc Project Zomboid Modding API declaration: package: zombie.ui, class: Clock
isCoopHost is true if you're hosting from the in-game menu
I don't think it actually does anything for remote play
@potent root
Anyone knows if the filewriter can access save gmae location or server save location?
Right now I have configuration files being written to the modfolder
which doesn't really help per save settings or MP
😮 getSandboxFileWriter
what directory would this be?
my first mod
I was baffled this wasn't already a thing so I made it myself: https://steamcommunity.com/sharedfiles/filedetails/?id=2713257456
I found that the clock, speed controls and moodles icons visibility is toogle by UIManager.setVisibleAllUI(true)
Check out my new mod for more immersion and less menu !
https://steamcommunity.com/sharedfiles/filedetails/?id=2713305028&searchtext=
Does anybody know where i can find moders I can commission?
I have some cool mod ideas so I just want to know where I can find someone/a place where I can find people who know how to mod and stuff
I have a very simple mod request but can you make it so you can wear ear rings on one ear?
Thanks its very important to my roleplay
oh man, I have so many question about that code 😂
public void removeSafeHouse(IsoPlayer player, boolean boolean1) {
if (player == null || player.getUsername().equals(this.getOwner()) || !player.accessLevel.equals("admin") && !player.accessLevel.equals("moderator") || boolean1) {
if (GameClient.bClient) {
GameClient.sendSafehouse(this, true);
}
if (GameServer.bServer) {
GameServer.sendSafehouse(this, true, (UdpConnection)null);
}
getSafehouseList().remove(this);
int int1 = this.x;
DebugLog.log("safehouse: removed " + int1 + "," + this.y + "," + this.w + "," + this.h + " owner=" + this.getOwner());
if (GameClient.bClient) {
LuaEventManager.triggerEvent("OnSafehousesChanged");
}
}
}
is udp still a thing? haven't heard that in ages
What is this? Code for player safe houses in MP?
does anybody know if hydrocraft is fully working on the new MP builds?
propose the idea maybe somebody gets interested
select which ear?
Yeah pretty much.
I believe there are already in game accesories that are one ear only
Really I don't see it for the ear rings
mayebe I am wrong
It should be super simple to mod. Maybe i can do it my self unsure
not sure how simple it would be
I have never expanded inventory or clothing slots
might be doable
of course it is, most realtime/voice/sound stuff etc use UDP
also many games I guess
yes
so If I understand correctl, it will release a safehouse if either:
- the player is null, or
- the player is the owner, or
- the player is NOT an admin and NOT a moderator, or
- if the last boolean (forced) is true
is it me or does that sound weird?
also this line is worrying me:
GameServer.sendSafehouse(this, true, (UdpConnection)null);
aaah 3) is to avoid players from releasing an admin or moderator safehouse, ok that makes sense
Check out #mod_development message
itd be easy
if you look at the item script for hoodies you can use the "clothingextra" thing to switvh between models for each ear
Ah nice ty
What good guns should I get in Firearms B41?
You know what would be great? A mod that adds shooting range where you can shoot empty cans with your weapons to improve aiming
good use of empty tin cans tbh
hey I'm struggling to understand how to implement tooltips like the one for the dismantle context menu if someone could point me in the right direction it would be much appreciated.
you mean when you right click something?
yeah sort of but not the menu itself the tooltip that shows up when hovering over that tells you info like what tool or skills you require for the action
humm
let me see if I can find something
addToolTip
do you have an example of the context menu entry creation?
when you call addOption to create an entry in the context menu the returned object has a .toolTip member
I'm wondering if having #mod_development after #mod_support in the list would reduce all those off-topic questions 😅
Hi, this may sounds stupid, but how do I save a variable value in my mod? every time the player reload their game, the variable I created in the mod reset to their default value. Is there a way to save their value?
store your stuff in obj;getModData() and use this to transmit to server: obj:transmitModData()
Thanks a lot! is there any example mod can I learn from? Nonetheless, thanks for the help!
check the lua code from the game
ok, thanks
I was thinking about it too, that should help
#mod-developing would make better sense gramatically
yeah whatever, just something less enticing for people who just want to ask question about this or that mod
I wish there was some kind of role registration or something, like when you have to read some text and click a specific emoji to get access to some channels
having mod support at the top of the list would probably be best
function First (player, context, worldobjects, test)
local playerObj = getSpecificPlayer(player)
if condition then
local var = something
if var then
context:addOption(getText("option"), var, ISWorldObjectContextMenu.Second,var, player);
end
end
end
ISWorldObjectContextMenu.Second = function(var, var2, player)
ISTimedActionQueue.add(timedAction:new(playerObj, WItem, 2000));
end
Events.OnPreFillWorldObjectContextMenu.Add(First)
``` this is a simplified version of my context menu and it works but in second func I am wanting to add a tooltip showing if they can or cant do the timed action.
I remember ISInventoryPaneContextMenu uses the word tooltip so you should be able to look at that and add a tooltip with however much lua.
thanks ill check it out
I meant ISInventoryPaneContextMenu
Has anyone made a sleeping bag/bedroll mod?
How about a mod where you can make something like a siege tower and you lean over the top to hit zombies in their heads while they can not reach you? And it's built over a car so you can drive off afterwards or pull it?
Or one where you walk ahead of a van and you have zombies pulling the van? Or you're not walking ahead of them, you're in the seat steering and the zombies are pushing it.
Or a gypsy wagon mod except you pull it? And with the animals update you could get some sheep and have them pull it.
Or a mod where you live on rooftops in the new city area, going from roof to roof with a plank or a ladder you carry, sleeping in a tent like thing roped to chimneys, entering houses to loot them by either going in through a window, or removing roof tiles and entering the attic? Actually you could sleep in the attics if there are attics.
A tree house mod where you stash your things in a tree and make a tree house and sleep in it and fight zombies from the tree.
Some of these ideas would be a bit hard :/
Well i guess you can build a tower with stairs access at first and once you put the sheet rope you can destroy the stairs
Is "PathTo" method for IsoGameCharacter unavailable anymore? I try to use it on an IsoZombie and it return "Tried to call nil" error.
u weird asl
Does anyone has been able to successful import a pullover with "UpHoodie" and "DownHoodie" feature?
For some reason only one variation works for me depending on the Up/Down state of the item. If i choose the wrong wear option the hoodie just dissappear
(It bugs also with found cloaks, not only with debug spawned stuff)
i'm not sure what you mean?
When i choose as initial state "UpHoodie" then a error appears and the item is gone
When i choose initially "DownHoodie" then it works and after its equipped i can properly put the hoodie up
is it already in the up state?
yep
what does the item script look like?
you could try removing the sub menu part maybe?
i removed it on mine and it works fine but i dont really understand how it works lol
ExtraOption line is a new contextMenu, which would eventually need a translation line.
not if you reuse the hoodie one though
Yes, this is about using the functionality but for other things, which is possible.
i'm looking at another mod that uses the submenu and its pretty much the same so i'm not sure what would be breaking it?
ClothingExtraSubmenu is the name definition of the menu for the item. When making my own submenu I noticed it can be quite fragile and prone to flagged errors that would delete the item.
yeah having to set a translation as the way you add a submenu feels really messy
is it supposed to tell it what the current item would be in the context menu?
I would say making the submenu is like adding a cherry on top. It’s not needed, but looks good.
Regarding the submenu, no, could be called whatever iirc.
So this is more of a serious one
How do you edit some of the game functions- such a moodles
if they are coded in java / .class files
Does it mean that you just can't or you need to think differently
I found the java documentation
https://github.com/Konijima/PZ-Community-API Aiteron contributed a custom moodle API - if you want to see how he has done it.
are there any tutorials on creating ui panels?
eye glow
Thank you so much chuck
Guys, does anyone know how exactly to do that? Like, what folder I should put it, and what exactly I should do? Can anyone please text me, if you know how to do that? Thanks
Anyone have ideas for a layout for the inventory menu? I have 2-3 ideas not bad but if you have already thought about it I am totally interested
I just thought of a mod idea Vape mod its like Cigrates but with multiple uses so if you have the smoker trait your not always looking for cigs
Hails mod 🤤💅🏻
I started a dedicated server with some friends but forgot to assign myself as admin , is there a way to access it after the server has been created?
It could be nice, with maybe several levels of nicotine for more or less efficiency
I've seen so many mods that has so much potential that they should be implemented to become part of the vanilla game as well
At the very least, the devs should lay those mods as foundation, and do some tweaks and patches to both their own preferences and to disinfect the errors caused by the mod
Exactly. Plus, they don't get destroyed so you can re-use them or smelt into something later
Also, is there any solar panel mod or anything else to have energy coming without using up all fuel on generators?
go to steamapps\workshop\content\108600 and then the folder named after the workshop ID of the mod you want and then copy the mods to "USER\Zomboid\mods"
Does anyone know how to check if the player is on the main menu?
isIngameState() seems to produce odd results for me...
Is there an event for when an item dries? Or any way to return the item that dried?
Hey there, I have a question. So I want to do HTTP request from my lua mod but I'm not sure there is support in Zomboid's Kahlua. Is there any workaround for doing a POST request?
to access a link?
actually that will do the trick, because I will be posting and retrive JSON data so yes, a basic HTTP request will do
You're the one ✨
openUrl("http://theindiestone.com/forums/index.php/forum/58-mods/")
@LuaMethod(
name = "openUrl",
global = true
)
public static void openURl(String var0) {
Desktop var1 = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
if (var1 != null && var1.isSupported(Action.BROWSE)) {
try {
URI var2 = new URI(var0);
var1.browse(var2);
} catch (Exception var3) {
ExceptionLogger.logException(var3);
}
}
}
2nd snippet is the java side - as it sounds like you're trying to do something specific
I will check this, thanks
I think there should be a DiscordWebhook or HTTPRequest function exported for Lua. Discord is widely used for servers and I'm sure server owners want to have logs imported to their Discord servers.
Are there any comprehensive guides for making tiled objects like furniture or containers that have their own properties? I'm not sure if I'm using the right terms here, so sorry if I ask funny or incorrectly!
Awesome, thank you!
Anyone have any suggestions for a mod that adds more lighting fixtures that works in MP?
modders: I love you all and your work is exceptional, but I humbly request that folks please stagger your updates and do fewer, more substantial updates rather than daily changes...
my MP server players are getting butthurt lol
Alright
I'm only looking for 2 mods that haven't been done before
One mod gives the option for "super tough" zombies. With the mod enabled it basically gives users an extra option for zombie toughness from weak to tough from weak to "super tough." What this does is that bullets will not kill zombies unless it's in the head. And you have to had shoot the zombo at least twice or 3 times for it to go down. When it comes to melee weapons make it so blunt do less dmg than normal so lower it's damage multiplier if the option is set to super tough zombies. Sharp weapons do the same amount of dmg they normally do but a couple stabs won't kill them. Also with knifes you cannot just go behind them and do that thing where it stabs the zombies head and they die. With this mod you can't do that to zombies and if you were to do that it'll do a bunch of damage but it won't kill the zombie and your knife/sharp weapon will get stuck inside the zombie's head with that you will be pushed away from the zombie.
My other mod will tie into the mod above. This is basically an advanced Aim outline. It takes inspiration with the Fall Out's outline thing where it high lights what part of the body you wish to shoot at. This will be the same but it won't slow down it's just the normal aim outline but being able to highlight more than just the zombie or the enemy but instead what specific part your aiming at. So like people with low level aim normally shoot the zombie's chest and high level aim players normally shoot the head. BUT ALSO if you use the scroll thing in your mouse you can scroll through what parts to shoot. So let's say i'm holding a shotgun and I scroll through head to the knees. If I shoot the knee the zombie will basically fall. I want to do the same with melee where it also high lights where you will stab/hit the zombie
Greetings, this seems to be outdated:
https://projectzomboid.com/modding/zombie/characters/skills/PerkFactory.Perks.html
Can somebody help me to know if
- There's a better place to check for existing Zomboid classes
- What is the Perks name for the Tailoring?
@cedar turret Sounds nice, good luck!
@drifting ore It's better to target such request to specific people, as nobody will notice one message in thousands here.
I feel your pain though 🙂
yeah, I understand completely. and I don't really fault modders for wanting to keep their content up to date, it must be a tricky balance to try and manage
didn't really want to call out any specific creators individually though, it's was more a general vent of minor frustration (mostly because some of my players don't know how to properly keep updated and I wake up every day to 3-4 messages of "SERVERS DOWN AGAIN WTF DRUNKEN" 😛
thanks for listening either way, haha.
Is there a way to see all the sprites I can use for IsoThumpable.new
Which event would I need to use in order to create a context menu on a placed item in the world?
Nevermind, got it 
media\lua\client\Vehicles\ISUI\ISVehicleMenu.lua```
To see how a context menu can be added
Anyone know any mutilation mods out there, like having the ability to cut off your arm or something to stop a bite from spreading?
Does anyone know why, when I access ZomboidGlobals.UnhappinessIncrease I am able to get a value, but if I try to access either ZomboidGlobals.BoredomIncreaseRate or ZomboidGlobals.BoredomDecreaseRate it ends up returning Nil
question: for a tile one floor above another, since it's isometric, is it the same x, y value, or is it a different x,y?
Anyone gotta clue which mod this gasmask is from?
lol
Javadoc Project Zomboid Modding API package index
Javadoc Project Zomboid Modding API declaration: package: zombie.characters.skills, class: PerkFactory, class: Perks
can anyone help me set up expanded helicopter events?
got the config mod aswell and added them ot the server that im hosting but we are still not getting any events
is the npc /survivor mod good or working?
@steady sparrow it should be just a different z coordinate (not 100% sure)
you should ask in #mod_support, here it's about developing mods
ok
Hello folks I'm trying to make a mod so I copied the examplemod in the mods folder and edited the .info file, yet the mod does not show up in game
does climate debugger work for you guys?
oh nevermind i missed the giant blue bar on top that says to put it in the user folder, my bad.
have a good one
Where can I find the following folder: "server/Farming" ?
Is it in steamapps/common, or something different?
Apparently I answer my own question as soon as I ask it:
\Steam\steamapps\common\ProjectZomboid\media\lua\server
a-haa. :D The official game files for farming_vegetableconf.lua state that it is a farming mod :D ------- and what the hell is this pseudoscience-nonsense where seedling health is affected by moon phases, like really? really?
Is there anyway to force spawn keys for specific keys in the map? Or away to custom make keys for a map im making?
how does FindAndReturnCategory() work it always returns nil?
You need to use the name of the item but it's not the best way. Exemple: FindAndReturnCategory("nails")
I got the Object tried to call nil error when I useui:onMouseDownOutside(). ui is an UIElement and have the method
https://zomboid-javadoc.com/41.65/zombie/ui/UIElement.html#onMouseMoveOutside(double,double)
Anyone, any idea why I get that error ?
Also the ui is in media/client/ISUI/ISInventoryPane.lua
Javadoc Project Zomboid Modding API declaration: package: zombie.ui, class: UIElement
Can i make a single key as a mod that can open all doors? Or?
Trying find a work around for what these doors lol
does anyone know if theres a mod that adds the engineers throwables as learnable recipes via magazines or something ?
I have notes for them in my Learning Time
thanks ill take a look
is there a way to detect if a sound is playing and stop it?
my mods aren't letting me run my server, can someone help me mod it?
can i make a item mod that is just a bit of paper with custom text on it people can read?
Question
Is there a mod that allows you to pick what gear and weapons you want before game start.
Like RimWorlds Prepare Carfully mod?
@nimble spoke sorry to bother you: i found some code in the mod like "TeachedRecipes:Make 9mm Mold, Make Flour" which I dont think exist normally in the game
But i dont see anything in the mod that "explains" the game these recipes.
How does it work or am i misunderstanding something ?
Those are in case you use some of my other mods, don't worry, if you don't use them you won't have access to those items
okay thanks 🙂
Does it sound possible to make a mod that allows for construction of glass walls / roofs that are see-through?
I.e. a custom wall/floor texture / sprite that could be built, that doesn't block vision.
In the base-game-tileset there seem to be these textures already.
there is already a glasshouse in the game that allows this in riverside AFAIK so shouldnt be a problem
but im just guessing
That sounds promising
I'm trying to figure out the feasibility of making a mod that gives greenhouses and makes winter farming impossible unless a heated greenhouse is used, and so-far it seems I can borrow a lot of the necessary assets and code from pre-existing mods >:)
How do I make clothes reparable?
it's package-protected in UIElement, so you can't access it
other ones work because they're public
yeah its called "the only cure"
can someone tell me how i can add a custom mod that isnt on the workshop to the game ?
you can add it to Zomboid/mods in your user folder or to the mods folder in the Zomboid installation (in the Steam folder)
ok thanks
ok i have an issue with my map mod i made... when the dedicated server has it installed works fine when i host on my pc i make char and it errors out telling me to check console.txt for error details.. but not sure what its doing
Yes.
Yes.
I think this is alright to post here. Here's my first mod, I guess! Check it out or don't, up to you. ;)
https://steamcommunity.com/sharedfiles/filedetails/?id=2714477061
is the a standard volume for sounds in PZ
How can I learn what NAME_NUMBER -combination my desired tile has?
Is there a list somewhere that shows the textures with the identifiers?
I can open the tilesets in TileZed, but nothing here tells me what is the correct identifier for a given texture :I
I just figured this out
So in tilezed in the tools tile properties
That last number is the tile "id"
then for the script part it should look like this
the last digit is the 0 in 1000 and the .tiles is called sleepingbags which you can see on the top left.
so the worldobjectsprite is sleepingbags_0,
remember to put the .tiles in the media folder and the .pack file in the texturepacks folder
and also list the p=packname and the tiledef=tiledefname ### the 3 numbers being unique to your mod
Hm. In case of walls, taking the last number may not be the case; I'm looking at a mod which adds a buildable brick wall, and it uses "TileWalls_51"
And doing in TileZed what you say shows me this for my desired wallpiece:
So perhaps we discard the first three digits and take the remaining?
this might be a silly question but whats an easy way to find out if my mod that adds an item to the game actually works ?
it could be the last 2 numbers the 1000 is that .tiles sprite list so if there's multiple packs in a .tiles it will be 1000 for (1) 2000 for (2) etc
@solemn horizon in the steam launch properties add -debug then launch the game. you can open the itemlist from there and try to spawn your item.
thx
Anyhow, thanks a plenty @peak raven <3
Hope it works
can you help with both?
Yes.
wanted sleepingbags so I did it my self!
@peak raven do you know how i can open the item list ? i cant find an option to spwan items
you can dm me how if you want ^.^
@solemn horizon
thanks 🙂
When you right click on the item you get the menu appear, so there's the Lua for that. There's also the Lua for making different menus appear. You could derive yours from one that has the bar on the top to drag it around, and the cross in the corner to close it. One way you can find which Lua file the code is in is to search for a certain thing in the translations, and find where that translation is used. Notepad++ can search for all files under a folder with a certain term. You can find how door unlocking is done similarly.
Zamm
@nimble spoke I made a mod that adds a magazine with the 3 engineer bombs, i used the code from your mod as a basis, since im not a programmer or modder myself, its basically a bit of cutting and copy/paste.
If you have a problem with it then please tell me and i will make the mod private so only i can use it.
i wonder what first mod is good to make first for someone who is new to this
Hi, I noticed some mods have multiple Mod IDs. I was wondering why is this?
for example
How do I make a recipe require an item be equipped when using it? Like the welders mask when doing metalworking recipes?
Does anyone have a good fast way to edit item distribution?
Other than editing ProceduralDistributions.lua? :\
is there a tutorial for how to make a lootable map?
easy way is to look at the tilesheets, each tile position is a numerical sequence. Top-left is 0, top right is 7, next row starts with 8, etc
How to make Safehouses stay forever on a server?
I tried SafeHouseRemovalTime=0 but whenever I restart a server it goes away. I've also tried changing the limit to something like 500 but that doesn't seem to work, too.
I've looked on Google and on the Indie Stone forum, many people asked this question but have gotten no answer yet.
Is this a common issue in multiplayer?
Silly question maybe but when you do this:
local Module = {}
function Module.SomeFunction()
-- Do stuff
end``` it makes the function only local, not global right?
that's right, it's just sugar for Module.SomeFunction = function() ... end
hello, I want to know if there is a way to do such thing:
- checking nearest container of certain player
getSpecificPlayer(0):getCurrentSquare():getChunk() ...?
-- maybe get all objects with container and compare distance
-- and get nearest one?
- respawning loot of specific container
...:getObject():getContainer():...?
-- generate new loot for specific container
-- maybe something like "room", "roomContainerType", "procedural?"
ItemPicker.fillContainer(...) will fill a container with randomized loot
does fillContainer automatically determines the type and zone of the container?
and adjust the loot based on the character's trait?
ItemPicker.fillContainer(object:getContainer(), playerObj);
Judging by code, this is all i can assume atm
how far around the player are you willing to search for containers?
literally in front of player
so you just have 8 squares to check?
I would just iterate on the squares by coordinates then
it does randomize based on where the container is, as for traits it does check lucky/unlucky
noice
I'm not sure if loot distributions are randomized with traits beyond that
well as long as i can generate any container based on the current game's distribution table im good
it's exactly what the game does the first time you open a container
idk why chance below 0.1 seems so different than solo and multiplayer
so im trying to respawn certain containers
thanks for the answer
o7
We used to have this issue.. set server to save like every 20 mins (we have it 10) .. by default it dosnt save until you leave a specific location so safehouse n factions dont save
good to know but that's off-topic here 😉
oh one more thing, this is kinda "good if i can have it" thing
just asking: can i make tcp/http connection with zomboid kahlua
if no, fine - kinda have to go monkey way but at least we've got the limited file system working
you want to call a web service to decide if loot should be respawned?
you can do it pretty trivially with a simple Java mod, I have a HTTP server that exports prometheus metrics from zomboid. Oxymoron extracted out a part of it here if you want to see how to do it: https://github.com/Oxymoron290/project-zomboid-server
it seems like the code is utilizing some sort of patcher, did i read code right?
it patches the bytecode to make the HTTP server start when the game server starts, yea
yeah transpiling the instruction
that's neat
reminds me the harmony c# library in rimworld
yeah - with java i can access everything but im currently trying to make the game more make sense with my friends ;-;
maybe if i have to i will
finding 5 sledgehammer in solo and not finding any in coop with same setting is something id like to see why
for the radial menu icons -- is it possible to "merge" two icons together in script, or do i have to make a unique icon for every action?
I don't think the item picker code is even aware of if you're playing in solo or mp
i know mp and sp is different
but well its closed coop session so i wanted to match the loot closed to sp
:/
:p?
eh discord
Any fix to trailers from autotsar not disconnecting on a server? It shows disconnected but once you get out the vehicle shoots back to the trailer
Miss a needed download or something?
Tried googling and didnt see much
it is not a mod issue, but game issue
oh you mean that
disable better towing, it's broken
unrelated to ata trailers
You should ask in #mod_support, here it's about creating mods
My bad, thanks for the help though!
is it possible to make a copy of the paper item or journal and have it set with custom text so someone can read it in game?
you can set the text on a page of a book with Literature#addPage(int, String)
Literature is just an InventoryItem, you can check if its category is "Literature" before trying to treat it as something writeable
where do i use that? sorry new to making map and newer to items..
wherever in a script you want to add text to a page
cam i use in itemzed or? i have no idea where to start with it
mm ok
