#mod_development

1 messages Β· Page 328 of 1

bright fog
#

What is for you ?

bronze yoke
#

Windows

bright fog
#

Alright thanks

agile nacelle
#

i got the vehicle width but i also need the car length

#

there doesnt seem to be a method to get the length in IsoMovingObject

bright fog
#

No idea for vehicles

agile nacelle
#

but i multiplied it by 100

bright fog
#

Gives the corners of the hitbox

#

Or the shadow I guess

#

Does the vehicle script hold the info regarding its size ?

#

Hmm can't retrieve that from the vehicle

#

You can retrieve the vehicle area from its original script by using this most likely

agile nacelle
#

I'll see

small osprey
steady fable
#
local script =
    "{ inputs { item 1200 [Base.BlowTorch] mode:destroy flags[Prop2],} }"


    local recipe = getScriptManager():getCraftRecipe("PackBoxOfWeldingTorches")
    recipe:getInputs():clear()
    recipe:Load("PackBoxOfWeldingTorches", script)```
how would i go about changing this so that instead of changing the craftrecipe, it changes the item? 

this is the item i have:
```lua
item CrateOfPlanks
    {
        DisplayName = Crate of Planks,
        DisplayCategory = Material,
        Type = Normal,
        Weight = 25,
        Icon = Parcel_Medium_Ammo,
        ConsolidateOption = ContextMenu_Merge,
        WorldStaticModel = Parcel_Ammo_Heavy,
    }
}```
i want to change its weight so it is instead 6 or 8
#
local script =
    "{ DisplayName = Crate of Planks, DisplayCategory = Material, Type = Normal, Weight = 6, Icon = Parcel_Medium_Ammo,ConsolidateOption = ContextMenu_Merge, WorldStaticModel = Parcel_Ammo_Heavy,}"

    local item = getScriptManager():getInstanceItem("CrateOfPlanks")
    recipe:getInputs():clear()
    recipe:Load("CrateOfPlanks", script)```
settled some of the scripting part but getinstanceitem doesnt exist
#

and on the javadocs im not finding any appropriate parameters to replace it with

small osprey
#

Mhh I also would appreciate a quick review of this simple debug recipe. Hard to debug the errors from recipes I find..

    {
        imports
        {
            Base
        }
    
        craftRecipe AssembleResonantAgitatorMKII
        {
            timedAction = MakingElectrical,
            Time = 5,
            category = Electrical,
            Tags = AnySurfaceCraft,
            inputs
            {
                item 1 [Screws]
            }
            outputs
            {
                item 1 Screws
            }
        }
    }```
steady fable
small osprey
#

UUhm what was it? πŸ˜…

bright fog
#

Also old ass message man

small osprey
#

Yeah just looking through peoples recipe to find out why mine doesn't work πŸ˜…

bright fog
#

Just explain your issue here

small osprey
#

Well I would assume this recipe simply converts 1 screw into another screw - for testing.

Upon testing (press B while in debug) I get a hard to read console error and the UI doesn't show

function: OpenHandcraftWindow -- file: ISEntityUI.lua line # 559 | Vanilla
function: onPressKey -- file: ISCraftingUI.lua line # 1724 | Vanilla

LOG  : General      f:11222, t:1748292253897> __len not defined for operand
ERROR: General      f:11222, t:1748292253897> ExceptionLogger.logException> Exception thrown
    java.lang.RuntimeException: __len not defined for operand at KahluaUtil.fail(KahluaUtil.java:100).
    Stack trace:
        se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:100)
        se.krka.kahlua.vm.KahluaUtil.luaAssert(KahluaUtil.java:88)
        se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:729)
        se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:173)
        se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1963)
        se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1790)
        se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
        se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
        zombie.Lua.Event.trigger(Event.java:72)
        zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:315)
        zombie.input.GameKeyboard.update(GameKeyboard.java:69)
        zombie.GameWindow.logic(GameWindow.java:310)
        zombie.GameWindow.frameStep(GameWindow.java:917)
        zombie.GameWindow.mainThreadStep(GameWindow.java:643)
        zombie.MainThread.mainLoop(MainThread.java:76)
        java.base/java.lang.Thread.run(Unknown Source)
LOG  : General      f:11222, t:1748292253897> -----------------------------------------
STACK TRACE
-----------------------------------------
function: calculateLayout -- file: ISWidgetIngredientsInputs.lua line # 206 | Vanilla
function: calculateLayout -- file: ISTableLayout.lua line # 466 | Vanilla
function: calculateLayout -- file: ISTableLayout.lua line # 116 | Vanilla
function: calculateLayout -- file: ISCraftRecipePanel.lua line # 119 | Vanilla
function: calculateLayout -- file: ISTableLayout.lua line # 466 | Vanilla
function: calculateLayout -- file: ISTableLayout.lua line # 116 | Vanilla
function: calculateLayout -- file: ISHandCraftPanel.lua line # 137 | Vanilla
function: calculateLayout -- file: ISHandcraftWindow.lua line # 94 | Vanilla
function: createWindow -- file: ISEntityUI.lua line # 416 | Vanilla
function: OpenHandcraftWindow -- file: ISEntityUI.lua line # 559 | Vanilla```
bright fog
#

Send the craft script

#

Or we can't do anything with that here

small osprey
#

mhhhh .. god damn, this works now. πŸ˜… whyyyy.

    {
        craftRecipe AssembleResonantAgitatorMKII
        {
            timedAction = MakingElectrical,
            Time = 20,
            Tags = AnySurfaceCraft,
            category = Electrical,
            inputs
            {
                item 1 [Base.Screws],
            }
            outputs
            {
                item 1 Base.Screws,
            }
        }
    }
    ```

maybe just talking it over was what I needed ![PensiveCowboy](https://cdn.discordapp.com/emojis/1225169255276744825.webp?size=128 "PensiveCowboy")
Sorry for bothering.
bright fog
#

Could also be because you didn't properly reload the recipe after doing changes

small osprey
#

mhh, I have a inotifywait rsync that copies files from my git projects into $HOME/Zomboid/mods/MyMod (because symlink bug)

That usually works fine.

bright fog
#

I'm not familiar with symlink enough to know if that can cause issues

bronze yoke
#

they cause problems yeah

small osprey
#

Question though, if I have an item script like this (tested standalone to spawn, works)

{
    imports
    {
        Base
    }
    
    item ResonantAgitatorMKII
    {``` 

I should be able to refer it in recipe output also namespaced?

```            outputs
            {
                item 1 StorModeMod.ResonantAgitatorMKII
            }```
bronze yoke
#

yeah

small osprey
#

then why it errors out πŸ˜… . I managed to craft a screw (for a screw) fine.

item:

{
    imports
    {
        Base
    }
    
    item ResonantAgitatorMKII
    {
        DisplayName = Resonant Agitator MKII,
        DisplayCategory = Electronics,
        Type = Normal,
        Weight = 1.8,
        Icon = NoiseMaker,
        PhysicsObject = NoiseMaker,
        WorldStaticModel = NoiseMaker,
        Tooltip = Tooltip_ResonantAgitatorMKII,
    }

    item Schematic_AgitatorMKII
    {
        DisplayName = Schematic: Resonant Agitator MKII,
        Type = Literature,
        Icon = Book,
        Weight = 0.1,
        TeachedRecipes = AssembleResonantAgitatorMKII,
    }

}

recipe:

    {
        craftRecipe AssembleResonantAgitatorMKII
        {
            timedAction = DismantleElectrical,
            Time = 20,
            Tags = InHandCraft;Electrical,
            category = Electrical,
            inputs
            {
                item 1 [Base.Screws]
            }
            outputs
            {
                item 1 StorModeMod.ResonantAgitatorMKII
            }
        }
    }
    ```
bronze yoke
#

well it errors out because you typo'd the module name πŸ˜…

bright fog
#

lol

small osprey
#

lol

#

well.

bright fog
#

happens hahalol

bronze yoke
#

i didn't point it out because i assumed you just typed that up as an example so it didn't seem like it mattered πŸ˜…

small osprey
#

Ok. I think I nead a break πŸ˜…

steady fable
#

ive yet to test it but im verifying that all the parameters are correct

#

ive reviewed the pzwiki and the 42.8 javadocs to not much avail

bright fog
steady fable
#

on that link you sent me yesterday instanceItem is an option so i assume getInstanceItem was also an option

bright fog
#

Yea yea figured that was where you could have found that, but I can't seem to be able to find it

#

getInstanceItem doesn't exist in that page

small osprey
#

mhh I fixed the module naming, double checked names overall.

I have the suspicion it is something about handcrafting

LOG  : Lua          f:1058, t:1748293116064> ISXuiSkin -> ISXuiSkin -> could not find style for 'ISHandcraftWindow', style = 'HandcraftWindow'...
LOG  : Lua          f:1058, t:1748293116065> ISXuiSkin -> ISXuiSkin -> could not find style for 'ISHandcraftWindowHeader', style = '(default style)'...
LOG  : Lua          f:1058, t:1748293116067> ISXuiSkin -> ISXuiSkin -> could not find style for 'ISWidgetRecipeCategories', style = 'S_NeedsAStyle'...
LOG  : General      f:1058, t:1748293116105> -----------------------------------------
STACK TRACE
-----------------------------------------
function: calculateLayout -- file: ISWidgetIngredientsInputs.lua line # 206 | Vanilla
function: calculateLayout -- file: ISTableLayout.lua line # 466 | Vanilla
function: calculateLayout -- file: ISTableLayout.lua line # 116 | Vanilla
function: calculateLayout -- file: ISCraftRecipePanel.lua line # 119 | Vanilla
function: calculateLayout -- file: ISTableLayout.lua line # 466 | Vanilla```
bright fog
steady fable
bright fog
#

Can you show your craft script again please ?

bright fog
#

Wait no nvm

#

Give me a sec

small osprey
#

