#mod_development

1 messages · Page 542 of 1

calm depot
#

oh never mind, separate screenshot

#

it's better if you pastebin.com the code, screenshots are awkward

unique trail
#

sorry

calm depot
#

anyway, your mistake is that you should be passing it your own function which then calls the timed action queue function

#

the user clicks the option, it runs your function

#

your function then sets up the timed action

unique trail
#

Yes I though that...

#

But then..

#

Okay wait a sec

#

Okay surprisingly the game doesnt crash now

#

But that doesnt help in any way as the button doesnt work

#

😂

calm depot
#

pastebin

unique trail
#

local function OnPreFillWorldObjectContextMenu(player, table)
local player = getSpecificPlayer(0); -- Java: get player one
local inv = player:getInventory(); -- Java: access player inv
if inv:contains("Antidote") == true then
table:addOption("Inject Antidote", player, fireTimedFunction)
end
end

local function fireTimedFunction()
ISTimedActionQueue.add(MyTimedAction:new(player));
end

calm depot
#

um

#

you declared fireTimedFunction after OnPreFillWorldObjectContextMenu

#

so it's basically a nil value

unique trail
#

oh that matters?

calm depot
#

yes, because it's a local

unique trail
#

Oh well Lua

calm depot
#

functions are first-class in lua

#

as in, they're basically just variables

#

local function fff() end is the same as local fff = function() end

unique trail
#

Well, I was treating them more like Methods/Functions in typical OOP language

#

I see your point

#

though

calm depot
#

yes, I see that, don't

unique trail
#

But hey, it works

#

Thank you 🙂

calm depot
#

if you want OOP, go read up on metatables

#

that's where the real Lua fun starts

unique trail
calm depot
#

the game does this itself to a modest extent with a lot of the code

winter sparrow
#

Why is this happening to my helmet? :0

kindred dagger
#

@calm depot Hey man, I got it to work using getTextureName(), thanks a lot for your guidance.

undone crag
#

Olipro here are my examples why did you disappear where are you examples Olipro where are they?

solar gust
winter sparrow
#

No. It worked fine when i just did some ctrl + a

calm depot
#

@undone crag what?

runic bear
#

I was looking into doing a sound mod but then noticed for all the "replace zombie sounds" ones you have to manually install stuff. No good. Then I noticed the handful of "no startle sounds" mods are using a script to redirect the game to the modded sound file. Would this work for the zombie sounds?
module Base { sound ZombieSurprisedPlayer { category = Zombie, clip { file = media/sound/Silence1.wav, } } sound ZombieSurprisedPlayer

rustic radish
#

Hey guys, I'm new to modding. Are there any resources on how furniture works, and how it spawns in on the map?

calm depot
#

it's a movable, it doesn't spawn, it's part of the map

#

that's why if you zoom in on houses on the PZ map website, you can see all the furniture

rustic radish
#

Makes sense. So I would need to edit the map to add any custom furniture in the world? I assume furniture works similarly to normal items in the code? I suppose I can look at furniture files in the game to reference.

calm depot
rustic radish
#

Alright thanks!

lost vapor
#

Hello i'm trying to begin modding and idk where i can find all class relative to the player
I'm on the API and idk where i need to search

#

it is that ?

#

in exemple this function i don't find it in doc

white crag
#

I wonder if it's possible to add sound channel interpolation in zomboid

#

Half-Life 2 did that one for distant gun sound

#

For one stereo sound

#

Left channel is for playing Near Gun Sound

#

Right channel is for playing distant Gun Sound

#

So based on the distance, the gun sound actually interpolates

#

from left to right

#

if FMOD has that feature

#

i would happy to show the example for everyone

fast galleon
#

wow LootZed is so useful, turns out I've been playing with broken distribution for a long time

runic bear
white crag
#

packing two sounds

#

in one sound file

#

and playing them with interpolation rule

#

is what i meant

faint jewel
#

anyone know how to add a mapmarker via lua?

little iron
#

Is there anyone accepting vehicle commissions here?

old blade
#

canibalism mod ?

#

u can cook and eat people in dayz

#

theres a special trait that doesnt allow you to take negative side effects of eating people

#

if u eat someone without it you get like really sad or anxious

craggy furnace
#

what is it?

little iron
craggy furnace
fair frost
drifting stump
#

they can be placed from lua but editing the map is likely a better way of doing it

#

movable is an item you receive when picking up a tile which stores the tiles data in it so you can place the tile down again

drifting stump
kindred dagger
#

Is it possible to check if a placed down radio is turned on?

trail lotus
#

Is there any map makers, that can replace the map in game. I’m not experienced with that but I have a custom server and I want to replace the in game map with a fully custom one is there a easy way to edit the base game map or is there some one who can make one for me for a commission?

#

Let me rephrase, the map you view to get around. I don’t need to make a custom like game world I just wanna edit the map you press m to view in game. (To add street names, house numbers, named markers, pvp areas, and safe zones.) so players can login and view where everything is.

undone crag
# calm depot <@736623463913226310> what?

You can click the message I replied to and what that message replied to and what the message that replied to and what that message replied to and what that message replied to where you asked if I had an example.

kindred dagger
#

Woo, I got it to work. My recipes are only available when next a powered on ham radio.

analog hemlock
#

hello everyone, I land in the modding of pz and am looking for a mod allowing to play poker as well as blackjack (find out if there is a mod doing this currently before embarking on the creation of this one )
Sorry for m'y Bad english :x

steady cave
#

Hey there. I'm looking for mods that could help turn Project Zomboid from a zombie survival game into a game similar to The Long Dark where the main hardship for survival is nature itself. The weather, resources, and such. What might you recommend? Thanks in advance.

lost vapor
#

someone can explain me the error ?

#

i try a similar code but .. the same error

#

i just add the first code in a working code so it's logic it's not working but why ?

#

i'm doing it like the tuto idk '-

quasi geode
lost vapor
#

thx man wtf '- i'm an idiot

rustic radish
crimson spindle
#

How can I check if an item already exists in the player's inventory?

crimson spindle
#

thanks

#

Another question.. how would this function work with translations? Would it break if for example the recipe title was in spanish?
knownRecipes:contains("Discover Weak Serum Formula") then learnedWeakDiscovery = true end
Should I be using Recipe_Discover_Weak_Serum_Formula somehow instead?

#

is there a guide in general how to create/use translations with the lua code? I got a bunch of custom functions that have the player say something in English, but how do i make it so others can made a translation if they choose?
an example:

