#mod_development

1 messages · Page 507 of 1

old blade
#

i wish there was a darker and ambient / scarier soundtrack for the game

#

more akin to stalkers soundtracks

undone crag
#

In your steam installation place there's a folder called workshop.

old blade
#

i could put together a soundtrack list but i have no idea how to implement it

tranquil reef
#

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

old blade
#

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

junior flame
old blade
#

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

tranquil reef
#

that's kind of disappointing lol

junior flame
#

i'm not sure, honestly

old blade
#

but i think one full day in zomboid is about an hour right

tranquil reef
old blade
#

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

tranquil reef
#

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 bruh

steady sparrow
#

how do i write to the global ModData

tranquil reef
#

thank you lol

golden plover
#

can anybody tell me why the wheels are not visible despite them being properly referenced in files and being there in the first place

undone crag
drifting ore
#

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

undone crag
#

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?

drifting ore
drifting ore
#

Anyone have a tutorial or example mod for multiplayer features? Especially doing a timed action from one player to another

undone crag
#

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

steady sparrow
#

could it be similar to the networking they describe for ModData?

#

where you have to transmit() and request()

undone crag
#

Hey that's a good idea maybe that will work.

steady sparrow
#

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" })

undone crag
#

What is your whole code for that, including what checks if the table has initialized?

normal meteor
#

Is anyone familiar with Tsars mods?

#

(true actions ect?)

junior flame
#

It seems that nothing in my game is drying...how peculiar.

low yarrow
#

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"

sweet idol
#

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

low yarrow
sweet idol
#

yeah ik but I would love something like that in multiplayer

low yarrow
#

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

sweet idol
#

we tried but time only skips like 30 game minutes

drifting ore
sweet idol
low yarrow
low yarrow
#

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

sweet idol
#

okey, thx for the help spiffo

slender heath
#

How to define a "safe zone" in multiplayer, and where are these settings saved on the server?

low yarrow
#

It may make nights not that annoying

peak dust
#

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?

cursive junco
#

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

junior flame
#

Hmm, wet drainables don't dry.

wanton cosmos
#

anyone know how to create an infinite endurance trait?

lapis stump
drifting ore
#

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

cursive junco
drifting ore
#

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

lofty raven
#

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.

steady sparrow
#

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?

frosty stirrup
#

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 🙂

steady sparrow
#

Oh my god

#

you're my king

#

my sweet summer jesus

#

out of curiousity, where do those values come from?

frosty stirrup
#

From my head? 🙂

#

I thought you are just speculating

steady sparrow
#

oh

#

fuck

frosty stirrup
#

Are you asking what is it in reality, and it's not documented?

steady sparrow
#

I take back my compliments unfortunately

frosty stirrup
#

no problems 🙂

steady sparrow
#

yeah, I am asking because the VHSs have their skill XPs like this:

#

FIS+100 (Fishing)
COO+100 (Cooking)

frosty stirrup
#

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

steady sparrow
#

yeah that's what i'm wondering

#

interestingly, they have Stress, but Stress is STS

frosty stirrup
#

But yeah, it would be fun to watch a movie and become hulk 🙂

steady sparrow
#

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

frosty stirrup
#

What are those? 🙂

#

Values

peak dust
#

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?

hollow shadow
#

waht does "StopPower = 2," in gun scripts do?

atomic stream
#

Does anyone know, with the current modding support, can a bicycle or motorcycle could be added into the game?

hollow shadow
hollow shadow
# atomic stream Does anyone know, with the current modding support, can a bicycle or motorcycle ...

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...

▶ Play video
#

I would wait for this mod to release, and then add your own motorcycles ontop of it?

