#mod_development

1 messages ยท Page 274 of 1

cobalt plaza
#

pls its still not working i dont know whats wrong with the preview.png

#

or what the issue is

red tiger
#

@drifting stump I think I need to avoid these chats for a bit to preserve sanity.

#

xD

cobalt plaza
#

i put the preview into common

round notch
#

Delete that!

drifting stump
#

.toLowerCase() and a switch

red tiger
#

Switches are optimized in compiler-time too.

#

switch tables > elseif clauses when more than 4 or 5 on the same comparison.

#

It's not that bad when the code only runs once.

#

Bigger issues arise in hotter code.

cobalt plaza
#

i swear it doesnt work haha

#

ok im done it works sry for being dumb lmao

#

thanks a lot

brittle geyser
#

Hey modders, do y'all recommend switching my current development process over to build 42 completely or wait until there's a more stable branch to bulk update my mods? Or do both 41 and 42 development in tandem?

sacred harness
#

How long do you think its going to take you to build out the mod?

#

If you think its going to be some time till its fully completed, I would say B42. If you are almost done, then I would say B41 as that is the stable version and the most played, for now.

#

As mods get updated for B42, more and more are going to migrate over to the unstable build but there will still be players playing B41 for multiplayer until B42 is updated.

#

Those are just my thoughts

brittle geyser
#

fair enough. I have a few mods that are completed and I'll get them updated

sacred harness
#

Not sure if there is a standard yet or not, but dont remove your B41 mod or over write it with B42. I think thats breaking servers.

bronze yoke
#

you'll have to switch to 42 eventually, so it's really about gauging the work it'll take to convert b41 code to b42 code if you wait vs the work it might take if a b42 updates breaks something you already wrote for it

queen oasis
#

it's like they made made b42 specifically to break my last mod

#

ISInventoryTransferAction.GetDropItemOffset is now ISTransferAction.GetDropItemOffset

#

hmm maybe not, that does some funky stuff
maybe if I removed the items from inventory when dropping them, it wouldn't do some funky stuff

slate laurel
#

I'd assume that's to account for new transfer actions like liquids?

tranquil reef
round notch
#

The mod options UI IS FIRE

queen oasis
#

malwarebytes is having an absolute conniption with PZ running

dark wedge
tranquil reef
#

Looked into it more, seems to be no reference to animals outside of animations and stuff defined in lua

#

People managed to get stuff like dogs and human npcs in by modifying and adding actual java class code, so I still have hope. to some degree lol

tired rampart
#

the debug menu has tons of info

maiden thistle
#

so im having a problem with updating my personal mod to b42 and im not sure what happening but there is a hole in the mesh now and the part with the hole can be seen from the back

#

also sorry if this is an easy fix i have no idea how to code and its a miracle it even works

maiden thistle
#

thank you

queen oasis
#

anyone else getting a "Error, container already has id." error or did I break something? ๐Ÿ™‚

quasi kernel
#

@queen oasis I found a way to get the rendering working without flashing or lagging, it was thanks to someone else randomly bringing it up and some keywords finding the message

#

setHighlighted() has a secondary parameter, which defaults to true and roughly equates to rendering for a single frame

#

Setting it to false makes it render consistently until you remove it, which resulted in smooth performance and this final result in terms of an update to generator range

queen oasis
#

very nice!

quasi kernel
#

Also, the Z level was increased and decreased to my knowledge, does anyone have the exact limits now?

#

It used to be 0 and 8 to my knowledge

#

I need to account for it in generator code

bronze yoke
#

32 - -32

maiden thistle
quasi kernel
tranquil reef
#

Where can I find all color references for fluids?

queen oasis
#

just so I have this straight. mod.info in both folders, correct?

#

because if I can break something, I will

finite scroll
#

oh god that's awful

queen oasis
#

I found the thread. it just needs to be in the main folder

finite scroll
#

why are like half of them in camelCase and half in all lowercase

queen oasis
#

looks like something I would do

#

should have thrown some snake case in there for good measure

finite scroll
#

true

finite scroll
#

i'm not super certain of anything atm

#

i think you put it into individual 41/42 if you want specific versions of your mod for 41 or 42

queen oasis
#

what's scary is I found the thread, read it, left mod.info in just the main folder and it broke it so I can't read either

spark raven
#

is telling me i'm missing a mod.info file but it's there, gives me same error on the template too

queen oasis
#

chuck a copy in the 42 folder

spark raven
#

yup that was it

livid pollen
#

anyone know how long it will be till britas updates to b42?

lilac mural
#

Okay, I spent half day to make it work, and I still can't figure out what's wrong

Console gives out error: attempted index: new of non-table: null
It's on line with ISTimedActionQueue.add(RandomAirdrops.UseFlareAction:new(flare, player))

I checked 'flare' and 'player' variables and they're not null. "UseFlareAction" that declared in lua file in timedAction folder is mostly copied from vanilla game.
What's wrong, pls helptired

silent zealot
bronze yoke
#

this error means RandomAirdrops does exist, but RandomAirdrops.UseFlareAction does not exist

finite scroll
bronze yoke
#

when you see attempted index: {SOMETHING} of non-table: null, look for tableName:{SOMETHING} or tableName.{SOMETHING} on that line, the error is telling you tableName is nil

lilac mural
#

Okay, so now I know that problem is definitely in timedAction lua file... Super strange, cause I literally copied most of the code..

dull moss
livid pollen
quasi kernel
#

So uh..

#

Have generators actually been updated to account for the new height limit..?

#

Looking a little at the java side it.. doesn't seem to be the case unless a new method is being used.

chrome jewel
#

Off topic for mod development, but I wondering where to find the old animated menu of unstable within the folrs

lilac mural
chrome jewel
#

I have found the blink video for the new now removed menu screen. One day this can be used to restore it, but I'm happy that I preserved this before I updated

junior jewel
#

any advice for getting started with mod development?

gilded hawk
#

Beautiful people ๐Ÿฅฐ

silent zealot
gilded hawk
# junior jewel any advice for getting started with mod development?

Do it out of passion, not profit (at least when you start)

Spend time looking at other mods, and understand why and how they do stuff, you will spend a lot of time reverse engineering both the game code and other Modder's code.

Pick an IDE you are comfortable with, and use tools to make your job easy, like PZ Umbrella, Sumneko lua extension, etc etc. Treat your modding work space, like you would treat your physical workspace keep it tidy and make it work for you.

Don't be afraid to ask for help as it's okay to be lost at the beginning.

Try to have fun, and be aware that people will always find something to criticize and bitch about, and that not everyone will appreciate the work you do for free.

#

loadModAfter and loadModBefore are new prop right?

lilac mural
#

If a custom item have no 3d model (like in game, not in script) - what could be the problem?
What I mean by that is when I place my item it's literally nothing on the ground...
And it doesn't give any errors

drifting stump
open drum
#

Hey guys this might be a stupid question but what are these tags and flags parameters in items and recipes??? item 1 tags[GlassBottle] mode:destroy flags[Prop1] itemcount,

#

is there any page where i can find more info on how to use them?

#

dont' know how many of those "tags" and "flags" there are already implemented in the game

elfin stump
# open drum Hey guys this might be a stupid question but what are these tags and flags param...

The tag system has to do with using different generic items instead of a specific one, I am not sure exactly how to define a tag yet though. If you look in the items folder in scripts there is quite a few examples though. For flags I think that is to tell it that it is going to be in one of your hands, like prop1 and prop2 is right and left hand prop I think... but not sure exactly how to use these yet.

bronze yoke
#

if they're working like the old tags you don't define them, just put them on items

elfin stump
#

That is what I thought but I got an error, it stated something like "No definitions for this tag" or something similar.

#

I just did a work around using the item mapper though since I don't need mine to be so generic as that.

open drum
#

so if i put [Prop3]] that would throw an error..

elfin stump
#

Has anyone been able to get a recipe to show up in the crafting menu?

#

I think Prop3 doesn't exist, but again not sure, I think it has to do with your hands.

#

