#mod_development

1 messages Β· Page 278 of 1

silent zealot
#

Seems like drinking alcohol sets your water level to an insanely high amount

wheat blade
#

it's made already isn't it?

sly monolith
#

i have an issue with a simple mod that i made for b41, i tried fixing it for b42, copy pasting stuff from the original game files (cuz i have no idea how to mod actually xd), it worked for me in the b41, but it seems to not work anymore πŸ˜… i turn the mod on, the thing reloads, and then i see 2 errors in the bottom right and the game doesn't work anymore, can't even turn it on untill i cut that mod from the folders

silent zealot
#

yes, but that one does not adjust movement - so when you turn the shopping trolly spins around at super high speed

#

feels really wrong

#

Now we can (probably) have a trolley you actually push that takes effort.

elfin stump
sly monolith
#

i actually went into the original game recipies and copy pasted stuff to my mod from there, tho maybe i missed something xd

silent zealot
#

What is the error?

#

Check console log like Phil suggested

sly monolith
#

where is that console.txt file? i didnt touch zomboid for a while idk what im doing πŸ˜„

elfin stump
#

just search for it windows will find it quick

silent zealot
#

C:\Users\username\Zomboid

sly monolith
#

oh ok nvm found it

silent zealot
#

then ctrl-F for "error" (and there will be a few unrelated errors as wellm just for fun)

#

What does the mod do? That, along with the errors, shoudl give us enough info to point you in a direction towards fixing it.

sly monolith
#

it just lets you craft a new bag with stats of large backpack, but looks of something else

elfin stump
#

Can you post the recipe that is used?

silent zealot
#

Recipes changes in B42, so that is likely the issue - have a look at the vanilla recipes in B42 and see if you can figure out what is different.

tacit pebble
#

all recipes are completely changed