twin dagger
#

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)```
atomic stream
cunning hare
#
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

junior flame
#

ZombRand exists

junior flame
#

the pickup broken glass timedaction uses it in this fashion

drifting ore
#

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

drifting ore
#

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

civic galleon
#

@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

junior flame
#

I know there are images related to that in UI2.pack, but I have no idea how they're referenced

civic galleon
#

Is easiest way to open the game's files that arent loose

#

That I know of at least

winter bolt
twin dagger
#

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.

drifting ore
#

Ok so it's for open compressed file, thx, I didn't know that PZ use that

vale musk
#

is anyone collaborating on a larger project? id like to learn how to do some things myself if possible

edgy star
#

Is there any list of the working mods in build 41 multiplayer?

sick yew
#

Wanted to ask, is there any easy way to set the temperature to a constantt -20?

#

Thank you

sturdy sedge
#

Any russian to play on b41?

worldly olive
#

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?

dark smelt
#

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?

mint sphinx
#

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
dark smelt
#

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

mint sphinx
#

also didnt work hmm

dark smelt
#

ah youre right, looking at other usages

balmy hatch
# worldly olive Hi hi!! Does somebody ever used the applyTraits function? I'm trying to "recalc...

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#applyTraits(java.util.ArrayList)

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

worldly olive
#

Hmmm yeah I supposed it was something like that 🤦🏻‍♀️ damn

#

Thanks, will try to convert that lol

zenith smelt
#

Anyone know where clumsy perk is applied? How do I make a character louder or quieter?

mint sphinx
quiet wing
#

Has anyone made a left 4 dead style mod? With tanks and witches maybe?

steady sparrow
#

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?

atomic stream
#

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?

winter bolt
atomic stream
#

no "canopener" no "can opener"

#

hmm maybe "tinopener"

#

I guess that is it

winter bolt
#

you can try looking through the files in media/scripts for the ingame display name to find it as well

atomic stream
#

Good idea

#

will keep in mind

atomic stream
# winter bolt in lua/server/items/proceduraldistribution.lua you should be able to ctrl+f for ...

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");

willow estuary
#

You need a second line for the spawn chance.

sour island
#

just a heads up you don't need the [""]

atomic stream
#

table.insert(ProceduralDistributions["junk"]["BreakRoomCounter"].items, 4);

winter bolt
#

i think you have to switch the junk and container name

sour island
#

x["y"]["z"] = x.y.z

winter bolt
#

so breakroomcounter.junk instead

sour island
#

no

#

ProceduralDistributions.junk.BreakRoomCounter.items

atomic stream
#

hmm

winter bolt
#

isnt junk a list inside breakroomcounter?

willow estuary
#

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.

atomic stream
#

alrighty I will try this soon

#

I couldn't grasp these lists notations by trial and error

mint sphinx
#

@sour island do you know how to add translate txt files ? have few problems with it so far

winter bolt
#

yeah lua takes getting used to lol

sour island
#

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

mint sphinx
#

and even that i failed

sour island
#

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"

mint sphinx
#

hmm i will try that

zenith smelt
#

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 🙂

sour island
#

Items_EN = { DisplayName_Civilian_Helicopter_Helmet= "Civilian Helicopter Helmet",

#

displayn ames have their own file too

hollow shadow
#

Is there a way to make a backpack change its model the more items it has inside it?

sour island
#

I would assume the specific menus try to look for certain phrases to be faster

zenith smelt
novel yoke
#

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?

atomic stream
# zenith smelt If anyone can point me to something or another mod or give any help, feel free t...

I can use the help for these 2 questions if you insist 😄

  1. 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.

  2. 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.

winter bolt
#

you'll have to look up what encoder to use for the language you want though

novel yoke
winter bolt
#

nice

steady sparrow
twin dagger
median salmon
#

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.

drifting ore
#

Hi

Can someone help me with the following :

  1. 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?

  2. 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 ?

fading glacier
#

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

twin dagger
civic galleon
median salmon
mint sphinx
sour island
mint sphinx
#
ContextMenu_EN = {
    ContextMenu_Test1 = "test field",
} 
``` what i did
sour island
#

then: context:addOption(getText("ContextMenu_Test1")) ?

mint sphinx
#

context:addOption(getText("ContextMenu_Test1"))

#

xD

sour island
#

from vanilla files 'ContextMenu_' is needed

mint sphinx
#

that one still not work

sour island
#

Are you sure the addoption is firing?

mint sphinx
#

yea i am

sour island
#

where are you putting the translation file?

#

/media/lua/shared/Translate/EN/ContextMenu_EN.txt ?

mint sphinx
sour island
#

the file probably needs to be named ContextMenu_EN

#

you're also not stacking multiple blocks inside right?

#

{ } is a block

mint sphinx
#

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 🙂

sour island
#

yeah i'm not that wel lversed in it either

drifting ore
sour island
#

I wish they'd just add a UI for it

fading glacier
#

What is tiledef please ?

mint sphinx
steady sparrow
#

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

civic galleon
#

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.

sour island
#

Be careful with sandbox+ as it overrides something that impacts modoptions and similar menu altering mods

median salmon
tacit ermine
steady sparrow
#

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}

median salmon
robust arch
#

