#mod_development

1 messages · Page 239 of 1

ancient grail
#

No
Cuz you cant change this via lua
Only grab them

#

Possible

bright fog
#

At first I thought about using these but quickly realized that there's a major issue with these compared to prints: it doesn't say which mod sent that log message

#

Which is why I quickly moved back to print for the rare instances I need to log anything in the console (also I consider that nothing needs to be printed in the console tbf and the only time I use it is to log the replacement of a function in another mod), as this directly writes the mod that prints in the console

#

That way you don't have to write your mod's name in your error() or log()

winter bolt
#

really late reply but i only used the apis to add those options to already existing items. if youre doing it for items from your own mod then you can copy the hoodie item scripts from the base game

grizzled fulcrum
copper hemlock
#

Does anyone know if the settings for zombie lore concerning speed, strength and health are checked before spawning every zombie or if they're only checked when the server is launched? I can't find an accurate answer online and I would like to find a way to modify those values in-game without having to restart the game.

magic halo
#

Hello everyone, how are you? Could anyone inform me what the API function is to check if the game is in splitscreen mode?

bright fog
copper hemlock
#

Thank you for the answer SirDoggyJvla , sorry if i appear a bit dumb, but how would you set zombies to inactive/active manually?

rain shard
#

Does anyone know if there's a function that checks whether it's someone's first time spawning versus a respawn?

I help maintain a dedicated server that currently is utilizing starting items, but respawning obviously gives you all these items again. I'm trying to figure out a way so it only gives the items once ever per account.

#

Oh, I suppose you could tie it to account than character. Then just add a check to see if they've been given it before or not.

manic magnet
#

So basically just get far away from the zombies and then come back to them.

alpine scroll
#

About zombie Health: Does anyone know if the default zombie will always spawn with 1.0 hp or a range? (like from 0.9 to 1.2 for example). Also, is there an upper limit to setHealth()?

#

And another thing: Which is a good check to see if the zombie object is a player or an actual zombie?

rich reef
#

Hello everyone. Would someone off-hand know if you can restrict a placed object/3d item from being picked up by a non-admin?

pine patio
rich reef
coarse sinew
# rich reef Hello everyone. Would someone off-hand know if you can restrict a placed object...

You can decorate the validity of the item transfer action to check the item type, and the destination container if it belongs to an admin. This is how I did it to allow only wood to be placed in a "logs" container.
https://github.com/eI1on/pz-building-menu/blob/main/Contents/mods/BuildingMenu/media/lua/client/BM_ISInventoryTransferAction.lua

GitHub

A mod for Project Zomboid which adds an UI for building objects. - eI1on/pz-building-menu

rich reef
#

Thank you Elyon, I'll take a look!

dry chasm
alpine scroll
#

I was here doing some tests and it was returning some random values for me, which I assumed was the player

dry chasm
#

random?

alpine scroll
#

However, seems like there were other zombies a bit far away

#

haha

#

So It was right. I thought it was a false positive, but it wasnt

#

Just for context, I am trying to force a zombie to spawn and have a specific characteristic. Like be a crawler, be a sprinter, have more health

#

I dont want to tie to a specific outfit, but I want to make it consistent when I spawn them, mostly using Createhorde2

#

And with createhorde2 I can set their hp

slow hound
#

i think you have to alter the zombie state after loaded

alpine scroll
#

So I'll spawn them with a specific HP, reset the HP to what I want (Mostly 1, probably) and add a tag (moddata) so It can keep updating

alpine scroll
#

Right now I am using 1.99, 1.98 and 1.97 as triggers to make them happen.

slow hound
#

I'm mkaing a last ditch effort to see if there is even a hacky method of setting and reinitializing sprite property values without server restart

dry chasm
#

Moddata of zombies will IIRC get "recycled" in a way that others may end up using those if the actual one "unloads" and another loads, but I'm not entirely sure where/what how - and setting HP did have potential Multiplayer issues I believe, unsure if someone found a clear "solution" to it.
However, this might be an interesting point here: https://steamcommunity.com/sharedfiles/filedetails/?id=3243131044&searchtext=Forge

slow hound
#

the clear solution was to prevent hp loss over increasing it

alpine scroll
slow hound
#

glytch3r came up with this

#

he just released a mod the other day

dry chasm
alpine scroll
slow hound
alpine scroll
#

Also, just as a heads-up if you are ever going to trigger something based on a specific value for zombie:getHealth() : The regular zombies dont always have 1.0 hp. They may even have 1.74, for example

dry chasm
slow hound
#

it's more than the lights in the end but if it works for that it can work for anything else with a sprite

#

i have the java method i could write to make it possible but there has to be a way without. after i think it was you who mentioned in the other discord, you reminded me that i did run into issues and it was because i couldn't see a way to recreate or even hacky parse java in a way to do it, but then again i'm half clueless as it is so i'm trying different things

alpine scroll
#

Not sure if that helps, but I think there is a trigger that update the IsoObject sprite when you run the "Refill container" with an admin. Maybe you can check that code and see what it does

slow hound
#

other dreaded option is to create a bunch of different sprites and use different ones depending on the "option" chosen by the end user. absolute last ditch effort for that one

alpine scroll
#

Anyone knows if there is something you can tag a zombie so it would never fall down? Apparently there is a mechanic that if the zombie is on the ground, you can insta kill it, regardless of hp left

dry chasm
bright fog
#

But it made them unpushable

#

And you can't stagger them either

#

I'm sure there's a way to stop them from falling completely however

candid egret
#

Is there a specific way I can access the textures of the normal game? I want to remake the map drawings because they look very pixelated when scaled up.

bright fog
#

Not sure you can modify these by drawing them

#

However ik there's a mod which modifies the map style

grizzled fulcrum
#

I am finally finding the courage to make some dynamic translations api but I just looked at vanilla translations and saw that they use %1. I can only assume this is some string formatting argument number 1 that they use. Is this exclusive to Java only (as in you can only set the %1 from java)?

#

nevermind that's what all the args in getText are for, it's substitution (%1 is first arg, %2 is second arg, all the way to %4)
well this doesn't help me too much so I will still go through with it

dry chasm
bright fog
#

Yeah I'm wondering the same

frank elbow
grizzled fulcrum
#

and mod can change text based on any conditions (like say you want to change a translation based on player health, or something)

#

but it will only work on lua side, I cannot override java method

#

but I can from lua side so you can just overwrite the vanilla translation from lua anyway

frank elbow
#

With the same caveat from before that it won't have an effect if the string is exclusively used from Java

grizzled fulcrum
#

yes

#

but I cannot fix hard coded stuff anyway

frank elbow
#

It's still a neat idea, don't get me wrong—I just think that's important to make clear to avoid confusion

#

Changing the Java-side translations would be possible with a Java mod but that would require every player that wants those changed to apply it, so def not ideal

grizzled fulcrum
#

my idea for this mod was only to make vanilla translations different every time and I can overwrite the translations from lua so it works out

#

I can't remember the translations that people mentioned that are hardcoded on java, if someone provides an example I might be able to do something actually, but it depends

frank elbow
#

For some, like the cough/sneeze text, I'm fairly confident it's not possible without a Java mod

#

Because the Translator.getText calls for those exist only in Java

grizzled fulcrum
#

ok the only call I can find to getText using sneeze is this

#

but then I could just override IGUI_PlayerText_Sneeze/IGUI_PlayerText_SneezeMuffled and vice versa and it will work right?

#

nvm i see why I wont be able to do that

trim yacht
#

I need to fire off a sendClientCommand at the earliest point possible, but it appears to silently fail during OnCreatePlayer, OnGameStart and OnLoad. Which client side event is best suited for this?

#

This is about the best I could do, but feels hacky. Assume there is a better way?

local function requestDataOnce()
    for i = 0, getOnlinePlayers():size() - 1 do
        local player = getOnlinePlayers():get(i)
        sendClientCommand(player, "ModName", "CommandName", {})
    end
    Events.EveryOneMinute.Remove(requestDataOnce)
end
Events.EveryOneMinute.Add(requestDataOnce)
alpine scroll
#

I tried setting a zombie with setHealth(50) but not long after that the zombie gets unloaded eright in front of me. Anyone knows if there is an upper limit to zombie health?

alpine scroll
alpine scroll
#

Thank you

fleet bridge
alpine scroll
# bright fog But it made them unpushable

Just a heads up: If you manage to intercept the OnHit and do a validation check on handWeapon:getFullType()=="Base.BareHands", it will return your pushes and your stomps. However, the stomp damage is always 0.smth, meaning you can do a local dmg = math.floor(damage). If dmg == 0 means push. And if on it you add something like zombie:setAvoidDamage(true), the push will do exactly nothing. It wont even move the zombie back.

bright fog
alpine scroll
#

No no, stomp does an integer and something

#

The push does 0.83 and the stomp does 22.489 for example

#

So you can diferentiate the stomp from push by its integer

#

Technically you can kill a zombie by just pushing it

bright fog
#

That's a terrible way of doing it, the damage on zombies increases based on the missing health of the zombie or some shit like that

alpine scroll
#

On my case it worked, because I set the zombie with 10 health, but I changed how my juggernaut works

#

Now it takes 3 hits to kill it

#

However every weapon that you hit on him will break, regardless of previous condition or even if its a firearm

#

However, you can push him if you have gloves (the gloves get destroyed) or 1/4 chance to push if you dont have a glove

#

After that, if the zombie gets stomped, it adds as a hit if you have a shoe or a sock (they also get destroyed)

#

But the upside is that you can kill it with 3 pencils

bright fog
#

What ?

alpine scroll
#

Its a weird zombie, but I can spawn it on command

bright fog
#

A pencil will one shot a zombie set to only jaw stabs

alpine scroll
#

I made it so my juggernaut will die with 3 hits, but will take away whatever you use to hit it

#

Let me show the code

bright fog
#

Yes I understood that

alpine scroll
bright fog
#

But a pencil WILL one shot a zombie unless you set it to not take any damage

alpine scroll
#

It always get set as dont take damage

bright fog
#

change

elseif dmg > 0 then

to

else
alpine scroll
#

Oh yea, that will be better

bright fog
#

👌

alpine scroll
#

Its just that I did the stomping check first

#

And then I realized that dmg==0 means push

#

So I just backtracked and added the other check

#

But it works

bright fog
#

What does getZiD give out?

alpine scroll
#

getOnlineID

bright fog
#

I don't suggest using that

alpine scroll
#

the getZid checks if its singleplayer

#

to return getOnlineID

bright fog
#

@sour island getOnlineID gets shuffled around too like IsoZombie ?

alpine scroll
#

I mean, this mod is mostly for people to spawn things on me when I do online stuff

bright fog
#

Also your custom zombie looks like it could be implemented with my framework. Haven't done the guide yet for that tho

#

Also I've yet to add a spawn tool for zombies

alpine scroll
#

I am using createhorde2

bright fog
#

yea yea

alpine scroll
#

For most of things

bright fog
#

That I know

#

That's not what I meant

#

My framework allows modders to add custom zombie types that are compatible with other addons

alpine scroll
#

Oh I see

bright fog
#

Also if you want to know the issue with getOnlineID is that it's probably not persistent

alpine scroll
#

Its not

#

If it gets unloaded it returns as a regular zombie

bright fog
#

Exactly

alpine scroll
#

I could treat them as dead players

bright fog
#

Use the persistent outfit ID instead

bright fog
#

We already developed something with Chuck to have persistent zombie IDs

alpine scroll
#

What is persistent outfit Id? Like every spiffo will be the zombietype for example?

bright fog
#

It's a not completely but enough unique ID given to every zombies

#

Not unique bcs technically the game can roll the same ID for 2 zombies but it's like 1/1000 chance per outfit so it's like way way more unlikely to happen than you think or some shit like that

#

And it's how I make sure my zombies have persistent zombie types attributed to them

alpine scroll
#

I see

bright fog
#

