#mod_development

1 messages · Page 500 of 1

lost slate
#

When ya work hard but mom gets all the claps n honey 😄

abstract wave
#

I found some OnTest stuff in VaccinDrReapers djvirus, going to explore that, but thanks

hollow shadow
#

it adds a crafting table which is needed to craft the items. the its placeable like furniture

#

oh yeah the vaccine mod does the same thing

left plank
#

I know lmao, but it is what it is ❤️

hollow shadow
#

sadly its no longer supported ,_,

abstract wave
#

He updated it today

hollow shadow
#

Wha

#

i literaly checked 2 hours ago

hollow shadow
#

its a reupload

#

is it fixed too?

#

do items spawn?

abstract wave
#

I was testing it a bit earlier, seemed to be fixed

#

Trying to learn how to make placeables structures to craft with myself

hollow shadow
#

i tried to make craftable furniture aswell but i never got it to work

left plank
errant meteor
left plank
#

thank u

dark solar
#

is the chance of snowfall random or does it rely on something? temperatures?

autumn rose
#

Random question, how can I check which cell I'm in and my position within said cell? I'm trying to make a mod to set custom spawn points but I only know how to check my coordinates, which seem to be useless for this sort of thing, due to spawn points being formatted completely different as far as I'm aware.

weary matrix
#

@dark solar with debug mode you can trigger snow, even with high temperature, but it won't make the ground snowy

#

so I don't think it is based on temperature at least

dark solar
#

so probably just based on chance then

weary matrix
#

should be random, based on the season probably

dark solar
#

unfortunate

weary matrix
#

why?

dark solar
#

it means that i have to not be lazy

#

not being a coder myself, would there be a way to make this chance higher? the mod i made myself just has never ending snow and it is a little bit annoying at times

winged lotus
#

Good evening all, do you know is there some triggerEvent("OnShout") or triggerEvent("OnShhhh") available to your knoledge? Also, do you know where I can find the list of triggerEvents and how to implement a specific action using those?

opal wind
#

can someone plz link me a tutorial to add a new meele weapons to my mod? my model is invisible atm i prb miss something i must do in blender

dark solar
#

i see

#

thank you

abstract wave
#

What is ```c
AlwaysWelcomeGift


? 😄
tired charm
#

Hey, small question if possible and someone knows. How can I make that a certain lua function is triggered when a certain item is consumed? For example, I'd like to trigger a lua function when a character "consumes" antibiotics. How could I achieve doing that? Thanks!

tired charm
candid sonnet
abstract wave
#

I think it's OnEat

candid sonnet
#

yea something like that

tired charm
wild oasis
#

Any modded areas that function with the in game map?

thin hornet
#

So if anyone need network communication here is how i handle it:

--- client-side
local args = {
        someData = "test",
        someMoreData = "test",
};
sendClientCommand(self.character, 'ModuleName', 'CommandName', args);
---server-side
local Commands = {};
Commands.ModuleName = {};

function Commands.ModuleName.CommandName(player, args)
    print(args.someData);
    print(args.someMoreData);
end

local function onClientCommand(module, command, player, args)
    if Commands[module] and Commands[module][command] then
        local argStr = ''
        for k,v in pairs(args) do argStr = argStr..' '..k..'='..tostring(v) end
        Commands[module][command](player, args)
    end
end
Events.OnClientCommand.Add(onClientCommand);
winged lotus
#

Does anyone knows how to use that https://pzwiki.net/wiki/Modding:Lua_Events/OnKeyPressed with a key recovered from key binding with getCore():getKey("Shout"); ? Because I can't quite find a way to pass it to the function and I want this to be generic no matter the player's key bindings 🤔

blissful meteor
#

In the process of setting up a shop for my server, I've got a currency dropped by special Z that players can trade at the server trading post for items.

I'd like players to be able to trade them in at which point it would spawn a vehicle.

I'm thinking with a combination of crafting and the cheat menu mod I'd be able to make a vehicle spawn when something is crafted, anyone interested in helping out with this

errant meteor
hexed arrow
#

Is there a good Lua tutorial for Project zomboid?

thin hornet
hexed arrow
#

is this even possible?

thin hornet
#

sure is

#

OnDusk OnDawn EveryHours EveryDays EveryTenMinutes are all events you can add to

abstract wave
#

I think i'll make my own mod that adds a new broadcast on the TV for a certain thing, however, can someone help me explain the process? I'm looking at another mod that does the same, but .. ```
<Channels>
<ChannelEntry ID="73754f47-5992-4a1a-b599-ce5634c38640" name="Hound" cat="Television" freq="234" startscript="main">
<ScriptEntry ID="8ee22b41-4787-460a-9806-f0a039e9bd90" name="main" startdelay="0" timestampmode="Static" loopmin="1" loopmax="1">
<ExitOptions />
<BroadcastEntry ID="145c4d5f-0e31-4a04-a708-e7fd99feb1bb" timestamp="0" endstamp="600" type="ActivateBroadcast" day="0" advertCat="none" isSegment="false" />
<BroadcastEntry ID="be24b80a-e37c-4e82-95f1-0d17179a6c40" timestamp="600" endstamp="1980" type="ActivateBroadcast" day="0" advertCat="none" isSegment="false">


All of the IDs are a mystery to me, so is the timestamps, can anyone shed some light on how I would go about making these IDs or find info about them please? And how to figure out the timestamps?
opal wind
#

these IDS are just for clothing i think

#

weapons and itens dont need it

#

but those i dont know

abstract wave
#

I think I figured it out, it's from a mod called WordZed

opal wind
#

they look like IDs of stuff from TV

#

ah

#

i think the guy add some new broadcasts to the TV, aparently they need iD too then

thin hornet
#

@hexed arrow
Might be worth looking at getSoundManager()

local function onDusk()
  getSoundManager():PlaySound("SoundName", false, 1.0);
  getSoundManager():PlayWorldSound("SoundName", square, 1.0, 1.0, 1.0, false);
end
Events.OnDusk.Add(onDusk);
#

@hexed arrow also

#

for adding sound to the game from your mod youll need a sound.txt script

#

and sounds will go into a directory you create in your media directory named 'sound'

#

exemple of a sound script

module Base {

    sound ComputerToggle {
        category = Computer: Main, 
        loop = false, 
        is3D = true,
        clip { 
          file = media/sound/ComputerToggle.ogg, 
          distanceMax = 10, 
          volume = 1.0,
        }
    }
}
hexed arrow
#

thanks for the response ! this is very helpful

hollow shadow
#

but idk how

thin hornet
#

@blissful meteor @hollow shadow the tradeUI might be of interest for the transaction

hollow shadow
#

Ah i thought of a craftable version

brittle jewel
#

Does anyone know if there's a 'Say' that will show for other players but not show up in the server chat? Both players have the Say() function here but it does not show up for others. Shout does show up for others, but then it is visible in the server chat.

sonic atlas
#

I live for the moments when you forget to enable God mode while testing code and you hear the sweet sound of your character perishing from starvation.

zealous wing
#

It seems like I am going to have to completely redo my cooking mods. The Devs added a lot of items I had in it, so backwards compatability is now a must. 😄

sonic atlas
#

are ISTickBox's actually editable?

#

I see them working in the menus but cannot see how to enable them for clicking

thin hornet
hollow shadow
thin hornet
#

with this api we can easily add a fuel version of any water container

#

so you could siphon a car with a small water bottle, etc

thin hornet
#

xD

#

FuelAPI is a much cleaner implementation compared to old coco liquid overhaul.
I did my best to make this as clean and non-overwritting as possible.

#

But fuel in this game is hardcoded to the simple gas can. so its not an easy task to do it.

thin hornet
#

@brittle jewel Take my pie i want this

brittle jewel
#

Soooon (hopefully within a day), working on a couple of last things!

willow estuary
golden flint
#

Some one using the GTX game servers knows how to verify if the mod was added to the game?

brittle jewel
#

@willow estuary Right now, as soon as the text box gains focus it will start showing the indicator unless you're on the 'admin tab'. It's pretty basic so far

golden flint
#

I've added the lines but when I joined on the item's list of the server I didn't see any of the new weapons

abstract raptor
#

you're my hero

hollow shadow
#

pls gib mod

#

i need this now

hollow shadow
#

for some reason all the armor in my leg pad script is making huge amounts of errors and the description is gone. even tho it was fine before

late hound
hollow shadow
late hound
hollow shadow
thin hornet
#

Idk exactly what it does but i would of guess that it play the sound with distance in a 3D world.

hollow shadow
#

waht i noticed is that when i added it to my drill sounds. swinged the dril and walked a way i could still hear it away from the player

abstract wave
#