I have been able to get recipes into the mod and loaded into a game without a crash but I am not seeing them in crafting menu or in the right click context, even for single item recipes. There may be another layer to it that I am not aware of yet.

bronze yoke
#

i have a working recipe but i don't know many of the details of how the new recipes work yet

#

i can post it as a working example if you'd like

elfin stump
#

That would be awesome! ๐Ÿ™‚

open drum
#

yea yhay would b

bronze yoke
#
module WaterGoesBad {
    craftRecipe MakeTapFilter {
        timedAction = CutClothing,
        Time = 80,
        tags = AnySurfaceCraft,
        category = Survival,
        inputs {
            item 1 tags[Scissors;SharpKnife] mode:keep flags[MayDegradeLight;Prop1;IsNotDull],
            item 1 [Base.PopBottle;Base.WaterBottle;Base.PopBottleRare] flags[IsEmpty;Prop2],
            item 1 tags[Charcoal],
            item 1 [Base.RippedSheets],
            item 1 tags[Tape],
        }
        outputs {
            item 1 WaterGoesBad.TapFilter,
        }
    }
}
open drum
#

flags[IsEmpty;Prop2]

elfin stump
#

So everything is contained in craftRecipe and you got that to show up on the craft menu? Or is there another element to connect it up?

open drum
#

so, this checks if the bottle is empty and is in 2ndary hand?

bronze yoke
#

yeah, this is all i had to do

open drum
#

is there any lists of flags that i can use?

bronze yoke
#

not sure if anyone's made anythingl ike that yet

open drum
#

i see

bronze yoke
# bronze yoke yeah, this is all i had to do

if i remember right, an unintuitive hiccup for me was it didn't show up until i added tags = AnySurfaceCraft or tags = InHandCraft (would have to check if that last one is exactly correct)

elfin stump
#

Okay cool I will take a peek, mine looks a lot like yours, is that timedAction custom or is it built in already?

#

Okay cool I will check that out on tags

#

I saw that in the existing recipes but mine is missing it, that could be it. Will do a sweep. Thanks! @bronze yoke

open drum
#

another question

#

im trying to activate it

#

but when i do accept

cosmic ermine
#

Anyone know what Status_Wired means?

open drum
#

still not working

#

did i do something wrong ?

elfin stump
#

Anyone have any luck with recipe localization files? Can't seem to crack it.

spare burrow
#

Has anyone found any way to alter the aiming reticle width?

bronze yoke
elfin stump
#

\translate\EN

bronze yoke
#

and the file is Recipes_EN.txt?

elfin stump
#

Yep, all looks correct, I have a lot more than one though so I am thinking maybe there is character or something out of place, I am gonna reduce it to one and try and simplify it a bit.

#

Thank you for the reference that helps! Wasn't sure if it was Recipe_ or if I needed the module or anything.

tranquil reef
#

They removed the loading screens, but is it possible for us to add our own and have it select a random one? Basically, did they also remove the code that allows for that or was it just the illustrations themselves

elfin stump
copper abyss
#

agh. this is so frustrating.

#

can somebody help me out with this? I've looked and tried and tried but no matter what I do I am missing mod.info somehow?

tranquil reef
#

are comments possible in .txt files for sandbox options?

bronze yoke
#

yes, java style only ( /* comment */ )

silent zealot
cosmic ermine
#

modversion is the version of my mod right?

bronze yoke
#

yeah

#

it can be anything you want

silent zealot
#

which should be OK, but it means youv'e got an extra file confusing you.

cosmic ermine
#

For some reason my mods didn't load when I went into debug mode.

ashen mist
#

how do i override item info for B42? i'm making a little mod to make nails and screws weigh less

copper abyss
#

but nothing I do seems to work

silent zealot
#

Same as B41, if that helps.

tranquil reef
silent zealot
#