sly monolith
#
    {
    timedAction = SewingCloth,
        Time:180.0,
        Tags = InHandCraft,
        category = BagZ,
        needTobeLearn = false,
        inputs
        {
            item 1 [Base.Bag_NewBagTINT],
            item 1 tags[SewingNeedle] mode:keep,
        }
        outputs
        {
            item 1 Base.Bag_ALICEpack,
        }
    }```
#

there seems to be an error with this one

silent zealot
#

It's also possible bags changed a big with the tags/locations they use, but you test that by spawning in the bag in debug mode

elfin stump
#

craftRecipe at the top is what you want

#

not recipe

sly monolith
#

ooooh yeah

#

i missed that, thanks !!

silent zealot
#

I need a mod that stops my character getting bored when I am reading/typing on a Zomboid Discord and forgot to pause the game. 🀣

elfin stump
#

Sense of Smell mod

#

you will get eaten instead

#

more fun!

sly monolith
silent zealot
#

...too sensible. But that will do for now!

sly monolith
finite scroll
#

really hope they animate turning, it looks janky as shit

sly monolith
#

it didn't throw any errors now! πŸ˜„ thank you guys, it seems to be fixed πŸ˜„

elfin stump
#

I am running a test at full speed and just saw a cow for the first time run by in hyperdrive, those things are scarier than the zeds!!

#

nice!

#

props to the PZ dev team for the very accurate cow tail tho

finite scroll
#

how can i check what tags an item has?

fair elbow
#

Hi, getting into developing mods for PZ 42, is there a website with the new Javadoc for 42.0 yet

bronze yoke
fair elbow
#

Perfect thank you

tacit pebble
#

ah btw can someone do some action on Zombie population window in debug?
for me all options throw an error when click something.

tacit pebble
#

ah thanks. it's b42 thing then

elfin stump
#

Yeah I noticed it the other day, same with some of the zombie horde manager

open drum
#

Good morrow from Korea modders

#

Could any kind fellow help me

#

if there's a way to put a custom "tag" on script items?

#

like ...

tacit pebble
#

just tags = your_tag until b41

tranquil reef
#

How can I add an icon before a context menu option

open drum
#

i want to use local items = getScriptManager():getItemsTag(tag)

tacit pebble
#

not sure about b42

bronze yoke
#
local item = ScriptManager.instance:getItem("Module.ItemName")
if item then
    item:DoParam("Tags = MyNewTag")
end
open drum
#

to collectively set all my mod items to have tag = "wuro"

open drum
#

using Event.OnGameStart. ?

bronze yoke
#

you don't have to put it on an event, you can just leave it loose in your file

#

if you want to put it in an event use OnGameBoot

pale merlin
#

is there an axample in the game of copying and pasting from the clipboard?

open drum
pale merlin
#

is it even possible to copy to the clipboard from lua?

bronze yoke
#

i never did it but some people had some debug tools that did that

sly monolith
#

it seems i celebrated too early, i get an error when loading a game heh

bronze yoke
#

i think there's a Clipboard class or something

pale merlin
crystal canyon
elfin stump
#

recipe should be craftRecipe

sly monolith
#

it is possible to see the [1 ERROR] thing in the menu once the error happens

crystal canyon
#

ha!! thanks!

tacit pebble
#

check console.txt

elfin stump
sly monolith
#

LOG : General f:0, t:1734928326158> java.lang.Exception: Item not found: Base.Bag_NewBagTINT

tacit pebble
#

Item is not existed?

sly monolith
#

oh should i specify the magical category i made for this thing instead of Base? xD

open drum
#

Question, item Necklace_GoldRuby { DisplayName = Necklace - Gold with Ruby Stone, DisplayCategory = Accessory, Type = Clothing, Weight = 0.1, Icon = Necklace_GoldRuby, BodyLocation = Necklace, ClothingItem = Necklace_GoldRuby, Cosmetic = TRUE, WorldStaticModel = Necklace_GoldRuby_Ground, Tags = HasMetal;RubyJewellery, }

#

with this item

#

can i use scriptItems:addAll(getScriptManager():getItemsTag("HasMetal"))???

elfin stump
#

unless you added to base

sly monolith
#

thx, i'll look into that next πŸ˜„

open drum
#

instead of Base {
}

sly monolith
#

i started with this module BAG_NEWBAG { imports { Base }

open drum
#

yea, that's it

tacit pebble
#

uhm.. if I remember correctly, should be module base { }

elfin stump
sly monolith
#

i don't really get what it does tho, after that i still need to add my BAG_NEWBAG thing instead of Base.<my mod> ?

open drum
elfin stump
elfin stump
# sly monolith i don't really get what it does tho, after that i still need to add my BAG_NEWBA...

Items you add are going to be added to the table BAG_NEWBAG. Lua is pretty much just tables or it helps at least to think of it that way. So you are setting up a table, and putting an item in it, the imports base is just a reference, I don't know if it even needed or not, but it doesnt hurt. Then when you ask for your item you are asking for first your table you made, and second the item from that table. "yourMod.yourItem" where yourMod is the table you made and yourItem is the item you put in it. When you ask for Base items from the game, you usually will say Base.TheItem, or if you were grabbing from another mod, you could say OTHERMOD.crazymoddeditem.

bronze yoke
#

imports usually don't do anything (i think most people don't really know what they do and just add them to be safe) but they don't hurt to have

sly monolith
#

ok changing it fixed stuff and now it works πŸ˜„ thanks again for the help πŸ₯³

tacit pebble
#

try using string.find or something to find part of full tags when you get tags from item

for example
string.find(getTags(), Jewellry)

!!this function is not correct in PZ. I just quick threw my thought!!

sly monolith
elfin stump
sly monolith
#

i took that thing from some other mod i used to learn how to made mine xD

sly monolith
#

i'm not dying yet πŸ˜‚

bronze yoke
#

when you reference a script object (item, model, vehicle, etc) by its short type (ItemName instead of Base.ItemName) it will check your module first, and then imported modules - so if you aren't referencing objects from other modules it doesn't do anything

#

i don't tend to use them, i like being explicit with full types anyway

sly monolith
#

so does that mean it's better to even not have that import thing there? or the other way around lmao

bronze yoke
#

it doesn't really matter, but it probably isn't doing anything

elfin stump
#

I feel like I have seen some places in the vanilla code where they don't use base, so in those cases, that is part of base so it grabs it easy. But if I were to do that in mine, it would usually be okay, but if the item was something common, like "Shoe", then that is where it is really key right? - So you are saying that you can just always call by its long name and its always safe, and you dont need import at all if you do that, is that right?

bronze yoke
#

yeah

finite scroll
#

ok who's idea at the indie stone was it to keep the same naming convention for everything except the color of fucking pens

#

everything is ItemVariant but they're fucking VariantItem

elfin stump
#

Okay cool that is good to know, I started using only the full names awhile back, so I can probably start cleaning up some of the extra imports. Thanks!

elfin stump
#

Dyslexia isn't a crime! It is a battle πŸ™‚

finite scroll
#

ok well i'm still arresting them for it

elfin stump
#

haha

fair elbow
#

Hi, is there any documentation on what are the main game objects that are loaded in Lua on startup? I'm seeing an Events table in some mods and what appears to be a ScriptManager

bronze yoke
crystal canyon
#

RIP

ERROR: General f:0, t:1734929872027> ExceptionLogger.logException> Exception thrown
zombie.world.WorldDictionaryException: World loading could not proceed, there are script load errors. (Actual error may be printed earlier in log) at IsoWorld.init(IsoWorld.java:3180).
Stack trace:
zombie.iso.IsoWorld.init(IsoWorld.java:3180)
zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:301)
zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:251)
java.base/java.lang.Thread.run(Unknown Source)

bronze yoke
crystal canyon
#

java.lang.Exception: Tag has no items: Needle. line: item 1 tags[Needle] mode:keep

finite scroll
#

@crystal canyon how did you solve the issue of professions only appearing the first time a world is launched?

#

i can't seem to figure it out

crystal canyon
#

Events.OnCreateLivingCharacter.Add(function()
print("[DEBUG] OnCreateLivingCharacter triggered")
traitsInitialized = false
exclusivitySet = false
professionsInitialized = false
initializeTraits()
setMutualExclusivity()
initProfessions()
traitsInitialized = true
exclusivitySet = true
professionsInitialized = true
end)

bronze yoke
#

if you're making a custom profession, you need to hook the basegame function that adds professions

crystal canyon
#

using OnCreateLivingCharacter

bronze yoke
#

for some reason the profession list gets wiped and refilled every time so doing it at startup only affects the main menu

elfin stump
crystal canyon
#

when you die, and get back to the character creation screen, it triggers the OnCreateLivingCharacter event, so you need to call your profession function there as well

open drum
#

I am gussing ``` craftRecipe Melt_Accessories
{
Time = 100,
Tags = primitivefurnace,
category = Wuro_Recipe,
needTobeLearn = false,
timedAction = MakingHammer_Surface,
inputs
{
item 1 Necklace_Silver/Necklace_GoldDiamond/Necklace_GoldRuby/Necklace_Gold,

    }  ```
#

making multiple items to be able to work as input

#

by using / doesn't work anymore?

bronze yoke
#

item lists should now be done as [Necklace_Silver;Necklace_GoldDiamond;Necklace_GoldRuby;Necklace_Gold]

open drum
#

gotcha ty

#

makes more sense

#

is it possible to make it call all the lists from a separate . lua file ?

#

like have listofitemsIwant.lua

#

and call the lists from that to be put into inputs

pulsar pagoda
#

im trying to make a audio file change to fishing but i just cant get b42 to have regular fishing sounds, do yall get sounds when fishing?

fair elbow
#

Man it's probably just going to be easier to decompile the java and dive in huh

bronze yoke
#

usually is, yeah

fair elbow
#

God forbid, I haven't touched java in more than 10 years

finite scroll
#

must be some issue on my end

bronze yoke
open drum
#

gotcha

#

so this won't work any more

bronze yoke
#

from what i've seen there's nothing like this anymore

open drum
#

affirmative

crystal canyon
elfin stump
pulsar pagoda
#

thank you for your help

#

the sound files are in the bank files so it should come

bronze yoke
# finite scroll I had it called there, but it doesn't seem to be working

the way i've always done this is:```lua
Events.OnGameBoot.Remove(BaseGameCharacterDetails.DoProfessions)

local old_doProfessions = BaseGameCharacterDetails.DoProfessions
BaseGameCharacterDetails.DoProfessions = function()
old_doProfessions()
-- add your professions here
end

Events.OnGameBoot.Add(BaseGameCharacterDetails.DoProfessions)

elfin stump
#

Quick question on SoundManager:PlayWorldSound(String name, IsoGridSquare source, float pitchVar, float radius, float maxGain, boolean ignoreOutside) - maxGain is the closest I see to volume but my understanding is that can only go up, is there anyway to play a sound at a lower volume or do I need to just bring down my audio file volume, and assume this is being controlled via a channel somewhere?

silver nacelle
#

And now my .pzw has no roads.

finite scroll
#

oh my fucking god

#

it was actually working the entire time

#

but for some reason it puts it at the very top of the list the first time and the very bottom the second

crystal canyon
#

hahahaha

finite scroll
#

i'm such a fucking idiot

crystal canyon
#

it happens

finite scroll
#

that it does

#

lmfao

crystal canyon
#

Yaki's oogabooga with recipes ready, missing 3 modules to edit

fair elbow
#

Oh wtf

open drum
#

nice

fair elbow
#

So some of the games actual java object methods are exposed to the lua

sly monolith
#

can someone help me with another issue: java.lang.Exception: unknown type in craftrecipe: OnCreate:Recipe.OnCreate.pickBagTextureRed at OutputScript.Load(OutputScript.java:258).

#

i had this in my mod in b41, it used to pick a certain texture when the item was crafted, now it seems to no longer work, or maybe i just placed it in a wrong place?

elfin stump
#

parameters from function call on an recipe are now (recipeInfo, isoPlayer)

#

it used to be (items, result, isoPlayer) I believe.

open drum
#

Can anyone help me to make this long arse list simple????``` craftRecipe Melt_Accessories
{
Time = 100,
Tags = primitivefurnace,
category = Wuro_Recipe,
needTobeLearn = false,
timedAction = MakingHammer_Surface,
inputs
{
item 1 [Locket;Necklace_DogTag;Necklace_DogTag_Female;Necklace_DogTag_Male;Necklace_Gold;Necklace_GoldRuby;Necklace_GoldDiamond;Necklace_Silver;Necklace_SilverSapphire;Necklace_SilverCrucifix;Necklace_SilverDiamond;Necklace_Crucifix;Necklace_YingYang;Necklace_Pearl;NecklaceLong_Gold;NecklaceLong_GoldDiamond;NecklaceLong_Silver;NecklaceLong_SilverEmerald;NecklaceLong_SilverSapphire;NecklaceLong_SilverDiamond;NecklaceLong_Amber;Necklace_Choker;Necklace_Choker_Sapphire;Necklace_Choker_Amber;Necklace_Choker_Diamond;NoseRing_Gold;NoseRing_Silver;NoseStud_Gold;NoseStud_Silver;Earring_LoopLrg_Gold;Earring_LoopLrg_Silver;Earring_LoopMed_Silver;Earring_LoopMed_Gold;Earring_LoopSmall_Silver_Both;Earring_LoopSmall_Gold_Both;Earring_LoopSmall_Gold_Top;Earring_LoopSmall_Silver_Top;Earring_Stud_Gold;Earring_Stud_Silver;Earring_Stone_Sapphire;Earring_Stone_Emerald;Earring_Stone_Ruby;Earring_Pearl],

    }        
    outputs
    {
        item 1 Base.Apple,
    }      
}    ```
#

im sure there will b a better way to do this

sly monolith
# elfin stump If you are trying to run a function from here try it as YOURMOD.pickBagTextureRe...

here's the script:

module Base
{

    craftRecipe Make Red Bag
    {
    timedAction = SewingCloth,
        Time:180.0,
        Tags = InHandCraft,
        category = BagZ,
        xpAward = Tailoring:1,
        needTobeLearn = false,
        inputs
        {
            item 1 [Base.Bag_ALICEpack],
            item 1 tags[SewingNeedle] mode:keep,
            item 3 [Base.Thread],
            item 1 [farming.Strewberrie] flags[AllowRottenItem],
        }
        outputs
        {
            item 1 BAGZ.Bag_bagZ,
            OnCreate:Recipe.OnCreate.pickBagTextureRed,
        }
    }
elfin stump
#

First get rid of the sapces in craftRecipe name, no longer allowed.

open drum
#

yeap

sly monolith
#

oh ok thx, was actually wondering why there aren't spaces in the base game files xd

open drum
#

no space allowed

elfin stump
#

outputs, OnCreate I do not think that is a proper format, OnCreate should be up with your other parameters

icy yarrow
open drum
#

most of them have tag = HasMetal

#

but also does metal stuffs

#

i only want the jewelries

icy yarrow
#

No accessories tag?

open drum
#

to b accepted

finite scroll
open drum
#
    {
        DisplayName = Earrings - Ruby,
        DisplayCategory = Accessory,
        Type = Clothing,
        Weight = 0.1,
        Icon = Earring_Stone_Ruby,
        BodyLocation = Ears,
        ClothingItem = Earring_Stone_Ruby_Both,
        Cosmetic = TRUE,
        WorldStaticModel = Earring_LoopSmallSilver_Ground,
        Tags = HasMetal;RubyJewellery,
    }
    ```
elfin stump
#

OnCreate = pickBagTextureRed (because you are in base)

open drum
#

they ahve displaycategory as accessory

crystal canyon
open drum
#

but also does stockings and hats

sly monolith
crystal canyon
#

you could run another function that adds a special tag to those items and then just call that tag in the recipe

icy yarrow
#

You could maybe try that RubyJewlrey one and just add the other tags if those are available. Gold, silver etc

elfin stump
tacit pebble
#

body locations?

open drum
#

maybe i could try OnCreate = checkifJewerely instead

open drum
#

and make a function out of it

#

to check if the input item is jewel from the list

#

and return boolean

#

and addItem to the inventory as result

pulsar pagoda
#

hello, does anybody know where the new voice types are located? i want to add a new voice type

finite scroll
#

media/voiceStyles/voiceStyles.xml

#

actual audio data and stuff is somewhere else

crystal canyon
#

projectzomboid/media/voiceStyles

finite scroll
#

but that's where the formatting is

#

i want to speak to the man who gave the colored pens tags "[Color]Pen" instead of pen

pulsar pagoda
#

grat thanks guys!

#

great

finite scroll
#

and give him a firm homiciding

#

the alternate pens/pencils all just have the pen and pencil tag

#

but the literal most derivative variants of the pen

#

ALL have different tags

crystal canyon
#

projectzomboid/zombie/audio/parameters/ParameterCharacterVoiceType.class

#

Java

#

ugh

finite scroll
#

works fine for me

crystal canyon
#

theres also ParameterCharacterVoicePitch.class

elfin stump
# open drum maybe i could try OnCreate = checkifJewerely instead

I am looking at some jewlery and watches and stuff and I think maybe you could check for the hasMetal tag and then there is a parameter called "COSMETIC" that is a bool, and you can use that to determine i think if it is clothing? I am not sure how to check that though, it could be that is a flag? But I am not certain.

finite scroll
#

doesn't get variable names but you can at least look at the code

fair elbow
#

I just used Vineflower to decompile, does the job pretty well

#

Also, anyone know where in the code zombie spawning is

crystal canyon
#

can we use glasses during daytime to start fire? Would be nice to add it to the game if not an option

open drum
crystal canyon
#

ZombieSpawnRecorder.class maybe?

fair elbow
sly monolith
# elfin stump I am looking at some jewlery and watches and stuff and I think maybe you could c...

ok that thing i had doesn't work anymore, could you please look into it?

local redTex = getTexture("media/textures/Item_schoolbag_red.png")
local pinkTex = getTexture("media/textures/Item_schoolbag_pink.png")
local goldTex = getTexture("media/textures/Item_schoolbag_gold.png")
local purpleTex = getTexture("media/textures/Item_schoolbag_purple.png")

function Recipe.OnCreate.pickBagTextureRed(items, result, player)
    local newVisual = result:getVisual()
    newVisual:setTextureChoice(0)
    result:setTexture(redTex)
end

function Recipe.OnCreate.pickBagTexturePink(items, result, player)
    local newVisual = result:getVisual()
    newVisual:setTextureChoice(1)
    result:setTexture(pinkTex)
end

function Recipe.OnCreate.pickBagTextureGold(items, result, player)
    local newVisual = result:getVisual()
    newVisual:setTextureChoice(2)
    result:setTexture(goldTex)
end

function Recipe.OnCreate.pickBagTexturePurple(items, result, player)
    local newVisual = result:getVisual()
    newVisual:setTextureChoice(3)
    result:setTexture(purpleTex)
end
elfin stump
sly monolith
#

the mod itself loaded into the game, but when i tried crafting that bag it gave an error

elfin stump
#

Recipe.OnCreate.pickBagTextureRed are weird function names

crystal canyon
sly monolith
#

idk i had someone make that for me xd

elfin stump
#

PickBagTextureRed would be much better. but make sure to call it that way from your recipe.

open drum
#

or (craftRecipeData,character)

crystal canyon
elfin stump
fair elbow
finite scroll
#

does anyone know if there's a way to set a default display option for crafting recipes?

#

for example, my recipe uses any writing utensil, but currently the spiffo pen shows up as the default, which is just off-putting to me.

sly monolith
# elfin stump Yep, a couple things. You do not need the Recipe.OnCreate. prefix on your functi...

ok now i get this:

attempted index: getVisual of non-table: null

LOG  : General      f:3099, t:1734934281826> -----------------------------------------
STACK TRACE
-----------------------------------------
function: pickBagTexturePink -- file: bagstextureselector.lua line # 30 | MOD: NewBag
Callframe at: performCurrentRecipe
function: perform -- file: ISHandcraftAction.lua line # 158 | Vanilla

ERROR: General      f:3099, t:1734934281827> ExceptionLogger.logException> Exception thrown

xd

elfin stump
#

One of the parts of your function was using the old result that was coming in, now this is a table with recipe info but I am not sure of the format

sly monolith
elfin stump
#

getVisual of non-table means that it did not have anything to call from

#

I am not sure what the format will look like but let me see what I can find out

sly monolith
# finite scroll ah, rip

oh wait maybe i'm making that up, it used to pick from all the available textures in the crafting window at random iirc, someone told me it's not possible to set a specific one for each recipe, tho how would i know xd

finite scroll
#

it's def being consistent

#

it seems to be slightly based off the order of the tags

elfin stump
finite scroll
#

but like you can't control what item of the tag comes first

#

and so can't control what item is shown

autumn temple
#

I used to have custom animations that I would have play by using the EatType but they dont seem to work anymore. Did they change how these conditions work?

sly monolith
elfin stump
finite scroll
#

also does anyone know why we can't rip socks anymore?

#

is that a bug?

autumn temple
#

nah nvm

#

dead end

finite scroll
fair elbow
#

man it's pretty interesting reading the decompilation
you can kinda tell that certain features like animals were sorta grafted on in a hurry

autumn temple
fair elbow
#

Hi, anyone understand how the client and server interact? I'm trying to understand what the server handles and what the client handles and what should go under media/lua/client/ vs media/lua/server/

#

I assume the server handles chunk loading, item spawning, zombies in MP

elfin stump
#

It depends on what you are doing but generally if the player is triggering things and then affecting their inventory or stats that can be client and if you are doing things like spawning objects or things like world distributions or loading of cells etc then probably on the server, but it is PZ so you are going to see a lot of blurring over the lines.

finite scroll
fair elbow
pulsar pagoda
finite scroll
#

explains quite a bit

fair elbow
#

Actually it'd have to be server side nvm

finite scroll
#

i assumed it was like other things where the client can do whatever the hell it wants, but none of its real until server does it.

pulsar pagoda
elfin stump
fair elbow
#

I'm trying to figure out whether it's possible to mod something like roving hordes into MP with only lua, but I'm not sure how possible that will be. Afaik it looks like zombie spawning is done randomly on a per-chunk basis

finite scroll
#

idk if it’s the best way to go about it tho

elfin stump
fair elbow
#

Ohhh nice, I'll take a look thank you!

opaque ocean
#

I'm losing my mind over here. Anyone figure out how to add moveable tiles, then use those tiles in a recipe, or interact with the construction menu at all in b42?

autumn temple
#

@elfin stump I just got one of my animations to work.
This is the B41 condition
<m_Conditions>
<m_Name>PerformingAction</m_Name>
<m_Type>STRING</m_Type>
<m_StringValue>TestAnim</m_StringValue>
</m_Conditions>
To update it for B42 you change the m_Name to be FoodType not PerformingAction

fair elbow
elfin stump
autumn temple
#

there are several new food related conditions. but to make the animation work all you got to do is that simple name change for your animations xml

elfin stump
#

That is awesome!

autumn temple
#

now I just gotta figure out why my animation still wont play :D
doing that fixed one of the two that were broken. but ones still broken

bronze yoke
#

there are implications of very big changes from b41 in the vanilla lua

#

in b41 close to everything could be and often needed to be done on the client, it looks like far more will be done on the server, but for now, we don't have multiplayer so it doesn't matter

bronze yoke
#

it should be inside the clip block

fair elbow
paper steeple
#

Say I want to make my own vehicle mod, how would I go about doing that?

I know how to make 3D models and textures already, but is there any special oddity I need to know about for PZ? Any specific scaling in Blender, or rotation?

How would I make it compatible with the animated vehicles mod?

pulsar pagoda
bronze yoke
#

i think the distances are in squares and some people get confused - distance min is the distance at which audio begins to fall off, not the minimum distance you can hear it

#

you'd want your sound script to look something like this:```
sound MySound {
clip {
file = media/sound/MySound.ogg,
distanceMin = 10,
distanceMax = 50,
}
}

pulsar pagoda
#

awesome, thank you very much, i will try that out!

wind wasp
#

hi, can someone tell me what is wrong? I'm trying to publish build42 mod and I have the file as you see but game tells me I don't.

fair elbow
wind wasp
elfin stump
#

no problem!

pulsar pagoda
#

does anybody know why the sandbox options arent working? i put 100 in every option and i think its defaulting to the default option

autumn temple
wind wasp
elfin stump
pulsar pagoda
pulsar pagoda
elfin stump
#

Ahh, a couple of things. That is not a percent chance you are messing with is one.

#

It is a different value I forget exactly how it works. Are you checking the percent with lootzed?

#

run your game in debug mode. Then spawn a zombie with outfit set to "none" and kill them. Goto debug options, check LootZed, then goto where you can see their corpse inventory, right click on the icon of the dead zombie, select "LootZed" you will be able to see the percent of chacne of loot.

pulsar pagoda
#

ok i will try that out

#

so if its not a percentage what is it?

#

i always thought it was

#

thanks for your help!

elfin stump
#

It is something like an amount of rolls, I just remember that it ended up not being a real percent value, but you can see that real value from loot zed

pulsar pagoda
#

allright ill check it thanks :)

#

maybe ill just make it a bigger value like 1000 to guarantee it

elfin stump
# pulsar pagoda maybe ill just make it a bigger value like 1000 to guarantee it

Yeah, use lootzed and you can really hit it. However, there is another issue you may run into. Sometimes loot tables don't update based on the sandbox value and they will remain default no matter what, this could also be the case. You will not know for sure without lootzed. It is known and repeatible bug that has been here for a long time, but in B41 I couldn't get the devs to acknowledge it was happening! It is possible that it is still the case... if so you can prevent it by adding "ItemPickerJava.Parse()" at the end of your loot table entries.

bronze yoke
#

it's not exactly a bug, but

#

great news for you: they seem to have tried to change it and did it wrong

pulsar pagoda
bronze yoke
#

item picker now loads distributions immediately after sandbox options load, instead of a little bit before... however, as there are no events inbetween these two things happening, there is still no way to actually access and apply the sandbox options before the distributions are loaded

elfin stump
elfin stump
bronze yoke
#

they changed it in a way that actually changes literally nothing and you still have to do everything you used to

elfin stump
#

Me and another modder were able to confirm and repeat the behavior way back then but the devs were saying it wasn't happening and so we just solved it and tagged them and left it at that.

bronze yoke
#

internally technically different and you can see there was an attempt but in practice nothing changes

pulsar pagoda
#

so at 100 value its 40% chance

#

freaky

elfin stump
#

So I always thought it was a bug they didn't want to deal with, but that resolves it so as far as I know its resolved as long as you do that, it just isn't in any of their distribution examples.

elfin stump
pulsar pagoda
#

it seems that changing sandbox settings isnt making a difference, no. ill try that extra line then

elfin stump
elfin stump
pulsar pagoda
bronze yoke
#

pre distribution merge is too early to access sandbox variables

#

even with itempickerjava.parse() you'll only get default values

elfin stump
bronze yoke
#

move it to OnInitGlobalModData

elfin stump
#

Ah okay I see how I did this

#

Yeah Events.OnInitGlobalModData.Add(YOURFUNCTION)

pulsar pagoda
elfin stump
#

show the whole file plz

#

will be easier

pulsar pagoda
#

coming right up

elfin stump
#

There is event likely at the bottom that needs adjust

pulsar pagoda
elfin stump
#

albion caught that, ItemPickerJava.Parse() is the second part of a two part change

pulsar pagoda
pulsar pagoda
elfin stump
#

Change the last line to Events.OnInitGlobalModData.Add

#

Then goto line 24, hit enter so you above your last end

#

On that line add "ItemPickerJava.Parse()"

pulsar pagoda
#

like so?

elfin stump
#

.Add(preDistributionMerge)

pulsar pagoda
elfin stump
#

preDistributionMerge is your function name, You change that to something that makes more sense, as it doesn't have to do with that merge anymore. It just needs to be the same name as your function on line #1 as on line #27

#

Yes that will work

#

Function name can be changed for cosmetic purposes only but will work as is

pulsar pagoda
#

changed it here and here

#

i dont need a ; next to itempicker no?

elfin stump
#

; is optional in lua

pulsar pagoda
elfin stump
#

a gift they gave to people coming from C# I suppose

pulsar pagoda
elfin stump
#

and all the other ; languages

pulsar pagoda
#

ill try the settings now, ill report back

elfin stump
pulsar pagoda
#

i restarted the game, even made a new character

#

have them at 100 but the game still says 40 chance

#

change in in game with debug to 50 and it still says 40

elfin stump
#

Just asking cause I have done it myself a lot, did you save the file?

pulsar pagoda
#

i know debug option to modify sandbox settings is working too, i just put food lot to 0 and indeed theres no food loot

fluid current
#

might have to init even sooner

elfin stump
#

Additionally you can try changing your line 1 from "local function MapDistribution()" to this instead "local MapDistribution = function (newGame)"

pulsar pagoda
#

i trust you because i have no clue what im typing haha

elfin stump
#

That I believe will pass your new game when you load it into that function, or something like that, I forget. It forces the function to use a parameter I believe. It was many many many months ago that I dug into all this.

bronze yoke
#

that doesn't change anything

crystal canyon
#

for the person that was having problems with onCreate on the recipe, did you fix it?

bronze yoke
#

they're two different ways of writing the same thing (mostly)

pulsar pagoda
fluid current
bronze yoke
#
local function foo() end
-- is technically equivalent to:
local foo
foo = function() end
```but this difference rarely matters
fluid current
elfin stump
#

It is possible that it is working and you are hitting max limits, why don't you try setting your number down to something very low, like 0.1? Change your integer to a double and try that. I think maybe the numbers in the distribution are supposed to be tiny.

bronze yoke
#

if you try to call the function recursively in a function defined with local foo = function() end it will error because there is no local foo yet, otherwise there is no difference

fluid current
#

also isnt it supposed to be a float not an int

elfin stump
#

So essentially that packs the function into a variable and then calling that variable just calls the function?

pulsar pagoda
#

nope still 40

fluid current
#

you have integer in your options file

bronze yoke
#

distribution numbers are supposed to be big

#

they're usually pretty low because you actually don't want high spawn chances for most things but the scale is technically something like 0-250

pulsar pagoda
crystal canyon
#

halp!

        timedAction = SewingCloth,
        Time = 50,
        xpAward = Tailoring:10,
        SkillRequired = Tailoring:3,
        AllowBatchCraft = False,
        Tags = AnySurfaceCraft,
        category = Tailoring,
        inputs
        {
            item 1 [Base.FabricRollGrey],
            item 1 [Base.FabricRoll],
            item 1 [Base.Thread],
            item 1 tags[SewingNeedle] mode:keep,
        }
        outputs
        {
            item 1 Base.Dress_LacedRed,
        }
        onCreate = DyeClothingGrey,
    }


function DyeClothingGrey(recipeInfo, player)
    local result = recipeInfo:getResult()
    result:getVisual():setTextureChoice(4)
    result:synchWithVisual()
end

I get error

pulsar pagoda
#

just checked

elfin stump
elfin stump
#

i dont know if we can use float, I think you are thinking of double

pulsar pagoda
# elfin stump Can you please provide the actual distribution file you are using?

local MapDistribution = function (newGame)
table.insert(ProceduralDistributions.list.MagazineRackMaps.items, "LouisvilleAndKnoxCountryMap");
table.insert(ProceduralDistributions.list.MagazineRackMaps.items,(SandboxVars.LVAKCM.SpawninMagazineRacks));

table.insert(ProceduralDistributions.list.CrateMaps.items, "LouisvilleAndKnoxCountryMap");
table.insert(ProceduralDistributions.list.CrateMaps.items,(SandboxVars.LVAKCM.SpawninCrateMaps));

table.insert(ProceduralDistributions.list.CrateMechanics.items, "LouisvilleAndKnoxCountryMap");
table.insert(ProceduralDistributions.list.CrateMechanics.items,(SandboxVars.LVAKCM.SpawninCrateMechanics));

table.insert(ProceduralDistributions.list.GasStorageMechanics, "LouisvilleAndKnoxCountryMap");
table.insert(ProceduralDistributions.list.GasStorageMechanics.items,(SandboxVars.LVAKCM.SpawninGasStorageMechanics));

table.insert(ProceduralDistributions.list.Hiker, "LouisvilleAndKnoxCountryMap");
table.insert(ProceduralDistributions.list.Hiker, (SandboxVars.LVAKCM.SpawninHiker));

table.insert(ProceduralDistributions.list.StoreShelfMechanics, "LouisvilleAndKnoxCountryMap");
table.insert(ProceduralDistributions.list.StoreShelfMechanics.items,(SandboxVars.LVAKCM.SpawninStoreShelfMechanics));

table.insert(SuburbsDistributions["all"]["inventorymale"].items, "LouisvilleAndKnoxCountryMap");
table.insert(SuburbsDistributions["all"]["inventorymale"].items,(SandboxVars.LVAKCM.SpawninMaleAndFemaleZombie)); 

table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "LouisvilleAndKnoxCountryMap");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items,(SandboxVars.LVAKCM.SpawninMaleAndFemaleZombie));
ItemPickerJava.Parse()

end
Events.OnInitGlobalModData.Add(MapDistribution);

elfin stump
#

Thanks let me run a test on my end.

pulsar pagoda
#

allright, thank you!

fluid current
#

yeah double then

#

how did i forget double existed

sly monolith
elfin stump
#

Anyone have any good tools for encoding to Cyrillic, my notepad++ files are coming out wonky in Windows-1251

elfin stump
sly monolith
#

you're my hero m8 πŸ˜„

elfin stump
#

but I am not sure how to grab the actual results. The main change is that old recipes only output one item, and the new ones outbook a whole story.

bronze yoke
#

yeah this is the object they pass, i didn't document it because i don't really know what it is yet

elfin stump
#

K I will keep digging, I think getToOutputItems() is the way to the items

fluid current
#

found this

#

not implemented

#

might be unrelated tho

bronze yoke
#

i see getFirstCreatedItem() that returns an InventoryItem and getAllCreatedItems() that returns an arraylist of them, maybe we can just assume these are already stored there?

elfin stump
#

nice!

bronze yoke
#

can't be sure they won't just return null/empty though (thanks java)

#

i imagine they must be created at least by the time of OnCreate or else the event wouldn't be terribly useful

fluid current
#

im imagining that it just creates the item first and then deletes the ingredients afterwards?

elfin stump
#

Yeah I think they get passed from OnCreates call

#

I got this out of the lua, its the same thing as your java doc, so I can just keep digging in:

elfin stump
#

local MapDistribution = function (newGame)
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "TESTOBJECT");
table.insert(SuburbsDistributions["all"]["inventorymale"].items,(SandboxVars.TESTPLATFORM.CHANCE));

table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "TESTOBJECT");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items,(SandboxVars.TESTPLATFORM.CHANCE));
ItemPickerJava.Parse()

end
Events.OnInitGlobalModData.Add(MapDistribution);

#

Going to do a hi/lo test now and see what I get.

bronze yoke
#

i've heard of people running into lower limits though i'm honestly really sceptical, at least of the reasoning they gave

elfin stump
#

Ahh I am remember something funny about it now

#

It wraps, I forgot about that, if you put too high a number, the chances go down, and too low, they go up, I never could understand the pattern. Definitely seeing feedback from sandbox tho.

#

A hardcoded "10000000000000000000000000000000000" gives you a 2 percent chance

#

A hardcoded "100" gives you 20%

elfin stump
# pulsar pagoda allright, thank you!

Okay I found that sandbox is updating fine. I am not sure on your end what your test cycle is but that had no issues for me. You may want to make sure you are testing the right sandbox value. I could quit to menu and come in and see changes right away. However, your range is low, you have 0-100 and that never gets you close to 100%. Looks like 100% spawn chance is if you set that number to 500, and if you go to 1000 that brings it to 200% chance, which I am not sure what that means, but it didn't spawn two. So try those ones πŸ™‚ Good luck!

karmic violet
storm pecan
#

does anyone know if body pickup/drag animation speed depends on some stat?
cuz by default this animation speed set to 0.8

#

and it painfully slow

#

I bumped it to 1.0

#

but I wonder if there is some proper way to speed it up that I'm not aware of

little harbor
#

Has anyone managed to make their own workbench yet? Like a forge with specific recipes tagged for it. I managed to make the thing but I can't get it to recognize the recipes despite tagging them the same as the vanilla workbenches.

tranquil reef
#

How do I make headers in sandbox options

ancient grail
#

wait your telling people to make updates for other peoples mod?

silent zealot
#

I'm suggesting that trying the easy way of making a personal B42 version is better than posting "B42 UPDATE PLZ!" on the mods you want.

ancient grail
#

i see

tranquil reef
#

Nothing wrong with doing that unless you repost the mod and, or even then that's not horrible if you don't refuse to take it down once the actual mod updates / ask permission first

silent zealot
#

I'm not advocating uploading those mods to the workshop - IMO it's too early for "author has abandoned this mod" unless they actually say they abandoned it.

#

But like you say, even that is not a huge deal provided you give credit and make it clear you'll take down your temporary version.

latent fractal
#

<?xml version="1.0" encoding="utf-8"?> <animNode> <m_Name>vdefault</m_Name> <m_AnimName>Bob_SatChairIn</m_AnimName> <m_Looped>false</m_Looped> <m_UpperOnly>false</m_UpperOnly> <m_EarlyBlendOut>false</m_EarlyBlendOut> <m_SpeedScale>1.0</m_SpeedScale> <m_BlendTime>0.20</m_BlendTime> <m_Conditions> <m_Name>walkinjury</m_Name> <m_Type>NEQ</m_Type> <m_FloatValue>0</m_FloatValue> </m_Conditions> <m_Events> <m_EventName>SetVariable</m_EventName> <m_Time>Start</m_Time> <m_ParameterValue>SpeedScale=0.6</m_ParameterValue> <m_ParameterValue>BlendTime=0.4</m_ParameterValue> </m_Events> <m_Events> <m_EventName>SetVariable</m_EventName> <m_Time>Start</m_Time> <m_ParameterValue>SpeedScale=1.0</m_ParameterValue> <m_ParameterValue>BlendTime=0.2</m_ParameterValue> </m_Events> <m_Events> <m_EventName>SetVariable</m_EventName> <m_Time>End</m_Time> <m_ParameterValue>EnterAnimationFinished=true</m_ParameterValue> </m_Events> </animNode>
trying to add condition check to enter xml to check for walkinjury similar to running shifting to idle, but just slow the time taken to perform action down. Having issue implementing correctly. Currently just keeps a progress bar above charcters head and doesnt complete animation

ancient grail
#

just a friendly advice hope you dont get offended by this

ancient grail
latent fractal
ancient grail
#

that works faster

elfin stump
#

Anyone have any good tools, docs, or info for translating and encoding in Cyrillic? I need to find a good method where my encoding doesn't break.

merry grove
#

Does anyone know where
applyWeightFromTraits
Is used?

latent fractal
merry grove
#

I want to also add my own weight stuff

#

But can't find this thing

#

Same with applyTraitFromWeight

edgy spear
#

Does anyone have a idea what's reverting fullscreen resolutions lower than 1200px width back to a 1200px?

#

It gets weirder since when i launch my game with batch on pz root directory, it doesn't triggers at all on any occasions
But when i launch the game through exe or steam library, it triggers

tranquil reef
#

Can't find anything to look into to find out if sandbox headers are possible cowboy_sad

ancient grail
ancient grail
elfin stump
winter bolt
latent fractal
# ancient grail dw ill try and help you on this one

I want to trigger a check for when you enter a car, for walkinjury, and if one exist, slow down the process of getting into a car. same with exiting.
got the idea from looking at the sneakrun and run code that included that condition check in b42 now

ancient grail
# merry grove Same with applyTraitFromWeight

you want to add trait when player is of a certain weight?
probably use event like every hour
then check for weight
then add the trait
if player doesnt have it yet
use
else remove the trait if player has trait

elfin stump
tranquil reef
ancient grail
merry grove
ancient grail
#
  • checker function to check if player has the trait
  • add trait to player
  • remove trait
  • the every hour event

do you have these codes already?

im using mobile
i could have just pasted these codes if i was in front of my workstation

#

you know the UI for admin that allows you to custom add trait to players?

you will find the codes from that lua

merry grove
#

you mean this

ancient grail
# merry grove Also how would I remove the og traits?

og trait you mean the overweight for example?

hmm that might be an issue if you want to completely remove that trait cuz it gets auto added when sync weight is triggered

you could maybe hook on the syncweight trigger and remove the trait before it sends the sync maybe

ancient grail
vague marsh
#

can i still use RemoveResultItem:true,?

elfin stump
ancient grail
#

i wish someone upload a public repo containing the b42 lua
(with proper credit to tis and disclaimer and what not)

vague marsh
elfin stump
#

To achieve that you will now just not have an output.

elfin stump
#

Recipe format is new and overhauled, should search back and find examples

opaque ocean
#

Why can't I set a container's capacity beyond 100, and how do I do it anyways?

ancient grail
vague marsh
vague marsh
little harbor
#

make your own private github repo I wont tell on you

ancient grail
elfin stump
# vague marsh ill just do this

In the new format that is, you don't get a choice, overhauled completely in B42. Let me send you an example you can start with.

#

craftRecipe InjectGlobunexIntoSelf
{
timedAction = CDCRR.Injecting,
Time = 60,
OnCreate = CDCRR_Globunex,
category = Health,
Tags = InHandCraft,
inputs
{
item 1 [Base.RubberBand] mode:keep,
item 1 [CDCRR.Globunex_Syrette] mode:keep,
item 1 [Base.AlcoholWipes;Base.AlcoholedCottonBalls] mode:keep mappers[OutputMapper],
}
outputs
{
item 1 CDCRR.SpentSyrette,
}
itemMapper OutputMapper
{
Base.AlcoholWipes = Base.AlcoholWipes,
Base.AlcoholedCottonBalls = Base.AlcoholedCottonBalls,
}
}

#

There is an example of the new recipe system for you, let me know if you have questions.

ancient grail
little harbor
#

sometimes you want the same output as input while having different possible inputs

opaque ocean
#

can already confirm, base. and module. aren't needed, never have been.

#

no clue why they're all over the place in source

latent fractal
merry grove
#

So like TraitFactory.Reset but only for one trait

elfin stump
ancient grail
elfin stump
#

The = character is an odd choice maybe

ancient grail
elfin stump
#

Yeah its a key value pair really

merry grove
#

Also there is thoes
applyTraitFromWeight
applyWeightFromTraits

#

That are in Nutrition

#

Can I use thoes somehow ?

latent fractal
ancient grail
vague marsh
#

is 'mode:destroy' valid?

#

oh nvm i found it, it isπŸ˜…

elfin stump
tranquil reef
#

Wait, does the game actually register .class files added into a zombie folder in a mod?

#

Apparently the npc mods do that, so why do some make you manually replace files if you can directly edit game code with workshop mods?

latent fractal
ancient grail
#
local function isInjuredCheckerFunction()
 return --add injure checker code
end

local hook = ISEnterVehicle.update
function ISEnterVehicle:update()
   
  if isInjuredCheckerFunction() then
  --your setvar code
  end 
      hook()
        
        
 
end
dull moss
#

I'm a bit confused, PZ says I'm missing mod.info file?
When trying to upload on workshop. In-game it works

ancient grail
ancient grail
#

oh sorry 4 wtf

dull moss
#

in root folder media is b41

ancient grail
#

so we duplicate everything? is that it?

dull moss
#

other media is common and b42

#

if u want to have same workshop page for b42 and b41 yes

ancient grail
#

im hating this rn

dull moss
#

yep

#

the moment b42 is stable im deleting b41 files and putting them as separate legacy mod

#

if i can't have b41 folder to use new mod structure then im not gonna have b41 folder

ancient grail
#

this is so messed up
i wonder what authentic peach think about this

elfin stump
ancient grail
#

cuz he does his big mod on a single upload with variations to modid

and thats already making em duplicate models and stuff
now he has to re duplicate it again

dull moss
#

I am confus

elfin stump
#

It looks like your mod has two mods in it?

dull moss
#

yes but other one is b41 only

#

for now

#

it doesnt have b42 folder

elfin stump
#

I think that is your issue

dull moss
#

it's a seprate submod

elfin stump
#

does it have a separate workshop id?

dull moss
#

no? workshop id is the same, modid is different

#

thats how you do mod with submods

ancient grail
#

i wish theres a better way to do this or atleast additional method
such as adding a line on top of files stating if its for both version or just 1 of em

dull moss
#
url=https://steamcommunity.com/sharedfiles/filedetails/?id=2914075159
id=EvolvingTraitsWorldMarkDynamicTraits
poster=poster.png
icon=icon.png
versionMin=41.78
modversion=1.0.2
description=Marks traits that can be lost/earned with (D). (P/D) means that they are permanent if picked in character creation, but if not picked they are dynamic and obtainable/losable during the game. Includes support for popular mods. Does not require main mod to be ran, can be run independently.
description= <LINE>
description= <LINE> Supported mods:
description= <LINE> - Evolving Traits World (ETW)
description= <LINE> - Explorer Trait
description= <LINE> - Dynamic Traits (DT)
description= <LINE> - More Simple Traits (MST)
description= <LINE> - More Traits
description= <LINE> - Simple Overhaul: Traits and Occupations (SOTO)
description= <LINE> - SixthSense
authors=MusicManiac```
ancient grail
#

like
ver {41,42}
for scripts

and maybe

if pzVer() > 41 then return end
elfin stump
#

hmm yeah

dull moss
#

idk about scripts

#

but pretty sure you can fetch pz ver in lua

ancient grail
dull moss
#

cuz i saw it in one of lua files

#

yep

ancient grail
#

this is gona bloat servers

dull moss
#

a lil bit, modders supposed to put media in common now

ancient grail
#

even if they dont need the 42 versions
its still there when the server mods updates

dull moss
#

do you'll be bloating few lua files

#

oh ye

ancient grail
#

lua and scripts isnt heavy

but mods with assets

ancient grail
#

thats gota suck right?
esp for weapon/clothing packs i guess

ancient grail
dull moss
#

yep

#

and all is in line with how it should be according to it

#

except maybe mod.info in common which is already gone

ancient grail
#

maybe

elfin stump
#

Id recommend checking for an existing B42 mod that has submods in it as an example, trying to B42 format in the submod maybe, or removing the submod temporarily to at least id if that is causing it. That is the only part that looks odd to me but I haven't done a submod or uploaded a submod in this new version format.

ancient grail
#

and another issue i believe servers will face is that they need to re sub some mods since i bet there are files that gets deleted
and so there will be mismatch

i guess

latent fractal
# ancient grail actually i thought there was a time for the enter timed action but since there i...

Events.OnEnterVehicle.Add(function(character)
local walkInjury = character:getModData().walkinjury
if walkInjury and walkInjury > 0 then
character:SetVariable("SpeedScale", 0.25) -- 4x slower for testing
character:SetVariable("BlendTime", 0.8) -- Slower blend time
print("Foot injury detected! Slowing down vehicle entry action.")
else
character:SetVariable("SpeedScale", 1.0)
character:SetVariable("BlendTime", 0.2)
end
end)
like so or similar?

elfin stump
#

It could be that they did not plan for a mod that has a submod only on the one version, maybe it looks for the b42 version of the submod since it is running the b42 of the main mod that has the workshop id.

ancient grail
ancient grail
#

you should clone the xml
and replace that speed with your own variable

SetVariable("yourSpeedVar", value)

willow briar
#

Has anyone got an idea on why this is happening. Could it be bcs of me removing the reanimted Corpse/IsoZombie from the world? But why wouldnt it reanimate the dropped corpse

ancient grail
#
ο»Ώ<?xml version="1.0" encoding="utf-8"?>
<animNode>
    <m_Name>injuredEnterVehicle</m_Name>
    <m_AnimName>Bob_SatChairIn</m_AnimName>

    
    <m_Conditions>
        <m_Name>yourCheckVar</m_Name>
        <m_Type>BOOL</m_Type>
        <m_BoolValue>true</m_BoolValue>
    </m_Conditions>

    <m_Looped>false</m_Looped>
    <m_UpperOnly>false</m_UpperOnly>
    <m_EarlyBlendOut>false</m_EarlyBlendOut>
    <m_SpeedScale>yourSpeedVar</m_SpeedScale>
    <m_BlendTime>0.20</m_BlendTime>
    <m_Scalar></m_Scalar>
    <m_Scalar2></m_Scalar2>
    <m_Events>
        <m_EventName>SetVariable</m_EventName>
        <m_Time>End</m_Time>
        <m_ParameterValue>EnterAnimationFinished=true</m_ParameterValue>
    </m_Events>
</animNode>
character:SetVariable("yourSpeedVar", value)

character:SetVariable("yourCheckVar", value)
#

the f is wrong with my codeblock
(using mobile)

whatever

willow briar
stark cape
#

Hey, everyone, question on controllers. I've done a mod which adds a button to inventory bar (like "take all") but it's invisible for controller users. I tested myself on controller and it seems that one cannot even focus on bar buttons, so controllers utilize context menus for actions on inventory. Is that correct?

ancient grail
willow briar
#

The game does it automatically. Basically when you pick up an zombie it revives it for the animation

ancient grail
willow briar
stark cape
willow briar
#

I reenabled the corpse item in the inventory so transfering would work

#

And to keep the corpse from duplicating i have to delete one, which would be the grappled zombie in the game world.

#

So when i transfer a corpse into a container, the grappled zombie is retrieved and then deleted, aswell as instantly put down (Just like it does when you run, fall or get attacked when grappling a corpse)

#

But when you drop the corpse item from container or inventory and try to grapple it again, i believe cannot be revived

#

Since its not being rendered and when put down, theres nothing on the floor

ancient grail
#

@willow briar
maybe theres a variable somewhere else maybe java?
try inspecting the data using the community mod tool

#

that way you get to figure out what changes did the normal one has that the bugged one doesnt

willow briar
#

im looking thru java, but its kinda hard to debug that

ancient grail
#

have you gotten the community tool installed and running?

#

if you do then
check the data from 2 different corpses maybe (or just 1, its up to you)
the regular one and the odd one

#

also do you really need to the instance?

willow briar
#

I dont think i have it

#

on the workshop?

#

Im checking them out now

willow briar
#

gonna check it out now. Thanks

ancient grail
#

tbh i have my own fork version from the OG mod by aiteron so im not sure how to use the inspector for that version

but i believe its as simple as right clicking the object

ancient grail
#

if there are any modders who has a better suggestion for Bunneh feel free to add input
cuz mine will only lead to them POSSIBLY identify the difference
but its not a guaranteed method and could end up lacking a solution (depends on what we discover)
cuz it could ve caused by something else entirely and its not really related to the object

thick karma
thick karma
#

We don't use the hotbar buttons. In B41 I added shortcuts for sorting using controller buttons since we cannot click headers to sort.

thick karma
#

Been playing random games instead for the most part

willow briar
#

Only significant change apart from ID is that the grappable Zombie has an AnimationPlayer attached

#

but the variable only gets set on construction and is not used again

#

reviving creates a new isozombie and copies data from the corpse

dull moss
#

so what's up with this:

#

I see ppl updating the mods to b42 and some are using new format and some are not

#

both working

#

so whats the point

#

@tame mulch pinged (sorry pat )

tame mulch
#

I will check, thanks for report!

tranquil reef
#

Any way to make a sound play on an entity like the player?

#

As in the sound moves along with the player

latent fractal
# ancient grail updated this <@534509498837106688>

noted just aggressively testing. Just running into issues after issues that seem to take me further away from the goal. Going this route caused issues recognizing walkinjury, and seems to touch some other luas in the process, now unable to enter car, or simulate walkinjury without error

#

trying to think of other behaviors in game that may be a base point jump off for what my silly little head is trying to do. vanilla wise

iron siren
#

Not yet... Albion said it is not possible in B41, and probably not possible in B42, but I will continue to investigate to at least understand how the shaders work in PZ

pulsar pagoda
elfin stump
pulsar pagoda
#

hello there, im new to the community aswell, welcome :)