Looking at the radio broadcasts, they have codes for changing stats/skills. Any clue where I can find all of them? ```c
codes="STS-1,BOR-1,UHP-1"

      <LineEntry ID="e24ddbf9-19b2-420f-b080-1772c88e7d01" r="0" g="176" b="80" codes="BOR-1">You'll have to get through a wall of zeds.</LineEntry>
#

Looking for the maintenance one

#

But knowing where all of them are would be handy.

warped sage
#

Anyone know if there is some news about getting "zombie:changeSpeed()" to work soon?

bitter elbow
#

Hey yall, quick question. I've made a vehicle mod previously and had no issues with textures. However trying to make a new vehicle mod and no matter what I do, the main texture for the car won't load. I've literally done everything I can think of to get it to load lol IDK what's going on. Anyone got any ideas? Would be much appreciated

nimble spoke
#

I had to comment the lines and update my mod so it isn't broken for now

bitter elbow
#

nvm I think I fixed my texture issue. I think it mighta been in a .png format that zomboid didn't like

warped sage
latent oxide
#

how do i make mods* work on a server?

#

i add them in server settings

#

and enable in my own settings

#

and see no effect

stable hornet
#

words or mods

#

if mods you need to enable them both in steam workshop and mod category

#

some mods have multiple packages so you need to choose

latent oxide
#

yeah mods*

sonic atlas
#

@weary matrix do you know if there is a death event that occurs prior to corpse generation?

latent oxide
#

and they don't work

wet dune
#

What would be the most simple way to make a gun mod?

#

I just want a extra gun for a server

stable hornet
latent oxide
#

no

stable hornet
#

so much problems rat

wind bear
#

what mods?

soft walrus
#

Is it possible to make spawn point choices appear only after you have uncovered a particular part of the map? Say only Rosewood is available until you hit the Muldraugh border, then if you die you can start in Muldraugh. Or other custom spawn locations?

latent oxide
weary matrix
#

@latent oxide remove this post please and not sure what your question is but it probably has to be asked in #mod_support

latent oxide
#

mod support seems to be a channel related to modders supporting their specific mods

#

not general modding questions

weary matrix
#

@sonic atlas are you're asking if the onZombieDead event is happening before the call to new IsoDeadBody?

#

@latent oxide well this one is about creating mods are you creating a mod?

latent oxide
#

@weary matrix im not asking for a modder to support their mod for me and have no questions regarding mods' functions

wet dune
#

How would I make a simple musket? I just want it to shoot one shot and take forever to reload, however I want to be able to craft it. What would be the easiest way to go about doing this? Sorry I'm asking again no one answered my initial question.

sonic atlas
willow estuary
#

@latent oxide #mod_development is for people making mods and such; #mod_support if for end user issues with mods, such as yours. 🙂
If you have general, and not mod specific, issues with getting mods working on a server that would be #old_techsupport or #mod_support , but not modding.

weary matrix
#

@latent oxide why are you posting your mod list?

wet dune
latent oxide
#

@weary matrix because a person asked

wet dune
#

Should I pull apart another gun mod and use that?

weary matrix
#

@latent oxide I really doubt anyone asked you to post your mod list here cause here is not a support channel as mentioned by Blair Algol

wind bear
weary matrix
#

@wind bear damn you 😂

wind bear
#

I wasn't expecting him to post like 20 mods in a screenshot lol, I thought it was going to be like 5 at most

willow estuary
#

The Modding Section of the PZ Wiki: https://pzwiki.net/wiki/Modding
This is where links to modding resources should be posted by the community.

All of the pinned posts were migrated here; if a pinned post is missing, it's here now.

And if you have anything you can contribute to the PZ Wiki Modding Page, even a link to a post of yours from this Discord, please do! Registration is quick and easy, and so is adding links to the page with the editing interface. 🙂

if code:isUseful() then
   code:pinMessage(false)
   wiki:add(code)
end
weary matrix
#

@latent oxide well anyway this is not the place for this kind of support, so please remove that list of mod and ask your question in the proper channel

drifting ore
# wet dune Should I pull apart another gun mod and use that?

Yes I recommend you to look at a mod that adds weapons, a not too big like Firearms. And there is a video that explains pretty well, even if there is something that could be improved. Use .fbx files for example. https://www.youtube.com/watch?v=2M2fWLBLaX8

0:00 Intro
0:29 Video Start
1:00 Start Blender
1:22 Using a background image
2:04 Using photoshop to edit the background image
2:52 Adding the edited background image to blender
3:26 Adding the cube mesh
3:46 Quick start with the cube
4:56 Importing a finished 3d Model from the internet
5:56 Moding the imported model
6:47 ADD NOTE ABOUT MAGAZIN...

▶ Play video
latent oxide
#

blocking you co, asked you not to spam pings in dm

i think it would be a good idea to also add channel description to #mod_support to point out what that channel is for specifically

weary matrix
#

loool now he's threatening to block me 😂

latent oxide
#

there is no info in there and in its pins too

drifting ore
stable hornet
#

holy shit amputation?

drifting ore
#

Yep

abstract wave
#

👀

weary matrix
#

oh nice @drifting ore

abstract wave
#

Please tell me I can remove zombie infection that way, and eat myself.

drifting ore
#

For the moment you can do nothing but yes, it's planned. With a lot of other idea 😉

abstract wave
#

Sounds cool. 😄

drifting ore
#

The mod is name "The only cure" btw

abstract wave
#

I am neck deep in WordZed, going to add a funky tv show for mechanic skill.
Actually finished one for Maintenance, but then realized there's no code to add maintenance skill up in radio/tv, so that's on hold.. since im too dumb to figure out how to add it myself lol

golden flint
#

Can some one help me with some mods? the Brita weapon packs are showing as invisible and the maps mods Idk how to load them in the server

bitter elbow
#

Got my new car working, expect to see it on workshop in a few days :>

blissful meteor
#

doing my head in, i cant find the file that defines what a zombie carrys? I need to make it so a specific zed i have made always drops an item. Does anyone know what file controls it?

#

ive found the stuff for clothing, but its just a normal item

drifting ore
#

Is there a way to know the player's skin color?

marsh tulip
#

Looking for a mod to make zombies attack attack every X days or some type of wave system

crystal sentinel
#

Anybody know if the True Music mod works on stable build?

#

Specifically for multiplayer that is

bitter elbow
#

just gotta finish the mask and damage textures

hidden haven
#

help with mod creation? I wanted to take away the sadness and boredom effects of frozen food, just like ice cream.

ruby urchin
livid zinc
#

Since this is a bit out of my realm I was curious if anyone has looked into creating Twitch Integration for PZ ? I think it would be pretty hilarious. But figure I'd put it out there

willow estuary
willow estuary
ruby urchin
willow estuary
#

Mods have a bad history with overwriting the vanilla distro files, so I always have a kneejerk reaction when I see vanilla file names in the context of distro stuff 😄

ruby urchin
#

Yee I know about that, I hope someday devs change how works ENV mods

#

that would solve many problems

#

but the way the game code is written (lua side), it would be a lot of work

willow estuary
#

Well, I always have to have one quibble when looking over something anyways? But again, exceptionally + refreshingly well done from looking at the folders and files!

crude heath
#

Hi, I hope this is the right channel to ask instead of #modeling but I wanted to know if anyone has an idea if it is possible to have a weapon use new firing animations? I've been successful in replacing the game's single shot animation with a faster version, but I want to make guns that use entirely new animations I am working on. I have already decompiled the source with Beautiful Java but I've been unable to find anything meaningful yet, and even if I did, I am unsure how to connect it all with the game engine.

Here is the proof of concept video I've made. My end goal is to add a MP5 with a high ROF as part of a larger modification.

weary matrix
#

I think I'm about to become crazy 😢

grizzled grove
crude heath
#

Thank you for the suggestion. I had the same exact hunch and made some progress. If I can find out something conclusive, I will write it up and hopefully it will be useful for others

low crest
#

hello, i am trying to run a server on linux and i'm getting the error
"couldn't determine 32/64 bit of java". I found this but i am not sure what it means: Known issues:
"Project Zomboid" may report "couldn't determine 32/64 bit of java". This is not related to java at all, it carries its own outdated java binary that refuses to start if path contains non-latin characters. Check for errors by directly starting local java binary within steam-run bash.

#

my brain is fried right now

willow estuary
#

@low crest This sounds like a #old_techsupport issue, and not anything people here would be able to help you with? 🙂

low crest
#

oh yes, indeed

#

sorry, as i said my brain is fried

willow estuary
crude heath
#

I just wanted to provide a small happy update. Your hunch, throttlekitty, and mine, were indeed correct. The animation XML detects the current firemode and can apply actions such as playing certain animations. I'm super happy about this, and was worried I would have to do some wild scripting to get this to work, but its been fairly painless after figuring out the process. As I promised, I'd like to write up a proper guide later, because I haven't seen too many mods take advantage of this, and I think it'd be great for people to know. Thank you so much for giving me the confidence that I was looking in the right place. I really appreciate the help you gave me.

#

Please forgive the silliness of the firing mode being "Ligma". I like using weird names when I test things.

tired charm
#

Hello, stupid question but I'm not sure. I've successfully imported a model for a weapon. I've managed to set the scale and it works fine, but the model is rotated wrongly. I've tried changing the rotation in the model script, but nothing seems to happen. Does anyone have any idea? Thanks!

#

model LeadPipeScissors { mesh = weapons/melee/LeadPipeScissors, texture = weapons/LeadPipeScissors, attachment world { offset = 0.0000 0.0000 0.0000, rotate = 0.0000 0.0000 0.0000, } }

#

The model ^ Changing rotate does not change anything.

crude heath
#

Assuming you're using Blender, have you applied your rotation transformations in Blender before exporting? That might fix it

crude heath
#

I see

tired charm
#

I can't understand how to rotate that stuff mostly, in game files/mod example files it used to change those rotations, but nothing seems to happen doing it for mine.

weary matrix
#

Any clue someone how to use sendServerCommand()?

grizzled grove
crude heath
#

Yeah. I basically duplicated the AssaultRifleDefault.xml and made a new .xml file. In this file I changed its <m_name> to match the new .xml file name, and under <m_Conditions> I check that the firemode is "Ligma". Then, I changed the <m_AnimName> </m_AnimName> to reference my new firing animation

grizzled grove
#

nice, that's way easy! (meanwhile, got python and xml kicking my ass. am so tired)

crude heath
#

Yeah, I'm glad its so easy, lol. Sorry to hear you've been having a rough time, what are you working on?

grizzled grove
#

just a little tool to make mapping a bit easier. the new official tools' method for tagging buildings for the in-game map isn't very friendly for tagging a whole lot at a time

crude heath
#

Ah, I see

weary matrix
#

@grizzled grove can I help you? I need to get my head out of java 😂

#

or I'll lose my sanity

thin junco
#

I wonder where Paw low loot's creator is, and is he/she thinking to update it the mod, i really love his/her work

flint bolt
#

Is it possible to get access to all player's data on my server through players.db using Lua? From what I've gathered, it seems this data is parsed by IsoPlayer:load on java. I only want access to basic data, like zombies killed, hours survived. I know how to do that with OnlinePlayers, but I want to have access to all current active players.

tired charm
#

Sorry again for another question: I've managed to import succesfully a model and my weapon in game, I still face one issue, though. The model only shows on the char's back/when I'm holding it. Placing it on the ground uses the 2D Icon, something I would want to avoid. I know clothing have some kind of OnGround tag, though vanilla weapons do not use it. How should I proceed implementing models on the ground aswell? Thank you!

weary matrix
#

Hello @tired charm, maybe you'd get more chance to get an answer from the #modeling channel

tired charm
weary matrix
#

@flint bolt mmm players.db is a SQLite database, haven't seen anything to read those from Lua. Unless you find a library in pure Lua I'm afraid it's not meant to happen. Easiest would be to have an external tool to extract the data you need, and make it available to Lua through a file you could easily parse. Maybe there's a way to access the info with the Lua modding API but I don't really know how

#

it all depends what info you need exactly

flint bolt
weary matrix
#

@gentle crater oh maybe check this one: getOnlinePlayers()

#

it's a global function

#

returns an ArrayList

flint bolt
#

Yeah, this one gets only the online players, ideally I would like to get data from offline players as well!

#

So far, what I've decided to do is store the data (by using getOnlinePlayers) in a .txt file every time there is a update to the data I'm interested in, and then this file will be my "db"

#

I want to generate a ranking for my server, that can be displayed on Discord using other tools

weary matrix
#

@flint bolt then I guess your best bet is using an external tool. For example if you know a bit about scripting (like bash etc) this command would probably give you what you need:
$ sqlite3 players.db "SELECT * FROM networkPlayers"

#

for example on my server this returns this info:
1|servertest|admin|0|Caroline Fitzpatrick|12474.6083984375|4332.4794921875|0.0|186||0

flint bolt
weary matrix
#

mmm true there seems to be a big blob of data in there

flint bolt
#

Yup. I did manage to find the bytes that correspond to the data that I want by trial and error, but since the blob can change in size, this is not the right way heh.

weary matrix
#

@flint bolt you could check IsoPlayer.load() method, this is the one parsing the blob I think

#

for example I can see this:

this.setZombieKills(byteBuffer.getInt());```
flint bolt
#