Unless I messed a helpful API being added, you just replace the entire definition for the object you want to change by copying it from the default game media/scripts folder (and removing any other objects in the file you don't want to edit)

#

Makes me miss Rimworld's XML & XPATH system where you can say "find this object and change this property only"

ashen mist
#

i swear there was like, an override function or smth

bronze yoke
#

you can edit them from lua

ashen mist
#

but i cant find where i saw it, so i have no reference of how to properly use it

bronze yoke
#
local item = ScriptManager.instance:getItem("Module.Type")
if item then
    item:DoParam("Property = Value")
end
ashen mist
#

so if i were to want to alter nails

#

would i just put nails in the place of item?

#

or uh, the module type?

bronze yoke
#

that would (probably) be "Base.Nails"

silent zealot
#

Base.Nails

#

easy to check in debug mode

ashen mist
#

alright so lemme give this a shot

#

local item = ScriptManager.instance:getItem("Base.Nails")
if item then
item:DoParam("Weight = 0.01")
end

silent zealot
#

Try it and see.

ashen mist
#

oh baller i got a hammer now

#

so how do i implement that?

#

do i just make an xml file and drop it in the scripts or media folder- whichever one i used for the text

#

just checked, media

silent zealot
#

I remember having issues trying to adjust items programatically a year or two ago, but I can't recall details... might have been the specific property I wanted to change didn't work via the API

ashen mist
#

(followed the lead of a similar mod, so if im wrong, a correction wont hurt)

silent zealot
#

it would be a lua file

bronze yoke
#

this definitely works lol

ashen mist
#

right! lua, sorry, my bad

#

autopilot from rimworld iirc

silent zealot
#

hahhaha

ashen mist
#

im used to xml this, xml that

#

i've done like six pz mod tweaks in the last two months and i still think xml

copper abyss
#

still workin on this

#

if I cant figure this out by myself in 20 I'll be back and depressed

bronze yoke
#

for the build 41 compatibility part, change nothing about your mod whatsoever

tacit pebble
silent zealot
#

Having a 41 folder won't do anything.

bronze yoke
#

there's no 41 folder, just leave it how it is and add the common/ and 42/ folders

silent zealot
#

build 41 doesn't know "look in /41" so it just checks the top level

bronze yoke
copper abyss
#

ah ok'

#

I guess I'll delete it

tacit pebble
ashen mist
#

weird, lua didnt immediately work

#

gonna go restart pz rq

#

see if that sorts it out, since it was a new file

#

cuz who knows what reloading lua can miss

#

(i dont, i have no idea what im doing lmao)

#

my source of knowledge is divination from the elders and rough approximation

ashen mist
#

thats how i do mod code

copper abyss
#

Why the fuck is my gun upside down

ashen mist
#

so my files are set up like this, but the lua aint lua-ing

#

the text file was my first go around

copper abyss
ashen mist
#

did i bungle a folder, does lua have its own thing because i cant remember

#

ahh

copper abyss
quasi kernel
#

Anyone know a reliable way to refresh the "primary" and "secondary" hand slots in the top left? It seems to be fine in B42 but B41 has an issue where deleting an item currently in that slot results in it just kinda.. lingering? I guess?

tacit pebble
#

probabely because they were made for one-handed model while you set them as two-handed model. i had same problem long time ago.

tacit pebble
quasi kernel
#

Aaaaand nevermind I was modifying the b42 file

ashen mist
#

see, divination from the elders works

ashen mist
#

and yo-kai disco keeps me sane enough to keep at it

copper abyss
#

I have the model oriented in the specific rotation that a rifle is in

#

and I have set in my scripts it is a two - handed weapon

#

yet it seems fine in 41- not 42..

#

scratching my head

ashen mist
#

i think i gotta krill myself

tacit pebble
ashen mist
#

lua still aint luaing

#

nails still weigh 0.05 each

bronze yoke
#

it should be in lua/shared/

ashen mist
#

oh

copper abyss
bronze yoke
#

it only loads from lua/shared/ lua/client/ and lua/server/

copper abyss
#

whoop

#

there

#

^^

ashen mist
#

gonna try again

#

praying it works this time

tacit pebble
#

goodluck

copper abyss
#

in 41 the rotation of the gun is correct

#

but I guess in 42 it isnt

bronze yoke
#

sorry, no idea about that

copper abyss
#

whomp....

ashen mist
#

like its already fucked as is, may as well try flipping it around and see if that works

copper abyss
#

It would be easy to fix

#

but I wanna know why mostly

ashen mist
#

fuck fuck fuck

#

the lua still aint luaing

copper abyss
#

lmao.. my script for a firemode selector I think is broken

ashen mist
#

did i bungle it?

copper abyss
ashen mist
tacit pebble
#

well.. it should be something like

function functionName()
local item = ScriptManager.instance:getItem("Module.Type")
  if item then
      item:DoParam("Property = Value")
  end
end

and you have to call functionName() in your game to fire the function.

ashen mist
#

can somebody code a lua function that lets me bash my head into a brick wall until theres nothing but paste left regardless of what my pain receptors say to interfere

bronze yoke
#

you don't have to do that

#

it should be fine as is, i don't know why it wouldn't work

#

i have files in some of my mods that look exactly like that

ashen mist
#

gonna see if its maybe the caps

#

like maybe i bungled something case sensitive

#

damnit

#

it looks like it should be checking out

tranquil reef
#

Did they change how translations are defined

ashen mist
#

maybe it's my filepath?

tacit pebble
# bronze yoke it should be fine as is, i don't know why it wouldn't work

I may be wrong because I'm not professional but if you don't wanna define function name and wanna fire only once at start, then shouldn't it be like this?
not sure tho.

(function()
    local item = ScriptManager.instance:getItem("Module.Type")
    if item then
        item:DoParam("Property = Value")
    end
end)()
bronze yoke
#

you don't need to do that, anything in the file will run when the file loads

#

lua runs files as if they were functions, internally they're actually indistinguishable

bronze yoke
ashen mist
#

im gonna try something nonsensical

#

maybe

#

its not working in my game

tacit pebble
ashen mist
#

because its not enabled on the main list

#

like the one accessed in the main menu

#

i added it on the load menu mod list

#

like for the specific save

bronze yoke
#

that's what i did too

ashen mist
#

fuk

bronze yoke
#

are you testing on newly spawned items? i think weight should change for existing items but not sure

ashen mist
#

i've been using nails sitting on my garage floor to see if the weight has changed

#

would any of these conflict with it, maybe?

bronze yoke
#

probably not, maybe existing item weights don't change?

ashen mist
#

gonna open a new box of nails then

#

i found a carton so i got 11 more to work with

bronze yoke
#

yeah just putting them in a box and opening it again should actually work since it deletes all the nails and recreates them

ashen mist
#

didnt work ๐Ÿ˜”

bronze yoke
ashen mist
#

gonna do smth even less sensical

#

open them all

#

repack them

#

then open again

#

that also didnt work

ashen mist
#

im becoming convinced that's where i bungled

#

like maybe i put a folder in the wrong place

#

or named it wrong

#

or something small you probably would get right on instinct

bronze yoke
#

i just deleted it after i tried it since i dropped it into one of my own mods but it would've just been mods/ModName/42/media/lua/shared/nails.lua

tranquil reef
#

is it possible to add a custom value to an item? like it says embumbrance, could I add my own?

ashen mist
#

infuriated because mine matches

tacit pebble
#

wanna try check if everything is fine like this?

print("search_here")
print("item: " .. tostring(item))
print("--------")
  if item then
    print("item detected")
    print(item)
    item:DoParam("Weight = 0.01")
  else
    print("item is not detected. passed")
  end
print("---------")

I usually do this one by one when i have no solution.
you can check how code was going by search for search_here in your console.txt

winter thunder
winter thunder
#

Oh.

#

No

#

You are making a local mod, not one youve already uploaded through the workshop

ashen mist
#

is that wrong? because that's how i got all my B41 endeavors to show up to be tested and uploaded

bronze yoke
#

oh your mod structure is wrong

#

it should be Workshop/Light Nails and Screws/Contents/mods/

#

what is your game loading...? it shouldn't show up in the mod list at all like that

ashen mist
#

gonna krill myself

tacit pebble
bronze yoke
#

hey this is in your game directory too it doesn't load from there at all

ashen mist
bronze yoke
#

it should be in the workshop folder in your cache directory (%userprofile%/zomboid/ by default)

winter thunder
#

C:\Users\(TheRat or whatever your user is)\Zomboid\

ashen mist
#

weird, the directory one is whats always worked for me

winter thunder
#

In the past, were you making your own mods, or modifying existing ones?

ashen mist
#

modifying for the most part

#

my biggest projects were private server overhauls for scrap guns and armor

winter thunder
#

That would likely be why. Since you'd be changing your local copy that already has the correct file structure, so your changes didnt actually trip up anything

ashen mist
#

moved my b42 mod stuff to the user workshop thing

#

gonna reload and see if that fixes it

winter thunder
#

๐Ÿซก

ashen mist
#

none of my installed mods show up now

winter thunder
#

Show me your file pathway for the mod now

ashen mist
#

user>zomboid>workshop

#

and i mean no mods show up now

#

not even workshop mods

winter thunder
#

Can you go deeper? Like, one more step into that file

#

the LNS one

ashen mist
winter thunder
#

You still need your "contents" file. Check out the formatting of the ModTemplate

winter thunder
ashen mist
#

alright so i got that fixed

#

but im moving them back to the directory workshop

#

moving them to the user workshop has broken my mod list

#

as in i had like nine mods visible, now its like i never installed a single one

winter thunder
#

Right. The way that PZ handles everything is mainly through tables. If you have info in one that is breaking from the standard, it can mess up the table instancing.

Once the format is correct, everything should show up

ashen mist
#

its showing up, but it's not working

#

like i can enable it, it has the contents folder, its got the lua

#

and the nail still weighs FUCKING 0.05 EACH

#

maybe im cursed or smth

#

i can make mods but not in a way that i can enjoy the end product

#

some greek shit or smth

winter thunder
#

Give me a min, wanna make sure I am not going to give you any incorrect info incase they changed anything ab file structure in b42

#

But I still think it is a file structure issue

#

@ashen mist Can you open up your common folder rq and show me whats going on in there?

#

Nvm, i see you posted that earlier

ashen mist
#

currently my 42 and common folders are identical

#

im gonna nuke a scripts file rq

#

it has my first try at this mod

#

a text file of the items with my custom weights

#

it didnt do anything, so maybe if i just wipe it off the face of the earth and run just lua

#

it might work

winter thunder
#

I dont think the 42 is supposed to hold everything

#

Oh.

ashen mist
#

the script file thing probably should registered to me sooner

winter thunder
#

If you still have both versions in your mod file, you might be overwriting one of them with the other, making the new updates not load

ashen mist
#

it just didnt ig because it didnt do anything

quasi kernel
#

My subscriptions are fluctuating a lot on Visible Generator Range and it's making me anxious, bleh

#

I made sure it was working for both versions so I'm not sure if I missed something or what,,

#

Or if it's just people bein weird

winter thunder
quasi kernel
#

I'm just hoping it's people clearing their mods and it's not just a critical error I somehow missed

winter thunder
#

Trust me, people LOVE to point out when something is wrong. I had people leaving comments regarding a niche interaction caused by some stupidly simple issues with the code that 99% of people wouldnt notice, all within like a day of me posting lmfao

bronze yoke
#

for what it's worth it's normal for people to unsubscribe after an update because they get annoyed when they get a checksum error because of it

#

it doesn't mean you actually made any mistakes

quasi kernel
#

Okay, good.

#

It was an incredibly rare update- last one was back in May of 2023.

#

It's been clear over a year since this mod was fixed up so

#

It's just kinda alarming just how much it's fluctuating.

winter thunder
#

Youโ€™re probably getting both pieces actually. People are unsubbing as they clear their mods out for b42.
People are also then subbing because it is one of the few mods available for b42.

That would for sure make it rubber-band like crazy

quasi kernel
#

I see

#

Alright then, suppose I'll hang back unless I get a bug report

bronze yoke
#

also people may be unsubbing and resubbing to get the update to actually download

#

steam's pretty unreliable with that

#

and i've noticed it seems to show up strangely on the statistics

quasi kernel
#

It's been like 5 hours since upload and it has 450K+ subscriptions, I feel like someone would've reported a bug by now, but it is late.

winter thunder
#

Nah, youโ€™re def fine imo. If there was a major bug causing people to unsubscribe, they 100% would have left comments

quasi kernel
#

Whew, alrighty then!

sacred harness
#

Anyone else getting the "Not a valid PNG file at FutureTask.report"

ebon dagger
#

The worst part of updating is when you get NO ERRORS lol.

quasi kernel
#

Can't say I recognize it unless it's throwing a proper error.

ivory gyro
sacred harness
#

19-12-24 00:59:12.726] ERROR: General f:0, t:1734587952725> ExceptionLogger.logException> Exception thrown
java.util.concurrent.ExecutionException: java.io.IOException: Not a valid PNG file at FutureTask.report(null:-1). Message: C:\Users\mdrai\Zomboid\mods\EnhancedDurability\42\mod-icon.png
Stack trace:
java.base/java.util.concurrent.FutureTask.report(Unknown Source)
java.base/java.util.concurrent.FutureTask.get(Unknown Source)
zombie.fileSystem.FileSystemImpl.updateAsyncTransactions(FileSystemImpl.java:314)
zombie.GameWindow.logic(GameWindow.java:396)
zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:76)
zombie.GameWindow.frameStep(GameWindow.java:917)
zombie.GameWindow.run_ez(GameWindow.java:796)
zombie.GameWindow.mainThread(GameWindow.java:610)
java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Not a valid PNG file
zombie.core.textures.PNGDecoder.<init>(PNGDecoder.java:141)
zombie.core.textures.ImageData.<init>(ImageData.java:330)
zombie.asset.FileTask_LoadImageData.call(FileTask_LoadImageData.java:48)
java.base/java.util.concurrent.FutureTask.run(Unknown Source)
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
java.base/java.util.concurrent.FutureTask.run(Unknown Source)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
... 1 more