sure thing:

Item:

{
    imports
    {
        Base
    }
    
    item ResonantAgitatorMKII
    {
        DisplayName = Resonant Agitator MKII,
        DisplayCategory = Electronics,
        Type = Normal,
        Weight = 1.8,
        Icon = NoiseMaker,
        PhysicsObject = NoiseMaker,
        WorldStaticModel = NoiseMaker,
        Tooltip = Tooltip_ResonantAgitatorMKII,
    }

    item Schematic_AgitatorMKII
    {
        DisplayName = Schematic: Resonant Agitator MKII,
        Type = Literature,
        Icon = Book,
        Weight = 0.1,
        TeachedRecipes = AssembleResonantAgitatorMKII,
    }

}```

recipe:
```module StoryModeMod
    {
        craftRecipe AssembleResonantAgitatorMKII
        {
            timedAction = DismantleElectrical,
            Time = 20,
            Tags = InHandCraft;Electrical,
            category = Electrical,
            inputs
            {
                item 1 [Base.Screws]
            }
            outputs
            {
                item 1 StoryModeMod.ResonantAgitatorMKII
            }
        }
    }
    ```

Lua I can debug usually on my own .. this is new territory.
steady fable
#

no no im making a patch currently that replaces the values of an item "CrateOfPlanks"

bright fog
steady fable
#

42.8.1

#

local script = "{ DisplayName = Crate of Planks, DisplayCategory = Material, Type = Normal, Weight = 6, Icon = Parcel_Medium_Ammo,ConsolidateOption = ContextMenu_Merge, WorldStaticModel = Parcel_Ammo_Heavy,}"

#

i believe that this part is correct

bright fog
#

Ok wait so I'm having to help two persons on two different problems so give me a few minute guys lol

steady fable
bright fog
#

Yea looking at it πŸ˜…

bright fog
#

Import base maybe

#

Since you reference a base item

#

Nothing else stands out to me

#

I think I need to put examples of crafts on the wiki page too, I'll try to add one regarding this if that's the solution

small osprey
#

Well but I used [Base.Screws]

I tried with import base before and then I could do simply [Screws]. But maybe there are sublte things in the background. I am trying a few iterations πŸ€”

Also full game restart, no "reload lua". Maybe I was naively relying on that.

bright fog
bright fog
#

Reload Lua properly reload scripts

#

Nothing to worry about that

bright fog
steady fable
#

is getActualWeight returning the encumbrance?

bright fog
#

I go no idea, I'm looking for the method to change weight

#

Sounds like it would be weirdly named possibly

steady fable
#

it should be setActualWeight(x)

bright fog
#

Aaah

#

That sounds likely

steady fable
#

i'll test it out

#

also realized that it may be easier to just change the contents of the item description

#

which was my original objective

bronze yoke
steady fable
#

i'll see what it says about that

bronze yoke
#

ah, there's no need to use lua for that

bright fog
#

Tho you really shouldn't replace an entire item ....

bronze yoke
#

you can just create a new script file with the item script, it'll replace the original

bright fog
#

:|

small osprey
#

confirmed works:

    {
        craftRecipe AssembleResonantAgitatorMKII
        {
            timedAction = MakingElectrical,
            Time = 20,
            Tags = AnySurfaceCraft,
            category = Electrical,
            inputs
            {
                item 1 [Base.Screws],
            }
            outputs
            {
                item 1 Base.Screws,
            }
        }
    }

confirmed not working:

    {
        craftRecipe AssembleResonantAgitatorMKII
        {
            timedAction = MakingElectrical,
            Time = 20,
            Tags = AnySurfaceCraft,
            category = Electrical,
            inputs
            {
                item 1 [Base.Screws]
            }
            outputs
            {
                item 1 StoryModeMod.ResonantAgitatorMKII
            }
        }
    }```

the item in question:

```module StoryModeMod
{
    imports
    {
        Base
    },
    
    item ResonantAgitatorMKII
    {
        DisplayName = Resonant Agitator MKII,
        DisplayCategory = Electronics,
        Type = Normal,
        Weight = 1.8,
        Icon = NoiseMaker,
        PhysicsObject = NoiseMaker,
        WorldStaticModel = NoiseMaker,
        Tooltip = Tooltip_ResonantAgitatorMKII,
    }```

next I'll just test dropping all namespacing πŸ˜•
bronze yoke
#

the hack you're using there is only used when we need to add things to an item without replacing it entirely

bright fog
steady fable
bright fog
#

Are you actually replacing EVERYTHING in the item ? @steady fable

#

Bcs if you're only replacing a few bits, patch it

steady fable
bright fog
#

Then don't rewrite the script item

#

Only replace the stat you want to modify from Lua

steady fable
#

even then its not every part of the item i just want to replace the weights value with 6

#

the function would have to define where it is first and im not sure how i'd do that

bright fog
#

Yea so patch it with Lua

steady fable
#

FindItem:getActualWeight?

bright fog
#

Why do you need the reference weight ?

steady fable
#

or wait

bright fog
#

You're trying to modify an existing item stats in a world or modifying the entire default item definition ?

steady fable
#

finditem:setactualweight

bright fog
#

Yes

#

That's what you had mentioned before

steady fable
#

like where i store all the mods items, packs.txt

bright fog
#
local item = getScriptManager():FindItem("CrateOfPlanks",true) -- true means it will use Base.
item:setActualWeight(weightValue)
#

This

#

Then

steady fable
#

i'm confident in this one

#

i'll test it

small osprey
bright fog
#

uh

#

Might be something else tbf

#

Show the script that made a parse error

small osprey
#
    {
        craftRecipe AssembleResonantAgitatorMKII
        {
            timedAction = MakingElectrical,
            Time = 20,
            Tags = AnySurfaceCraft,
            category = Electrical,
            inputs
            {
                item 1 [Base.Screws]
            }
            outputs
            {
                item 1 StoryModeMod.ResonantAgitatorMKII,
            }
        }
    }```
bright fog
#

But fucking hell I hope they improve the errors for script mistakes because that's confusing so many people and you always need to put literally ages in figuring it out

bright fog
#

The mistake is not at outputs

small osprey
#

vanilla scripts don't add a comma between inputs and outputs either. Which is akward. And it worked when the recipe was spitting out a screw. But I can test.

bright fog
#

Show an example ?

small osprey
#

vanilla recipes_sacks.txt

    {
        timedAction = UnPackSack,
        Time = 15,
        Tags = InHandCraft,
        category = Packing,
        inputs
        {
            item 1 [Base.Claybag] flags[IsFull] mode:destroy,
        }
        outputs
        {
            item 8 Base.Clay,
            item 1 Base.EmptySandbag,
        }
    }```
bright fog
#

But it does have a comma

small osprey
#

oh you mean behind item 1 [Base.Screws] ?

bright fog
#

Yea !

small osprey
#

ok I can try.

bright fog
#

God damn it I'll put a warn on the wiki for this shit 😭

#

FINE TIS, I'LL MAKE THE ERRORS MYSELF

steady fable
#

i contribute to the wiki on occasion

small osprey
#

lets see. don't write much until we rubbed ourselfes sore enough on more weird formatting cases.

bright fog
#

You're welcome to do so

steady fable
#

my username is "a" if you ever see that but i did do some of the roads in december when ti first came out

bright fog
#

I mostly stay in the Modding space of the wiki

bronze yoke
bright fog
#

So if you edit stuff elsewhere it's likely I won't see it

steady fable
#

there was a lack of hunting content so i added some descriptions there

steady fable
#

good work though

bright fog
#

I actually don't know the main part of the wiki very well haha

steady fable
#

it worked

honest sierra
bright fog
steady fable
#

thank you #mod_development for saving my mod multiple times because i cant probe the javadocs without getting confusedπŸ™

bright fog
#

You'll get used to the doc πŸ˜…

steady fable
#

if i dont get burnt out of course

bright fog
#

For sure

#

Make sure to chill sometimes

#

No point pressing yourself, you got all the time in the world

steady fable
#

dont be a herostressed

bright fog
#

That's kind of that yea

#

And don't hesitate to deactivate the mod's comments if people get too annoying to you

#

You owe them nothing

small osprey
#

Confirmed working care

item:

{
    imports
    {
        Base
    }
    
    item ResonantAgitatorMKII
    {
        DisplayName = Resonant Agitator MKII,
        DisplayCategory = Electronics,
        Type = Normal,
        Weight = 1.8,
        Icon = NoiseMaker,
        WorldStaticModel = NoiseMaker,
        Tooltip = Tooltip_ResonantAgitatorMKII,
    }

    item Schematic_AgitatorMKII
    {
        DisplayName = Schematic: Resonant Agitator MKII,
        Type = Literature,
        Icon = Book,
        Weight = 0.1,
        TeachedRecipes = AssembleResonantAgitatorMKII,
    }

}```

recipe:
```module StoryModeMod
    {
        imports
        {
            Base
        }
        
        craftRecipe AssembleResonantAgitatorMKII
        {
            timedAction = MakingElectrical,
            Time = 20,
            Tags = AnySurfaceCraft,
            category = Electrical,
            inputs
            {
                item 1 [Base.Screws],
            }
            outputs
            {
                item 1 StoryModeMod.ResonantAgitatorMKII,
            }
        }
    }```

so .. it was the right commas afterall.

Also notice how at times I had a comma here:

```    imports
    {
        Base
    },```

That is not required and maybe actively harmful πŸ˜…
bright fog
#

Clarified it on the wiki

small osprey
#

Thanks so much @bright fog I salute you blobsalute spiffobadge

bright fog
#

Np πŸ˜…

#

It broke my head too, it's so annoying

#

It's always tiny details

small osprey
#

I will try to help others when I spot it here.

bright fog
#

Or tell them to read the big red texts on the wiki pages regarding craftRecipe hahalol

small osprey
#

I just wonder about the wisdom to not keep definitions in lua where they would be, for all the looseness of the language, still clearer to format and debug πŸ€”

bright fog
#

You mean instead of using their current script system to do it fully in Lua ?

small osprey
#

yeah

#

one missing comma in one mod breaks the whole game from starting πŸ˜… . In lua it would bit just a blimp of an error bottom right.

bright fog
#

That was something we had discussed a few times, I'm in the team that they really should use a normalized writing language that exists, and doing it in Lua could allow for anything to be done on every single assets of the game. An argument against it was load time, that it would be less efficient than its current form

bright fog
small osprey
#

Alright. Well lets see post b42. "ass cheeks together and ride till dawn".

bright fog
#

I recently discovered how Vintage Story handles its assets, things that you could say is their own "scripts" and they use JSON files

bronze yoke
#

i'm on team json

#

i don't really like xml but that'd be acceptable too

bright fog
#

Yea definitely in it too now

#

I've seen how Vintage Story does it and that's really good

#

Let me find an example

small osprey
#

Alright, maybe Sir @true plinth can pick up on the comma issue even more. There is already builtin strictness for items which I super love care but extending it to recipes would help alot I think.

bright fog
#

Sorry for the indentation, Discord

#

For some reasons I literally can't upload the file directly and I have to copy it's content, wait

bronze yoke
#

tab characters 🀒

bright fog
#

Yea tabs getting eaten by freaking Discord, wait hahalol

#

Here ya go

#

But I find their method of handling definitions for things (in this case it's an enemy type) pretty nice, and best of all it's NORMALIZED >:(

#

And the best part is that with a mod, you can easily patch one of these json files with a bunch of tools, like add, replace, remove, move, copy commands etc

#

patch with another json file

bronze yoke
#

the entire script language is just a legacy holdover they keep building on top of

#

it was supposed to actually be a scripting language but pretty early on they figured out lua was a way better choice

#

whenever they add something new that needs external tooling they just use xml

tribal vale
#

hi guys, I'm trying to spawn a key for a specific door on player inventory, but I can't find anything that works
can anyone point me to the files/variables I should be checking to make this work?
thanks!

icy night
silent zealot
icy night
#

Sandstorm

silent zealot
#

1920s dustbowl/great despression zomboid?

icy night
#

Only thing I cant seem to initiate in the script is puddles. They make pretty good sand dunes

#

Makes the sand floor much more detailed and interesting

silent zealot
#

Sand dunes you can drink from?

icy night
silent zealot
#

(that can be disabled)

icy night
#

yea lol

silent zealot
#

Should just be a function added to populatewoeldcontextmenu that removes "drink from puddle" if found

craggy nacelle
#

Does anyone know a way how to move the recipe names to a sub menue like: recipe->craft something 10x - without making my own custom context menue?
Ive looked through this for B.41 and even B.42 yesterday but coudnt really find an answer. Source for that question was that ive played on a server where there are so many mods for some stuff (planks for example) that you have to scroll down to find anything 'normal' like 'place' between them. So i thought it would be nice if we could just move recipe names into some sub folders, but didnt find anything on the topic? πŸ˜…

ancient grail
#

i had this idea for a mod
do you guys think its possible to set zeds as passenger? i know it can be done for SP survivors but not sure if its possible for mp zeds

idea is that they died inside the car
make em animate while being stuck inside the car

ancient grail
ancient grail
#

might be something like this

not sure abt the syntax

key:setKeyId(door:getKeyId())
elder mauve
#

is there any info around handling fluids in crafts?

craggy nacelle
elder mauve
silent zealot
#

In theory fixing stupidly big right click recipe lists is one of the goals of the B42 crafting update.

#

I think the list of what gets shown is chosen by java code using some weird black magic, but the last time I looked was during the 42.0 era and I think it changed since then.

silent zealot
bright fog
#

Bandits does it

#

I think ?

bright fog
#

You could use a Lua function too to test valid containers perhaps

#

Just check the page regarding inputs

#

It details fluids in inputs

elder mauve
#

oh wow, the wiki is quite detailed on how shit works. I'm too used to barely any info about mods in games xD
thank you

bright fog
#

Explains quite well recipes, tho there's still some bits here and there missing of course

elder mauve
#

damn my ambition is growing too fast 😩

bright fog
#

There aren't pages for everything yet tho, some stuff in the game are still undocumented, it'll become fully documented as time goes on and it'll get there faster when people start editing with me

elder mauve
#

from what I see liquids don't have any interaction with freezing or heat

silent zealot
#

Liquids also don't go rotten

#

I expect that to change, but right now milk lasts forever.

elder mauve
#

funnily enough thats exactly why I got the idea to do something fun, but even basic chocolate milk is borking my game for some reason xD

#

"MilkChocolate" or "Base.MilkChocolate" just doesn't exist πŸ€·β€β™‚οΈ

elder mauve
#

and I already see a huge flaw with the transfer fluid system... if I have 9L I will move 90ML

silent zealot
#

Chocolate milk is a fluid.

#

There is a "small carton of chocolate milk" item Base.MilkChocolate_Personalsized

elder mauve
#

I wish I could upload screenshots but rip img perms :/
I managed to get it to work proper

#

just my tired ass doing simple dumb mistakes like trying to add chocolate milk to a chocolate bar xD

silent zealot
#

The img perms thing is really annoying

#

I get the idea behind it, but it makes it so much harder to help people/share info/etc until you have been here for enough time and/or messages.

elder mauve
#

so basically we spam "." till we level up xD

silent zealot
#

hahahahah

#

Well it doesn't judge the quality of your comments...

elder mauve
#

tho I assume the server has an automatic spam prevention, I'm not willing to fuck around and find out tho

bright fog
#

It's a behavior between output and input

#

Bcs and output can't have multiple options

#

While inputs can and so it takes a table of items

elder mauve
ancient grail
ancient grail
elder mauve
bronze yoke
#

you probably can extract more than one liquid, you just can't have two options for a single output, that doesn't make sense

#

for an input you can do [item1/item2] and that means 'any of these items are acceptable', but for an output, what would [item1/item2] even mean?

elder mauve
#

I mean I already see another problem with liquids, they mix together, I'd guess that restricting which liquid can go in different kind of bucket type would help remedy that, but that sound like a stupid solution, tho I guess removing "beverage" tag for something like liquid metal should solve it

agile nacelle
#

this was painful to formulate

#

now i need to figure out how to make raycasts

agile nacelle
# agile nacelle this was painful to formulate

actually nvm still not done with this i also need to take the vehicle length into account for when the car is moving sideways (assuming it was hit by another car or just somehow the player managed to drive the vehicle sideways)

willow briar
#

Hey, im trying to modify the inventory of a zombie but nothing works.
local Zombie : IsoZombie = .... local test = Zombie:getInventory() test:AddItem("MoneyBundle")

#

Is there something im missing?

#

Can I not add items to a living zombies inventory?

bronze yoke
#

local Zombie : IsoZombie isn't lua syntax

agile nacelle
#

welp

willow briar
#

alrighty it seems that isoZombies dont have a inventory

bronze yoke
#

you can use addItemToSpawnAtDeath

#

keep in mind that this isn't persistent so if you absolutely need a specific zombie to drop an item (e.g. zombies with this outfit always drop this item), it's better to use custom logic in an OnZombieDead callback (you can edit their inventory normally during this event)

willow briar
#

hmm

#

Well im working on fixing draggable zombies

#

I cant stand not being able to put them into cars

#

Well in short im restoring the original corpse pickup logic and creating an "husk" zombie which is then dragged

silent zealot
#

Does that break the new ragdoll dragging?

silent zealot
willow briar
silent zealot
#

But honestly I wouldn't spend time working on that right now since there is a good chance that will get done by TIS when eth fluid and crafting systems get more work.

willow briar
#

I only saw them being ragdolled when hit by cars

silent zealot
#

Actually you are probably right... I'm going to quickly check because now I'm trying to remember exactly what it looks like when dragging...

willow briar
#

I tried adding the corpse to the inventory without deleting the physical corpse but that broke a lot of stuff

#

So i try creating a copy of the corpse as a living zombie which then gets marked for dragging only and is then picked up by the player

#

The problem is its not copied the same

#

blood and dirt, aswell as holes are not carried over

#

(top is copy and bottom is original corpse)

silent zealot
#

you might be able to iterate through all clothing items and copy the details over piece by piece

#

you're right, no ragdoll on dragging - just identical animations

willow briar
silent zealot
#

I'm not sure, I can't remember which does what

willow briar
#

Ill try itemVisuals first then

sour island
#

They're kind of the same thing-- one updates off the other.

willow briar
#

Well i did try setting wornItems, and checking the debug info itemVisuals seem to have more of the needed data

sour island
#

Having messed with that a while ago my memory is a bit rusty-- but it highly depends on the timing. What are you trying to do exactly with the body?

willow briar
# willow briar

im creating a new Zombie thats supposed to be an identical copy of a corpse. Without reviving the corpse

sour island
#

Ah, for dragging?

willow briar
#

yes

sour island
#

You can haul them out windows right? Might be worth looking at those anim files and the Lua/java behind that

#

The current issue is that you have to stop dragging and then pick them up and transfer them I assume?

willow briar
#

The Corpse has the necesseary functions for reviving itself, but that function both deletes the corpse and creates the isoZombie for dragging

willow briar
willow briar
sour island
#

Hmm

willow briar
sour island
#

Do dragged bodies have ragdolling or anything in particular?

willow briar
#

no

silent zealot
#

Maybe a different approach: if dragging a corpse AND not in a vehicle AND there is a car seat or trunk inventory available add a option to the rightclick world menu "Put Corpse in Car"

willow briar
sour island
willow briar
sour island
#

Aren't dumping them out windows like that? Haven't spent much time on B42 tbh - as in right click to throw out window/over fence... Or is that a mod?

willow briar
silent zealot
bronze yoke
#

no, you hold e while dragging into a window

willow briar
#

but since it doesnt have anything to do with containers or the corpse item itself, i dont think its of any use

#

the itemVisuals field is protected

sour island
#

You could make a timed action based on currently dragging a corpse and have the corpse be dropped and go through a queue of transfering it

willow briar
sour island
#

You shouldn't need to do all that and I think you'll spend more time fighting the system

#

You can also make the context menu apply to any container (maybe ignoring floors)

bronze yoke
#

all objects in java act more or less like pointers

#

some getter methods might copy the object and return that to prevent you from reaching the original but that's rare

willow briar
#

Well my plan rn is to restore the orignal corpse functionality. Having it in the inventory, making transfering easy.
And on top of that have a fake zombie be dragged. I then have a OnEquipPrimary event which checks if the corpse has been moved (dropped or moved into a container) and then deletes the fake Zombie

#

so the fake zombie is to keep the dragging, while using the old corpse item stuff

#

this is what i've been doing with wornItems: isoZomb:setWornItems(corpseBody:getWornItems())

south bear
#

Thanks for taking the time Jvla! You've been a consistent helpful voice with a number of the questions I've had. I appreciate you!

I read up on the "trueID" and I just wanted to confirm - You said the pID (and therefore trueID) is non-unique? How exactly does that work? Is it just that the pID/trueID is recycled after the zombie assigned that pID/trueID is dead/gone, because if so, that would not really be a concern for my situation!

For my situation, I am looking to keep certain zombie data persistent; A string for addLineChatElement() for a "name" on screen, whether the zombie is a sprinter, and maybe eventually some other data when I start to dip my toes in the custom zombies territory!

Currently in my mod, up to 500 of the zombies whose data I'd like to track spawn simultaneously, so I probably can't do unique, individual outfits for each one if that would be a baseline requirement to achieve a truly unique trueID for each zombie with persistent data.

bronze yoke
#

that means that ID conflicts are unlikely but possible between zombies of the same gender with the same outfit

agile nacelle
silent zealot
agile nacelle
#

oh yea

bronze yoke
# silent zealot And their hat.

the hat bit doesn't matter because both IDs (hat + hatless) belong to the same zombie and a hatted id can never conflict with a non-hatted id

agile nacelle
#

actually

#

idk

#

but am basically storing an IsoObject in lua table

#

i suppose object is made from java arraylist?

bronze yoke
#

in practice we use IDs with the hat bit normalised out otherwise they're kind of useless

silent zealot
#

or vice-versa

bronze yoke
#

i'm actually baffled trying to make sense of this error

silent zealot
#

oh no

bronze yoke
#

i've *never* seen this exception thrown by any pz code lua or not, and a java exception being thrown by pure lua is insane

silent zealot
#

I see object, objects and Objects

bronze yoke
#

there's no reason why it should be trying to cast anything here

silent zealot
#

I'm nope-ing out now. πŸ˜›

#

Too confusing for late night debugging.

agile nacelle
silent zealot
agile nacelle
#

so like

#

do i type PZArrayList = {} ?

#

oops

#

i mean

#

whatever

silent zealot
#

You can make a lua table then use a for loop to go through the Array list and copy things one by one into the table

bronze yoke
#

i think whatever's going on here is confusing even the debugger/error handler

silent zealot
#

Just remember thecArrayList is zero indexed

bronze yoke
#

the line it's blaming just doesn't make any sense

silent zealot
#

And a table is πŸ€·β€β™‚οΈ indexed

silent zealot
bronze yoke
#

it looks like RayBeam2D:_checkForIntersectedObject expects an ArrayList but you're passing a table

#

however that's lua so i don't see why that'd throw that exception

#

i'm not sure why he annotated it as any, will have to ask him about it later πŸ˜…

icy night
silent zealot
#

I wonder if you could define a vehiclePart to have a corpse as the item that gets attached

agile nacelle
#

is that possible

ancient grail
silent zealot
bronze yoke
#

this error basically means 'you are passing a PZArrayList to a java method that expects a lua table instead', i can't see anywhere in the screenshot where you could do this

#

java methods that expect tables at all are very rare

agile nacelle
#

huhhh but i passed a lua table

bronze yoke
#

the only arraylists in the locals stack are objects and Specialobjects so i would look at where you're using those

agile nacelle
#

but okay

bronze yoke
#

unless there's a bug with the vm it's not possible for lua code to even throw this exception

#

but it says one of your lines is throwing it

agile nacelle
#

wait

#

do java tables start with 0 or 1

bronze yoke
#

0

agile nacelle
#

k

ancient grail
bronze yoke
#

hey now

#

maybe it IS possible for it throw that exception here

ancient grail
bronze yoke
#

it's probably trying to cast to table because you're attempting to write to an arraylist as if it were a table

#

i can't believe i missed that πŸ˜… i cannot recommend renaming these variables enough

agile nacelle
#

alr renamed them

agile nacelle
bronze yoke
#

if you want to set a value in an arraylist you'd use list:add(o) or list:set(i, o)

#

but i'm not sure why you'd be doing that here at all, i think it's a mistake

agile nacelle
#

hm?

#

oh nice

#

no more errors

ancient grail
bronze yoke
#

- you create a table called Objects
- you set objects[1] to Object, but objects is an arraylist from earlier in your code, not the table you just created

ancient grail
#

but thats not causing the error
i just wanted to point that out

frank elbow
agile nacelle
#

huh

#

does build 42 have vehicles without collision

#

or is the mod tweaking

bronze yoke
#

vehicles still have collision

agile nacelle
#

i think somethings up with my mod

#

welp

#

the raycast is working but it returns false when it should be true

#

sighh

#

at least i got somewhere

#

or maybe i forgot to call castRay()???

vital sedge
#

Hello, anyone know how to add visible holster when zombie is created(OnZombieCreate). I've tried with instanceItem setAttachedItem, i've tried with itemfactory, i've tried with adding it to inventory, i've tried setWornItem, nothing helps, the holster spawn in inventory when i kill the zombie, but it doesn't show on the model. Weapons work, i can attach them and get them visible, but i can't get holster visible and worn.

#

in vanilla game spawnitems.lua file there is such code -- attaching the pistol to the holster doesn't work properly when the player spawns so it's commented out -- local holster = playerObj:getInventory():AddItem("Base.HolsterSimple") -- playerObj:setWornItem(holster:getBodyLocation(), holster) and -- the pistol isn't attached to the holster because it doesn't work properly when the player spawns -- playerObj:setAttachedItem("Holster Right", pistol); -- pistol:setAttachedSlot(4); -- pistol:setAttachedSlotType("Holster Right"); -- pistol:setAttachedToModel("Holster Right"); does it mean i can't spawn holster using lua code like that, and only have to use outfit distribution module? I would like to use code for that.

agile nacelle
#

wow

#

i cant figure out how to get the raycast to work

#

it just keeps returning nil

agile nacelle
icy night
#

OK, I got the puddles to work. Now to disable the drinking option

supple briar
#

Is there a more vehicle modding guide for b42? I'm trying to use the one by tubetarakan but it's outdated and I don't really understand what exactly has changed between B41 and B42.

vital sedge
#

i feel like onzombiecreate is busted and the inventory is not initialized hence i can't add to it, on the other hand onzombiedead works properly. Attaching items to onzombiecreate works though :/

bronze yoke
#

you aren't meant to be able to edit a zombie's inventory, onzombiedead is the exception

vital sedge
#

i want to add stuff to zombie inventory when onzombiecreate

#

and then show it on the zombie, like holster

#

i dont want outfit system

bronze yoke
#

you'd want to add it to the zombie's wornitems

#

zombies don't really have inventories

vital sedge
#

yes i tried using setWornItem

bronze yoke
#

when you see a zombie wearing clothing, it doesn't actually have clothing items in its inventory, its inventory is always empty, it just has wornitems that get converted into items when it dies

vital sedge
#

hmm i tried item = instanceItem("Base.HolsterSimple), and then zombie:setWornItem("BeltExtra",item)

#

im trying to convert my code so it spawn pistol in holster and make the zombie worn that holster, hence i need OnZombieCreate. It works well when i do stuff like item = instanceItem(base.shotgun) and then zombie:setAttachedItem("rifle on back", item), but not with holster.

#

the onzombiecreate part doesn't work, the code with onzombiedead works but it spawn pistol and ammo on dead zombie, it doesnt show it nicely so you dont know which zombie carry gun

#

in kentucky they didnt have concealed carry at the time

#

i hope someone will be able to help me, please don't bully, i'm not code wizard.

winter bolt
#

outfit system is the only easy way

#

adding the item visual to each zombie manually is a complicated nightmare for something as simple as adding a holster

vital sedge
#

problem is i haven't found a way. Brita for example adds a fanny pack container, to which it adds ammo and gun and then add it to distribution table of the inventorymale. This solution is at mercy of RNG with other items and limited roll. My solution is similar to Mad Zombie Loot mod which i adore but its not for b42 yet.

#

if someone know how to add visible holster using lua scripts then please hit me up here or DM. Outfit system is great, but its not granular and controllable enough for my particular need/this solution.

solar rover
#

Does ZombiesZoneDefinition.Default give a chance for any zone or any area NOT a zone?

icy night
#

Its the default population, so all zombies except for the ones that spawn in randomized stories I think

solar rover
#

Seems to be the case thanks. I have the weight set to about 2% (after the math) and its kinda close

willow briar
#

After testing around i figured it out guys

#

got them all to have the same visuals

supple briar
#

So I've got my car working, but when I try to get inside the action seems to fail. The trunk and hood works normally, as do the doors, but I can't get inside.

#

This is what the Areas look like

willow briar
# willow briar

had to force using wornItems by e.g using setReanimatedPlayer(true)

supple briar
#

Last thing I edited was in here. I'm wondering if maybe the seat templates or something got messed up, but I don't know.

agile nacelle
#

@bright fog sorry to bother you but i can't seem to figure out how to use Doggy API raycast, am trying to use _checkForIntersectedObject method https://github.com/SirDoggyJvla/Doggy-s-API/blob/master/Contents/mods/Doggy's API/42/media/lua/shared/DoggyObjects/RayBeam2D.lua#L91 but it keeps returning nils even after trying many different adjustments, are you able to help?

GitHub

API for Project Zomboid which adds a bunch of tools that I use in my mods and that I make available to the modding community. - SirDoggyJvla/Doggy-s-API

small osprey
#

Mhh .. is it true that item icons icon = textures cannot be in a subfolder? everything flat inside media/textures/ ? https://pzwiki.net/wiki/Icon doesn't explicitly mention

bronze yoke
#

no

#

Item_ is prefixed to the *path* you give, not the filename, so the subfolder has to start with Item_

#

e.g. Icon = MyItem looks for Item_MyItem.png, but Icon = subfolder/MyItem looks for Item_subfolder/MyItem.png

small osprey
#

Oh good thats great. 😌 . Thank you.

small osprey
#

I had to read that twice lol, tested and confirmed works. So for good namespacing we would see two folders inside media/textures.

media/textures/Item_myMod/```
That is awful but doable πŸ˜…