is there any way to overwrite vanilla functions in a local table without overwriting the whole lua file?

steady sparrow
#

no, that's the point of the local unfortunately

robust arch
#

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

ivory perch
#

Anyone know if it’s possible to disable buildings burning but not disable fire?

tulip valve
#

Is the voiced tv and radio mod released or still being worked on?

#

Forgot what it was called

tulip valve
#

Ah

sour island
tulip valve
#

Thanks 😄

sour island
#

If you try to use modOptions and Sandbox+ the settings for modOptions won't be able to save

median salmon
#

And never have.

#

Would I still be safe?

sour island
#

If you're on default modoptions sure...

median salmon
#

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.

cursive junco
robust arch
cursive junco
robust arch
stiff scaffold
#

are there any mods that allow altering professions and/or profession related traits for MP?

zenith smelt
#

Yes

#

Search for proffession on the workshop, there are a few

steady onyx
#

dm, I'd put a semi-colon instead of a comma

steady sparrow
#

how to do you escape ' characters in the Item declarations

#

is it not possible to have an apostrophe in an item name?

normal meteor
#

Anyone know of a good mod to add armor to vehicles? i cant find any

deft jacinth
#

Anybody know how I can lower Brita guns spawn rarity? They spawn way too frequently.

drowsy needle
#

I think there's a setting for options in the options menu

#

Assuming you have Mod Options turned on.

deft jacinth
#

I can access the Admin Panel

#

And the server files etc.

#

I just don't know where to do it

atomic stream
#

Is there any quick tutorials on creating custom car mods?

weary matrix
coarse shore
#

Is the ability to upgrade backpacks using tailoring a mod or vanilla?

undone crag
#

A mod

coarse shore
#

Any idea what mod it could be?

shadow dust
#

Authentic Z I think

potent root
#

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

undone crag
#

getPlayer is a problem on multiplayer

potent root
#

oh

#

how should I approach it on the multiplayer side?

#

the weird thing is the item spawns properly so seems line 2 runs fine

undone crag
#

Some way of picking the player, maybe getspecificplayer with the player index, and some way of getting which player index.

potent root
#

just the renaming does not go

undone crag
#

getPlayer would just be a problem with more than one player perhaps then

potent root
#

seems player:getSquare() resolves well otherwise the item would not spawn in the tile the player is

undone crag
#

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

potent root
#

is there any documentation on the changes the MP build introduced when it comes to modding and server/client communication?

undone crag
#

I do not know :d

potent root
#

😛

#

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 😄

undone crag
#

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.

brittle jewel
#

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

undone crag
#

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

dense sparrow
#

anyone playing hydrocraft mod can advice me on finding measuring tape ?

#

can't find that darn thing

undone crag
#

Nooo this is for making mods not playing mods :|

dense sparrow
#

where should i look for it ?

#

oh i see

potent root
#

this is a mess. with no proper documentation it becomes a lot of work to figure out things 😄

visual root
#

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

potent root
#

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

undone crag
#

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 . :/

potent root
#

the client/server layer is very obscure

undone crag
#

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. :<

potent root
#

oh I see is it because with the new networking code the zombies can be controlles by different clients?

undone crag
#

­ ¯_(ツ)_/¯

potent root
#

😄

agile swallow
#

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?

undone crag
#

Have you looked for the word "stack"? The console says "error" a lot by default.

potent root
#

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

agile swallow
undone crag
#

:|

brittle jewel
abstract raptor
#

Can anyone help me with my playable instruments mod?

#

I've been getting a lot of requests to fix it

glass ravine
#

so why does this happen, i'm sure it's common

#

what i do

sour island
#

scale the model down

glass ravine
#

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

sour island
zenith smelt
#

is thre a way to change animation set for a zombie?

ember orchid
#

I can't remember if there's a scale in the scripts for weapons, but there is for cars. Check that too.

drifting ore
#

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.

ember orchid
#

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

potent root
#

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

steady sparrow
#

How do you bind lua to a Vehicle's update function dynamically?

#

or a vehicle part's update function?

abstract raptor
#

I need to make it so it's a context menu option instead, I think

#

And then do stuff with emitters

steady sparrow
#

You should just make it a Recording Device

#

like a Radio/TV

abstract raptor
#

hmm

steady sparrow
#

you can have it emit a sound at will basically

#