    player:Say("The virus is present in my blood stream.")```
How would I create a translation file for something like this that is currently hardcoded into my LUA code?
lost vapor
#

the move method take a Vector2 arg

#

but idk how create one

quasi geode
# lost vapor but idk how create one

this would be correct for creating a Vector2 object, but there exists a old unused garbage file at media/lua/shared/Util/Vector2.lua that creates a Vector2 table (thus overriding the exposed java class that you need). to properly create Vector2 object you'd need to overwrite that file with a blank (it wont break anything if you do, its old garbage)

#

**edit, sorry: tired here, not quite correct. once that file is replaced to properly create a java instance you'd have to call Vector2.new(10, 10)

lost vapor
#

Omg it’s working 😭😭

#

Ty bro

faint jewel
#

okay question. is there no animation node for when you are carrying a generator?

#

i can't setup a carrying heavy things animation if there's no node

smoky meadow
#

is there a way to fire full auto without relying on Recoil Delay?

polar gyro
#

can anyone tell me which code is good for playing only sound for player?
playSound working for everyone around.
I just need to work it like level up sound or zombie surprise sound.

faint jewel
#

look at one of the many suprise noise mods?

#

well they only change the wav lol.

polar gyro
#

yes, they only changing the sound file

spare hinge
#

howdy, just a general question, what do I have to look out for when making a mod multiplayer functional?

#

i heard the split between client and server is a bit messy

spare hinge
#

I set the hit and crit chance right before every shot

#

(which depends on how much the player moved and how long theyve been aiming)

faint jewel
#

ugh.

tame mulch
spare hinge
#

I could just print out isClient() to figure out which instance runs the actual gunshot evaluation right?

tame mulch
spare hinge
#

oof

#

but lua files in server folder get only run by server right?

#

i know a trick to make it work then regardless

spare hinge
#

how do I get the character index of the local player clientside?

#

or just the character in general

#

ive just been picking 0 for my local tests

#

but idk, thats probably not gonna be working in MP is it?

tame mulch
spare hinge
#

wont this contain other players on the server?

tame mulch
#

I think no

#

because exist getOnlinePlayers()

spare hinge
#

ill give it a shot

#

or look around some other hud elements

#

they needa access the local player somehow too i bet

#

self.chr seems to be what im looking for

tame mulch
#

This local param

#

Better just use getPlayer() on clientside

spare hinge
#

yup that works

#

(atleast in SP)

#

alright time to host a server

#

fingers crossed

spare hinge
#

huh, seems like everything is working without issue

#

lucky me

#

so im guessing the entire shooting logic is done clientside?

smoky meadow
#

guys need help I'm stock at the loading script i think my mod doesn't process by the game.

smoky meadow
#

im a dumb ass i forgot to put a bracket in the code.

faint jewel
#

i need to get it using the model instead of the icon.

drifting stump
midnight mica
#

is there a list somewhere with all the strings for this function "getPartById("Heater")" , i'd like to target certain vehicle parts by their names

kindred dagger
#

How difficult would it be to create my own radio channel?

tame mulch
#

But also you can like this:

local c = vehicle:getPartCount()
for i = 0, c do
  local part = vehicle:getScript():getPart(i):
end
midnight mica
#

thanks

winter sparrow
#

guys, how to add new types of these for make new variant of dressing cloth? i tried to just insert it just as a text but it doesn't work

little iron
#

could someone help me?

#

Can the MRE mod conflict with britas weapons pack?

slow graniteBOT
#
Bossb24#7043 has been warned

Reason: Bad word usage

little iron
#

Or is the mod just simply broken in mp currently? It was fine yesterday.

meager zinc
#

Hey guys. Does anyone know how to get the type or id of the clicked inventory item?

high condor
#

Hi, im looking for full tutorial on how to setup IntellJ with binaries, the one linked in the Wiki page still lacks how to export the binaries, if anyone have some tuts on that i would be grateful!

open halo
# winter sparrow guys, how to add new types of these for make new variant of dressing cloth? i tr...

I just started modding today so take this with a grain of salt.

The way I think it works, is that the different "versions" of an item need to all be set separately. I made a bag, and you can carry them in both hands or your back. I had to create a GUID for that item, then add the different versions of the item for the back, and both hands.

If you are unsure how to do this, check your "scripts/clothing/clothingItems" folder to get an idea of how it works maybe.

proud fern
runic bear
#

I might hold off for the NPC update to do custom monsters, I dunno

#

@austere pecan looking at the mod it looks like you have the custom models as FullSuit clothing?

runic bear
#

Was looking at planetalgol's flare mod, because I'm not sure if it's doing what I want (not like he'd tell anyone), but saw this Class WorldFlares.Flare, does anyone have any idea what this does? It's in the base game. I wanted to turn the map markers off for my MP game but add in the ability to shoot signal flares that would temporarily show up on the map or something

#

Is there a function just add a marker to every player's map automatically?

edgy sparrow
#

hey guys, is it possible to capped skills to a certain level? Is it moddable?

runic bear
#

I'm sure you could do if skill > 5 then skill = 5 or something?

echo ridge
#

hey guys, recently I've been interested in trying mods for the game, so I need to ask, is there a mod that allows me to wear my bunny ears and a helmet at the same time? I can't be a war bunny without my ears! fluffyfoot_bunny

drifting ore
echo ridge
#

hmmm, I see, thanks for your help ^^ I will see if I can find a mod in the workshop that adds more rabbit ears to see if it puts them as cosmetic items

drifting ore
#

Np!

warped night
#

Anyone know what mod causes 100000 errors when transferring items with the new update

little iron
#

How can i safely remove a mod from a hosted server without breaking the save or the game enabling me to load the save without force downloading the mod?
I accidentally used westpoint expansion without checking the comments, i didn't assumed it was abandoned by the ratings.

vapid arrow
#

is there a way to get...

local Item = Player:getPrimaryHandItem();

but instead of primaryHandItem(); to be a headItem();?

solar gust
# vapid arrow is there a way to get... ```lua local Item = Player:getPrimaryHandItem(); ``` bu...
local sort = function(item, equippedHeadItems)
    if item:getCategory() == 'Clothing' and item:getBodyLocation() == 'BODY_LOCATION' then
        table.insert(equippedHeadItems, item)
    end
end

function isEquipped(character)
    local equippedHeadItems = {}
    character:getInventory():getAllEvalArgRecurse(sort, equippedHeadItems);

    for _, item in ipairs(equippedHeadItems) do
        if character:isEquipped(item) then
            return true
        end
    end

    return false
end
midnight mica
#

is it possible to create a mod that automatically quits the server and gives warning messages before restarting? or does such a thing already exist?

kindred dagger
#

Hello, I have a question. Is it possible to disable a recipe when a certain mod is not enabled without making a separate patch? Like with Obsolete?

#

I know with lua you can do if getActivatedMods():contains("somemod") then but that won't work with recipe scripts.

broken kayak
#

I'm not sure of what you mean by not making a separate patch, like not overriting the item directly ?
For that you can use the ItemTweaker API and clear the concerned recipe from the items it is attached too.
You can do that in a Lua script where you can use the getActiveMods() function

kindred dagger
#

Basically I'm making a trading mod that adds "recipes" to trade. Problem is, every mod support I add must be its own patch. And I end up with 10+ additional patches that clutter the mod list

#

So I'm trying to reduce clutter with some way to enable/disable those recipes if the mods in question are enabled/disabled

broken kayak
#

Yeah will the ItemTweaker API can help you then

kindred dagger
#

Itemtweaker can remove recipes?

#

Right now the recipes still show even if them mod is not there, so you have a lot of uncraftable things that my OCD wants to see gone 😛

broken kayak
#

Well maybe it can't

kindred dagger
#

If scripts would use functions other than, say, OnTest, OnCreate or OnCanPerform I could do it quite easily

broken kayak
#

What do you mean by adding recipe to trade ?

kindred dagger
#

Basically a "trade" disguised as a recipe. Needs money and a ham radio to do

#

So they are indeed recipe scripts

#

Like this for example

#

` recipe Sell Jewelry - Nose Ring for 5$
{
OnCanPerform:HamCheck,
NoseRing_Gold/NoseRing_Silver/NoseStud_Gold/NoseStud_Silver,

   Result:Money=5,
   Time:200.0,
   Category:Trading, 

}`

#

I could get something to work if there was a way to unlearn a recipe, though.

#

Oh well. I guess patches work until I find something.

broken kayak
#

Yeah went a bit over my head thinking you could do something with an EvolvedRecipe but it won't be a solution for your problem

kindred dagger
#

It's not complicated on paper. If mod disabled, delete specific recipes.

#

If I could, say, changed Obsolete to true or false with a super easy function, I'd be golden

broken kayak
#

Well a bash/batch script will do that neately for you, but that would require an additionnal installation step, and well, some obvious security flaws

kindred dagger
#

Let's not

#

The way I did it is make separate mods (I call them patches) with the recipes. Requirements set to my own mod and the mod I add recipes for.

#

It works perfectly, but then I have 10+ patches in my mod list for my own mod, people might take offense to that XD

drifting stump
#

@kindred dagger

getScriptManager():getRecipe("Recipe Name"):setNeedToBeLearn(true)
#

if you dont teach it anywhere its effectively hidden

kindred dagger
#

That is true, and I've thought about that, actually

#

But, let's say for whatever reason they remove a mod. The recipes would remain learned, right? Is there a way to unlearn a recipe? I haven't found it

drifting stump
#

why would they be learned?

#

did you teach them?

kindred dagger
#

OH

#

I get your idea now

#

You don't need to learn the recipes at all

#

But doing that, you effectively hide them

#

That's so genius

drifting stump
#

anyway i have a vendor based trading mod

#

currenty unlisted on the workshop for testing purposes

kindred dagger
#

My trading mod doesn't use a vendor. It requires you to stand need an activated ham station however

#

When I get the motivation, I'll add a channel requirement too. So you'd have to be on the "trader" channel, with some banter from times to times

#

I'm not sure how the NPC update will change trading mods, but I'm looking forward to it

strange ocean
#

Hey guys where is the watch alarm sound located in the sound file? i have some trouble finding it

kindred dagger
#

I have no idea, I haven't dug through sounds yet

#

Try to search through media/sound maybe?

strange ocean
kindred dagger
#

According to the wiki it's called watchAlarmLooped

strange ocean
broken kayak
#

Maybe that's what you're looking for ?

strange ocean
#

No thats just the regular alarm

#

not the one for the watch

kindred dagger
#

Those are regular alarms. The watch alarm might be in a bank somewhere

strange ocean
#

damn

#

where are the devs when you need them been digging for a while

broken kayak
#
    sound WatchAlarmLoop
    {
        category = Item,
        clip
        {
            event = Character/Survival/AlarmWatchRinging,
        }
    }

#

The next step is to dig into the FMOD soundbank files

distant rapids
#

Do you guys know if the most recent update broke multiplayer engine repairs?

winter bolt
#

does anyone know where i can find the download for the old ultimate sound overhaul mod from last year? the discord invite link is dead now and I was hoping to port those zombie sounds to the new version

#

After hundreds of hours of work, the Ultimate Sound Overhaul - Complete project is complete.
It replaces every single sound the player could hear in Project Zomboid (and a few of the unused ones) with self-recorded, hand-crafted high-quality samples.
It is the single biggest audio project ever for Project Zomboid, replacing well over 600 sound e...

▶ Play video
hot patrol
#

It was on his discord that I think he deleted as I no longer see it in my list.

winter bolt
#

oh nice

#

yeah i think its probably been gone for a while now

#

i just tried adding raven on steam to see if i could ask them in case i cant find it

hot patrol
#

I got it

winter bolt
#

sick

#

either is fine

hot patrol
#

I'll DM it since idk if it's against any rules to post here

midnight mica
#

anyone know how to hide client strings when u press escape as in viewing the menu?

midnight mica
#

found it, if not MainScreen.instance:isVisible() then

white crag
#

does UI Render FPS does anything

#

the code seems like hell of snakeoil

spare hinge
#

pretty sure it does

#

but only if you are in offline rendering i think

#

i had to futz with it

#

and it made a difference

uncut blade
#

Hey I saw a mod that lets you change the look and sound of zombies to look like clickers from the last of us. I was wondering if there is away to make this only apply to sprinters?

spare hinge
#

particularly with moving parts

buoyant sky
#

how do you have your dev env set up? I tought about a second install with no workshop items to have a clean dev env?

fast galleon
#

not sure if I understand, add -debug to game launcher and disable all mods.
@buoyant sky

buoyant sky
#

yeah i just dont want to enable & disable all mods everytime i try to mod or try to play.

midnight mica
#

Events.EveryHours.Add is this functions real or game hours?

open halo
#

I made a world object, but I can't seem to place it anywhere. It is modeled after the basic mattress and uses all of it's data pretty much. Any idea what the problem might be?

faint jewel
craggy furnace
faint jewel
#

he's under arrest.

#

and quite angry.

buoyant sky
#

is there a fast reload of lua/items/models while in an scenario?

craggy furnace
#

you cant break those cuffs

#

AUUUUUUUUUUUUUUGGGGGGH

obtuse badge
#

Hey guys. Is this the right place to ask something about dedicated server (invoking commands like servermsg) here?

obtuse badge
#

Ok where would I go than?

craggy furnace
obtuse badge
#

Appreciate m8t!

undone crag
buoyant sky
#

Will try thanks, also is there a default value for rotation & position etc in PZ (Especially for blender) please ping (also i know we already have a cooler)

vapid wind
#

please tell me there is a mod that adds some sort of search function for items in inventories

#

or a way to cycle the category of loot instead of just sort from oposite ends?

open halo
#

if you click on the category box on the top that should sort it by categories I think

vapid wind
copper gust
open halo
#

Is there a reason you guys can think of why a modded bag that was working fine no longer functions, and can only be held in the left hand no matter what? I can post some code and images if you need em

distant rapids
open halo
#

The mod worked just fine today. I was tweaking it a little, and I must have done something to it, but I have no idea what. I even reverted the version back but it still seems not to work. Can I upload the folder for you to have a quick look?

distant rapids
#

I just need the .txt and .lua files no zip compression for me please dm me

open halo
#

This is the latest version and not sure if I deleted a file or something?

distant rapids
#

Dont post it here

open halo
#

The mod should pretty much use the vanilla duffelbag as base,

#

Where should I post it?

chrome egret
open halo
#

Oh I seemed to have missed your previous message, just a moment

open halo
#

Tearless couldn't see an error. Can any of you guys test my mod out and see what it does for you?

fair frost
vapid wind
chrome egret
vapid wind
#

ohhh thats really weird, thank you 😄

chrome egret
#

np, like I said kinda roundabout for what you want

astral tendon
#

Any idea how to duplicate a movable item? Like a floor tile.

#

like create a movable object in my inventory of said floor

bronze creek
#

I'm trying to setup IntelliJ using this tutorial https://github.com/Konijima/PZ-Libraries/blob/Tutorial/README.md
For the "5)" I can't figure out how exactly should I decompile the game. I tried to decompile it using IntelliJ decompiler but it just gives me a bunch of code, how to turn it into required libraries? Or am I misunderstanding it entirely?

GitHub

Decompiled Java/Lua Files for modders. Contribute to Konijima/PZ-Libraries development by creating an account on GitHub.

bronze creek
chrome egret
runic bear
#

I was looking at making a recipe for a primitive stove, but apparently furniture items are kind of a pain to mod in... is there anything like that as a mod already?

calm depot
#

@runic bear a couple of mine spring to mind - Craft Metal Barrels & Rain Collectors & Steam Powered Generator

#

the former uses the metalworking context menu, the latter uses an actual recipe

runic bear
#

Oh cool, thanks. I forgot about the Metal Barrels mod. I looked at the Improvised Cabinetry mod and made the "kit" for a primitive stove (just an altered campfire kit)

astral tendon
#

Any way to set a floor tile's texture through LUA? I'm basically trying to either set a floor or be able to give my character an item (specific floor) but I can't figure out a way

winter bolt
#

i've replaced a function in a timedaction but as soon as it hits "ISBaseTimedAction.perform(self);" it says that its trying to pass in nil

calm depot
#

@astral tendon take a look at client/BuildingObjects/ISUI/ISInventoryBuildMenu.lua

#

they alter tiles when you pour out a bag of dirt/sand/gravel in the base game

#

@winter bolt that doesn't provide enough information to debug your problem

#

you will need to pastebin the code

vapid wind
#

anyone know of a mod that adds some sort of mining?

runic bear
#

Alright, I added a recipe for a Primitive Stove item, the item looks like this:
item PrimitiveStove { Weight = 6, Type = Moveable, WorldObjectSprite = axebeard_primitive_stove_1, DisplayName = Primitive Stove, Icon = TZ_CampfireKitWood, }
I have a placeholder sprite, and I copied the .Tile properties from the Antique Stove. When I craft the item in game, it's weight becomes 1.0 and I am unable to place it. What did I miss?

drifting ore
#

Is there a mod guide for making traits?

#

Or just a general modding guide?

astral tendon
#

we meet again, old friend

#

💀

runic bear
#

No modding guides that are up to date that I can find

native shore
small topaz
#

hi there! does anyone know whether one of the last updates (41.69 +) made changes about how the script files or the xml-files work when you are trying to construct clothing mods? i have the following strange problem with my mod: when entering the character creation screen in game, the first character model (which is randomly created by the game) is not aligned with its displayed gender. (cf. one of my example screenshots: the model is male but the displayed gender is female. the game also seems to treat it as female since it doesn't display the beard options and displays the skirt option.) this is strange since my mod does not contain any lua code. only the folders and files to define new textures, 3d-models and stuff (cf. the other example screenshot). i can solve the issue by either removing the "scripts" folder or by removing the "clothing" folder (the latter contains the xml files).

#

has anyone encountered such a problem? if so, has it been introduced by one of the more recent updates?as far as i remember, i didn't have the problem when play-testing the same mod on older versions. (i think in 41.68, it worked without any issues.) many thanks for any ideas!!! 🙂

small topaz
#

oh.... also should add that the problem disappears when i manually change anything then. for example, when i change clothing, press random button etc. the character suddenly becomes correctly aligned with the displayed gender. it only happens for the very first character which is created.

verbal oxide
# fair frost

West Point is getting a livery change or is that specific one only for the highway units?

raven axle
#

Anyone know of a way or mod to refill gas stations from fuel trucks?

midnight mica
#

any experienced modder around? i had tested this mod on a self hosted (my pc) MP server and it worked, now i've uploaded the exact same on a dedicated server, and its bugging out

latent orchid
drifting ore
#

That made me laugh, love comments xD

drifting ore
calm depot
#

Or, consider that you're basically doing the opposite of fuelling a vehicle

#

when you're fuelling a car, the script calls setPipedFuelAmount on the pump - you're just doing this in reverse

solar gust
drifting ore
midnight mica
#

tried adding an online count but it only seems to update when the player views the "players online" page in the menu or when i have the scoreboard up as admin, anyone know whats missing or where i should look?

#

It should update every 10 mins:
Events.EveryTenMinutes.Add(TFA_DisplayInfo.updateSurvivorsOnline)

latent orchid
#

btw, love your info site....big help for us mod newbs

latent orchid
drifting ore
#

Does anyone know a mod that adds a new, smaller map I can use? Looking to make a smaller server and smaller area for a group of mine. Preferably overgrown.

sick yew
#

Anyone got a working script to add to a mod that

#

gives the key of the building you spawn in

quick shuttle
#

is mod options broken? :c

pliant sphinx
#

Is there a docs page for Lua reference? Like zomboid-javadoc but for Lua? I swear i had found my way to it once before but didn't save it for some reason

calm depot
#

pzwiki has a list of events, that's the only one I know - though you can just dump it yourself

calm depot
undone crag
vestal lynx
#

Hi there, I'm trying to remove a mod from our server to respect the instruction of the mod creator. We are trying to convert some of the items to vanilla item. I have a fix to do that but it still keeps the label of the original items (all other stats are vanilla and the rest of the mod is being removed). That doesn't seem to be good enough to the mod creator. Anyone can point me to a mod or provide me with instructions that we could use to have the server convert an item with "LabelA" to use "LabelB" without disappearing from the server? At that point all the items from the mod would be gone and be full 100% vanilla including the labels.

fast galleon
#

Can I know which maps take priority from
getWorld():getMap()
I want to know which map is used in case of overwrites.

#

Or is this list random order.

undone crag
#

What do you mean by label?

astral tendon
vocal lily
#

I was looking for a mod with a crashed plane model for a server, anyone knows any?

sage rock
#

what map pack you recommend?I'm trying apex map mod but having crashes and black squares in places

#

I was using AIZ map pack but its not updated

thorny garnet
#

Anyone have a resource on how to create a sandbox option? My mod is very simple and only has one value that the user might edit but I can't find anything.

rustic mountain
winter bolt
#

is there a way to get the value of an item's parameter through lua like "Insulation" and stuff like that?

idle dune
#

can anyone help me figure this out lol, for some reason i got no issues at all when running my mods on my pc, but when i run them on my server i get this error.
things ive done: i have updated all the mods , deleted previous mods that gave the missing file error

idle dune
#

nvm i disabled lua checksum its working now

native shore
trail lotus
#

does anybody have any idea about integrating sonoran cad into project zomboid?? the plugins are writting in .lua and i was just curious if it was possible

calm depot
#

there's no HTTP API exposed to lua so you'd have to do it with some java mods

#

the SonoronCAD Lua is basically useless because it's for GTA5/FiveM

shadow tulip
#

Can someone help me with map modding?

#

I'm having an issue with an expansion showing up as blacked out in the areas it's supposed to be on the map.

white crag
#

Well in theory serverside mod will work

#

But im still not sure about sending serverside info to clientside

#

If its possible sending image data would be possible

#

... if it does not get abused

#

I already see some abusing points but yeah

calm depot
#

the bigger risk is the client, not the server

humble glade
#

suprised people haven't made frank west or chuck greene hair/outfits tbh

scarlet knoll
humble glade
#

FUCK IM AN IDIOT

#

instant install lmfao

#

outfit mods like this are fine to enable mid save right?

#

OH MY GOD IT HAS THE TRUE EYE CULT TOO

#

jittering with joy rn

rancid slate
#

Trying to make a mod that changes the speedometer from MPH to KPH and was wondering if there's any better way to do it other then directly editing 'U12.pack' under 'texturepacks.' It works how I have it set up now, but I feel like this'd cause compatibility issues or something considering how many things are packed in there together. Pretty new to modding so I've been mostly winging it so far

scarlet knoll
drifting ore
#

💪

obtuse badge
#

Guys, anytips where I could find something about creating furniture containers (removable/placeable). Accordingly all the docs I only see custom clothing or item creation.
Wanna try on creating a Vendor machine for my server.

kindred dagger
#

Is there a mod that reduces inventory lag, for having many items?

thorn cipher
obtuse badge
drifting ore
#

does anyone know of a mod that enables me to add padding to cars?

#

metal not leather

kindred dagger
#

Oh I'm using that already

#

Idk if it helps when you somehow end up with 5000x the same item though

unique sinew
#

oh gotcha, it helps for most use cases

kindred dagger
#

It is a very nice mod though yes

#

I decided to make conversions to save space and reduce lag

white crag
#

@kindred dagger use packing mod

#

the game can't handle many items

kindred dagger
#

It was for money.

white crag
#

ive seen things

#

so don't try to make the impossible

kindred dagger
#

I used the seed back and briefcase assets to make a "bag of money" and "briefcase of money"

#

Nothing crazy

white crag
#

ye

#

pack 100 items into one

kindred dagger
#

Basically that.

white crag
#

or use magazine like mechanism

#

drainable

kindred dagger
#

Mhmmm

#

Making money drainable?

white crag
#

ye

#

more like

#

bag shaped magazine

#

that takes money

kindred dagger
#

And that is "drained" when you purchase items

#

I like that idea

#

That'd be a better alternative to conjuring a bag/briefcase from the unfathomable void when use the packing recipe

#

(Has anyone ever wondered where the box comes from when you box nails or ammo?)

#

How bad on performance would a drainable item with 10000 units be?

wild hedge
#

Hey does anyone know how the current version of the only cure works? trying to cut my arm off with a saw and its not working

kindred dagger
#

I don't know, I prefer to use They Knew. I like having two arms

bright shore
#

Anyone got any mods that revamps player PVP

vivid jasper
#

Are firearms b41 and brita compatible?

silver mural
#

anybody down to help me troubleshoot something rq

#

dms are open

mortal widget
eager prairie
#

where is the workshop!@chilly ocean!#!@

#

its all gone!

carmine agate
#

Is there a mod that allows me to edit my perks mid game? I choose speed demon and ii dont really like it.

high condor
#

While setting up Capsid i got this error: Process 'command 'C:\Program Files\Semeru\jdk-8.0.332.9-openj9\bin\java.exe'' finished with non-zero exit value 1 while running setupWorkspace (exactly at :zomboiVersion) from gradle, any idea how to fix it?

#

Also getting : ```Execution optimizations have been disabled for task ':zomboidVersion' to ensure correctness due to the following reasons:

  • Gradle detected a problem with the following location: 'C:\Users\Haqz\IdeaProjects\pz-map-mood\build\classes\zomboid'. Reason: Task ':zomboidVersion' uses this output of task ':zomboidClasses' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
    Exception in thread "main" java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=zombie/core/Core offset=6```
ivory bane
#

Hi guys. Hope you are well.
I plan to develop a special zed with a little more 'intelligence'. It should be able to follow the player, give chase, also evaluate the current state of the player and react based on this.
Can you instruct me on where I can find the necessary documentation to start the development?

vapid wind
#

are there any mods that disable the whole dead zombies making you sick and you expload thing

tame mulch
vale marsh
#

Quick question about modding, if I add any mods to a MP server after the world has already been started (not including map mods) will that then mess up the world or will I be able to add them in no problem?

bronze creek
chrome egret
bronze creek
#

When I change first letter of the name of my lua file from lowercase to uppercase, it throws me an error when loading the mod:
"java.lang.RuntimeException: attempted index: start of non-table: null"
At this line: "local HMFCheckFuel_start = HMFCheckFuel.start;"
Looks like it misses the reference to another mod, even though it's still there at the top of the file. And it only misses this specific reference, not the other two. With lowercase name it works fine, tried a few names.
Why would that happen?

#

Other references are to game files, so it might be specific to mods

near crown
#

Upgrading the Java version from 17.0.1 to 18 would not impact a modded instance? Just changing JDKs

ashen mist
#

FUCKIN ERRORS

#

I can't even find out what's causing them

#

it's already at fuckin 23k

#

I don't even know what the errors are talking about

#

like

#

"ERROR: General , 1653529310105> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in ZLEDressZombie at KahluaUtil.fail line:82.
ERROR: General , 1653529310105> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: Object tried to call nil in ZLEDressZombie"

#

fuck does that mean???

#

like is it that hard to just SAY what mod is causing issues????

#

fuck it, just gonna assume it's a mod adding clothes or something

#

so brita's is gone

#

gonna see if that fixes it

#

oh

#

I found it

#

"ZombieLootExtendedDistributions.lua line # 1987"

#

over 1 million errors

#

whoops, misread it

#

150k

#

gets hard to read sometimes

bronze creek
#

👆 that's just gold

minor snow
#

Is there a mod to turn off this icon in foraging mode?

runic bear
#

Was trying to debug something and possibly ID a troublesome mod, does anyone know how PoisonPower actually works?

drifting ore
#

I think I will make a phone mod to send message with it.
For the rp and fun, I imagine make like a T9 phone. Use 9 key like the phone pad.
Do you think that a good idea or I just should lets them use the keyboard like a normal one ?

hollow gyro
high condor
hollow gyro
#

awh thanks :)

gleaming siren
#

hello, sorry for bothering someone, does anyone have a guide, or program or someone knows how to put new items, for example: food, objects etc, it's that I want to create a mod but I can't find anything that I want to say hi to.

young edge
#

@candid light I spent an unreasonable amount of time adding support for... a lot of mods out there for your Vehicle Zones, do you want the files?

kindred dagger
#

Is there a method to organize recipes other than in alphabetical order?

young edge
craggy furnace
young edge
#

I would suggest that you create addons for the VehZones. (assuming you don't need extra classes)

#

The extra classes are useful. Though I can see some modders wanting a few more.
Tread's mil zones are handled in a pretty smart way that don't necessarily require to bake in support. But baking in support from the start is p nice

#

ain't done yet (since I still need to do the SCVP) but ye, have a looksie

craggy furnace
#

this is good stuff

young edge
#

Feel free to use it, I'm not really attached to it. The spawns not being used triggered me, so I made the mod KEKW

My end goal is to completely revamp all spawn chances, but unless I somehow get a convenient full SpawnList, it's gonna take me about 550 years Pain_Peko (more info under #modeling message and below)

craggy furnace
#

this will be mad helpful as i am going to be zoning louisville cops into the city proper and militarizing the border proper with some vehicles on the to-do possibly

#

not to mention survivalists

young edge
#

Cyt suggested doing it in an automated manner which would be huge, but until then, I'll have to do it by hand. Problem is that it requires the player to have most (if not all) mods, in order to make the most of it, since these numbers always have to be put in in context to other vehicles Pain_Peko

#

sadly I don't really have the skills for that (referring to the automated method)

craggy furnace
#

rather than having something that magically appears you can just spawn them dynamically and contextually

#

this will take a bit but i am very confident this is the best way forward

young edge
#

Yeah, most likely tbh.

The current problem is that if you have a spawn rate of 1 (for a rare vehicle) is still a lot when you compare it to maybe 5 other cars with a rate of 5. That single point adds up really quick when you iterate 1000x over.
So my current plan is to tweak the spawnChance from running 1-10 to run 1-100ish instead. I planned to go with 1-1000 but I fear that it might make super rare vehicles too rare. I'm still trying to run the numbers through my head atm

#

But doing this for FRU, FHQ, KI5, your vehicles and many others (bearing in mind that it all needs to be contextual) is gonna be rough pepeLaugh

craggy furnace
#

if its a vehicle in a pack of say 20 hypothetically then having one missing thats out of place/rare isnt that much of a loss

young edge
#

Yeah. I think that if I require FRU, FHQ and maybe the 1993 American Pack, it'll have enough spawn pool dilution to not create problems, even if you end up not having a mod here or there

craggy furnace
#

exactly, the majority wont give a shit anyways since its only going to cause an issue if you cant find something that logically should be there

#

then again, its your mod and you shouldnt give too much of a shit

young edge
#

I wonder if there's a way to get the full spawnList of all loaded mods. Otherwise I'll just have to go one by one and condense it down by hand

craggy furnace
#

i am not too up to date with lua atm to know, if i find a way ill throw it to you

young edge
willow estuary
#

caveat: I haven't used ScriptManager.instance:getVehicle but it's in the java.

young edge
#

I'm way too smoothbrained for that stuff, sadly. I'm pretty sure you could do a pretty elegant solution pretty easily by using certain parameters which could be baked into mods, as well as foregoing the whole loaded mods thing, but that's far, far beyond my skill. I can barely read code and sort of understand what's going on.

I tried reading your Vehicle Scenes script and it flew right over my head pepeLaugh

hexed radish
willow estuary
# young edge I'm way too smoothbrained for that stuff, sadly. I'm pretty sure you could do a ...

Yeah, that's some old shit, ahahaha, could be rewritten a lot better nowadays,

Basically what my example does, is that instead of asking "Is this mod loaded?" to know whether to add vehicles to the tables, it instead asks "Does this vehicle exist?" to know whether to add the vehicle to the table.

ie it basically "cuts out all the middlemen" and allows for foregoing the whole loaded mods thing.

young edge
# hexed radish i feel like 1-100 would be nice, cause it would be percentage then

it's misleading, sadly.

There used to be a time where the spawnChance had to be calculated by class and the total had to be 100. Here's the problem, though. What if you have 101 vehicles? What about 1000? Assuming you don't want to deal with rounding errors due to decimals, ofc.

So now, every vehicle just has a certain spawnChance. To make it simple to understand, imagine that every number represents a ticket. Every vehicle puts in X tickets into the hat, the game then calculates whether it should spawn a vehicle and if it does spawn one, it then checks which it should spawn, it randomly chooses one of these tickets.

The difference here is that it isn't a chance of 100. you could have 100 cars with a spawnChance of 500 each, then the game would choose one out of these 50.000 tickets.

hexed radish
#

I'm terrified now.

willow estuary
#

The game should output all the vehicle spawn chances as percentages to console shortly after game start anyways.

young edge
# young edge it's misleading, sadly. There used to be a time where the spawnChance had to be...

Here's the other side of the shtick, though

If you have a low amount of vehicles and a low amount of tickets given out, the relative chance of a rare vehicle being picked is higher.
So you want to create a situation where you either dilute the spawn pool (by adding more vehicles) or by creating more tickets artificially (by giving vehicles a higher spawnChance).. or both, so rare vehicles remain rare

willow estuary
#

Might have to be in debug mode?

young edge
#

only recently got into modding pz, but with every mod being plaintext, it's pretty easy to understand

#

I'd have to look into debug mode more. It's quite overwhelming at first. I'm good at tweaking things, bad at figuring them out from 0 sadge

craggy furnace
#

you are making good time

#

most people hit your point and trail off

willow estuary
# young edge wasn't aware of that, actually <a:pepeLaugh:585596844839796736>

Here's an example from console

LOG  : Lua         , 1653574679178> Vehicle spawn rate:
LOG  : Lua         , 1653574679179> parkingstall: Base.CarNormal 20.0%
LOG  : Lua         , 1653574679179> parkingstall: Base.SmallCar 15.0%
LOG  : Lua         , 1653574679179> parkingstall: Base.SmallCar02 15.0%
LOG  : Lua         , 1653574679179> parkingstall: Base.CarTaxi 5.0%
LOG  : Lua         , 1653574679179> parkingstall: Base.CarTaxi2 5.0%
LOG  : Lua         , 1653574679180> parkingstall: Base.PickUpTruck 5.0%
LOG  : Lua         , 1653574679180> parkingstall: Base.PickUpVan 5.0%
LOG  : Lua         , 1653574679180> parkingstall: Base.CarStationWagon 5.0%
LOG  : Lua         , 1653574679180> parkingstall: Base.CarStationWagon2 5.0%
LOG  : Lua         , 1653574679180> parkingstall: Base.VanSeats 5.0%
LOG  : Lua         , 1653574679180> parkingstall: Base.Van 5.0%
LOG  : Lua         , 1653574679180> parkingstall: Base.StepVan 5.0%
LOG  : Lua         , 1653574679180> parkingstall: Base.ModernCar 3.0%
LOG  : Lua         , 1653574679180> parkingstall: Base.ModernCar02 2.0%
young edge
#

I'm mostly doing it for the group I'm playing with. But if it exists, I might as well release what I have to the broader community. If nothing else, other people can at least build on it

oo, that's pretty neat

willow estuary
#

The dark side of that is this is right after that is this:

WARN : General     , 1653574679196> VehicleType.initNormal> vehicle type "Base.PickUpTruckLightsSmashedRight" isn't in VehicleZoneDistribution

Which is itself innocuous, it's just "developer nagging", in case they miss something, but that vehicle is only spawned for crash events so shouldn't be in the tables.

But people trying to figure out why their server is bricked or their 200 mod behomoth is crashing latch onto those messages like crazy and think that's the clue to solving their issues.

young edge
#

Yeah, I'm currently facing an error each time I fire a gun and I still haven't been able to hunt it down, even after like a week lol

#

haven't really been able to find much on it

craggy furnace
#

do you have a stack trace?

young edge
#

I'll get you one, sec

#

just don't ask which mods I'm running unless you're prepared to read a bible's worth of text pepeLaugh
I've been trying to disable all the mods I thought could've caused it, but no dice. And a binary mod disabling is gonna be pretty rough with approx 300 mods/modlets

#

All I can say is that it has only been happening after the switch to .71 from 68. Running Brita's, but I didn't really find any people Ree'ing on the mod page, so perhaps it's something else.

4 errors, right at the bottom

#

All right when firing a shot

frosty falcon
#

are there any mods to allow turning off electrical appliances to prevent gen fuel use? is it even possible? cannot find anything on google and such a feature would be handy

native shore
#

Are translations done manually/with help from others (like in #translations or similar)? I couldn't find any autogen or tutorial in the wiki.

kindred dagger
#

Is there a way to organize recipes other than alphabetically?

native shore
#

I think with filtering and such it kind of reduces the need to be super specific about how they're arranged in the file

kindred dagger
#

I mean in the ingame recipe browser. Filtering might work, I guess

worldly olive
#

Hello!
Is there any place in the debug where I could see the player animations?

tame mulch
worldly olive
#

Will check that!! thanks!!

worldly olive
#

Nvm found it

distant rapids
#

How do i force a sound to play in a recipe?

winter sparrow
#

Guys, is it possible to edit and add new zombie zones to vanilla map?

faint jewel
#

@drifting ore you around?

thick narwhal
#

@faint jewel did you ever end up releasing your reefer trailer?

paper steeple
#

Reefers would be amazing!
On a server I play with a small community, I am essentially a truck driver transporting things across the map to various groups. A reefer would be great for food items.

smoky meadow
distant rapids
#

Something to do with it cant find the file

smoky meadow
smoky meadow
candid light
young edge
white crag
#

It is surprising that zomboid is actually pretty open for adding custom render stuff

#

since zomboid does not supports custom fonts (still don't know why)

#

I had to assemble improvised bitmap font rendering code

#

which is unfortunate

hot patrol
# white crag

That's pretty cool. At first I thought It was meant to be a range finder telling you how far you are aiming. Kind of a strange place to put a bullet count imo.

white crag
#

since there is no standardized position

#

Also limitation applies: There is no lua event related with character render

#

so there is no way to add models or details when the model becomes texture-ized

#

technically

#

if any binding is avilable

#

we can make shit like attachment visible

#

even better, if any binding is available for model rendering (with model attachment access)

#

you can even add some bullshits like functional laser

#

or volumetric flashlight cone (if there is any depth based shader - which is highly unlikely)

#

also i see "a thread" is allocated to lua

#

but multithreading (or concurrent) is bitch thing to do i guess

craggy furnace
# white crag

finally, a gun mod that isnt trying to dupe tarkov or just fill the zone with stuff

#

this is great shit

coral blade
#

anyone?

young edge
coral blade
#

sad

#

what happened?

young edge
#

never heard of the mod, so I wouldn't know. But it might be taken down temporarily, who knows

coral blade
#

😢

latent torrent
#

does anyone know why my weapon is upsidedown

solar gust
frosty falcon
#

can still get this if you need it, just saw your msg

solar gust
latent torrent
#

i got it i just had to restart the game

spare burrow
#

Heyhey people, is there any way of changing the ingame skin of chars? with any effect or alike, i know for example shaving has a model effect change, but i'm not that deep into zomboid modding yet (please @ me without remorse 😛 )

kindred dagger
#

I'm one stop closer to finishing my trading mod.

long night
#

Hello chat

#

Mod request: Morbius VHS Tape

coral blade
frosty falcon
coral blade
#

really? steamcmd?

#

i tried once and it said the ID doesn't exist anymore

#

make sense

smoky meadow
#

i don't know what i'am doing.

wicked grove
#

are there mods for multiplayer which mute surprise sound? or is it possible to remove the sounds on server's side?

safe sinew
# white crag

Maybe it's just me but this is a godsend for someone like me that gets tunnel vision in hectic situations

brisk mortar
#

Heyyo! Hopefully this is the correct place to ask, but is anyone taking mod commissions? It would involve some heavy scripting, changing how dead zombie bodies work/adding an effect to them, and making a new item with it,
And the 2nd one being a new economy system I can go into detail via dm.

rugged delta
stoic tree
craggy furnace
hollow hamlet
#

What are considered some of the better QoL mods?

clear geode
glacial flicker
#

Hey guys, I wanted to know if there's a way to increase the length of a VHS

#

I would like for them to last a lot longer

#

(custom ones)

drifting ore
faint jewel
#

lol hey.

#

mind i pm you?

dire oracle
#

Does in-game engine power of cars equivalent to some amount of real horse power?

young edge
#

given that I've seen a VW bus with 500hp, I'd side with no, though I could be wrong

young edge
#

Funny but you go to gulag BurnInHelle

thick narwhal
#

this thing is fucken speeeeeed

young edge
#

I'll think of a reason when it comes time to report in on it

thick narwhal
#

lul

devout galleon
#

heyo!

Im planing on a coop run with my friends but given that we are all "veterans" in this game i would like to make it an absolute nightmare in terms of difficulty.

We are max 8 people and i am looking for some mods that make the game hard, realistic and punishing without making it tedious

#

anyone got some nice mod combinations for me?

#

Pref would be version 41.71 mods

latent torrent
#

Is there a way to stop weapons that are big from warping

native shore
#

when I call an instance method on a Java object, does Kahlua need me use : to ensure self is properly set or...?

#

does it just like, figure it out?

#

in other words, how is the transition between self in Lua and this in Java handled: by me or by Kahlua?

white crag
hollow gyro
#

that looks really good

balmy prism
thorny garnet
#

Hey all I'm doing a simple mod to change a generator's max condition. Trying to add sandbox options to it, but can't seem to make the mod work.

#

If i leave the value static and just do this it works

#

But if I try to make it conditional based on sandbox options it just defaults to 100 ingame

calm depot
#

have you tried changing the 100 line to something else?

#

because my first guess is that none of those lines are executing

#

so change the first case, and if you still get the default, something is wrong with the sandbox var you're accessing

thorny garnet
calm depot
#

so option always == 1

thorny garnet
#

For instance I also tried this, and entered 200 on the sandbox options screen to test, it defaults to 100

calm depot
#

when does your code execute

thorny garnet
#

Oh, sorry. I'm super new. Let me just post the whole thing

#

Ideally it should be running when a world is generated, but here's the only .lua file

#

I've also got sandbox-options and translate files set up

calm depot
#

if what you're saying is correct, that code will execute exactly once, when lua gets loaded

thorny garnet
#

But why is it not using sandbox variables? When I leave it like so, with the value hardcoded to 200, in-game a generator shows as having 200 condition. When I use a value pulled over from sandbox vars it always defaults :/

#

Here's the sandbox-options.txt

calm depot
#

it sounds to me like the order of execution is:

  1. game loads, lua executes, value is 100
  2. you set the sandbox variable
  3. lua has already executed, so nothing happens
drifting ore
#

I made a bubonic plague retexture that makes the fingers of zombies necrotic and adds necrotic boils all over their body, do you think its worth uploading?

fast galleon
#

sometimes sandboxvars are weird during load

thorny garnet
fast galleon
#

try to do it with event later?

#

Maybe OnInitWorld

thorny garnet
#

That's what I was afraid of, that's a whole nother level of depth. Currently the mod is like 10 lines lol

calm depot
#

mm, also, I'm fairly sure each individual IsoGenerator instance has its own, separate ConditionMax

#

ah but you're setting the mod data, that'll work for anything spawned in subsequently

thorny garnet
calm depot
#

the thing is, for it to work properly, if someone changes the sandbox var while the game is running, you need to not only change the moddata for future spawns (although, only admins are going to be spawning generators at that point) - but also change every IsoGenerator already on the map

thorny garnet
#

I'd be fine with the mod requiring a wipe to work properly, and notifying users of that in the mod's description

calm depot
#

you would also need some code that runs whenever they go and change the sandbox var, which, right now you just run once at loadtime

#

maybe you can get away with putting it in Events.OnPreMapLoad if you're happy for it to be at init - but the sandbox var still needs to have been customised before this

thorny garnet
#

Primary reason for developing this mod was to use it on my own server so that should be fine

#

Still have a lot of reading to do because I don't even know where to start with events

#

Thanks for the help

calm depot
#

they're just callbacks - you pass in a function and the game takes care of executing it at the appropriate point in time

thorny garnet
calm depot
#

yup

thorny garnet
#

Would I add Events.OnPreMapLoad.Add(SetGenConditionMax) to the bottom is that wrong?

calm depot
#

huh?

thorny garnet
#

Do I need to add that function to OnPreMapLoad as well?

calm depot
#

no, just whichever one works

thorny garnet
#

Ah ok. Testing time 👍

calm depot
#

uh, one issue though

#

you should obtain the item inside the function

thorny garnet
#

Sort of like this?

calm depot
#

yeah, and make the vars local

#

no reason to have a global name/item floating around

thorny garnet
#

Gotcha, item and name are now local vars

calm depot
#

also, I would go back to the original, simpler method of simply concatenating the sandboxvar straight onto the string, but worry about refactoring it once it works

thorny garnet
#

Should I try and sanitize the input later for best practices or does PZ kinda handle that with default min/max values?

calm depot
#

usually, the answer is yes, but since this is something the server admin sets, it's on them if they bugger up the config

unborn raft
#

would it be possible to edit a britas item to be a different category

#

im wanting to attach a non-accessory gasmask to my backpack that needs the mask to be an accessory to attach

#

or is that not how it works

#

this is the backpack mod i use

#

nevermind

thorny garnet
dawn shuttle
#

Is there a lua event that triggers when the name of a player is appearing on screen? Or at least a way to get players' X/Y coord relative to screen. Trying to display something beside player's name like faction or admin do.

calm depot
#

AFAIK, the text displayed above the player is done in Java

#

yeah, it's in IsoGameCharacter.updateUserName()

native shore
#

When I call an instance method on a Java object, does Kahlua need me use : to ensure self is properly set or...? Does it just like, figure it out?
In other words, how is the transition between self in Lua and this in Java handled: by me or by Kahlua?

true vault
#

Alright folks, need assistance.

I have a couple custom posters working, to the point where I can craft them and place them on the walls. I ended up following Aza's tutorial on it however...

...I cannot figure out how to make it so you craft one, and can place it on either North or West wall.

tame mulch
white crag
native shore
white crag
#

some exceptions may apply

#

Also, if you need more info about this one

#

you may check about the term metatable of lua

#

which is the reason why this self and this thing is being a thing.

native shore
#

my question was really more about how Kahlua treats self in terms of Java's this and whether I need to be explicit about passing it

white crag
#

depends on the context

#

but mostly refers the class method's instance

#

unless you do the nested class method

#

or overriding some __index table

#

to screw with the lua's metatable

#

the lesson is, play by the book

native shore
#

yeah I'm trying, the mod I've adopted as my learning project has some... interesting practices 😄

#

but I've had the Lua reference open all day every day, as well as the PZ wiki on modding, plus some other assistance

#

I usually try to write "good code" 😄

white crag
#

You need to remember some of Lua native library is not available due to Kahlua author's policy

#

so if you need to see what lua can do

native shore
#

right, that's where the questions start pouring in 😭

white crag
#

you need to decompile the PZ code

#

and see what's open for lua

#

and what's the global methods

#

like things defined in the LuaManager.java

native shore
#

yep, not only did I do that, but to make it easy to use, I wrote doc comment implementations for everything used 🙂

white crag
#

document when the code is finalized.

#

i know its kinda dicky to say without knowing how many you've worked on this industry but that's my personal experience so far

#

since i don't know PZ so well

#

so i tend to change things so often

#

that's why i do the documentation in the late state for this one

#

less work, better job

native shore
#

well the problem is that when you want to use a function from Java, since it's in a different language and the language support is... not great, you kind of need something to reference, e.g.:

--- Java zombie.characters.IsoPlayer
---@class IsoPlayer: IsoLivingCharacter
---@field public getNutrition fun(self: IsoPlayer): Nutrition
---@field public getPlayerNum fun(self: IsoPlayer): number
---@field public isLocalPlayer fun(self: IsoPlayer): boolean
---@field public getJoypadBind fun(self: IsoPlayer): number
#

I have that for everything that's called from Lua, so that I get IntelliSense

white crag
#

tbh that's not our job but yeah

native shore
#

haha tell me about it

white crag
#

i usually localize things

native shore
#

my very first question here was "is there a tool that does this" and the resounding answer was "NO" 🤣

native shore
white crag
#

since any kind of interface is "the" overhead

native shore
#

yeah!

#

that global space is so full

white crag
#

my trick is make a table

#

and put everything in there

#

like a module (which is everything suppose to be)

native shore
#

my rule is if I access it 2x or more, I put it in my main table lol yeah same 🙂

#

nice

white crag
#

but when i get lazy

#

i say fuck this and just go brr on global table

#

expecting the game to break

native shore
#

hahaha

#

sometimes, it really do be like that

white crag
#

It's kinda sad that

#

there is a lot of things can be done

#

but some of neat things is not available

#

due to lack of lua events

#

such as "rendering additional model before the model sprite get rendered and registered"

#

or "when rendering the model"

tame mulch
#

You can suggest this ideas for events on forum 🙂

native shore
#

well dang, that's cool

#

TIS are nice 🙂

white crag
#

well don't report me as spam

#

because its a long list

native shore
#

haha

#

I should have chosen an items/weapons mod first

white crag
#

mind if i know where to put that thing?

native shore
#

choosing a UI mod was a bad choice lol

white crag
#

UI is the pain in any game

tame mulch
#

Yeah

native shore
#

there's tons of stuff about "how to add a cool hat" or "how to make weapon damage 10x"

#

there's nothing about "how to properly inherit from ISWhateverTheHeck" so you don't litter the global space with a bunch of copies

#

but I'm figuring it out

white crag
#

a lot of hacks

#

went to here

#

life half of things in there is undocumented

#

lmao

native shore
#

yeah your stuff you've been putting here is awesome, very boundary-pushing 🙂

#

great imagination tbh, keep it up

white crag
#

after doing this i get the reason behind why PZ modding scene is somewhat "stale" in terms of uniqueness of the mod

#

a lot of good methods are hidden behind

true vault
#

@white crag and @tame mulch you both seem rather knowledgeable.. any chance you could point me in the right direction with the issue I'm having, posted a bit above?

white crag
true vault
#

A... bug? With creating a mod?

tame mulch
#

If will be good ideas for mods and request what need to add for mod - later we can add this.
Btw do mods by hacks if fun 😄

white crag
#

oh

#

wait i was kinda mixed sorry about that can you elaborate the issue again?

native shore
#

Aiteron sounds knowledgeable 😄

#

literal robot bird making fishing great again

white crag
#

maybe

#

i typed sugestion

#

so that's why

tame mulch
white crag
#

oh thanks

#

I was about to write things on wrong place

true vault
white crag
#

do you have four directional sprites?

true vault
#

I have 2-directions...

tame mulch
#

You checked how work current ingame posters?

true vault
#

Like I said, I followed a tutorial by Aza on it.

tame mulch
#

And in Aza mods posters can rotate or not?

true vault
#

I suppose that's a good question (I'm not sure), but her tut also seems to be the only semi-recent one, and the only poster mod I know of.

Kinda why I'm here lolz... I'm not asking for anyone to do the work for me, but I've spent like 3 hours on this, and I'm kinda looking for someone that might be able to point me in the right direction haha

native shore
#

see, I should have picked posters or hats

#

I'm at 60+ hours just understanding the UI 🤣

tame mulch
#

Try pickup default poster and try rotate it when place. If it not rotate - then will be harder to do it. If can - then need check how it works in default game

true vault
native shore
#

scripts is one place, where else?

tame mulch
native shore
#

I'm trying to adopt Minimal Display Bars

true vault
native shore
#

it's been dead for yonks now

#

PR piling up on GitHub (clean ones too), and problems reported on Steam page

tame mulch
true vault
#

Keep in mind I'm coming from years worth of making mods for SoD2 which is in .uasset files, and writing apps in C#

Pretend I'm like 5... lolz

true vault
native shore
#

I thought so, so now what... what dictates that action?

tame mulch
true vault
#

AFAIR at least... I'll confirm that in a second

true vault
tame mulch
#

Can you send me tutorial or your code?

native shore
#

probably "How are you telling the game 'this item description belongs to this sprite'?"

true vault
#

The thing I'm stuck with is the tutorial itself, doesn't go over rotating them.

native shore
#

I presume there's something like this in your mod's media\scripts:


    item Mov_MapUSA
    {
        Type            = Moveable,
        Icon            = default,
        Weight              = 0.5,
        DisplayName        = Moveable,
        WorldObjectSprite    = location_community_school_01_22,
    }
#

so you can link the sprite to the item

true vault
#

Pretty much

module ZGal88Posters
{
    item InvaderZim1
    {
        Weight    =    0.2,    
        Type    =    Moveable,
        WorldObjectSprite =    zgal88_posters_0,
        DisplayName    =    Invader Zim Poster 1,
        Icon    =    Poster,
    }    


    recipe Invader Zim Poster 1
    {
        keep Pencil,
        SheetPaper2=1,
        Result:InvaderZim1,
    }
}
native shore
#

cute, Invader Zim is 👍

true vault
#

Yus. Had one person mention it, and then like 4 others want it as well LMAO

native shore
#

ok so there you're missing the sprite yeah?

#

WorldObjectSprite

#

oh never mind

#

I am blind

true vault
#

The sprite isn't "missing" per-se

#

It crafts and places on wall fine.

native shore
#

so you did, that'll teach me to eat dinner 😂

true vault
#

Yea, the issue is moreso... how do I tell the game, that the North and West images are for the same object, depending on the direction it's facing?

#

Correction: South and East*

native shore
#

Kahlua
waves hands mysteriously

true vault
#

What I have for them THIS

tame mulch
# true vault

I have idea how to fix it. You can add recipe with name Rotate, that will swap item on other item with other sprite 😄

native shore
#

😮

true vault
#

aniThonk I have no clue how to do that haha

native shore
#

wait the actual fix is to make it into... a recipe??

tame mulch
#

I don't know how work vanilla paintings, but this will work like temp solution

native shore
#

ah

#

there has to be a better way than that lol

#

but it sounds reasonable

tame mulch
#

Yeah, I will check again, but in item script you can't set second tile

#

I think it worked in another way

native shore
#

looks like ISMoveablesAction.lua has the code for it

true vault
#

Oh wait... I think I might understand the recipe...

native shore
#

media\lua\client\Moveables\ISMoveablesAction.lua

#

yeah that's a clever stopgap, even if it's a bit... clunky 😄

true vault
#

Something like:

recipe Rotate Zim Poster South
    {
        InvaderZim1=1,
        Result:InvaderZim2,
    }

    recipe Rotate Zim Poster East
    {
        InvaderZim2=1,
        Result:InvaderZim1,
    }
native shore
#

obviously you'd like to be able to just click and drag or press R/Shift+R

true vault
#

?

native shore
#

yeah that seems like exactly what Aiteron was saying

true vault
#

That's... a very hacky way to do it, but it should work haha

native shore
#

I know lol

#

clever though

true vault
#

I'll go try that method and see if I can get it working properly :3
Will report back either way

native shore
#

best of luck 🙂

true vault
#

That... worked LMAO

Thanks @tame mulch @native shore

I'll go do up the other 5 posters the same way, but it looks like that'll be the solution, for now haha

white crag
haughty veldt
drifting ore
white crag
#

lua

drifting ore
#

well I let you finish it and I will take a look at what you did, that could help me for something else

white crag
#

@drifting ore you can check in 10 mintues

unborn radish
#

I hate to be that guy, but it would be amazing if there was a mod that allowed you to remove rust off cars. I know Paint Your Ride lets you do that, but it doesn't work in multiplayer

fossil skiff
#

can i share mod gameplay here?

#

i hope it can help others

#

paint your ride mod

#

undead survivor

compact terrace
haughty veldt
#

it is

native shore
#

Why might the in-game debugger ignore my election to "Break On Error" in the case of an error? I know there was an error because the log shows it, but it didn't break and highlight so I could inspect the state... any ideas?

fast galleon
#

happens with minor bug, don't remember which one

native shore
#

tried to call a non-function
doesn't seem minor to me, and considering the line it points out is a for...in (and not the subsequent line), I'd consider it worth at least some attention from the person debugging 😄

fast galleon
#

My favourite is when debugger gets error itself

native shore
#

I mean, in order to effectively troubleshoot it, I'd have to iterate over the keys and values in the table, getting us back to the same problem lol

fast galleon
#

double click one of the items and get a bunch of new errors

native shore
#

😭

#

who wrote this thing again, lemmy? I remember seeing a forum post from a long time ago...

native shore
#

Okay so since the debugger isn't cut out for the task - which, Early Access, fine no problem - I am in a bit of a catch 22 here. I am managing persistence via the aptly named persistence module (https://github.com/hipe/lua-table-persistence), gently modified. If I save a table of config options as the table, e.g., local myCoolTable = {--table stuff here} and then return the table at the end of the saved file (return myCoolTable), I can either return the result of that as raw or as a call (result vs. result()).

If I return it as a raw result, everyone is happy until the aforementioned line where I'm iterating, which is likely what's causing that problem; however, if I return it as a call, it says the table has no __call metatable set. Damned if I do, damned if I don't.

Would it be better to just switch to a more modern storage format like JSON and parse in and out, or continue to troubleshoot this built-in language feature of being able to load and store chunks? Is there some Kahlua limitation I'm missing?

balmy prism
#

Do Ridiculously Rare and EHE work with CDDA?

craggy furnace
balmy prism
# craggy furnace EHE will

It will? I figured since CDDA starts you months into the apocalypse the whole start system with EHE just wouldn't work.
Also the fact you cant disable the vanilla heli

craggy furnace
#

the vanilla helicopter is completely irrelevant

#

we recommend it off because its annoying as hell and people will easily confuse it

#

we have a check that mostly works to disable it anyways on game start

balmy prism
#

ah. what about the whole start date? does that matter?

drifting ore
#

i am writing a trait mod and i wanted to know how i could allow the player to sleep in almost any circumstances aside from extreme ones

balmy prism
#

since you cant edit those settings with CDDA

craggy furnace
#

not sure, but you may get earlier helicopters

balmy prism
#

Alrighty cool.

#

thank thank you.

dawn shuttle
#

I've been searching the place that handles rendering the player's name / faction name above people's head. Anybody knows where that would be?

rustic radish
#

I feel like I'm going crazy trying to get a WorldStaticModel to show up. I think my code looks like every other example I have seen, the model in hand works fine, but it just doesn't appear at all when placed on the ground.

#
item Moonshine
        {
            DisplayName =       Moonshine Jug,
            DisplayCategory =   Food,
            Type =              Food,
            Weight =            1.0,
            Icon =              MoonshineJug,
            AlcoholPower =      5,
            Alcoholic =         TRUE,
            CantBeFrozen =      TRUE,
            EatType =           Bourbon,
            Packaged =          TRUE,
            ReplaceOnUse =      MoonshineEmpty,
            HungerChange =      -21,
            ThirstChange =      -20,
            UnhappyChange =     -20,
            Calories =          1800,
            Carbohydrates =     0,
            Lipids =            0,
            Proteins =          0,
            CustomContextMenu = Drink,
            CustomEatSound =    DrinkingFromBottleGlass,
            StaticModel =       MoonshineJug,
            WorldStaticModel =  MoonshineJug_Ground,
            Tags =              Liquor,
        }
#
 model MoonshineJug
    {
        mesh = MoonshineJug,
        texture = MoonshineJug,
        scale = 0.4,
    }

    model MoonshineJug_Ground 
    {
        mesh = WorldItems/MoonshineJug,
        texture = MoonshineJug,
        scale = 0.4,
    }
#

The models referenced are the same, just in different folders. Is there supposed to be a difference between the hand model and the ground model? I've tried adjust scale and such, it just won't appear at all.

EDIT: I partially fixed this, turns out the model in Blender also has to be at 0,0,0. It now appears in the placement preview at least. For some reason it only appears on the ground if I rotate it even a little bit, or drop it instead of place.

balmy prism
#

@craggy furnace Wait im confused. If you dont have "Continue Scheduling Forever" will that mean that no more helicopters spawn after the end date?

balmy prism
#

Damn.

#

So no raiders and stuff either?

wet osprey
#

is it possible to mod a fireplace so you can craft one?
does anyone know of a mod that allows this?

calm depot
#

More Builds

undone crag
#

zombie.core.SpriteRenderer has drawModel(ModelManager.ModelSlot model) :o

wet osprey
thorny garnet
cloud crow
#

Is it possible to make all furnitures, walls, doors & etc. to regenerate damage dealt to them?
Active repair - Regenerate damage while being attacked.
Passive repair - Regenerate when not being attacked.

#

Regen amount per tick
Number of Ticks to Regen

fast galleon
#

is there a reason why only of the hammers can remove barricades

latent orchid
fast galleon
#

and only one hammer can unbarricade now

latent orchid
#

the options in the context menu (right click) tend to be hardcoded with things like tool checks etc. The tags option might not be used for barricades

#

took a quick look at code and it does check for tag

#
if not self.character:hasEquippedTag("Hammer") then
fast galleon
#

but hasRemoveBarricadeTool would be false ?

calm depot
fast galleon
calm depot
#

the claw hammer, right?

fast galleon
#

I guess so yeah

#

Thing is, I usually grab the ball peen hammer and now I have to find the other one.

calm depot
#

I would imagine it was changed for realism reasons

#

a ball-peen hammer is not going to be the tool of choice to pry a plank off

#

by which I mean, it would be nigh impossible to do IRL

fast galleon
#

I imagine so, too bad I didn't grab one when I saw it.

#

I'll add tag to knife

zealous wing
#

Daily icon work.
Made a new box for the Allsorts candy.
Gonna do all the rest of the new sweets too.

smoky meadow
#

guys how make a firearms fire burst mode in the game.

vestal lynx
#

Hello modders, would anyone know how to change the label of an item without causing it to disappear from the game world? For Example if I have a mod with:
item ModdedCandle
{
DisplayCategory = LightSource,
Weight = 0.4,
Type = Drainable,
UseDelta = 0,
DisplayName = Candle,
Icon = ModCandle,
cantBeConsolided = TRUE,
StaticModel = ModCandle,
WorldStaticModel = ModCandleGround,
}

And I want to change it to a vanilla candle:
item Candle
{
DisplayCategory = LightSource,
Weight = 0.2,
Type = Drainable,
UseDelta = 0,
DisplayName = Candle,
Icon = Candle,
cantBeConsolided = TRUE,
StaticModel = Candle,
WorldStaticModel = CandleGround,
}
without causing the ModdedCandle Item to disappear.

I can already change it to and use vanilla stats but I'm trying to also remove the reference to the label (without causing the item to disappear):
item ModdedCandle
{
DisplayCategory = LightSource,
Weight = 0.2,
Type = Drainable,
UseDelta = 0,
DisplayName = Candle,
Icon = Candle,
cantBeConsolided = TRUE,
StaticModel = Candle,
WorldStaticModel = CandleGround,
}

I'm trying to do that to remove a mod from our server pack and have no reference to the Labels from the original mods, since although we removed all the codes from our server pack and converted the item, the mod creator is not satisfied by that since we are still using the label names from his mod.

I'm trying to find a way to change the label without causing our players to lose the equivalent vanilla items (plus those spawned in the game world already) and not having to manually do it through an admin account (would be too much work).

vestal lynx
#

We thought of a method that we will try by adding to the ModdedCandle:
DaysTotallyRotten = 0,
ReplaceOnRotten = Candle,

vestal lynx
#

The above methods work, you just need to include:
imports
{
Base
}

At the top. that way if you ever decide to change the way you use a server from linking directly to the workshop to using a server pack and don't have permission from the mod author to use their mods in your server pack you can convert their items to vanilla items before you remove their mod packs so that your players and spawn containers don't lose everything (assuming you want to keep corresponding vanilla items.

You will need to teleport to each cell on the maps to ensure the rotten code gets triggered. There is a probably an even more efficient way to do it by modifying the item list on the server but the above method works and you can get rid of the conversion mod as well once you are done converting the item to vanilla.

#

Method above limited to Food Type.

drifting ore
#

I have yet to see a armored vehicle In a mod have practically indestructible doors or frame.
Is if even possible?

noble imp
#

hey vhere to dovnland vorkshop mods

#

the vebsite I use is dovn

#

and there is nothing I could do

undone crag
#

Stean Vorkshop

dire oracle
wraith sable
#

Hey guys, Im new to lua, do any of you know how I can remove a two handed weapon from the players hands? The weapon always stays in the secondary hand even when the item is dropped on the ground for some reason

drifting ore
lean perch
#

Does anyone know how to get the Expanded Helicopter Events working in multiplayer?

#

Seems impossible

placid sparrow
#

Lol... Looks like I had "Better cubes" and "Better video games" mods, that allowed to solve Rubik's cube and play that video game you can find in various places to fight boredom and depression. Those mods literally disappeared from workshop, their pages are no more...

Anyone has any news about them? What even happened?

hot patrol
#

I need some help or advice. So my mod has addon capabilities but I feel like my instructions aren't quite clear enough for people to figure out. Can somebody look over my work and tell me if it's good or how I can make it better?

#

I would ideally like to make it super easy to digest but am about as much of a teacher as I am a modder...

#

@ or DM me if you don't mind helping me out

native shore
hot patrol
#

I've tried but true music is the only one I can thing of but mine and theirs are quite different

#

I'm not aware of any other mods that allow for addon content

#

especially one that is similar to mine

native shore
#

well, in RimWorld, for example, there is a modular mod collectively known as "Vanilla Expanded", and while most of the addons are by the main author, several others have contributed their own
Fallout 4 has Sim Settlements which allows for tons of new content to be created by the community and even submitted to a user collection, and has extensible systems, etc.
in Project Zomboid, I think Mod Options could be considered, though really that's just configuring your mod to work with that one but the idea is similar in that you're using something that exists and adding your own "hook" so-to-speak to make them work together; the documentation is fairly well done, and has been simplified to the bare minimum, then expanded upon in a Discussion

hot patrol
#

I'm not sure if that will really help me though. I hardly even know what makes my mod tick since I'm not much of a coder and I got a lot of help. I know how to add to what is there but if asked to work it all backwards and explain how I did it I kind of lack the experience to get it down properly. The way I went about leaving instructions the best way I could was leaving "fill ins" in the code itself but I feel like that might not be inherently obvious to most people.

native shore
#

I personally think that's very clear, but will you just paste that screenshot on the mod's Workshop page? Probably not right? You'd at least give some steps or something for people like you who are trying this out for their first time.

#

at a minimum you need to document for me the answer to "how do?" 😄

hot patrol
#

that's what I have

#

it's not much and that's the problem. I'm not sure how to put it down into documentation

native shore
#

Where are the instructions?

hot patrol
#

that's exactly it. the instructions are IN the code becuase I don't really know how to write the instructions...

#

does that make sense?

#

I basically left them in comments in each file

#

one person managed to figure it out but they also cross referenced my mod

native shore
#
  1. Download [this](linky go here) file.
  2. Where it says DO THING HERE, do the thing.
    2.a. Item is your item, look at the game files for examples
    2.b. GUID is a magic code that somehow makes things work correctly, you can generate one [here](linkaroni and cheese)
  3. Great job! Enjoy waifu!
#

😄

#

something like that, but with real information and links is probably the bare minimum

hot patrol
#

yea, alright. Makes sense. lol

native shore
#

also remember, not everyone is max level in their English skill, so short, clear, and concise is the goal (I say, not following my own advice) 🙂

hot patrol
#

gotcha

#

alright I will work on that

native shore
#

I believe in you!

hot patrol
#

I don't believe in me so I need it!

native shore
# hot patrol I don't believe in me so I need it!

2 more things came to mind:

  1. Do it yourself with a new one, document the steps, take screenshots, describe and/or put big red arrows
  2. Collect those answers you've given so far and put them in your instructions, including things like the one about "no you can't turn them over" at the bottom
#

hopefully that wasn't all just confusing and unhelpful 😄