It might be less akward to simply prefix the icon file names `Item_myMod_myItemIcon.png` and not go for an extra folder. Ah well.
#

Happy though, I learned about blender modeling, textures/UV-mapping, icons and managed to create a super simple new textured item in less than 2h thanks to this discord, pzwiki and - yes chatGPT. This was pleasant Heart

spring ice
#

Hello guys, so I wanted to make a mod for PZ, my first one actually, but it does not show up on the mod list inside the game. I followed the Mod structure that is on the Wiki, but nothing happens.
Im using the unstable 42 build, added the mod on "Zomboid/Workshop/MyMod/Contents/mods/MyMod/", and I've created the mandatory "common" folder, is there something I'm missing?

vital sedge
#

copy a known mod there, rename it in mod description file and it should work, alternatively use username/zomboid/mods folder

spring ice
#

Thanks! I will give it a try

vital sedge
#

when i tried to make my own it also didnt work, now i copied one as template and it works, weird...

vital sedge
#

what specifically worked?

spring ice
#

like, I went to "steamapp/workshop" and copied a mod, then I pasted it on "zomboid/workshop" folders and renamed some values like the id and name inside "mod.info", and it appears on the pz modlist

vital sedge
#

idk but it works :/

spring ice
#

maybe it is bcs of the folder structure? Will check it later but thanks man!