(sent it twice, I'm so tired lol)

alpine scroll
#

I think in my case specifically it will wokr, but as something standalone so everyone can use your approach is better

#

Because in my case, these zombies will spawn with a specific hp, triggered by chat

#

And mostly I do try to end whatever chat sends me before moving on

bright fog
#

Yea I see

alpine scroll
#

But yea, in case I die and the zombies unload and reload, there will be no more challenge zombie

bright fog
#

Yeah

alpine scroll
#

Also, just as a weird question

#

Does it matter if it is a dedicated server and not a local save?

bright fog
#

On which aspect ?

alpine scroll
#

Because in my case, I only play on a self hosted but dedicated server

#

Would these ID's also load correctly, considering its the client that handles the zombie code?

ancient grail
bright fog
#

Yes

bright fog
ancient grail
#

Check the id
If it says 0 or -1 then its only local

bright fog
#

Don't ask me why they synced this shit, I'm just happy about it

ancient grail
#

And hi @alpine scroll

alpine scroll
#

Hello @ancient grail ! Long time no see

#

My rcon mod now deals with special zombies

ancient grail
alpine scroll
#

So people can pick their skin and make the zombie run after me

ancient grail
#

You might want to try using a different on how you spawn the zed if you want them to still be there after death

alpine scroll
#

I made a full "gambling" system with channel points, that once you spawn a zombie with that skin, you can select it later, even made a github page that shows every skin with a little screenshot

ancient grail
#

Thats nice
I bet your audience loves it

alpine scroll
#

Yep

ancient grail
#

And each outfit has different stats

alpine scroll
#

Nah, just what they drop, really

#

But I'll allow people to spawn their zombie as a special one, somehow

#

Not sure how to balance yet, since people can simply send 100 zombies around me

ancient grail
#

Omg thats insane

alpine scroll
#

Anyway, the real test will be on tonight stream. And I'll see if it will work or not haha

worthy pawn
#

I'm about 3 hours into going in circles.

I'm trying to make custom zombie outfits, or change vanilla outfits that spawn, specifically Survivalist-Survivalist03.

I have created a clothing.xml in custommodnamehere/media/clothing/clothing.xml

I've specifically added a Survivalist04, and it does not show on the Horde spawn outfit, nor does changing any of the other zombies gear have any effect. Any thoughts or pointers for mods that may already alter vanilla that I could use for reference.

Thanks

hollow lodge
#

are there any relevant logos inside the game? like truck/factory

drowsy quest
#

I'm trying to insert the 3d model of an item but the icon image is used when placing the item

flint gyro
bright fog
flint gyro
bright fog
#

Currently every infected types spawn right at the start

flint gyro
#

Thats cool. I will definitely have to try this out

bright fog
#

Amazing :D

#

Evolution is something I will try to think about to work on in the coming weeks

#

It was a feature in the older version but I have put it on the side for now

flint gyro
#

I wonder how you could make that work. That seems really hard to do

bright fog
#

That's a technical challenge and I love technical challenges haha

flint gyro
#

That’s cool. Can’t wait to see how this mod turns out!

bright fog
#

I have a bunch of stuff planned !

#

Check the Trello !

flint gyro
#

Alright!

#

Thats so cool

alpine scroll
#

Not only the ones you are adding. Every item you are using need a entry at fileguidTable afaik

flint gyro
#

Because if they do, and there is an option to make them blind I believe. Would you be able to make an option for the clickers to be blind that way? (Im talking out my ass but just giving ideas)

#

Idk if you have tried that but I saw that was something you were gonna try to figure out on the trello

bright fog
#

I know it's doable

#

Not yet done however

flint gyro
#

Well I wish you luck

abstract cairn
#

does get steam ID work in singleplayer worlds or no

#

cause im getting an error

worthy pawn
waxen yew
#

been trying to write a mod that, on character death, randomly picks an .mp3 file out of a folder and plays it

I don't know how to code anything but I tried working it out with chatGPT (don't laugh), but it's not working and I'm obviously not sure what's going wrong

anyone interested in giving advice? seems like it should be a pretty simple mod to me

thick karma
#

Events.OnPlayerDeath.Add(YourModule.playSoundEffect)

livid badger
#

Guys hello, can someone help?

server/Items/PZ_UAZL-Items.lua

PZ_UAZL = PZ_UAZL or {}

function PZ_UAZL.getItems(rarity)
    rarity = rarity or 3
    local items = {
        {"Base.BathTowel", rarity},
        {"Base.BathTowelWet", rarity},
        {"Base.Bleach", rarity},
        {"Base.Broom", rarity},
        {"Base.CleaningLiquid", rarity},
        {"Base.DishCloth", rarity},
        {"Base.DishClothWet", rarity},
        {"Base.Mop", rarity},
        {"Base.Soap", rarity},
        {"Base.Soap2", rarity},
        {"Base.Sponge", rarity},
    }
    return items
end

server/Items/PZ_UAZL-Distributions.lua

require 'PZ_UAZL-Items';

-- ...
        inventoryfemale = {
            items = PZ_UAZL.getItems(LootRarity.Common)
        },
-- ...

however PZ_UAZL.getItems is nil

tell me where I made a mistake

waxen yew
#

I think the script I have so far does cover that:


DeathMusicMod.songs = {}
DeathMusicMod.songFolder = "C:\\Users\\eliza\\Zomboid\\mods\\DeathMusicMod\\media\\death_songs"

function DeathMusicMod.loadSongs()
    local dir = getFileReader(DeathMusicMod.songFolder, true)
    if dir then
        local fileTable = dir:readAll()
        for _, file in ipairs(fileTable) do
            if string.match(file, "%.mp3$") or string.match(file, "%.wav$") then
                table.insert(DeathMusicMod.songs, DeathMusicMod.songFolder .. "\\" .. file)
            end
        end
        dir:close()
    else
        print("DeathMusicMod: Folder does not exist: " .. DeathMusicMod.songFolder)
    end
end

function DeathMusicMod.playRandomSong()
    if #DeathMusicMod.songs == 0 then
        DeathMusicMod.loadSongs()
    end
    if #DeathMusicMod.songs > 0 then
        local song = DeathMusicMod.songs[ZombRand(#DeathMusicMod.songs) + 1]
        getSoundManager():PlaySound(song, false, 0)
    else
        print("DeathMusicMod: No songs found in folder: " .. DeathMusicMod.songFolder)
    end
end

Events.OnPlayerDeath.Add(DeathMusicMod.playRandomSong)```
midnight prism
#

wait

#

project zomboid is lua-based game?

#

never knew

thick karma
#

Lua-modded, Java-based.

midnight prism
#

i think my roblox developing skills might be handy here

midnight prism
thick karma
#

I mean it's written in Java, and it has a Java-based implementation of Lua called Kahlua, but we mod the game by writing Lua.

#

Some also mod the Java but it's not as user-friendly so most people stay away from it.

#

Harder to switch between servers casually with the Java-modding in this game, because you have to overwrite base files. Unless the Java mod is something you always want on every server everywhere you play, it becomes potentially complex to manage Java modding in PZ. More so than Lua modding, at least.

waxen yew
#

I could post the error message I get from errorMagnifier if that would help?

thick karma
#

Posting your whole console.txt might help more.

#

But sure

#

Try the magnifier message first

waxen yew
#

Callframe at: getFileReader function: loadSongs -- file: DeathMusic.lua line # 7 | MOD: DeathMusicMod function: playRandomSong -- file: DeathMusic.lua line # 23 | MOD: DeathMusicMod

#

there are a bunch of them and I didn't want to have to pick just one of them, basically

#

so I know the game must be able to play a song when you die, somehow

#

I just want it to pick that song randomly

thick karma
#

I would recommend you work from Jumper, a mod written for Zomboid by a human. If you do everything like it does, I can guarantee it'll work. If you deviate on the advice of ChatGPT, I can make no such guarantees.

waxen yew
#

alright I'll give that a try :) thank you

thick karma
#

There's a sound object you create

#

And it is associated with many random sounds

#

And it pulls them at random if you call the right game function

#

And the .oggs are in one of the directories of the mod folder; you can see how they're relatively referenced in the scripts.

#

Although I guess you'll want to find a way to localize that sound. That I'm not sure about.

#

In Jumper, I actually want other people to hear the sound, so I play it off the player object.

#

player:playSound("Rifting") picks one of 14 sounds associated with that definition here:

sound Rifting
    {
        category = Player,
        clip
        {
            file = media/sound/jump1.ogg,
        }
        clip
        {
            file = media/sound/jump2.ogg,
        }
        clip
        {
            file = media/sound/jump3.ogg,
        }
        clip
        {
            file = media/sound/jump4.ogg,
        }
        clip
        {
            file = media/sound/jump5.ogg,
        }
        clip
        {
            file = media/sound/jump6.ogg,
        }
        clip
        {
            file = media/sound/jump7.ogg,
        }
        clip
        {
            file = media/sound/jump8.ogg,
        }
        clip
        {
            file = media/sound/jump9.ogg,
        }
        clip
        {
            file = media/sound/jump10.ogg,
        }
        clip
        {
            file = media/sound/jump11.ogg,
        }
        clip
        {
            file = media/sound/jump12.ogg,
        }
        clip
        {
            file = media/sound/jump13.ogg,
        }
        clip
        {
            file = media/sound/jump14.ogg,
        }
    }
#

But that would be audible to other nearby players.

#

So you'll probably want to find a different way to activate the sound.

#

For SP this would be fine, though. For MP, you'd probably want something else.

waxen yew
#

ok so I looked into the actual mod I posted the link to and it's not even a lua file, just a .txt script

{
    sound PlayerDied
    {
        category = Player,
        clip
        {
            file = media/sound/myway.wav,
        }
    }
}```
#

would it be possible to write a similar script that does the thing I want?

livid badger
#

Guys, maybe you can answer my question?))

midnight prism
thick karma
# livid badger Guys, maybe you can answer my question?))

Not everyone will know the answer to everything; gotta hang in there until someone sees your issue who knows what to do and has time to explain.

If you want to ask again, you should reply to your own original message so they can quickly click it to go read what you were asking about.

alpine scroll
crisp fossil
#

hey guys, I tried to create my own model and attached it to Bip01 and it disappeared. Did I miss a step? I'm new to blender

worthy pawn
alpine scroll
#

You changed the guid, right?

worthy pawn
#

I did, I made the "survivor04" have a seperate GUID that was unique for both male and female

alpine scroll
#

For the items in fileguid

worthy pawn
#

I kept the same GUID on those items as they are just vanilla items and not reskins or anything.

alpine scroll
#

So, I may be wrong, but I think you may need to generate an unique guid for those items. Just as a test, can you still find the items when you try to spawn them in admin?

#

When I tried to keep one day it just bugged out a lot of items

#

AFAIK they need to be unique

#

But I am not the one most experienced with clothing

#

I just do unique guid when I need them and it works

worthy pawn
#

Yeah, those items still exist in game, So if I copied Survivalist02, renamed it to survivalist04. Generated a unique GUID for that "outfit", and kept the rest of the GUID items the same as they are vanilla items it would not work. I would have to make unique GUID for each item even though vanilla.

I would expect the Survivalist04 to atleast show up in game, but it does not, not even a naked one.

alpine scroll
#

Oh, I see

#

Sorry

#

I thought you were spawning it and it was with the wrong clothing

#

I've misread

worthy pawn
#

Yeah, I'm just trying to essentially a learning practice learn how to expand the gear that the random Survivalist encounter has.

alpine scroll
#

Is your clothing.xml like this : <m_MaleOutfits> <m_Name>OutfitPlagueMask</m_Name> <m_Guid>6be791e4-3292-485e-9192-8498c10a9688</m_Guid> <m_Pants>false</m_Pants> <m_AllowPantsHue>false</m_AllowPantsHue> <m_items> <itemGUID>ffafc42b-ecea-4a0b-8425-5a4e6063d189</itemGUID> </m_items> <m_items> <itemGUID>217d1ff0-d498-4a4e-9a89-08a7e01a42ff</itemGUID> </m_items> </m_MaleOutfits>