pulsar pagoda
#

i put it to 500 tho, not 1000, still 200 like you said, odd

elfin stump
# pulsar pagoda i put it to 500 tho, not 1000, still 200 like you said, odd

The numbers are a bit weird I do not understand exactly how they get to the result. You may want to play around with it a bit. Just know it acts weird at extremes. A very big number can cause it to generate small amounts and a very low number can cause it to go back up. Find your range you like and then lock it in to prevent that. It is odd to be so different, I was hitting 200% with 1000 on the non-outfit zeds.

#

For your case of wanting more drops you should see things work nice, it tends to be hard to make ultra rare drops using this system from my experience.

#

Oh no. It is day time. Goodbye Spiggo

pulsar pagoda
umbral ingot
#

Okay guys been at it for a few hours now and can't figure it out lol. I have mod folder properly set up in C:/USER/Zomboid/mods/MYMOD with mod.info following the example on the Wiki. I have -debug -nosteam -modfolders mods as my launch options. I have some dummy item .txt files in scripts following wiki example but I can't get my mod to show up in mod list. Can't find a google solution either. Anyone know whats up?

dawn sparrow
#

Is there a seperate lua file where languages are defined?

#

Like lets say... if I wanted to bring an entirely new language into the game.

tacit mauve
#

Er, assuming you are porting to 42