quasi kernel
#

Well, that's as proper as they seem to get. Looks like a java error though, maybe your game updated awkwardly?

covert adder
#

how does player:getHealth() work because i ran a script with an event that trigger on player damage and print the player health then i killed the player issue im having is it print out there health as above 99 until they die they dont drop down at all so im a lil confused

#

wondering if the causes is the fact im killing them but cutting there neck is it like since it only neck damage it doesnt drop lower then 99?

bronze yoke
#

try player:getBodyDamage():getOverallBodyHealth()

covert adder
#

oo okay ill try that

#

thanks boss that should work way better

#

how does one full heal the player?

turbid gale
#

It seems like animation .xml files do not correctly load anymore. Attempting to use custom reload animations I made resulted in the character defaulting to the surrender animations. However if I copied the .xml file into the game directory it worked fine while also logging in the console the mod overwrote the file.

#

which bewilders me, as it implies that everything there just fails to load.

autumn imp
#

Does anyone know what the naming convention for the player voices are? ๐Ÿ’€ I extracted the ZomboidSound.bank

So I'm not even really sure how the game knows what sound files to assign to which voiceStyle

winter bolt
covert adder
#

so if i wanted to make the player injuried like low hp could i just do setHealth(.1)?

turbid gale
#

worked like a charm ๐Ÿ‘

#

VFE presses ever forward

mellow frigate
#

Is this channel B42 compatible ?

ashen mist
#

i am back and ready to rip my hair out til im bald again

#

the patch to make nails lighter remains non-functional for me despite working on someone elses system

sonic needle
sonic needle
covert adder
#

how do i lower the player hp to like really low?

winter thunder
ashen mist
#

it still refuses to work

#

i've restarted my entire pc

#

didnt work

winter thunder
#

Alright. Did you also remove the local copy we were working on before?

ashen mist
#

there's only one local file and it's the original

winter thunder
#

Ok, cool. So, the mod is showing up in the mod menu, but not working in game, right?

ashen mist
#

yeah

tacit pebble
covert adder
#

yea but i want to modify just there hp bar

#

and keep there actual injuries

#

what im doing is making a down system

#

so i wanna keep them alive but keep there injuries

ashen mist
#

i've even tried removing the duplicate of the function files

#

like "maybe if its just common files it'll work"

bronze yoke
#

it is weird to have both but it should still work

ashen mist
#

it didnt

#

i am wholly convinced you are a wizard and mods are intimidated to behave in your presence

tacit pebble
bronze yoke
#

i worked on something like that before and it's an insane pain in the ass

covert adder
#

so i should just use setOverallBodyHealth(float) ?

#

wtf is setHealth then?

#

seems useless

bronze yoke
#

it's probably from a decade ago

covert adder
#

oh thanks chatgpt

bronze yoke
#

the game hasn't used a straight up healthbar in years

covert adder
#

๐Ÿ’€

ashen mist
#

but yeah albion if you have a chance can you show me how you had the code slotted in when it worked for you?

#

because i am stumped here and i'm sure it's probably some little thing i missed that i dont know even exists

covert adder
#

so is set overall body health 1-100 or 0-1

ashen mist
#

i know some zomboid things like having categories preceding code or whatever

placid river
#

is there some way to get the position of a dropped item on the floor?
cant do getparent() or getsourceiso() or anything else i tried

covert adder
#

char:setOverallBodyHealth(.5)

#

what wrong with this?

placid river
#

i need to check the distance between a player and the item on the ground

winter thunder
ashen mist
#

not that i've seen

bronze yoke
#

the only difference from your file structure is mine was in %userprofile%/zomboid/workshop/

ashen mist
#

which sucks because

#

when i moved mine there

#

it broke all my mods

#

my mods went from there to gone

covert adder
#

i dont think it should matter if it in mod or workshop right?

ashen mist
#

even the workshop mods vanished

winter thunder
covert adder
#

oh yikes

ashen mist
#

the userprofile one doesnt work

covert adder
#

that weird

ashen mist
#

i tried it, it broke everything

winter thunder
#

Right, likely due to an issue with the file structure borking the rest of the mod loading

ashen mist
#

like i said, all mods vanished from the game, local and workshop

covert adder
#

yuh that sounds like it gonna be a pain to fix lol

winter thunder
#

Can you try and move this section here into the local Mods folder?

ashen mist
#

oh

#

youre right

#

the fixed structure works in the userprofile

winter thunder
covert adder
#

lmfao

#

it always a simple fix i swear

ashen mist
#

lets not get presumptuous

#

we have to do a function test

#

it works.

covert adder
#

lol

ashen mist
#

the number works.

#

time to finish the mod

covert adder
#

ahah good for you

ashen mist
#

i need to add

#

nail box weight reduction

#

nail carton weight reduction

#

and the same for all three of the screw options

covert adder
#

ur making a mod to just reduce nail carton weight?

winter thunder
#

Thats easy. Just do exactly what you did, but change which item you are looking for lol

ashen mist
#

thats the plan

#

i'll credit y'all in the description for the help

winter thunder
#

No worries hahaha

ashen mist
covert adder
#

oh nice

#

anyways how does one use setOverallBodyHealth?

ashen mist
#

because 100 nails weighing 5 encumbrance is fucking insane from B41's 1 per 100

covert adder
#

chatgpt not being helpful

ebon dagger
#

Lots of fun changes to figure out. But, I got my most subbed mod updated. Figuring out the changes involving item "Tags" was fun.

ashen mist
covert adder
#

i tried .5 and 50 and both gave errors

covert adder
#

because google not gonna be helpful

ashen mist
#

other people smarter than you

#

it works for me

covert adder
#

yea but that being lazy

ashen mist
#

its called being smart

covert adder
#

i only do that if chatgpt cant figure it out

#

nahh not really

ashen mist
#

you can either bash your skull into a wall forever

sonic needle
#

this chat is comical.

covert adder
#

if you can get the answer somewhere else first

ashen mist
#

or you can ask somebody who knows it already for help

covert adder
#

it worth a attempt

winter thunder
#

Technically there is a way to just iterate through tables, so you'd only have to really have one function and then a list of items and their corresponding weights... But that is painful, and the code only runs once so lmfao

ashen mist
#