vital sedge
#

np

small osprey
#

good luck you two 🫢

supple briar
#

Now I gotta get the wheels to stop clipping through the ground

small osprey
#

Items be like
DisplayCategory = Electronics,

Recipes be like
category = Electrical,
SkillRequired = Electricity:4,

My brain be like
Bobbyrage

supple briar
#

Wheels fixed

vital sedge
graceful flare
#

hi, anyone knows how to 'unpack' .pack files? i want to try making a retexture for most zomboid textures. It's part of my plan on total conversion of whole game into antiquity.

small osprey
# graceful flare hi, anyone knows how to 'unpack' .pack files? i want to try making a retexture f...

"Tilezed" has a Pack viewer and maybe other capabilities. I just opened the last version from September 2022

https://theindiestone.com/forums/index.php?/topic/59675-latest-tilezed-worlded-and-tilesets-september-8-2022/

Tools > .pack files

The Indie Stone Forums

Tiles Tileset images These are the same tilesets released on February 16. For Windows TileZed + WorldEd 32-bit TileZed + WorldEd 64-bit The 32-bit version of WorldEd seems unable to load all the tilesets due to high memory usage, displaying ??? for some tiles. Linux TileZed + WorldEd 64-bit This ...

small osprey
icy night
#

With or without the X? Its a IV bag of a certain serum

graceful flare
small osprey
supple briar
ripe palm
supple briar
#

it's something between the model offset and the center of mass offset I think

supple briar
#

This is genuinely a really annoying bug and I'm shocked I haven't found anyone else complaining about it. The worst thing is that it only shows up on either newly spawned cars or after the lua resets, if you have a car you can already access it doesn't show up on it.

supple briar
#

If anyone could give me some help here it would be really appreciated, I'm at my wits end with this bug. it seems to just show up randomly, totally ruins the mod, and I can't figure out what causes it and how to fix it.

rugged dome
#

Hey! Can someone help me find an introduction or guide for WorldEd (version 42.8 fork)? I'd really appreciate any help! any links ? thanks

supple briar
#

If the physics chassis is too far above the blue line in the vehicle editor (Seems to be if it is above the line at all) the vehicle won't be enterable

supple briar
#

Back to where I was 2 hours ago, but it works again. Wheels clip through the ground still but I have no idea how to fix that at this point

icy night
silent zealot
#

My guess was it was something to do with having custom wheel models instead of using generic Zomboid wheel models

silent zealot
#

I'd say don't have a big plain label like the left one, at least put some black dots on it for writing like an actual IV bag would have (but not in enough detail to read on a tiny icon)

#

The "single big icon" is good from a gameplay POV in quickly identifying the item, but isn't really needed in Zomboid IMO.

supple briar
#

gonna mess around with wheel scale but might just say screw it and just deal with it

#

maybe make my wheels more in line with the base game ones

silent zealot
#

Is there any sort of "spawn X height above ground" parameter?

#

I'd look at how other people solved it so you don't have to solve it again πŸ˜›

#

You're literally reinventing the wheel here.

#

Stupid mod idea time: Primative vehicle crafting

supple briar
#

gonna probably take a break and work on something else, will check out how the Mad Max interceptor mod and KI5 work with it

supple briar
#

the cars work totally fine

silent zealot
#

They clip in while driving?

#

Do the wheels have any sort of physics collision box you need to define?

supple briar
#

old picture but they look like this

#

they work fine

#

but they visually clip

silent zealot
#

Somewhere there has to be a "wheels are this big" number for the physics sim

#

If not a full bounding box style definition for them

#

And it has to be configurable somehow since modded vehicles have different size wheels.

supple briar
#

I shall look into it later

#

need a break, almost fried my brain over the physics box stuff

silent zealot
#

Also, nice car - perfect zomboid style

#

While being better quality than vanilla

supple briar
#

Thanks, first time actually getting something finished enough to put in game

silent zealot
#

Ooooh, that's always exciting!

supple briar
#

This mods been in the works for something like 8 months? with massive breaks in between and many scrapped models

mellow frigate
# supple briar old picture but they look like this

Here are some parameters related in the script file: wheel radius / vehicle suspensionStiffness /vehicle suspensionCompression /vehicle suspensionDamping / vehicle maxSuspensionTravelCm / vehicle suspensionRestLength

supple briar
#

Will check it out later

#

modelling the thunderbird rn

supple briar
steady fable
#

hey the mod absolutely scored on the featured page of the workshop

#

came around to thank yall for the help again

silent zealot
#

juvenile snickering

#

And 80 people are subscribed to my handgun mod but not the required library...

bright fog
#

For a working example of it, chrck my mod Chrck Around

vital sedge
supple briar
#

Plus idk if you could even make a realistic track in PZ

vital sedge
#

i dont want to discourage anyone, but since KI5 exist, no other car mod can compete lol

supple briar
#

Purely hypothetically, if I were to make a map. I’d probably turn Irvington into a short track like Bristol or Martinsville

#

But pz doesn’t have banking for roads, so that would mean it would be a flat track and probably feel awful to drive on

vital sedge
#

just wait 10 more years for fully 3d zomboid πŸ™‚

silent zealot
#

But driving a nascar though hordes of zombies - perfect

supple briar
#

Gotta do donuts in hordes of zeds in a Lumina

#

If I make a B41 version I’ll probably make it a bit more focused on racing and leave out a lot of the non-car stuff

grizzled fable
#

Hi all, to mod the vanilla traits is it sufficient that I overwrite this file in my own mod? MainCreationMethods?

#

Or is it more complicated?

ancient grail
#

im gona post this on the mod request thread but i wanted to make sure theres no such function

a function to fetch the name as string of the audio thats playing
like from emitters or wherever

agile nacelle
#

but this is not the results i even want this isj ust the results for understanding how to use the raycast

#

i need the raycast to hit the car

silent zealot
#

A different error is a sign of progress.

agile nacelle
#

true

willow briar
#

Ok guys, so since last time of testing alot has changed. And now while dragging a zombie, i cannot transfer items between containers. This wasn't the case on B42 release.
Inspecting it further i discovered that the DraggingZombieState clears the ActionQueue every tick. So basically whenever you try to queue an action (like transfering an item) it gets cleared immediately.
An Idea i had was overwriting the state but im not really sure. Anyone got any other ideas?

pliant sierra
#

hey anyone will to help me make a mod ? new to mod making juts need some guidance

queen oasis
small osprey
queen oasis
#

I remember going to my first monster truck "rally" in Indy at the RCA Dome in 1993. Big Foot, Hulk, Snake Bite... good times

willow briar
#

il show u a snippet

#

and execute gets run on update inside the stateMachine

#

And since ISInventoryTransferAction isnt forced or instant, it needs to run through a few Updates until the Progress Bar is full

#

ig if i could make the item itself trigger an instant transfer

#

Then it would be able to work, since the first action update is always ran

#

if i can set forceStop or forceComplete thru the InventoryItem then ig it'd work

pliant sierra
supple briar
#

So I've seen a few mods do it, how do you make unique spawn points for cars and stuff?

queen oasis
#

it's always something. no idea where the rest of the zombie went, why I can't grab it but I can push it around...

#

exit the game while grappling a corpse, and it turns into a wad of mush that you can't interact with, except you can push it around

queen oasis
# willow briar

