#mod_development

1 messages ยท Page 283 of 1

clever surge
#

Thanks, but what I am trying to to is to remove parts from the tooltips entirely. For example, the (DEBUG) Script Name thats part of all InventoryItem tooltips

#

This is defined in java, but is there a way to override it in lua?

bronze yoke
#

only if you want rewrite tooltips entirely

ebon dagger
#

Ah yeah, no idea. Sorry about that ๐Ÿ˜„

clever surge
#

yeah ๐Ÿ˜ฆ thanks anyways!

#

I am the author of the "Disable Unstable Debug Text" mod on the workshop and it's currently a java mod, so I'm looking into ways of doing it in lua instead. I know it's dirty but I'd rather do it from lua since that way I can have a hotkey to toggle the debug elements

elfin stump
#

Anyone know if there is a way to place a 3d item in the world, like if the character was to drop it, with X,Y,Z coordinate or by from a GridSquare?

bronze yoke
#

in b41 not really (i found some kind of way but it was so buggy i wouldn't want to actually use it), maybe in b42 though

crystal canyon
#

we need a tool to ease the creation/updating of so many recipes

#

my last issue was that I left out [] for inputs. Outputs dont need them but inputs do. That lack of consistency messed me up

elfin stump
#

Anyone see any issues where smoker characters spam coughing? I have a user reporting it thinking it was my mod but when I looked at their mod list it is clear they have some conflicting mods. But I am curious, their are new changes to smoking, anyone look at it? Any ideas what might cause a player to constantly spam "cough" every second essentially forever until they die or quit?

cosmic ermine
#

Is there a way to know when a food is refrigerated/frozen?

wispy current
#

Hello guys, I wanted to ask you a question, what tool do you use to make mods? Do you do it over the game's base code? I'm a beginner and I wanted to know this, because I don't know how to start making mods.

elfin stump
elfin stump
cosmic ermine
#

Foods, weapons, guns, etc.

elfin stump
#

Just cause the B41 isn't B42 though doesn't mean its useless, most of it is the same, dependent on the system you are using.

cosmic ermine
bright fog
#

Wiki has the parameters I believe, tho not updated for B42

wispy current
crystal canyon
#

for example

#

int means that it is an integrer for example DaysTotallyRotten = 30
boolean means that it is either true or false for example IsCookable = true

cosmic ermine
#

We can eat dungs? rj

crystal canyon
#

yes, but they kill you if im not mistaken

#

item Dung_Turkey
{
DisplayCategory = Junk,
Weight = 0.01,
/Type = Normal,/
Type = Food,
CantEat = TRUE,
Tags = isCompostable,
DisplayName = Dung - Turkey,
Icon = Dung_Turkey,
WorldStaticModel = Dung_Turkey,
IsDung = true,
}

random finch
#

I am getting a huge performance hit on getObjects loop. I need to determine if the square is a road. Any recommendations on optimizing this?

                -- Restrict building on roads
                if not allowOnRoads then
                    local objects = checkSquare:getObjects()
                    if objects:size() > 0 then
                        for k = 0, objects:size() - 1 do
                            local isoObject = objects:get(k)
                            local objectTexture = isoObject:getTextureName()
                            if objectTexture and luautils.stringStarts(objectTexture, "blends_street") then
                                return false, "IGUI_pczUI_aRoad"
                            end
                        end
                    end
                end
ashen mist
#

so i got a question

#

when it comes to weapons, what causes them to not show up like, lets say 95% of the time?

#

because i am trying to backport some weapons from B42 to B41, the bats.
rake headed, fork headed, can reinforced, and sheet reinforced

#

now, the recipes show up

#

but the items refuse to, even with ID's and ported over models / textures

pastel sphinx
#

I just want to say, I came here with a question, found the answer in the PINNED comments. So I didn't have to ask. /bows deeply

bright fog
#

Maybe you can pass if it's not an IsoObject

#

I believe getObjects might give you everything

#

So even zombies and players no ?

#

Maybe not actually

#

No yeah I think it does ?

random finch
#

Based on a given square indicated by the Moveable Cursor, it will check the surrounding around from the square depending on sandbox setting limitations. So it will cycle through maybe 100 squares grabbing the objects on each.

#

Perhaps there is an IsoGridSquare method that can grab the floor tile only.

#

I think zombies and players cannot be found here, but are found via getMovingObjects()

#

HAHA, wtf. I think I asnwered my own question:

IsoGridSquare:getFloor()

#

I wonder how this will work for floor on top of floors

#

Not story by story but building a tile on top another tile

tranquil reef
#

Made a mod that adds a creature called a Homunculus. I want to have a custom spawn mechanic, what can I do that's both gross and funny

#

I'm thinking you have to craft an egg with something, but what

random finch
#

Maybe they spawn in toilets

#

or dumpsters

tranquil reef
#

I'll make toilet goblins next. But that's too much coding for me rn (I'm lazy)

#

I wanna do a spawn item because then I can just create a context menu option if the player has the item, and clicking that spawns it

bronze yoke
#

for situations where you *do* have to loop through the object list, use IsoGridSquare:getLuaTileObjectList()

#

it converts it to a table before passing it to lua so you can loop through it really cheaply

#

my mod is regrettably extremely reliant on this ๐Ÿ˜”

random finch
#

What the crap, no one does this that I have seen - not even TIS code. Now I have to change several lines of code.

crystal canyon
slate burrow
#

How do I add a description to a profession?

ashen mist
#

how would one go about attaching models to a weapon?

#

like, x weapon uses y model

#

is it attached to the model itself? the item's id?

#

sorry, not the model itself

#

i should say the base file

icy yarrow
#

Really unfortunate on some of the limitations of the craftRecipe stuff. Doesn't seem to be able to grab by item types

#

Looks like it expects to use tags, but not all vanilla items have tags

bronze yoke
#

you can use item types?

lapis moth
#

you need to find wepaon's bone

icy yarrow
bronze yoke
#

item 1 [Base.PopBottle;Base.WaterBottle;Base.PopBottleRare],

icy yarrow
#

Hmm, perhaps I didn't explain. I meant using this for example Type = Radio, to grab

bronze yoke
#

oh, probably not no

icy yarrow
#

so I either need to add custom tags to all the items or call each item individually

opaque hedge
#

if I wanna make a voice pack how do I do it? I saw someone making an arthur morgan one and I want to make a heisenberg one where all he says is "JESSE"

tranquil reef
#

It's actually really easy to add new animals if you know what you're doing

#

Hopefully me posting this mod helps people figure it out easier

cosmic ermine
#

How would I start making vehicle mods?

bright fog
#

Tho I don't remember seeing much about vehicles but I'm pretty sure there exists at least one guide on how to make vehicles

cosmic ermine
#

Already checking this out, texturing sounds complicated.

bright fog
#

Not really

#

It's like an 3D models

cosmic ermine
#

What does he mean by mask?

#
  1. Mask out windows, give them mirror metal material and add a filter to them

  2. Mask out chrome parts, made them mirror metal and added the same filter with slightly different settings.

  3. Apply the same filter to all body parts left.

  4. Add a position gradient to the windows

cosmic ermine
#

The black & white images are masks right?

bright fog
#

That's the only thing ik tbf

tranquil reef
#

How do I open .X files?

cosmic ermine
tranquil reef
#

What converter though. Aren't these modified DirectX files?

pastel thorn
#

Thats odd. Made some draft ./maps mod, with spawn points. And this mod completely don't want to run from the 42 folder, but all is good with Common. But it take some shared files from 42 ๐Ÿ˜„ Also I still cannot reuse some textures and other stuff from Common folder, as said on wiki page, receiving just blank white pics. Including some icon/previews. Maybe some1 faced with it already?

crystal canyon
pastel thorn
#

And struggled a bit with a media/video import. Seems like something goes wrong with its path. Wanted to check out how to make some cute previews on new spawn selector

cosmic ermine
crystal canyon
#

doesnt want to read from anywhere else

#

i was complaining about it yesterday or the day before

bronze yoke
#

icons and posters don't work in common because they check the actual directory and not the virtual file system

#

no idea about maps but there are a lot of bugs with things not working in certain folders right now

pastel thorn
crystal canyon
#

if you put the bik video in the vanilla pz videos folder, itll load and work as it should

pastel thorn
crystal canyon
#

no worries, you can ask all you want, just sharing what ive found :p

pastel thorn
#

Thank you guys, really appreciate it ๐Ÿ™‚

bright fog
tranquil reef
#

Thank you CoolSunglasses

icy yarrow
#

Huh, so can't replace vanilla recipes by using same name

#

They just end up merging

crystal canyon
#

I wonder what fixes they are adding to 42.0.3

icy yarrow
#

Integration of rest of fluid system?

crystal canyon
#

what is missing from that?

icy yarrow
#

Tubs and Sinks aren't part of it. Would be nice for those to get integrated

crystal canyon
#

ah then we are looking at similar hopes. Been trying to add the fluid container property to barrels. This and that go in the same line

icy yarrow
#

Wouldn't mind having some lua accessible things for craftRecipe if they aren't going to allow direct overwriting

bronze yoke
#

yeah, that side of things is a little disappointing

random finch
#

Off the top, anyone know if there is a Kahlua method to convert a LUA table to Java ArrayList?

ashen mist
#

So, I got this error I don't really understand, think I've isolated it from the rest of the plain loading in stuff

random finch
ashen mist
#

Yeah, backporting some B42 baseball bats

#

i didn't copy the recipes directly into 41

random finch
#

Check your parameters? make sure they are actually available in B41.

ashen mist
#

yeah, did that

random finch
#

Can you try only one bat recipe? Is that / at the end suppose to be there? Does the BoltBatCrafting sound actually exist - maybe you added the sound along with a sound script for it?

Try one recipe and see if it works to seclude the issue?

ashen mist
#

fuk

#

thats from scrap weapons

#

see this started as like, a replacement for some of those

#

cuz it was initially for a tweak

#

which made the bats non functional

#

so i moved it to its own mod

random finch
#
LeafRake/Rake/,

remove tha slash at the end real quick, see what happens?

ashen mist
#

lemme just copy vanilla and add hammering as the sound

#

fuk again

#

see initially that was gonna use the workshop

#

cuz it had rake heads

#

but the import wasnt working so i cut it out

random finch
#

hrmm, Im not quite understanding. What do you mean by that? and what do you mean import wasnt working?

ashen mist
#

it just wouldn't pull from the workshop

#

no metalcutters, no tool heads

#

no problem for me though

#

i can just cut it out and use 100% vanilla

#

sounds replaced, extra slash removed

random finch
#

Did it work?

ashen mist
#

testing rn

#

nada

random finch
#

try one recipe. temporarily remove the rest.

ashen mist
#

still busted

#

recipe looks like this and wont make anything

#

right there is the file for all the bats and their ids

#

brb gonna correct the break sounds

#

break sounds are now all BaseballBatBreak

#

and every time i right click on a bat i get an error

ebon dagger
#

Is ZombRand inclusive?

random finch
#

Make sure the item icon is in the correct folder and has the proper naming convention.

random finch
old ginkgo
#

Example: Icon= Bat_Fork,

random finch
# ashen mist

Your icon naming seems incorrect. Do not include Item_:
Icon=Item_Bat_Rake,
to
Icon=Bat_Rake,
Check the others.

Also check the Weaponsprite names and if they are in the correct spot.

ashen mist
#

thanks, corrected it

#

this look good?

#

does the = have to touch?

random finch
#

nah doesnt matter

old ginkgo
#

I don't believe it does if you don't want it to.

#

Side note; you can name a folder Item_Icons and then you don't need to add the prefix to every single icon name, but then you do need to include Icons/Bat_Fork to your Icon=

#

But it allows you to itemize your textures a bit more neatly if that's something you prefer.

ashen mist
#

so i think heres the issue

#

items arent iteming

old ginkgo
#

Are your items defined as Baseball bats, or just 'Bats'?

ashen mist
#

baseball bats

old ginkgo
#

Ah, wait. Is your items.txt named just bats.txt?

ashen mist
#

...should it be items_bats.txt

#

because im starting to feel silly for being under the impression that it was the file contents that mattered more than the name

old ginkgo
#

Hm, no actually I don't think you do.

ashen mist
#

i'm gonna add items just to be safe

old ginkgo
#

It might also be a quirk of the item spawning menu, did you try searching BaseballBats without the space as well?

ashen mist
ashen mist
#

no spaces leads to no hits

ashen mist
#

well

#

im gonna restart

#

and pray it brings the recipes back

#

fuck

#

renaming the files has borked my recipes

#

reverting to the old structure

random finch
# ashen mist im gonna restart

I back ported terraria 1.4 items to 1.3 (TML) back in the day. It's how I got started learning the API. Just thought Id mention it since I saw you are in their Discord.

old ginkgo
ashen mist
#

ah, im using cheat menu

#

debug stuff is just too much for me to comprehend a lot

ashen mist
#

can i send you the zip for the mod?

#

see if you can spawn in anything?

#

since if you can, i can see if the models n stuff work right

old ginkgo
ashen mist
#

thanks dude, major lifesaver

old ginkgo
fading horizon
#

we are so back

ashen mist
#

i copied over the bat file from earlier, same you used

#

and i cant see it

#

and as a bonus "fuck you" the recipes dont show up anymore

#

...i should go make sure its still enabled actually

#

yeah its still enabled

#

so apparently my own mod hates me

old ginkgo
#

I hadn't realized it was a backported mod and launched it earlier on B42 (since that was what I was testing my own mod on); but I'm debugging it now on B41.

ashen mist
#

you'd think this would be easier, right?

#

"oh, most the work is done! they already did the models and textures, i just have to add a recipe and item id and some stats!"

#

six days

#

that was me six days ago

old ginkgo
#

.txt files are honestly the bane of my existence and my least favorite part about modding.

#

Give me lua anyday.

#

At least I can add print functions to lua.

#

It's probably a stray extra space somewhere in one of the .txt files being candidly honest; they're wildly touchy. but I'm taking a look.

ashen mist
#

a stray space

#

im going to fucking kill myself

old ginkgo
#

They really can be that touchy at times.

ashen mist
#

like what spacing

old ginkgo
#

I've accidentally included an extra space after 'Base' before and it broke the file.

ashen mist
#

so how many spaces does it want

old ginkgo
#

None ideally lmao.

#

But I actually think I know the issue.

#

About to test.

crystal canyon
#

These recipes are making me want to kill somebody

ashen mist
#

because i can get the red and white spraypaint to set up a bullseye right on the noggin if they are

crystal canyon
#
module PWPN
{
    imports
    {
        Base,
    }
    
    craftRecipe MakeWoodSword {
        timedAction = SawLogs,
        Time = 1600,
        tags = AnySurfaceCraft,
        category = Survivalist,
        SkillRequired = Maintenance:2;Woodwork:3,
        xpAward = Woodwork:50,
        NeedToBeLearn = TRUE,
        CanBeDoneFromFloor = TRUE,
        inputs {
            item 1 [Base.Plank],
            item 3 [Base.ScrapMetal],
            item 6 [Base.Screws],
            item 1 tags[Saw] mode:keep,
            item 1 tags[Hammer] mode:keep,
            item 1 tags[Screwdriver] mode:keep
        }
        outputs {
            item 1 PWPN.WoodSword
        }
    }
}
#

Close to the bat issue lol

ashen mist
#

B42?

crystal canyon
#

yeah

ashen mist
#

nice

#

best of luck, man

#

i know how rough it gets

#

amount of help i need to get shit working, im not sure if i can even take credit for my mods anymore lmfao

#

may as well credit the entire modding sphere ๐Ÿ’€

bronze yoke
#

it's always a comma

ashen mist
#

oop, yeah

ashen mist
old ginkgo
ashen mist
#

WHAT

#

okay brb rtemoving the comma from the base

old ginkgo
#

For B42 specifically.

ashen mist
#

oh nbvm

bronze yoke
#

in most cases i've seen you don't even need to import base in the first place

ashen mist
#

nvm

old ginkgo
#

B41 it doesn't seem to matter.

old ginkgo
#

You only really need to import Base if you're incorporating or overwriting recipes or items from the vanilla game

#

If you're strictly adding new items to your module you don't need to import it.

crystal canyon
#

it still wants to crash...

LOG : General f:0, t:1735458562877> [craftRecipe] removing script due to load error = MakeWoodSword
ERROR: General f:0, t:1735458562878> ExceptionLogger.logException> Exception thrown
java.lang.Exception: CraftRecipe error in MakeWoodSword at CraftRecipe.Load(CraftRecipe.java:359).
Stack trace:
zombie.scripting.entity.components.crafting.CraftRecipe.Load(CraftRecipe.java:359)
zombie.scripting.entity.components.crafting.CraftRecipe.Load(CraftRecipe.java:249)
zombie.scripting.ScriptBucket.LoadScripts(ScriptBucket.java:265)
zombie.scripting.ScriptBucketCollection.LoadScripts(ScriptBucketCollection.java:122)
zombie.scripting.ScriptManager.loadScripts(ScriptManager.java:1639)
zombie.scripting.ScriptManager.Load(ScriptManager.java:1562)
zombie.GameWindow.initShared(GameWindow.java:156)
zombie.GameWindow.init(GameWindow.java:1442)
zombie.GameWindow.mainThreadInit(GameWindow.java:701)
zombie.GameWindow.mainThread(GameWindow.java:599)
java.base/java.lang.Thread.run(Unknown Source)

#

its driving me insane

#

ive been working on these since 1pm... it is now 3:50 am

ashen mist
#

i spent one whole day working on these fucking bats

#

i have never felt worse about how i've spent a day

old ginkgo
# ashen mist nvm

Alright; I got it to work. All that I did;

A missing comma in one of the baseball bats .txt files, a missing comma in one of the batrepairs.txt after Screws=10, and I removed the import on the base bats.txt because it isn't necessary.

#

I also reformatted bats.txt to be a bit more readable, I'll send the zip over here in a sec.

#

Models aren't showing up, but that's because you need the textures ported back over.

#

Oh wait I see you have them, let me see if I can fix that rq.

old ginkgo
#

Don't sweat it dude I've literally been troubleshooting this exact thing in my own mod all day long.

#

It's just always commas lmao

ashen mist
#

id try not to

#

but i got this complex about mistakes

#

i always think i gotta do it right the first time, so i always put in extra effort

#

and then it always explodes

#

and then i consider exploding my temporal lobe with 1 1/2 ounces lead shot

crystal canyon
#

what the actual f...

I removed these 2 lines

    NeedToBeLearn = TRUE,
    CanBeDoneFromFloor = TRUE,

and it loaded. Added them again one by one and CanBeDoneFromFloor doesnt want to load

#

I check back to the documentation and noticed I messed up. The actual parameter is "isCanBeDoneFromFloor"

#

no, loaded it with isCanBeDoneFromFloor and crashed again. I guess that parameter is no longer valid

crystal canyon
#

I don't need fixing modules in b42 right? Fixing is now done via tags based on this recipe?

craftRecipe FixWithDuctTape
{
    Time = 180,
    AllowBatchCraft = False,
    tags = AnySurfaceCraft,
    category = Repair,
    timedAction = CraftWeapon1H,
    xpAward = Maintenance:10,
    OnCreate = CraftRecipeCode.GenericBetterFixing.OnCreate,
    ToolTip = Tooltip_Recipe_CanFailAndDamage,
    inputs
    {
        item 1 tags[RepairWithTape] mode:keep flags[Prop2;IsDamaged],
        item 2 [Base.DuctTape] flags[Prop1],
    }
    outputs
    {
    }
}
stray summit
#

Check my request out in the PZ modding Disc if anyone is looking for front-end dev work or to be a server co-owner!

full escarp
#

is there a easy and good way of displaying debug values? for example i have map with a table in it and i would like to check the values over time without printing it all the time

random finch
#

What is a common issue that prevents the damn Sandbox settings from saving on server restart? I am only using two mods. Mine and StarLit, nothing else, no Udderly Up to Date. My mod does no special Sandbox manipulation.

I had this issue all the damn time while admining. Always had to delete the map_sand.bin file then painfully redo the settings. That is in linux, in my test environment I am dealing with windows and that file is not produced.

dull moss
#

Alternatively you can every minute print(yourMapValue + nonExistantValue) which will error out and in debugger give you fast access to viewing whole table and you don't have to print it fully

round notch
#

Anyone know how I separate IsoZombie from this

IsoZombie{ Name:null, ID:70 StateFlags:zombie.popman.ZombieStateFlags{ { Initialized, CanWalk, CanCrawlUnderVehicle }}}

I get this and want to check for IsoZombie. I presumed it was isInstance() but can't get it to work ๐Ÿ˜›

grizzled fulcrum
#

you use isinstance(var, "IsoZombie") to check if its class is IsoZombie but idk what that table is

#

is it like the toString output of IsoZombie or something??

lime socket
#

Hello, i have a entity script written out for a new craftable building but im unsure on how i would add this entity CraftRecipe to the new build menu, if i need to atall? Heres the entity:

module Base {
    
    xuiSkin default
    {
        entity ES_Funeral_Pyre
        {
            LuaWindowClass = ISEntityTabWindow,
            Display Name = Funeral Pyre,
            Icon = Build_Cairn
        }
    }

    entity FuneralPyre
    {
        component UiConfig
        {
            xuiSkin         = default,
            entityStyle     = ES_Funeral_Pyre,
            uiEnabled       = false,
        }

        component SpriteConfig
        {
            face N
            {
                layer
                {
                    row = funeralpyre_tile_def_1,
                }
            }
        }
        component CraftRecipe
        {
            timedAction   = BuildWoodenStructureMedium,
            time          = 50,
            SkillRequired = Woodwork:1,
            xpAward       = Woodwork:100,
            category      = Miscellaneous,
            ToolTip       = Tooltip_craft_bookcaseDesc,
            inputs
            {
                item 4 [Base.Log],
                item 8 [Base.SheetRope],
            }
        }
    }
}

round notch
#

Tried converting to metatable and that kinda worked but was a lil funky

round notch
#

it did not like that yikes

#

Don't know if it's case sensitive cause the docs say it's "isInstance" but tried both still not working... back to drawing board tired

bronze yoke
#

instanceof(var, "IsoZombie") is more typical

#

i'm pretty sure that's just how zombies print now though

#

a lot of objects gained tostring overloads

#

type userdata also confirms that it is a java object

atomic lintel
#

morning all. I'm trying to edit a simple mod that adds a few traits "More Simple Traits (MST)" to remove 3 of it's added traits since they're redudant now cuz b42 adds +1 traits for those skills, and when I remove them from the mod's .lua file it does remove them from the game but it also breaks the description for the other added traits from the mod from showing up when I hoover over it with the mouse. any idea why that might be and what I could do differently?

crisp fossil
#

is the max capacity of all bags hard coded to 48?

bronze yoke
#

50

crisp fossil
#

is it possible to be bypassed?

icy yarrow
#

Decompile change and recompile until they change it not be hard coded

cunning kestrel
#

Hey are .fbs animations not supported in 42 ?? any idea why they are not playing ?

vapid arrow
#

why isnt the midA sound playing for me?
common/media/lua/client/play_sound.lua:

local function OnKeyPressed(key)
    if key == 49 then
        local soundName = "midA"
        local player = getPlayer()

        player:playSound(soundName)
    end
end

Events.OnKeyPressed.Add(OnKeyPressed)

common/media/sound/sounds.txt:

sound midA
{
    clip {
        file = common/media/sound/mid_a.ogg,
        distanceMin = 10,
        distanceMax = 50,
        }
}
bronze yoke
icy yarrow
#

Anyone know where the disassemble results for furniture items are gotten from?

bronze yoke
cunning kestrel
vapid arrow
bronze yoke
bronze yoke
#

the entire thing should be wrapped inside module MyModule { ... }

vapid arrow
#

oh it didnt

#

ill try to add it into it

#

should i also change this line in the lua file?
local soundName = "midA"

bronze yoke
#

that should be fine from what i can see

vapid arrow
#

it still doesnt work:(

icy yarrow
#

Huh, so trying to do some custom OnCreate seems to work fine on a new save, but if I exit and than immediately continue it "Relods LUA" and stuff breaks

blissful urchin
bronze yoke
#

in all scripts

#

nothing in a script file will load without a module

vapid arrow
#

okie i got it working now:)

crystal canyon
compact rampart
#

can somebody help me find the location and name of the ammo boxes model files? im slowly going insane trying to find it lol

#

only managed to find the shotgun shells box 3d model

crystal canyon
#

.38 for example
model BoxOf38Special
{
mesh = WorldItems/HandGunAmmoBox,
texture = WorldItems/BoxOfRounds38Special,
scale = 0.4,
}

\common\ProjectZomboid\media\models_X\WorldItems\HandGunAmmoBox.FBX

compact rampart
#

aint there

#

oh wait

#

my god

#

you just made my evening

#

thank you

crystal canyon
#

hahaha

#

sometimes things slip past us

compact rampart
#

i swear i checked like ten times today

stray summit
#

Check my request in the Project Zomboid Modding server if you'd like to be apart of a paid dev team (:

round notch
sonic dome
#

Is there a way to define to drop a certain amount of items on dead zombie body? Like There is 20 percent chance that they will drop 10 bandages (this is an example) I already have the code that changes distribution but could not figure out this part

fleet bridge
#

You want to use OnZombieDead

sonic dome
#

Got it! By any chance do you know the vanilla file that does this so I can understand how it works?

fleet bridge
#

Doesn't use the distribution, which can become super bloated

sonic dome
#

Yea I was using distrubition.. ๐Ÿ˜ฎ

crystal canyon
#

OnZombieDead: Fires when a zombie dies. The zombie's inventory is not filled with loot when this event fires, but their clothing and attached items are added. The corpse does not exist until a few seconds later.

Parameters

Name Type Notes
zombie IsoZombie The zombie that died.

sonic dome
#

Thank you guys ๐Ÿ™‚

#

โค๏ธ

ashen spoke
#

Hey guys! Does anyone know if theres an isoPlayer/isoGamePlayer method for determining if a player is near a fence/car (like what is used for the new stealth system)

slate burrow
#

is there any mod guides to moding in a custom bag?

crystal canyon
crystal canyon
#

If i knew of a guide, i would've pointed you towards it but this is the best alternate option, reverse engineering :p

ionic vale
#

How do we add sound to crafting recipes in 42 now? seems like the old way doesn't work anymore

crystal canyon
#

sounds are now attached to timedactions

#

you would need to create a new timedaction with the sounds/animations you want

#

here is an example of base game timedaction Dismantle:

    timedAction Dismantle
    {
        metabolics      = HeavyDomestic,
        actionAnim      = Disassemble,
    sound        = Dismantle,
    prop1         = Base.Screwdriver,
    prop2         = Base.CraftingMetalPart,
    }

Metabolics is how many calories the action consumes, dont know numbers at the moment, gotta check that HeavyDomestic definition.

You can allso specify how much muscle strain the animation causes
muscleStrainFactor = 0.0133,
muscleStrainSkill = Strength,
muscleStrainParts = Hand_R;ForeArm_R;UpperArm_R,

#

then finally, you add your new timed action to your recipe script

ionic vale
#

Awesome, thank you for the direction

crystal canyon
round notch
#

timedActions gives me nightmares

crystal canyon
#

like everything it has its pros and cons, it was more tailored before when you can specify just a sound and thats it

bronze yoke
#

i think they seem good but i really don't like that they called them timed actions despite those already being something else entirely

crystal canyon
#

Agreed

round notch
#

I haven't yet gotten to the understanding part yet so I'll let you know ๐Ÿ˜†

autumn temple
#

ive never seen an error like this before

#

idek whats causing the error either

crystal canyon
#

Base.Dakimakura66656 not found

#

A recipe is calling for that item and its not finding it, so it crashes

autumn temple
crystal canyon
#

I'm getting it too lol
but for other items

autumn temple
#

why would that break it tho, I'd assume it would just skip over it like in Build41

crystal canyon
#

i guess the code changed

autumn temple
#

I deleted the calls for that model, and will try again

bronze yoke
#

b42's recipes have much stricter error checking

autumn temple
#

cant even read that

crystal canyon
#

yeah XD I have a 44" Samsung TV running at 3840 x 2160, a 27" Dell monitor running at 2560 x 1440 and a 32" MSI monitor running at 1920 x 1080

autumn temple
#

I think the hotkey on windows to screenshot a specific portion of your screen was Shift+WinKey+S

quasi kernel
#

Hoping and praying that my testing for the new Visible Generator Range update was sufficient so I wont get a bajillion reports

crystal canyon
#

alt + print screen catches the active window

crystal canyon
#

@bronze yoke do you recall what was the issue with missing dashboards. was it bad recipes causing it?

bronze yoke
#

yeah, it's old recipes being left in

#

i haven't looked into it myself but that seems to be the consensus anyway

full escarp
#

is there a better way to determine if a bodypart is scratched without iterating through all the bodyparts and see if they are scratched? especially since the event OnPlayerDamage fires continiously till no damage is received anymore

crystal canyon
#

thanks, Im experiencing it now

full escarp
bronze yoke
#

i just find it a little insane that a zombie game's mod api does not actually have a way to catch getting hit by zombies

full escarp
#

i find it a bit weird that there is no differentiation between getting a hit and getting continious damage
i just want to implement a scratch counter, and has to do all my flip flop logic myself thats kinda janky

autumn temple
#

ok ya I fixed that problem, I made a typo in every single item somehow OMEGALUL

full escarp
#

when i add a map / table to the moddata like this

local playertable = player:getModData()
    if playertable.ImmunityTable == nil then
        playertable.ImmunityTable = ScratchTable
    end 

will this also be saved to the character in MP or do i need to send the server this information as well ?

autumn temple
#

it errors at my input? It says Tag has no items, but every item I have made has the tag on it

#

I tried with Base. and no Base.

crystal canyon
#

are your dakimakuras in the base module as well?

autumn temple
#

ya

crystal canyon
#

thats odd

autumn temple
bronze yoke
full escarp
pearl prism
#

How can I choose which icon my container will use?

autumn temple
#

everything works fine, its just erroring at the crafting recipes, the Input specifically. but I dont see anything wrong. since the main mod the addon is based off of does the exact same thing with no issues

crystal canyon
#

try asking in the modeling section, someone that knows might be paying more attention to that channel than this one

tranquil reef
#

Ah, my bad. I always forget that channel exists lol

ashen mist
#

this mod is kicking two asses now

#

me and my new buddy chris

#

pathing seems to be the main issue, we've tried converting the models from X to DAE to FBX thru blender

#

we've tried moving them to the plain models_x root folder and clearing up the base file pathing

#

no matter what, the models just do not wanna show up in game

lucid pebble
#

dumb question why do some of the clothings not have a model it refrences in the xml such as this '''<?xml version="1.0" encoding="utf-8"?>
<clothingItem>
'<m_MaleModel></m_MaleModel>'
'<m_FemaleModel></m_FemaleModel>'
<m_GUID>ac7976de-2c73-44ea-9392-5d24ac1fb649</m_GUID>
<m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint>
<m_AttachBone></m_AttachBone>
<m_BaseTextures>clothes\shirt_tshirt_textures\shirt_formal</m_BaseTextures>
</clothingItem>'''

#

the slot for model is blank so where does it get its models from

umbral raptor
#

How can I make a TV advert/broadcast that says the AEBS frequency number? (Its random each game)

tranquil reef
#

80% sure

lucid pebble
#

oh

autumn temple
crystal canyon
#

I was telling Mr. Sniffles, they removed the message

ebon dagger
#

I'm working on a questing system. I have most of it done, I just need to make a single table able to be accessed by everyone on a server. What is the best way to store a single table that changes every day at midnight? is it the global modData?

crystal canyon
umbral raptor
lucid pebble
#

I am trying to do a clothing mod and here is what I put in guid
<files>
<path>media/clothing/clothingItems/test.xml</path>
<guid>e369e37c-f432-4c67-8b39-bf5aaa39a053</guid>
</files> the script: item test
{
DisplayCategory = Clothing,
Type = Clothing,
DisplayName = test,
ClothingItem = test,
BodyLocation = Tshirt,
Icon = TshirtGeneric,
BloodLocation = Shirt,
ColorRed = 0,
ColorGreen = 0,
ColorBlue = 0,
Insulation = 0.5,
WindResistance = 0.30,
FabricType = Cotton,
WorldStaticModel = TShirt_Ground,
} xml:<?xml version="1.0" encoding="utf-8"?>
<clothingItem>
<m_MaleModel></m_MaleModel>
<m_FemaleModel></m_FemaleModel>
<m_GUID>f58d56d1-f47b-4064-9300-0e74a4405847</m_GUID>
<m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint>
<m_AttachBone></m_AttachBone>
<m_BaseTextures>clothes\shirt_tshirt_textures\test</m_BaseTextures>
</clothingItem> but in game the clothing shows up in menus but it has no ground texture or texture when I wear it what am I missing

#

and I made sure the texture waas in the right location

pulsar pagoda
#

anybody got an idea as to why this script doesnt work?

ebon dagger
#

The one in fileGuidTable and the one in the clothings XML file need to match

lucid pebble
#

oh

umbral raptor
#

Do I create a script for this or slide it into my XML?

#

Iโ€™m trying to create an advert with the frequency stated

crystal canyon
#

hmm

pulsar pagoda
cobalt bridge
#

are there VS code addons for PZ typing?

crystal canyon
#

Umbrella

#

but not sure if its working for b42

lucid pebble
#

so when I try to test the clothing it looks like this, I checked mutiple times and the texture is in the right location

crystal canyon
#

@umbral raptor pming you

cobalt bridge
#

thank you

ebon dagger
grizzled fulcrum
ebon dagger
#

anyone got a good tutorial or example of storing data in global modData?

lucid pebble
ebon dagger
#

as far as I know, clothing does. Otherwise it has no idea how to wrap the texture.

lucid pebble
tranquil reef
#

After more pain and suffering I've made my homunculus actually visually distinct (previously a green pig)

#

I'm mostly adding to this because it's a proof of concept, but I want to give it some sort of actual use

ebon dagger
old ginkgo
#

This seems like a masking issue or an issue where the texture isnโ€™t defined on where itโ€™s supposed to go on the body.

lucid pebble
#

where are the masks?

sleek kraken
#

Ok so. Blender noob that I am, apparently I badly messed up the vertex weights. I was attempting to replace a Tifa Lockhart model with a model of Ruby Rose, and I just copied over the Tifa weights wholesale to the Ruby model.

#

I'm guessing I'm...not supposed to do that

autumn temple
#

ok so, I have no idea if this is possible or not with Build 42. but I will just speak my mind in case it can be used as a suggestion for any higher up lurking.

For the new crafting recipies. the itemMapper stuff is really neat and a big quality of life but is it possible to consolidate multiple mods into using the same recipe?
Like using the Dakimakura mod and my addon as an example. Currently we just make new Craft into Armor and Undo Armor recipes for each mod, causing bloat as there would be a new duplicate recipe for every addon.
So is there or could there be a way to combine itemMapper lists between mods or use tags to create your own itemMapper list and have it be filtered into the recipes made by the original mod that the addons branch from?

crystal canyon
#

I finally have dashboards again!

bright fog
#

Looks like that is the problem

autumn temple
sleek kraken
#

Holy fuck

#

It actually worked.

silent zealot
#

That's my stop-gap fix for the "schematics are impossible to find" issue.

#

I'm thinking of making a mod that fixes some of the circular dependencies/painful to acquire crafting essentials, at least for an urban start.

Masonry Trowel (plank & small handle)
Metal Tongs (metal pipes/bars & cloth)
Bucket (sheet metal & grbage bag)

Large Stone (make from bucket of concrete
Large Flat stone (make from bucket of concrete
Pickaxe (make from chisel & handle & rags)

#

Anyone got other items to suggest that cause a lot of needless pain due to the incomplete crafting systems?

late hound
#

how is everyone removing the result item nowadays since RemoveResultItem:true,
doesn't seem to work with this input/output schema for recipes?

late hound
open drum
#

u can put it blank

#

or just not put any output list

late hound
#

ok!

open drum
#
    {
        Time = 10,
        Tags = InHandCraft;CanBeDoneInDark;wuroLottery,
        category = Wuro_Recipe,
        needTobeLearn = false,
        timedAction = RipClothing,
        OnCreate = WuroRecipe.OnCreate.HealthFull,
        inputs
        {
            item 1 [Base.WURO_Elixir] mode:destroy flags[Prop1],

        }        
    
    }    ```
#

Could anyone kindly direct me to a folder in vanilla common file where I can study

#

to b able to spawn a dummy character into a game?

#

trying to make a NPC store

#

so i need a dummy player char just to interact and open a trade UI panel

silent zealot
#

If you're on B42, there is no multiplayer.

#

For B41, I don't know if there is any "spawn fake player" function but other people will know more about multiplayer stuff than me.

#

Can you run the client twice and conenct twice with different characters?

icy yarrow
#

Recipes are super picky

silent zealot
#

The vanilla ones, or ones you create?

#

Using tags instead of listing exact items is a big help

bronze yoke
#

they're pretty much as picky as they used to be, they just crash the entire game now instead of failing silently

#

(but at least they tell you exactly what you did wrong)

tacit pebble
#

but is that only me think it's better now than before? ๐Ÿ˜›

bronze yoke
#

anyone who says it isn't is a liar

#

but it crashing the game is kind of annoying

old ginkgo
#

And even if it doesn't crash the game; some really weird bugs for if you have incorrect syntax. Most famously the 'dissappearing map and vehicle UI' bug.

#

Super odd.

fading horizon
#

could somebody take a look at my code? Im on the last step of updating one of my mods for b42. Im trying to add a sandbox variable for my glasses mod that allows you to make it so when the checkbox is checked, the glasses get the "visualAid = true" property on the item. I've tried the following lua code but it doesnt seem to work. Thank you in advance

local function OnCreatePlayer(playerIndex, player)
    print("goth glasses - Sandbox Variable : Visual Aid")
    print(SandboxVars.GothGlasses.VisualAid)
    local glassesList = {"GothGlasses.Glasses_GothPentagram","GothGlasses.Glasses_GothCoffin","GothGlasses.Glasses_GothWings","GothGlasses.Glasses_GothRazor","GothGlasses.Glasses_GothRetro"}
    for k,v in pairs (glassesList) do

        local item = ScriptManager.instance:getItem(v)
        if item then
            if SandboxVars.GothGlasses.VisualAid == True then
                item:DoParam("VisualAid = TRUE")
            end
            print("added Visual Aid Tag to : ")
            print(item:getName())
        end
    end
end```
#

i dont think item:DoParam("VisualAid = TRUE" is actually doing what im intending it to do and i may need to use a different function, but im lost and havent done this in a very long time

#

because when starting with shortsighted and equipping my glasses with the sandbox variable selected (which the code is able to read as true), the glasses dont improve vision. Leading me to believe they do not have the visualAid = true property afterall

#

for reference my sandbox-options.txt is as follows


option GothGlasses.VisualAid {
    type = boolean,
    default = false,
    page = GothGlasses,
    translation = GothGlasses_VisualAid,
}```
#

and sandbox_EN translation is

    Sandbox_GothGlasses = "Goth Glasses",
    
    Sandbox_GothGlasses_VisualAid = "Visual Aid",
    Sandbox_GothGlasses_VisualAid_tooltip = "Use if you are using the short sighted trait to turn these glasses glasses into perscription glasses.",
}```
bronze yoke
#

if you're doing it OnCreatePlayer, it's too late to change the properties of items already in your inventory

#

do it OnInitGlobalModData

old ginkgo
#

I also could be wrong; but I thought I'd heard rumors that VisualAid = TRUE also simply does not work at the moment unless you spawn with the item.

fading horizon
#

i wasnt trying to do it for items in inventory, i was trying to change the items property globally i guess? I dont know if thats the correct approach because i havent done it in forever

old ginkgo
#

Even vanilla glasses that say 'prescription' etc on them do not work for the player.

#

But I only saw others discussing this; so I could be wrong.

fading horizon
old ginkgo
#

Yeah; I'm not sure myself. May be worth checking to see if it works in the first place to sanity check? I've not investigated it myself yet.

fading horizon
#

yeah ill try that. If not, im scrapping the idea because the rest of the update is finished and ready and this has held me up for 12 hours

#

thank yall for the assistance

bronze yoke
#

well if you want it to work globally you need to do it before OnCreatePlayer or it won't affect items in the inventory either way

fading horizon
#

ill give that a shot real quick

#

one moment

#

so a few things to note

#

still not working however

open drum
fading horizon
#

I made these two changes to the script file to debug if setting the item as visualaid as a baseline fixes it.

        VisualAid = TRUE,
    }```
``` item Glasses_GothCoffin {
        VisualAid = FALSE,
    }```
#

spawning in this time with short sighted trait, my sandbox variable checked.

  • default prescription glasses : Fix vision as intended
  • Pentagram glasses (*hardcoded **true *visualaid) : functional eyewear and fixes vision
  • coffin glasses (*hardcoded **false *visualaid) : non functional eyewear, doesnt fix vision

wing glasses (*does not declare **visualaid *setting in script file) : non functional eyewear, doesnt fix vision

#

this means declaring it in the script file as true works but somehow trying to apply the property via a sanbox variable is not working

#
local function OnInitGlobalModData(isNewGame)
    print("goth glasses - Sandbox Variable : Visual Aid")
    print(SandboxVars.GothGlasses.VisualAid)
    local glassesList = {"GothGlasses.Glasses_GothPentagram","GothGlasses.Glasses_GothCoffin","GothGlasses.Glasses_GothWings","GothGlasses.Glasses_GothRazor","GothGlasses.Glasses_GothRetro"}
    for k,v in pairs (glassesList) do
        local item = ScriptManager.instance:getItem(v)
        if item then
            if SandboxVars.GothGlasses.VisualAid == True then
                item:DoParam("VisualAid = TRUE")
                print("added Visual Aid Tag to : ")
                print(item:getName())
            end
            
        end
    end
end

Events.OnInitGlobalModData.Add(OnInitGlobalModData)
fading horizon
#

is item:DoParam("VisualAid = TRUE") not the correct way to declare a new property or change one? like is doParam() not the way to apply a new propety such as visualAid?

#

sorry, its been a long time since ive done this, I have a ton i gotta update for b42, and im kinda lost because i havent touched lua in over a year

bronze yoke
#

hmm, that should be correct yeah

#

oh!!

#

you capitalised True

#

it's lowercase in lua ๐Ÿ˜…

eager imp
#

Dinosaur mod that adds wild dinosaurs that can attack you or ones you can domesticate for food and materials. If i get good at modding i think im gonna make it

#

I have no idea how it would be balanced but it would be fun to make i feel like

ebon dagger
crystal canyon
#

oooh nice, I was reading up on how to add a station and even downloaded worlded

ebon dagger
#

So, this version actually uses the same system as the automated broadcast system.

#

Which lets you do things like, call functions in the middle of a broadcast.

crystal canyon
#

sounds interesting

tranquil reef
fading horizon
#

that was indeed the issue and now everything functions as intended

#

thank you very much i really appreciate it

#

first mod update of b42 is about to go live hap many to come

old ginkgo
#

Anyone have a good example of making sandbox options that modify a modded items loot distributions? I want to be able to make my mod's item spawns variable with sandbox options but having a frame of reference to work off of would be ideal.

icy yarrow
#

I'm about to give up. Recipes show up fine on new save, but if I continue a save it "Reloads Lua" to vanilla

fading horizon
#

just for clarification, the file structure is like this if i want to update my mod to be both b41 / 42 compatible right?
inside main mod folder is the b41 files then everything else is in b42 again?

crystal canyon
#

your mod makes me think that you listen to podcasts like communion after dawn @fading horizon

fading horizon
#

its not for distribution but changed an item parameter

#

but maybe relevant

fading horizon
old ginkgo
old ginkgo
fading horizon
#

lemme write something up that i think would work

#

1 sec

#
require "Items/ProceduralDistributions";
require "Items/Distributions";

if SandboxVars.youruniqueID.yourmodOptionName == true then
    table.insert(ProceduralDistributions.list.ChangeThisForWhateverLocationYouWant.items, "GothGlasses.Glasses_GothPentagram")
    table.insert(ProceduralDistributions.list.ChangeThisForWhateverLocationYouWant.items, 1);
else
    table.insert(ProceduralDistributions.list.ChangeThisForWhateverLocationYouWant.items, "GothGlasses.Glasses_GothPentagram")
    table.insert(ProceduralDistributions.list.ChangeThisForWhateverLocationYouWant.items, 1);
end
#

i think it would just be something like this in your distribution file?

#

check for option, use if else to control the flow to decide the option and probability

#

thats how i think it would be set up for my mods structure at least

old ginkgo
#

Hm, I do think that would work..but it would require possibly triplicating all of my table.insert entries due to just the sheer volume of items I'm adding, so it would be..messy. I was working on something that would parse the SandboxVars as a numbered result/value so I could just do something like this;

table.insert(ProceduralDistributions["list"]["HotdogStandDrinks"].items, "Mixology.GatoradeCool-Blue");
table.insert(ProceduralDistributions["list"]["HotdogStandDrinks"].items,  SandboxVars.Mixology_ItemChance * 10.20);
#

But I can't quite figure out how to convert the options cleanly into a numeric variable because my brain is small.

fleet bridge
fading horizon
#

sorry that was my best guess

#

i just updated the first of my mods to b42 yay

#

hope yall enjoy

old ginkgo
agile heath
fleet bridge
#

local weaponCacheData = {
        PawnShopGunsSpecial = 0.02,
        MeleeWeapons = 0.04,
        PoliceStorageGuns = 0.02,
        PawnShopKnives = 0.01,
        BarCounterWeapon = 0.001,
        GunStoreAmmunition = 0.01,
        WardrobeMan = 0.000001,
        GunStoreDisplayCase = 0.02,
        PoliceStorageAmmunition = 0.01,
        ArmyStorageGuns = 0.01,
        GunStoreShelf = 0.02
    }

    for distribution, chance in pairs(weaponCacheData) do
        table.insert(ProceduralDistributions.list[distribution].items, "WeaponCache")
        table.insert(ProceduralDistributions.list[distribution].items, chance)
    end```
tacit pebble
silent zealot
#

That can help you narrow down what is going on.

agile heath
silent zealot
#

No idea, but that is normal. Or at least, I get a bunch of those too

#

I'm guessing it's something to do with mods in teh mods folder not having a "workshop" folder structure

#

if you have a crash, look to the end of file.

agile heath
#

it says "no error" everywhere but I'm not a programmer. maybe I'm missing something

silent zealot
#

I'm not a programmer
I'll let you in on a secret: most programmers have no idea what they are doing.

tacit pebble
#

log is normal, seems okay. I don't think this will cause the problem, but......
you have folder name "41", instead "common"
maybe check that?

#

actually, CTD without any warning is not normal from Lua mod in PZ

silent zealot
#

chuck the whole console.txt file up on pastebin.

#

Or maybe you can upload the file to this channel, not sure if that will work.

#

we'll see if we can give some useful hints.

silent zealot
#

right after those last lines is where it should start loading the lua from your mods

#
LOG  : General      f:0, t:1735522084304> ERROR: mods isn't a valid workshop item ID
LOG  : General      f:0, t:1735522084308> ERROR: mods isn't a valid workshop item ID
LOG  : General      f:0, t:1735522084311> ERROR: mods isn't a valid workshop item ID
LOG  : Mod          f:0, t:1735522084330> loading \NepNearbyTraps
LOG  : Mod          f:0, t:1735522084331> loading \qdx_item_condition
LOG  : Mod          f:0, t:1735522084333> mod "\qdx_item_condition" overrides media/lua/shared/translate/en/ui_en.txt
LOG  : Mod          f:0, t:1735522084333> loading \REORDER_CONTAINERS
LOG  : Mod          f:0, t:1735522084335> loading \LAWLYPOPS_TPMSINDICATOR
LOG  : Mod          f:0, t:1735522084336> mod "\LAWLYPOPS_TPMSINDICATOR" overrides media/lua/shared/translate/de/sandbox_de.txt
LOG  : Mod          f:0, t:1735522084336> mod "\LAWLYPOPS_TPMSINDICATOR" overrides media/lua/shared/translate/en/sandbox_en.txt
#

If there was a syntax error it should spit out the syntax error

#

And after the lua is all loaded it should start loading scripts... but it's not getting that far (script parsing can be fussy)

crystal canyon
#

Can we no longer boil water?

#

been like this for like 3 in game hours

silent zealot
#

Pretty sure you can't now

#

Part of the incomplete fluid system rework

#

Two mods to save you: one to wash bandages (rags) in a sink,

bronze yoke
#

wait, seriously? that makes one of my mods a bit more insane than it's meant to be

silent zealot
#

one to rollback water collectors so you can build collectors with right-click again, which are different to the build menu collectors because they works with plumbing sinks.

crystal canyon
#

im screwed or i need to make water never shuts off lol

silent zealot
#

hahahaha

#

hence the "two mods to save you"

#

I've got one working sink hooked up to water collectors, and I can wash rags/clothes/myself in there.

#

But without mods, what a mess - only was to get clean was to hike to a lake.

crystal canyon
#

at least this cabin is close to a lake lol

silent zealot
#

Did you just install DIY Schematics?

crystal canyon
#

no

silent zealot
#

It shouldn't cause any issues like that, but I did spend too long trying to make sense of the doLiteratureMenu stuff

empty frost
#

Does anyone have any handy resources for the process of creating a custom zombie with a custom model and animations? Such as those featured in mods like screamers, nemesis, tank zombie, the nightmare creatures in occult zombies, the lone zombie that just follows the player through the entire map and is invincible, etc.

I have an idea for adding a monster into the game and I'm looking for a direction to start. Currently my only idea is just picking through a mod someone else made to see if I can get an idea for the process, but that's about it

tacit pebble
#

is there way to see ALL recipes in debug?
not only building and basic crafting menu, but also specific workbenches (like furnace, spinning wheel ...)

#

sorry hard to explain in English

undone elbow
#

What if a mod "replaces" a vanilla file?

undone elbow
crystal idol
#

Hi, I have a backpack mod for build 41, could you give me a link to read what I should adjust to make it compatible with b42?

crystal canyon
#

its a quick and dirty patch until indie stone fixes the issue

#

check pinned messages @crystal idol

undone elbow
#

I see. I'm just trying to say that the best way (by using lua files) makes that the mod won't break anything when indie stone fires a patch whatever they fix.

#

I see that changes are too small

crystal canyon
undone elbow
#

It could be

local SM = ScriptManager.instance
local item = SM:getItem("Base.Saucepan")
if item then
  item:DoParam("IsCookable = true")
  item:getTags():add("Cookable")
end
tacit pebble
crystal canyon
#

ill check as well

tacit pebble
#

many thanks. i'm at my work now so i can't play pz now ๐Ÿ˜ญ

crystal canyon
ebon dagger
#

I am currently unable to enable my mod after adding a second file to the required mods.
Anyone see any syntax issue with the line

require=\MoodleFramework;\LookLibrary,

crystal canyon
#

require=\MoodleFramework,\LookLibrary

ebon dagger
#

Ty ty.

empty frost
#

Thank you much!

crystal canyon
#

and even less spinning wheel ones

tacit pebble
#

were you able to see them without furnace?

#

anyway I'm about to home I'm gonna try too ๐Ÿ˜‰

#

thanks

crystal canyon
#

no, you need to be near the required workstation

tacit pebble
# crystal canyon no, you need to be near the required workstation

ah, sad. i see. again, thanks.
btw that was what I was asking about. I was tired from build everything everytime, when i create a new save, just because I wanted to do little test.

or maybe I'm gonna make new function to check all recipes from single window. have a good day bro.

crystal canyon
#

you can see all recipes in dev mode, but it is not intuitive

stiff fiber
#

Hey guys! I finally have some time to update my car mods to make them compatible with build 42 unstable. Could you tell me what the procedure is please? And will making my mods compatible with build 42 unstable make it incompatible with build 41?

exotic fox
#

Well, I have a fix for the cursed crops problem in b42. In \media\lua\server\Farming\SPlantGlobalObject.lua, three lines (174, 188, and 202) need to have their logic tests wrapped in parentheses to evaluate correctly--or at least what I think is correct based on what I presume those lines are trying to do. I don't know LUA and I'm tired as hell so I might have messed up my interpretation. But testing in debug mode suggests this will keep plants from being marked "cursed" incorrectly and allow the isSowMonth, isBestMonth, and isRiskMonth functions to evaluate and return correctly.

function SPlantGlobalObject:isSowMonth()
    if getSandboxOptions():getOptionByName("PlantGrowingSeasons"):getValue() == false then return false end
    if not (self or self.typeOfSeed) then return end
    local prop = farming_vegetableconf.props[self.typeOfSeed]
    if not prop then return end
    if not prop.sowMonth then return false end
    for i = 1, #prop.sowMonth do
        if getGameTime():getMonth() == prop.sowMonth[i] then
            return true
        end
    end
    return false
end

The original was written if not self or self.typeOfSeed then return end causing the function to terminate prematurely. Since I don't know shit from ass in this department, I'd like someone to check my work. I also don't know if it is possible to dump this onto the Workshop for general consumption or not, but... if someone who knows how to mod wants to do it, it would probably make a lot of aspiring b42 farmers happy.

bronze yoke
#

it should probably be if not self or not self.typeOfSeed

#

but it's extremely strange to check self at all

#

if self is nil there shouldn't be anything to call the function in the first place

#

but yeah, that's definitely a mistake

full escarp
#

what is the correct way to iterate over BodyParts from BodyDamge:getBodyParts to get the BodyPartType ?

silent zealot
#

Short version is you leave everything as-if for B41, add "common" and "42" folders that will be looked at by B42.

full escarp
silent zealot
#

Then you test the mod and see if you need to update the stuff in it for B42 - some things work fine with no change.

stiff fiber
crystal canyon
#

i noticed most car mods need tweaking. They spawn with tires 1/4 under the ground

#

as long as you leave media, mod.info and the image outside, it wont

#

just create the common and 42 folders and copy your mod into it. edit the 42 mod if needed to work with 42

bronze yoke
crystal canyon
stiff fiber
crystal canyon
#

no, common and 42 go in same folder as the media one you already have

bronze yoke
#

it is best if possible to place assets in common and things like lua and scripts in 42

crystal canyon
stiff fiber
#

Oh

#

Okay

crystal canyon
#

what albion said is good for future proofing your mod, just change code in one folder and no need to keep duplicating files making your mod bulkier

stiff fiber
bronze yoke
#

yeah

stiff fiber
#

Thank you both very much!

crystal canyon
#

no problem, glad you got it working

#

I really cant live without KI5 cars, or at least Filibuster

#

vanilla ones are... too plain

silent zealot
#

Going ahead, you can have common 42 42.0 42.0.2 folders, and teh more specific ones overide files in the other ones.

#

So you can put your textures and models in common, your lua code in 42, and then when 42.1 needs one lua file repaled put just that file in the 42.1 folder.

#

..I think I just repeated what was already said because I didn't scroll back 5 lines.

#

I blame being up at 1am trying to figure out how the $%#@ to get leather

#

I killed 1290 zombies without injury then a $#@!ing cow gored my in the crotch and tore my skinny leather pants.

exotic fox
#

The longer I stare at the farming code, the more issues I see. Long-period crops not having the ability to survive their grow periods, things like that.

silent zealot
#

Not a problem, most players don't have the ability to survive the crop grow periods either. ๐Ÿ˜‚

fathom bison
#

Then butchering code only giving 4 steaks on a fully grown cow...?

silent zealot
#

This is two cows, four pigs and three sheep.

fathom bison
#

I made a mod to fix that ๐Ÿ˜‰

silent zealot
#

Look at this! a 78 calorie steak!

silent zealot
#

Too late for these animals, but I really needed their hides not their meat.

fathom bison
#

Rebalanced Butchering

#

If you read the description you could just modify the values yourself because I just hardcoded some buffed values and removed a dumb multiplication by body size (used for pathfinding...)

silent zealot
#

Subscribed

fathom bison
#

Remember to enable it on your save too, I always forget.

silent zealot
#

I'll do that before I kill any more animals.

#

This massive multi-day sidequest has all been to get leather to make bellows to make a forge

#

Because using one of the electric blower fans I looted would be too easy.

#

Now I need a wooden bucket, because a metal bucket is not acceptable... hope that is easy

#

Narrator: it was not easy

fathom bison
#

Iron Band - small...?

#

Good luck!

silent zealot
#

not craftable. ๐Ÿ˜ญ

trim bough
#

Does anyone know if there is a planned feature not released yet that will add a way to carry multiple small animals, like baby sheep or chicks. or will we need a mod created for that?

fathom bison
#

Yea and where on earth do you find a "CrateBlacksmith" that is the only place is spawns...

silent zealot
#

For schematics?

#

This is what I ended up doing:

#

Making an entire mod was quicker than finding a single useful schematic.

#

Won't fix the iron band issue though, so I'm cheating those in.

fathom bison
#

Ooo that's nice, better than spending my life searching for knapping recipes...

silent zealot
#

I need to do a notepad run and brainstorm some schematics to find something to level up on, but I can build a new forge without that (ignoring the fact that 1990s kentuckky lacks the technology to bend an iron bar into a loop)

#

At least we know the crafting is incomplete and full of known gaps.

fathom bison
#

I've been tempted to keep adding missing recipes but it would be pointless since it would all be made obsolete pretty quick in the new year.

#

I added one for long sticks (just for myself) because that was absurd to make a drying rack

silent zealot
#

BEHOLD!

#

And this stupid thing didn't even use the bucket, I still have it. ๐Ÿ˜‚

crystal canyon
silent zealot
#

Not specifically, but they listed a few things as coming for B42

#

Including new crafting system and trapping

fathom bison
silent zealot
#

It's pretty clear the crafting and fluid systems need a lot more work... I currently have 33 bowls because they keep getting duped by recipes.

#

Drinknig 30mL of alcohol will max out yoru hunger and thirst meters for zero calories

#

etc etc

#

My character is less excited than me about having a working forge.

fathom bison
#

I just drank a coffee... not only did the entire coffee can get consumed but the mug absolutely woke me up... It's 7:00 PM in game... frick...

crystal canyon
#

gotcha

silent zealot
fathom bison
#

Thanks for the idea, I'm gonna make the Bourbon water cooler

stiff fiber
#

There are some really weird stuff going around with crafting in general. I can't cut pizzas into slices, I can't make bowls of stew or soup, options keep disappearing from the crafting menu even if I have the necessary items

#

Just to name a few

crisp fossil
#

hi, I'm trying to get the native mod options work but there are some issues. I already initialized my ModOption but now I'm trying to get its value. I tried it like this
initialize code:

local PZOptions = PZAPI.ModOptions:create("MyConfig", "My Settings")
PZOptions:addTickBox("sample", getText("UI_options_sample"), false, getText("UI_options_sample_tooltip"))

usage:

local newOptions = PZAPI.ModOptions:getOptions("MyConfig")
local option = newOptions:getOption("sample")
print(option)

tried to print option and it returns nil. what could be the issue?

bronze yoke
#

in my implementation i stored the result of addTickBox

#
Config.hideCursorAfterDigging = options:addTickBox("Excavation_HideCursorAfterDigging",
                                                   getText("IGUI_Excavation_Options_HideCursorAfterDigging"),
                                                   true,
                                                   getText("IGUI_Excavation_Options_HideCursorAfterDigging_tooltip"))
Config.hideCursorAfterDigging:getValue()
bright fog
#

Yeah seems to be the best way to go about it

#

I keep it in a module

#

And can access it from any file

#

Currently doing some tests on mod options to make the wiki page for it

#

Going to reload lua a looooooot lol

#

Seems like my only problem with the system rn is that they did not normalize the separators in between different options

#

Or different mods adding their own options

#

Ooooh wait they did

crisp fossil
#

thank you, in my case i stored the options and just use getOption() and it kinda works (not 100% tested). but ill try to use your suggestion

bright fog
#

Going to make a Wiki page about Mod Options guys, just doing some tests so it'll take some time, but sure do check that example mod, I plan on linking it in the Wiki page too

full escarp
#

is it possible to include some lua code only in debug mode ?

bronze yoke
#

if isDebugEnabled() then

old ginkgo
#

I recall a few people experiencing issues with mode:destroy in crafting recipes, anyone seen behaviour like this?

#

Both the fruit slice and the champagne glass have mode:destroy attributed to them in the recipe but the champagne glass is retained despite it.

full escarp
bronze yoke
#

if you put the definitions inside an if, you can

winged lotus
#

Hi everyone, Build 42 modding question, I struggle to find a clean way to add a Category to the new BuildPanel for CraftRecipe HandCraft, without overriding (which will cause incompatibilities with other mods that may do the same). All I could find is that it does self.logic:getCategoryList(); to get that list which at that point I don't get where it takes it from, maybe it is internal Java?

If you found a way to do that I would gladly take some help ๐Ÿ™

full escarp
#

i mean i can do

--- triggering a wrong Table Access Key to see the table in Debug View
---@type Callback_OnKeyPressed
local function DebugPrint(key)
    if (key == 67) and isDebugEnabled() then
        local table = getPlayer():getModData().ImmunityTable
        print(table["XXX"].flag)
    end
end

but if i could i would rather like to be that this if statement isn't even considered in non debug

bronze yoke
#

remember lua files are just functions, you can use any logic, not like c++ where most things can only be done inside a function

bronze yoke
#

but yeah no preprocessor so no debug asserts without regular runtime cost :(

tacit pebble
full escarp
#

so the best i could do is

if isDebugEnabled() then
    --- triggering a wrong Table Access Key to see the table in Debug View
    ---@type Callback_OnKeyPressed
    local function DebugPrint(key)
        if (key == 67) then
            local table = getPlayer():getModData().ImmunityTable
            print(table["XXX"].flag)
        end
    end
end

that means that the if statement still will be evaluted ? how does it work in lua will it only be evaluted once when the lua file is loaded ?

ebon dagger
#

Anyone know how I can fire a function, with player context, when a radio broadcast line on the emergency broadcast plays?

#

Or I guess, better yet, is there a way to make my own Event fire from server? So that the client side can hook onto it like Events.OnGameStart.Add etc.

round thorn
#

Has anyone seen a B42 mod that simply adds +20 to baseline Carry Capacity? I dont want to go overboard, but the default carry weight is very reqstrictive.

bright fog
#

Nothing changed on that aspect

#

But I'm not aware of any mod that does that

round thorn
#

I know the base carry weight hasn't changed between b41 and b42.

#

Only mods I can find are infinite carry weight, or 1000+. Just too much of a cheat for me.

bronze yoke
#

events aren't synchronised but you can send messages to the client as needed using sendServerCommand and Events.OnServerCommand

kindred grove
#

Feel like I want to make a mod to either reduce the weight of car parts or be able to repair them while they're on the car. Literally killing myself to repair these lol

round thorn
#

several mods already that reduce car part weights

kindred grove
#

ooo got a name for one? ill check it out

round thorn
#

b42?

kindred grove
#

b41

#

im talkin like bullbars and armors etc

full escarp
#

are variables in lua passed by ref or copy ? for example

local PlayerScratchTable = Character:getModData().ImmunityTable
kindred grove
#

workbench is super nice but having to hold and repair a bullbar kills me lol

kindred grove
#

thank you @round thorn

round thorn
#

np

bronze yoke
full escarp
#

so when i want trivial types as ref i need to wrap them in a table?

bronze yoke
#

yeah you could do that

full escarp
#

thanks!

stiff fiber
#

Uhhhh... what the fuck happened here?

round thorn
#

looks like either the UV is messed up, or there is additional faces overlapping.

#

or the normals are messed up.

#

guesses on my part, im not familiar with modding PZ.

stiff fiber
#

It worked prefectly in build 41 for reference

#

It does look like a messed up UV but that's impossible

#

I didn't even touch it

#

Neither the model nor the texture

karmic wedge
stiff fiber
leaden flame
#

Hello guyes! I had a problem, i cant get sandbox-options for my mod, it is not appearing in sandbox section, what can be causing issue? No log errors
i had sandbox-options in Alcoholic's Paradise_V2\media\sandbox-options.txt


option AlcoholicsParadise.CanonSpawnChance
{
    type = enum, 
    numValues = 6, 
    default = 1,
    page = AlcoholicsParadise, 
    translation = Sandbox_AlcoholicsParadise_CanonSpawnChance,
    valueTranslation = Sandbox_AlcoholicsParadise_CSpawnChance,
}

option AlcoholicsParadise.NonCanonAlcoholChance
{
    type = enum, 
    numValues = 6, 
    default = 1,
    page = AlcoholicsParadise, 
    translation = Sandbox_AlcoholicsParadise_NonCanonAlcoholChance,
    valueTranslation = Sandbox_AlcoholicsParadise_NCAlcoholChance,
}

option AlcoholicsParadise.ZombieLootSpawn
{
    type = enum, 
    numValues = 6, 
    default = 1,
    page = AlcoholicsParadise, 
    translation = Sandbox_AlcoholicsParadise_ZombieLootSpawn,
    valueTranslation = Sandbox_AlcoholicsParadise_ZLootSpawn,
}```
#
    
    Sandbox_AlcoholicsParadise = "Alcoholic Paradise V2 Reworked",
    
    Sandbox_AlcoholicsParadise_CanonSpawnChance = "Canon alcohol chance spawn",
    Sandbox_AlcoholicsParadise_CanonSpawnChance_tooltip = "The spawn rate of a canon alcohol",
    
    Sandbox_AlcoholicsParadise_CSpawnChance_option1 = "Insanely rare",
    Sandbox_AlcoholicsParadise_CSpawnChance_option2 = "Extremely Rare",
    Sandbox_AlcoholicsParadise_CSpawnChance_option3 = "Rare",
    Sandbox_AlcoholicsParadise_CSpawnChance_option4 = "Normal",
    Sandbox_AlcoholicsParadise_CSpawnChance_option5 = "Common",
    Sandbox_AlcoholicsParadise_CSpawnChance_option6 = "Never",

    Sandbox_AlcoholicsParadise_NonCanonAlcoholChance = "Alcohol non-canon chance spawn",
    Sandbox_AlcoholicsParadise_NonCanonAlcoholChance_tooltip = "The spawn rate of a non-canon alcohol",
    
    Sandbox_AlcoholicsParadise_NCAlcoholChance_option1 = "Insanely rare",
    Sandbox_AlcoholicsParadise_NCAlcoholChance_option2 = "Extremely Rare",
    Sandbox_AlcoholicsParadise_NCAlcoholChance_option3 = "Rare",
    Sandbox_AlcoholicsParadise_NCAlcoholChance_option4 = "Normal",
    Sandbox_AlcoholicsParadise_NCAlcoholChance_option5 = "Common",
    Sandbox_AlcoholicsParadise_NCAlcoholChance_option6 = "Never",

    Sandbox_AlcoholicsParadise_ZombieLootSpawn = "Alcohol zombie chance spawn (not work)",
    
    Sandbox_AlcoholicsParadise_ZLootSpawn_option1 = "Insanely rare",
    Sandbox_AlcoholicsParadise_ZLootSpawn_option2 = "Extremely Rare",
    Sandbox_AlcoholicsParadise_ZLootSpawn_option3 = "Rare",
    Sandbox_AlcoholicsParadise_ZLootSpawn_option4 = "Normal",
    Sandbox_AlcoholicsParadise_ZLootSpawn_option5 = "Common",
    Sandbox_AlcoholicsParadise_ZLootSpawn_option6 = "Never (Not recommend)",

}```
round thorn
#

@leaden flame use three back-ticks (tild key to left of the 1) before and after code to format it.


option AlcoholicsParadise.CanonSpawnChance
{
    type = enum, 
    numValues = 6, 
    default = 1,
    page = AlcoholicsParadise, 
    translation = Sandbox_AlcoholicsParadise_CanonSpawnChance,
    valueTranslation = Sandbox_AlcoholicsParadise_CSpawnChance,
}

option AlcoholicsParadise.NonCanonAlcoholChance
{
    type = enum, 
    numValues = 6, 
    default = 1,
    page = AlcoholicsParadise, 
    translation = Sandbox_AlcoholicsParadise_NonCanonAlcoholChance,
    valueTranslation = Sandbox_AlcoholicsParadise_NCAlcoholChance,
}

option AlcoholicsParadise.ZombieLootSpawn
{
    type = enum, 
    numValues = 6, 
    default = 1,
    page = AlcoholicsParadise, 
    translation = Sandbox_AlcoholicsParadise_ZombieLootSpawn,
    valueTranslation = Sandbox_AlcoholicsParadise_ZLootSpawn,
}```
bronze yoke
#

if your mod is already published, make sure to unsubscribe before editing sandbox options, they in particular are known to have loading issues

fading horizon
#

can someone point me towards where vehicle distributions are? Like for gloveboxes and such

stiff fiber
#

part Glovebox
{
container
{
capacity=X,
}
}

marble turret
#

Hey guys, planning on attempting to fix the propane/battery depletion on load bug. Has anyone beaten me to it? Couldn't find anything on the workshop but don't want to duplicate work. Also, any general tips on where to start?

full escarp
#

what are some good indicators, when i need a server sided component to my mod?

marble turret
#

A good heuristic is that if someone would be incentivized to cheat in some way, that system is likely to be server-side.

#

I know this update moved most inventory and crafting features server-side

#

Movement is typically done client-side and synced regularly (in most games)

full escarp
#

so for example when i make a mod which tinkers with infections and such, it would be a good idea to make it server sided as its probably prone to be cheated on

marble turret
#

My gut says yes

umbral ingot
#

Anyone know a good flow for modifying shader uniform values at runtime?

full escarp
#

when i make a server part for my mod, is the client sided part still active? as in how can i make the mod SP and Server compatible? when i move most of the logic to the server part, it wouldn't be useable in SP would it

marble turret
#

Getting a little bit out of my depth, but many games have an internal "server" even for SP, so I would assume that the server part will work the same in SP

old ginkgo
umbral ingot
full escarp
#

then i can move most of my stuff to server and just implement some communication to the player

bronze yoke
#

pz's singleplayer doesn't use an internal server like some other games

#

it's literally one process, singleplayer can behave very differently to multiplayer

full escarp
finite scroll
#

can shaders be replaced

#

i'm assuming not

#

but might as well ask

icy yarrow
#

Which is why I'm not releasing one mod until the multiplayer is out. I don't quiet understand how to ensure syncing is correct for item stats

bronze yoke
#

you can't do anything too fun with them though, there's no support for passing uniforms

#

but if you can make do with what the game has you can just replace shaders by regular file overrides

finite scroll
#

nice

#

just to be clear, they're replacable through mods, not just editing the vert/frag files right?

bronze yoke
#

yeah, i'm pretty sure anyway

finite scroll
#

alr sweet

bronze yoke
#

if you have one in your mod with the same filepath it should override the vanilla one, like lua or script files would

finite scroll
#

good to know

torn igloo
full escarp
ancient grail
icy yarrow
#

Wouldn't it just be easier to just ensure quality of players on a private server? (For the cheating issue)

umbral ingot
torn igloo
full escarp
full escarp
#

but as you say it may be overkill and unnecessary

balmy swan
#

I'd personally go for the lure method. Put some goodies in your item list that any hacker would LOVE to spawn in and use to cause chaos. Then the moment it's in their inventory, flag them with player moddata that closes their game whenever they hop on

ancient grail
#

also the way they cheat is by using using java so you wont really be able to track it im afraid
unless someone knows how

bronze yoke
full escarp
#

i just dont want to ruin the fun of other people that uses this mod on their public server maybe

bronze yoke
#

it's a java game with an extensive modding api, it will never be secure even ignoring all the security holes it currently has

#

in b41 mp hackers are basically omnipotent so there's not much reason to design around preventing them from exploiting your systems

bronze yoke
#

from what i've seen of b42's code it looks like the client will be much less powerful and you will have the ability to keep more of your code to the server, but i also don't think there's much point designing around a system we have no idea of the details of yet

marble turret
#

@full escarp yeah I didn't mean to suggest that making something server-side would prevent cheating, just that it's a quick way to guess whether a system is implemented on server/client

bronze yoke
#

to be honest that's kind of not really accurate in pz, at least in build 41

#

basically everything exploitable is on the client

#

inventory is, health is, etc

marble turret
#

Trust her^, I'm new to PZ modding

full escarp
#

okay then, i will leave it to the client yet and just look what happens

bronze yoke
#

it's a good rule for most other games but b41's multiplayer is just kind of incredibly insecure

#

in general just, nearly everything is on the client

#

i'm pretty sure the game still launches with a warning saying 'do not play public multiplayer' for this reason lol

tranquil reef
#
  1. How do I have a dropdown in sandbox settings
  2. Is it possible to make options show only if bools are active?
full escarp
#

isn't public multiplayer a big thing in pz ? i just play on a private dedicated but thought it was big thing

bronze yoke
#

i think it is fairly popular but the encouraged way to play is private

tranquil reef
#

Because the base game has headings & the bool affecting options thing

round notch
#

Even if the client is more secure they have cheat engine. They can just change it from temporary memory. You'd never be able to prevent in PZ

bronze yoke
#

the base game's sandbox options aren't done in a moddable way, mods do them separately

#
  1. you can have a drop down list with the enum sandbox option type
  2. no (unless you modify the ui lua yourself to do it)
finite scroll
#

how should i properly set whether something has been read? (not page-based skill books, just filler books)

crystal canyon
#

this mod mostly works but its not ready for consumption by the masses.

#

It is only a numerical value for the drop down, then you use the translation to give them a readable name

crystal canyon
#

is it me or do cars feel "heavier" now

finite scroll
#

if i had to guess they probably tweaked the physics to make them less uh

#

source engine esque

#

less flinging and midair 360s yknow

crystal canyon
#

yeah, but at the same time, makes them feel more sluggish

finite scroll
#

controls def aren't as tight yeah, lot easier to slip off and crash making fast harsh turns

north raven
#

I'm on Build42 but I'm not seeing my mod in the list of mods. Even after changing the structure of it in my workshops folder to what the guide says.

north raven
#

Actually I may have it, everything is slowly coming back to me, it's been a while since I updated.

eager imp
#

do we have update building 42 tutorials for vehicles?

willow mountain
#

bruhhh i can't mod on linux especially mod menu it's just get to default over and over and over but via proton is working perfectly

#

i don't know now if even my mods works fine on windows

crystal canyon
#

yeah, linux is weird. it seems to like to load files in different order

#

i was using zorin but went back to windows 10

willow mountain
#

im on linux mostly year and i don't want to go on windows anymore but now do i have to setup vm for debuging??

#

i was crushing my head all this days why mod menu doesn't work

#

๐Ÿ˜ญ

crystal canyon
#

that might be a solution

bronze yoke
#

there's some problems with the linux native build and the new mod structure right now

willow mountain
#

so far in gameplay i had no issue maybe some quirky audio that dissapears and eating 16gb of ram

full escarp
#

is SayDebug also happening in non debug?

north raven
#

Anyone else have z-fighting issues when placing flat things on the ground now?

kindred grove
#

Got it in my right mind to bribe the maker of FrikisClothes to not allow you to run over the Superman zombie but instead its like you ran into a wall.

crystal canyon
bronze yoke
#

i wasn't really paying attention to it because i don't use linux but there was something about it adding the cache directory twice

autumn temple
#

Ight, I will keep an eye out

half oar
steep vortex
#

Hi! I'm trying to write a little bit of code to check if the player is wearing at least three items from a set. So far, it appears not to be working. Please could I ask for a second pair of eyes to look at it?

    player:Say("This is a custom slice!")
end

local function wearingPostalUniform(items)
    local postCount = 0
    local postalWorkerSet = { "STR.Bag_DuffelBag_USPS", "STR.Hat_BaseballCap_USPS", "STR.Hat_BaseballCap_USPS_Reverse" ,"STR.Jacket_USPS","STR.Shirt_USPS","STR.TShirt_USPS","STR.Trousers_USPS", "STR.Shorts_USPS","STR.Shorts_ShortUSPS","STR.Bag_Satchel_USPS"}

    for i=0, items:size()-1 do
        local item = items:get(i):getItem();
        if postalWorkerSet[item:getFullType()] ~= nil then
            postCount = postCount + 1
            if postCount == 3 then
                return true
            end
        end
    end
    return false
end

function MailIconsFoot(menu, player)
    local items = getPlayer():getWornItems()
    if wearingPostalUniform(items) then
        menu:addSlice("What's This?", getTexture("media/ui/emotes/shrug.png"), onExample, player)
    end
end

EmoteMenuAPI.registerSlice("DeliverMailFoot", MailIconsFoot)```
#

As far as I can tell, wearingPostalUniform is always returning false even if 3 or more items in that list are worn

bright fog
steep vortex
#

Sorry, yeah. So main way I've been testing it is whether or not the slice for the radial API appears.
No if statement will show the slice but the current one isn't. What's the best approach to check variables as you go when modding zomboid?

bright fog
#

So here, I would add like print("passing check") after your check for the items

#

after if wearingPostalUniform(items) then

#

To at least see if the problem is not the function addSlice

#

If don't manage to get a print, that means the problem is from your check function

#

I would print at each step of the for loop

#

I would after the check if the item is in the table

bright fog
bright fog
#

That's an array you got here, not a key table

willow mountain
bright fog
#

So of course that will output nil your table check

#

You need to have each string entry be associated to a true statement

steep vortex
#

Ah. Shoot. Sorry. Normally work in c# or c++
What's the right declaration for tables?

bright fog
#
local checkTbl = {
  ["yourItem"] = true,
  ["nextItem"] = true,
  ...
}
#

That way you have a key table

steep vortex
#

Also wasn't helping myself by having the workshop item downloaded. Making an update for a server's mod and had quickly loaded back in to check something but forgot to unsubcribe

#

Thank you for the time and patience.

bronze yoke
steep vortex
steep vortex
dense belfry
#

Question.

bright fog
#

Answer.

dense belfry
bright fog
#

lmao

dense belfry
#

I'm a Steam Deck user.

crystal canyon
#

Question

dense belfry
#

What's your question?

tacit pebble
#

VS Code - HIGHLY SUGGESTED, a community addon for Project Zomboid typing exists for it.
what, did we have an add-on for VS Code?

crystal canyon
#

Whos ready to say good bye to 2024? lol

dense belfry
#

fuckin me right here.

bright fog
tacit pebble
#

I've missed out on half of my life ๐Ÿ˜ฎ

crystal canyon
tacit pebble
#

thanks for tagging ๐Ÿ™‚

bright fog
#

It's my next thing

crystal canyon
#

Umbrella-unstable is for B42

bright fog
#

Currently writing Mod Options

dense belfry
bright fog
crystal canyon
#

or how to install mods on steam deck?

dense belfry
#

Plus, you have to jump through Paris and run through Russia at once to get some things done

bright fog
#

Bro idk what you're smoking

dense belfry
bright fog
#

Yea I fucking do, I wrote that wiki page lmao ?

dense belfry
bright fog
#

Well anyway if you want modding help, that's the place, I linked some useful resources to you

#

If you don't welp idk what you want

tacit pebble
bright fog
bright fog
#

Don't hesitate guys if you have feedback or other stuff to say

tacit pebble
#

If i had that one 7 days ago, i didn't need to waste my whole day just because of mod options. anyway thanks for your work. study time ๐ŸŽ‰

crystal canyon
#

that whole page is just plain wrong

bright fog
crystal canyon
#

source: trust me bro

bright fog
#

Worked the entire day testing stuff and shit hahalol

crystal canyon
bright fog
#

Can't tell me that shit Ohfuckmegamode

bronze yoke
#

oh mod options? didn't they remove that in 42.0.3?

bright fog
#

I'd appreciate if their vacation lasted a bit more than 2 weeks lmao

crystal canyon
#

hahahahaha

bright fog
#

I feel like there's some useful things like searching in an entire folder of files which I could explain too

bronze yoke
#

should probably make it about vscode, there isn't too much to say about just umbrella

bright fog
#

Yea figured

bronze yoke
#

would be a good place to write down some of the weird umbrella stuff though

crystal canyon
#

I like opening the whole media folder on vscode and searching for functions and other stuff

bronze yoke
#

not a lot of people realise the Callback_ types exist for example

bronze yoke
#

you can do ---@type Callback_EventName instead of annotating every parameter for an event listener

bright fog
#

Hmm, I mean that'll be explained in the VSCode page then, that's perfect

bronze yoke
#

same thing for any kind of callback, e.g. Item_OnCreate, CraftRecipe_OnTest

bright fog
#

We can explain some of the typings

crystal canyon
#

I got a random selection to welcome 2025. I'll probably be in my room messing with PZ

#

So if your recipes dont have a skill requirement associated with them, they seem to error

bright fog
#

Uh ?

#

@bronze yoke should I link the Unstable github of Umbrella ?

#

Is there a point to it ?