then you learn from them

covert adder
#

yea i agree after you attempt it first lol

#

im not just gonna ask every question i have to people they got better thing to do lol

#

๐Ÿ˜ญ

tacit pebble
#

I personally suggest just use chat gpt BUT in the proper way.
don't use gpt for getting a answer, use gpt for talk and study.

covert adder
#

i use it to get a baseline of what im doing

#

like if i have no idea how something works i use chatgpt to get a baseline of how it work then for more complex answer it fail to get i ask actual people

#

but tbh if you know how to use chatgpt right it can be very useful in learning thing

winter thunder
#

I like using it for checking for errors I miss or for figuring out ways of handling things that are more complex than I understand. Just have GPT explain to me how it works

covert adder
#

i wouldnt trust it with anything complex but yea lol

#

fair

winter thunder
#

Like iterating through tables was something I just couldnt grasp lmfao

covert adder
#

i fucking hated table learning them

#

but after i learned them they became my favorite thing ever

#

there so much fun to use

#

i use them a shit ton in my roblox game you can make some really beautiful bit of code with it ๐Ÿ™

winter thunder
#

But fr, your actual best friend when it comes to PZ modding is the massive treasure trove of existing coding work that is already out there hahahaha. Once you understand the basics, look at the java docs for the functions and look at existing similar mods to get a concept of their implementation

covert adder
#

yea very true lol i mean table in themselves is pretty much just data science basic lmfao

#

and i mean coding fundamentally is just handling data so it work perfectly

winter thunder
#

Probably has some outdated things ab it now, but this was my reference doc for folks
https://rentry.co/BluesModClues

covert adder
#

idk if ima dive into the java side anytime soon

#

ive never coded in java lol

little harbor
#

Anything comparable to Override:true, with the new craftRecipes? Trying to override a base game recipe but the script loader is not having it.

dry lichen
#

Hi i'm always blocked by my mods to drop all items from a contenair to ground, how i can target these contenair ? (it woudld work like originally button to transfer all item to you inventory from contenair)

winter thunder
tacit pebble
ebon dagger
covert adder
#

thanks boss ill try that

winter thunder
covert adder
#

but yea ill definitely take a look at that once i get a bit more experience

little harbor
#

It's complaining about duplicate Prop1 and Prop2 so it feels like the game is trying to load both scripts at the same time

ebon dagger
#

For anyone who hasn't seen it yet, the new format for recipies is quite different (\ProjectZomboid\media\scripts\recipes)

{
    timedAction = Making,
    Time = 50,
    OnCreate = Recipe.OnCreate.ScratchTicket,
    OnTest = Recipe.OnTest.ScratchTicket,
    /* CanWalk = true, */
    Tags = InHandCraft;RightClickOnly,
    inputs
    {
        item 1 [Base.ScratchTicket],
    }
    outputs
    {
        item 1 Base.ScratchTicket,
    }
}```
covert adder
#

testing this mod im making kinda messed up if slashed my character throat atleast 10 times now

covert adder
#

also would healing them with overall body health heal there actual limb injuries?

bronze yoke
#

setting overall body health doesn't really do anything because it's recalculated every frame

covert adder
#

so what should i use?

bronze yoke
#

the overall body health doesn't really matter itself, it's just the result of some calculations based on the health of each limb

#

you can add health to the limbs to keep the player's health up, it won't actually heal the wounds or anything

covert adder
#

i dont wanna do that

#

i just want to heal their health bar

#

so they dont die

#

but keep the limb injuries

bronze yoke
#

well that's what adding health to the limbs does

covert adder
#

do i have to do it like that?

tacit pebble
covert adder
#

i cant add hp directly?

bronze yoke
#

i think there's like addoverallbodyhealth or something but i didn't find it reliable

covert adder
#

mhmm

tacit pebble
#

I thought I'm already using that for my posion and I haven't felt any weird before. the mod is kinda outdated tho
btw addHealth() is also available for each body part

covert adder
#

can i use addhealth to add straight health?

#

cuz as i said i dont wanna heal the limbs

#

just the overall health

tacit pebble
#

yep minus is also worked. -10 will decrease specific body part's hp

covert adder
#

epicc

tacit pebble
#

then no. it's for bodypart if I remember right
like upper arm, torso, stomach...

bronze yoke
#

using it to damage is fine, but the specific goal of keeping the player alive without healing injuries is really unreliable

covert adder
#

i mean i know it possible

#

ive seen a mod do it

#

they just keep healing them with a while loop id assume

bronze yoke
#

the mod i was maintaining had a persistent issue of people just getting more and more injuries until it reached the point where they would die in one frame before they could actually be healed

covert adder
#

well im gonna have it timed so you can still die regardless

#

so that shouldnt be an issue

covert adder
ebon dagger
covert adder
#

how do you look at mod code?

tacit pebble
#

subscribe and open its folder

ebon dagger
#

Download the mod, then go to Steam\steamapps\workshop\content\108600\THAT_MODS_ID and bang!

covert adder
#

ah okay yea ill try that out

#

also btw i dont think addHealth work unless i used it wrong

#

gave me an error

#

addoverallbodyhealth didnt work either both gave errors

tacit pebble
maiden thistle
#

i kinda like the new stressed moodle so i got the old moodles mod and made this having never made one before

covert adder
#

having a hard time getting this to work lol

tacit pebble
#

what is your goal? hp is always 100% but injuries are still there?

covert adder
#

not 100%

#

what i want is when they get low enough basically dead they'll be no longer able to move or move at a massive reduce speed and it would effectively keep them alive but on a timer which if they dont stop the bleeding by the time ending they die

#

and how it would work is another person could bandage you up then use an item to revive you

#

it meant for a zomboid life server where your not really meant to full die

tacit pebble
#

oh yeah I was trying to search that mod

covert adder
#

thanks ill take a look at that

#

will i need to change off the b42 to see this mod?

#

like in files

#

not ingame

ebon dagger
#

If you want to see it PLAYED, yes. But just reading the code, no

covert adder
#

Ws

#

where the steam file?

#

oop nvm found it

ebon dagger
covert adder
#

W that works too

ebon dagger
#

Also, fun tip I learned a few years back. You can have both versions installed and swap it real fast. If you rename your current "Project Zomboid" folder to like, "Project Zomboid B42" then tell steam to swap you back to B41, it will just make a new installation of zomboid. Then you can swap version by renaming the folders.

covert adder
#

oh wow

#

that dandy

#

to be frank tho i just think im not gonna use b41 anymore lmfaooo

#

atleast until i wanna play a server ig lol

#

my dumbass like "oh this mod doesnt look that complex" then proceed to find 500 lines of code ๐Ÿ˜ญ

ivory gyro
little harbor
gilded hawk
#

Does anyone have suggestions on how to measure performance in PZ?

I'm looking into updating my prox inv mod for B42 and I'm reworking some parts of it but I'm worried it could be slower than expected as in the past for B41 I had to do some caching to ensure it would not kill FPS

quasi kernel
#

Out of curiosity, does anyone know if there's an easy-to-access location / method to access a specific bag or container's item distributions?

#

I mostly ask this because I thought it'd be entertaining to try and get procedural "fresh spawning" containers working.

#

(I mean container as in the item, like a gun case, not a container like a world object)

bright fog
bright fog
quasi kernel
#

Perfect! I would've responded on my PC but it appears my scroll wheel failed.

#

I can't actually scroll through my server list-

sand saddle
#

im currently stumped. i installed my mod locally to test it for 42. however something is wrong. once its installed locally the mods menu breaks. shows nothing (not even the subscribed b42 mods i used as reference) once opened in -debug it shows a error screen yelling something about not being able to get the ID of the mod. im at loss i cant find what i did wrong.

pallid obsidian
#

Yo guys has anyone figured how to add extra voice types/replace voice types yet?

sand saddle
#

can someone have a look over my mod.info? i have NO clue why it crashes the mod menu : (Edit removed attachment)

fleet bridge
#

for containers anyway

sand saddle
#

i cant get it to work i just uninstalled my mod and now it crashes everytime i open the mod menu. i has no clue whats going on and cease modding till later.

robust locust
mint hawk
#

So I wanted to finally try making a mod - of course large mods that I would really want like armoring vehicles is way beyond my scope. So I figured add VHS tapes, but it seems some VHS tape mods overwrite the vanilla VHS tape file?

robust locust
#

Does anyone know what the "flag[mayDegradeLight] means in flags[MayDegradeLight;NoBrokenItems]

robust locust
sand saddle
#

right now my mod is completely removed and it bugs out without it. i have 2 b42 mods in my list.

#

downloaded them for reference to update mine.

robust locust
#

and it's definitely not those 2 mods that are causing the crash?

sand saddle
#

it worked before. i seen both mods in the list. added mine, edited the mod.info and added thenew folder structure. mod menu crash. removed my mod. still crash

#

fun i just unsubscribed from those mods as well. i have NO mods installed. mod menu crash.

#

console gives same error as above.

shrewd bolt
#

Is your ~/Zomboid/mods folder empty as well?

sand saddle
#

both /mods are empty. the one in the steamapps and the one in Users/myname/Zomboid

shrewd bolt
#

Interesting, I'd suggest verifying the steam cache.

robust locust
#

very strange

sand saddle
#

im going to uninstall Zomboid. make sure there is nothing left over and make a clean reinstall. someething is wonky.

robust locust
#

yea sounds like there's something gone funky

#

I can't see why adding and removing a mod would still cause it to crash though

sand saddle
#

well in the end i had no mods installed and the mod menu kept crashing.

shrewd bolt
#

Yeah I've been mangling mods all day and no permanent issues.

sand saddle
#

well i deleted everything now (after backing up my workshop folder) and make a clean install.

robust locust
#

I wish they had updated the "example mod" to be more useful for times like this

#

Does anyone know what the "flag[mayDegradeLight] means in
flags[MayDegradeLight;NoBrokenItems] ?

sand saddle
#

found the culprit. it was my workshop item. "versionMin=41" is invalid. it hung up on THAT.... the mod menu broke because my WORKSHOP version had that line in.

robust locust
#

yea that'll do it

#

I don't think you even need that in there

sand saddle
#

im kinda lucky. my mod works out of the box without needing to change my lua. however i havnt tested it with all the new stuff.

#

ok anyone knowing how the "require=Modid" works now? i have a submod that needs the main active. however i cant get it to recognize the main mod.

quasi kernel
#

Is it impossible to just.. spawn a bag with its corresponding loot table?

lilac mural
# bright fog - Too small (scale model up) - No/wrong model script - Bad referencing to the mo...
  • I tried 1x of the model and to 1000x model: nothing changed
  • Model script: model SmokeFlare { mesh = WorldItems/Flare, texture = WorldItems/FlareTexture, scale = 100.0, }
  • Model is in common/media/models_X/WorldItems with name Flare.fbx
  • It looks perfectly fine in windows 3d viewer - I was exporting it using blender and someone's guide

If problem was in bad referencing to the model - shouldn't there be an error?
I guess, maybe it is something wrong with export, but I don't know how to check it to be sure about that

robust locust
#

It might be too big... I tend to export at 0.01

lilac mural
#

Uh.. If it's too big - shouldn't it be on the whole screen? But i'll try making it smaller

#

It. Is. Definitely. Too. Big.
Even on 0.01

robust locust
#

lol

lilac mural
#

I scaled it to 0.00003 to become normal ๐Ÿ˜ญ

robust locust
#

yea when it's too big you're inside it and you don't see the inside faces due to backface culling

#

If you're using blender, then export it at 0.01, and make sure you're not scaling it up in the model code

lilac mural
#

Yeah, now I'll export everything smaller

robust locust
#

and make sure your blender world units aren't using meters or something big

#

it happens a lot ๐Ÿ˜„

lilac mural
#

I guess, If I need to rotate a model - it's better to do it in blender, right?

merry grove
#

Hello, I decided to join this forum to fix up my mod or find out how to make it better for the 42 version of the game.

I made the "Wild Fruits" Mod and honestly forgot what I did. It's been 2 years <w> For example, I have ItemTweaker despite not doing anything with Vanilla Items <w>

So, One thing, did anything change in Forging? For now I just using Event on Add Forage Defs

    BlackCherry = {
        type = "MattSimpleAddons.MSABlack_Cherry",
        skill = 3,
        maxCount = 15,
        minCount = 5,
        xp = 15,
        snowChance = -10,
        categories = { "Fruits" },
        zones = {
            Forest      = 15,
            DeepForest  = 15,
            FarmLand    = 5,
            Farm        = 5,
        },
        months = { 5, 6, 7, 8, 9 },
        bonusMonths = { 6, 7, 8 },
        malusMonths = { 5, 9 },
        spawnFuncs = { doWildFoodSpawn },
        altWorldTexture = worldSprites.smallTrees,
        itemSizeModifier = 1.5,
    },
#

Also, some people complained that the amounts were high. I disagree, but how would one change the quantities using the custom Sandbox settings?

#

So they can pick how much it is

sand saddle
#

you need a sandbox-options.txt :
`VERSION = 1,