worthy pawn
#
    <m_FemaleOutfits>
        <m_Name>Survivalist04</m_Name>
        <m_Guid>9049965e-3d83-4fb9-bf2b-51bf16d20c56</m_Guid>
        <m_AllowPantsHue>false</m_AllowPantsHue>
        <m_items>
            <itemGUID>ebea15c8-99b3-4e20-905b-d22cf82b8217</itemGUID>
        </m_items>
        <m_items>
            <itemGUID>6fed6e2b-3a72-4bac-aac5-09585984493d</itemGUID>
            <subItems>
                <itemGUID>227cb2d5-05a5-44ed-872d-ac4ca16e80bc</itemGUID>
            </subItems>
            <subItems>
                <itemGUID>09bc4da2-6038-4575-985b-c27b8dbfef6c</itemGUID>
            </subItems>
        </m_items>
        <m_items>
            <probability>0.3</probability>
            <itemGUID>7b339ad5-da2e-42a5-8a51-ee87239a943c</itemGUID>
            <subItems>
                <itemGUID>061cfa05-c6e2-4dcd-8737-ab7af41e0750</itemGUID>
            </subItems>
        </m_items>
        <m_items>
            <probability>0.1</probability>
            <itemGUID>6d702d88-4ca0-4bcb-9aee-d88f2be29e69</itemGUID>
            <subItems>
                <itemGUID>9df22d1f-96cd-4d2c-88f2-4e7423d93649</itemGUID>
            </subItems>
        </m_items>
        <m_items>
            <itemGUID>623c97c5-49f2-4763-bafb-549a881d6495</itemGUID>
            <subItems>
                <itemGUID>51851e1a-3c3d-473d-8894-8cde0770b645</itemGUID>
            </subItems>
            <subItems>
                <itemGUID>5574c07e-1381-49d8-a0ba-40e5b2cf55cd</itemGUID>
            </subItems>
            <subItems>
                <itemGUID>7a5f7b89-9de9-4c05-afb6-e62dca97b8a2</itemGUID>
            </subItems>
        </m_items>
        <m_items>
            <itemGUID>c2d9211a-a0c5-475d-8fa6-681a8b809f26</itemGUID> <!--Military Duffel-->
            <subItems>
                <itemGUID>02d3217-b692-4035-8a61-8c4305998464</itemGUID> <!--Survivor Bag-->
            </subItems>
        </m_items>