where is this class at? I can't find it or even the "if (!character.isGrappling()..." bit

bronze yoke
#

i can verify it, what version is your decompile? i think it's a recent addition

#

i don't remember it using a unique state when i looked into it a couple months ago

queen oasis
#

I'm using your decompiler, of course, it's great! and I did it last on May 20th but I'll run it again.

bronze yoke
#

hmm yeah, doesn't seem like it should be outdated then

queen oasis
#

oooh, found it

red tiger
queen oasis
#

fancy

red tiger
#

My WIP UI framework that uses GLSL shaders and 3D matrix transforms to render.

#

Parent-child matrix transforms allow me to implement 3D translation, 3D rotation, and 3D scaling.

#

I just rewrote the font renderer / font file parser to apply these transforms to rendering text.

#

This won't have depth-testing however it has everything else.

#

I might implement CSS z-index nature to render-sorting / render-ordering but that's probably it.

small osprey
small osprey
# red tiger

Yesss please!!! star-wars intro font slides πŸ˜… . HTML, CSS, LaTeX!!! gogogo :DDD

red tiger
small osprey
#

What is a font/text/letters in your shader programming anyway? just textures loaded from the game? not Bezier Curves?

Loading custom fonts would be huge

bronze yoke
#

the game already loads custom fonts, just nobody really does it

small osprey
vital sedge
#

since revolvers don't have a mags, would it be wise to spawn ammo boxes if more loose bullets are to be spawn on the corpse? Currently with 60 bullets spawning on the corpse i notice some delay before container is available, i guess since each bullet is a separate object, it calls AddItem 60 times, even though i use method AddItems(item, number)

#

dont ask me why so much ammo on the corpse, im just testing :/

bronze yoke
#

that shouldn't cause delay, it's not asynchronous

#

if you're testing in multiplayer delay is expected no matter what you do though

vital sedge
#

chatgpt doesnt find issues

#

but obviously it has limited understanding of PZ code structure and affect on performance

#

hmmm now it works faster, weird...restarted the game

red tiger
#

There's quite a bit I wrote to get here lol

#

PZ doesn't expose LWJGL's vector math library entirely so I had to bring that into Lua too.

#

It's less interop to calculate all on one side so I'm happy with that.

#

Also the control over stuff with metafunctions is stupid fun.

vital sedge
#

is there a way to make PZ AA shader less crap?

#

shaderz mod i know, but it sharpen too much, and if there is no sharpen then the smear return

#

and edges

red tiger
#

I'm doing dynamic shader stuff with setting values in the shader when rendering.

vital sedge
#

i tried chatgpt/deepseek for AA implementation and theres no improvement over vanilla, but its singlepass

red tiger
#

I had to grab the last FBO frame as a texture and set that to render frosted glass effects.

vital sedge
#

also B42 was supposedly bring performance improvements, i haven't noticed it heh

#

and i dont have super cpu, so it should work with their offloading to gpu improvements

red tiger
#

That's where the bulk of those optimizations are between 41 and 42.

old steppe
#

Can I ask you something about mods?

small osprey
#

Don't ask about asking buddy. Just ask spiffo

old steppe
#

Ok. I want to play mods with my friends. I am opening a server but it is still defined. What can I do? The number of open mods is around 312. And even though we waited for 2 hours, it got stuck on the identifying screen.

small osprey
honest ginkgo
#

Is there anyone who can help me with creating a mod?

#

I have basic modding experience, made my first mod quite a bit ago changing climate coloring.

small osprey
honest ginkgo
#

Relating to the zombie spawns/heat map

small osprey
#

Well ask and see who knows an answer.

honest ginkgo
#

Good point

small osprey
#

big brain, small worm. And thats what she said.

honest ginkgo
#

Anyways, I want to know if there is a way I can change the vanilla zomboid spawns and heat map, I'd like to create my own mod involving revamped zomboid spawns. Also any tips regarding how to add backpacks to zomboids would be fantastic.

If it helps, I am fluent in Lua, and amatuer with Javascript.

tame drum
#

somebody have a good modpack for latest version?

dim mist
bronze yoke
#

it's the same

small osprey
dim mist
supple briar
small osprey
honest ginkgo
vital sedge
#

The new event added in B42 with OnZombieCreate is a bummer, it doesn't seem to have zombie inventory initialized, or at least on zombie death that inventory is not carried over.

bright fog
#

Why do you need their inventory ?

vital sedge
#

i wanted to spawn holster on them to show it as a model, and neither setwornitem and setattacheditem work

#

visible gun spawning work though...

bronze yoke
#

wasn't i talking to you about this the other day? zombie inventories aren't real until they die

vital sedge
#

yes and its a pity, and other methods seem to not work

bronze yoke
#

it's not that the event is bugged (there are a few criticisms of it though), it just doesn't make sense to put things in zombie inventories

vital sedge
bronze yoke
#

OnZombieDead is the exception, the game temporarily puts things in their inventory during the dying animation and then transfers that to the corpse

bright fog
#

The main issue is that OnZombieCreate doesn't properly allow you to setup visuals directly

vital sedge
#

ahh i don't want to use outfit, but i will have to then, create just some dummy outfit with just holster and then set that outfit?

bright fog
#

You need to wait for the zombie model to be loaded in for the first time

bright fog
vital sedge
#

i will use this then: You can access the current outfit of a zombie with zombie:getOutfitName() and set it with zombie:dressInNamedOutfit("<outfit_name>").

bright fog
vital sedge
#

yes holster and then gun in that holster

bright fog
#

Setting the outfit means you will limit the zombie clothing loot to a singular outfit

vital sedge
#

ehhh fugg

bright fog
#

Thus locking:

  • a lot of clothing types
  • possibly backpacks too
vital sedge
#

cant i just overlay that outfit on otehr outfits?

bright fog
#

That's human visuals

vital sedge
#

or merge?

bright fog
#

Read the page, I mention it

#

ItemVisuals

#

But like I said, there's currently an issue where you can't exactly do it OnZombieCreate and instead you need to catch the zombie getting loaded in, then detect whenever its outfit gets set. That's something I had done in Zomboid Forge

#

I guess I need to write that event

vital sedge
#

too much work for me probably, im a novice

#

already spent shitton on this stuff

bright fog
#

Yea that's why I think I need to get to writing that custom event for it because a lot of people end up in your case where that's the solution but bcs of that simple issue, it's not that simple

vital sedge
#

i just wanted a gun mod, where zombies spawn with a gun in holster, they spawn nicely with gun attached to back with onzombiecreate

bright fog
#

Actually I'm not sure you can do that on zombies

vital sedge
#

the outfit system is terrible for attached weapons, because it will also spawn all the melee crap when chance is upped

bright fog
#

@potent loom can you attach a gun to the back of a zombie ?

#

Or in a holster

#

Oh wait you can right no ?

#

Hmm

vital sedge
#

either of

bright fog
#

Interesting

vital sedge
#

sorry not this lol

#