option YourModId.Optioname = {
type = double,
min = 0,
max = 2,
default = 0.5,
page = Pagename,
translation = YourModId_Optioname,
}`

#

and in the lua itself you can check for it with : local VARname = SandboxVars.YourModId.Optioname ;

bright fog
sand saddle
#

you also in your "Sandbox_EN.txt" (and any other languages you want to support)
Sandbox_YourModId_Optioname = "YourText", Sandbox_YourModId_Optioname_tooltip = "Your tooltiptext",

merry grove
#

Also do you know what NecroList is ?

#

I used that but I think I literally had no idea why

bright fog
bright fog
merry grove
#

Also why did I give wild fruits higher chance to grow on farmland

merry grove
#

Also I see why my farmland was so big I was just coping the Strawberry stats

#

Also reason why pepole were complaing about amoutns

#

but you finding a ENTIRE BUSH of the stuff

sand saddle
merry grove
#

I mean, when I was a kid, there was a raspberry bush near my house that was a few HUNDREDS of raspberries on it

sand saddle
#

i have it just in the media folder

merry grove
safe sinew
#

How does the tracer particle effect system for ranged weapons work? All I can find right now are .txt files with configuration numbers

shrewd bolt
merry grove
#

Does anyone know how to make it as options? The solution there is for ranges I need more rigid options of Low/Defulat/High

shrewd bolt
#

You need to set it to type = enum and specify numValues. Then have a valueTranslation that refers to values in your Sandbox_EN.txt file with names like Sandbox_Modname_Value_option1, Sandbox_Modname_Value_option2, etc.

#

I know B42 supports the advanced mode as well, not entirely sure how that's translated into the enum type personally.

merry grove
#

Also was this fixed?

#

Or should I use the quickfix still ?

#

Also Can I use something like this
Local table = [1,3,10,40,100] and then have just table [Sandbox_Modname_Value_option2] ?

bright fog
#

But that wasn't a thing in B41 ?

merry grove
#

I am python head

shrewd bolt
#

The value of the sandbox variable will be the value of the selected enum, so you'll need to check the value and tie it to your logic.

merry grove
#

Just can I use a table and then just have the option selected as postion in a table

#

so then I can just -1 from enum

shrewd bolt
#

Sure, but it won't be what you put above, it'd be SandboxVars.Modname.Value if following the same example.

merry grove
#

Could just be lazy and give granural control to the player

#

but I think it's better if it's simple

shrewd bolt
#

I'm pretty sure B42 supports either or if they click the Advanced checkbox, just not sure how personally.

merry grove
#

Is there any documentation for PZ modding ?

shrewd bolt
#

There is, but it's not updated for B42.

lilac mural
#

Is there a way to make character pick up an item that you trying to use through custom TimedActions script?

sand radish
#

does anyone know what is wrong with the logic applied here?
I ended up leveling up a skill 2 times instead of one

if randomPerk then
local currentLevel = self.character:getPerkLevel(randomPerk)
local oldLevel = currentLevel
print("CurrentLevel", currentLevel)
while currentLevel == oldLevel do
self.character:LevelPerk(randomPerk)
self.character:getXp():setXPToLevel(randomPerk, self.character:getPerkLevel(randomPerk))
end
end

dull moss
#

<@&671452400221159444> surely this is not a scam link Clueless

#

steamcomumniity KekW

merry grove
#

Hey, DOUBLE II

#

Also who the hell posts this in Mod Developlent

dull moss
#

Bots

merry grove
#

where there is assuming a lot of very tech literarate pepoel

dull moss
#

It posts in all channels

#

Usually

merry grove
#

Hm, I think I keep the mod how it is now and just test if it works in B42

#

I don't see much that has to be changed

#

outside of that

cosmic ermine
#

Does beautiful-java work for Build 42?

merry grove
#

The Sandbox settings would've been lovely to have tough

dull moss
#

I have to migrate a lotta shit from modoptions to new mod options

merry grove
#

I think I wait till someone makes a documentation for 42

#

so I get modoptions

#

As i want it as simple as possible

#

I wish I could just have table

#

Tables are king tables are love

dull moss
shrewd bolt
#

I've ported a bunch of mods over just for my own personal use - so far the things that are majorly different are recipes and shaders. Most other things just work, with slight changes.

merry grove
#

Well more sandbox settings <w>

merry grove
shrewd bolt
#

Can't say I've ever used that, so no idea.

merry grove
#

I use it for cakes and salads

#

So pepole can use my little fruits in them

shrewd bolt
#

I'm fairly certain all recipes need to be reworked with the new system though, having said that, it's not too difficult to work with.

merry grove
#

Wait, did the mod manu got overhualed?

#

I had it modded for so long I forgot how it looked orginally <w>

shrewd bolt
#

Yeah, it's got most of the features from the Mod Manager mod now. I feel it just needs a way to sort the list.

merry grove
#

Also how do I add Zomboid Version to my mod ?

shrewd bolt
#

In the mod.info file, there's a few version tags you can use. For example versionMin and versionMax, as well as your own mod's version: modversion.

tranquil reef
shrewd bolt
#

Yeah you need to put your mod Id in the sandbox translation file.

sacred harness
#

Anyone taking on creating an example mod for everyone to follow?

elfin stump
#

Anyone have any luck with prop1 and prop2 on timed actions? I am trying to see where the items are coming from, such as Base.DishCloth_Hand, but that doesn't seem to appear anywhere in the items list. My guess is that useable (in hand) props are defined somewhere else, but cannot seem to locate how that is done. Any ideas where to start?

merry grove
#

Also how do you make your mod display in the Mods?

#

Like I noticed I have to put it into folder called 42.0

shrewd bolt
#

You also need a common folder.

elfin stump
#

Check out the pinned message on that, it has the structure for ya on there.

merry grove
#

Yey it works

#

Also man I looked at the crafting menu, this game really went full Hydrocraft eh ?

ebon dagger
#

They removed an event one of my mods depends on. Was there a list of the changes made, like a code commit with a diff or anything like that to look at?
Found it lol.

glossy mirage
merry grove
#

how do I update thumbnail ??

bronze yoke
#

change your preview.png and update the mod ๐Ÿ˜…

merry grove
#

I did trhat

#

It works in the selection

#

but it didn't update the steam workshop one

#

here it did it

#

here it refuses

#

Also its up and running now

#

But I can't change the thumbnail to say 42+

bronze yoke
#

it looks like you replaced the one in the mod's folder, you need to replace the one next to workshop.txt

merry grove
#

Ah there alright

#

thx

ashen mist
#

got to making the preview for my nail mod

merry grove
#

nice

ebon dagger
#

I'm looking for the event that replaces Events.OnRefreshInventoryWindowContainers
If anyone finds something, HMU?

lilac mural
#

Is it correct to use one of this: ISInventoryTransferAction or ISGrabItemAction, to make character pick up an item near him?
I'm trying to make a player pick up an item he trying to use with custom timed action... tired

ebon dagger
sacred harness
#

Anyone else having problems with getting the Sandbox Options to display the correct tool tip, lable and page?

#

I'm trying to link it to the translation, but it keeps pulling from the sandbox-options.txt file

bronze yoke
ashen mist
#

i might be becoming a modding addict again

#

i finished one

#

now i need to make another

sacred harness
ashen mist
#

does anybody know how to make B42 recipes

#

because suddenly i wanna recreate some qol mod recipes i knew before

#

like 5 rags to make a rope, undoing a rope to make twine

sacred harness
ebon dagger
ashen mist
tranquil reef
#

Are custom tooltips or stats possible now for items? Like if I wanted to add a "radioactivity" meter to all rat items, is that possible

ashen mist
#

okay doesnt look too bad

tranquil reef
round notch
#

Surely you could just check for item type instead of making a new tooltip? Would that work?

#

It'd be less conflictive as you wouldn't be changing any item files

#

That's what I'd do ๐Ÿคทโ€โ™‚๏ธ

ashen mist
#

here's what i got so far

tranquil reef
#

No idea how I could easily add and show a value from 0 to 100

round notch
#

Ah gotcha.. not a clue ๐Ÿ˜†

ashen mist
#

on 20 minutes of making the rope mod now

#

now booting up a debug save to see if it works

round notch
#

Anyone know if player:setVariable still works in b42 for playing .xml files with anims in?

#

I saw a thread saying the AnimSets folder has to be in both the original and the 42 folder, tried that but not loading as it did in b41

ashen mist
#

HAHA!

#

IT WORKS!

#

FIRST TRY, OH YEAH

#

now i just gotta fix up the recipe names so theres spaces

#

behold

sacred harness
#

Nice nice nice!

mellow frigate
#

with B42, 'uninstallPart' command was removed from VehicleCommands.lua and filtered out in ServerOptions.java. but still the uninstall works. anyone knows how it works ?

stray summit
#

Is there a discord to recruit devs/modders or is everything done here?

mellow frigate
tiny valve
#

Can I ask someone to help me?
I'm trying to load a mod, but I keep getting a message that my mod.info file is missing, although it is in the folders

bronze yoke
#

you don't have a mod folder

#

all of that stuff should be in mods/MyMod/

ashen mist
tiny valve
#

it works

ashen mist
#

mods are out

#

i can go back to actually playing now lmao

karmic violet
#

how can i port a b41 mod to b42?

elfin stump
#

Here is a rough template of a recipe with the new mapper feature included for reference. It is rough so I recommend writing out your own not trying to copy and paste this and fill it in. But this shows a lot of good info that otherwise you would have to hunt through existing recipes etc. If game fails to boot in debug mode when making recipes, make sure to double check your syntax to existing working examples - not this template file as it is possible that there could be incorrect syntax within the commented out sections.

lilac mural
dull moss
#

if config is local wouldn't you be unable to access values from it from other files?

ashen mist
#

so im curious

#

with mods n stuff

#

is there a place to talk about new ones i've made or smth

#

so non modders know they even exist

dull moss
#

i havent really used showcase but i'd guess it works

#

I'd say you can also yeet it in #pz_b42_chat as long as you dont do that regularly

elfin stump
#

You can probably share your workshop page in community recruitment channel as well.

dull moss
#

that does't feel like correct channel

#

that's for recruiting players

elfin stump
#

exactly! and your workshop pages are a great way to bring in engagement as well, steam community is live and active for PZ.

dark wedge
dull moss
#

do i have to do a tripple call or can i just make my config global since the nills will be replaced with proper values during game init?

sacred harness
#

Here is what I did:
-- Fetch the multiplier from sandbox variables
local edMultiple = SandboxVars.Xaviors_EnhancedDurability and SandboxVars.Xaviors_EnhancedDurability.EnhancedDurability

-- Validate the multiplier; fallback to 1 if invalid
if not edMultiple or type(edMultiple) ~= "number" then
    print("[EnhancedDurability] Error: Multiplier is invalid or missing. Defaulting to 1.")
    edMultiple = 1
else
    print("[EnhancedDurability] Sandbox variable found. Multiplier set to: " .. edMultiple)
end
dull moss
#

you do know that you can set sandbx min and max value

#

you dont really have to validate

#
option EvolvingTraitsWorld.AffinitySystemLoseDivider
{
    type = double,
    min = 1,
    max = 100,
    default = 2,
    page = ETWSettings,
    translation = ETW_AffinitySystemLoseDivider,
}
#

as example

sacred harness
#

Yeah, that validation was for debuging purposes

dull moss
#

ah

sacred harness
#

LOG : Lua f:0, t:1734632958108> [EnhancedDurability] Sandbox variable found. Multiplier set to: 1

#

Just so I could confirm it was being set. Trying to figure this stuff out so I debug everything! LOL

dark wedge
#

Making your config global would be fine, but it's not best practice. And you'll need to determine the best method for you on if those settings are updated ingame (why i wanted that event). But if you just need a specific value, you could always just do:

myVar = PZAPI.ModOptions:getOptions("UNIQUEID"):getOption("OptionID"):getValue()

Just be sure not to get anything wrong or you'll get an error. ha

bronze yoke
#

i'd recommend just not using globals ever

dull moss
bronze yoke
#

there's not really any reason to (except a couple areas where the game requires them) and they cause a lot of issues

drifting stump
#

kinda funny everyone always makes that mistake

#

you can pass around locals between files

dull moss
#

I dont use globals either was just wondering

#

ye but that requires you files to not be circularly dependand

bronze yoke
#

imo if you have a circular dependency then your code is just structured weird to begin with

dull moss
#

also tru

bronze yoke
#

there are still ways to get around it though

dull moss
#

i dont think i have any but i dont wanna fuck with passing locals over tbh anyway

dark wedge
#

make a specific file for handling the config, only ever require that file (never make it require anything) and you're g2g

drifting stump
#

here we go found it

mellow frigate
#

This question is for anybody and รŒ am clearly not hoping for an answer of the EGB: how do I override the java method (from lua only) lua self.character:sendObjectChange with character being an IsoPlayer instance and sendObjectChange a method of IsoObjet ? Bonus point for the way to cancel the override. ```java
class IsoObject
public void sendObjectChange(String var1, KahluaTable var2)