</m_FemaleOutfits>```
alpine scroll
#

Just to make sure, the items you are using are all clothing, correct?

#

Not something like knives or smth

worthy pawn
#

Yes, all clothing, except for the Duffel bag and Survivor bag (which are already on the vanilla model).

alpine scroll
#

That are weareable, so its ok

worthy pawn
#

I do know the mod is working as I have tweaked some items spawns and those are showing up in containers, so the mod is active and working in that aspect.

alpine scroll
#

maybe the file is in the wrong place?

#

Is it inside \media\clothing.xml or \media\clothing\clothing.xml?

humble roost
#

yippee i got my first mod working in like 10 minutes

#

now to do the hard part where the mod does stuff

worthy pawn
alpine scroll
#

hahaha

#

Welcome to modding

worthy pawn
#

Must've not been holding my mouth right.

#

Now how to figure out how to add it to the random zombie spawning pool.

alpine scroll
#

You can check how AuthenticZ does

humble roost
#

i have an idea where all water sources start filling bottles and stuff with "tainted water" after a certain day threshold, how feasible is that?

#

itd be like water but with some negative and positive effects when drunk

#

drunken? drinked?

#

who knows

alpine scroll
#

I mean, possible it is

#

But you may need to study vanilla code to see how it works

#

And then override it with your mod

humble roost
#

alright

#

im pretty fluent in lua shouldnt be too hard

alpine scroll
#

Just remember that whatever you change, it may generate incompatibilities with other mods

#

For example, that 'snow is water' mod

fleet bridge
#

anyone know how to get symbols to persist when you zoom out of the world map?

hollow lodge
hollow lodge
#

Which is borrowed fron the scrap armor mod

hollow lodge
placid roost
#

Could anyone point me in the right direction for some resources? I'm trying to make a small mod with just some little collectibles I've modeled in Blender, but I think everything I've found on my own has been for older builds or something because my items don't appear to be spawning and I can't bring them up in debug either.

They don't need to do anything special, just exist as little decorative plushies that can be found and placed.

#

I've spent a good chunk of the day fiddling with it, but can't get it to work at all.

Models are made, exported as .fbx, textures look like they're in the right place, made a .txt. file to define the items, and a .lua file to add them into distribution, but no go.

Kind of losing it. lmao

hollow lodge
#

have you got everything on the fileguidtable.xml? the guid code for each item

#

if not sure, try reverse ingeneering another mod with similar characteristics

placid roost
#

I know the normals being inside out would cause it to be invisible, right? But would it prevent it from like...existing?

And no, I haven't done anything with an .xml file..I think the guide I'd found was old or something. lol

hollow lodge
#

look for the fileguidtable.xml in the game folders, there's the structure for yours

#

it basically cites the .xml files for your items

eternal sleet
#

Hey all! Would anyone be able to possibly point me in the right direction of learning how to mod my simself into PZ? What im looking to do is basically find a way to where i can mod my simself into a custom clothing item like shoes so that i would be able to craft it in game and just wear it like a normal clothing item overtop my PZ character. Idk if this makes any sense at all but if you have any pointers id greatly appreciate it! Ive heard it can be done but i am struggling to find any specific tutorials on this. Thanks!

hollow lodge
# eternal sleet Hey all! Would anyone be able to possibly point me in the right direction of lea...

1:11 Step 1 - Know your file locations
4:06 Step 2 - Storyboard your ideas out
9:03 Step 3 - Get your files from the game or other mods
11:47 Step 4 - Build your mod files
1:01:54 Step 5 - Create the textures (mislabeled in the video, oops)
1:19:45 Step 6 - Put your mod files in the right structure
1:30:37 Step 7 - Test your mod (please back up ...

▶ Play video
#

there are some videos arround on youtube, once you get to know the specific terms/topics you can search in ths forum, probably somebody asked before

eternal sleet
#

ahhh thatnk you so much!!! I appreciate it!!

#

thank you***

hollow lodge
#

there's a dedicated guide for clothing mods

#

In a steam page iirc

#

good luck

ancient grail
#

I think authentic peach has more indepth guides

eternal sleet
#

Thank you all so much!!! Im definitely looking forward to checking these out!!

slow hound
#

Hi. Long time since you posted. I was thinking about working on something similar. Any chance you have a repo setup with it I could work with and can credit you if/when i ever finish? I would also happily add you as a coauthor on steam if or when i finish, or potentially just work from a repo together if after all this time you were still interested. great idea btw

#

going to ask every once in awhile to see if anyone knows...? I'm trying to figure out a way to set sprite property value and after setting, reinitialize the sprite property value of the isobject with the updated values so it can change the property on the fly. I am even considering outside of the box strategies as well

#

if anyone has even the slightest potential insight into it. i'm making some headway but running into quite a few issues. also trying to determine what specifically this does

transmitUpdatedSpriteToServer()
tough peak
#

Hello! I added costume items without any distribution lua file in the multiplayer server. But, there are zombies wearing some costumes.
I guess.. it is related of clothing.xml (outfitManager). Because that costumes listed on clothing.xml.
Whether I'm right or not, how can I fix it so that zombies from costume items don't come out?

smoky rivet
#

Hi Everyone! I'm reaching out you to ask for your expertise on Zomboid modding. I've been working on a crazy project: "Running zomboid on Android" I tried several approaches main one using Linux Distro virtualization to run it. It works for older version but not for new one. So i switch to Windows/Linux emulator in particular is Winlator as it proven to be very capable of running other games. But with Zomboid I encounter an issue that might be related to network or UUID. It's nothing major, it can be fix with java source editing. but I'm having tough time recompiling the code. So it anyone has any interest in this project please reach out to me. Thank you for you attention!

thick karma
#

Better have a nice phone.

smoky rivet
smoky rivet
hollow current
ancient grail
#

we might drive in traffic for the game,, but question,, wouldnt be like piracy? or is still linked to steam?

smoky rivet
#

So, what cames to Zomboid it should run fine if you have around 6-8 gb but before that I need to run it, and unfortunately I get an error

#

If i understand it correct error is related to a network interface that it using GameProfiler durring init, and but fixing that it should work in theory but im having troules recompiling decompiled files😅

#

any ideas?

fleet bridge
#

anyone know how to use scriptmanager to remove evolved recipes?

placid roost
# placid roost I know the normals being inside out would cause it to be invisible, right? But w...

Is the .xml thing necessary for non-clothing items?
The guide I'm looking at specifies that clothing items need a GUID and all that, but I'm just making little static decor things to collect, and I'm looking at the Blahaj mod and it looks like I have everything set up the same way (and I'm not seeing an xml file in its folders or anything of the sort), but my items aren't showing up in debug mode to add to my inventory, nor do they seem to be spawning in the tables I added them to.

vestal gyro
#

xml files are mostly for clothing items

#

you wont need it for other items

placid roost
#

Okay, that's what I had thought.

#

That said, I have -no- idea why my items aren't working. lmao

#

I guess I'll make a post on the forums. Way too much to do in Discord I feel. lol

warped valve
#

I'm having an issue with updating an ISUI label. Whenever I use setName() to update some text, it renders the old text along with the new text. Any ideas as to what's causing this?

#

I'll send pics of it in a sec

warped valve
#

🤦‍♂️

#

(I previously spent 30-60 minutes trying to figure this out)

velvet forge
#

Hello, I'm new to pz, and I'm creating a mod and I wanted to know what command I use to know the current level of a skill

abstract cairn
#

does anyone know if the getsteamID function for IsoPlayer only works on multiplayer sessions or no?

#

throws me an error

thick karma
#

But this only works on Steam fyi so no compat with -nosteam mode.

#

Fair warning regarding any plans you have

#

I wouldn't recommend doing this but if wielder is a player you want wielder:getSteamID()

abstract cairn
#

wielder is an IsoGameCharacter

thick karma
#

You don't get a player object by typing .IsoLivingCharacter.IsoPlayer that's just the chain of Java extension.

thick karma
abstract cairn
#

I got an error last time I did that though

thick karma
#

(In Steam MP)

abstract cairn
#

which is why I changed it

#

but ill try again- okay

#

so it does have to be

#

in a hosted lobby

bronze yoke
#

so technically there is no such thing as an IsoGameCharacter because it is an abstract class

#

your IsoGameCharacter is really any non-abstract class that inherits from it

#

it could be an IsoPlayer, an IsoZombie, etc

abstract cairn
thick karma
#

Maybe

#

Not sure

#

I have never tried using Steam IDs tbh

#

I am all about compatibility

#

When I find out a solution is gonna cut out X% of my potential players, I try to look around for a better one.

abstract cairn
#

sadly most of the data i need to save is through cross-sessions and since its going to be definitely on my server i dont want to have skill journals or XP recovery be a problem (aka I dont want people to be able to respawn with a new character and be able to hard grind it over n over plus this is just for server logs tbh) ¯_(ツ)_/¯

thick karma
#

Well

#

So you want to track specific long-term players on your server?

#

Even between deaths?

abstract cairn
#

yes

thick karma
#

That's tricky. I guess Steam ID best bet.

#

Not sure.

abstract cairn
#

to my knowledge it is

#

but im also stupid

#

so like

#

lmao

#

no errors in a hosted lobby

#

rip testing it easily

gleaming sorrel
#

I've come up with an idea for a zombie apocalypse that I'm wondering whether or not it's possible to implement

I had the idea of a Lovecraftian creature sending down its thousands of arms from space to grab people by the face and taking control of their mind

I COULD just have 2 hands appear on their face
But I had the idea of having an arm extend from the hand
And reach up in the sky
The part I don't know if it's possible
Having rubbery physics so the arms will realistically wrap into building
And around windows as the assimilated people chase you

grizzled fulcrum
neon bronze
#

yea you would have to do through username, since there is a tiny minority that probably plays on the gog copy so no steamID would be provided for them

weary knoll
sour island
weary knoll
verbal yew
thick karma
grizzled fulcrum
#

Oh I see like user-unique

red tiger
#

I'm addicted to modding again..

#

Only the best kind of addiction. =)

jaunty glen
crisp fossil
#

is it possible to override only one function in a TimedAction of another mod?

dry chasm
crisp fossil
#

it does not return anything but all the functions are not local. I only want to change the perform function

dry chasm
#

Sorry, should've clarified, the return thing should be at the bottom of the file not the function in case it's a module.
But yeah, do you intend to change it for all cases this action is used, or for a specific time you use this action? (like for your own situation itself, instead of existing uses)

crisp fossil
#

also no return at the bottom. I just want to add an extra calculation which is found on the perform function. I don't need to pass it on the new because its a static value

dry chasm
# crisp fossil also no return at the bottom. I just want to add an extra calculation which is f...

So I assume for all cases that the timed action is used.
In which case you can do something along the lines of:

local original = TheTimedActionVariable.perform;
-- if the original is defined with a colon (:) instead of a dot (.) then do the same here.
function TheTimedActionVariable:perform(...) -- include all args the original has
  original(self, ...) -- include all args the original has!
  -- only include the "self" one in case it uses a colon prior to perform instead of a dot
  -- If it can be done, it's best practice to run the original either before, or after yours!
  -- if not, it might cause issues with other mods that utilize this, or depend on the original in some way
  
  -- Your additions here
end

as an example

#

if you cannot have the original method run no matter what because it'd ruin what you plan to do, ideally give your file name an exclamation mark at the beginning I believe to ensure it loads (ideally) before other mod-files, so other mod's additions won't be thrown away, incase any do.

crisp fossil
#

Ohh I see, I never thought of that. Thanks a lot, also for the additional tip, I'll keep it in mind

placid roost
#

I was wondering if anyone could take a look at this post I made on the forum that explains what I'm running into more thoroughly. First time modding this game and using lua, so I'm sure it's something silly I've overlooked.

https://theindiestone.com/forums/index.php?/topic/71255-help-with-a-collectible-item-mod/

The Indie Stone Forums

Okay, so - I'm working on my first mod for PZ mostly to get in a little practice making low-poly models in Blender. My girlfriend and I love a lot of the mods that add collectible items like the Blahaj plushes, the extra rubber duckies, body pillows, etc... So, that's what I'm shooting for - just...

vestal gyro
#

does one need that when making an own module

#

always just did module Base lol

gleaming sorrel
placid roost
vestal gyro
#

Atleast I think so

placid roost
#

Oh okay so the .fbx is no longer supported?

vestal gyro
#

Im not sure but every other mod I have seen the files of used the .X files, for example britas and their weapon models

placid roost
#

Okay gotcha. I'll make that change as well. :3

vestal gyro
#

Ah ok so I think the main reason its not working is that you defined 'Texture' in the items.txt when that is not really valid, I don't think the vanilla items do that at all, all you need is the other file where you are defining the meshes

placid roost
#

Oh so I'll need the model in there separately for each even though they use the same mesh and uv layout? I think I see what you mean.

vestal gyro
#

Idk if its nitpicking at this point but I think only having .1 as weight instead of 0.1 might also cause issues

red tiger
slow hound
#

make life so much easier

eternal sleet
#

okay soooo im back again, ive learned how to rig the bones to the female pz base, im wondering if i can just do the exact same thing with my 3d simself model?? I know the pz model is an .fbx file and she is a .collada file and i tried just exporting her into an .fbx but found out that didnt work (idk what im doing) to put things simply, how in the world can i just get this character in my game? I feel like every tutorial out there is for the og pz bases and not a 3d sim model. Any ideas? Thanks!

#

if any of you are familiar with DoriPie's work, this is exactly what im kind of going for.

umbral wing
#

I've been thinking about attempting work on a Washington DC map, is there any tilesets that include some of the architecture style in DC?

bright fog
fleet bridge
#

Once you get the evolved recipe name can you use DoParam to overwrite the MaxItems?

eternal sleet
bright fog
#

I'm not familiar with custom models like these. How do you set the model to be used ? Also you could look at the furry mod and how they have custom models for the player

eternal sleet
#

im not too familiar with them either this is my very first time modding but ill definitely look into the furry mod and see what i can learn from that one!

bright fog
eternal sleet
bright fog
#

Bcs it's generic stuff

#

Format is mostly just writting the model in a file but there are some differences in writting the model in them

#

But as long as you import the model in Blender or another software, it's generalized stuff, as long as the model is recognized

#

The export settings however

#

It will very unlikely you didn't export the model right

#

Either it wasn't selected, there are other objects within the Blender scene that get exported and break it or shit like that

#

Or you need to deactivate leaf bone, or uncheck this option or that option

#

Or smthg else

eternal sleet
bright fog
#

Sadly, probably not mrincredibleuncanny

#

In the case of wrong export settings at least

eternal sleet
bright fog
#

idfk lmao

#

Learning Blender a lot probably helps

mystic mica
#

Befdore I set off on an impossible job, is HTTP access possible through LUA at all or has that been disabled

#

eg just local http = require('requests') or sumn

bright fog
#

No I don't think so

mystic mica
#

must be possible for this to work right

#

had to dig a fair bit to get an instance of it being used

frank elbow
#

You can do GET requests, but that's it. Not via a 'requests' module. That mod likely opens the link (which you can also do) rather than playing ingame

#

...which seems like it's asking for someone to abuse it by sending people to whatever website someone chooses, but hopefully they at least make an attempt check the link

#

But anyway, quoting myself:

You can perform a GET request using getUrlInputStream (returns a DataInputStream on which you can call the readLine method)

mystic mica
#

that works for me, just hoping to index my youtube live chat scraper into a list. only having GET isn't an issue since I can just make a node endpoint handle it into csv's or something
edit (doh manners) thank you so much for the info

#

not an actual csv file lol, just comma seperate them ^

crystal oar
#

i am having a heck of a time getting getScriptManager():getAllRecipes() to work, any idea why? it says i got something but then when i check the length of the array it throws an error

#

i can get getScriptManager():getRecipe(item) to work just fine

frank elbow
crystal oar
frank elbow
crystal oar
#

okay word, i'll give that a try

crystal oar
tender plinth
#

Currently trying to put buildings onto my map, but when I put the files into the zomboid mod folder, it dont show ingame

#

My map and everything works but the buildings I put down dont show

versed helm
#

Is there anyone here that would potentially make a variant of a mod for me for a video?

#

will provide them with some $

nocturne swift
#

Hi! Why the character is given experience in Woodwork ? I do not need it

    recipe Create pallet log
    {
        Log,
        HCWoodenpallet,
        Result:HTpalletLogs,
        RemoveResultItem:true,
        CanBeDoneFromFloor:true,
        OnCreate:Recipe.OnCreate.HTCreatePallet,
        Time:10,
    }
function Recipe.OnCreate.HTCreatePallet(items, result, player)
    local pallet = player:getInventory():AddItem("Base.HTpalletLogs");
    pallet:setDelta(0.02);
end
LOG  : General     , 1716364840459> 93а139а099> unBoostXP: Woodwork xp:1
   exerciseMultiplier: 1*1= 1
   traitMultiplier: 1*1= 1
   sandboxMultiplier: 0.5*1= 0.5
   xpBoostMultiplier: 0.25*0.5= 0.125
   skillBookMultiplier: 1*0.125= 0.125
Woodwork to be recorded: 0.125.
nocturne swift
#

By brute force, I found out that if the recipe uses Base.Log (Log), then experience in Woodwork is given, I don’t know how to change this...

mystic mica
#

i mean a temp fix could just be logging xp before & after and then taking off the difference

#

but if the xp is given as a game mechanic for using Base.log then I think you'd be hard pushed to stop it w/o changing the recipe

stable yew
#

Any particular popular minivan in US - KY should I add to pack?

frank elbow
tender plinth
#

figured it out

thick karma
bright fog
#

Instead

fresh bramble
#

Im honestly waiting for someone to make a pope hammer melee

#

eventually it will happen

thick karma
sour island
thick karma
#

Thanks he pinged me there

placid roost
timber nexus
#

Alright, gonna come back now that it's been a few days and poke my head in to ask for help figuring out why the mod edits that I made to this ATM For Server Economy mod cause my game to just... not work any more. As far as I can tell, I did exactly what had already been done. All I did was added more items to the lines, and when I load the game with the mod enabled (even if it's the only mod enabled), the game's menu no longer loads properly. No buttons, just the background and music. The console.txt also only shows that it loaded my mod, and then nothing else past it. No errors of anything. I do still have a copy of the mod on hand that I can share for others to download and look at to see if something I did was actually wrong.

thick karma
timber nexus
thick karma
#

Well generally there will be a stack trace in console.txt after this happens if an error is indeed the issue. Otherwise the end of the console log should have information about why the game stopped moving forward when it did.

#

I would trigger the error, close PZ, and post console.txt here

#

@timber nexus

timber nexus
thick karma
#

Order of operations. Clearly the part of your code that triggers failure is loaded after main menu background is loaded.

timber nexus
#

Yeah, another thinig that happens is if I load the mod after launching the game (so the first time I enable the mod) it still hangs, but it's stuck on the 'reloading lua' step. The game just never moves from being frozen here, and I have to force close it. Then when I open it again I get the main menu issue.

#

There is no stack trace at all. It just ends with "SebAutomaticEconomyTraderTest overrides [file]" several times, then "translator: language is EN", and hangs.

#

My original edits included a different version of the ATM mod that already had some stuff from VFE and a couple of its addons. I feel so bad that the changes I made to it had to be trashed because of all of this, and I didn't back any of those changes up before I wiped them so every single weapon/ammo/magazine/etc addition that I had made will have to be done fresh all over again, once we figure out why simply changing what the ATM cash exchange accepts for its recipes causes these hangs.

#

This is the mod, if you'd like to download it and look through the files to see what I might have done wrong. It's just some edits to the base ATM For Server Ecenomy mod, the original one.

#

@thick karma

thick karma
#

Your original post didn't include most of the info someone would need to give you an answer

#

The more specifically you ask your question and the easier you make it for people to see what they need to see to answer it, the likelier someone passing by will answer in their free time.

#

On that topic, strongly recommend using .zip instead of .7z. I use 7-zip but not everyone does.

timber nexus
#

Up to this point it was just for personal archival. I can easily swap it to a .zip file for better access.

thick karma
#

Yeah again just saying that because the easier it is for people to look at what you share, the more likely they will

#

Which file did you change from the original version of this zip? Or did you change lots of files?

timber nexus
#

As far as I recall, the AutomaticEconomyTrader.txt to add more tiers and items to the money exchange recipes, and the Recipes_EN.txt file in lua\shared\Translate\EN to see if maybe matching the names I put for the recipes in the first file to the second file was my issue. Though that didn't make a difference at all, as far as I can tell.

#

Though as far as those changes go which are far more intrusive(?) than my intial attempts, even just adding items to what is already there without changing any names for recipes caused the same hanging issues previously. My very first attempt was just running through the other mods to find the item names for their items, and adding them to the list in the vendors files. I didn't originally change the names of the recipes or anything like that.

#

I could at the very least do some very menial edits to the original ATM mod's files that I had tried to do before to see if it gives me a different error. I hadn't actually tried to make the changes into a separate mod previously, I just changed the files in the actual steam\workshop location, directly.

thick karma
# timber nexus I could at the very least do some very menial edits to the original ATM mod's fi...

Wouldn't recommend editing anything there. I would recommend the following steps:

  1. Duplicate the folder(s) in the mods folder of the (unedited) original in steamapps/workshop.
  2. Change mod ID and name in mod.info of that/those mod folder(s) and put them in %UserProfile%/Zomboid/mods (for local testing).
  3. Launch Zomboid and enable your newly named carbon copy of the original to make sure it still works. (If it doesn't, make sure it's even safe to enable the original mod in main menu; it does seem to be an explicitly MP mod.)
  4. Make changes 1 at a time and reload Lua after every change.
  5. When reloading Lua fails, share exactly the lines you changed when the failure was triggered; include what they looked like before and after.
timber nexus
thick karma
#

No, it means if you're changing a list of items in a bunch of recipes, just change that list in exactly 1 recipe and reload to see if you're actually changing said lists correctly at all.

timber nexus
#

Ah, alright. So change just what exchanges for $1, load to see if it errors, repeat.

thick karma
#

In general, don't make a wide variety of changes to many places at once between tests if you are not very good at programming.

#

Correct.

#

If the way you're changing it doesn't work for 1 recipe, it surely won't work for 20.

timber nexus
#

That's a very good point... I guess I was just really hoping that copying what I had seen in the files already would work but clearly that's not the case.

#

Thank you for taking the time to help run me through this. In like, two weeks this is the first real assistances I've gotten on the issue.

#

Though as you mentioned maybe I didn't give very good information for my issue in the first place. This was my original post; #mod_development message

#

Someone in the PZ Modding discord just caught that I had somehow forgotten to close some of the recipes with }. I have no clue how I managed that, seeing as I had everything from bracket to bracket copy pasted while making edits, but I'm sure that definitely didn't help.

#

Okay! Looks like the change I made translated over properly this time, and that includes the change to the name of the recipe itself. That's a really hopeful sign.

thick karma
timber nexus
#

Alright. I ran into the menu bug again with the addition of a unique recipe line. I remember it throwing these errors based on the Furry Survivors mod that I have, but disabling the mod made the menu work again but mods didn't load entirely still. Only like, 2 of the dispensers actually show up in the debug menu when this happens and the recipes are all wrong. No clue what the issue is, unless maybe it's got something to do with me needing to make a new line in the translation file if I add a new recipe? I can still send the command.txt here for you if you'd like.

thick karma
#

FYI, if you're only trying to overwrite recipes (and not Lua code) in that mod, you can probably just require the original mod and then include the changed script files (with exactly the same names in exactly the same places) and your new scripts should overwrite the old ones.

timber nexus
thick karma
timber nexus
#
    {
        destroy Base.Necklace_Choker=2/Base.BowTieFull=2/Base.BowTieWorn=2/Base.Tie_Full=2/Base.Tie_Worn=2/Base.Necklace_Crucifix=2/Base.Necklace_YinYang=2,
        keep MoneyDispenser,
        
        Result:Money=1,
        CanBeDoneFromFloor:true,
        Category:Money,
        Time:1,
        OnTest:Change_All_For_Money_OnTest,
    }```