umbral ingot
tacit mauve
#

Oh, in that case I wouldn't be any help, I'm sorry.

umbral ingot
#

Thanks anyways!

pulsar pagoda
#

and i think a media folder in 42 aswell

#

you dont need workshop structure, only "mod name" in belle's diagram

#

for local mods

vague marsh
#

oop wrong channel

vague marsh
#

how can i display itemID? i want to put it beside the item name

self:drawText(self.invItem:getName(), (self.width * 0.05) + crucibleCore.scale(self.panel.width, 0.05), (self.height - self.fontHgt) / 2, 1, 1, 1, 1, UIFont.Small)

I tried this and didnt workπŸ˜…

self:drawText(self.invItem:getName() .. " (" .. self.item:getFullType() .. ")", (self.width * 0.05) + crucibleCore.scale(self.panel.width, 0.05), (self.height - self.fontHgt) / 2, 1, 1, 1, 1, UIFont.Small)
honest musk
#

Is there a way to debug why this recipe I'm working on doesn't seem to be loading in correctly?

I've got it enabled in the mod manager, and have had errors related to the .lua scripts (that I've now fixed) so it's definitely trying to load in. I've added a modified recipe in /media/scripts/recipes/CutFishFillets_Recipe

The OnCreate and OnTest script are defined in media/lua/client CutFishFillets.lua