Exactly! But since Java is not my main language, it did give me a headache 😆

weary matrix
#

it shouldn't be too hard, it takes a byte buffer as parameter, which is a buffer containing the blob in db

#

you just have to check all the access to this parameter like byteBuffer.get(), byteBuffer.getInt() etc

flint bolt
#

I did try to find the data by checking the order in which each get is executed, and knowing the size in bytes of each type in Java (int, double, etc), but something is weird. For example, zombie kills is right at the beginning of the buffer, but by my experiments, it seems that this data is stored near the end of the bytes that I got fom sqlite.

weary matrix
#

@flint bolt I guess this is why:

        byte byte1 = byteBuffer.get();
        byte byte2 = byteBuffer.get();
        super.load(byteBuffer, int1, boolean1);
flint bolt
#

It jumps two bytes and then I don't really understand what happens at super.load, right?

weary matrix
#

it reads two bytes from the buffer, then it calls the super.load() on the byte buffer, which is IsoGameCharacter.load(), this one is reading a lot of values from the buffer

flint bolt
#

Oooooooh

weary matrix
#

guess that's why the value you expect are near the end

#

it would be best to find another way of getting that info though, because basically every time the dev will change the format of the blob it would break your mod

flint bolt
#

Fair point, I guess I will stick to generating a .txt file with the data I need from the online players everytime there is a change. Then I can easily parse those files

weary matrix
#

indeed, seems more reliable on the long term

flint bolt
#

Thanks a lot for the help @weary matrix ! 👍

weary matrix
#

pretty sure you should be able to get the info from Lua though

flint bolt
#

Yup, I already know how to get the zombie kills from each player inside online players

weary matrix
#

@flint bolt mmm what about adding an event handler for onCreatePlayer? That way you can store the player IDs somewhere, then call getSpecificPlayer to get the corresponding player instance?

flint bolt
#

Does getSpecificPlayer work for offline players?

weary matrix
#

you'd have to try, I don't know 😅

#

but is worth checking IMHO

flint bolt
#

Got it

weary matrix
#

mmm I see getAllSavedPlayers but it's marked as deprecated :/

flint bolt
#

Aw 😦

weary matrix
#

@flint bolt maybe getSaveInfo() can help

#

also maybe this one, getPlayerByOnlineID, not sure if the onlineID are constant for a given player though

#

@flint bolt you can call player:getZombieKills()

flint bolt
weary matrix
#

should be good

#

check LuaManager for a list of most global functions available

winged lotus
#

