#mod_development

1 messages ยท Page 333 of 1

bright fog
#

It's very likely they plan something on the liquid menu too

terse delta
#

Yeah, we saw concepts in some video discussing horrible PZ UIX

bronze yoke
#

they're definitely not gonna lock in fluids until after brewing comes out

#

i'd expect ui improvements around then

terse delta
#

good lord that's going to take another six months

bright fog
#

years

#

:>

terse delta
#

Dude I wish I could just you know, mod on Java

#

Since I actually know it

bright fog
#

There's a project if you want

bronze yoke
#

well you can, you just won't find much support or audience ๐Ÿ˜…

bright fog
bright fog
#

There's this project which is currently in need of modders to test the whole system tbf

bronze yoke
#

although actually

#

if you wanted to make a ui mod you maybe really can't do it in java lol

bright fog
#

Lua basically has almost everything needed to make UI work

#

Even the thing Jab is working on rn, where he's implementing HTML shit in PZ UI ?

bronze yoke
#

the whole ui api is lua, only the primitives are java, you'd basically have to rebuild everything

crisp dew
#

oooh, that's the leaf that Aoqia was mentioning.

bright fog
#

Sounds awful

#

And an insane amount of work

bright fog
terse delta
#

god, i know why PZ ui was so junky

#

ofc, it runs on lua

#

๐Ÿ˜ญ

bright fog
#

I mean tbf

#

If it was on Java ... I think it'd be worse

#

Simply because modders wouldn't be able to even fix it hahalol

terse delta
#

Fair drunk

bronze yoke
#

ui in a scripting language is pretty ideal, that's not why it has issues

bright fog
#

Yea like I had mentioned, when you start to look into it, you basically need to manually define almost everything

#

The UI size can't be easily adapted to the different resolutions, you need to do it yourself

#

Or not give a shit

terse delta
#

'

bronze yoke
#

XUI solves a lot of these issues

versed viper
#

When I put a mod I'm working on in the ~/Zomboid/mods folder, I can't see any mods at all in the mods pane in-game. Anybody know what's up with that?

crisp dew
#

~/Zomboid/Workshop

versed viper
#

can you run them from there? I thought that was just for Workshop uploads

crisp dew
#

It's for running too.

versed viper
#

Well damn. Thanks!

#

I haven't made a mod in like 2 years lol

crisp dew
#

Things have changed a bit.

versed viper
#

oh I know about the new structure, I had to update my mods

crisp dew
#

Also, nice work Jvla on adding examples and details to Mod_Structure, it looks really good now!

bright fog
#

Use /workshop, barely any point using /workshop

#

See this wiki page regarding the subject

thin swan
#

I remember seeing some discussion a while back on how to test mods for multiplayer without having to run two clients. Is there any guide on that?

#

nvm found it

supple briar
#

So question regarding flyers, can we make custom ones and if we can, is there anything weird about making them?

bright fog
#

I'm fairly certain you can do way more tho

#

But that's already okay to start

supple briar
bright fog
#

Check pinned messages

#

The wiki has a page regarding mod structure

#

Instead of copying an existing mod, follow that to better understand what's going on

icy night
#

like actual comics

worn mica
#

OnObjectAdded nor OnObjectAboutToBeRemoved dont detect when an isotrap is being created by throwables like the pipebomb, OnThrowableExplode works perfectly but only for the explosives not the firebombs, does anyone know how i can tell when a throwable reaches it's final destination / explodes?

bright fog
#

Check the game files for that I guess

#

To my knowledge, no, but I'm not aware of every fliers

#

Just the few I saw I don't remember seeing multiple pages

tranquil kindle
#

Isn't there option to "flip" flier so technicly you could have 2 sides to make a comic

bright fog
#

Because the UI for these are fully Lua sided

#

So nothing is stopping you from adding new pages

#

Or adding a flip to it

icy night
#

I'll check it out. Maybe I could add next page, which would take it to the next picture

#

Would be cool

knotty path
#

do you have a way to add different recipes to one item without duplicating the item recipe in the crafting menu?

#

tried to add tags to item through lua, tried to make a recipe in different txt other than new item's txt yet i still cant make different recipies for one item without duplicating the recipe so i have 6 recipes in crafting menu for one item

knotty path
#

b42

#

i think i have an answer

#

ill just have to stick to one item max

bright fog
#

Please make sure to provide the version of the game you are modding on when asking questions regarding modding.

knotty path
#

so

#

craftRecipe CraftTwine
{
timedAction = Making,
time = 180,
Tags = AnySurfaceCraft,

     inputs
     {
        item 1 [Base.Dogbane;Base.HempScutched;Base.FlaxTow;25:Base.Thread_Sinew] flags[Prop2;IsExclusive],
        item 1 [Base.WoodenStick2;Base.TreeBranch2;Base.Handle] mode:keep flags[Prop1],
        item 1 tags[SharpKnife;Scissors] mode:keep flags[IsNotDull;MayDegradeLight],
     }
     outputs
     {
        item 1 Base.Twine,
     }
}
#

for example

bright fog
knotty path
#

"item 1 [Base.Dogbane;Base.HempScutched;Base.FlaxTow;25:Base.Thread_Sinew] flags[Prop2;IsExclusive],"

#

it doesnt work with "item 3"

knotty path
#

but it didnt work

#

probably made a mistake

bright fog
#

Ok you need to provide clear informations of what you are trying to do here

#

Because:

  • we don't know what recipe you want to add your item to
  • we don't know your item script
  • we don't know what you are trying to achieve EXACTLY (add to input ? output ? modify quantiy ?)
#

I mean you did provide the recipe, just what input ?

knotty path
#

i've created a new item

bright fog
#

That was clear from the start

knotty path
#

now i want it to have few recipies

bright fog
#

Do you want it to have recipes to craft it ? Or you want it to be usable in recipes ?

#

Those are two different things

knotty path
#

i want it to have recipies to craft it

bright fog
#

So you want a custom recipe then

knotty path
#

yes, new recipies for a new item

bright fog
knotty path
#

great, ill add that wiki to my favourites

#

thanks

bright fog
knotty path
#

But no, it still doesn't solve my problem. This craftingrecipe allows you to create a few recipes but it only takes into account having one required item, I want to create my item from at least three single items, e.g. 3 rags or 3 twigs. You mentioned tags, maybe that will solve this problem?

bright fog
#

Then just replace item 1 by item 3

#

Or do you mean have the ability to use 1 rag + 2 twigs, 2 rags + 1 twigs or 3 twigs or rags ?

knotty path
#

yes, i want to have ability to use 3 rags to create an item as well as 3 twigs to create an item but these two recipes have to be separate

bright fog
#

No or yes ???

#

Ok man seriously, you need to be a bit more clear on what you're trying to achieve

knotty path
#

i want to have ability to use 3 rags to create an item as well as 3 twigs to create an item but these two recipes have to be separate

bright fog
#

Then describe something completely different and your wording seems to describe the opposite

knotty path
#

alright, my bad

#

i want to have ability to use 3 rags to create an item as well as 3 twigs to create an item but these two recipes have to be separate

bright fog
#

You want the craft to use EITHER 3 rags OR 3 twigs ?

knotty path
#

yes

#

exactly

#

: )

bright fog
#

Then just add more items possibles

#

Did you read the wiki page ?

bronze yoke
#

i think you need to add flags[IsExclusive] for what you want

#

adding both items but not the flag will let you use e.g. 2 twigs and 1 rag

knotty path
bright fog
#

I mean 1 item = 1 item

knotty path
bright fog
#

You can't make a flag

#

You need to describe the issue you are having

#

Bcs none of it makes sense of what your actual issue is

#

Wdym the quantity of an item can't be more than 1 ? Just set a quantity of 3 ?

knotty path
#

I can solve my problem by creating a mod like this but this way has a limit, if I want to add a few possibilities to create one item I can't include more than 1 item, so the quantity can't be more than 1. So, I can't do something like this: item 3 [Base.Twigs;Base.RippedSheets] but only something like this: item 1 [Base.Twigs;Base.RippedSheets]

bright fog
#

Why can you not add more items ?

#

If the quantity can't be more than 1 then that's your choice in the design of the recipe ?

knotty path
#

idk, it just doesnt work

bright fog
#

What doesn't work ?

#

The recipe when you set to 3 ?

knotty path
#

yes

bright fog
#

Send your craftRecipe

#

Bcs yes it works

#

And I can bet you just did a mistake somewhere that's it

#

You're not importing base

#

So setting quantity to 1 won't even work anyway

knotty path
#

module FirestarterMod
{
item Firestarter
{
DisplayCategory = Camping,
Weight = 0.1,
Type = Normal,
DisplayName = Firestarter,
Icon = firestarter,
Tooltip = "Used to make a campfire.",
}

craftRecipe CraftFirestarter
{
    timedAction = Making,
    time = 70,
    Tags = AnySurfaceCraft;CanBeDoneInDark,
    Category = Survival,
    inputs
    {
        item 3 [Base.Twigs],
    }
    outputs
    {
        item 1 FirestarterMod.Firestarter,
    }
}

}