(I was just digging around the Radio/TV code so i'm familiar now)

abstract raptor
#

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

steady sparrow
#

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?

abstract raptor
#

I haven't really worked with vehicles at all~

cursive junco
dreamy flicker
#

any information on how to parse vehicles.data from the vehicles.db

thin hornet
#

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

cursive junco
#

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.

potent root
#

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

lusty nebula
#

What's the difference between Nutritionist and Nutritionist2? ( Just a sample ) What the number following the trait indicates/refers to/means?

glass ravine
#

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?

potent root
#

yes start the game in debug mode and press F11 in game

#

you can reload script files from there

#

and setup breakpoints and stuff

glass ravine
#

cool beans skinny jeans

lusty nebula
#

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.

undone crag
undone crag
somber mortar
#

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.

hushed mesa
#

Any mods with flamethrowers?

sonic helm
#

has anyone figured out how to make custom CDs yet?

round kiln
#

im noticing some mods ive downloaded before that no longer exist in the workshop, is it alright to reupload those?

sonic helm
#

unless you get the author's permission

round kiln
#

i figured

somber mortar
#

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.

brittle jewel
#

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

somber mortar
brittle jewel
#

The error wouldn't happen if it wasn't already happening lol.

teal slate
#

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.

fickle plover
#

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

plucky pollen
#

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

somber mortar
#

at least way less, then doing all these jumbo jambo with game files

teal slate
#

N

#

No, because

#

if you're having the issue at all where it stops you from joining

#

you have conflicted versions

somber mortar
#

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.

tacit ermine
#

restart the server

somber mortar
# tacit ermine restart the server

That would be just fine, if it worked hungover , 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.

steady sparrow
#

where is the code that does the actual loot generation?

#

like whatever is interpreting the loot tables

#

and placing stuff in containers

tacit ermine
#

that's ItemPickerJava

#

it also fires an OnFillContainer event for scripts to take part in loot generation

steady sparrow
#

ah i see

tacit ermine
#

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

plucky pollen
#

im trying to make my generator let me connect it to base and add fuel etc.. but not sure how to do this?

tacit ermine
#

what do you mean? that's how generators work in vanilla

plucky pollen
#

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

tacit ermine
#

you've made a new generator item?

plucky pollen
#

yes

#

sorry should have said new item..

tacit ermine
#

how are you spawning the generator item?

plucky pollen
#

right now only can get it using admin and spawn items menu.. works for normal generator like this

tacit ermine
#

what is the name of the generator in your script?

plucky pollen
#

im using ItemZed and its Enhanced Generator for now not sure on name just yet

tacit ermine
#

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(...)

plucky pollen
#
item Enhanced Generator
    {
        DisplayCategory         = Electronics,
        Weight         = 40,
        Type         = Normal,
        DisplayName         = Enhanced Generator,
        Icon         = Generator,
        Tooltip         = Tooltip_Generator,
        RequiresEquippedBothHands         = true,
        MetalValue         = 500,
        ConditionMax         = 100,
    }```
tacit ermine
#

which does:

 if (arg0.getFullType().contains(".Generator")) {
     new IsoGenerator(arg0, IsoWorld.instance.CurrentCell, this);
     return arg0;
 }
plucky pollen
#

weight etc is going to be changed

tacit ermine
#

try making that item Generator Enhanced

plucky pollen
#

ok renamed it.. loading to test

teal slate
#

Much faster than manually deleting and reinstalling.

#

If you're not using the workshop, you're SOL anyway.

plucky pollen
teal slate
#

It should.

somber mortar
#

or host still needs file jumping?

teal slate
#

The server should just need to update the mods and restart, while the players just need to unsubscribe and resubscribe.

plucky pollen
tacit ermine
#

not without changing ISWorldObjectContextMenu code

#

it does this

#
if not playerObj:isRecipeKnown("Generator") then
#

so the recipe needs to be literally called "Generator"

plucky pollen
#

can i add that line to the generator code?

tacit ermine
#

no, the game will always let you connect it with the old book with its own code

plucky pollen
#

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?

tacit ermine
#

nope, those are constant for every generator in the Java code

cursive junco
#

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?

tacit ermine
#

if you try to give a generator more than 100 fuel it just does

      if (this.fuel > 100.0F) {
         this.fuel = 100.0F;
      }
plucky pollen
tacit ermine
#

I think you probably could, but that's not something I have a quick solution for that I can suggest

plucky pollen
#

hehe no worries.. hopfully someone else can tell me how to do it ^.^

plucky pollen
#

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

neat harbor
#

Can someone make more funny mods

undone crag
#

no u

dark thistle
#

Is there a limit on the size of a building? like can it cover multiple cells?

dark thistle
#

Nevermind, 300x300 limit in building editor

zenith smelt
#

Is there a way to stop players from picking perks and only allow the random option?

round kiln
#

where can i find the code that shows all spawning locations of items?

winter bolt
#

Distributions.lua also has the item spawns for stuff inside of bags

round kiln
#

thankies

distant haven
#

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

round kiln
#

so there is doughnut spawns, yet for some reason i dont see any on riverside donut shop

#

huh

#

weird

thin hornet
plucky pollen
blazing zenith
#

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

winter bolt
zenith smelt
#

Is there a way to print in the logs?

blazing zenith
#

isnt UTF-8 enough?

#

which one do i change to tho?

winter bolt
#

no idea, you'd have to look up what encoder you need to use for the characters you want

blazing zenith
#

russian characters, seems like UTF supports them

winter bolt
#

you need Windows 1251 i think

blazing zenith
#

how do i code into that tho?

#

the only other option i have is ANSI

winter bolt
abstract anvil
#

Hey, how can I activate the well-known Build 33 Creative Mode in the current build? 😄

#

This one

winter bolt
#

it was never finished and all the code is like 6 years old now

abstract anvil
#

kk

mint sphinx
#

also i gues it would be hard to intergrate that with the world builder tool ^^

inner rover
#

When NPCs arrive, I'm hoping to make a mod on base building, settlement building & factions

round kiln
#

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?

deft jacinth
#

Anybody know how to lower the spawn rate of Britas weapons?

round kiln
steady sparrow
#

anyone know how to make a lootable map with the new map system?

#

all the current mods on the Workshop are broken

tulip valve
deft jacinth
tulip valve
#

How about changing loot settings to extremely rare for ranged weapons?

crude mantle
#

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

round kiln
#

books always consumes unless its a magazine for recipes or skill book

crude mantle
#

No way to mod it to not disappear?

round kiln
#

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

crude mantle
#

Well geuss I"m going on a wild hunt to find where in the code the disappearing is coded

round kiln
#

whats the book supposed to be anyway?

crude mantle
#

It's a bible

round kiln
#

and its supposed to remove boredom and stress right?

crude mantle
#

yep, but it should not be used up, because it's a bible

round kiln
#

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

crude mantle
#

presumably both of those still have the same base, so there has to be some condition that makes it disappear

somber gull
#

Anyone know what mod this is from? Helicopter dropped it on the server I'm on

stray kestrel
#

It's probably expanded helicopter event

zenith smelt
#

Is there a way to stop players from picking perks and only allow the random option?

drifting ore
#

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

inner rover
crude mantle
#

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

drifting ore
dreamy flicker
#

Any information on how to parse the data field in vehicles db?

errant bluff
winter bolt
tulip valve
#

I want to add a new custom item to Police Zombie inventory only

table.insert(SuburbsDistributions["Police"]["inventorymale"].items

Is this correct?

dreamy linden
#

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 ?

strange sequoia
#

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 😄

winter bolt
#

hairstyles are really easy but clothing is kind of a pain because you have to make sure they dont clip

lapis stump
#

how do I make my drainable item useable ?

meager solstice
#

can anybody confirm if "Standardized Aiming (Gun) XP" works in MP?

drifting ore
#

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?

errant mason
#

Is there a good location to find all of the in game inventory item icons?

teal slate
drifting ore
teal slate
#

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

tacit ermine
#

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

drifting ore
drifting ore
tacit ermine
#

yes, you can bandage/treat another players wounds

teal slate
#

ISMedicalCheck contains timed actions targeting another player, I'd use it as an example of how to do that

drifting ore
#

Ok thx, I will check that

tacit ermine
#

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

shadow crag
#

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.

weary matrix
#

@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

undone crag
strange sequoia
#

Damn i only started to watch a turorial on Blender and i'm already lost, there are so many things to learn ahah

lapis stump
drifting ore
potent root
#

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?

lost rivet
#

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

undone crag
lapis stump
#

pills

undone crag
#

:|

lapis stump
#

my item appears in game but has no context option "take pills" like pain killers etc.

tacit ermine
#

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 { ... }

lapis stump
#

thx ill try it

#

i can do OnEat on food to trigger custom functions what do pills use ?

tacit ermine
#

they don't use anything

#

it's built in to java code

#

there's no custom event

wooden sparrow
#

Not sure if this is where the question belongs but does anyone know how to edit non-pvp zones via server files?

lapis stump
#

so ill have to make my own context menu and action?

tacit ermine
#

that, or you can override ISTakePillAction:perform

lapis stump
#

do I override in my items.txt ?

tacit ermine
tacit ermine
wooden sparrow
lost sphinx
#

Yo does night sprinters & nocturnal zombies work?

lapis stump
#

is it possible to just detect when a player eats pills?

unborn palm
cursive junco
drifting ore
tacit ermine
lapis stump
#

thx guys it works

trim kraken
#

Has no one made a lootable map of louisville mod yet ?

shy hearth
#

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

drifting ore
shy hearth
drifting ore
shy hearth
#

yea I just found spawnZombies() in IsoRoom which seems promising as well

drifting ore
#

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.

lapis stump
#

is it possible to add a custom /command to chat?

wooden sparrow
tacit ermine
steady sparrow
#

what is the event for a character being created?

#

so like OnPlayerSpawn? OnSurvivorCreate doesn't seem to be firing?

drifting ore
tacit ermine
steady sparrow
#
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?

steady sparrow
#

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

steady onyx
#

Does setWoundInfectionLevel work? Can't seem to add regular infection

steady onyx
steady sparrow
#

guess i gotta set my mod name to AAA modname lmao

late hound
shy hearth
#

any idea why zombies spawned via lua will despawn when the character dies? dunno if this is unique to singleplayer or not

undone crag
#

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

zenith smelt
#

how to print to log?

undone crag
#

print(stuff, moreStuff)

shy hearth
#

only shows up in the console.txt in your zomboid folder though

#

afaik

undone crag
#

And in \logs

wild juniper
#

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

teal slate
#

👍

potent root
#

what is the best way to detect if it is a Solo vs Hosted Vs Server game?

lapis stump
potent root
#

awesome

#

ty

rain frigate
#

Is it possible to make custom zombies spawning with some chance?

#

With custom strength/speed/seeing&hearing stats

sour island
#

isClient() = MP

#

isServer checks if the code is running on the server side

drifting ore
#

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

sour island
#

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?

wild juniper
drifting ore
drifting ore
cedar turret
#

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

terse matrix
#

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

weary matrix
#

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");
            }
        }
    }
grizzled grove
#

is udp still a thing? haven't heard that in ages

terse matrix
#

What is this? Code for player safe houses in MP?

potent root
#

does anybody know if hydrocraft is fully working on the new MP builds?

potent root
terse matrix
#

Yeah i wanna ear like one dangy sapphire ear ring not two.

#

Yes one ear

potent root
#

select which ear?

terse matrix
#

Yeah pretty much.

potent root
#

I believe there are already in game accesories that are one ear only

terse matrix
#

Really I don't see it for the ear rings

potent root
#

mayebe I am wrong

terse matrix
#

It should be super simple to mod. Maybe i can do it my self unsure

potent root
#

not sure how simple it would be

potent root
#

might be doable

weary matrix
#

also many games I guess

weary matrix
#

so If I understand correctl, it will release a safehouse if either:

  1. the player is null, or
  2. the player is the owner, or
  3. the player is NOT an admin and NOT a moderator, or
  4. 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

winter bolt
#

if you look at the item script for hoodies you can use the "clothingextra" thing to switvh between models for each ear

sour island
#

Ah nice ty

red panther
#

What good guns should I get in Firearms B41?

red mural
#

You know what would be great? A mod that adds shooting range where you can shoot empty cans with your weapons to improve aiming

tacit ermine
#

good use of empty tin cans tbh

cunning hare
#

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.

potent root
#

you mean when you right click something?

cunning hare
potent root
#

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

weary matrix
dark solar
#

🤔

#

perhaps

#

social engineering

verbal ivy
#

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?

weary matrix
verbal ivy
weary matrix
#

check the lua code from the game

verbal ivy
#

ok, thanks

drifting ore
weary matrix
#

I'll try to ask

dark solar
#

#mod-developing would make better sense gramatically

weary matrix
#

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

winter bolt
#

having mod support at the top of the list would probably be best

cunning hare
# potent root do you have an example of the context menu entry creation?
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.
undone crag
#

I remember ISInventoryPaneContextMenu uses the word tooltip so you should be able to look at that and add a tooltip with however much lua.

undone crag
#

I meant ISInventoryPaneContextMenu

drifting ore
#

Has anyone made a sleeping bag/bedroll mod?

undone crag
#

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 :/

rose chasm
#

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

verbal ivy
#

Is "PathTo" method for IsoGameCharacter unavailable anymore? I try to use it on an IsoZombie and it return "Tried to call nil" error.

low yarrow
#

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)

low yarrow
#

When i choose initially "DownHoodie" then it works and after its equipped i can properly put the hoodie up

winter bolt
#

is it already in the up state?

low yarrow
#

yep

winter bolt
#

what does the item script look like?

low yarrow
#

I basically copied the vanilla poncho

#

(in terms of the hoodie system)

winter bolt
#

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

low yarrow
#

Oh wow

#

it worked. Thank you alot 😄

#

Who needs a submenu

late hound
#

ExtraOption line is a new contextMenu, which would eventually need a translation line.

winter bolt
#

not if you reuse the hoodie one though

late hound
#

Yes, this is about using the functionality but for other things, which is possible.

winter bolt
#

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?

late hound
#

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.

winter bolt
#

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?

late hound
#

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.

cobalt steeple
#

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

sour island
lapis stump
#

are there any tutorials on creating ui panels?

cobalt steeple
#

Thank you so much chuck

hollow oyster
#

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

drifting ore
#

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

raw moon
#

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

hollow oyster
#

Hails mod 🤤💅🏻

swift sapphire
#

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?

drifting ore
inner rover
#

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

red mural
#

Also, is there any solar panel mod or anything else to have energy coming without using up all fuel on generators?

winter bolt
sour island
#

Does anyone know how to check if the player is on the main menu?

#

isIngameState() seems to produce odd results for me...

junior flame
#

Is there an event for when an item dries? Or any way to return the item that dried?

cunning kestrel
#

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?

sour island
#

to access a link?

cunning kestrel
sour island
#

I know the game has http from the mods menu

#

I'd check those lua files

cunning kestrel
sour island
#
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

cunning kestrel
#

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.

stiff urchin
#

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!

sour island
stiff urchin
#

Awesome, thank you!

covert atlas
#

Anyone have any suggestions for a mod that adds more lighting fixtures that works in MP?

drifting ore
#

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

cedar turret
# potent root I have never expanded inventory or clothing slots

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

frosty stirrup
#

@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 🙂

drifting ore
#

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.

zenith smelt
#

Is there a way to see all the sprites I can use for IsoThumpable.new

junior flame
#

Which event would I need to use in order to create a context menu on a placed item in the world?

#

Nevermind, got it drunk

zenith smelt
#
media\lua\client\Vehicles\ISUI\ISVehicleMenu.lua```
#

To see how a context menu can be added

sweet lintel
#

Anyone know any mutilation mods out there, like having the ability to cut off your arm or something to stop a bite from spreading?

lofty raven
#

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

steady sparrow
#

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?

jovial quartz
#

Anyone gotta clue which mod this gasmask is from?

frozen galleon
#

how do i know what the lua errors mean

#

i got 448

errant meteor
#

lol

drifting ore
#

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

frozen galleon
#

is the npc /survivor mod good or working?

weary matrix
#

@steady sparrow it should be just a different z coordinate (not 100% sure)

weary matrix
frozen galleon
#

ok

past dragon
#

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

lapis stump
#

does climate debugger work for you guys?

past dragon
#

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

upbeat spindle
#

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?

plucky pollen
#

Is there anyway to force spawn keys for specific keys in the map? Or away to custom make keys for a map im making?

lapis stump
#

how does FindAndReturnCategory() work it always returns nil?

drifting ore
plucky pollen
#

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

solemn horizon
#

does anyone know if theres a mod that adds the engineers throwables as learnable recipes via magazines or something ?

nimble spoke
solemn horizon
#

thanks ill take a look

lapis stump
#

is there a way to detect if a sound is playing and stop it?

vital adder
#

my mods aren't letting me run my server, can someone help me mod it?

plucky pollen
#

can i make a item mod that is just a bit of paper with custom text on it people can read?

eternal garnet
#

Question

Is there a mod that allows you to pick what gear and weapons you want before game start.

Like RimWorlds Prepare Carfully mod?

solemn horizon
#

@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 ?

nimble spoke
solemn horizon
#

okay thanks 🙂

upbeat spindle
#

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.

solemn horizon
#

there is already a glasshouse in the game that allows this in riverside AFAIK so shouldnt be a problem

#

but im just guessing

upbeat spindle
#

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 >:)