drifting stump
#

its really been over 2 years since i started my require crusade ๐Ÿ’€

drifting stump
bronze yoke
drifting stump
#

you were once one of them XD

mellow frigate
drifting stump
#

i mean you understood it fast but didnt know what was going on at first

stone garden
#

i know it is an no

dull moss
#

true prodigy

stone garden
#

sorry for everyone that i have been doing mod ideas since 2022

bronze yoke
#

iirc all i really misunderstood was that i thought it was by value not by reference, but that's still a pretty embarrassing mistake to make because lua literally never does anything like that

dull moss
#

smh albion, that's embarassing

#

how could you

#

I lost all faith

drifting stump
#

if you want to override calls done within java youd have to edit the class file

#

but within lua some metatable magic does the trick

queen oasis
stone garden
#

does chatgpt knows how to make an b42 mod

drifting stump
#

my embarassing zomboid lua mistake was thinking hash tables were hash
spoiler theyre lists

dull moss
stone garden
#

i wanted to test if chatgpt can do it?

dull moss
#

it doesnt

stone garden
#

because b41 it did work

dull moss
#

it can help if you know what you doing, if you're clueless no AI can help you. Ask again in I'd say 3-5 years

#

then AI prob can make a mod for you

bronze yoke
#
-- needs to be the actual class of the object, not the class that declares the method like you may expect
local mt = __classmetatables[IsoPlayer.class].__index