#

^that one

bright fog
#

You're still not importing base

#

Same issue as I just described

#
imports
{
  Base
}
#

Should be something like that, just under

module FirestarterMod
{
bronze yoke
#

why do they need to import for this script?

bright fog
#

Using Base.Twigs

knotty path
#

did that again

#

i mean

#

before

bronze yoke
#

if you qualify it with Base. you don't have to import

knotty path
#

did that before

#

ill try again

bronze yoke
#

all import does is let you refer to objects from other modules *without* the module name

bright fog
bronze yoke
bright fog
#

And I've seen cases where not using them breaks your stuff

#

And I've seen cases where using them breaks your stuff

#

So uh

bronze yoke
#

only if you are using a short reference

bright fog
#

Yea no that's the thing

#

Even when using Base.

#

I am fairly certain I've seen many cases of people having issues by either doing any of two, importing or not, using Base.

bronze yoke
#

i'd have to see proof to believe you, i've never run into these issues and never seen these issues happen here

#

the myths around needing to import base for everything only started because of a buggy error message

bright fog
#

I need to make deeper tests I think

#

Especially as I'm currently rewriting the scripts page and will explain imports

bronze yoke
#

weird oddities to keep in mind about imports then:
imports aren't local to a file, they are global to the module
a lot of references just don't support them, and imports won't change their behaviour at all

bright fog
#

Again, inconsistent shit I guess lol

bronze yoke
#

it's why you shouldn't use them ๐Ÿคซ

bright fog
#

I mean, that you use them or not doesn't even matter as long as you use Base. from what you're saying ?

bronze yoke
#

they're probably inspired by c++'s using namespace directive and that is also very popularly considered something you should never use

#

yeah

bright fog
#

So what's the issue with the dude above ?

bronze yoke
#

i can't even tell what problem he's having to begin with ๐Ÿ˜…

bright fog
#

Bcs I don't see anything special, maybe in outputs

bright fog
bright fog
#

What's your issue exactly here ? In what case did it work ?

#

Also

#

That tooltip is wrong no ?

knotty path
#

one sec

knotty path
#

plus it works only without module base

bright fog
#

Wdym ?

#

If you set the module to Base, you need to change your output item module too

#
module Base
{
    item Firestarter
    {
        DisplayCategory = Camping,
        Weight = 0.1,
        Type = Normal,
        DisplayName = Firestarter,
        Icon = firestarter,
        Tooltip    = "Used to make a campfire.",
    }