marble spade
#

How do I make clothes reparable?

tacit ermine
#

other ones work because they're public

solemn horizon
#

can someone tell me how i can add a custom mod that isnt on the workshop to the game ?

tacit ermine
#

you can add it to Zomboid/mods in your user folder or to the mods folder in the Zomboid installation (in the Steam folder)

solemn horizon
#

ok thanks

plucky pollen
#

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

distant ember
cunning hare
#

is the a standard volume for sounds in PZ

upbeat spindle
#

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

peak raven
#

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

upbeat spindle
#

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?

solemn horizon
#

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 ?

peak raven
#

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.

solemn horizon
#

thx

upbeat spindle
#

Anyhow, thanks a plenty @peak raven <3

peak raven
#

Hope it works

plucky pollen
undone crag
#

Yes.

peak raven
#

wanted sleepingbags so I did it my self!

solemn horizon
#

@peak raven do you know how i can open the item list ? i cant find an option to spwan items

plucky pollen
undone crag
#

Yes I can.

#

I was messing with you :d

peak raven
#

@solemn horizon

solemn horizon
#

thanks 🙂

undone crag
#

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.

errant meteor
solemn horizon
#

@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.

round kiln
#

i wonder what first mod is good to make first for someone who is new to this

patent dune
#

Hi, I noticed some mods have multiple Mod IDs. I was wondering why is this?