recipe:

module CutFishFillets {

imports
{
    Base
}

craftRecipe SliceFilletSmaller
{
    timedAction = SliceMeat_Surface,
    Time = 20,
    OnCreate = CutFilletSmaller,
    OnTest = CutFilletSmallerTest,
    Tags = AnySurfaceCraft;Cooking,
    category = Cooking,
    xpAward = Cooking:10,
    inputs
    {
        item 1 tags[SharpKnife;MeatCleaver] mode:keep flags[MayDegradeLight;IsNotDull;SharpnessCheck],
        item 1 [Base.FishFillet] flags[InheritFoodAge],
    }
    outputs
    {
        item 2 Base.FishFillet,
    }
}

}

I can't see it in game or in the debug script manager or Craft Recipes debug menu..

pulsar pagoda
#

maybe you can use the error magnifier mod?

honest musk
#

Ok so after like an hour of beating my head against this I've just realised that when I created the file Windows hides the extensions for .txt files. This is normally fine, unless you're an idiot like me and accidentally deleted the extension entirely, which is why the file wasn't being loaded. Changing it back to a .txt fixed this.

ancient grail
willow briar
#

I already debugged it a bit

#

and reanimate doesnt work on dropped bodies

#

So im trying a work around

ancient grail
little harbor
#