its attaching shotgun on the back, item = instanceItem(base.shotgun) then setAttachedItem("Rifle on Back", base.shotgun")

#

onzombiecreate works with this

#

you can get a sea of zombies with shotguns on the back already rendering when you see them

#

with a script, but holsters are clothing items and need setWornItem which seems to not work

bright fog
#

Most likely because they don't have an inventory if I had to guess OR because of the same issue you can't set ItemVisuals OnZombieCreate

vital sedge
#

i will try messing with visuals thank

honest ginkgo
#

does anyone know how to alter/find the zomboid spawning heat map, and then package it up for a mod? cannot seem to figure this out

#

albeit simple

honest ginkgo
bright fog
#

Uh check something like media/maps ?

honest ginkgo
#

solid idea, and do you know if the heat map actually controls spawning? someone said prior that it does not

bright fog
#

No idea, for that ask the mapping Discord

vital sedge
#

as for slayer, bandits mod seems to use premade outfits, the bandit creator mod too, so it doesn't use lua scripting to directly assign clothing stuff, it also doesn't use onzombiecreate event.

red tiger
vital sedge
#

i already scoured it for ideas heh

#

you know that feeling of butthurt when theres small detail you cant do, im in that state

red tiger
#

What? I can't do something? I'll code it in.

vital sedge
#

next level is learning to mess with java directly like nepthene mods, something is holding you back, just replace it directly, no limitations. But i dont like mods that replace java classes because i cant keep track of them in mod manager[thankfully only a few of thjem so far], i wish someone remade the mod manager and added the tab with exclamation[needs manual install] or filter.

red tiger
bright fog
#

Bcs Bandits use a lot of completely different aspects

#

It manually spawns the NPCs

#

And thus NPCs in Bandits don't follow the same rules

vital sedge
#

yeah, the npcs are zombies thnough as i understand

bright fog
#

Yes

#

But they don't follow the same rules as your normal zombies because the mod adds a lot of layers to it

#

So while it's a good reference technically on what you can do, in your case, it won't teach you much

#

And I bet Bandits uses ItemVisuals to set the clothings, bcs outfits are not defined in the game xml file for outfits

#

With the new Bandits Creator mod

vital sedge
#

could be

#

i didnt found onzombiecreate so it evade the issue

#

theres onzombieupdate, but i dont know what trigger it

#

zombie movement?

bright fog
#

Read the event description on the wiki

#

Also see the whole list of events

vital sedge
#

Fires whenever a zombie updates.

#

thats vague

bronze yoke
#

every tick while the zombie is alive (more or less, some situations temporarily disable it)

bright fog
bright fog
#

Might need to improve it

#

Every tick for zombies that are visible, every two ticks for zombies that are not visible

#

Same way as OnPlayerUpdate tho that one doesn't have that two tick rule I think

bronze yoke
#

well a player is never not visible

bright fog
#

Other players

bronze yoke
#

they don't trigger the event at all

#

local players only

bright fog
#

Do they not ? Interesting

#

Can you send me the repo with the event json please ?

bronze yoke
bright fog
#

Thank you

vital sedge
#

would be a cool idea if week one, ie. pre pandemic time evolving into the last of us infected mod.

silent zealot
# bright fog Do they not ? Interesting

If they did it would be an nightmare when multiple players get together.
1 player, 1 playerUpdate event per tick
2 players, 4 playerUpdate events per tick
5 players, 25 playerUpdate events per tick

vital sedge
#

yeah this stuff doesn't work unfortunately :/ ```local function loopdroptest(zombie)
local itemVisuals = zombie:getItemVisuals()
for i = 0, itemVisuals:size() - 1 do
local itemVisual = itemVisuals:get(i)
itemVisual:setItemType("Base.Jacket_WhiteTINT")
itemVisual:setClothingItemName("Jacket_WhiteTINT")
zombie:resetModel()
end

end

Events.OnZombieCreate.Add(loopdroptest) ```

#

i know the resetmodel can be outside it was there originally, i added it to be sure

bright fog
bright fog
vital sedge
#

how do i use your framework to do it?

#

i see this ZomboidForge.InitializeZombiesVisuals

bright fog
#

I haven't made the custom event yet sadly

#

ZomboidForge should not be used for what you are trying to do

#

It's to make custom zombies

vital sedge
#

so what's the exit strategy?

#

wait for devs to add sth that will enable this?

bright fog
#

Figure it out, or wait for me to make it a custom event in my API πŸ˜…

bright fog
vital sedge
#

ok. i will wait then πŸ™‚

#

i hope i wont forget about this lol

#

going to bookmark zomboid forge

bright fog
#

It won't be in Zomboid Forge

vital sedge
#

well at leat it's reassuring this is possible using some code wizardry

#

hmmm but then why would this code not work onzombiedead too? after the zombies die they dont wear visually white jacket, and i checked with console and they indeed have these itemvisuals

#

maybe they have assigned generic outfit and it somehow as you said override it no matter what? so whats the point of item visual then

bright fog
#

Reload the model only once perhaps

bright fog
#

That's not it

#

You can modify those

vital sedge
#
    local itemVisuals = zombie:getItemVisuals()
    for i = 0, itemVisuals:size() - 1 do
        local itemVisual = itemVisuals:get(i)
        itemVisual:setItemType("Base.Jacket_WhiteTINT")
        itemVisual:setClothingItemName("Jacket_WhiteTINT")
        
    end
    for i = 0, itemVisuals:size() - 1 do
        local itemVisual = itemVisuals:get(i)
        itemVisual:getItemType()
        itemVisual:getClothingItemName()
        print(itemVisual:getItemType())
        print(itemVisual:getClothingItemName())
        
    end
    zombie:resetModel()
end

Events.OnZombieDead.Add(loopdroptest)    ``` this should work
bright fog
#

What the zombie visually wears is dependent on ItemVisuals

#

And it does modify the spawned loot

#

With this code your setting every clothing to that white jacket

#

Let me check if you're doing it properly

#

I never tried to do it OnZombieDead

#

You shouldn't do it there

#

If you just want to add the shirt to the loot, just add it to the zombie inventory OnZombieDead instead

#

For visuals, idk, it might react weirdly because at this point you're in a transition state for the zombie from IsoZombie to IsoDeadBody

#

And so the visual change might just not move over to the corpse

#

Or it's too late for the loot to generate with the modified clothings

vital sedge
#

i just tried to check if it this itemvisual works

bright fog
#

It does

vital sedge
#

so why it doesnt here? too much items replaced?

bright fog
#

Unless they broke something somehow in the past B42 updates

bright fog
vital sedge
#

should i just update tshirt?

bright fog
#

For OnZombieDead

#

As for OnZombieCreate I already explained to you why

#

Try to put it in OnZombieUpdate

vital sedge
#

so if it doesnt work onzombiecreate, doesn't work onzombiedead, then it works onzombieupdate?

bright fog
#

Let me explained to you one last time why these two don't work (or why I think it doesn't work for OnZombieDead):

OnZombieCreate:

  • it's too early in the zombie loading, the zombie clothing is set the first time the player sees the zombies or so, so you need to cash the clothing being set by the game LATER AFTER OnZombieCreate. Which there's a method for, but it's annoying to do and if every mods ran that code it could have a performance impact on the game (thus the reason why I want to make it a custom event in my API for modders)

OnZombieDead:

  • either it's too late to set visuals
  • or the transition aspect of the zombie state at this moment makes it that setting visuals won't be taken into account
  • if you just want the item to spawn in the inventory at this point, no need to set visuals, just add the item to the zombie inventory OnZombieDead
#

OnZombieUpdate, if your code is well written, it will work because you run the code basically all the time at a point where zombies should be loaded, or at least some zombies will be loaded (just spawn one in front of you)

vital sedge
#

yes, i understand there are elaborate reasons, but for my crude monke tests and brain it doesn't work with simple unit tests. Maybe there are some ways for it to work, but for my needs and skill level it doesn't work. And there's no documentation on what conditions needs to be fulfiled for these to work, like wait 10 ticks, or wait for sth else to load, and preferably how to do it. I appreciate they give us these new events, but some things that theoretically are implemented according to documentation are most likely gated behind some specific coding sequence/code for it to work. I dont have endurance for that and testing.

bright fog
#

There's no conditions, just run the code OnZombieUpdate

#

You want the real answer ?

#

The real answer is that zombies are DOGSHIT

#

I'm not even joking, Bandits existing and how well it works is a fucking miracle seriously, I'm baffled by it. The amount of dogshit you have to deal with when you mod zombies is just insane

silent zealot
#

Assuming you wanted to change the outfit and corresponding visuals of a corpse.

bright fog
#

Tho that doesn't seem to be his goal here

silent zealot
bright fog
#

Bandits is a masterpiece lol

silent zealot
#

Does IsoZombie:dressInClothingItem(string itemGUID) work?

silent zealot
#

oh bugger I told someone I'd look at their work on a zomboid java mod loader and them stuff happened and had a horrible time due to my jaw locking up for two weeks and I was all tired and distracted and forgot.

#

I need to find where I wrote down where to get it from and test it.

#

Back to what I was saying... if you do want to make a java mod the Brighter Headlights 2 mod includes a modified .java file and the (really ugly) build script I use, with ZomboidDecompiler used to make the dependencies folder (and base ,java file)

bright fog
#

I think it does

#

Also itemGUID ...?

#

I remember it taking the outfit name ...

silent zealot
#

There are a bunch of similar functions.

agile nacelle
silent zealot
#

Also, this might have changed since you last looked at it

bright fog
#

As for vehicles, currently my script doesn't take them into account, but they could be added with what I shared the other day regarding vehicles dimensions

agile nacelle
#

is adding a vehicle possible to the table

silent zealot
#

Seems a waste to use GUIDs for performnce and then pass them as strings instead of making a basic object that holds a 128bit number.

agile nacelle
#

Oh i see

bright fog
#

Might need some tweaking on how it retrieves some informations so vehicles can be added in

#

But the same kind of system could be used, alongside the vehicle angle, to define segments for it too

#

That way it's easy to adapt to the raycasting method which uses segments

agile nacelle
#

Hmmm

bright fog
# agile nacelle Hmmm

I'll go sleep soon, but I can look at it tomorrow if you want, got a whole free day

#

That way I can also look at that custom event I was mentioned in that other conversation a bit earlier here to add to the API

agile nacelle
#

Currently just trying to think of an alternative... casting the ray from the vehicle to the object

#

I cant figure out if itll be more accurate or not

bright fog
#

But basically propertyToSegments is the table that mods need to define to know what element intersect with the ray

agile nacelle
#

I see

bright fog
#

What are you doing exactly ?

agile nacelle
#

Well what am currently doing is casting the ray from the object to the vehicle

#

The other way around

bright fog
#

So you're casting rays from every single objects ?

#

Why do you not cast rays from the vehicle in the direction the vehicle is going ?

#

And shoot some from the whole width of the vehicle ?

#

Like retrieve the front segment of the vehicle and shoot N rays spread across this width ?

agile nacelle
bright fog
#

That sounds so much more costly than just shooting rays from the vehicle

agile nacelle
#

Honestly idk about the performance that much but wouldn't i need to cast like at least 50 rays to properly cover a direction

bright fog
#

No

#

Vehicle goes in a straight line

#

You can cast in front of the vehicle a small line of beams that go N distance forward

#

And adapt the distance to the deltaX of the vehicle

#

Like if you check every ticks, then adapt the distance to predict if next check is hitting the object, so you give a long enough distance

#

I don't even see how you would casting from the object to the vehicle, like what are you trying to collide with here ?

agile nacelle
#

with the vehicle

bright fog
#

It's the vehicle that collides

#

Not the tiles

#

So you need to check if the vehicle is going to collide

agile nacelle
#

Its hard to explain

bright fog
#

So you ray cast from the vehicle in the direction it's going and say "ok if that hits an object, then it will collide"

#

Nothing hard to explain, I don't see how else you would do it lol

plucky summit
#

Hello. I am having a hard time implementing my own radial menu entry for firearms. Is there a basis that I can look into?

bright fog
plucky summit
#

I'm looking at some mods like VFE but for the life of me, I can't make it work.

agile nacelle
# bright fog Nothing hard to explain, I don't see how else you would do it lol

Am not the best at explaining but i was basically planning to cast the ray from the object to the opposite direction of the vehicle velocity

i dont know about casting the ray from the vehicle to object since am concerned about the performance impact if i replaced the whole collision detection with just raycasts, and if it casts the rays from the vehicle to the object after selecting the grids, how will i go about predicting if itll collide or not.

agile nacelle
#

vehicle also selects grids at its sides so player can stick very close to the wall and damage them

bright fog
#