local old_sendObjectChange = mt.sendObjectChange
mt.sendObjectChange = function(...)
    -- do something else
    old_sendObjectChange(...)
end
stone garden
dull moss
#

oooor

#

you can learn

stone garden
dull moss
#

unluck

stone garden
#

i tried and failed

#

all the times

#

atleast i tried

bronze yoke
stone garden
#

i tried all in the past

#

and it failed

#

failed and failed

elfin stump
#

On the bright side that means you don't need to refactor from B41 to B42 ๐Ÿ™‚

mellow frigate
stone garden
stone garden
#

also tcherno will ignore me forever ๐Ÿ˜ญ i do regret my actions but it was meant to learn modding

mellow frigate
#

thanx everyone

dull moss
stone garden
#

maybe i could try modding again but i think it will fail again

dull moss
#

keep trying until you make it shrug
I started my UI page like 3 times and dropped it

#

until I finally made it work

stone garden
#

but failed

dull moss
#

but if you expect people to do your mods for you this aint place to ask, sorry
unless you are willing to pay

stone garden
#

1 dollar is 6 reais

dark wedge
dull moss
#

so might I suggest to either try to do it and ask questions in the process (by providing your code and explanations on what you tried and what didn't work) or stop kinda pestering ppl
there are plenty of ppl here who are willng to help but they wont do your mods for you my man

elfin stump
#

Start small, make a tiny mod first, something silly and easy, go from there.

stone garden
#

is that true?

dull moss
#

that's not "starting small" my dude

stone garden
#

like harder than an car mod

stone garden
elfin stump
#

there you go

dull moss
#

thats better

stone garden
#

but i like events mod

#

thats the issue

#

i like meta events

dull moss
#

and i like britas weapon mod but i aint making huge weapons overhaul

#

because thats hundreds of hours

stone garden
#

like car crashes

#

and etc

elfin stump
#

do an item first, work from there, there is a lot in PZ to learn, but if you try and start too big its going to hurt.

stone garden
dull moss
#

look we already gave you plenty of good advice. if you wanna ignore and make metaevents instead of like a crowbar or some shit you do you, but then dont be surprised when its too complex and, quoting you, "fail again and again"

#

when you start lifitng weights you dont start at 150 kg

#

you start at 20

elfin stump
#

start looking into 'distribution'

dull moss
#

so go start at 20

stone garden
dull moss
#

so i had to provide fallback value

stone garden
#

is doing something that modifies population peak harder than item mods?

#

just wanted to know

#

or it depends

elfin stump
#

For that you do not even need a mod, you can alter the sandbox settings to achieve different population and zombie behaviors.

grand cloak
#

i need a way to check if a container has an specific fluid inside but "item:getFluidContainer():getType()" is not working. how can I do it?

bronze yoke
#

use item:getFluidContainer():contains()

dull moss
#

here she goes

dull moss
grand cloak
dark wedge
bronze yoke
#

so for example i use item:getFluidContainer():contains(Fluid.Water) to test for water

grand cloak
#

wait let me check someting

dull moss
#

oh so id, gotcha

grand cloak
#

I was using the other format

#

thx

elfin stump
#

Anyone have a guide that covers how to have an item held in your hand? Two methods I think would work for me, one would be making a melee weapon and the other is just having an item actually appear when equipped. I am interested in the system used to have items appear as props in timedaction, and I have noticed any weapon I call does appear. So I am thinking of making fake weapons that never spawn to call just for this - or figuring out the right way and making an item that actually can be held via prop1/prop2 tag. - Any ideas? B41 guides would be fine here if anyone has a link to one.

#

I am sure it has to due with the rigging to the bone 8 or whatever for the hand, but not sure how to achieve it.

bronze yoke
#

contains tests if it has any of that fluid in it, you can also use isPureFluid(Fluid.Water) to test if it only has that fluid or getPrimaryFluid() == Fluid.Water to test if it is mostly that fluid

grand cloak
#

oh right

#

is there like any list with those values already

bronze yoke
#
Acid
Alcohol
AnimalBlood
AnimalGrease
Beer
Bleach
Blood
CarbonatedWater
CleaningLiquid
Coffee
CowMilk
Dye
HairDye
Honey
Mead
Petrol
PoisonPotent
SecretFlavoring
SheepMilk
SodaPop
SpiffoJuice
TaintedWater
Tea
Water
Whiskey
Wine
grand cloak
#

thx

spare burrow
#

there are plenty of possible ones, no idea if there is a way to customize/add custom ones

bronze yoke
#

you can just construct colours with Color.new()