I TRIED EVERYTHING

#

At least its a good learning experience

ancient grail
#

3 days will drive me crazy i bet

little harbor
#

No wonder the recipes for the workbench I was making didnt show up

#

I've scoured the java code, lua code and all the scripts for some kind of secret definition of workbench craftRecipe tags

#

Turns out I was the problem

mint hawk
#

How can I go about overwriting vanilla crafting recipes?

little harbor
#

Honestly though If you do find out, hit me up I wish I knew how to override them

mint hawk
#

Gahhhh that makes this annoying then. I'll have to duplicate all 4 of the crafting recipes just to fix them...

#

I tried copying the entire recipe text file, lets see if it overrides it or if I end up with 2 of each recipe drunk

#

overwriting stuff gets... Weird.

#

It sort of worked? But it duplicated the requirements and outpuit lol

#

Why are my translation files not working cold

crystal canyon
#

human error?

pulsar pagoda
#

hi, is anybody getting sound from eating in b42?

#

also from having a cold and coughing?

gaunt storm
#

Hi guys! I need create a new ocupation for B42, and need a guide, please helpme!

fair elbow
willow briar
#

Btw guys got it working.

#

Its a big workaround

#

but i should get it finished soon

white flame
#

Hello there, having issue with the OutfitManager in clothing.xml, the vanilla clothing which i specified in outfit works fine, but my modded clothes are not showing on the zeds, which is strange, because the clothes worked fine for the player, and i downt know why this is happening, seeking for help
below i provided screenshots of clothing.xml and guuid tables

tranquil kindle
#

Because right now i see you created outfit, but now you have it actually be asigned to spawn

#

Or do you spawn zombie, but they're naked?

white flame
#

yes i made one

white flame
tranquil kindle
#

B41 or B42?

white flame
#

b42

tranquil kindle
#

Are clothes and zombie outfit in same mod or they're in separate ones?

white flame
#

same

tranquil kindle
#

Do those clothes work on player character?

white flame
#

yup

#

cap and tshirt from my mod, next to player is zed with the outfit i made

winter bolt
#

thats weird usually its the other way around

white flame
#

yeah

tranquil kindle
#

Can you paste your XML instead of sceenshots?

white flame
#

the clothing.xml one?