Like I said, just raycast from the vehicle's front like a total of 1 beam / length (so if width is 3 then cast 3 beams). Adjust the distance so that it corresponds to the distance the vehicle will travel until the next raycasting, that way you check between its current position and the next one if there's an object. You can also take into account hte vehicle speed etc

#

You don't need to do it every ticks, bcs the vehicle will never have drastic speed change in a few ticks, it'll at least spread to 10 ticks I'd say

#

Take into account that in my own mod I did a raycast of a distance up to 25 tiles or so and never got any performance impact by doing one raycast every ticks

agile nacelle
#

I did get drastic performance impact but thats probably cause i was doing something wrong

bright fog
#

If you raycast for every tiles around the player, I see how that can get costly

#

You don't need millions of raycasts

queen oasis
#

ideally, you might want to cast in the direction of "impulse" also to detect collisions if you're not exactly going straight
but this is all above my soberness atm

bright fog
#

You mean in the turning direction ?

#

Perhaps

queen oasis
#

if you get the slip and slides

bright fog
#

I figured having a ray on the extremities should be enough

bright fog
agile nacelle
queen oasis
#

probably 95% of them would be covered I'm sure.
slip and slides, if you turn too fast and are sliding sideways, or all the way backwards maybe

#

maybe just the way I drive too

agile nacelle
#

πŸš—

bright fog
#

You can even take into account what segment of the vehicle is in the direction

#

You could map the sides of the vehicle hitbox, to properly shoot rays according to this

agile nacelle
#

slightly heartbreaking gonna have to completely remove the current grid square selection code to be completely replaced by raycasts but dis for the greater good

#

wait .... Say if you were going to hit a wall placed to the north and you were driving south

#

Could the raycast miss the wall

queen oasis
#

raycast is the way to go with a vehicle

bright fog
#

As long as you raycast in the direction the vehicle is going

queen oasis
#

lots of neat stuff in BaseVehicle but , it kind of stinks that there's no "isVehicleIntersecting" for an object, only squares

bright fog
#

No shit, that's why vehicle collision is annoying hahalol

south trench
#

Heya. I'm having issues with my first mod, which is a submod for the furry mod 'Anthro Survivors' (I'll call it AS to simplify). How AS works is that the 'fur' is categorized as a single piece of clothing, almost like the hazmat suit in vanilla PZ. My mod adds in a new variant texture of the fur, though the issue I'm having is that the texture isn't showing up at all on the character; it is completely invisible. I disabled all mods other than AS and mine, and the issue persists. I've tinkered with my mod some to try and fix it, but I haven't seen any better results. And since I have no experience other than this when it comes to modding, I don't know how else to fix it. I can provide the mod link and pictures if needed, and any help is appreciated.

icy night
#

How hot should a desert be?

#

Thinking of setting the temp to 60C or should I go hotter

queen oasis
#

"but it's a dry heat"

#

6 summer months in the desert of New Mexico and 90 F was typical, 105 F was an ok day. 115 F was hot

icy night
#

speaking of which, I still have to disable the ablity to let players drink the "sanddunes"

queen oasis
#

if it's 60C, they'll be drinking those sand dunes

icy night
#

Lmao, ya

queen oasis
#

we didn't even turn the swamp cooler on until it was around 90 F / 32C

#

anyway, 140 F is good

#

if you see either 60 C or 140 F, you're going to get that it's really hot

bright fog
south trench
#

Ah alright, thank ya

queen oasis
#

Currently, I'm checking for any and all "saw log recipes" and returning after finding one, but curious if there is a better/less heavy way of doing this:

-- assume obj is a log object
local function getSawLogRecipes(obj, playerObj)
    local containers = ISInventoryPaneContextMenu.getContainers(playerObj)
    local item = obj:getItem()
    if instanceof(item, "InventoryItem") then
        local recipes = CraftRecipeManager.getUniqueRecipeItems(item, playerObj, containers)
        if clickedFlags.logs and hasWoodSaw and not recipes then
            clickedFlags.tooDarkToSaw = true
        end
        if recipes then
            for j = 0, recipes:size() - 1 do
                local recipe = recipes:get(j)

                for k = 0, recipe:getOutputs():size() - 1 do
                    local outputItem = recipe:getOutputs():get(k):getOutputMapper()

                    for m = 0, outputItem:getResultItems():size() - 1 do
                        if outputItem:getResultItems():get(m):getName() == "Plank" then
                            print("Planks are delicious!")
                            return recipe
                        end
                    end
                end
            end
        end
    end
    return false
end
zinc vapor
#

bro why dont u use death legion its a nexus b42 mod!

#

but nice guys

vital sedge
#

i just copied bandit solution and it works finally: ```local function loopdroptest(zombie)
if zombie:getVariableBoolean("HolsterPresent") then return end
local itemVisuals = zombie:getItemVisuals()
local itemVisual = ItemVisual.new()
itemVisual:setItemType("Base.HolsterSimple")
itemVisual:setClothingItemName("Base.HolsterSimple")
itemVisuals:add(itemVisual)

zombie:resetModel() -- force visual update
zombie:setVariable("HolsterPresent", true)

end

Events.OnZombieUpdate.Add(loopdroptest) ```

#

slayer is goat

silent zealot
#

I didn't get the weird shape quite right but I did make a hot pink variation.

bright fog
#

You're just going to add item visuals for nothing, also I'm unsure if the game clears duplicates in item visuals

#

Wait no nvm !

#

It checks for the variable

#

No that's good yea

vital sedge
#

Yeah i will add checks, but zombies dont spawn with itemvisual holster from my test, even the police one, its added then as outfit in inventory.

#

I will still implement check and see, im not at pc right now.

bright fog
#

Yes it spawned but what I meant is that you could have a silent problem bloating saves, but it does the check for the variable so it's all good

#

There's already a check

#

That's not needed

brave bone
#

Q: can we change visual of bullets being fired?

bright fog
#

Worst case you possibly have two holster entries but like I said I'm not sure if the game clears duplicates

vital sedge
#

Empty texture? For bullets

bright fog
#

Uh ?

vital sedge
#

Unless they are purely shader thing

bright fog
silent zealot
vital sedge
brave bone
bright fog
#

It's an animation variable, Bandits uses them a lot to know what things were set on zombies

#

Wait, but you can get the issue I mentioned still

#

This won't stop the problem of a zombie loading and not having its outfit set yet

#

Unless it resets variables too when setting the outfit ? But I'd be surprised

vital sedge
#

Its still unoptimal from perf standpoint, i wish zombiecreate worked. Do once and be done, now it checks every zombie for variable. If there are like 200 of them in the render square its a lot.

bright fog
#

200 zombies triggering a single if check and function call is nothing

#

I'll do that event thing tho

vital sedge
#

Event thing?

bright fog
#

Custom event

#

Which triggers when you can set the zombie visuals after OnZombieCreate

vital sedge
#

Oh, ok. It would be nice to see perf profiler if its better than this flag setting.

#

How do i test perf?

silent zealot
vital sedge
#

I have other function and its getting heavy.

brave bone
silent zealot
#

See also: isoBulletTracerEffectsConfigOptions, which is a subclass of in IsoBulletTracerEffect and seems has a lot of stuff like size and color... but the actual rendering is a line, not a texture.

#

I wonder if they fixed "game crashes if shotgun fires more than 9 projectiles" yet.

#

Nope.

brave bone
silent zealot
#

Good luck!

small osprey
#

mhh in debug mod console if you declare a variable var = getSomeObjc - how do you inspect the variable with ingame debugging?

I tend to dump the getmetatable(var) of most of the stuff and then read from console.txt but its kinda cumbersome.

bronze yoke
#

you probably can't

#

you *could* put in a file:

function DEBUG_INSPECT(object)
    breakpoint()
end
small osprey
#

But you folks don't do that because you trust documentation 😏 , the decompiled java code you have lying around or because you just know? πŸ˜…

bronze yoke
#

i just don't spend enough time in the console for it to have come up

daring bough
#

Hi guys, I have a question about vehicle zone distributions. In vanilla script there are two options, normal and specific. If I want to add to my moded vehicles specific distribution zone, (clothing, doctors, golf etc) how could I do it?
Or game simply randoms a chance to spawn a car with random distribution table? Like if I have set to my vehicle distribution table β€œmodern car” it could spawn both with vehicle distributions normal and specific?

small osprey
bronze yoke
#

i don't actually know, i heard about it from jab ages ago

small osprey
#

Yeah, this here

Not a high prio-item, but a nice-to-have.

ancient grail
south trench
#

I had to kinda reverse engineer another mod that works the exact same way in order to make it, as its essentially the same outline but different skins/textures for different people. It's set up in the B42 mod structure, and the files I've done I'll show via pics. Other than that im quite clueless but I can send the mod link if that'll help. It's not working due to some issue with the texture, as the clothing is see-through and invisible. I'll try to get someone more knowledgeable on this mod to help tho, but if you know what could be causin this, it'd be a big help

bright fog
#

If I had to guess, you made a mistake in the item script

#

Or model script

#

And the texture isn't setup right at all

south trench
#

Ah okay, I'll check there then

south trench
bright fog
#

Happens

thin swan
#

Okay am I crazy or could I make a throwable spear by making it a gun, giving it a short range, and then just animating the prop bone to make it go forward? Could use OnHitZombie to detect if a zombie is hit by the spear, and if it is, just interrupt the animation and spawn a spear attached to the zombie?
Would have to block the changing of direction while spear is in the air as to not make it rotate with the player, but if it has short enough range and is thrown fast enough it could work to just have the animation kinda lock you for a second without feeling disruptive

#

and if shoving with the spear you stab

#

damn

#

might have to give it a shot

red tiger
#

Select all characters in the GUI before exporting.

#

It's basically a pre-parsed and preloaded TTF rendered font as a bmp / image.

#

Pre-baked.

#

So you load it into an object and then call that object to render.

#

I rewrote this in Lua for my UI system.