    craftRecipe CraftFirestarter
    {
        timedAction = Making,
        time = 70,
        Tags = AnySurfaceCraft;CanBeDoneInDark,
        Category = Survival,
        inputs
        {
            item 3 [Base.Twigs],
        }
        outputs
        {
            item 1 Base.Firestarter,
        }
    }
}
#

Like that

knotty path
knotty path
#

whis

#

thois

#

this

bright fog
#

4th one is the right one

knotty path
#

hahaha

knotty path
#

i was sitting for the last 5 hours

#

trying to fix it

#

but why does it show in available ingredients instead of possible ingredients?

#

oh,nvm

bright fog
worn mica
#

does anyone know how to track a Throwable right after the swing animation? / B42

versed viper
bright fog
#

I think you'd have to recalculate the supposed trajectory, if that's even possible

tranquil kindle
#

I belive they're reworking throwables, if they haven't done so already. I've seen people using pipebombs on ragdoll zombies, but i haven't paid attention if it was still the same way of "throwing".

fiery nest
#

Hi all, I see this channel is already quite busy. I'll keep it short. I'm working on a mod to disable all autosaves apart from when the player sleeps. The idea is to have a "checkpoint" system so if the player dies they will restart the day. Losing that progress.

#

Only issue is I'm haivng big issues finding a way to disable PZ's save on death.

ocean gulch
#

I don't suppose it throws an event that can be hijacked, does it?

#

Even if it did I suppose the save would happen before you could stop it?

#

if it does you could check if the event was triggered by sleeping or dying and delete the save if it was a death

fiery nest
#

Yea it does seem to have that save pretty baked in on death so far.

ocean gulch
#

check the death event and prevent the save there?

#

When I say prevent I mean like throw a wrench in it

fiery nest
#

Yea I've seen this. I'll keep looking will update you if I can find a clean solution

ocean gulch
#

If there is a clean solution, it's probably the only one.

manic forum
bright fog
#

Unless they finally made them 3D

#

But yes they do plan on reworking those so they can react to the 3D tiles

bright fog
#

And like is stated multiple times in the page: scripts are not a programming language, so their syntax is ... weird

manic forum
#

i dont understand item 1 [*], in a craftRecipe b42

#

is that "any" item ?

bright fog
#

I think so, but I've seen it only used for fluids

manic forum
#

or any from itemMapper

bright fog
#

It's related to fluids usually

#

See the fluid page for craftRecipe

manic forum
#

ah i get it

bright fog
#

It's a little weird tbf

#

I suppose * is for any items, but never verified that

ocean gulch
#

1 L of any liquid?

bright fog
#

No

silent zealot
manic forum
#

no its like always 1, even if you remove 0.2L

bright fog
#

Take the example from the wiki

craftRecipe MakeCoffeeMug
{
    timedAction = MakeCoffee,
    Time = 20,
    category = Cooking,
    Tags = CoffeeMachine;Cooking,
    inputs
    {
        item 1 [Base.Coffee2],
        item 1 [*],
        -fluid 0.2 [Water;TaintedWater],
        item 1 tags[CoffeeMaker],
        +fluid 0.2 Coffee,
    }
    outputs
    {
    }
}

It will consume (-fluid) water or taintedwater from any container *

#

And create (+fluid) coffee

#

Tho I'm unsure what the item section of output means with the tag

#

I think I need to rework that fluid craftRecipe page a bit to verify some info

#

Yea I need to do some tests

manic forum
#

It will consume (-fluid) water or taintedwater from any container * - makes sense

bright fog
#

Yes, that part I'm fairly certain that's how it works

manic forum
#

and a minimun of 1 container is required

#

to be checked

bright fog
#

wdym ?

manic forum
#

item 1 [*],

bright fog
#

Yes

#

Any item containing water

manic forum
#

Minimum 1 Container of any Container

bright fog
#

Bcs technically literally ANY item can hold water

#

The new fluid component system allows you to add a fluid container property to anything, like an apple could hold water if I'm not mistaken

manic forum
#

makes sense for stuff like "Squeeze Water out of socks"

tranquil kindle
#

Tasty

bright fog
#

Uh that's not how it's used tho hahalol

#

But you can see this in action in debug mode by right clicking a tile, you have an option to add a fluid container property

#

So a wall could hold water the same way as a barrel does

manic forum
#

man i want now water squeezing out of soaked clothes as an option todo

bright fog
#

You can just make a craft recipe for that

#

Take any clothing that is wet, squeeze water from it

ocean gulch
#

or do you mean recovering the water?

bright fog
#

yea

manic forum
#

yeah thats the point to drink sock water

ocean gulch
#

mmm. hand foot mouth disease. my favorite

manic forum
#

does any1 know how to register a Furniture as a CraftingStation ?

#

so i can make Recipes that use that Tag, that onlythat CraftingStation got

bright fog
#

It's related to entities

#

And the Tag parameter

#

Some tags are crafting stations, and I suppose that you can define a custom one

manic forum
#

yeah, i want to define a custom one, for custom recipes. But i have no idea where i do that xD

manic forum
#

i cant find the "entity class" in the java doc does someone know the class name the game uses`?

bright fog
#

To make your own crafting station tag right ?

manic forum
#

yes

bright fog
#

Oh you want to see how the game does it ?

manic forum
#

yes :D

#

but if you got the lua/script way then i am all in

bright fog
#

Did you not find your answer in existing crafting station scripts ?

#

This is one for example

manic forum
#

lol didnt even think about looking at other recipes xD

bright fog
#

Yea that's the first thing you should do, see where the existing crafting station tags are defined ๐Ÿ˜…

#

Start from the top and go down from there

#

Tho I plan on documenting the entity scripts

safe sinew
#

Is it possible to make new custom tracer effect to assign to custom guns? I've been trying to figure out how guns get their tracers assigned because there's more than one in the vanilla files

thin swan
safe sinew
pliant citrus
#

Hello, I'd like to get started developing a simple mod that adds a poster and a figure. I can program, have already done Java, Lua, Blender, Gimp in professional context. I cannot however find any concise guide on making a placeable item like a poster for example on the modding wiki. Is my only bet to analyze the game files and copy and learn from there?

crisp dew
#

in short, you'll have a 1024x2048 spritemap with your assets, (each sprite being 128x256), and load it up as a Pack. Restart Tilezed and click Tilesets... to reload the cache. You should then be able to create a new tileset and add your tiles to it.

#
Packs/(yourfile).pak
Tiles/(yourfile).tiles
Tiles/2x/(yourfile).png

I've found that the directory structure can be picky too.

pliant citrus
#

Is there support for multiple spritemaps in case of too much items?

#

I don't need it right now but would be nice to know

crisp dew
#

Yes; you can spread assets across multiple tiles if necessary.

#

The first tile has the sprite name (yourfile)_0; the second yourfile_1, etc.

pliant citrus
#

TileZed also creates those pack files, or is that an external app?

crisp dew
#

yup

pliant citrus
#

Alright that's exactly what I need to get started, thanks for the help

crisp dew
#

If you are expecting to have a bunch, I would recommend my_awesome_posters_0 with images my_awesome_posters_0_0 as the first, 0_1 as the second... etc, then the continued list would be the tiles my_awesome_posters_1

bright fog
#

Also

pliant citrus
#

I just want to save my future self a headache if I do like the experience and continue so

bright fog
#

This might help, who knows

pliant citrus
#

Thanks, better too much than too little

bright fog
#

Eh, not sure

#

Bombarding with informations can just make new modders run away

#

But this explains the mapping tools, like TileZed that cdp linked above

crisp dew
#

Another note, I messed up mine a bit. I originally created different tiles for each different color of a thing. While it worked, it was excessive as I could have made a single tile which contains all variations of this particular item. Since however these tile IDs are attached to a player's game items, I opted not to change it as I had already released my mod, so just kept it.

pliant citrus
#

Good to know, can I import the base game's files in this tool too as a reference image for the angles?

crisp dew
#

Yes, though expect many items to not have images; Tilezed hasn't been updated with B42 assets yet.

pliant citrus
#

Damn alright

crisp dew
#

But enough should work to give you an understanding of what the base game is doing.

pliant citrus
#

Okay, thanks for the help!

crisp dew
#

I think the advertising assets from the base game should have a bunch of signage you can refer to.

pliant citrus
#

Sounds interesting because I only need a poster reference, since the figure will act as a placed item, I will look where in zomboid's files all of this is then

bright fog
#

Use the non official mapping tools

#

To get the B42 assets

crisp dew
#

oooh, someone has an update? nice! I'll have to look into that too when I have some time.

pliant citrus
crisp dew
pliant citrus
#

Is it true that texture sizes have doubled btw? a tile went from 64x128 to 128x256?

bright fog
#

No

crisp dew
#

(I have gimp, inkscape, and blender versions too in there)

pliant citrus
# bright fog No

Ah, because this man's tutorial has a 64x128 grid for tiles and they fit in there, but b42 textures only fit in a 128x256 grid

bright fog
#

Could you make me a list of everything that your repo has ?

pliant citrus
#

10 years

#

I know

bright fog
#

Jeez

crisp dew
#

Yeah, but it'll have to wait until tonight; about to run out the door.

bright fog
#

You're aware that litterally the entire world changed in 10 years ?

#

Don't refer to such old guides when looking for modding tutorials

#

There are mapping tutorials that are way way more recent

crisp dew
#

At some point I need to spin up a Windows VM so I can build Powershell versions of the scripts too.

pliant citrus
#

I'm only in there for the gimp part, and I couldn't find any proper recent one

#

it worked flawlessy until the grids

bright fog
#

I didn't understand, you're using a 10 years old guide of what ?

#

Gimp or PZ tile making ?

pliant citrus
#

Making PZ Tiles, the texturing and packing part

bright fog
#

Then refer to recent guides

#

Not a 10 years old guide

pliant citrus
#

They all skipped that part as far as I could find

bright fog
#

See the unofficial mapping discord too, it will have more guides and resources on tile making

pliant citrus
#

Very weird that everything is always behind another discord but whatever thanks

bright fog
#

Not our fault

pliant citrus
#

I know

bright fog
#

Stuff here is just very limited

#

@crisp dew this is automatically done from the in-game uploader

rugged jackal
#

Yo quick question , Is "the only cure" mod out for b42 yet ?

#

Cuz ive been bitten and i forgot the only mod i had for the infection is the suicide mod

grim cedar
autumn bluff
#

i have no clue what i am doing with lua

autumn bluff
left kernel
#

guys i'm trying to learn how to use blender and get into animation, but I just can't fix this no matter what, my animation always ends up super messed up in the game, what am I doing wrong?

bright fog
left kernel
bright fog
#

Primary to X and sec to Y

left kernel
bright fog
#

Np, this is a common issue when the character looks like such a monsterish monster

#

The spaghetti noodle

left kernel
#

now I just need to figure out how my animation shows up in the game. I created a test animation for carrying zombie bodies, and I need it to play when carrying a zombie's body. Is that very difficult to do?

bright fog
#

No idea

#

Are you trying to replace the player dragging zombie corpses ?

left kernel
#

yes, i created one animation for the zombie and another for the player (very poorly, but yeah)

bright fog
#

I'm not familiar how to create these animations

#

I suggest you check how the AnimNodes for these work

#

You'll probably have to replace these AnimNodes

left kernel
autumn bluff
#

sorry i am completely lost with LUA

bright fog
#

Looks like it yes

autumn bluff
#

alright

bright fog
#

100 sounds very high tho

autumn bluff
#

testing number

bright fog
#

๐Ÿ‘Œ

#

Check LootZed

#

Allows you to verify that your item is in the distribution

autumn bluff
#

oki

#

but it doesnt appear in the wardrobe, even after five respawns

#

odd

bright fog
#

it does the stats independently of the items spawning

#

It takes the distribution table directly

#

If it doesn't spawn there, it means you made a mistake possibly

autumn bluff
#

i mean it seems glitched in the distribution table

#

it appears in the dist table, but not in the actual wardrobe

bright fog
#

I nevermind I thought you meant it wasn't in it

autumn bluff
#

i cannot figure out the issue

bright fog
autumn bluff
bright fog
#

Looks good

autumn bluff
bright fog
#

Item doesn't spawn in the container ?

autumn bluff
#

nope

bright fog
#

Which container type is it in the tile ?

#

Is it WardrobeGeneric ?

twilit zealot
#

Someone know how to make a trait mod ? because i want to make a trait like wake up from coma, with extreme drunk state and with injury but i really don't know anything about coding ?

autumn bluff
#

is this what you need?

bright fog
#

No

autumn bluff
bright fog
#

Yea so that should be the right one

#

Since there's no other options

#

I think I remember people have a similar issue

#

But I don't remember the fix

autumn bluff
#

looks like it thinks its an item that doesnt exist

bright fog
#

Yes

#

You forgot to add the module

#

Your item is in a custom module

#

So you need to add the module in front of the item ID

#

In the distribution addition

#

NyoomHoodie.

autumn bluff
#

like this?

bright fog
#

Yes

autumn bluff
#

okay

#

testing

#

yus

#

thanks

bright fog
#

^_^

terse delta
#

bro else if is all over my screen

#

"I'm going to rip apart better sorting to look how it works, can't be that bad"

bright fog
#

:3

terse delta
#

So, this is kind of auto-defining for items

#

Instead of hand-writing category for each item

#

Now I gotta define why it casually ignores half of the beverages

drifting ore
#

hello

crisp dew
worn mica
# bright fog You can't

had to try everything possible just to figure that out, making a custom throwing system where i can plug events and track the throwed item is the only way to do it ig

pliant citrus
#

Gonna try my luck here, crafting the items work, I've registered the tiledef in modinfo, also registered the pack file, the items logo and such works, but when I place it it doesn't work, doesn't get placed and the preview is invisible. I have the tile name from the tile definitions (see screenshots)

bright fog
#

Try to place the tile completely independently from an item

crisp dew
#

When you craft the item, are you crafting it via the crafting menu or the building menu?

pliant citrus
#

crafting menu

#

this is the recipe

bright fog
#

Like I said, try to place the tile completely independently from any of these to verify your tile even works in the first place

pliant citrus
crisp dew
#

What's your item config for your item NekoparaMerch.ChocolaPoster?

bright fog
#

I think there's a sort of build menu in the debug mode

bright fog
crisp dew
#

oh, sorry right, just catching up. Last check; in your Pack file via Pack Viewer, does the ID on mouse hover match up to your WorldObjectSprite?

pliant citrus
crisp dew
pliant citrus
#

I restarted and it became clickable, my bad let me see

#

yes the numbers and names are correct

#

I'm trying to find the tile builder brush atm in debug

crisp dew
#

ok perfect, then it's probably just something silly with the Tile definition. Chances are if it still doesn't work with that debug build option, check the tile def.

pliant citrus
#

Alright thanks

crisp dew
#

Those options tell the Tile how to behave when placed in the world, ie: this tile is 100% height or "this tile is attached to the wall on the high slot"

pliant citrus
#

I have these atm

#

if I can't find my tilepack in the tiles selector of the brush tool, is there a registration issue?

crisp dew
#

It's possible

pliant citrus
#

The pack= is the file name of the pack file right

#

not the name used in the tileset defs

crisp dew
#

yup

pliant citrus
#

hm I have that already

crisp dew
#

Does it play nicely with spaces?

#
~/Zomboid/Workshop/VNGarage/Contents/mods/VNGarage$ find . -type f | egrep '(\.pack|\.tiles)'
./media/texturepacks/vn_garage.pack
./media/vn_garage.tiles
./common/media/texturepacks/vn_garage.pack
./common/media/vn_garage.tiles
pliant citrus
#

What do you mean?

crisp dew
#

You have tiledef = ...; I'm not sure if it throws a fit with those spaces, ie: tiledef=...

pliant citrus
#

ait lemme test that

crisp dew
#

Also Doggy will know, but at least in B41 I think we needed a unique registration number; 1300 was VN Garage's tileset for example.

pliant citrus
#

since removing the space I get an actual error on startup with a nil error

#

is there a list of taken numbers or just guesswork?

crisp dew
#

For now just use 9999 and see if it works.

crisp dew
#

There it is, thanks! I can never find that file

pliant citrus
#

Error is fixed with the number, and YES it works

#

the space and missing number was all

crisp dew
#

Good to know that registration ID is still needed.

pliant citrus
#

only 1 bug left and that is that the posters don't rotate, everything else works

#

thank you ๐Ÿ™

crisp dew
#

rotation was funny for me too, let me open my tire rack to see what I did

#

either CustomName and/or GroupName must match for the group, and the each must be N/E/S/W as appropriate, (or S/E in your case).

pliant citrus
#

so AttachedN and AttachedW tags, groupname is already done

#

then customname still needs to match ig

crisp dew
#

Also bonus info, if you also set item (full name) to NekoparaMerch.ChocolaPoster players can pick up the tile and it'll remap back to the original item when placed in their inventory.

#

Possibly yeah; I just trial-and-errored with that interface until I eventually got it working.

pliant citrus
#

thank you for all the help ๐Ÿ™

crisp dew
#

np, and best of luck!

ancient grail
crisp dew
#

oh, they won't want to keep 9999 but register their own; I just wanted to do some quick troubleshooting.

#

meanwhile what I need to do, is see if I can display multiple tile overlays at the same time to a given tile so I don't have to worry about a crazy mapping matrix.

ancient grail
#

using lua it can be done

crisp dew
#

multiple sprites stacked on top of each other?

ancient grail
#

wait nvm you can only add 1
but what i did back then was i added new iso object without sprite and gave that the overlay just to try
but yeah i ended up just adding another object with the sprite i wanted to use as overlay

crisp dew
#

eh, then I'd have to keep track of the other object, which also can only have 1 sprite overlay.

ancient grail
#

yes

crisp dew
#

I'm looking at 9 items, and the idea is to allow the player to have any combination, (within what fits), to be placed. ie: a screwdriver alongside a hammer or a screwdriver alongside ducttape.

ancient grail
ancient grail
#

i have another one with a barrel that changes its overlay based on the item you put

crisp dew
#

interesting idea; and you're creating a new object per each addition?

ancient grail
#

yes

#

just keep track of it by making a get function and if it returns the object then dont add anymore
and when the container objects item gets removed use that get function to fetch and then delete the object

this mod above is actually much more complex cuz of the offset
i mean you place item on a different square and spawns the object on an offset square

crisp dew
#

Is that Moonshine - Alcohol Factory ?

ancient grail
#

yes

#

distiller

crisp dew
#

and that complexity won't be an issue with mine; the object spans 2 tiles, but each tile is independent of each other.

#

(at least in terms of item storage)

ancient grail
#

ye just make sure theres no overlap otherwise it might look weird

crisp dew
#

oh yeah; already have that lined up thanks to some Blender templates.

ancient grail
#

if the container sprite bugs and becomes the one on top when you respawn
then you have to make invisible object and add the overlay to that one
this guarantees the overlay is on top

crisp dew
#

because you can't guarantee render order on map load?

ancient grail
#

since you have 2 overlay then make 1 overlay normal vanilla
and the the item you would need to do the hacky method
no other way around it afaik

ancient grail
#

so that could be the reason why it went above the overlay object

crisp dew
#

Since mine is a container, I could just remove any/all sprites on item updates and rebuild them, if I can go with this method. I'd need to do that anyway.

ancient grail
crisp dew
#

ah I see what you mean. Yeah, I think I would have just used the build menu to setup a new tile you can completely control.

#

oh... that was on B41, ok nvm

ancient grail
#

whatever means necessary . its all about figuring out how to do stuff despite limitations most of the time..

crisp dew
#

Thanks for the pointers, I'm skimming through the code in that mod now to see how it's done there.

silent zealot
#

I was going to actually play some Zomboid for the first time in a while, but then I got distracted by the lack of cute little bows on stockings and now I'm modding again.

silent zealot
#

I've got five textures in each clothing item for different colors, the script has IconsForTexture = red;blue;pink;white;black; which works perfectly so the icons match the color, I have 5 world models, and then used WorldStaticModelsByIndex = red;blue;pink;white;black, but... every item is getting a random wolrd model color instead of using the same index used for the inventory icon and clothing texture.

#

The random color is consistent if I pick the ribbon up/put it back down, but only has a 20% chance of matching the item's actual color.

#

Does anyone have any idea if this is a fixable thing or a quirk we have to live with?

frank elbow
#

The default code does sync the two, but special handling for clothing with an item visual immediately follows

silent zealot
#

Thanks

#

Guess I can raise a bug report, and just live with random world colors.

#

At least the inventory icon colors work so you don't have to try every pair on to find out what color they are.

frank elbow
#

@silent zealot re. #1318920979581501502 message: what you suggested would be ideal compared to this, but it seems feasible to use BodyLocationGroup.getAllLocations & mutate the ArrayList directly if you want to insert a BodyLocation

silent zealot
#

Thanks - I missed that looking for weird and crazy ways to do things. I did see public final class BodyLocations:Reset() but the idea of having to extract every location for everythin, reset them all, and then recreate from scratch just to wear little bows and a garter without layering issues was too much.

chilly flint
#
[16-06-25 14:31:50.949] LOG  : General      f:0, t:1750077110949> [craftRecipe] removing script due to load error = ImproveRadioRange.
[16-06-25 14:31:50.949] ERROR: General      f:0, t:1750077110949> ExceptionLogger.logException> Exception thrown
    java.lang.Exception: unknown recipe param: HamRadioMakeShift at InputScript.Load(InputScript.java:610).
    Stack trace:
        zombie.scripting.entity.components.crafting.InputScript.Load(InputScript.java:610)
        zombie.scripting.entity.components.crafting.InputScript.Load(InputScript.java:364)
        zombie.scripting.entity.components.crafting.CraftRecipe.LoadIO(CraftRecipe.java:526)
        zombie.scripting.entity.components.crafting.CraftRecipe.Load(CraftRecipe.java:453)
        zombie.scripting.entity.components.crafting.CraftRecipe.Load(CraftRecipe.java:287)
        zombie.scripting.ScriptBucket.LoadScripts(ScriptBucket.java:265)
        zombie.scripting.ScriptBucketCollection.LoadScripts(ScriptBucketCollection.java:122)
        zombie.scripting.ScriptManager.loadScripts(ScriptManager.java:1830)
        zombie.scripting.ScriptManager.Load(ScriptManager.java:1753)
        zombie.GameWindow.initShared(GameWindow.java:159)
        zombie.GameWindow.init(GameWindow.java:1375)
        zombie.GameWindow.mainThreadInit(GameWindow.java:754)
        zombie.GameWindow.mainThreadStart(GameWindow.java:596)
        zombie.MainThread.mainLoop(MainThread.java:64)
        java.base/java.lang.Thread.run(Unknown Source)
module Radio
{
    imports
    {
        Base
    }

    craftRecipe ImproveRadioRange
    {
        timedAction = Disassemble,
        Time = 100,
        Tags = AnySurfaceCraft,
        needTobeLearn = false,
        category = Electrical,
        SkillRequired = Electricity:3,
        inputs
        {
            item 1 HamRadioMakeShift,
            item 5 Base.ElectronicsScrap,
            item 3 Radio.ElectricWire,
            item 3 Base.RadioTransmitter,
            item 2 Base.Aluminum,
            item 1 tags[Screwdriver] mode:keep,
        }
        outputs
        {
            item 1 Radio.HamRadioInfBat,
        }
    }
}

I get the error above when loading in the mod (b42)
I don't quite understand why it has problems parsing the Item

frank elbow
#

Have you tried HamRadioMakeShift โ†’ Base.HamRadioMakeShift?

silent zealot
frank elbow
chilly flint
silent zealot
#

Looks like a lot of modders just lifted the code and renamed the lua file to avoid the dependency.

#

I'll write my own using theirs as a hint and credit them in the mod description...

#

Feels more reasonable than copypasting.

chilly flint
# frank elbow Have you tried `HamRadioMakeShift` โ†’ `Base.HamRadioMakeShift`?
[16-06-25 14:40:24.466] ERROR: General      f:0, t:1750077624466> ExceptionLogger.logException> Exception thrown
    java.lang.Exception: unknown recipe param: Base.HamRadioMakeShift at InputScript.Load(InputScript.java:610).
    Stack trace:
        zombie.scripting.entity.components.crafting.InputScript.Load(InputScript.java:610)
        zombie.scripting.entity.components.crafting.InputScript.Load(InputScript.java:364)
        zombie.scripting.entity.components.crafting.CraftRecipe.LoadIO(CraftRecipe.java:526)
        zombie.scripting.entity.components.crafting.CraftRecipe.Load(CraftRecipe.java:453)
        zombie.scripting.entity.components.crafting.CraftRecipe.Load(CraftRecipe.java:287)
        zombie.scripting.ScriptBucket.LoadScripts(ScriptBucket.java:265)
        zombie.scripting.ScriptBucketCollection.LoadScripts(ScriptBucketCollection.java:122)
        zombie.scripting.ScriptManager.loadScripts(ScriptManager.java:1830)
        zombie.scripting.ScriptManager.Load(ScriptManager.java:1753)
        zombie.GameWindow.initShared(GameWindow.java:159)
        zombie.GameWindow.init(GameWindow.java:1375)
        zombie.GameWindow.mainThreadInit(GameWindow.java:754)
        zombie.GameWindow.mainThreadStart(GameWindow.java:596)
        zombie.MainThread.mainLoop(MainThread.java:64)
        java.base/java.lang.Thread.run(Unknown Source)
frank elbow
#

i.e., for all the items it should instead be item 1 [X], except the last one with tags

#

Not the case for the outputs, just the inputs

#

Looking at the relevant code in InputScript confirms that this is the expectation

chilly flint
#

okey let me try that one out

bright fog
#

Read the wiki page

#

Your inputs need to be inbetween brackets

chilly flint
#

okey thanks

silent zealot
chilly flint
#

Is there also a Item guide for b42?
It seems that I have errors in my Item-creation

bright fog
#

The wiki about item scripts is the same

chilly flint
#

okey good

bright fog
#

Make sure you didn't forget a comma

chilly flint
#

got one at the end of every line and everything in brakets

#

curly ones this time around

bright fog
#

Show your recipe

bright fog
#

Outputs shouldn't use the brackets

chilly flint
#

im talking about Item-creation right now

bright fog
#

Wdym you've put everything in brackets ?

chilly flint
#
    item HamRadio1AC
    {
        DisplayName = Improved Premium Technologies Ham Radio AC,
        DisplayCategory = Communications,
        Type = Radio,
        Weight = 15.0,
        Icon = HamRadioCivilian,
        BaseVolumeRange = 10,
        ConditionMax = 100,
        DisappearOnUse = FALSE,
        IsHighTier = FALSE,
        IsPortable = FALSE,
        IsTelevision = FALSE,
        MaxChannel = 500000,
        MicRange = 5,
        MinChannel = 10000,
        Tooltip = Tooltip_item_Radio,
        TransmitRange = 999999,
        TwoWay = TRUE,
        UseDelta = 0.010, 
        UseWhileEquipped = FALSE,
        UsesBattery = FALSE,
        WorldObjectSprite = appliances_com_01_0,
    }

#

this is a different example

#

but the curly brakets {}

bright fog
#

What's the issue ?

chilly flint
#
    java.lang.Exception: ImproveRadioRange item not found: [Radio.HamRadioInfBat] at OutputMapper.getItem(OutputMapper.java:127).
    Stack trace:
        zombie.entity.components.crafting.recipe.OutputMapper.getItem(OutputMapper.java:127)
        zombie.entity.components.crafting.recipe.OutputMapper.OnPostWorldDictionaryInit(OutputMapper.java:157)
        zombie.scripting.entity.components.crafting.OutputScript.OnPostWorldDictionaryInit(OutputScript.java:398)
        zombie.scripting.entity.components.crafting.CraftRecipe.OnPostWorldDictionaryInit(CraftRecipe.java:735)
        zombie.scripting.ScriptBucketCollection.OnPostWorldDictionaryInit(ScriptBucketCollection.java:188)
        zombie.scripting.ScriptManager.PostWorldDictionaryInit(ScriptManager.java:1910)
        zombie.iso.IsoWorld.init(IsoWorld.java:2762)
        zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:301)
        zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:251)
        java.base/java.lang.Thread.run(Unknown Source)
.

and I've changed HamRadio1AC to HamRadioInfBat

bright fog
#

Show your recipe

chilly flint
#

sure one sec

#
module Radio
{
    imports
    {
        Base
    }

    craftRecipe ImproveRadioRange
    {
        timedAction = DismantleElectrical,
        Time = 100,
        Tags = AnySurfaceCraft,
        needTobeLearn = false,
        category = Electrical,
        SkillRequired = Electricity:3,
        inputs
        {
            item 1 [Base.HamRadioMakeShift],
            item 5 [Base.ElectronicsScrap],
            item 3 [Radio.ElectricWire],
            item 3 [Base.RadioTransmitter],
            item 2 [Base.Aluminum],
            item 1 tags[Screwdriver] mode:keep,
        }
        outputs
        {
            item 1 [Radio.HamRadioInfBat],
        }
    }

    craftRecipe ConvertRadioToGrid
    {
        timedAction = DismantleElectrical,
        Time = 100,
        Tags = AnySurfaceCraft,
        NeedToBeLearn = false,
        category = Electrical,
        SkillRequired = Electricity:3,
        inputs
        {
            item 1 [Radio.HamRadioInfBat],
            item 2 [Base.ElectronicsScrap],
            item 1 [Radio.ElectricWire],
            item 1 tags[Screwdriver] mode:keep,
        }
        outputs
        {
            item 1 [Base.HamRadio1],
        }

    }
}

bright fog
#

Read its wiki page

chilly flint
#

not on output, sorry

#

I've even read the wiki page, must have missed it somehow

#

jup that was it, works now :)

vast palm
#

@elder palm It looks like people are having a bunch of issues with more traits again. this time apparently a missing common folder in "dynamic". You may want to update your mod pages to clearly specify not to use the steam page for bug reports.

gleaming wedge
#

Hello guys, someone can help me with my mod traslation encoding? I have problem with Russian text provided by users and i don't know how to resolve it. I know from the wiki I have to set the file to Cp1251 but when I do all the text get unrecognizable. Is it ok to leave it that way?

tranquil reef
#

Everyone's complaining my bloody footprint mod causes black tiles in random places, but the mod adds a single tileset with about 16 tiles, completely isolated called "bloody_footprints", and all it does is add an overlay to tiles you walk on. I haven't encountered this myself at all, and I'm completely dumbfounded

#

But people keep posting about it so I have no idea what I'm supposed to do sigh

terse delta
#

There's issue with MRE mod. There's packing recipe, you box up 12 mres into one item, but, instead of using 12 rations, it boxes up 12 uses of them. Each ration has 50 uses. So, in order to fix it I just multiplied the required amount in recipe by 50. But this is essentially a crutch. Is there a better way?

terse delta
#

First guess - mod conflict

tranquil reef
#

Someone told me it's happening without any other mods. Could easily by lying or making a mistake, but idk, with the amount of people complaining and how little it seems like my mod actually affects, I feel like that makes no sense. It's not even a problem with the tiles I add apparently, it's just random tiles all throughout the map

#

Though I also saw someone mention black tiles without any mods at some point, so I can't tell if everyone's blatantly ignoring the person in my comments that said it was likely 42.9, or if it really is just this mod

bronze yoke
terse delta
#

Cause this issue is really frequent

bronze yoke
#

at release of b42 craftrecipes didn't even support food at all ๐Ÿ˜…

terse delta
bronze yoke
#

item 12 [MREM42.MRE] flags[ItemCount;IsWholeFoodItem] mappers[RationType],

terse delta
#

Thaks

terse delta
#

I'm not sure why

supple briar
#

So question, is there a way to spawn a specific flier? The guide on the wiki doesn't seem to show a way to do that

rancid tendon
#

hey folks guess who's back and having more issues with clothing items just not functioning despite being copied exactly as far as i can tell!

#

it's meeeee!

#

i didn't even fix the previous issue i've just been trying to fix other more obvious issues first like:

#
    {
        DisplayCategory = Bag,
        Type = Container,
        DisplayName = Music Bag,
        ClothingItem = Bag_DuffelBagTINT,
        CanBeEquipped = Back,
        WeightReduction    =    95,
        Weight    =    0.5,
        Capacity    =    25,
        Icon    =    DuffelBagWhite,
        OpenSound   =   OpenBag,
        CloseSound   =   CloseBag,
        PutInSound   =   PutItemInBag,
        BloodLocation = Bag,
        RunSpeedModifier = 0.95,
    OnlyAcceptCategory = Cassette,
        CanHaveHoles = false,
        ReplaceInSecondHand = Bag_DuffelBag_LHandTINT holdingbagleft,
        ReplaceInPrimaryHand = Bag_DuffelBag_RHandTINT holdingbagright,
        WorldStaticModel = DuffelBag_Ground,
        SoundParameter = EquippedBaggageContainer DuffleBag,
    }```
#

well i'm realizing now in retrospect that i didn't need a new clothing definition for this item because of an existing tintable duffle bag (i'm working on an item i made over a year ago oops) so i should try using those first before i complain about the issue i'm having so hold on i'll be back if that breaks

#

yeah ok so the issue persists

#

ok so as you can see i've created an exact copy of the tinted duffel bag using the same exact clothing definitions as the normal, functional item

#

so the only way that my item is different from the normal version is in this script file, as you see here

#

and whatever i'm doing is causing it to break such that when you hold it in your hand it's invisible

#

even though it's. the exact same item. with a couple of variables changed

bright fog
#

ItemCount ?

#

I would suppose IsWholeFoodItem ?

crisp dew
#

Hmm, I haven't been able to find the mod that Glytch mentioned last night and am struggling to find working examples of overloading IsoObjects over top existing tiles.

bright fog
#

You mean creating a new tile ?

crisp dew
#

More or less yeah; my goal is to have a sprite, (or more accurately multiple sprites), stacked visually on top of the base Tile.

bright fog
#

Idk what you call "base tile" bcs a square can just have as many tiles as it wants if I understood it right

crisp dew
#

I think it can too, yeah; just haven't done this specific task before. My current search is IsoObject.new in previously mentioned examples.

bright fog
#

Check this out to see how I add new tiles

crisp dew
#

ok, so IsoObject.new and square:AddTileObject were the core bits for that functionality?

bright fog
#

Yes

crisp dew
#

Cool, I was missing the square:AddTileObject, as I niavely expected Java just to handle that since you have to pass in the square object when you instantiate the object.

bright fog
#

You can see the constructors in the javadoc

bright fog
crisp dew
#

I did notice the Java constructor was rather light; that should have been a giveaway...

bronze yoke
#

yeah the api around a lot of object constructors is really strange

#

you'll notice a lot of them ask for a cell as well: in my experience every single one of these i've checked does nothing with it

#

possibly later on they realised that keeping constructors pure is generally the better choice and didn't want to break api just for that

crisp dew
crisp dew
#

Now that I won't need 300 tiles, I'm thinking of more items I should support, ie a box of nails and box of screws.

bright fog
#

What's the goal of the mod ?

crisp dew
#

Just a storage container with a table top compatible with the "crafting on table" flag.

#

But as with my other modded items, it's reactive to what is stored; if you store a screwdriver you should see a screwdriver hung up.

bright fog
#

Oooh shit wait, you could make something that has varients of objects as tiles that show up thx to the 3D inside other tiles

hollow current
#

is there a way to check if an evolved recipe contains a specific ingredient? I have a cannibalism mod that allows you to chop up and eat zombies/dead players, however with certain debuffs. Unfortunately I can't detect if said meat was added to other recipes. At least couldn't find a proper way to do so

bright fog
#

Check the crafting inside the crafting menu probably ?

#

Unless you're making a B41 mod ?

hollow current
#

B41 yea

bright fog
#

You can probably access the recipe data anyway

#

Maybe

#

Actually probably not since it's not a recipe and it's an evolved recipe

hollow current
#

i checked the api and couldn't find a method like evolvedrecipe:getIngredients() or sth

crisp dew
hollow current
#

oh wait i found getItemsList

#

that could be useful

bright fog
crisp dew
#

oh yeah

bright fog
#

So you could have multiple of these, with variants, and anytime the item is placed in the box, it's item as a tile is created as a tile on the container

#

Tho tbf that sounds complexe as shit, and placing 3D items exists for this reason

#

I suppose it'd be possible

crisp dew
bright fog
#

I think the best application is a single slot tile

crisp dew
#

That's what I'm doing; I have the table already created as a base tile, and I'm using that as a template to position the different items so they fit on the base tile and within all the other items.

bright fog
#

But you're not limiting what item can be put inside the container ?

crisp dew
#

I will be limiting what items can be placed.

#

ie: you can't hang a whole battery on a workbench pegboard.

silent zealot
#

It's probably a 42.9 issue, maybe with erosion - similar to one particular piece of grass reaching a point several weeks into the game where it becomes red ???s in the air.

silent zealot
fresh lodge
#

Hello everyone, i'm trying to hide a recipe in b42 apparently the new system doesn't like some of the old calls, how is this achieved in b42?

local function hide_recipe(name)

    local recipes = ScriptManager.instance:getAllCraftRecipes()
    for i = 0, recipes:size()-1 do
    
        local recipe = recipes:get(i)
        if recipe:getName() == name then
            -- WORKING TIL HERE --
            recipe:setNeedToBeLearn(true)    -- NOT WORKING
            recipe:setIsHidden(true)        -- NOT WORKING
        end
    end
end
silent zealot
#

I assume CraftRecipeManager is the namager for these.

fresh lodge
#

I am already using "getAllCraftRecipes()" and i get response until after "recipe:getName()" then the two old commands just throw error and i can't find a way to disable/hide the recipe

silent zealot
#

I can't see any obvious functions to disable a recipe

#

Maybe pull the ArrayList of tags with getTags() and remove the tags that let it get used

#

AFAIK every recipe needs a tag for where to use it - AnySurfaceCraft, InHandCraft, PrimitiveForge, etc

#

nope, getTags wraps the ArrayList into an unmodifiable object.

#

Probably because the game hates tags changing after the recipe DB is initialized.

fresh lodge
#

Yep just noticed ๐Ÿ˜‚

#

maybe trying to remove them from the character could work

#

like unlearn

pulsar charm
#

Im working in b41
How do objects get added to the globalobject system?
I'm sort of copying the C/SRainBarrelSystem and C/SRainBarrelGlobalObject,
and for now I have isValidIsoObject returning return instanceof(isoObject, "IsoThumpable") and isoObject:getName() == "Wooden Picket"
later I'll replace the Wooden Picket with my own buildable, but building wooden pickets dont add them to my client or server global objects list.

silent zealot
#

Assuming it works the same as B42: SGlobalObjectSystem.new(self, "campfire")

#

(ans store the return somewhere for later use probably)

#

Are you making a new type of object that needs to be globally tracked?

silent zealot
#

I'd have a look at the existing vanilla files like SRainBarrelSytem.lua, STrapSyetem.lua, SCampfireSystem.lua, SFeedingTrouighSystem.lua

pulsar charm
#

yeah thats what I used to model off of

#

new gets called in newLuaObject, but I cant figure out where that gets called

silent zealot
#

looking at campfire I think the chain is: campingCampfire:create or a timed action calls SCampfireSystem.instance:addCampfire(square)

#

SCampfireSystem:addCampfire calls local luaObject = self:newLuaObjectOnSquare(grid)

pulsar charm
#

yeah. saw that as well. for rain barrels it must get called from the carpentry building file

silent zealot
#

Not helped by the half-assed "object orientated" system in LUA passing the self variable between different "classes"

#

At least it looks like creating the globalobjects is all in lua so you can do it...

#

What is the new globalobject you are creating?

pulsar charm
#

BuildingObjects/RainCollectorBarrel.lua doesnt directly add to the system either, nor the ISBuildMenu
a pipe/water relay for multi story plumbing. all the current mods for it dont work or are gimmicky

#

my logic for the water stuff is fine atm, just cant figure the global system

silent zealot
#

It's really hard to search for because of the lua inheritence

silent zealot
#

There was a lua "javadocs" posted here recently that would probably bea big help... if I could find the link

#

This deserves a pin!

silent zealot
#

RainCollectorBarrel has this

#

So add "uses events to do stuff" and "different in single player" to the list of reasons this is fun to track down. ๐Ÿ˜›

pulsar charm
#

ah I see my issue. wooden picket (my temp tile) doesn't have its one create file tha calls OnObject add. I'll just create the carpentry option now then
thanks

#

is carpentry different in b42? would rather use a future proof method if i can

silent zealot
#

very different lol

#

That specific thing probably hasn't changed.

#

But the entire interface is new.

#

In theory, that won't matter at all if what you're doing is in the "the object has been made, now what do I do?" phase of things which I think it will be... doesn't matter if a map creator put it there, or it was crafted from a menu, spawned by a script, etc. at that point.

late hound
#

Has anyone tried to make the player character ragdoll?

silent zealot
#

Yes.

#

I mean I actually tried to make corpses ragdoll when dragged

#

But did it to the player

#

It was hilarious and very wrong, some body parts moved with the animation and the rest were like jello

#

All you need to do is add a ragdoll variable to the animationset xml

#

But to make it useful, I think you need to do it when there is no animation controlling the player... Maybe with so new falling over animations or something

old ginkgo
silent zealot
#

What I just posted is the documentation lol

#

Download melee ragdolls and it's easy to see what they added to the files

#

Then add that same thing to some player animation XML files

#

When would you want to have the player ragdoll?

silent zealot
#

Working on adding the bows to zombies. The outfit system is horrible to work with. At least strippers don't wear many clothes.

bronze yoke
#

i have a roughly 100% suspicion that tis have some tool that generates outfits for them and that's why the system is so gross to work with

silent zealot
#

Looks like OnCreateZombie triggers too soon to do anything with clothing.

silent zealot
terse delta
#

How I can find source if mod calls some kind of function?

silent zealot
#

If it's a lua function, it's in one of the lua files.

#

If it's a java function use ZomboidDecompiler for an easy one-click tool to generate a nicely decompiled bunch of java files.

#

I recommend opening the games media folder in VSCode for an easy way to search. (and open the decompiled java as well if you have it)

#

Fun Facts about Strippers in Rural Kentucky, 1993

  • There are no white strippers. There are legends of a StripperWhite in the code, but no such outfit exists.
  • The Stripclub Zombie Zone definition is broken; it re-uses "FiremanStripper" as the index for over half the entries.
  • So then where do strippers come from? They are hard-coded in the java classes RBStripclub ("random" building) and RDSStagDo(random house of dead "survivors")
terse delta
crisp dew
#
if (self.srcContainer:getParent() and self.srcContainer:getParent():getOverlaySprite())

tricksy tricksy... was wondering why updateOverlaySprite wasn't firing for this new object; it's because the game code won't trigger if there isn't an overlay sprite assigned.

silent zealot
#

Imagine if it worked and updated null to null_2.0

bright fog
#

Bcs too many people seem to need it

silent zealot
#

I'd love to hear it.

bright fog
#

And I have the solution to it already

silent zealot
#

Because what I have so far is the desires to open a bug report "No white strippers in rural Kentucky" ๐Ÿ˜›

sour island
#

What I had to do was add the zombie to a temp list to process a tick after

bright fog
#

Go up from here

#

It should be that

crisp dew
#

Jvla, remember the workbench I've been working on; I realized a shortcoming with this idea. Since I'm using a tile overlay to render items, the entire tile is limited to 128x256, but the item is only a tiny fraction of that.

Regular items are 128px in size, but the entire size of the object has all those pixels to play with.

#

But good news.... it's working in full now, (just looks like rubbish)

silent zealot
#

So on createZombie throw the zombie into a list, then process that with a an onpdate or similar?

bright fog
mortal pebble
#

Hi. Can you use debug mode to edit a tile's zone attributes?

silent zealot
#

@bright fog that's a great design - I can use that approach and make an extremely stripped back version that is basically "wait a tick, and if they are wearing stockings add bows"

bright fog
#

Possibly was this function

#

But I remember something else

silent zealot
#

I found the bit that adds new functiosn with the zombie as a parameter to a list and the delayed function event thingy that calls a function on them

bright fog
#

Yea

#

It should be HasActiveModel

silent zealot
#

Tomorrow I'll have a proper look and either add that a dependency or code up something that does the 2% I need.

silent zealot
#

I don't need proper consistency, just little bows

#

lol

#

Not ready for B42 use yet?

bright fog
#

That's B42 actually

#

But don't use the framework

#

It's not what it's for

#

I planned on making a custom event anyway

#

But you can use it for now if you want

#

The mod is fully open source in fact now

silent zealot
#

OK, well it's enough I have a viable design for what I need to do now.

#

Thank you for that!

thin swan
#

Anyone happen to know what I need to do to make custom animations sync in multiplayer?
Do I have to send a server command or something? I haven't really messed around with multiplayer modding at all

tranquil reef
#

Got me very confused for a second lol

terse delta
#

Is there way I can change weight multiplier of held/attached/worn items?

thin swan
crisp dew
#

damn Github.... I forgot how to append a pull request

silent zealot
pliant citrus
#

Heya, for some reason (this worked perfectly yesterday) when trying to add my tileset and define properties it now looks like the following screenshot, but when I open it in pack viewer everything is normal? I didn't have this issue yesterday

bronze yoke
crisp dew
#

I thought that was the trick, and vaguely remember GH doing it gracefully before, but can't seem to get it to tie that last commit to the PR for some reason.

#

and I have no idea Silent; never had that happen before

silent zealot
#

You can add a tag to make an item weigh 30% when attached instead of 60%. And you could probably use Lua to change the actual item weight when attached/held

pliant citrus
crisp dew
#

In your 1024x2048 png which the pack is built from, did the image positions change?

#

The Tileviewer, (at least in my version), pulls the image previews from that .png, NOT the .pack file.

pliant citrus
#

Nope

#

there have been new images added but I'm making a new .tiles file

#

and not using the old one

terse delta
crisp dew
#

oh.... github is just being REALLY slow right now. ok

pliant citrus
#

I've tried remaking the png exporting again always the same jagged chopped up result

#

can't find anything online about it either

#

The exact same file from yesterday now has the same problem

#

should I just reinstall Tiled or som, nope still broken and unusable

#

So I'm kinda stuck with a forever broken tilezed now can't load a tileset properly in the tiles definitions, is there another support place somewhere?

fresh lodge
#

Hello, i am trying to get a function to replace one or more items when loot is generated but i can't get it working, here's the code:

local function SwapItem(roomName, containerType, itemContainer)
    local items = itemContainer:getItems()
    for i=0, items:size()-1 do
        local item = items:get(i)
        if item then
--          if item:getType() == "XXX" then
                itemContainer:Remove(item)

                local lighter = InventoryItemFactory.CreateItem("Base.HottieZ") -- THROWS ERROR
                itemContainer:Add(lighter)
--         end
        end
    end
end

Events.OnFillContainer.Add(SwapItem)

-- ERROR: General      f:205, t:1750191512781> ExceptionLogger.logException> Exception thrown
-- java.lang.RuntimeException: attempted index: CreateItem of non-table: null at KahluaThread.tableget(KahluaThread.java:1667).
-- Stack trace: ...
#

A specialLoot rule would work too (but i haven't quite grasped how to handle it)

pliant citrus
thin swan
pliant citrus
#

tile's are split up very weirdly too not like the ones who have the 2x error

#

already tried those internet fixes

#

thanks for taking the effort too answer at least tho

crisp dew
pliant citrus
#

Ohhh alright, guessing it's gonna be in appdata or user folder then in windows

crisp dew
#

probably

thin swan
#

Are you using the steam zomboid tools or the unofficial tilezed release?

pliant citrus
#

unofficial B42 latest release

#

from the github

thin swan
#

Ah okay, probably something else then because I think you access it differently iirc
Did you ask in the mapping discord?

pliant citrus
#

Yes but that one's completely dead

#

Currently looking for that temp folder cdp mentioned

#

maybe a caching issue since the exact same image worked yesterday

#

Got one

#

Please work

#

Nope same issue

thin swan
crisp dew
#

Wanna post/send the 2x tileset? I'll take a peek at mine and see what it does.

pliant citrus
#

Honestly dunno what more I can check

crisp dew
#

Sprites are still lined up with the expected positions, so that's good.

pliant citrus
#

Yup and I made sure to not mess with any export settings too

#

it's just weird that the exact image from yesterday suddenly didnt work either

#

nothing changed

#

and this is a new image ofc but the exact old one also broke

crisp dew
#

and opening them as a new Tile positions them correctly.

pliant citrus
#

So this whole past hour was my tilezed being broken even though I reinstalled

#

๐Ÿ˜ญ damn

#

thank you for testing btw!

crisp dew
#

Potentially. Steps: I closed Tilezed, put it in my 2x directory, re-opened Tilezed, clicked 'Tilesets...' to pick up on the new image, created a new tile named whatever, and added the spritesheet.

pliant citrus
#

Alright I'm going to strangle tilezed one of these days

#

Thank you btw, without your help would've probably given up using tilezed alltogether

crisp dew
#

Your welcome, and it's understandable; Tilezed can be quite the PITA.

safe lagoon
crisp dew
#

Alright, it's coming together; have 2 sets of items that can be placed, lower-res boxes, and independent left/right sides of the pegboard.

silent zealot
#

You can also use newItem = itemContainer:AddItem("Base.HottieZ") and just create it directly in the container.

odd parrot
#

Hey guys!
I'm new in pz modding (literally 0 experience) i know C and java, and i started to take a look over lua, doesnt seem to be difficult, but i'm scratching to understand how to make changes in pz, i do a "scooby snack" item but i cant attach a 3D model on it (cereal box but scoobySnack texture)
If anyone has a full guide to share it could be awesome, i already explore the pinned material and the wiki but still unclear for me

bright fog
#

I think this video teaches how to create an item

odd parrot
daring basalt
#

im trying to make a mod where you can set your age and get skill bonuses the older you are, and a fitness debuff after 50. I have it written (i think) and I can even enable the mod in pz, itt just doesnt do anything

#

any help would be apreciated

supple briar
#

This a general question, is there a publicly usable library out there for armed vehicles, like tanks and stuff?

silent zealot
#

Forth: is that AI generated? setPerkLevel isn't a thing in B42, there is setPerkLevelDebug

#

I'm also not sure if that level is the level 1 to 10 or the amount of XP.

silent zealot
#
silent zealot
odd parrot
# bright fog https://www.youtube.com/watch?v=yFMLmgM20xc

Thanks to this and looking other mods and the source game scripts itself i manage to do it! spiffo

it was confused at first but it has a lot of sense now

i didnt attach the lua distribution code yet but for sure im gonna do it tomorrow!

and yes, i was since i receivde that info doing this item haha

old ginkgo
#

Rather amusingly it transitions perfectly between any currently existing animation the player might be doing and seems to inherit the motion of the body.

autumn bluff
#

can anyone tell me where the file for blacksmithing recipes is?

glass hollow
#

i remenber that progammable VHS-recorders in 93, i think .... is there a mod for that?

silent zealot
#

VCRs that could do that existed in the 1980s, but the interface for setting the record time... lets just say it was so complicated it became a running joke, and President Bush The First said "By the year 2000, all Americans must be able to set the clocks on their VCRs"

#

Which was a joke. You can tell it was a joke because the republican party has never been big on improving education.

#

Even the Avengers struggle with VCRs:

#

Tired rambling aside, a mod that lets you record shows over an existing VHS cassete with a suceess rate based on your electrical skill or better yet, recreate the interface and make players fix the flashing 00:00 and set the timer, would be great. I hate planning my first week around the TC broadcast times.

silent zealot
chilly flint
#

hey quick question.
I've removed all the possible spawns and replaced then with my own.
How do I restore the worldmap.png to this screen?

small topaz
#

Hi! In build 41, debug mode, how do I use the cheat mode for growing crops faster? I just tried the cheat option "grow" but this doesn't seem to have any effect for me.

Edit: Problem resolved...

dawn sparrow
#

Before I make a fool of myself, I don't have any experience in lua programming or programming in general for that matter. Does anyone know if the Tooltips for Moodles can be modified to draw vertically rather than horizontally? I read somewhere before the way how tooltips for the moodles between 41 and 42 work differently, that they don't support html line breaks anymore.

silent zealot
#

@gabes There are a few moodle frameworks (Moodles in Lua, Moodle Framework)

#

But, I don't know if those touch the tooltips.

bronze yoke
#

moodles don't really support modding in any way

silent zealot
#

Item tooltips are deep in the java, moodle tooltips I'm not sure on but I suspect they are too

bronze yoke
#

moodles are one of the most hardcoded things in the entire game

silent zealot
bronze yoke
#

that's what i did for statsapi too, i don't really plan to port that to 42 though ๐Ÿ˜…

silent zealot
#

Whcih is one way to handle lack of modding lol

#

We're all playing B42 unstable and this guy is already on the NPC update!

sour island
#

Nice

sour island
silent zealot
#

hahaha

#

I love that image

#

The inbred kentucky redneck fingers

terse delta
#

How do I apply lua patch to item, so I change one specifical property?

silent zealot
#

DoParam()

#

An example:

local function NepItemParam(item, newparam)
    local x = ScriptManager.instance:getItem(item)
    if x then
        x:DoParam(newparam)
        print("NepTweaks: item updated: "..item.." "..newparam)
    else
        print("NepTweaks: unable to find item "..item)
    end    
end

local function NepChangeSomeParams()
    print("NepTweaks: Adjusting weights...")
    NepItemParam("Base.Plank", "Weight = 0.3")
    NepItemParam("Base.SheetMetal", "Weight = 0.2")
    NepItemParam("Base.SmallSheetMetal", "Weight = 0.1")
    NepItemParam("Base.Key1", "Weight = 0")
    NepItemParam("Base.CarKey", "Weight = 0")
    NepItemParam("Base.Key_Blank", "Weight = 0")
    NepItemParam("Base.Log", "Weight = 0.9")
end

Events.OnGameBoot.Add(NepChangeSomeParams) 
#

You can use DoParam to replace any line of an item's script file.

#

Never tried dealing with things that can appear multiple times, it probably just adds an extra entry in that case but there are not many of those in item definitions.

terse delta
#

Thanks, got it

odd parrot
silent zealot
#

It's overwhelming at first, but just break what you're doing into small pieces and ask here if you get stuck.

terse delta
#

Damn, chatgpt is really good at explaining code

#

Had troubles reading it

#

(Understood like 50% of it at first time, now I see it all)

compact sluice
#

So basically is it possible to ask chatgpt to create you some lua code and modify it?

#

Or it will give you shitty code that made you suffer more then creating it from scratch ?

terse delta
#

You probably can, but you have to know what you're looking at

#

To see if chatgpt made an error

#

Because it is not familiar with PZ API

odd parrot
compact sluice
terse delta
#

Still, chatgpt is unfamiliar with zomboid API at all, if only there was a way to feed him whole guide on it ๐Ÿ˜

bright fog
#

You still need to learn how to use the java doc for example

#

And learn how stuff ACTUALLY works in the API

terse delta
#

He is pretty good at explaining syntaxis tho, it can even understand the purpose of rather unknown functions

#

I tried feeding him other lua files as well

silent zealot
#

ChatGPT is good if you have a specific question

#

"If I have two lua tables how do I remove anything in table A that is also in table B?"

#

or stuff like that

compact sluice
#

Well that would be a good start

silent zealot
#

Then it writes code though it is a language model

#

so it puts in things that look like godo words, even if they are made up

terse delta
silent zealot
#

Ask for something impossible like "how do I make my flashlight red in project zomboid" and it will tell you something like flashlight:setColor(red)

#

instead of "flashlight color is hardcoded in the java rendering engine for both flashlights and vehicle headlights`

terse delta
#

But models like this aren't for public iirc

bronze yoke
#

no it'd still be terrible, chatgpt is a language model, it does not understand code

silent zealot
bronze yoke
#

the only thing chatgpt knows is what kind of words usually appear after the words you gave it

terse delta
silent zealot
#

ChatGPT (and LLM's in general) is about saying the words it thinks you want to hear.

terse delta
#

Just use any AI made for coding

bronze yoke
#

so very generic questions it can answer with pretty good accuracy, but the more specific a question is, the more likely it's just stringing words

terse delta
#

Chatgpt has become a household name for neural networks

silent zealot
terse delta
silent zealot
#

Stable diffusion for image generation makes more sense to me, but it's still insane that a download of a few gigabytes can figure know how to reproduce so many things

#

Even then my understanding of how you take source images, turm them into a model, and then get an image out is very very surface level.

#

(not how to use it, but how it actually works)

terse delta
#

As referring to google AI overview lol

#

People shit on it, but it is actually good

silent zealot
#

"Markov chains but better"

#

I honestly skim over the Gogole AI rubbish when searchin for a technical problem, better to find teh stack overflow posts it stole the answers from

bronze yoke
#

when i'm looking for information i need it to be right, so this technology that does not guarantee anything that it tells you is actually true is not that useful to me

silent zealot
#

It's also very bad at program architecture/design. But to be fair, so are a lot of actual programmers.

terse delta
bronze yoke
#

must've been trained on java

terse delta
#

It is not like it takes data out of nowhere

#

I can assure that most of bad AI responses is the human fault, not AI failure

silent zealot
#

As a human I wrote "print" in a shell script today because I'd spent too much time in LUA

#

The AI is mixing up every programming language in existence lol

silent zealot
terse delta
#

The reason for hallucinations is the reward system.

#

If it can't validate info, it'll just start fabricating because that's the command

#

In this case, this is coding fault

tranquil reef
#

tile definitions can be anything right? people are just advised not to use the same one as other mods?

terse delta
#

AI companies are working on the issue they've created lol

silent zealot
#

I wouldn't call it a coding fault when a program doesn't do something it was never supposed to be able to do.

#

It's a sales & marketing fault that people expect it to do that lol

bronze yoke
terse delta
#

AI already can fool people and pass turing test, isn't that insane?

bronze yoke
#

if it's e.g. private use then the id number you pick doesn't really matter at all

silent zealot
bronze yoke
#

i think if you were going to design any program specifically to defeat the turing test, the concept of a language model is exactly what you would end up with

dawn sparrow
dull moss
#

dont remember the details

#

good stuff

#

nor do i have the code anymore as it became obsolete

#

but ye for general purpose stuff its great

thin swan
#

Has anyone done item serialization on b42? Low-key thinking about trying it so I can make my bicycle containers work better, but also feels like it could be a disaster

#

especially since it's an unstable version and any update in the item scripts could mess it all up

bronze yoke
#

don't do this

#

the item format changes in some way basically every update

#

you're just asking for regressions, item deletion, missing item properties, etc

#

starlit had an item serialisation module in b41 but there's just no way for something like that to be stable with updates

#

it can only really be added on tis's end, or through java mods that hook into the game's existing serialisation

slim swan
#

Is there a way to tell whether an item is from vanilla or from a mod?

terse delta
#

Vanilla items don't

bronze yoke
#

item:isVanilla()

slim swan
#

thanks~