tranquil kindle
#

Both

#

Fileguid and Clothingxml

#

Wait

#

Are those tshirts?

white flame
#

yeah, tshirt and a cap

tranquil kindle
#

<m_Top>false</m_Top>
<m_Pants>false</m_Pants>

#

change it to true?

white flame
#

huh

tranquil kindle
#

in Outfitmanage

#

Clothing*

#

I mean, you want zombie to spawn with shirt, but i think Top might also mean Shirt, which is 2d painted on body?

#

Because apart from that i can't see any issue.

white flame
#

oh

#

nah, not worked

#

oh wait

tranquil kindle
#

Did you restart game? I know XMLS load as game goes, but maybe outfit thing does not work exacly?

white flame
#

i enabled tint, wrong line

tranquil kindle
white flame
#

cap too

tranquil kindle
#

What are those "Subitems" on Pants part in Clothing?

#

I can't really show exacly what i mean since its screenshot, not text

#

Also question. I hope youre not both editing it locally and are subscribed to mod on steam workshop?

white flame
tranquil kindle
#

<@&671452400221159444>

tranquil kindle
#

Can you copy/paste clothing xml, it might help

white flame
#

yeah one aec

tranquil kindle
#

I feel like we're missing something small and i can't quite nail it

white flame
sonic needle
#

@smoky tendon mods. being slow.

#

spam above.

white flame
#

oh

#

it was too long and discord send it as txt

tranquil kindle
#

Don't worry

#

I honestly have no idea

sonic needle
#

it urks me that is still there. dear lord

tranquil kindle
#

If it would not work on player character i'd think that was somerthing wrong with clothing items, but it works, so i'm not sure anymore

#

There seems to be no spelling errors too, vanila clothes appear...

#

Your outfit for sure uses new guid?

white flame
#

yup

sonic needle
#

both male and female outfit share the same one. which will conflict

white flame
sonic needle
#

golden rule of GUID.
new one, every time. regardless

white flame
tranquil kindle
#

For female and male

sonic needle
#

i genuinely, always adhere to new guid, every time

tranquil kindle
#

If its same outfit same name same clothes, then guid can be same.

sonic needle
#

its good practice.. like cleaning a knife before prepping food

white flame
tranquil kindle
#

I wish i could help, but from what you've shown it should work

bronze yoke
#

actually, outfit guids don't matter at all

#

the game doesn't even read them

white flame
#

It looks like I'll just do with loot distributions

#

I find it funny that when I looked at the answers to my problem, vanilla clothes usually didn't appear, but for me it's the complete opposite

#

but anyway thanks once more

tranquil kindle
#

If you have both vanila and your clothes that you want on zombies in guidtable too, it should work.

white flame
#

which is my problem yeah

winter bolt
tranquil kindle
#

Do you have any other clothing item that is 3d modeled and see if it works?

winter bolt
#

is there even an actual reason why items need guids in the first place

#

it seems completely pointless

bronze yoke
#

not really, but those are at least used

winter bolt
#

the guid needs to refer to the xml file so uniqueness doesnt matter

#

and the item scripts refer to the xml file name

bronze yoke
#

the way the game loads clothing is:

  • loop through all items, for every item that has a clothing item:
  • use the filename in the item script to get the guid
  • use the guid to get the filename again???
  • load it
white flame
#

but the cap uses vanilla model which loads from the game i guess?

bronze yoke
#

outfits do use the guid but since everything is bottlenecked by filename at the item script point it doesn't really matter

winter bolt
#

pretty much the only thing the guids achieve is making zombie outfits a total nightmare to work with

white flame
tranquil kindle
#

I literally have no idea why it does not work...

#

and its driving me nuts

winter bolt
#

if you add comments labelling every item you add then its manageable but its still tedious

bronze yoke
#

also iirc the guid in the actual clothing file is read but not actually used for anything, only the one in the file guid table matters

white flame
bronze yoke
winter bolt
#

honestly even just a script that could convert guids to the xml names and then back would be lifesaving

bright fog
#

Modding Discord, you can make commissions

median karma
bright fog
#

bruh

queen oasis
#

in timed actions, waitToStart does exactly what it says, correct? It waits to start the action until whatever check is false

bright fog
drifting ore
#

I really miss armored cars

candid egret
tranquil reef
#

Can a timed action happen without being in the queue? So like, a progress bar raising for 5 minutes, but if you right click on a chair and sit you can still do that and it still functions?

worthy sparrow
# opaque ocean I'm losing my mind over here. Anyone figure out how to add moveable tiles, then ...

Pretty late response, if you didn't figure that out by now, you have to add IsMoveAble to a tile's property list, if it's a custom tile then you can do that in TileZed or if its already existing one you can do that in lua like so:

  MyMod.loadedTiles = function(_spriteManager){
    local properties = _spriteManager:getSprite("mysprite_01_02"):getProperties()
    properties:Set("IsMoveAble","", true)
    properties:Set("PickUpWeight", "50") -- Encumbrance = 5.0
    -- ...
    properties:CreateKeySet()
  }

  Events.OnLoadedTileDefinitions.Add(MyMod.loadedTiles)  

Idk if thats the best solution for this but works mostly for what I need.

queen oasis
#

you could probably grab the queue, stop the current action, add your sit action and then re-add the queue

bright fog
gaunt storm
#

How about a community, who could create this profession? I'm too slow to do it myself... I'm not interested in credits, I just want to play with a profession like this

New profession:

Tailor: Expert in clothing and scissors repair

Special skills:
Tailor: The clothes you wear will not limit your movement/attack speed. You get wet 25% slower in the rain
Scissors Expert: Attack 25% faster with knives and scissors

Starting skills:
Short Blade Weapon 1 + 100% xp
Maintenance 1 + 100% xp
Tailoring 2 + 100% xp

Point cost -4

gaunt storm
bright fog
gaunt storm
#

OMG Thanks!

ashen flower
#

Is there a way either via a mod or debug mode to turn electricity and power back on after the shutdown? I was unaware that plumbing is not working in build 42

bleak lantern
#

Please forgive my lack of technical speaking, i don't do this. I just want to try and get a simple mod I made back into working order for B42#

#

the image referencing "event" is from the new script format in b42

tulip valve
#

Is anyone working on a mod that disables Discomfort moodle?

bleak lantern
#

where can i find these event files? before would simply be a matter of changing the file directory but that is no longer the case

#

all i want to do is change a sound, namely the death music

mellow frigate
median karma
#

hey, im trying to get into modding for the first time, already read a few tutorials how to create mod, but im stuck at finding how to change options for world models like friedges, counters etc.. i dod for example look for example for files containing the word "furniture_shelving_01_27" in C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\scripts but no luck, anyone could hint a direction?

bronze yoke
#

sound scripts haven't been changed at all, you don't need to do anything to make that work in b42

tulip valve
mellow frigate
finite scroll
tulip valve
#

Yes but in b42 there is a new discomfort moodle That starts to show up when you wear armor, annoying

eager imp
#

you want to disable discomfort stat, not the discomfort moodle. if such a mod exists you can find it on the steam workshop

crystal canyon
#

do fbx models need to be updated?

tranquil kindle
#

They might require Triangulation for B42

#

in some cases

winter bolt
#

they fixed the rendering bug in a patch so they should be fine

tranquil kindle
#

Some of my models still had holes, even after patch + making normalization

#

But triangulating then fixed it

#

I don't know why. It just did

winter bolt
#

i guess they must have missed a triangulation setting as well then

crystal canyon
#

WARN : General f:9204, t:1734982988265> MeshAssetManager.loadCallback > Failed to load asset: AssetPath{ "FlashLight7" }
WARN : Script f:0, t:1734982801621> ModelScript.check > no such model "???.FlashLight7" for Base.Torch7
WARN : Script f:0, t:1734982801621> ModelScript.check > no such model "???.FlashLight7Ground" for Base.Torch7

i might need to fix the script then

winter bolt
#

i'll have to test and then make a report

tranquil kindle
#

Do you report it to them directly or?

winter bolt
#

theres a bug report thing on the forum

tranquil kindle
#

Not discord one?

winter bolt
#

thats for modding stuff i think but this is like an actual game bug i guess

tranquil kindle
#

All vanila stuff i've seen always has been triangulated on import so it might be default for them.

#

Like it did not happend on all Quads, but it was mostly on Bigger ones

winter bolt
#

yeah it was the same with normalisation

#

the model importer is supposed to do it automatically even if its not already done on the model

tranquil kindle
#

And not even every model so ...

winter bolt
#

i just tried a model untriangulated and its fine for me

tranquil kindle
#

I could send you model with texture so you can check it out. Its one of my first "better" ones but still has alot more faces that is actually required.

#

Or if i encounter it again, I'll invesitigate it further

long beacon
#

I’m going to be attempting to import some half life clothing (models and textures from HL2) into zomboid. Though I know stuff with the model itself will mostly be trivial, there are some things I need to learn about as I’ve never created a clothing mod.

  1. How does hole placement work?
  2. Will the model and texture still utilize the same seams?
  3. How do I dictate which body parts they cover?
  4. Is there any jank with full body clothing I should be concerned about?
  5. Are there any important changes to rigging I’ll need to make?
bronze yoke
#

um if you want this to work in the normal clothing system this is actually a massive pain in the ass and not nearly as easy as it sounds

#

you have to re-uv everything to match the vanilla uvs since they're used for masking and blood and stuff

long beacon
#

Gotcha

#

What format does zomboid tend to use for that?

grizzled fulcrum
#

If you mean just the file format, vanilla PZ uses DirectX .X format (eww) but you can also use FBX too (heavily preferred)

winter bolt
grizzled fulcrum
#

the flattened texture looks so weird 😭

winter bolt
#

if youre just doing clothing it'll just be easier to use the zomboid models and then work from there

#

redoing the uvs to fit the game will be a total nightmare

long beacon
# winter bolt needs to match this

I could probably just make a new texture, I’m very familiar with drawing digitally and pretty familiar with surface painter, and the textures from HL2 shouldn’t be crazy difficult to reproduce

tranquil kindle
#

If you don't really care about holes you could probably add hatmasks line to make them not appear on your clothes and just use already existing UV's