Hi all, this is kind of driving me crazy, I though maybe you could help me, I recover the list of the current actions for a character:
local playerActions = player:getCharacterActions()
when the character is idle and I log this value, it prints
[]
then I want to create a condition to avoid calling get(0) on it if it is empty
though I just can't make a single if that works. I tried using # to get lenght or checking for nil.
None works and it always fail in error (# even saying that __len does not exist for operator).
Am I missing something obvious?

weary matrix
#

@winged lotus it returns a java.util.Stack object

#

you should be able to call playerActions:empty() or playerActions:size()

winged lotus
#

Aaah I thought it must be something like that!

#

Thanks a lot 🙏

weary matrix
#

the # operators only works on tables

severe shadow
#

I'm currently developing a mod, and I was wondering if there was a way to reload the translations instead of reloading the mod each time 🤔

weary matrix
#

what are you trying to achieve?

severe shadow
#

To test the translations

weary matrix
#

oh I see

winged lotus
#

@severe shadow I wanted to do something similiar to change the callout texts depending on traits but dit not manage to achieve it

weary matrix
#

@severe shadow check zombie/core/Translator.java

#

it is exposed to Lua and has a static method loadFiles()

#

so you should be able to call it like this from Lua:

Translator.loadFiles()```
severe shadow
#

Oh thank's ^^

weary matrix
#

@severe shadow please let us know if it works as expected 😅

severe shadow
#

Yes it works perfectly

weary matrix
#

awesome

deft marsh
#

Paying someone to have a simple mod created. Need a checkbox under safehouse menu to make safehouse public.
Pm me if interested

slate dagger
#

@weary matrix i was trying to use your beautiful java but i am getting an error where it says that i have an invalid path to the Intellij

sour island
#

Didn't the old MP have a tracked kill and death count?

weary matrix
#

@slate dagger can you show me the conf? In DM if you like

slate dagger
#

sure

weary matrix
#

@sour island you mean number of zombie killed and number of time a player lost his character?

stiff urchin
#

Are there any resources (preferably written) on loot distribution? Anything I find on the discord or forums seems to be outdated for the old loot system.

I've added items, recipes, and done some basic scripts for mods but item distributions and spawns are still confusing me. I've made some content I really enjoy just no idea how to get it to start spawning/appearing in the world properly.

Thanks!

weary matrix
#

@stiff urchin I don't know but you could check mods that have been updated for MP release and that use the distribution system

stiff urchin
#

I've been trying to dissect a few of them but I still don't understand quite how it's supposed to work. Thanks though.

#

If you have one that has good loot distribution/integration to reference that's straightforward I'd appreciate it.

#

I just know that's how I distribute the loot into the world...just no idea how to integrate it.

abstract wave
#

I am doing research for a medicine mod, my youtube is full of Essential Oil suggestions now 😂

sharp crystal
#

Hello. Is there a mod which handles how quick one gets dirty? Because for me it seems very unrealistic (it sucks) that after washing the clothes and going to sleep I am dirty again and I have to wash my clothes again and again... I would like to adjust it a bit. Is there a mod like this or where to look at for editing it by myself pls?

weary matrix
#

same for you btw @sharp crystal

sour island
weary matrix
glossy bear
#

ohh i see x3 thank you ~ i'll ask there

abstract wave
#

Can an item have two types? For example Food & Drainable? I want to make an item that you can use a customcontextmenu on several times. Like eating painkillerrs.

#

How would I go about achieving this?

abstract wave
#

Or otherwise, any help with making an item eatable multiple times?

weary matrix
#

@abstract wave aren't all food items eatable multiple times?

abstract wave
#

I'm trying to make something similar to a pack of painkillers, where you can get the full effect of a pill several times.

#

But not sure how to go about doing that.

#

Ideally with the little progress bar, like if something was wet.

weary matrix
#

why not doing the same as pills then?

abstract wave
#

I'm not sure how to, it's what im asking for help with I guess.

I was looking at the item definition ```c
item PillsSleepingTablets
{
DisplayCategory = FirstAid,
Weight = 0.2,
Type = Drainable,
UseDelta = 0.1,
UseWhileEquipped = FALSE,
DisplayName = Sleeping Tablets,
Icon = PillsSleeping,
Tooltip = Tooltip_PillsSleeping,
StaticModel = PillBottle,
WorldStaticModel = SleepingTablets_Ground,
Medical = TRUE,
}


But it's not clear to me if this is calling some lua function or how the game knows what to do when this is used.
weary matrix
#

@abstract wave not sure but I think the magic happens due to Type = Drainable and Medical = TRUE

#

also useDelta of course

abstract wave
#

And UseDelta=0.1 would mean this has 10 uses I'm guessing?

weary matrix
#

I think so yes

abstract wave
#

I'll try to make an item like that and see what happens, cheers

#

Hmm, nope - No use option on it, just copied the above and changed the name.

terse matrix
#

idk why PZ doesn't have the opintion to light your ciggatte on a stove? Real smokers know whats up!

sharp crystal
#

@minor snow why have you disabled the comments section in the workshop?

digital trellis
#

Hello. I'm trying to make a Survival Bracelet.
You can light a fire and wear the bracelet at the same time.
So i'm trying to copy and paste the code of the lighter and friendship bracelet, but is it possible to make the survival bracelet?
@digital trellis to awnser my question please 😉

#

item SurvivalBracelet
{
DisplayCategory = Accessory,
Type = Clothing,
DisplayName = Survival Bracelet,
ClothingItem = Bracelet_RightFriendshipTINT,
BodyLocation = RightWrist,
Icon = Bracelet_Friendship,
Weight = 0.1,
ClothingItemExtra = Bracelet_LeftFriendshipTINT,
ClothingItemExtraOption = LeftWrist,
clothingExtraSubmenu = RightWrist,
Cosmetic = TRUE,
WorldStaticModel = Bracelet_Friendship_Ground,
LightDistance = 2,
UseWhileEquipped = TRUE,
TorchCone = FALSE,
LightStrength = 0.4,
ActivatedItem = TRUE,
MetalValue = 1,
cantBeConsolided = TRUE,
ticksPerEquipUse = 110,
}

#

I have mixed Lighter and Friendship bracelet

sharp crystal
#

Just a question. Is it allowed to steal multiple mods from others and present them as your own compilation without even asking the authors for permission?

digital trellis
#

but it didn't work

sharp crystal
#

Not me.

#

Some guy Sego presents his mod as Better UI

#

As a compilation of existing mods

#

After asking him about it he just disables the comment section

digital trellis
#

If he put the link of the authors it's OK

eager kraken
#

I attached hunting knife to a chest rig and the game threw over 10k errors and i couldnt drop/remove the knife or the chest rig. Seems like its from advanced gear mod by planetalgol.

sharp crystal
#

Maybe Rifle sling mod?

eager kraken
#

it was called chest rig not rifle sling

#

and thats only for rifles and shotguns

sharp crystal
#

Ok. If you insist

finite quail
#

hey guys, anybody knows how to read "data" column from "players.db" file? i want to be able to read and edit this safely, it seems to be binary file which i dont know how to parse

#

i found some 6y old reddit post that said it might be Java serialized object but I failed trying to use Java to deserialize that

dusk pawn
#

stupid thing maybe but Would a mounted gun even be possible in zomboid at all

abstract wave
#

@weary matrix Solved it with a recipe, thanks for the help! ```c
recipe Take Black Sage Tincture
{
BlackSageTincture;1,

        Result:BlackSageTincture,
        RemoveResultItem:true,
        Time:30.0,
        OnCreate:KapMedTakeBlackSageTincture,
    }
#

Then the item can be drainable.

abstract wave
#

Is the correct way to take pain meds through ```c
player:getBodyDamage():setPainReductionFromMeds


?
nimble spoke
#

Hey modders, I just identified a potential issue for those of you that use Item Tweaker or override game items in a similar way: DO NOT override new items for now, as people are updating their old saves and servers to build 41.65, it causes a java error and makes people unable to play those saves

#

Items such as pumpkin, mango and others that were added in 41.65

stiff urchin
#

Are there any resources (preferably written) on loot distribution? Specifically adding a new item into loot without overwriting vanilla loot. Anything I find on the discord or forums seems to be outdated for the old loot system or doesn't explain how to do this.

I've added in items, recipes, and done some basic scripts for mods but item distributions and spawns are still confusing me. I've made some content I really enjoy just no idea how to get it to start spawning/appearing in the world properly.

Thanks!

#

[Or if anyone knows of a mod that does stellar, clear loot distribution for their custom items so I could dissect and learn how they did it]

echo lark
#

im unsure if i should ask this here or on mod support but im getting this error when i try to log into my dedicated server hosted by nitrado

thin hornet
#

@echo lark you are subscribbed to your mod. and have a local version of the mod ?

echo lark
#

yeah i follow the path it has listed and i have the file

thin hornet
#

why do you have a ! in the file name?

echo lark
#

it just came like that when i downloaded it

junior flame
#

Does anyone know the item name for Broken Glass? I assume it's defined somewhere, since we can pick it up, similar to corpses.

echo lark
#

@thin hornet unless i have the file in the wrong location i dont understand why its giving me that error

thin hornet
#

i get that kind of error when i edit my mod that i develop but am subscribed to it at the same time.

stiff urchin
#

@echo lark sorry to not be helpful but I can confirm this is an error happening to one server I play on frequently. Only began with the "official" releases and even after full reinstalls fresh and confirming the file is there, it still happens. Hosted via GPortal.

echo lark
#

hmmm so is it a issue on the end of the website hosts?

stiff urchin
#

Not saying that sorry, just saying that it's definitely an issue we worked on all day yesterday and couldn't solve: GPortal or regular hosting. Was going to try out Nitrado today but if you're getting that error there too...

viral compass
#

Quick question, with the addition of 3d item models in the game which can spawn on tables, counters and stuff like that I was wondering which script takes care of that. I have a bunch of custom tiles id like to update to support it.

grizzled grove
#

same with vehicle and zone story definitions

drifting ore
#

Is there a way to create a new types of injuries?

#

Or does anyone know of a mod that does it, that i could check?

abstract wave
#

So far so good 😄

blissful meteor
#

Can anyone help me out please? I'd like to know if it's possible to make a vehicle spawn at x/y on completion of a recipe. Could anyone point me in the right direction?

hollow shadow
#

Anyone also got a bug where the game selects random scripts (modded or not) and decides to break their item descriptions for them? when you hover over the item you get 100 errors per second

#

the error only shows that a vanilla lua file is breaking

#

makes me feel like its a vanilla bug and not related to my mod

slate laurel
abstract wave
placid pine
#

Anyone have an item distro guide or link? Trying to fix an older mod.

eager kraken
#

Any idea which mod adds all this crap?

hollow shadow
#

<@&671452400221159444>

violet fractal
eager kraken
#

Whats the best way to find out what causes errors in bottom right?

eager kraken
#

I don't suppose anyone knows of a mod that makes 5% of the zombie pop into sprinters and then 45/50% shamblers/fast shamblers?

#

Since customizable zombies mod is broken now due to a removed "changeSpeed()" function for zombies in hard-coded Java. :(

nimble spoke
noble dagger
#

👋 Should this be running the Lua file "Testing.lua" ?

I have enabled the mod in-client and then ran a Solo game, but it doesn't seem to work.

#

Maybe my file struct is wrong?

distant slate
#

I have a degenerate friend that thinks "shoe-eys" are hilarious and regularly drinks alcohol out of his shoe. How hard would it be to make a mod that allows shoes to also be used as a drink container?

#

Also, for the Old Gregg roleplay.

winter bolt
noble dagger
#

👍 Alright, I'll give that a go. Thanks.

#

No luck there.

vague geyser
#

Anyone have a steam collection of a good mod pack that works on the new build and doesn’t make the game too crazy? Armor, weapons, clothing is all fine, don’t want crazy zombies or nothing like that

deep crater
abstract wave
#

I think I will have to add a TV show or radio show to explain what each medicine does 😄 Seems like the right way to do it

eager kraken
#

I'm running into a weird issue where if i attach weapon to my belt/holster and i take it out and go to try attack with it my character will have his arms down to sides and then i attack he does the shoving animation and unequips the weapon

#

I can't figure out whats causing it

bitter elbow
#

Supras up on workshop :>

nimble spoke
#

WARNING Item:getMap() got replaced by Item:IsMap()

#

Doesn't seem to return what getMap() used to do though

twin robin
#

Anyone know if it's possible to replace a sound?

thin hornet
#

hey guys im trying to run the server from localhost but can't seem to find why i cant connected

#

its running on the same machine so i dont see why it doesnt find it
tried localhost and my local ip

#

got it working by using the steam bat file

thin hornet
#

how do you test your mods in mp without pushing them to workshop?

#

It seem i have to copy the directories to my other computer for every changes that i want to test

drifting ore
winged lotus
#

Good evening all, I am currently strugling with the following issue.

I recover a timed action:
currentActionLua = ISTimedActionQueue.getTimedActionQueue(player).current
then I can check its type to make sure it is an action relevant to moving items around
if (currentActionLua.Type == "ISInventoryTransferAction") or (currentActionLua.Type == "ISGrabItemAction") then
finally I would like to do things with the item itself that is part of this action
yet, currentActionLua.item returns nil and I am a bit stuck here.

Am I missing something? or am I looking in the wrong place? I just can't manage to access it from outside and I would really like to avoid having to overload these classes for so little 🤔

thin hornet
#

How much ram a server must have to run per player?

#

cause renting a 16gb server is not cheap xD

#

from digitalocean would cost 80$/m for a 16gb 2 cpu server

echo lark
#

has anyone been able to add maps to a hosted dedicated server? all my mods work but maps dont seem to ( dont have them as a spawning point when i load in) i suspect its because the world generates before adding the mods for the map so they arent included but cant seem to find a fix

rare patrol
#

Is there a mod that allows you to control if you want to go up or down when climbing a sheet rope? I just watched my character slowly go down to a horde waiting for me down the rope

blissful meteor
#

@thin hornet how many slots is that, seems overpriced

thin hornet
#

its a linux server solution, not an actual pz server hosting solution

#

i checked a site for pz server and apparently 4gb would be ok for 32 player

#

but idk

#

but still was around 40$ to 60$

blissful meteor
#

@echo lark when you edit the ini file and maps= make sure muldraugh, ky is the last in the row

analog spade
#

Hey dudes!
I'm looking for the mod that show the health bar of the zombies, can someone help me ?

blissful meteor
#

I use 12 slot server running mods, uses about 7GB when full

#

I'd like to see a 32 slot only using 4GB, I heard its 300mb per player

echo lark
#

@blissful meteor i have muldraugh as the last in the list, im not sure if they are actualy working and i just cant spawn there or if its just not working at all

blissful meteor
#

What maps, some dont have spawns

#

My fort redstone doesnt

echo lark
#

well when i woudl host the game locally they all had spawn points, but when i switched to a dedicated server via nitrado theres only 2 spawn points

junior flame
blissful meteor
#

Suppose you could just try it with the name, I was messing with recipes last night.

Can easily make a server shop/trading post with a few recipes/items/tilesets

rare patrol
#

Is there a mod where you can refill your lighter?

nimble spoke
junior flame
nimble spoke
junior flame
winged lotus
#

Any idea on how to add functions to existing classes without having to overload everything?

Let's say I want to add one function to ISInventoryTransferAction without redefining the whole file in my mod. By experience, hard overloading is the best way to have your mod conflicting / outdated really fast.

Anyone has leads on how to do it in a more proper/clean way?

nimble spoke
quasi geode
#

or short version (instead of reading a concept on how bad it is, which you already understand)

local original_render = ISToolTipInv.render
function ISToolTipInv:render()
    if not CONDITION then
        original_render(self)
    end
    -- ... some custom code ...
end

different function overwritten there from what you want, but same idea

#

with what Soul Filcher said ofc, new file and just replace the function. no need to replace the whole file

winged lotus
#

Oh many thanks for your answers 🤩

drifting ore
#

Is it possible to use player:getModData().my_variable = true in a recipe ?

#

Basically I want to save the information that the player has made this recipe and authorize him only if he has not already made it.

nimble spoke
brittle jewel
#

I think you can do that with 'OnCanPerform' in your .txt recipe. You will set 'OnCanPerform' to a function that will ultimately return true or false.

drifting ore
drifting ore
winged lotus
# quasi geode or short version (instead of reading a concept on how bad it is, which you alrea...

So, I have tried doing it this way but it appears that I dont have access to the original self because it is nil in this context.

local original_perform = ISInventoryTransferAction:perform
function ISInventoryTransferAction:perform()
    original_perform(self)
    print("-- end of override --")
    print(self.item)
end

I am now a bit confused with the scope of self is linked to the current fuction only? This also means that I don't have access to any values stored in self.something this way

quasi geode
#

local original_perform = ISInventoryTransferAction:perform this is a issue, use a . instead of :

#

local original_perform = ISInventoryTransferAction.perform

winged lotus
# drifting ore Ok so I put `OnCanPerform: OnCutRightHand` on my recipe but where do I make the ...

Yes indeed, here is an example from one of my mods:

-- High carpentry skill produces more twigs
function ISBuildMenuDowel.CraftDowelsfromBranch(items, result, player)
    -- Guaranteed Twigs
    player:getInventory():AddItem("Base.Twigs")
    -- Extra twigs chance is 10% per carpentry level
    -- Rolled once for one extra twigs
    local chance = player:getPerkLevel(Perks.Woodwork)*10
    if ZombRand(0,100) < chance then
        player:getInventory():AddItem("Base.Twigs")
    end
end

I then call OnCreate:ISBuildMenuDowel.CraftDowelsfromPlank, in my recipe. Yours would be OnPerform but you get the idea 😉

quasi geode
#

self is automatically created when the function is called (assuming the function is called like ISInventoryTransferAction:perform()

#

calling a function in lua with : self is the table/class containing the function

winged lotus
#

Sharp eye, thank you! 😮

drifting ore
#

New to lua and PZ mod, there are things that I rly still don't understand

winged lotus
#

Yup, for this one it is basically

    recipe Craft Dowels from Plank
    {
        Plank,
        keep KitchenKnife/HuntingKnife/FlintKnife/MeatCleaver/Machete,
        keep [Recipe.GetItemTypes.Saw],
        
        Result:WoodDowel=4,
        Sound:Sawing,
        Time:200.0,
        OnCreate:ISBuildMenuDowel.CraftDowelsfromPlank,
        SkillRequired:Woodwork=1,
        XP:Woodwork=0.12,
        Category:Carpentry,
        NeedToBeLearn: true,
        Tooltip:You will recover scrap wood from the plank.<br>Carpentry skill increase chances to produce more dowel.,
    }

You can subscribe and browse full code of the mod here: https://steamcommunity.com/sharedfiles/filedetails/?id=498634342

edgy nymph
#

is paws loot broken?

winged lotus
# drifting ore Nice, big thx

Tooltip is interesting to use here for your custom recipe to explain what is actually going to happen / extra restrictions that may apply, because otherwise the UI will only mention base ingredients, results, skill required and time

willow estuary
# edgy nymph is paws loot broken?

#mod_support is a new channel, so a lot of people don't know yet, but that's where you can go to ask those sorts of questions about using mods. This channel is going to be strictly focused on making mods now. 🙂

edgy nymph
winged lotus
# drifting ore Yeah, I already use it 😉

Oh and since you said you are new to the pz modding, not sure you know, but you can find code from all your subscribed mods in \Steam\steamapps\workshop\content\108600 it can help. I'd recommend you giving a look at the big tutorial Fenris_wolf posted just above too, did not knew about it until now, it has some great insight!

drifting ore
#

Thx, I already check the tuto and I already took you mod from \Steam\steamapps\workshop\content\108600 ^^

drifting ore
winged lotus
#

Not sure if it was somewhere here https://pzwiki.net/wiki/Modding:Lua_Events or directly from looking into Indie Stones' implementations of OnPerform functions. It appears that those are the standard parameters for this kind of function. It is a bit of an empirical method I must admit.

#

From what I understand you are looking to create a OnCanPerform function right? Here you can see how this was done by TIS in media/lua/server/recipecode.lua

-- Example OnCanPeform function.
function Recipe.OnCanPerform.HockeyMaskSmashBottle(recipe, playerObj)
    local wornItem = playerObj:getWornItem("MaskEyes")
    return (wornItem ~= nil) and (wornItem:getType() == "Hat_HockeyMask")
end

-- only clean if not cooked, to avoid mistake instead of clicking "get muffins"
function Recipe.OnCanPerform.CleanMuffin(recipe, playerObj, item)
    return item and not item:isCooked();
end

-- Muffins need to be cooked first
function Recipe.OnCanPerform.GetMuffin(recipe, playerObj, item)
    return item and item:isCooked();
end
drifting ore
#

And when the recipe is use, run a lua function

#

Ok i get the lua dunction to run when I use the recipe

#

Or I just thought of something better, can I add action to the saw? That I can right click and that gives me a custom option?

quasi geode
# drifting ore Not sure, I want to authorize a recipe only if `player:getModData().my_variable ...

use OnTest in your recipe. for example:

  recipe Remove Battery
   {
     keep Torch/HandTorch/Rubberducky2,

     Result:Battery,
     Time:30,
     OnTest:Recipe.OnTest.TorchBatteryRemoval,
     OnCreate:Recipe.OnCreate.TorchBatteryRemoval,
     StopOnWalk:false,
   }

In lua/server/recipecode.lua there exists the function:

-- Return true if recipe is valid, false otherwise
function Recipe.OnTest.TorchBatteryRemoval (sourceItem, result)
    return sourceItem:getUsedDelta() > 0;
end
#

if the function returns false, the recipe is invalid

junior flame
#

This is a little nitpicky, since functionally it is a-okay...but does anyone know what is causing this huge gap to appear between the recipe icon, and the recipe result name? I've noticed on several items added via mod, but looking through them I can't deduce what causes it.

drifting ore
#

How do I add a variable to the player?
I tried player:getModData().IsCut_handRight = False and then return player:getModData().IsCut_handRight but it's not working.
I also tired player:getModData()[IsCut_handLeft] = False and then return player:getModData()[IsCut_handLeft] but same
I also tired player:getModData()['IsCut_handLeft'] = False and then return player:getModData()['IsCut_handLeft'] but same
Edit: it was that = False not work

silver kindle
#

What's a mod for safehouse anywhere

empty yacht
#

how do you host a modded server thrugh pz main menu?

ruby urchin
flint bolt
#

Hello, there is no event for player disconnect on Server?

brittle jewel
flint bolt
brittle jewel
#

I'm not sure of that offhand, you'll need to do some experimenting!

flint bolt
#

Got it, thanks!

drifting ore
empty yacht
#

is there a mod load order guide i can look at?

sonic atlas
#

does anyone know how to get the reference to your corpse after death?

drifting ore
#

How do I equip a cloth to a player?

thin hornet
empty yacht
#

im trying to host a modded server with my friends, I just discovered for example that mod options b41 has to be on top when managing the the steam workshop setting. I just wondering if there is a general rule for the load order of mods, like so and so mods are always on top then everything else underneath can be whatever

thin hornet
#

technically there is no mod order if things are done properly

#

mods that require files should use require() which will force the "load order" of things.

empty yacht
#

interesting so i can just add all my mods and it should reorder things by itself?

thin hornet
#

well mods that require other mods will do so when modB require modA. So yeah

#

Add your mods and test it should works

#

just like in Singleplayer

silver kindle
#

Is there a safehouse anywhere mod

weary matrix
#

@empty yacht @silver kindle your question would be more relevant in #mod_support, here it's only about creating mods

lunar jungle
#

I've been looking into how to mod, is it possible to change how the game checks if you're eligible to sleep? I'm trying to see if there's a way to have the game ignore whether you're not tired enough or too in pain to sleep.

thin hornet
#

@lunar jungle look into
media\lua\client\Camping\ISUI\ISCampingMenu for doSleepOption
and
media\lua\client\Camping\ISUI\ISWorldObjectContextMenu for doSleepOption

lunar jungle
#

Thanks! Hopefully that'll give me a good head start!

drifting ore
#

I quickly ask my question again in the hope of an answer before going to bed. Is there a way to equip a cloth to a player by choosing the item?

tight blade
#

Isn't there a way to add an extra modifer to skills like Strength.
I.E Instead of the melee damage multiplier being 100% at level 5, it's at say 110% melee damage at level 5 with a trait.

Mostly wanting to add traits that replace Strong and Athletic with a different version that doesn't add the +4 to the skills, but you get benefit of an permanent multiplier for owning that skill.
I feel like I've been looking in the wrong place for it or I just can't.

flint bolt
#

Is it possible to add custom Lua libraries to a mod?

flint bolt
opal wind
#

my SheRa outfit is almost done, just need a boot and bracers now 🙂

#

maybe a cape too lol

#

anybody did a cape mod or something already?

#

i would be happy with the cape only attached to the neck weight, dont need to wave around 😄

opal wind
#

nice i wonder how he did it, im trying to make one here lets see if it work lol

scarlet sand
#

Anyone know which mod give you backpack upgrades?

sour island
#

Anyone familiar with where seen tv shows are stored on the player?

#

not sure what terms to search for

civic galleon
scarlet sand
#

Thanks

abstract wave
#

Is there a better way to reduce pain than flat out setting the pain in the players stats? like so.

function KapMedTakeBlackSageTincture(items, result, player)
    -- Reduce Pain by 20.
    if player:getStats():getPain() > 0 then
        player:getStats():setPain(player:getStats():getPain() - 20);
    end
end

This removes the pain instantly and lets the pain come back relatively quickly, how should I have pain meds work better?

tight blade
#

So you want it to gradually reduce by 20 overtime instead of instant?

blissful meteor
abstract wave
fierce basin
#

IS there any starting guides into lua modding?

river plinth
#

I have a mod from someone else that overwrites a whole file from TIS, can I somehow revert the whole overwrite without touching the original mod? So that I can just hotfix this?

gleaming valve
#

@quasi geode is there any way to limit the clothing selection with PF? or can I only add clothes?

blissful meteor
#

Does anyone know how i would go about spawning a vehicle via lua at the players location, im trying player:getLocation():AddVehicle("Base.Van"); Any help?

stable hornet
#

https://www.youtube.com/watch?v=7UfoY-trxJQ anyone know when they’re gonna release AnimZed? iirc they said it’d come with b41

Tool for constructing animation profiles for characters and allowing modding of animations on release.

Script:

This is a quick demonstration of editing animation states in Project Zomboid using the new AnimZed editor.
Here we can see the player with his animation debug showing. We see he has 1 layer of animation active.
The new system allows f...

▶ Play video
winged lotus
#

Hi all, I am trying to worn a clothing item from inventory without having it on the character. I tried setting condition at 0 but this makes it (Worn) but it can still be equipped. I want it to be (Worn) and that it cannot be equipped anymore. Any leads that could help me?

eager kraken
#

So whats up with these mods that merge several other mods together and when asked if they have gotten permission from the other modders they just delete your comment and hide comments overall?

paper tartan
#

any1 knows whats the best way to make a server modpack?

eager kraken
#

steam collections

late hound
eager kraken
late hound
#

both, just curious

paper tartan
#

i dont want updates everyday

#

it broke our game too many times

eager kraken
#

sub to mods

paper tartan
#

i want to curate a modpack and upload it

eager kraken
#

then

#

copy the files

paper tartan
#

and then manually maybe update the modpack once per week or so

eager kraken
#

zip them up

#

and upload somewhere where you can share it

paper tartan
#

but what is the mod / folder structure

eager kraken
#

i'd just copy/zip the whole mods folder

#

also idk if im mistaken but i think the mods get automatically downloaded if you join someones server

#

idk if its from the server directly or it looks them up on steam workshop

orchid goblet
#

When a mods distribution table is added to the distribution table of the server, where is that found? because I can find the local Distributions.lua in media/lua/server/Items/Distributions.lua but cant find one that would be on a dedicated server

#

is the players local file edited every time they enter a new server or ?

hollow shadow
#

anyone know how to use itemtweaker api? or know a mod that uses it?

weary matrix
#

@hollow shadow on the item page in steam workshop there's a list of mods known to use it

weary matrix
eager kraken
#

Is there a mod that moves your camera slightly forward when you're driving a car?

drifting ore
#

How do I force a player to put on a piece of clothing? Like I add it to the inventory and then I equip it. I didn't think it would be so complicated, I've been looking for literally hours

brittle jewel
paper tartan
#

guys any1 knows how to make a serve modpack, how to arrange the folders and to publish it on steam?

eager kraken
drifting ore
brittle jewel
#

Ohh, or are you still trying to do that part?

#

I thought you meant you were equipping and the player model wasn't updating.

drifting ore
#

No no, the same results as right clicking on a cloth and then put on

brittle jewel
#

How is your function being called? In an event? Or triggerd by a txt script?

drifting ore
#

It's a function that is called when I right click on an object and choose a new option. So it's a lua function

brittle jewel
#

Hmm, okay. You'll need to make sure you can get the player from that. Then you can do something like this:

local belt = playerObj:getInventory():AddItem("Base.Belt2");
playerObj:setWornItem(belt:getBodyLocation(), belt);
drifting ore
#
    player:getModData().IsCut_RightHand = 1
    player:Say("Cut my right hand")
    player:getInventory():AddItem("TOC.ArmRight_noHand")
end```
And the code look like that
brittle jewel
#

Appears correct so far.

brittle jewel
#

You might want to take a look at \media\lua\client\TimedActions\ISWearClothing.lua too, there could be some useful stuff in there.

drifting ore
oak cipher
#

Hallo! How can I add map mods in servers?

digital trellis
#

But I don't remember how to had dev console in game?

weary matrix
#

@oak cipher Hi, you'd get a better chance of having a useful answer in #mod_support

#

@digital trellis you mean to enable debug mode? Just add -debug in the game launch options in steam settings

digital trellis
#

OK thanks @weary matrix

quasi geode
tacit jasper
#

hi all, if i want to write a patch for other mods, is there a way i can disable/remove/change the other mod's lua script? thx

glossy bear
#

hello ~.. how do i play with mod while hosting ?

#

I can't get mp mods to work on a "host" server i am running.

The mods work fine on Single Player.

hollow shadow
#

Finally....

weary matrix
#

@glossy bear are you asking how to fix a mod to make it work for MP?

river plinth
#

Any of you in here know how I can alter an existing mod that overwrites a whole lua file from TIS? I want to patch a mod that doesn't work because it overrides a whole file from TIS. I don't want to copy the whole mod, just make a hotfix for this.

weary matrix
#

@tacit jasper for global symbols you can simply hook them, something like:

local theOldFunction = theModule.theFunction
theModule.theFunction = function(...)
  -- your code
  return theOldFunction(...)
end```
#

but for example I don't think you can delete a file from the install folder

tacit jasper
weary matrix
#

@river plinth would that work for you?

worldly olive
#

Hi!
Does somebody knows if it is possible to create custom Moodlets? 🤔 and if so, there's any guide or something for that? I couldn't find anything in the pinned messages

weary matrix
#

@worldly olive should be possible, I know a few modders did that, Aiteron and Dislaik IIRC

errant meteor
weary matrix
#

mmm moodlets == moodles?

#

cause I've definitely seen custom moodles

errant meteor
#

Noodles

worldly olive
#

Yes, sorry, Moodles

errant meteor
#

I wish there was more illnesses so I could fund a more in-depth medical mod

weary matrix
errant meteor
brittle jewel
errant meteor
#

Which means in the end, more hours to make, not worth it in my opinion

worldly olive
#

Ooooh I will take a look at that!!

#

Thanks!

weary matrix
#

@errant meteor what would you need exactly?

errant meteor
weary matrix
#

awww why not?

real geyser
#

I haven't modded for PZ before but have for others, how hard would it be to just change the xp scaling by starting skill ranks so it's less extreme. So instead of 25%/100%/125%/150%, its like 75%/100%/125%/150%. Even a work around like 0 cost trait that gives 3x xp gains to skills that started at 0 would be fine to me.

river plinth
weary matrix
#

@real geyser shouldn't be too hard, there are sandbox settings to do that if I'm not mistaken, so worst case you can just change the sandbox settings from your mod when you need

real geyser
#

The sandbox changes all xp though, I don't want someone starting with 1 skill rank to get multiplied too

errant meteor
real geyser
#

Cuz as it is 1 skill rank gives you 4x xp gain, I want it to be less extreme difference betweens starting with a skill and not

weary matrix
#

@real geyser ah I see mm I will have a look

#

@errant meteor NVGs? Night vision goggles? 😂

errant meteor
#

Non brita version, so you do not break the timeline

weary matrix
#

@errant meteor nice, but what does it have to do with not doing any modding for a while?

errant meteor
weary matrix
#

ah ok, that's still modding though 😅

real geyser
weary matrix
#

@real geyser my thought is you could register a handler for the AddXP event, so that everytime a player gains XP, depending on the perk and current level you could add a multiplier for the value being added

#

never tried that event though, so not 100% sure it's working as I imagine

thin hornet
#

argh seriously such a pain to test and make mp mods

#

im seriously tired

weary matrix
#

also the Perk* class are exposed to Lua, so maybe you could override the game perks with yours, having custom required xp for each level

thin hornet
#

freaking workshop not updating as it should version mismatch

#

etc

#

just anoying asf

#

sorry for the rant im about to go crazy

weary matrix
#

@thin hornet version mismatch when hosting a game?

real geyser
#

atm my thought is to just start with everything at lvl 1 baseline(0 cost trait or the such), then thigns that give 1 skill point increase xp by 25% instead of 4x, but still prefer if I could just change the base multipliers

thin hornet
#

@weary matrix yeah im not going to copy over local mod to my computers to test so i just push to a workshop test mod, and i expect it to update on every device as it should, but it take more time to just try and open the game than actually testing my mod

#

im going nut

#

there got to be a way that is efficient

#

to work with mp

#

a mod reload command or anything would have been the best thing ever just like in fivem. Also server could have streamed the mods to the clients instead of a subscription system.

#

Client connect to server, server send client mods (store in cache) validate, and boom. No need for subs to tons of mods. Just join a server and get what this server have.

wet osprey
#

how can I fix this? or the only way is removing the mod?

weary matrix
wet osprey
#

oh sorry/thanks

weary matrix
#

no worries

abstract wave
#

Poster for my herbalism mod, should be out tonight, am excited 😄

weary matrix
#

@thin hornet there's a global function reloadLuaFile, not sure how it behaves though, especially for MP

#

@abstract wave nice, what does it do exactly?

thin hornet
#

i had to unsub to actually get to join again

#

such a mess

abstract wave
#

It also has a TV show that gives foraging XP, with the host explaining what each plant does in an immersive way.

#

His name is Ken, lol.

weary matrix
#

hehe

#

sweet

#

@abstract wave so can I grow marijuana in the game now??? 😂

abstract wave
#

I actually want to look into adding my herbs as farmables.

#

Start a little herb garden

#

Just not sure how hard it is

weary matrix
#

neat

#

not sure how hard it is to make new farmable items

abstract wave
#

I see Filcher has a farming mod, so worst case I can get inspiration there

#

If I can't figure it out myself 😄

weary matrix
#

yeah also you could have a look at hydrocraft

abstract wave
#

Something about Hydrocraft scares me, god knows how hard it must be to find anything in there haha

weary matrix
#

it's been updated to "work" for release 41.60 few days ago, not sure how usable it is though

#

@thin hornet I just subscribe once to get the mod in steam mod folder, link that to ~/Zomboid/mods/, then I just edit the files directly

#

until I get something good enough to push to workshop

#

@thin hornet also I made an empty mod that only has a mod.info basically, so I can enable/disable it in mod list, so that will refresh the mods

#

I still have to quit current game though

thin hornet
#

well not me

#

i have to unsub

drifting ore
#

Is there a way to use a weapon in the secondary hand? Because my character only push the zombies but don't use the weapon

thin hornet
#

even if i restart the game i still have to unsub

#

steam wont update the workshop mod as it should

#

would have to restart steam itself

#

such a mess

#

OnConnected, OnDisconnect, OnScoreboardUpdate
all worthless does nothing for me
does nothing on clientside and on serverside either

#

seriously im done

worthy snow
#

where are the base files for containers? I want to mod the crates

left plank
#

thanks

worthy snow
#

np

winged lotus
#

Evening all, I have been wondering, any idea on how to display two setHaloNote simultaneously?

digital trellis
#

Hello, anyone has a Distributions.Lua for water or something please?

worthy snow
#

can we even mod built stuff like crates\shelves\fridges?

weary matrix
#

@thin hornet you don't have to update the workshop mod if you do what I said

weary matrix
winged lotus
#

Preferably two notes so that I can have two different colors

#

But two lines could be a valid solution too!

weary matrix
#

mmm not sure how, wondering why it's not the same as when the character speaks

#

@winged lotus well for two lines just try to do something like "line1\nline2"

#

@drifting ore mmm good question, not sure the game is handling being a lefty out-of-the box

winged lotus
#

@weary matrix It worked!

weary matrix
#

cool!

winged lotus
#

I was trying to do it with <LINE> that was my mistake

digital trellis
#

@weary matrix I have my REDB-ProceduralDistributions.lua and when I place it into my RedBull mod folder (RedBull/media/lua/server/items/, any food is spawning...

winged lotus
#

Well, I will just change r,g,b of the whole thing depending on gravity

weary matrix
#

@winged lotus yeah do that as a first step, then maybe later someone will figure out how to have multiple halo text

#

@digital trellis hey, I've seen your question but unfortunately I know nothing about distribution yet 😦

digital trellis
#

Alright

weary matrix
#

@digital trellis what do you mean any food is spawning?

digital trellis
#

When I give me my redbull can it's working, and when I open a fridge, or anything looting food, there is nothing in it

#

@weary matrix

polar storm
#

Sounds like it's overwritten the spawn distribution so items aren't spawning in there anymore.

weary matrix
#

@digital trellis not getting any error?

digital trellis
#

No

weary matrix
#

mmm have you checked console.txt for warning etc?

digital trellis
#

Yes @weary matrix

#

Yeah maybee a kind of overwritting

polar storm
#

I unfortunately don't know Lua. Never studied it over things like C# and Java. Just stating that's what it sounds like it could be.

weary matrix
#

@digital trellis just be patient, someone here should know

digital trellis
#

I hope so

weary matrix
#

@digital trellis could you share your file? Maybe something obvious will come up

#

can't make any promise though 😅

digital trellis
#

Just Lua

weary matrix
#

@digital trellis hum it seems my unrar tool is not able to open it 😅

#

mind to send it as .zip?

digital trellis
weary matrix
#

thx

#

@digital trellis this is from vanilla right?

ProceduralDistributions.list.FridgeSoda```
digital trellis
#

Uh yes

weary matrix
#

then I guess you are indeed overwriting the distribution from vanilla 😅

digital trellis
#

Hmm

weary matrix
#

do you know of a mod working for MP that use distribution so I could check how it works?

digital trellis
#

Yes but I don't know how to do

polar storm
polar storm
#

Adds it's own variants of books to the game, so it might.

digital trellis
#

But I don't know cause that mod use different kind of distribution

weary matrix
#

@digital trellis that one has not been updated since september, way before the MP release so not sure it's a good example to follow

digital trellis
#

I play with my fiend with this mod in MP

#

It work

weary matrix
#

oh really

digital trellis
#

yes 😉

weary matrix
#

mm ok

digital trellis
#

You're free for discord @weary matrix ? Vocal?

stable hare
#

Hey, anyone have plans to do a ragdoll mod?

#

It's possible?

hollow shadow
stable hare
#

There's way to transfer the game to unreal engine?

hollow shadow
#

this game is built different

#

Someone tried to make a VR version of it tho

#

but didnt hear from them a long time ago

stable hornet
weary matrix
#

@digital trellis try something like this:

table.insert(ProceduralDistributions.list.FridgeBottles.items, "REDB.RedBull")
table.insert(ProceduralDistributions.list.FridgeBottles.items, 10)```
stable hare
stable hornet
#

unless you modify the ingame animations to have “ragdoll” physics then no

digital trellis
#

@drifting ore just hack my computeur with his fukin .mp4

weary matrix
#

@digital trellis sure I'm available

digital trellis
#

@drifting ore why I can't read your file

digital trellis
weary matrix
#

@digital trellis I'm too hehe

digital trellis
#

Mdrr

drifting ore
stable hare
#

This mp4 file reported me to Microsoft because of my porn .paint.

#

See u

drifting ore
#

At the moment you can cut your arm at 3 levels. You can no longer equip object in the hand that was cut, but you can equip a wooden hook to do it again at an efficiency cost.

#

The operation is very dangerous. High infection rate and if the bleeding is not healed quickly, you die. Also since the hand is at health = 0, it takes a long time. The goal is for it to take within 2-3 days of doing nothing to heal and then 2 weeks of slow healing.

winged lotus
#

Great job! I believe it is going to be quite the task to accomplish it as a whole so be careful not to burn yourself out! Looks very promising 👍

abstract wave
#

Does anyone want to help me get tooltips for my items working? ```c
Tooltip = Tooltip_Tincture,


I have a Items_EN.txt in media/lua/shared/Translate/EN with

```c
ItemName_EN = {
    Tooltip_Tincture = "As seen on Ken's Herbalism TV Show"
}

But it's just showing up as 'Tooltip_Tincture' ingame, what am i missing?

polar storm
#

Interesting concept though.

winged lotus
drifting ore
abstract wave
#

Yes, my bad, that is where it is located actually.

winged lotus
#

Try that maybe

ItemName_EN = {
    ItemName_Tooltip_Tincture = "As seen on Ken's Herbalism TV Show"
}
#

With Tooltip = ItemName_Tooltip_Tincture , in your item definition of course

abstract wave
#

I'll try that!

drifting ore
#

Is it not getText("ItemName_Tooltip_Tincture") to get a text ?

winged lotus
#

In lua yes, but I believe Kap is trying to set that directly in item definition in a *.txt file

drifting ore
#

Ok that's what i was missing

abstract wave
#

So with ```c
item Chamomile
{
DisplayCategory = FirstAid,
Weight = 0.1,
Type = Normal,
DisplayName = Chamomile,
Icon = Chamomile,
Tooltip = Items_Tooltip_Chamomile,
WorldStaticModel = MedicinalHerbsLeafBundle,
}


and in the media/lua/shared/Translate/EN i have Items_EN.txt with ```c
Items_EN = {
    Items_Tooltip_Chamomile = "A medicinal plant found in the forest",
}
``` like you suggested, but it's not playing ball still.
#

Do I need to preface the tooltip with my modid? like ```c
Tooltip = KapMed.Items_Tooltip_Chamomile,

winged lotus
#

Ook, not a specialist of all those translation side so sorry if I am making you loose your time but maybe you should try this :

    item Chamomile
    {
        DisplayCategory = FirstAid,
        Weight    =    0.1,
        Type    =    Normal,
        DisplayName    =    Chamomile,
        Icon    =    Chamomile,
        Tooltip = Chamomile,
        WorldStaticModel = MedicinalHerbsLeafBundle,
    }

and

Items_EN = {
    DisplayName_Chamomile = "Chamomile"
    Tooltip_Chamomile = "A medicinal plant found in the forest",
}
abstract wave
#

Let's try that.

#

Unfortunately it's just displaying "Chamomile" then

winged lotus
#

Dammit

drifting ore
abstract wave
#

Nop

drifting ore
#
module
MyModule{
    imports {
        Base
    }

item Chamomile
    {
        DisplayCategory = FirstAid,
        Weight    =    0.1,
        Type    =    Normal,
        DisplayName    =    DisplayName_Chamomile,
        Icon    =    Chamomile,
        Tooltip = Tooltip_Chamomile,
        WorldStaticModel = MedicinalHerbsLeafBundle,
    }
}
#

Try this one

#
    DisplayName_Chamomile = "Chamomile",
    Tooltip_Chamomile = "A medicinal plant found in the forest",
}```
abstract wave
#

Is the missing comma after displayname line on purpose?

drifting ore
#

There, otherwise no idea

#

nop, it was a copy form your last post

#

No, the one of Onkeen

abstract wave
#

There we go now it's working!

#

Appreciate the help 😄

drifting ore
#

It was either the import Base that was missing, either Items_EN that need to be Tooltip_EN

abstract wave
#

The latter it must be.

polar storm
#

#mod_support is the better location for mod specific questions @quasi jewel

quasi jewel
#

son of a

#

i didn't see that mb lol

polar storm
#

lol

lunar jungle
#

So I've found in the ISWorldObjectContextMenu.lua the line of code that disables the ability to sleep if you're either too much in pain, or too awake. My knowledge is pretty lacking in writing mods for PZ, is it possible to write a mod that overwrites the base game's functionality for all context menus to turn all sleepOption.notAvailable = true; to false?

I looked through the code for the True Actions mod that lets you lie in beds and it seems the same block of code was repurposed there to let you sleep while laying down, changing all the true entries to false in that mod lets me sleep whenever I want when lying down, I'm looking to be able to sleep whenever I want in all other situations too.

blissful meteor
#

@Kap can you screenshot how that appear in game? I made some items and literally just added tooltip = "text" and it worked but wondering if yours appears nicer

turbid vigil
blissful meteor
#

Does anyone know how to spawn vehicles through lua?

weary matrix
#

@lunar jungle could work but the problem if you replace it is for example if the dev add something to the menu, then it won't appear when your mod is enabled, until you update your mod

abstract wave
#

@blissful meteor

weary matrix
#

@blissful meteor I think it's doable with sendClientCommand

abstract wave
#

My dude is holding the magazine when reading terrible, it's clipping through the hand etc, how do I make him hold it nicely? :c

blissful meteor
#

Could you give an example, I tried adding it through oncreate using a recipe

#

I'd like it to spawn after using a recipe, in this case the recipe is buying from a shop

lunar jungle
# weary matrix <@!140667270748700673> could work but the problem if you replace it is for examp...

I'm fine with that! It's all a learning experience for me to get more acquainted with writing lua and making PZ mods, and I'm willing to update it regularly if I have to until I find a better solution. I'm just looking for something functional to start with for my friends and I to use in MP. Do you have an idea of how I could start writing it, are there any recent guides to writing mods for UI changes?

blissful meteor
#

@Kap that's how it appears just adding the text after tooltip=

abstract wave
#

Yeah but that spits out errors in the log and I don't like that

blissful meteor
#

Oh okay, good to know

oak cipher
#

Anyone knows how to fix this?

#

cant get into my server

abstract wave
#

What is the proper way to set up my recipe to accept two of Item A or two of item B? It's not happy with the below recipe.

    recipe Craft Ginseng Tincture
    {
        destroy EmptyJar,
        destroy JarLid,
        WhiskeyFull;10,
        Ginseng=2/GinsengRoot=2,

        Result:GinsengTinctureMaturing,
        Time:300.0,
        Category:Health,
        NeedToBeLearn    : true,
    }
#

I know you can use / to use different items,

Like
Keep KitchenKnife/HuntingKnife etc, but can I do the same with unit amount?

weary matrix
#

@blissful meteor oh, there's a global function addVehicle(string)

#

try something like this: addVehicle("Base.CarTaxi")

#

@lunar jungle so try to copy paste this function: ISWorldObjectContextMenu.createMenu in your mod

#

it's in media/lua/client/ISUI/ISWorldObjectContextMenu.lua

#

@abstract wave not sure but I think you have to make two recipes, like one with 2 item A, and the other with 2 item B

#

not 100% sure though

#

@oak cipher you should ask in #mod_support if you need support

karmic wedge
#

Hey, I was looking around and can't find the project zomboid function library, is their a place that I should look?

weary matrix
#

@karmic wedge what do you mean, what's the function library?

abstract wave
#
Ginseng/GinsengRoot=2,

Funnily enough, this works, however the crafting menu will tell you "One of: blabla"

karmic wedge
#

basically a place where all the already zomboid established functions are, like setEmitter()

weary matrix
#

@karmic wedge you're looking for the javadoc?

karmic wedge
#

Yea, the section in Konijima link where the javadocs are is gone

weary matrix
karmic wedge
#

Ah, thanks!

weary matrix
digital trellis
#

@torpid briar not yet, just wait like more days, cause i'm beginner in Blender haha

#

The 3d model of Beercan

#

@weary matrix Oook !

fair frost
pearl prism
fair frost
errant meteor
late hound
blissful meteor
#

@weary matrix yeah I tried addvehicle like that but it didn't work. would I need to call a location. Like on the players location or can pick co-ords?

#

@late hound , I like what you did with Authentic Z. I made unique Z but I like yours expanded so much more

#

I was looking through some of your lua about making the zed zones, I'm going to use something similar for my server.

May need some help if I get stuck

late hound
blissful meteor
#

Oh really

dawn sparrow
#

Could someone tell me how I would go around making a modpack compiled out of different mods?

#

Cause I have a couple of mods that I would like to merge together for my server.

late hound
#

Yeah so all the new zones I added initially do not work on servers, but I found another way to get them to work. It will be in my next update.

blissful meteor
#

@authentic peach would it possible to use lua similar to make non pvp zones through lua?

#

The ones admins can add

abstract wave
late hound
#

I think Redboid did something similar iirc

blissful meteor
#

I'd like to make a large part of server pve only, so drawing zones manually is not really ideal ever hard reset

ebon grotto
#

first time modding the game myself 😳

#

gonna change the alarm back to the old one

#

already fmod unpacked the bank, gonna re-loop the og alarm and copy-paste it with the same name, then re-pack the fmod bank

#

should work

late bison
#

excuseme but which is the extention of 3D vehicle model??

ebon grotto
#

hope it works eyo

honest jewel
#

Anyone have any idea on if a mod like this exists...

When zombies "break" a door, after the usual amount of beating on it, instead of it breaking into planks knobs hinges, etc it is instead forced "open"

ebon grotto
#

IT WORKED :D WOO OLD PZ HOUSE ALARM SOUND

#

thank for the tip, worked perfectly

winter bolt
#

nice

stiff urchin
#

Are there any references or guides to adding in more tooltips without overriding the vanilla ones?

weary matrix
#

@ebon grotto can you explain how you did it?

#

@ebon grotto I'd love a mod where you can choose the old one, or the new one, or both randomly

stiff urchin
#

Ah I see, so workaround only? Otherwise you have to replace the entire vanilla translation files?

weary matrix
#

@stiff urchin what do you mean?

stiff urchin
#

I was just wanting to know if it was possible (and if so, how) to add more translations to the Tooltip_EN file without having to ovewrite it.

weary matrix
#

@stiff urchin you can just create your own tooltips

stiff urchin
#

How would I go about doing that without overriding the vanilla files? I tried doing a google search and discord search but couldn't seem to find anybody talking about a way to do so.

stiff urchin
#

Not exactly what Im asking for, don't need anything fancy or dynamic about them.

ebon grotto
stiff urchin
#

I'd just consider that an arduous workaround, didn't know if there was a simple, more vanilla way to do it.

ebon grotto
#

since it's fmod, no workshop mods can easily just change between the two

#

but i'll send my .bank that has the og house alarm rq

weary matrix
#

@ebon grotto ah so you overwrite the bank files from the game?

ebon grotto
#

na more like

#

i uncompress the bank, and overwrite the 1 sound file among the ~1000 thats in the bank

#

then i re-compress it

#

goes in: steam/steamapps/common/projectzomboid/media/sound/banks (be sure to backup the old one, idk if my change broke anything)

#

1 min it's a ~500mb file lol

weary matrix
#

@ebon grotto so you have to overwrite the bank file from the game with your modified version of it right?

dusk loom
#

Anyone know if there's a mod for allowing any building to be claimed as a safehouse? We built a house and it can't be claimed because it isn't residential, so I was checking around to see if there's a mod out there that removes restrictions.

weary matrix
dusk loom
#

thanks

#

sorry

weary matrix
#

@ebon grotto mmm so next game update or if user check file integrity with steam it will get "erased"

#

I was hoping there's a way to do it with no overwrite 😦

ebon grotto
#

ya i believe so

#

so keep a copy backup of the modded one, and original one

#

my mega.nz link shouldn't ever expire

weary matrix
#

@stiff urchin not sure what you want, you ask for custom tooltip, how is the community API a workaround?

#

@ebon grotto have you tried to check if it was possible to simply load additional bank files?

ebon grotto
#

since the fmod sound update is brand new, there's like no info for it regarding pz lol

weary matrix
#

mmm I should check it then

#

I want to restore the old music from pz40

ebon grotto
#

if possible, it'd be lit, and i'd upload it to workshop

drifting ore
#

Hi, I have a context menu. I already know how to add an option but how do I remove one?

weary matrix
#

@drifting ore mmm the context menu should be a Lua table if I'm not mistaken, so you should be able to find the entry you want removed, then just assign nil to it to delete it

drifting ore
#

But I use context:addOption() to add a option so I assume that it's similar to remove one but I find nothing on the javadoc

weary matrix
drifting ore
#

ERROR: General , 1640218810165> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: 1.0 of non-table: null at KahluaThread.tableget line:1689.

#

Just leaving one option blank would be the best solution I think

weary matrix
#

@drifting ore looks like you tried to access an invalid index from the table

#

can you show the code you wrote to do it?

#

@hollow shadow hard to tell with so few information 😅

hollow shadow
weary matrix
#

aah great 👍

stiff urchin
#

Think I explained poorly or there was a misunderstanding. By custom tooltip I just meant text under an item without having to reference a vanilla one. I was worried about overwriting all the vanilla tooltips. Turns out I can write the custom tooltip I was looking for with a Tooltip_EN.txt in the translations -> EN folder.

#

But I figured it out, thanks for the help!

weary matrix
#

@drifting ore try this, for me it's removing the first entry from context menu "Walk To":

    context.numOptions = context.numOptions - 1
    context.height = context.height - context.itemHgt
    context.scrollAreaHeight = context.scrollAreaHeight - context.itemHgt
    table.remove(context.options, 1)
placid pine
#

Anyone know where to locate either ArmySurplusBackpacks or CampingStoreBackpacks ? Trying to test some spawn rates. Not seeing any directly relevant locations on the main map.

drifting ore
weary matrix
#

@drifting ore what's the problem?

drifting ore
weary matrix
#

ah ok great then 👍

drifting ore
#

How do I run a piece of code after a timed action has finished?
I am using this ISTimedActionQueue.add(ISUnequipAction:new(player, cloth, 50)) and I would like to run a function when the action is finish

ruby urchin
drifting ore
ruby urchin
karmic tree
#

ANY mods that works for spawning food and stuff on zombies?
So far, all the mods we tried didn't worked.

abstract wave
karmic tree
abstract wave
limber panther
#

anyone know where the thing in charge of displaying the watch UI is? i've been searching for ages in files but cant find anything beyond the alarm setting UI and the actual art assets for the ui widget

tight blade
#

Does anyone know how I'd go about finding out the base value of certain stuff? Like I've managed to find out the "MaxWeightBase" is 8 by default, but not sure about ClimbOverWallSuccess or even things like FatiqueMultiplier and so on.
Basically trying to modify the values/multipliers on Strength/Fitness stuff.

I can (mostly) find the stuff it'd use to change it, but like as I learnt with MaxWeightBase, I have no clue what the default values are nor how much/little impact changing the numbers can be if it even does.

weary matrix
#

@drifting ore have you found yet?

#

you can do something like this:

local real_perform = ISUnequipAction.perform
local ISUnequipAction.perform = function(self)
    real_perform(self)
    -- your code to execute after the original perform
end```
craggy furnace
drifting ore
weary matrix
#

@drifting ore yes it would do it for every item that's unequipped, but you could check the type of item etc

#

@drifting ore you have access to the item with self.item

formal stone
#

If a mod id has a space in it do I just leave it with spaces or underscores?

#

example: Mod ID: Armored Doors and Windows

thin hornet
#

yeah

#

@formal stone u copy it as it is

formal stone
#

tyty

ebon grotto
#

the ammo

ruby urchin
#

also you can check it in debug mode

#

sorry but I found it funnyxd

ebon grotto
#

ohey btw @weary matrix i've been playing the past 5 hours with my modded sound.bank, works perfectly, no sound issues

#

success

harsh sapphire
craggy furnace
oak cipher
#

anyone here figured how to add map mods to servers?

nimble sluice
#

i'm having the same problem @oak cipher

#

I've been struggling to add Bedford falls and Pitstop

#

which are compatible to in-game map/minimap.

ashen mist
#

so how do I find downloaded workshop mods?

#

I wanna see how realistic durability works so I can see if I could easily make it work with 41.65

#

So I found it

#

And uh

#

What the hell am I looking at

#

Can somebody help me?

#

Like, how can I edit this to work with B41.65

#

I kinda need it for a server I'm part of

#

Some pals of mine wanted it, but I noticed it wasn't exactly working

#

And I'd really like for it to y'know

#

Work

stiff scaffold
tight blade
ashen mist
#

Well, it’s not making changes to the durability of items

#

I think it hasn’t been updated for the newest build, as it was working the the beta builds

#

So if the stable build made it not work, then it must have changed something

#

And I’m hoping there’s a simple fix so I can send it over to a pal of mine running the server I play on

tight blade
#

Well yeah, what exactly "isn't working"?

#

Does it come up with an error log or something