It is possible that I don't have that syntaxed properly? I'm going entirely off fo what I've seen already done in other mods that do work. Haven't had a lot of success with google or looking through mod comments for how to do this, and with you being the first actual help I've really gotten a lot of this has just been me flying blind.

I am trying to make it so that the recipe requires 2 of these items.
thick karma
timber nexus
#

All of the mods that I have enabled work together perfectly fine before I introduce any of the edits to the base vendor mod.

thick karma
#

Or did you create this brand new recipe entirely?

timber nexus
thick karma
#

I see, when you said you added a recipe "line" I thought you meant 1 line was added to the script file.

timber nexus
#

(If it isn't apparent by me not knowing how to do just the background on the thing there without dedicating an entire line to it.)

#

Oh, I think I know what you meant by that. One sec.

#

This is 111 through 118

    local desc = MainScreen.instance.desc;
    local furClothingName = FurManager.determineFurClothingName(desc:isFemale(), self.speciesName);
    local furClothing = InventoryItemFactory.CreateItem(furClothingName);
    desc:setWornItem(furClothing:getBodyLocation(), nil);
    desc:setWornItem(furClothing:getBodyLocation(), furClothing);
    self:setAvatarFromUI();
end;```
thick karma
#

Find a file in its lua folder called character.lua

timber nexus
#

I did, that's where I got those lines from for you.

thick karma
#

Open that file in a text editor with line numbers, e.g. VS Code.

#

ohhhh

#

sorry just saw

#

I was scrolled up still

#

Okay, this line throws an error because it attempts to create an item and store it in the variable furClothing and then attempts to call getBodyLocation on furClothing under the assumption that the creation of that item based on that name works. But it doesn't work, so furClothing ends up nil, and you can't call nil:getBodyLocation()

#

Why CreateItem fails on that clothing name is not immediately obvious but that's what the error is telling you.

timber nexus
#

...but how does adding the recipe line I sent cause the game to try and call for something entirely unrelated from a mod that has nothing to do with the mod I'm making? 😵

#

And on that note, is there anything wrong with the actual recipe that I sent? Or is that actually what it would look like to create a recipe that requires 2 of each item?

thick karma
thick karma
timber nexus
#

Here's the entire console.txt so you can see. It's pretty much after everything else as far as I can tell.

dry chasm
timber nexus
#

I... might be able to skip the step of making an entirely new recipe by just adding the ones that require multiples to the initial recipe that did work without errors. Lemme try that.

ancient grail
timber nexus
#

The error only happened when I added the new recipe line, though. Everything went through fine when all I did was change the first recipe.

ancient grail
timber nexus
thick karma
#

For one reason or another I am seeing this weird error in your console:

ERROR: General     , 1716421964154> ExceptionLogger.logException> Exception thrown java.lang.NumberFormatException: For input string: "2/Base.BowTieFull" at FloatingDecimal.readJavaFormatString.
ERROR: General     , 1716421964154> DebugLogStream.printException> Stack trace:
java.lang.NumberFormatException: For input string: "2/Base.BowTieFull"

I'm not sure why it interprets 2/Base.BowTieFull as an input string, as I would expect the slash to separate the 2 from the next piece, but maybe that is the issue.

#

I am trying to find any examples of slashes being used between alternative destroyables in a vanilla recipe

#

I notice sometimes a ; is used between the item name and number in the destroy line but I am unclear why.

#

e.g.,

        destroy MuffinTray,
        [Recipe.GetItemTypes.Egg]=2,
        [Recipe.GetItemTypes.BakingFat];2,
        [Recipe.GetItemTypes.Milk];5,
        [Recipe.GetItemTypes.Sugar];5,
        [Recipe.GetItemTypes.Flour]=2,
timber nexus
#

That does sound like I'm doing multiple item requirement recipes incorrectly, then. I can definitely try replacing all of the = with ; to see if that makes a difference.

thick karma
#

The example above uses both

#

I am not sure which it needs when and why

#

That's a singular recipe though

#

Destroying multiple instances of various items in 2 different ways

timber nexus
#

I think one is # of items, and another is # of charges in a single item that has an 'amount'.

thick karma
#

Makes sense.

timber nexus
#

So that recipe would most likely be 2 Eggs, 2 charges of BakingFat, 5 charges of Milk, 5 charges of Sugar, and 2 Flour.

thick karma
#

I am not sure which is which but I would guess that egg is associated with amounts

#

Rather than charges

#

So if you're dealing in amounts I would match Egg above

timber nexus
#

I'm going to try and revert back to the stage where the initial change that I made worked and go from there.

thick karma
#

Good plan. Make 100% sure no Stack traces are already appearing in your console at character creation at that time

#

Because I am not seeing any good reason your code would make Anthro's mess up

#

And I recall seeing Anthro throw other errors in #mod_support

dry chasm
thick karma
#

So I'm not optimistic it's a perfectly bug-free mod in the first place.

thick karma
#

I am not sure if there are any vanilla recipes that use / and a specific number of items in the destroy block

#

So hard to be sure exactly what format the game would want

#

or if any would be accepted

dry chasm
#

but honesty, before I spout off again, I should shut up unless I know for sure 😅

thick karma
#

E.g. vanilla recipe has this:

#

destroy CookiesChocolateDough/CookieChocolateChipDough/CookiesOatmealDough/CookiesSugarDough/CookiesShortbreadDough,

#

But again no = anything

ancient grail
#

Welp even if the recipe as syntax error
It still doesnt explain why the error directing to that vanilla function

Or maybe its an overwritten vanilla function

thick karma
#

No quantity requirement specified between /

thick karma
#

I'm still skeptical of that

#

Proving this requires figuring out exactly what fires that Anthro trace (is it just entering character menu or what?) and then disabling your mod and seeing if you can still replicate the error in its absence

timber nexus
#

Okay, as far as I can tell, it still gives the weird "box" "mp5_rack" and etc errors but it still loads everything in fine.

#

This is with the version of the changes that I made that properly load the menu and let me into a save and such.

thick karma
#

Restarting zomboid to clear it might be wise

timber nexus
#

That's a direct cut-out, I can post the whole thing for you.

thick karma
#

I would recommend disabling The Mall and Box of Garbage Bags

timber nexus
#

Like 99% of the "errors" I see there are always the 'base imports itself'.

thick karma
#

Figuring out why your mods throw errors is always harder in the presence of other mods causing their own errors.

thick karma
#

We colloquially call them errors a lot, but it's a specific kind of error that interests us most.

ancient grail
#

Omg youre modding while running alot of different mods?
I suggest isolating your mod and involve only those mods that are related to what your doing (if any)

thick karma
#

I like to mod alongside known to be bugless mods to make sure I don't cause conflicts, but I would never leave a mod running while I debug if it throws Stack traces of its own.

ancient grail
#

You might be trying to fix something thats not even part of your actual mod

thick karma
#

In fact quite the opposite.

timber nexus
#

The issues always arise whenever I make a specific change to my mod, though. I want to figure out why, and what I can do with my changes to prevent it in the first place.

thick karma
timber nexus
#

No, I am sending them as I make changes. That one is from after I made a change, whereas previous I have sent have been from previous times.

thick karma
#

I see. I would like to see a console.txt from before your changes cause issues, from Main Menu to in-game.

timber nexus
#

I am going back to the changes that worked, and am going to disable the two mods you mentioned and give a command.txt from the outcome of that, as well as try to make changes again and see if they work.

ancient grail
#

Whats change_all_for_money_ontest

On your recipe

Does this even exist?

thick karma
#

Guessing that's from the mod he's extending.

timber nexus
#

It's in the base mod's lua scripting. I have ZERO experience with making scripts at all, so I could not tell you anything about that.

ancient grail
#

Bsically the ontest: param
Looks for a function in the lua server folder

thick karma
#

Anthro throws errors as soon as I try loading a saved preset @timber nexus

ancient grail
#

Should also be a global function or added to the vanilla recipe table

thick karma
#

Mod is not error free at all

timber nexus
#

This is the only thing in there, and it has like, 4 entries for specific recipe types I think? I'm not sure.

thick karma
ancient grail
#

Ok so this exist
Change_All_For_Money_OnTest()

#

But it just returns true anyways without condition
So just remove it from your recipe txt

ancient grail
timber nexus
#

One thing at a time. I'm going to get a console.txt of after disabling The Mall (South Muldraugh) and Bags of Garbage Bags.

#

Just to make sure we've cleared the superfluous stack traces.

thick karma
#

Fair. I mean even Anthro itself is sus. No other mod necessary to explain it having problems. Hard to know if your script is even at fault from this alone. I might recommend trying to make a custom recipe in a simple otherwise-empty mod before transferring it into a WIP mod.

#

I just enabled Anthro on my end to test

#

It throws errors

#

End of story

timber nexus
#

I see no stack trace errors myself, so I assume this is a good enough slate.

thick karma
#

So you just launched and closed a game?

ancient grail
timber nexus
#

I mean, I can disable Anthro Survivors and see if making the changes that initially caused it to hard stop are any different from previous tries. As I mentioned, disabling it before would let me get past the main menu again but then when I got into a world there would only be 2 of the like 10 dispensers in the debug menu, and some of the recipes would be missing. A lot of other mod stuff would fail to load as well.

timber nexus
thick karma
timber nexus
#

If I do have to eventually end up completely ditching the Anthro mod it's not the end of the world, though it is a little sad because.. I like being funny wolf man. 🤣

ancient grail
#

Just make sure items you have on your recipe isnt part of the mods you remove

For now change it to vanilla items

ancient grail
thick karma
#

I mean using mods that have errors is absolutely fine. I just wouldn't want to try guessing my way through my own errors in the presence of others caused by other mods, especially if I were just starting out modding.

timber nexus
# ancient grail I guess you should create a patch for it then

You are putting apples into a non-existent basket my friend. I don't even know why it's causing the issues it is in the first place, let alone whatever issues it has by itself that Burryaga is pointing out. I have no experience with scripting at all, everything I've ever done mod-wise is using tools other people have created to make it easier, and following provided guides or copying directly from what other mods already have put into place for code.

thick karma
#

ECC throwing a minor and probably harmless error in your log, btw, but even that I would be inclined to disable until I had solved my own script in isolation

#
ERROR: General     , 1716425329741> java.nio.file.NoSuchFileException: /lua/EasyConfigChuckedServerConfigs/MP_Test_config
ERROR: General     , 1716425329741>     at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.deleteFile(Unknown Source)
ERROR: General     , 1716425329741>     at jdk.zipfs/jdk.nio.zipfs.ZipPath.delete(Unknown Source)
ERROR: General     , 1716425329741>     at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.delete(Unknown Source)
ERROR: General     , 1716425329741>     at java.base/java.nio.file.Files.delete(Unknown Source)
ERROR: General     , 1716425329741>     at zombie.core.logger.ZipLogs.deleteDirectory(ZipLogs.java:305)
ERROR: General     , 1716425329741>     at zombie.core.logger.ZipLogs.addDirToZipLua(ZipLogs.java:264)
ERROR: General     , 1716425329741>     at zombie.core.logger.ZipLogs.addZipFile(ZipLogs.java:80)
ERROR: General     , 1716425329741>     at zombie.GameWindow.exit(GameWindow.java:942)
ERROR: General     , 1716425329741>     at zombie.GameWindow.run_ez(GameWindow.java:701)
ERROR: General     , 1716425329741>     at zombie.GameWindow.mainThread(GameWindow.java:495)
ERROR: General     , 1716425329741>     at java.base/java.lang.Thread.run(Unknown Source)
timber nexus
#

Dsiabled everything anthro-related, going to make a random sandbox world as well just to make sure there's nothing screwy in the console.txt that sticks out for you guys, then once we've got that all sorted out and assured that nothing is wrong I will try making changes again to see what errors come up (if any) and try to work through them.

#

Once again I want to thank you guys for taking the time our of your day to help me with this. 💜

#

Okay, this is the console.txt from a fresh world creation after relaunching the game with the anthro mod, mall, and boxes of garbage bags all disabled. Interestingly, the error involving the 'MP5_Rack.x_Dummy01" and all of that which were the last things to show up before any of the fatal errors that the Anthro mod threw for me are still there, and I'm unsure what mod is causing those.

#

Now the main thing to do is to make changes to the recipes again and see if I get errors again. I feel like maybe it has something to do with how I am trying to go about having a recipe require multiple items, but I do not know how I would go about doing that properly.

thick karma
#

Yeah I just don't know about requiring multiple items that way. Never done it or seen it done so experimentation is going to be necessary

timber nexus
#

I am now going to add the recipe;

    {
        destroy    Base.Tie_Worn_Spiffo/Base.Tie_Full_Spiffo/Base.Necklace_DogTag/Base.Necklace_Gold/Base.NecklaceLong_Gold/Base.NoseRing_Gold/Base.NoseStud_Gold/Base.Earring_LoopSmall_Gold_Both/Base.Earring_LoopSmall_Gold_Top/Base.Earring_LoopMed_Gold/Base.Earring_LoopLrg_Gold/Base.Earring_Stud_Gold/Base.Ring_Right_MiddleFinger_Gold/Base.Ring_Left_MiddleFinger_Gold/Base.Ring_Right_RingFinger_Gold/Base.Ring_Left_RingFinger_Gold/Base.WristWatch_Right_ClassicGold/Base.WristWatch_Left_ClassicGold/Base.Bracelet_ChainRightGold/Base.Bracelet_ChainLeftGold/Base.Bracelet_BangleRightGold/Base.Bracelet_BangleLeftGold/Base.BellyButton_DangleGold/Base.BellyButton_RingGold/Base.BellyButton_StudGold/Base.Camera/Base.PokerChips/Base.RubberDuck,
        keep MoneyDispencer,
        
        Result:Money=2,
        CanBeDoneFromFloor:true,
        Category:Money,
        Time:1,
        OnTest:Change_All_For_Money_OnTest,
    }```
And see if the game throws errors at me. This is a direct copy and paste of the recipe that already works for me, added as its own line, with different items, and the $1 being $2, and theMoney=1 being Money=2. That is all that is changed. Everything else is syntaxed exactly the same as the recipe that already works, including the changes I made to it.
thick karma
#

As far as I know, in vanilla, destroy lines only exist in recipes.txt, and they never reference multiple copies of an item at the same time as they allow various items using /

timber nexus
#

So a good sign is that it loaded the main menu without any issues or errors. Now to load the save I had made previously to check the recipes.

timber nexus
#

Alright. It added the recipe perfectly, all of the items are still in the debug menu without any issues, no errors thrown.

#

It really might be an issue with the Anthro mod. I have NO idea why, seeing as this mod doesn't interact with it in any way, but... we'll see how trying to continue to add lines goes.

thick karma
#

I mean it could also just be that the format you're attempting isn't allowed. Do you have any examples of mods that do something like this that work?

#

meaning something like

destroy    Base.Tie_Worn_Spiffo=2/Base.Tie_Full_Spiffo=2

to be specific

#

I just have no frame of reference. No clue if this format is even allowed.

timber nexus
#

No, none of the ATM Server Economy mods that I have downloaded and perused the files of have any recipes that require multiple items.

thick karma
#

Hmmm

timber nexus
#

I am trying to be a bit of a pioneer in that regard I suppose, but if it entirely has to be canned as an idea, I won't lose any sleep.

thick karma
#

I respect the willingness to experiment

#

I am about to step away for awhile but I'll check in later to see where you're at.

#

Feel free to ping me but I might not be free immediately

#

Will be back eventually

#

PZ inescapable

timber nexus
#

Alright! I did a bit of a bulk change this time for the recipes since it seems to be fine with our current setup. I will relay any new information as I get it.

#

Okay, so all of my recipes are officially in and working. I really want to re-enable the Anthro mod and see if it behaves with the changes, but I think more importantly I want to get the other recipes for the other vending machines going. Adding the weapons/magazines/ammunition fromthe various VFE mods and whatnot.

#

Also if I do post this to the Workshop, please remind me to put a disclaimer to favorite your key ring so you don't accidentally sell it... 🤣
I have them as one of the $5 items for the ATM machine, since they are somewhat rare on zombies and can be used as a bit of a PvP thing in servers that do that stuff.

#

...assuming favoriting an item excludes it from being used in recipes, that is. 🤔

#

I might just have to not put key rings as an item if it will eat your own any time you try to sell them... or you'll just have to remember to put your own key ring somewhere else before you interact with the ATM.

#

It would also be really cool if we could find a way to add a symbol to items that are in the list of accepted items for the ATM, so you can know at a glance what to pick from zombie corpses without needing to have a spreadsheet open on your second monitor.

thick karma
#

I would have to test key rings to know how they'd behave there.

timber nexus
#

Okay, fingers crossed these changes work 'cos this is the longest list of changes so far but I added the VFE (and addons) guns to the Weapons trader list.

#

Game loaded the menu fine, no errors thrown yet. Going to load the save and check the recipes.

#

It works! Though it seems the Gunrunner mod guns aren't properly showing up... kinda? They don't have icons, but their names are showing up properly. Hmm. I'll have to spawn one and see if they still work fine.

thick karma
timber nexus
#

Ah, the item is fine in the debug spawn menu but trying to spawn one from the vending machine throws an error and spawns nothing. I'm going to try removing the Base. prefix from the weapons in the code for the vendor and see if that changes it.

#

Bit of a hail mary, but there's no Base. prefix for them in the Gunrunner files.

thick karma
#

I believe Base prefix is only necessary when you're not inside of module Base already

#

I see a lot of vanilla files omitting it in recipes

timber nexus
#

...real quick, do you know of a way to make NecroForge spawn x amount of items, instead of only spawning them one at a time?

thick karma
#

No sorry I don't use that

#

But the vanilla items menu can spawn 1 5 or 10

#

Or x

#

Iirc

timber nexus
#

Ah. A secondary fix I think would be a way to use admin commands in singleplayer, but I think that requires a chat window.
I'm not sure how to use the vanilla debug stuff.

thick karma
#

Or maybe it's 1 2 5 x

#

Something like that

timber nexus
#

Aha, removing the Base. from them has icons in the vendor now. Time to see if they actually spawn when purchased.

thick karma
#

You spawn items using Item Picker or Item Viewer or something in vanilla while in debug mode

timber nexus
#

How do I enter debug mode vanilla, without needing mods?

thick karma
#

Steam launch option

#

-debug

#

Game settings for PZ

timber nexus
#

Thank you. That was probably something I should have figured out on my own since a lot of games simply require -debug as a launch parameter. 🤣

timber nexus
#

So far the changes have worked, but I actually got a bit caught up playing Zomboid trying to clear out a good space for testing stuff in the future so I haven't made any more changes past the weapons. 🤣

timber nexus
#

Dispensers placed, zombie loot sold, and back rooms of a GigaMart claimed. 👌
Now to add the magazines and ammo from the other VFE mods... And figure out which mod I have is making the silencer on my shotgun at a 90° angle.

#

I also learned the hard way that no, favoriting your key ring does not protect it fro being used by the machine for money. So I will definitely need to put a disclaimer to put your key ring far away from the machine before you do any tendering with it.

#

Thankfully I had the forethought to put all of my keys in a shelf before testing.

timber nexus
#

I made a list of all of the items that my mod makes sellable to the ATMs. I will probably copy this ver batem into the description of the mod if/when I do upload it to the Workshop.

#

The suppressor issue was solved very easily thankfully. :D
It was the Durability Patch for VFE that was recently released. It's easy enough to not use it.

wraith hemlock
#

Is there a list of occupations? This might seem like an odd question, but I'm talking about a list that is used for lua/script.

#

Because I don't know what the game wants, e.g, it could be "police officer", "Police_Officer" or "Policeofficer".

#

nvm I just pulled it from a pre-existing spawnpoints lua.

small topaz
ornate flume
#

Yo, can anyone mod Joost Kleins funny big shoulder Outfit from Eurovision into the game 😂

true plinth
#

Hello all, i have a question : do you know how to add custom radio message when a talkie-walkie is on and on a specific frequency please ?

fathom hare
#

I have a problem with adding a trait from another mod to my custom profession. Adding vanilla traits seems to work just fine, but when i am trying to add a trait which comes from another mod it shoots an error. My mod has the dependecy for the mod listed properly in mod.info file.

#

Someone willing to help?

fathom hare
# true plinth load mod order ?

Im working on it locally with only the 5 mods i need for this. Both the Profession Framework as well as the other mod containing the custom trait are listed in the mod.info file of my mod in such order: require=ProfessionFramework,modWithCustomTrait

true plinth
#

can you show us the code used please ? 🙂

fathom hare
#

Of course!

#

oh my, i am sorry

#

forgot how to format code on dc

true plinth
#

with 3 backtick quote

fathom hare
#

ok i think i got it 😅

#


local addProfession = ProfessionFramework.addProfession 
local getProfession = ProfessionFramework.getProfession 

-- set this to true since we skip the vanilla definitions.
ProfessionFramework.RemoveDefaultProfessions = true



    addProfession('unemployed', {
        name = "UI_prof_norole",
        icon = "",
        cost = 8,
    })

    addProfession('scav', {
        name = "UI_prof_scav",
        icon = "prof_scav1",
        cost = 0,
        xp = {
            [Perks.Sprinting] = 1,
            [Perks.Strength] = 2,
            [Perks.Fitness] = 2,
            [Perks.Aiming] = 3,
            [Perks.Blunt] = 2,
            [Perks.SmallBlade] = 2,
        },
        clothing = {
            Hat = {"Base.Hat_Cowboy", "Base.Hat_Beany"},
            Mask = {"Base.Hat_BandanaMask", "Base.Hat_BandanaMaskTINT", "Base.Hat_SurgicalMask_Blue", "Base.Hat_SurgicalMask_Green"},
            TorsoExtra = {"Base.Vest_BulletCivilian"},
            FullHat = {"Base.Hat_CrashHelmetFULL", "Base.Hat_Army"},
            Back = {"Base.Bag_Schoolbag"},
            Jacket = {"Base.Jacket_WhiteTINT"},
            Shoes =  {"Base.Shoes_ArmyBoots", "Base.Shoes_ArmyBootsDesert", "Base.Shoes_BlackBoots"},
    },
    traits = {"Underweight", "Stout", "packmouse"},

})  ```
#

So, the thing is, everything works perfectly fine with the Underweight and Stout traits.

#

But when adding the packmouse, it actually ADDS the trait for the profession, but after that all the other professions below 'scav' don't show up in the creation menu.

fathom hare
#

This is the error log which shows up: ```function: SetProfessionDescription -- file: MainCreationMethods.lua line # 639 | Vanilla
function: doProfessions -- file: 2ProfessionFramework.lua line # 413 | MOD: Profession Framework.
[23-05-24 18:25:34.431] ERROR: General , 1716481534431> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: getLabel of non-table: null at KahluaThread.tableget line:1689..
[23-05-24 18:25:34.431] ERROR: General , 1716481534431> DebugLogStream.printException> Stack trace:.
[23-05-24 18:25:34.432] LOG : General , 1716481534432> -----------------------------------------
STACK TRACE

function: SetProfessionDescription -- file: MainCreationMethods.lua line # 639 | Vanilla
function: doProfessions -- file: 2ProfessionFramework.lua line # 413 | MOD: Profession Framework.
[23-05-24 18:25:34.432] LOG : General , 1716481534432> .
[23-05-24 18:25:34.567] LOG : General , 1716481534567> creating new sourcewindow: E:/SteamLibrary/steamapps/common/ProjectZomboid/media/lua/shared/NPCs/MainCreationMethods.lua.```

fathom hare
true plinth
fathom hare
#

I am not a professional coder by any means, so thats why i am seeking help.

#

I thought that maybe it has something to do with the fact, that the trait variables are all local and cant be accesed properly?

#

But then when adding the "packmouse" trait into the custom profession, it wouldnt show up...

#

ok, the problem is fixed

civic tree
#

DAMN THIS LOOKS LIKE SHIT 🔥 🔥

bright fog
true plinth
surreal crater
#

I'm tinkering around with loot distributions for a server I have w/ my friends, does anyone know how to remove/exclude certain items from a distribution table from spawning in containers?
i.e lets say I want items from the ArmyGuns distribution to spawn in a crate, but i want to exclude a couple specific guns in that table that are too OP for our tastes.

sorry if this is wrong chat btw

#

this is just pseudo-code but hopefully this gets what i mean across

floral saddle
hollow lodge
civic tree
hollow lodge
#

you might work better painting on the model, draw some lines to guide you on photoshop or whatever editor you use

pine patio
hollow lodge
#

I separate some areas into diferent images, selecting the vertex, exporting it separated into .png, and working them as isolated parts

#

like this

civic tree
civic tree
hollow lodge
#

you can always use the base texture, flat it, and work on top of it

#

good luck

civic tree
#

thanks bro, this gets frustrating cause i dont know shit

rancid panther
#

does this game differentiate between different types of buildings anywhere in the definitions?

#

like can i generate a list of only houses in the game?

#

or whatever is the next closest option

bright fog
#

I'm not entirely sure but I know every rooms are applied a specific definition

thick karma
#

If the installation instructions aren't self-explanatory, let us know where you get stuck

ornate pumice
#

Got an issue with my mods where they doesn't appear in the debug menu in mp

thick karma
tribal moth
#

Guys, please help! I created a true music addon which includes 15 tracks, its weight is 20 megabytes. After a while, I added another 253 tracks to it by deleting the 'media' folder and completely reorganizing it for a new addon, which includes all 268 tracks. They work fine in the game, I updated the addon through the game. I go to the addon page - the weight remains the same as 20 megabytes. How to add the remaining other 253 tracks to the existing ones?

bright fog
tribal moth
#

How could I check this?

hardy yoke
#

i want to learn how to make my own map mods tho i have no idea what im doing

#

i got this set up

tribal moth
bright fog
#

np

lofty widget
#

hey, just a quick guestion, where can i find a files that contains medical stuff, one for items like bandages and stuff like it and the other with things that actually hurt like scratches, infection, basically ilnesses

vestal gyro
#

either in the items.txt or newitems.txt

#

Its in media/scripts

#

If they aren't in those two exactly then probably some other text file in scripts im not 100% sure in which exact one drunk

surreal crater
#

I'm tinkering around with loot distributions for a server I have w/ my friends, does anyone know how to remove/exclude certain items from a distribution table from spawning in containers?
i.e lets say I want items from the ArmyGuns distribution to spawn in a crate, but i want to exclude a couple specific guns in that table that are too OP for our tastes.
this is just pseudo-code but hopefully this gets what i mean across

vestal gyro
#

Yeah I get what you mean

#

There are a couple mods out there that remove the vanilla items and guns from the loot table I'd suggest looking at how they do it

crisp fossil
surreal crater
#

yeah but the problem with that is how much bloat that would add with A[26] and brita's guns

#

if im understanding you correctly

#

i mean i guess i could just edit the brita lua to get rid of the items i dont want, but that feels like sort of a hacky way to do it

crisp fossil
#

try this ProceduralDistributions.list["Location"].items["ItemName"] = 0.0

#

im not sure if it works

surreal crater
#

yeah but wouldn't that defeat the purpose of using a procedural list or am i reading that function wrong

#

like wouldn't i just have to list every item that i want for each container?

surreal crater
#

yeah i misunderstood, that might work

vestal gyro
#

Not the weight

surreal crater
#

yeah i meant like spawn weight chance

lusty marsh
#

Hey, so I've been away for a while and not updated my mod in about a year. I was wondering, the last time I updated it I had to revert it after it broke things for a lot of people so I was thinking a beta test branch would be a good idea, how do people typically handle that with steam workshop? so far I'm thinking I either create a new workshop item or add a "-beta" modid to the existing workshop item. can anyone recommend one or the other?

upper junco
#

Is there a way to remove replace a parameter in an item without overwriting it completely?
I know how to change a parameter but for example I would like to change icon= to iconsfortexture=

sick spade
#

Moving this to right channel!.

I have feeling I'm missing a file or reference somewhere since I cant get custom shirt decals to show ingame.
My brain is saying there should be something what would define path where to get the decals from, which my clothingDecals.xml is not doing, and the item.xml only refers to a Decal Group from clothingDecals.xml..

ancient grail
ancient grail
upper junco
ancient grail
upper junco
#

Thank you

muted garnet
#

Does EveryOneMinute event change when you change day duration in sandbox options? I mean I can change day duration to real time and EveryOneMinute event will run every 60 real seconds?

bright fog
#

It's in game minutes

#

So it never changes

#

You will get ~24*60 trigger of EveryOneMinute in a PZ day

#

And that will not change

muted garnet
#

this will always be a static value, did I understand you correctly?

bright fog
#

Yeah

muted garnet
#

got it, thanks

bright fog
#

Same for 10 minutes and every hours

lusty marsh
# ancient grail How complex is that the mod?

It's improved hair menu, not overly complex itself but a lot of cases where things can go wrong and bc of how the game handles the main menu pretty much any error can break the whole main menu

ancient grail
frank elbow
#

(It probably was but thought there may have been room for misinterpretation)

muted garnet
#

Explain in more details pls

#

that is, this event will run less often?

frank elbow
#

To your original question: if you change the day duration, the frequency of the event will change. The longer the day, the less frequently the event is triggered (in real time). In game time, it'll be every minute regardless of the setting

muted garnet
#

that is, an event will run once every 60 real-time seconds, if you set the real-time day duration?

frank elbow
#

Yeah

#

Well. If the game is paused between triggers it won't necessarily have been 60 seconds

#

But aside from that, yes

muted garnet
#

Will the OnTick event change in any way? And is it possible to somehow, besides the run OnTick event, speed up the calling of the EveryOneMinute event at different day durations?

muted garnet
frank elbow
#

No, OnTick is not based on day duration. Only the Every* events will change based on that. I'm unsure I understand what you're asking with the second question; are you saying you want to change the frequency? The events are triggered Java-side so no straightforward way that I know of

frank elbow
#

That is, the minutes the event is referring to are in-game minutes, like those displayed when a watch is in the inventory

muted garnet
#

Got it, thanks

lusty marsh
# ancient grail It could be mod conflict? If Other mods didnt properly hook vanilla functions I...

Yeah I get what you're saying, some of the issues are def just mod compatibility but there's some that might be performance related (lots of 3d models) I've done a pretty big rewrite of it for better translations and not breaking everything when IS updates like when they added the stubble checkbox, so ig I just wanted a little test branch to make sure nothing breaks for what I imagine is a kinda large chunk of the player basestressed I could also just send it and fix things as they come updrunk

ancient grail
red tiger
#

@frank elbow o/

lusty marsh
jade stump
#

is there an api for mods?

bright fog
jade stump
#

so i can access the classes and call methods?

jade stump
#

what has this to do with my question

bright fog
#

This is the API

#

Gives every methods for every classes

jade stump
#

can i add this as a dependency?

bright fog
#

As a dependency ? It's the base game API

#

You don't have to, you can access it anywhere within a lua file for PZ

jade stump
#

but then a typo can ruin the code

bright fog
#

Oooh you want autocompletion ?

#

Umbrella

jade stump
#

can i make mods with java too?

bright fog
#

In VS Code:
press ctrl shift P > open addon manager > search for Umbrella > enable it

bright fog
#

The API won't exactly help on that, but methods and classes there are in the java ones

#

Some are just not exposed to the lua

#

And the issue with java mod is that you need to:

  • decompile
  • recompile
  • manually install it
jade stump
bright fog
#

It's only for VS Code

jade stump
#

😢

bronze yoke
#

intellij's lua plugin barely functions

jade stump
#

i wanted to use java

bronze yoke
#

there isn't a java modding api, if you want to make mods with java you'd just be recompiling the game with your changes

jade stump
#

:(

bright fog
#

You can but there's no point to making java mods but for a few cases bcs players need to manually install it

#

It's not viable for modding

jade stump
#

does lua support oop?

bright fog
#

The only java mod I know of which is fine is No Mo Culling bcs the java only needs to be installed server side

bronze yoke
#

it's not an oop language but it does have some tricks for it

bright fog
#

What's oop exactly ?

jade stump
#

i can't live without classes

bronze yoke
#

object oriented programming

jade stump
#

interfaces

bronze yoke
#

you can make classes, they technically aren't classes but that's mostly a matter of pedantry

bright fog
#

What are you planning on modding exactly ?

#

To have the need for classes ?

jade stump
#

im not planning on anything i just dont like coding without classes

bright fog
#

Curious

bronze yoke
#
-- sets up the basic class structure
local MyClass = {}
MyClass.__index = MyClass

-- class function template
-- note that instance functions are defined and called with a : after the class name
function MyClass:instanceFunction()
    -- do something
end

-- constructor template
-- static methods should be defined and called using a . after the class name
function MyClass.new()
    local o = {}

    -- makes o behave as an instance of MyClass 
    setmetatable(o, MyClass)

    return o
end

-- instantiating and using an object
local myObject = MyClass.new()
myObject:instanceFunction()
jade stump
#

:(

bronze yoke
#

technically not really a class, internally it's passing around tables and stuff (which is why there is no need to e.g. declare fields), but in most usages it ends up looking the same anyway

jade stump
#

public class Main {
public static void main(String[] args) {
System.out.println("hello");
}
}

bright fog
#

Keeping that written somewhere

jade stump
#

what does local mean

#

is this private?

bronze yoke
#

locals are only accessible to the scope they're created in (and any nested scopes inside it)

#

by default in lua all variables are globals accessible from any scope

#

it causes performance issues and overall encourages bad design so it's generally recommended to literally only use locals

jade stump
#

so everything is static by default

mellow frigate
sick spade
bright fog
sick spade
worthy pawn
#

Hello, I'm trying to add some sandbox options to change the spawn chance of a custom zombie, however, this causes an error when I boot the game stating that the last line of this code equals nil and does not work. Any idea?


local sandboxZedFireFighterChance = getSandboxOptions():get("DON.ZedFireFighterChance")

if sandboxZedFireFighterChance ~= nil then
    ZedFFChance = sandboxZedFireFighterChance
end

table.insert(ZombiesZoneDefinition.Default, {name = "DON_FireFighter", chance = ZedFFChance})```
verbal yew
worthy pawn
verbal yew
#

your sandbox setting has default value

worthy pawn
#

Got ya, let me give this a whirl. Thank you!

#

I think I was over complicating it

verbal yew
worthy pawn
#

Stellar. 🙂

verbal yew
# worthy pawn Stellar. 🙂

just for tip

local ZedFFChance = 0.25
local sandboxZedFireFighterChance = SandboxVars.DON.ZedFireFighterChance

if sandboxZedFireFighterChance ~= nil then
    ZedFFChance = sandboxZedFireFighterChance
end

same with

local ZedFFChance = SandboxVars.DON.ZedFireFighterChance or 0.25
-- if not SandboxVars.DON.ZedFireFighterChance or SandboxVars.DON.ZedFireFighterChance == nil then ZedFFChance be 0.25
crisp fossil
twin relic
#

Hey, iam in progres of reviewing old https://steamcommunity.com/sharedfiles/filedetails/?id=2577243435
I want to extend it, to add some tuning posibilities.

-taking out, putting in engine
-tune parts ootb pz parts (like muffler, maybe adding another
-tuning parts ( look at the image)

Generally horsepower improvement, loudnees correction, maybe additional above-performance level parts
My question is
Can i simply overwrite values like hp? ?
What would be the best approach to extend Vehicle Mechanics, to add new possible parts? for any vehicle ?

mellow frigate
crisp fossil
#

I have the TchernoLib. do I just access the field like item.runSpeedModifier?

#

wait you are the mod author!

barren creek
#

Hi guys, please help me
I'll try to write it clearly
how can new skills be upgraded according to the type of shooting 0 to 10 lvl

bright fog
#

New skills ? Upgraded ? Type of shooting ?

thick karma
#

I'm guessing they want to create a custom skill in the skill UI.

#

But they did not confirm

surreal crater
#

hey rq, how do I get my custom mod to actually load? I tried putting it in the /user/Zomboid/Workshop/ folder, which got it to show up in the mod manager, but when trying to start a world with it enabled it disables all my mods including itself.

normally I would just try to figure this out on my own to avoid asking stupid questions but have something to do later and I just want to get this sorted out

jovial sparrow
#

Godspeed to me, im gunna try to make something, idk what yet though

jovial sparrow
#

looking into it
if I wanted to add something to the right click context menu, where stuff like the Carpentry menu is, is that in ISBuildMenu.lua or is that SPECIFICALLY the Carpentry menu?

thick karma
#

You use the event called OnFillWorldObjectContextMenu which is fired from ISWorldObjectContextMenu.lua iirc

#

You can find functions for getting submenus or options by name from the context menu in ISContextMenu.lua

jovial sparrow
#

wonderful, just what i was looking for thank you very much

thick karma
#

You can find examples of using it in True Music Jukebox and refactor them freely

jovial sparrow
#

ahh, I see
yeah this is clearer, wonderful!

again, thank you for the response

#

Since this is my first time making anything for PZ I figure I'd just do something where I can get a button to show up in the context menu

then kinda just go from there

thick karma
#

Sounds like a plan to me

vestal gyro
#

In the Workshop folder you have to put the entire mod folder while in the mods folder you only have to put the Modname/media folder

heady sparrow
#

Is there such a thing as a mod that makes antique ovens or campfires heat a larger area?
Or an actual furnace?

muted garnet
#

How can I make the character walk to a dynamic object (For example, to a player), and not to the tile where this dynamic object was at the beginning of the function, so that while the character is walking, the dynamic object is updated and then the character would go to it?

barren creek
bright fog
cinder finch
muted garnet
#

How can I make the character walk to a dynamic object (For example, to a player), and not to the tile where this dynamic object was at the beginning of the function, so that while the character is walking, the dynamic object is updated and then the character would go to it?

coarse sinew
twin relic
muted garnet
#

How can I make the character walk to a dynamic object (For example, to a player), and not to the tile where this dynamic object was at the beginning of the function, so that while the character is walking, the dynamic object is updated and then the character would go to it?

bright fog
#

Can you be more specific to understand what you want to achieve with that ?

thick karma
muted garnet
thick karma
#

(And I would add and remove said OnTick when this began and ended.)

#

I don't have the code handy but you can find code for making player autowalk to target square by finding the walk to translation and looking through ISWorldObjectContextMenu.lua for the point where the walk-to option is told what function to call, and figure out what that function does to make a player walk to a square, and go from there

muted garnet
#

thanks, I'll take a look

mild marlin
#

hey, im starting with modding and im trying to do some resistance to cold/hot, ive been trying things like setTemperature and others related to see how temp works but im not really getting anything useful. Is there somewhere to see the LUA variables that PZ uses? all Ive found are the functions but theres no explanation to any of them besides their own name

#

the thing is that i think the thermoregulator is changing the temperature by itself and theres no function to change it with thermoreg, just with bodydamage but it gets overwritten all the time

#

dont know if anyone managed to do this right

sonic ibex
#

So I just had an idea, not sure if it exists but I was thinking it'd be cool to be able to make markings on anything. Like write on a hat or engrave into a table or something. Basically adding the notebook functionality of storing notes to every item.

sonic ibex
#

I guess, but I wanted to like write on my weapon 😄 engrave initials into a rifle or something.

frank elbow
#

It'd be doable, but you'd have to think about what sorts of items you'd want to enable for writing—e.g., it'd probably make sense to limit to short blades for engraving

#

Plus it wouldn't be as easy as implementing a journal, since all the code for that assumes a Literature type. Should be entirely doable to repurpose the UI, but you'd need to store the writing differently too (likely as mod data)

civic tree
#

pretty hard to do i think yeah

frank elbow
#

Not necessarily difficult, just not straightforward

spice edge
#

Hi everyone! Just started my mod_development journey yesterday 🙂
I'm playing with some Vehicle modding just to start learning. I was wondering if attaching multiple cars would be possible only with Lua? 🤔

I've made some test changes into client/Vehicles lua files but I'm not sure this is doable with scripts only because the Vehicle object would need to support it. Am I correct?

frank elbow
vestal gyro
#

The guy is insane

civic tree
frank elbow
#
UI_Test1 = "Appending a string like this " ..
"works just fine."
UI_Test2 = "But this one " ..
"won't work--why?"

I was writing a quick translation checker script & realized the translation parsing has this (somewhat contrived) bug

#

1 useless internet point if you can solve this riddle—dunno whether I made it too obvious

red tiger
worthy pawn
#

Anyone every have trouble with an enum always remaining at default regardless of the selected option within the sandbox-options?

worthy pawn
#

My sandbox-options

    type = enum,
    numValues = 2,
    default = 1,
    page = HNDLBR,
    translation = HNDLBR_PrepperWeaponPack,
}```

My translation file

```Sandbox_EN = {
    Sandbox_HNDLBR = "Handlebar's Preppers"
    Sandbox_HNDLBR_PrepperChance = "Prepper Spawn Chance"
    Sandbox_HNDLBR_PrepperChance_tooltip = "How Frequent Prepper's Spawn. Recommended is Low"
    
    Sandbox_HNDLBR_PrepperWeaponPack = "Select Weapon Pack"
    Sandbox_HNDLBR_PrepperWeaponPack_tooltip = "Select a weapon pack for Preppers to spawn with."
    Sandbox_HNDLBR_PrepperWeaponPack_option1 = "Vanilla"
    Sandbox_HNDLBR_PrepperWeaponPack_option2 = "Vanilla Firearms Expansion"
        }```
#

And my function that runs depending on the option. However it always goes to the default value no matter if I change it in the options or not.

    local HNDLBRPrepperWeaponPackChoice = SandboxVars.HNDLBR.PrepperWeaponPack
    
    if HNDLBRPrepperWeaponPackChoice == 1 then
        -- Set up weapon loadout for option "Vanilla"
        AttachedWeaponDefinitions.attachedWeaponCustomOutfit.HNDLBR_Prepper = {
            chance = 100,
            maxitem = 4,
            weapons = {
                AttachedWeaponDefinitions.survivorBladeHNDLBR,
                AttachedWeaponDefinitions.survivorBluntHNDLBR,
                AttachedWeaponDefinitions.survivorLargeMeleeHNDLBR,
                AttachedWeaponDefinitions.handgunSurvivorCommonHNDLBRVanilla,
                AttachedWeaponDefinitions.survivorCommonLongGunHNDLBRVanilla,
                AttachedWeaponDefinitions.survivorRareLongGunHNDLBRVanilla,
            },
        }
    elseif HNDLBRPrepperWeaponPackChoice == 2 then
        -- Set up weapon loadout for option "Vanilla Firearms Expansion"
        AttachedWeaponDefinitions.attachedWeaponCustomOutfit.HNDLBR_Prepper = {
            chance = 100,
            maxitem = 4,
            weapons = {
                AttachedWeaponDefinitions.survivorBladeHNDLBR,
                AttachedWeaponDefinitions.survivorBluntHNDLBR,
                AttachedWeaponDefinitions.survivorLargeMeleeHNDLBR,
                AttachedWeaponDefinitions.handgunSurvivorCommonHNDLBRVFE,
                AttachedWeaponDefinitions.handgunSurvivorExoticHNDLBRVFE,
                AttachedWeaponDefinitions.survivorCommonLongGunHNDLBRVFE,
                AttachedWeaponDefinitions.survivorRareLongGunHNDLBRVFE,
                AttachedWeaponDefinitions.survivorExoticLongGunHNDLBRVFE,
            },
        }
    else
    end
end

HNDLBRPrepperWeaponPack()
coarse sinew
#

When do you call the HNDLBRPrepperWeaponPack() function ?

worthy pawn
#

Oh, must've omitted it, at the end of that function

#

Fixed it, but it is in my code.

coarse sinew
#

Call it at OnInitGlobalModData event because it's the earliest event after sandbox options are actually loaded.

#
Events.OnInitGlobalModData.Add(HNDLBRPrepperWeaponPack)
worthy pawn
#

AH!

#

That seems to have fixed it. Thank you!

zinc epoch
#

Where do i start making mods?

#

I know it sounds stupid, but i'm just asking

worthy pawn
#

I tore apart mods I liked, and more complex ones, it helped me figure out they did things.

thick karma
zinc epoch
#

Alright :)

thick karma
#

You are also welcome to refactor anything you find in my own original mods or True Music Jukebox @zinc epoch