winter bolt
#

the texture is easy the problem is the texture mapping on the models needs to match the vanilla ones otherwise it breaks

long beacon
#

Yeah that shouldn’t be wildly difficult. Tedious? Absolutely, but not the worst thing

tranquil kindle
#

I did clothing mod without PZ uv's, weighted it myself and it does work, but just won't dispaly said holes/blood/dirt

winter bolt
long beacon
tranquil kindle
long beacon
#

It’s mostly just for Civil Protection as staff characters on my server

tranquil kindle
#

So pretty much only Jacket covers it.

long beacon
#

Doing a wipe based in the Half Life universe, gonna take a shit ton of technical work on my side but it’ll be worth it, I’ve got other staff working hard on systems and it’s starting to come together pretty nicely

tranquil kindle
#

It was more of a project for myself than official mod.

long beacon
#

Also, is there a way to make a gun do only health bar damage when hitting a player? Trying to let people get shot in Combine patrol encounters without bleeding out immediately. Alternatively, if it’s an absolute pain, how to I make the bullets as inconsequential as possible? The custom gun we’re using is based off of the Gunfighter framework.

#

If I could get the graze chance to be way higher than the bullet lodge chance it’d also work but I believe that’ll take editing different things

tranquil kindle
#

Vs player there is not really alot that can be done. Maybe b42 MP will introduce more to it. Currently even gun with 0 damage will lodge bullets And will kill in few shots i belive.

long beacon
#

Importing a shock stick should be easy as shit, right?

#

Probably just gonna replace the police baton’s model

tranquil kindle
#

I think there are mods for that.

#

Actuall tasers

bronze yoke
#

weapons should be pretty doable yeah

long beacon
#

Nah the shock stick from HL2, basically just is a baton but looks different

worthy sparrow
#

Is there somewhere an example of animated tile?

pallid obsidian
#

yo guys

#

my zomboid is telling me im missing a mod.info file

#

while i CLEARLY have one right here

#

anyone any idea why this is?

bronze yoke
#

if you're developing for b42 you need to put your mod's files in SnakeVoice/42 or SnakeVoice/common

pallid obsidian
#

will that folder be in the mods folder or whereabouts in the file structure?

bronze yoke
#

where your screenshot is, add a 42 folder and a common folder

pallid obsidian
#

ah ok

bronze yoke
#

mod.info and poster should be in 42, as well as things like scripts, lua, and clothing xmls, and most assets (textures, models, etc) should be in common (but technically you can put everything in 42)

pallid obsidian
#

ah ok no prob

#

thanks bro

#

sound

#

thx

hollow jewel
#

Hi, I want to start with mod developing, anyone has a cool guide? I have read the documentation but I don’t know where I need to start, is a lot of things

tranquil kindle
#

Find what you want to make, see if there is mod that does something similar, reverse engineer it, see how it works.

#

Or if its vanila thing, check files. They're really easy to acces and readable for basic stuff like items/models/textures.

hollow jewel
#

I want to make a camper mod, I want a room inside of a camper, but I think I need to modify the Java code, I don’t think Lua is enough for this, right?

hollow jewel
#

Thank you, I take a look of this mod, I already know this mod, but it seems to be not updated and not working anymore, or I’m wrong?

tranquil kindle
#

On b42? Its Expected. Its huge mod and it requires changes on various levels. It also most likely requires update to the interiors since they're actuall rooms somewhere on map and once the vanila map updated, it might've messed with those.

hollow jewel
#

Oh nice idea to place room outside of the map, but seems not very performance friendly

#

Sorry for my bad English

tranquil kindle
#

You might notice that "map mods" don't require much space. So i'm not so sure about that

hollow jewel
#

So basically when player enter in a rv is just a teleport to a room

tranquil kindle
#

Its more of updating mod structure and making sure lua side (teleporting) works

#

Yeah

hollow jewel
#

Oh, I loved this mod, and I want to sharpen my coding skills, so I’m planning to recreate a mod like this for me

#

I’m a flutter and angular developer bored to do just app and websites tired

brave dew
#

did erosion always cause buildings to be ransacked

#

or is that a new thing

#

because ive noticed that when i go to a town i havent been to before its been torn up

#

broken in houses and shops n stuff

#

houses with trash and stuff all over the floors

long beacon
alpine grotto
#

I don't suppose ayone knows why my script would open the debug error menu when trying to open the crafting menu in B41?

#

And or why might a script cause the crafting menu to no longer open?

little harbor
#

Not to be captain obvious but sounds like somethings wrong with your script there

#

What does the error say

hybrid tiger
#

New to pz modding, I might be going crazy but my mod isnt displaying on main menu
Mod in local folder (atleast I think this is the local)
Here is 42 folder with all the files, common is empty
And inside media is a simple items.txt
Not sure why it isnt displaying or did I just skill issue

bronze yoke
#

put your mod in %UserProfile%/Zomboid/mods/

#

this mods folder in the actual game install doesn't actually get loaded from (who knows why it's there)

hybrid tiger
#

oh ok so I just skill issued lmao

#

yup worked ty

opaque ocean
#

but ended up learning how to use the whole buildmenu recipes before I figured that out so it's not a inv item recipe now

winter bolt
#

i vaguely remember it being used back in like 2013

worthy sparrow
#

When I use exactly the same craftRecipe as an item it works perfectly

opaque ocean
worthy sparrow
#

Yup. I have created a 48x48 icon just for that

opaque ocean
#

infact, had to upscale my 32x32 icon to 48x48 to make it show up in the construction menu

#

one sec... it's possible that you used the same name for them both... could try naming the image something completely unique to see if issue persists when you set it to that

worthy sparrow
#

Wait.. doesn't it use some kind of a prefix like Item_ does?

opaque ocean
#

I think that's just TIS formatting

#

like how they put base. infront of everything despite it being unneccesary in almost all cases

worthy sparrow
#

ah, got it. Well.. I set unique name and its still the same.

opaque ocean
#

also possible that they could have separate files for uh... the UI where they set icons though

#

they have separate files for buildmenu icons

#

with their own variables

worthy sparrow
#

So.. it fallbacks to tile image?

opaque ocean
#

🀷I just know they have entity_tile scripts for the buildables where you setup recipes, and... now how multi-tile things are laid out... how they're oriented based on facing direction despite tilezed still determining the preview when picking up...

they also have x_entity_tile scripts in scripts/xui/defaultskin

#

so you might be looking for something around there

worthy sparrow
#

yeah, I will take a look at the xui folder for any clues, thanks

#

Got it.. kinda

opaque ocean
#

ah yeah i see what it's about now... it's where you define the entitystyle in UiConfig

worthy sparrow
#

Somehow having "DisplayName=something" inside entity breaks it

opaque ocean
#

but weirdly enough... it's also defined again in the non-X_-file...

#

idk, i just know it worked

#

maybe it's about the CraftLogic component

winged lotus
#

Hi everyone! I am getting the following exception
attempted index: CreateItem of non-table: null

When I do:
local metal = InventoryItemFactory.CreateItem('Base.SheetMetal')
But not when I do:
local metal = InventoryItemFactory.CreateItem('Base.SheetMetal')

Any idea on what could be the root cause here? It looks like Base still does still includes SheetMetal after the update and the InventoryItemFactory is able to work for some items, so I don't get why this is happening πŸ€”
I'll take any help if this happened to someone already πŸ˜…

bronze yoke
#

InventoryItemFactory is no longer available to lua, use instanceItem("Base.SheetMetal") instead

random finch
#

(B41) Any tips on how to get a result similar to getFullType used on InventoryItems for an IsoObject?

opaque ocean
#

I still just wanna know if there's an actual workaround to TIS's restriction of only letting you set an iso container to 100 capacity.

worthy sparrow
random finch
#

Am i right to say that IsoThumpable does not have a ScriptItem attached to it?

bronze yoke
#

it does not

random finch
#

wow, finally I figure it out

bronze yoke
#

most pick-up-able objects use dynamically generated items

crystal canyon
random finch
crystal canyon
#

yeah

random finch
#

Can you please post it

wet dune
#

how do i set every zombie to spawn with this outfit?

crystal canyon
#
java.lang.RuntimeException: java.io.IOException: Script load errors. at GameWindow.mainThreadInit(GameWindow.java:705). Message: Unhandled java.lang.RuntimeException thrown by thread MainThread.
    Stack trace:
        zombie.GameWindow.mainThreadInit(GameWindow.java:705)
        zombie.GameWindow.mainThread(GameWindow.java:599)
        java.base/java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: Script load errors.
        zombie.scripting.ScriptManager.Load(ScriptManager.java:1566)
        zombie.GameWindow.initShared(GameWindow.java:156)
        zombie.GameWindow.init(GameWindow.java:1442)
        zombie.GameWindow.mainThreadInit(GameWindow.java:701)
        ... 2 more

ERROR: General      f:0, t:1734996539781> ExceptionLogger.logException> Exception thrown
    java.security.InvalidParameterException: Index 1 out of bounds for length 1 at Item.Load(Item.java:1631).
    Stack trace:
        zombie.scripting.objects.Item.Load(Item.java:1631)
        zombie.scripting.ScriptBucket.LoadScripts(ScriptBucket.java:265)
        zombie.scripting.ScriptBucketCollection.LoadScripts(ScriptBucketCollection.java:122)
        zombie.scripting.ScriptManager$3.LoadScripts(ScriptManager.java:183)
        zombie.scripting.ScriptManager.loadScripts(ScriptManager.java:1639)
        zombie.scripting.ScriptManager.Load(ScriptManager.java:1562)
        zombie.GameWindow.initShared(GameWindow.java:156)
        zombie.GameWindow.init(GameWindow.java:1442)
        zombie.GameWindow.mainThreadInit(GameWindow.java:701)
        zombie.GameWindow.mainThread(GameWindow.java:599)
        java.base/java.lang.Thread.run(Unknown Source)
#

LOG : General f:0, t:1734996539781> [item] removing script due to load error = Hat_SurgicalMask_BlueDown

random finch
#

java.security.InvalidParameterException

crystal canyon
#

I guess one of these changed in 42, it worked in 41