#

for example

stiff urchin
#

How do I make a recipe require an item be equipped when using it? Like the welders mask when doing metalworking recipes?

peak raven
#

Does anyone have a good fast way to edit item distribution?

calm depot
#

Other than editing ProceduralDistributions.lua? :\

supple briar
#

is there a tutorial for how to make a lootable map?

grizzled grove
slender heath
#

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?

weary matrix
#

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?
tacit ermine
#

that's right, it's just sugar for Module.SomeFunction = function() ... end

weary matrix
#

thx

#

all that sugar makes Lua confusing sometime 😅

white crag
#

hello, I want to know if there is a way to do such thing:

  1. checking nearest container of certain player
  getSpecificPlayer(0):getCurrentSquare():getChunk() ...?
  -- maybe get all objects with container and compare distance
  -- and get nearest one?
  1. respawning loot of specific container
   ...:getObject():getContainer():...?
   -- generate new loot for specific container
   -- maybe something like "room", "roomContainerType", "procedural?"
tacit ermine
#

ItemPicker.fillContainer(...) will fill a container with randomized loot

white crag
#

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

weary matrix
white crag
#

literally in front of player

weary matrix
#

so you just have 8 squares to check?

white crag
#

i think so

#

since im just validating the loot table chances

weary matrix
#

I would just iterate on the squares by coordinates then

tacit ermine
white crag
#

noice

tacit ermine
#

I'm not sure if loot distributions are randomized with traits beyond that

white crag
#

well as long as i can generate any container based on the current game's distribution table im good

tacit ermine
#

it's exactly what the game does the first time you open a container

white crag
#

idk why chance below 0.1 seems so different than solo and multiplayer

#

so im trying to respawn certain containers

#

thanks for the answer

tacit ermine
#

o7

plucky pollen
weary matrix
white crag
#

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

tacit ermine
#

no

#

what are you trying to do?

white crag
#

kind of metric

#

to aggregate logs

#

to check if the item respawn is on the table

tacit ermine
#

you want to call a web service to decide if loot should be respawned?

white crag
#

nope

#

just sending statistics

#

to local port

tacit ermine
white crag
#

it seems like the code is utilizing some sort of patcher, did i read code right?

tacit ermine
#

it patches the bytecode to make the HTTP server start when the game server starts, yea

white crag
#

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

vivid flare
#

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?

tacit ermine
#

I don't think the item picker code is even aware of if you're playing in solo or mp

white crag
#

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

upper wadi
#

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

vivid flare
#

it is not a mod issue, but game issue

#

oh you mean that

#

disable better towing, it's broken

#

unrelated to ata trailers

weary matrix
upper wadi
#

My bad, thanks for the help though!

plucky pollen
#

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?

tacit ermine
#

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

plucky pollen
tacit ermine
#

wherever in a script you want to add text to a page

plucky pollen
#

cam i use in itemzed or? i have no idea where to start with it

tacit ermine
#

no idea

#

if itemzed just edits item scripts, no

plucky pollen
#

mm ok