#mod_development

1 messages · Page 324 of 1

nimble yew
#

and on B42 the recipe looks like this now (didn't test it yet):

  craftRecipe CarLiftColumn {
    inputs {
      item 1 [Base.Wrench] mode:keep flags[Prop1],
      item 6 [Base.BlowTorch] flags[Prop2],
      item 1 [Base.WeldingMask] mode:keep flags[IsWorn],

      item 6 [Base.SheetMetal],
      item 4 [Base.MetalPipe],
      item 8 [Base.Screws],
    }

    outputs {
      item 1 Moveables.car_lift_01_8,
    }

    time:150.0,
    needToBeLearn:true,
    category:Mechanical,
    SkillRequired:Mechanics=6;MetalWelding=4,
    AutoLearnAll:Mechanics=8;MetalWelding=6

    Tags = CanBeDoneFromFloor,
  }
amber osprey
#

The lack of commas upsets me

#

Please tell me that isn't standard to Lua syntax

nimble yew
#

so, the book should have TeachedRecipes=CarLiftColum now? Or should I do <module>.<recipeID>?

#

I didn't know, and seeing : and . alike kind of put me off. I didn't bothered to search so I copied xD

silent zealot
#

Noooooo! I just finished coming up with a new outfit I liked using Kattaj's stuff and today their mods are all gone!

silent zealot
amber osprey
#

Whew

silent zealot
#

fixed

amber osprey
#

okay, so now I'm seeing self arg2

#

should there not be a comma there aswell?

silent zealot
#

...maybe...

#

😂

amber osprey
#

Okay

#

😆

silent zealot
nimble yew
#

does anybody know why the recipe isn't appearing in my craft menu?

module FunctionalCarLift {
  craftRecipe FunctionalCarLift.CraftCarLiftColumn {
    timedAction = Making,
    time = 150,
    needToBeLearn = true,
    category = Mechanical,
    skillRequired = Mechanics:6;MetalWelding:4,
    autoLearnAll = Mechanics:8;MetalWelding:6,
    tags = CanBeDoneFromFloor,

    inputs {
      item 1 [Base.Wrench] mode:keep flags[Prop1],
      item 6 [Base.BlowTorch] flags[Prop2],
      item 1 [Base.WeldingMask] mode:keep flags[IsWorn],

      item 6 [Base.SheetMetal],
      item 4 [Base.MetalPipe],
      item 8 [Base.Screws],
    }

    outputs {
      item 1 FunctionalCarLift.CarLiftColumn,
    }
  }

  craftRecipe FunctionalCarLift.CraftCarLiftCenter {
    timedAction = Making,
    time = 150,
    needToBeLearn = true,
    category = Mechanical,
    skillRequired = Mechanics:6;MetalWelding:4,
    autoLearnAll = Mechanics:8;MetalWelding:6,
    tags = CanBeDoneFromFloor,

    inputs {
      item 1 [Base.Wrench] mode:keep flags[Prop1],
      item 4 [Base.BlowTorch] flags[Prop2],
      item 1 [Base.WeldingMask] mode:keep flags[IsWorn],

      item 3 [Base.SmallSheetMetal],
      item 2 [Base.MetalPipe],
      item 4 [Base.Screws],
    }

    outputs {
      item 1 FunctionalCarLift.CarLiftCenter,
    }
  }
}
#

I made a skill magazine, but just in case gave myself the mechanics and metalworking level to auto learn it. still nothing

#
module FunctionalCarLift {
  imports { Base }

  item CarLiftMag {
    DisplayName = Carzone Commodities: Car Lift,
    DisplayCategory = SkillBook,
    Weight = 0.1,
    Type = Literature,
    Icon = CarLiftMag,
    TeachedRecipes = FunctionalCarLift.CraftCarLiftColumn; FunctionalCarLift.CraftCarLiftCenter,
    ReplaceOnUse = CarLiftMag,
    StaticModel = Magazine,
    WorldStaticModel = FunctionalCarLift.MagModel,
  }

  item CarLiftColumn {
    Type = Moveable,
    DisplayName        = Car Lift Column,
    DisplayCategory = VehicleMaintenance,
    Weight = 20,
    WorldObjectSprite = car_lift_01_8,
  }

  item CarLiftCenter {
    Type = Moveable,
    DisplayName        = Car Lift Center,
    DisplayCategory = VehicleMaintenance,
    Weight = 20,
    WorldObjectSprite = car_lift_01_12,
  }
}
silent zealot
#

That will tell you if the issue is the recipe is not in the game at all OR if the issue is your caharcter can't see it/it needs a workbench/etc.

#

The dots in the recipe name night be an issue? Vanilla recipes all use underscores.

#
module FunctionalCarLift {
  craftRecipe FunctionalCarLift.CraftCarLiftColumn {

I don't think you should have the namespace in the craftRecipe line, but I've always used Base for my stuff.

brave bone
granite ginkgo
#

I have no idea why my truck keeps leaning on the left, tried changing a lot of chasis data and center of mass, nothing worked, any ideas? it's the only problem for now.

silent zealot
# brave bone What mod is this?

Mod compare. Very useful mod for seeing when yourmodlist changed and updating the save from general settings/updating general settings from a save.

#

Or in this case, seeing an unexpected change and being able to fix things before loading the game and losing all the now-missing items.

silent zealot
granite ginkgo
#

So any tips are appreciated

#

especially from other vehicle modders out here

mystic quest
#

hey guys, just joined this server because i wanted to ask if i can somehow make a mod that just changes most of the soundtrack and upload it to the workshop? it seems pretty easy but ive never made my own mods before.

bright fog
#

The songs are in .bank files so imo your best bet is modifying the bank file of the soundtracks

#

And users need to manually install it

bronze yoke
#

you also have to wrangle with the dynamic music system, it's actually really complex

mystic quest
#

Godammit

#

Aight thanks ill look onto it

sonic needle
silent zealot
silent zealot
ancient grail
sonic needle
#

muzzle brake is changing it, but yeah they are heavily edited for pz style, to not hurt ears etc but feel strong

granite ginkgo
#

New problem, When I try to enter the vehicle, the bar loads for a fraction of second and nothing happens

#

any ideas?

#

this happened after I reloaded the vehicle from editor menu

bright fog
#

This is the event that triggers when a new player gets created

flat bluff
silent zealot
#

And did teh editor change your vehicel files ata ll?

granite ginkgo
#

it does not fix it and it did change the data

tranquil kindle
granite ginkgo
#

sure let me test something

granite ginkgo
#

i have the areas defined but it doesn''t work still

granite ginkgo
granite ginkgo
#

Alr, fixed the tilt and seats, now my car has funny physics

dry isle
# bright fog <@233607847521419264> https://pzwiki.net/wiki/OnNewGame

As I understand it, the main issue right now is that the item is being given too early, before the player has fully appeared (spawned) in the world.

[26-04-25 16:33:51.329] LOG  : Lua          f:0, t:1745678031329> KatanaMasterMod ERROR: Events.OnGameOptionsApply not available during DelayedInitialization..
[26-04-25 16:33:51.330] LOG  : Lua          f:0, t:1745678031330> KatanaMasterMod: Hooked updateKeybindCacheAndRegisterHandler to OnGameStart..
[26-04-25 16:33:51.330] LOG  : Lua          f:0, t:1745678031330> KatanaMasterMod: Keybind cache updated. Key ID: 34.
[26-04-25 16:33:51.330] LOG  : Lua          f:0, t:1745678031330> KatanaMasterMod: OnKeyPressed handler registered..
[26-04-25 16:33:51.331] LOG  : Lua          f:0, t:1745678031331> KatanaMasterMod: Removed hook from OnGameStart..
[26-04-25 16:33:51.331] LOG  : Lua          f:0, t:1745678031331> KatanaMasterMod: InitialOnGameStartTrigger called. Scheduling delayed check..
[26-04-25 16:33:51.331] LOG  : Lua          f:0, t:1745678031331> KatanaMasterMod ERROR: Compatible Timer API not found! Cannot schedule delayed check. Trying immediate check (may fail)....
[26-04-25 16:33:51.331] LOG  : Lua          f:0, t:1745678031331> KatanaMasterMod: DelayedCheckAndGiveItem running after timer..
[26-04-25 16:33:51.331] LOG  : Lua          f:0, t:1745678031331> KatanaMasterMod.DelayedCheckAndGiveItem: Player object 0 is STILL not valid after delay! Aborting item check..
[26-04-25 16:33:51.332] LOG  : Lua          f:0, t:1745678031332> KatanaMasterMod: Keybind cache updated. Key ID: 34.```
#

Player object 0 is STILL not valid after delay!

#

Also, for some reason, I can't spawn the item through debug, even though it seems like the item has been loaded.

#

I even simplified the custom weapon file as much as possible, but it's still not visible in the world.

bright fog
bright fog
#

That's the problem

#

Ignore any other problem which might happen because of that one problem

#

If your item can't even spawn, you can't even know if spawning the event on spawn should work or not

#

That's why I asked you if your item could spawn in game from debug menu

dry isle
#

I studied a similar mod that adds a lot of custom weapons to the game (Tactical Weapons). My file structure and weapon code are almost identical...

ancient grail
#

i cant update my mod

#

cuz someone reported my comment, but it wasnt even offensive i just simply answered the question

#

wtf

bright fog
#

Lol what

ancient grail
bright fog
#

My guess is they thought this was related to Steam item trading

ancient grail
#

already did

dry isle
craggy nacelle
main pasture
#

Could it be automatic flagging because base.money is a valid URL? (I have no idea about steam policies)

craggy nacelle
#

Got less busy again, so i did some modding today and run into an... interesting issue i never actually thought about. When you use the 'getText())' function to use text from the translation file, and your client is in a nother language, the option set (in my example) by filling the context menu doesnt even appear (kinda logical if one thinks about it).

But what do you do if you dont have or want translation files for every language, is there some kind of default fall back folder for it? Havnt seen any in the media files, so i dont think so, but still wanted to ask. (still using .41)

silent zealot
#

The fallback is the untranslated key

#

e.g.: ever picked up an item in game with a name like "IGUI_Police_Key "?

#

That's because the translation is missing.

bronze yoke
#

it defaults to english if there isn't one for the current language, then the translation key

craggy nacelle
#

Huh? Strange, i used it in combination with the addOption for context menue, and if the client is not in english (as i only made a file for that one), the whole option is missing. So i didnt have english nor the untranslated key element. But im sure i think ive seen that one before, just not with the one i made.

heady cloak
#

I have a few questions.
I'm making a mod for a radial hotbar menu.

I am a bit stuck on the "equipping" portion of the menu.

How would I go about a check something like (some of it is pseudo code):

if item:isRequiresEquippedBothHands() then -- (Long rifles, shotguns, etc)
  -- do if can only equip in both hands

elseif item:canRequireBothHands() then -- (Crowbar as example) 
  -- HOW TO CHECK IF CAN
  -- option to equip both hands
  -- options to equip to primary or secondary

else -- All other single handed items
  -- options to equip to primary or secondary

end

I never really touched lua before, tips would be great

(Please ping me if you have a response)

craggy nacelle
#

local l1 = context:addOption(getText("ContextMenu_Gbg_roll"), comboItems[j], function() DkM_Context.fRollTheDice_d6( getSpecificPlayer(playerNum) ) end)
Thats the line in question. So i had my client on my new pc still set in my native language, and the option just didnt appear. But when i switched to english, it was back.

thin swan
# heady cloak I have a few questions. I'm making a mod for a radial hotbar menu. I am a bit s...

I believe what you want is these:
item:isTwoHandWeapon(), item:isRequiresEquippedBothHands()
Basically a one handed weapon would return false for both checks.
A weapon that can be used in two-hands OR in one hand will return true for isTwoHandWeapon, but return false for isRequiresEquippedBothHands
And then of course a weapon that is two handed and can not be equipped one-handed will return true for both.

heady cloak
#

yea isTwoHandWeapon is what i wanted

#

many thanks

thin swan
heady cloak
#

looks like it is there in b41 so it should work

#

would you know how to equip an item in both hands?

#

is it just setting both hand items to the same item or

thin swan
# heady cloak is it just setting both hand items to the same item or

Yeah it's just a param on the ISEquipWeaponAction:new method:
function ISEquipWeaponAction:new (character, item, maxTime, primary, twoHands)

So when you want to equip something as two handed, it could look like:
ISTimedActionQueue.add(ISEquipWeaponAction:new(playerObj, weapon, 10, false, true));

heady cloak
#

thank you very much

nimble yew
heady cloak
nimble yew
#

The recipe appears in the craft recipes debug menu, but it's empty. The debug console shows a string parse error

#

Other recipes show its content allright

nimble yew
#

after trying a thousand combinations, the tag "CanBeDoneFromFloor" wasn't enough. It doesn't work anymore... I had to put AnySurfaceCraft

bright fog
#

Hmm I forgot to add that detail in the wiki, I'll fix that

#

It's mandatory to have a crafting station tag

dull moss
heady cloak
#

o ur here too? as well as in calamity ))

torn igloo
#

Is there like a global moddata editor? Not to change the structure but simply the value.

bright fog
silent zealot
#

The structure is "lua table"

#

So you can view all of modData for an object (or the globalmoddata) the same way you print out a lua tabke: iterate through it, and recurse into any extra tables you find.

torn igloo
silent zealot
#
-- from https://gist.github.com/ripter/4270799
-- Print contents of `tbl`, with indentation.
-- `indent` sets the initial level of indentation.
function NepTablePrint (tbl, indent)
    if not indent then indent = 0 end
    for k, v in pairs(tbl) do
      local formatting = string.rep("  ", indent) .. k .. ": "
      if type(v) == "table" then
        print(formatting)
        NepTablePrint(v, indent+2)
      elseif type(v) == 'boolean' then
        print(formatting .. tostring(v))        
      else
        print(formatting .. v)
      end
    end
  end

simple recursive table printer.

#

then run NepTablePrint(getPlayer():getModData()) on the lua console

#

Note: If you want ModData instead of on objects mod data then call ModData:getTableNames() for an ArrayList of tables and then go through each one with ModData:get("tableNameHere")

torn igloo
#

You can already view global moddata on vanilla debugger. I am referring to editor aka edit.

silent zealot
#

You can use the lua console.

#

ModData:get("tableNameHere") where "tableNameHere" is the left column of the debugger GUI

torn igloo
#

That would only change locally though, still have to transmit over to server.

silent zealot
#

Then it's just a lua table

#

B41 multiplayer?

#

Not sure if it will automagically sync things for you.

#

Logic suggests it has to otherwise server and client would have different content in ModData.

torn igloo
#

Global ModData is done manually indeed thus I am asking if there's a editor that does that.

silent zealot
#

I've never heard of such a tool, since normally mods only deal with their own moddata problematically, and even then most of the data gets attached to the player object rather than the game world.

#

What is yor actual goal?

torn igloo
#

Global moddata is stored on global scope, but okay, so there no such tool.

nimble yew
#

another thing I figured is if you place Distributions.lua in your mod's lua/server/Items folder, it breaks the game. But you have no issues when you use a different file name (in my case FunctionalCarLift_itemDistributions.lua, copied from KI5 vehicle mods) or slightly different folder structure (I've seen lua/server/Items/ModName/Distributions.lua in other mods like Inmersible Solar Arrays)

#

and now, because of my inexperience in the game itself, I found there are car lifts spanning 6 squares instead of the smaller 4 square ones. So I'm forced to have a different approach and update the mod with backward compatibility in mind

granite ginkgo
#

Greetings, I can't seem to be able to add custom attachments to my vehicle with custom names, every time I add one, it names itself attachment1, 2 ....etc.

granite ginkgo
#

Nvm

#

Anyone knows how I can add a bed inside on the radial menu? or increase sleeping comfort? (for vehicles)

sonic needle
#

pillow nearby does it, so follow that

bronze yoke
#

if the data is server authoritative then the client has no reason to save it to disk and therefore it shouldn't be client mod data, just a normal table, and vice versa

#

you're likely to run into weird bugs with ghost data if you use them in that way and it doesn't provide literally any benefit to you

bright fog
bright fog
granite ginkgo
#

Greetings, im getting no such mesh found when I clearly have the right name, here is the script parts

#

model ZILBoxinteriorBase
{
mesh = vehicles/Zil3|inter,
texture = Vehicles/van_body5,
shader = basicEffect,
scale = 1,
}

#

part GloveBox
{
model InteriorZIL4
{
file = ZILBoxinteriorBase,
rotate = 0.0000 0.0000 0.0000,
scale = 1.0,
offset = 0.0000 0.0000 0.0000,
}

        area = SeatFrontRight,
        itemType = Base.GloveBox,
        mechanicRequireKey = true,

        container
        {
            capacity = 7,
            test = Vehicles.ContainerAccess.GloveBox,
        }

        lua
        {
            create = Vehicles.Create.Default,
        }
    }
bright fog
#

Whenever you share code, make sure to put it in code blocks

#

This will help people read codes you share

granite ginkgo
#
        {
            model InteriorZIL4
            {
                file = ZILBoxinteriorBase,
                rotate = 0.0000 0.0000 0.0000,
                scale = 1.0,
                offset = 0.0000 0.0000 0.0000,
            }

            area = SeatFrontRight,
            itemType = Base.GloveBox,
            mechanicRequireKey = true,

            container
            {
                capacity = 7,
                test = Vehicles.ContainerAccess.GloveBox,
            }

            lua
            {
                create = Vehicles.Create.Default,
            }
        }```
#

like this?

bright fog
#

yup !

granite ginkgo
#

welp

#
    {
        mesh = vehicles/Zil3|inter,
        texture = Vehicles/van_body5,
        shader = basicEffect,
        scale = 1,
    }```
#

so, any ideas? The name is correct in blender, i literally copy pasted it

bright fog
#

No sadly I don't really know

bronze yoke
#

is the filepath correct?

#

models_X/vehicles/Zil3.fbx?

bright fog
#

Yea that should be that

#

I knew something was off with that mesh

bronze yoke
#

no that's fine

#

i'm just asking if the file is actually there

granite ginkgo
#

wait, only calling it like that works for other models

bright fog
#

Can the model be put anywhere other than model_x ?

granite ginkgo
#

it is

bright fog
#

Ah no wait you shouldn't add model_X ?

granite ginkgo
#

ill save it separate and load it from another file

bright fog
#

Jeez I don't work enough with model related stuff lol

bronze yoke
#

i was just asking if the file was actually in the right place, the script is fine

granite ginkgo
bright fog
#

What's the full path of your model ?

granite ginkgo
#

models_x/vehicles/Zil3 | inter

bright fog
#

inter ?

#

Wait

#

Did you put a | character in it ?

bronze yoke
#

| specifies a mesh inside a model

bright fog
#

Or is that L ?

#

Oh

granite ginkgo
#

specifies what mesh it is

bright fog
#

Is that something specific to vehicles ?

#

Didn't knew about that ?

granite ginkgo
#

i dont think so

bronze yoke
#

no but it's not really useful for anything else

bright fog
#

I see

granite ginkgo
#

look

bright fog
#

I guess you don't need to put the file format at the end of that name either ?

granite ginkgo
#

nope, its always fbx

bright fog
#

Yea it does it automatically

granite ginkgo
#

this works btw : vehicles/Zil3|fldoor,

bright fog
#

Hmmm

#

Perhaps broken mesh ?

granite ginkgo
#

=(((((

bright fog
#

Shitty idea but

#

How about using that mesh in a random ass item ?

#

Or a completely different entry ?

granite ginkgo
#

it basically is, i got a lorry box in the interior model

#

now i want to join it with the body which works

gusty pasture
#

Hi! I'm having trouble transferring my mod over to B42 from 41. I've created the 42 and common folder but am kind of lost on what should go in each and where to go from here

gusty pasture
#

Thanks, but those instructions are different from the ones in the thread so now im even more confused lmaoooo

bright fog
#

The ones pinned here were the first ever instructions

#

The wiki page is up-to-date

gusty pasture
#

Ahhh got it, thank you very much

bright fog
#

@sour island could you please unpin those and perhaps replace with the message below ?

nimble yew
#

I'm a bit confused about Distributions... I enabled LootZed and checked the loot options of a CrateAntiqueStove, and the only option is Mov_AntiqueStove. But a lot of different items appear there... I grep'd the vanilla media folder and the only hit was in ProceduralDistributions, where Mov_AntiqueStove is actually been inserted...

bronze yoke
#

in lootzed there should be a dropdown list to select a distribution to preview

#

containers randomly pick one loot table out of a list and spawn items from that table

nimble yew
#

oooh, I get it. so the create is one of those crate types

#

or container

#

so that's the other hit in the grep... grouping crates

#

thanks, I will stop looking for my magazine then...

sour island
rain shard
#
    {
    Type    =    Normal,
        DisplayCategory = FirstAid,
        Weight        = 3.0,
        DisplayName    = EEMA 'La Paz' Vaccine,
        Icon        = Vaccine,
        WorldStaticModel    = vaccine,
    }
        item blackberry
    {
    Type    =    Normal,
        DisplayCategory = Junk,
        Weight        = 1.0,
        DisplayName    = Blackberry,
        Icon        = Blackberry,
        WorldStaticModel    = blackberry,
    }
        item progenitor
    {
    Type    =    Normal,
        DisplayCategory = NPC,
        Weight        = 50.0,
        DisplayName    = Progenitor,
        Icon        = Progenitor,
    UseWorldItem = TRUE,
        WorldStaticModel    = progenitor,
    }

Does anyone know why I'd be getting a world dictionary error with these scripts?

nimble yew
#

Is there a way to edit mod flags in the workshop? I switched to B41 and it deleted the B42 tag 😦

rain shard
craggy nacelle
#

Since you tryed the quotations (i would have thought of those first too honestly ^^), just to make sure:
Does the error only come when there is the item file in your script folder? (had to hard reset my server because of an error like that, thats why i ask)
Do you have the items declared like that in your file or do you have a module around them, like module Base{

Uhm, those are the things that come to mind to me atm.

rain shard
nimble yew
#

whoops, I made my first "big" mod update and a started getting a lot of reports of users having issues with unrelated stuff 😦

#

can I break a save by adding items and recipes scripts mid-game?

rain shard
bronze yoke
#

adding items and recipes should be absolutely fine

#

it's only a risk if you remove them

nimble yew
#

thanks. I rolled back to the previous stable version so the users can still play without issues

#

they reported items missing, two specifically reported medicines disppearing

#

I find it weird, since I don't think I added complex stuff. Just items and recipes scripts...

bronze yoke
#

if you changed the Type of an item that will cause it to disappear

nimble yew
#

I just finished installing a second instance with SteamCMD so I stop going back and forth between versions. Can I set the cachedir (for saves and stuff) to the bat file?

#

I only created new items, same with recipes

#

completely new item names

#
module FunctionalCarLift {
  item CarLiftMag {
    DisplayName = Carzone Commodities: Car Lift,
    DisplayCategory = SkillBook,
    Weight = 0.1,
    Type = Literature,
    Icon = CarLiftMag,
    TeachedRecipes = Craft Car Lift Column; Craft Car Lift Center,
    ReplaceOnUse = CarLiftMag,
    StaticModel = Magazine,
    WorldStaticModel = FunctionalCarLift.MagModel,
    Tags = Magazine,
  }
}
#

maybe the ReplaceOnUse should include the module?

lavish zenith
#

I'm doing something wrong.
Can somebody explain the imports block or better yet what prefix to the ingredient name I need to include in a recipe that needs to refer to two or more other mods? Specifically I'm trying to carve FishingTackle and Needle from Bone/Bones.

silent zealot
# nimble yew can I break a save by adding items and recipes scripts mid-game?

It's possible for a broken item to make the parser give up and stop reading items, meaning any mod loaded after yours it will have all items ignored. If they game still loads, this means all those items fail to load and will be removed. Debug mode will usually abort the game entirely, and if you do ever load the game and all items are missing killing the Zomboid process to prevent saving will preserve your save.

#

Easiest way to do this by accident I've found is set BloodLoction to an invalid value in an item script.

silent zealot
nimble yew
silent zealot
#

Very good odds /scripts/items.txt is already in use!

nimble yew
#

So it isn't a bad script. Just overwriting a similar named one, I guess

silent zealot
#

You really need a console.log from a user with the issue to confirm which mods have issues, or just ask them if items from particular mods only went missing

nimble yew
#

Two users reported vanilla medicine (painkillers, beta blockers and other one) disappearing, which left me confused. Other reported something about breaking a vape mod. Other about breaking other mod's recipes, which might be a similar issue since my script is called craftingRecipes.txt

#

I'm just waking and I have to do some chores, and maybe work lol. But as soon I have some time I will give it a try. I'm confident is a naming issue

topaz tangle
#

Vaping is cringe anyways

nimble yew
#

Lol

granite ginkgo
#

Anyone knows why my fuel tank does not show up???

#
    {
        mesh = vehicles/ZIL|gastank,
        texture = Vehicles/van_body4,
        shader = damn_vehicle_shader,
        invertX = FALSE,
        scale = 1,
    }```
#

        part GasTank
        {
            model Default
            {
                file = ZilBox_GasTank,
                offset = 0.0000 0.0000 -0.0035,
                rotate = 0.0000 0.0000 0.0000,
            }

            install
            {
                skills = Mechanics:5,
                recipes = Classic Mechanics,
            }

            uninstall
            {
                skills = Mechanics:5,
                recipes = Classic Mechanics,
            }
        }```
#

it does show up if i join it with the body

nimble yew
ancient grail
#

is there mod that prevents players from placing moveable objects?
cuz its conflicting with my mod

tranquil reef
#

Has anyone made a custom animal mod yet

bright fog
#

We're making a horse mod

tranquil reef
#

Who is we

bright fog
#

Modding Discord

tranquil reef
#

Has the custom animations problem been fixed

#

I'd like to come out of retirement

bronze yoke
#

the duplicate animation node files? no that's still a thing

main pasture
granite ginkgo
#

ill try, thanks

granite ginkgo
#

didnt work but i put it in body part and it shows up now

small osprey
#

uuuh, which unpacker do you use for texture packs? situation looks .. not good when checking net and discord injured
Linux user here and unpack200 throws errors at me already.

bright fog
#

I think directly the modding tools no ?

small osprey
#

the modding tools 🤔 . Which ones?
I found https://theindiestone.com/forums/index.php?/topic/59675-latest-tilezed-worlded-and-tilesets-september-8-2022/ and will try the wine version. But also nice that there are extracted tiles already. very friendly service.

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 ...

steady flint
#

hellooo im very new to modding and im looking for a reference guide on scripts because right now i dont think this is right im just trying to make a simple cracker that adds hunger and lowers thirst i just want some pointers on where to go module RRFIRSTMODZZ1 {
imports {
Base
}
item Salty_Cracker {
Type = Food,
DisplayName = "Salty Cracker",
Weight = 0.05,
Hunger = -10,
Thirst = 2
}
}

silent zealot
small osprey
#

TIL: Combining getPerformance():getFramerate() and getCPUWait() to calculate optimal batch-size makes for smooth async tick-loops

final cedar
#

May I ask a question? I'm creating a mod for Build 42, but I don't know how to change the 'craft' flag of an item from 'false' to 'true'.
Is it possible to modify this through a script or something similar?

bronze yoke
#

don't you just add a recipe for it?

#

this flag doesn't mean anything anyway, it's just for debugging, if it's not changing for some reason i wouldn't worry about it

final cedar
# bright fog What's that flag ?

I believe this flag probably indicates whether the item can be crafted.
I tried adding a crafting recipe for testing purposes, and while the recipe itself worked,
the item was not added to the inventory.
(he image is the Japanese version.)

bronze yoke
#

the issue is with the recipe script then, if you post it we might be able to see what's wrong

#

this flag doesn't restrict crafting, it just gets set to true if the game detects any recipes for it, it's to help avoid accidentally unobtainable items

final cedar
bronze yoke
#

yeah, most likely

silent zealot
#

Check the debug mode -> recipe list, and if your recipe is not showing up look in console.log for any issues about it failing to parse (search for "exception" for a quick first scan for the file)

craggy nacelle
#

Pvp weapon damage is really confusing. I can get damage with the lua events, but if it hits a body part, and said body part 'dies', you get extra damage. Like a hand 'going red' is +10 damage, a red gut is +40.
Did anyone figure out how to capture this body part damage when it happens (not afterwards, since i wish to intervene when that happens).

craggy nacelle
#

In case someone is looking this up in search for HP reduction by body part damage and finds this post:
OnWeaponHitXp is after damage calculation and application of damage to body parts, but before subtracting from overall health.
The damage in body parts is actually % - and you need to map it to each body parts coresponding HP.
For example: L_UpperArm with a value of 60 would translate to a reduction of 12 HP in the overall Health, since Upper Arm has 30HP when at full health.

red tiger
#

Found a way to effectively modify values in shaders from Lua. Also found how to render the previous frame of the game as a texture back onto itself.

#

Neato.

#

I can has frosted glass.

craggy nacelle
#

So water mirror would be possible?

red tiger
craggy nacelle
#

Ah, so no rendering into textures then. Guess that makes sense.

#

But screen effects are a thing, so thats still pretty cool.

red tiger
dense goblet
#

I installed Java script decompiler (JD-gui-windows). Someone mentioned I could use it to look at the java assemblies but I'm not sure what file to open

lavish zenith
#

These two entries work separately and even in two separate files in the same folder, but they do not work in the same file in the same folder. Is there a reason for this?

    {
        Sheet,
        Rope,
        Thread                  = 2,
        keep [Recipe.GetItemTypes.SewingNeedle],
    keep [Recipe.GetItemTypes.Scissors],
        Result                  : NS_Bag_SheetBag,
        SkillRequired           : Tailoring=1,
        Time                    : 100,
        CanBeDoneFromFloor      : True,
        Sound:PutItemInBag,
    Category : Survivalist,
    }

    recipe Weave Wicker Backpack
    {
        NS_Grass = 30,
        Twigs = 5,
        Rope,
        keep [Recipe.GetItemTypes.SharpKnife]/base.SharpedStone,
        Result: NS_Bag_WickerBag,
        SkillRequired           : Tailoring=2,
        Time: 200,
        CanBeDoneFromFloor: TRUE,
        Sound:PutItemInBag,
        Category: Survivalist,
    }```
craggy nacelle
#

Uhm, that sounds weird. I cant see anything wrong with your recipes that would cause that honestly. Just to make sure, they in a module, right? Hm, do they even work if they arent? If not ignore the question. But yeah, cant spot anything 'wrong' honestly. 😕

lavish zenith
#

Yeah, they're in a module. No idea why it doesn't work together.

#

After reloading they stopped working in separate files either. . .

craggy nacelle
#

Experts like albion always mention how the parser is kept together by dreams and wishful thinking, so, and thats just to make certain, how about removing the blanks(?) spaces(?) between the entries. So like: Category:Survivalist, instead of the one with a ' ' in between. Its a shot in the blue, but you might as well try it?

lavish zenith
#

= needs spaces :no spaces?

bright fog
craggy nacelle
#

Yeah, only seen spaces between commands like keep, destroy and such.

#

But not with :,=/

lavish zenith
#

Is there a specific number of recipes that can load per file?

craggy nacelle
#

Sry to hear, but i guess it was worth a shot. I honestly dont know about max numbers, but looking at the original meta folder and the recipe file in it, id say it can store a lot. Probably more then you have made?

bright fog
#

Bcs it could be a missing } perhaps

#

At the end or something like that

#

But recipes do work together so you got to have made a mistake in formatting SOMEWHERE

#

Comas look good, remove every spaces tho I don't remember it mattering

#

No it shouldn't matter

#

You said the crafts work in separate files ? So I figure the craft itself is well written

lavish zenith
#

They did work in separate files but no longer do. I'll upload it.

#

I put them back into the same set since it shouldn't matter.

bright fog
#

That's not how you comment

#

It should be /* comment */

#

If I remember right

#

Java comme ts

#

But I do believe -- is recognize too ?

lavish zenith
#

It does recognize the -- but I can remove it. Its just a note to keep things storted.

bright fog
#

All these recipes work individually ?

lavish zenith
#

Yes. They all work individually but are sometimes cranky together.

bright fog
#

Also perhaps try the PZ script languages extensions for VSCode

craggy nacelle
#

Interressting, didnt know you could do: keep [Recipe.GetItemTypes.SewingNeedle],[Recipe.GetItemTypes.Scissors],

bright fog
#

They aren't consistent enough to recognize mistakes but might make reading easier

bright fog
#

Do what exactly ?

#

Is that recipe right ? I haven't seen B41 recipes in a while so I don't remember exactly the way to write them

craggy nacelle
#

write your keeps in a single line with a colon. didnt do that before.

lavish zenith
bright fog
#

The 60 at the end, that's how you write quantities ?

#

Not with : ?

lavish zenith
granite ginkgo
#

not tested for B41 but shall work fine

#

last mod for now

ancient grail
ancient grail
# lavish zenith

keep [Recipe.GetItemTypes.SewingNeedle],[Recipe.GetItemTypes.Scissors],
syntax error

#

should be /

lavish zenith
steady flint
#

Btw I know crackers exist all I’m trying to do is test how modding works genuinely for a later idea I have

bright fog
ancient grail
bright fog
#

Ah

silent zealot
silent zealot
#

And I'm pretty sure it has something to do with openGL shaders.

small osprey
#

for vscode do you use extensions "ZedScript by asledgehammer" or rather "Project Zomboid Script Support by cyberbobjr"?

bright fog
#

It's up to date

#

And it's kind of better

steady flint
#

I looked in console.log

#

Btw not home yet be home around 5 my time most likely so haven’t had a chance to play around yet

proud abyss
#

Hi, I'm trying to add medical items to my mod such as a saline bag however I'm struggling to figure out what would be the best way to track if a player uses the item. Is there an event I could just listen to, and check if the player uses my modded item?

small osprey
bright fog
#

Yea

#

Make a custom context menu

small osprey
#

example (add more type checks/asserts)

    local player = getSpecificPlayer(playerIndex)
    -- Flatten context if multi-selection
    local item = nil
    if #items == 1 then
        item = instanceof(items[1], "InventoryItem") and items[1] or items[1].items[1]
    end

    if not item then return end
  
    local data = item:getModData()

    -- Filter
    if data.my_item_modded_field then
        context:addOption("new menu entry", item, function()
          --do something
        end)
    end
end)``` 

maybe you can also "overload/replace" existing options via -- context:removeOptionByName() first
proud abyss
small osprey
#

I think this is as close to "base" as we can get here 😅

proud abyss
#

Haha, valid

small osprey
#

There is a reason, I suspect, why traditionally zomboid is so .. context-menue driven 😅 . If you have a hammer ...

The devs are trying to address this and that has other consequences like overloaded "e"-key.

Maybe you want to rather map it to a key anyway, rather than a context-menue option? many keys taken though and you have to educate players and fiddle with mod options ...

proud abyss
#

Hmm that's true yeah, maybe a context menu might be the best option after all

small osprey
#

I mean .. it is not as bad. Maybe make it a generic option? haha

step 1: "Inject fluid intravenously (IV)", "Inject fluid intra-arterially (IA)" *
step 2: check if player has needle and rubber hose
step 3: Check if item is of fluid-container
step 4: Apply conditions to player based on what fluid was injected in what way
step 5: "They tried to make me go to rehab. But I said, No, no, no" 🧑‍🎤

#

Craft Recipe: Salt+water+bucket 😄

proud abyss
#

First aid level too low, you stab yourself with the needle and bleed out regardless 😂

small osprey
#

Indeed! finally some medical level consequences haha

#

And not to mention, rinse rubber hose after usage for fuel siphoning.
"My blood is gasoliiiine!"

proud abyss
#

Oh shittt

#

Don't give me ideas 😂

small osprey
#

hehe the tradeoff with games like zomboid and modders creativity is always complexity/realism vs clarity and accessibility for players. Some people don't want to jump through 5 steps just to get a health boost from an item ... and it's extra effort to build and maintain "simple mode" and "realistic mode" in one mod. Though maybe worth it. I wonder.

Me I love the "realism"-bias. As long as shit doesn't take forever 😅

proud abyss
#

Yup gotta find a good balance, my friends have wanted more medical stuff so if I'm adding stuff like a tourniquet it'll be great for saving your life... But also give you intense pain, and if you leave it on too long you die

small osprey
#

b41 multiplayer then? careful, the code I posted above I only tested in b42

proud abyss
#

Yes, I'm going to make it so that hopefully it works for both.. Or easy to port, will test both

small osprey
#

TIL that in Project Zomboids LuaJ-derived interpreter some closures may be compiled as lightweight functions (non-tables), which cannot have fields assigned to them. 🤯

steady flint
#

im home im gonna check now

steady flint
#

okay i need to change my files this is the outdated one lol-

#

okay should be fixed

bright fog
#

And the repo can be your mod, at the same level as Contents

#

And you won't have any issues with git files going to be uploaded

bronze yoke
#

yeah if you try to upload this it's going to get mad that .git isn't a valid mod folder

steady flint
#

thats fine im not releasing this

#

this is a test

#

it still wont load my item it loads the scone fine

bright fog
steady flint
#

ive done it so i havent uploaded my mod rather my public mod development folder

#

so if i choose to upload to steam it wont have git

steady flint
#

okay so my game wont load my mod at all

#

its all correct syntax

#

folder structure too

#

its just refusing at this point

#

no console errors

small osprey
#

symlinks? -> can have issues.

steady flint
#

module MyItem {
imports {
Base
}

item Stick 
{
    type = Normal,
    DisplayName = Stick,
    Weight = 0.1
}

} so this is my item script

#

and heres mod.info name=TestMod
id=RRtestmod
poster=poster.png
description=Test.

#

the . wasnt supposed to be there i typed that before copying

#

thing is i did this exact setup before and it worked

#

i have scripts.txt in script folder thats in media folder media folder is in main folder and mod.info is in main as well

#

im reinstalling it i feel like something has broke

broken kayak
bright fog
bronze yoke
broken kayak
#

documentation is lacking a bit, there are multiple guide that explain how to update a workshop mod with it

#

well this is for Barotrauma but the principles holds

bronze yoke
#

you can get around the in-game uploader's restrictions if you upload with steamcmd

broken kayak
#

but you can't create a workshop mod with it, only update one i believe

bronze yoke
#

just skip the first step, that's barotrauma mod structure

bronze yoke
broken kayak
#

damn, i've been misled then

bronze yoke
#

steam cmd is sort of the direct way of making the same api calls the in-game uploader uses

steady flint
#

i have no clue what is going on it loads but item for the life of me does not work

#

okay i have copy and pasted this exact thing into item.txt /** This line is a comment. Anything inside these brackets is ignored /
module MyModModuleName {
imports {
Base
}
/
Comments can be multiline like this
and can appear anywhere in the file, even in the
middle of a { block }
**/
item MyItem
{
Type = Normal,
DisplayName = My First Item,
Icon = MyIcon,
Weight = 0.1,
}
}

#

and it still wont work

#

my mod info name=TestMod
author=Rev
id=rrtestmod
poster=poster.png
description=Test
is this it loads into the game the dang item just wont register

#

didnt see it had a icon but i think i can ignore that so let me try i already know its gonna fail

#

what a surprise it didnt work i think somethings bugged

#

im downgrading

small osprey
#

Keep trying, you'll get there.

steady flint
#

its crazy ive legit copied the code ive written the mod info

#

ive done the files

#

ive added and activated the mod

#

i actually cannot pinpoint whats happening

bright fog
#

That'll make life easier for everyone, including yourself

steady flint
#

thanks i will but i dont know how

bright fog
#

Triple ` above and below code

steady flint
#

thx

#

i finally added the item

craggy nacelle
#

Im trying to stop the 'EndDeath' hitreaction from drag down. So far i have managed quite well, intercepting and 'ending' it. My problem is in multiplayer. As long as one player isnt 'near' the event, it seems all is fine and they will find the other player 'alive'. But if they where close, it seems they still 'witnessed' the drag down and they will find the other character 'dead' once they return to the teleport location.

Here is a picture that should make it more clear what im talking about.

#

Does anyone know what im doing wrong here?

steady flint
#

where do you reccomend looking for lua reference

craggy nacelle
bronze yoke
steady flint
#

im using build 41 for now

#

thx

craggy nacelle
broken kayak
#

So just came accross Mouse.setXY that doesn't really seem to do anything, is there any tip to change the mouse position or maybe just lock it in place ?

craggy nacelle
broken kayak
high brook
#

I'm trying to figure out where scripts are for disassembling structures. I'm looking at messing with the properties of barbed wire fences to make them disassemblable and give a barbed wire back so it's easier to recycle. I've been examining the structure of wooden fences, since they work basically the same as I'd like the barbed wire fence to, but I can't find the script that's running for disassembly "carpentry_02_49" according to debug mode. Anybody able to help? This is the first time I've messed around with PZ files so I'm pretty unfamiliar with the structure

bronze yoke
#

the materials are set in the tile definition

#

not sure exactly how moddable that is, but i know some people have had luck modifying them from lua

#

you can view the tile definition with tilezed, part of the project zomboid modding tools (in your steam library if you own the game)

high brook
#

Yeah, that's what I am worried about, but I figured there's gotta be something there since I can build the barbed wire fences same as the wooden ones, but I have a feeling I'm going to run into a lot of that

#

I'll look into that though, thanks

#

I did find the properties I was looking for, but I see what you mean. It seems this has my answer, thanks for the direction! #mod_development message

craggy nacelle
#

Sorry, was looking around, but uimanager seems also not to work. Kinda out of ideas. 😕

ancient grail
# craggy nacelle Im trying to stop the 'EndDeath' hitreaction from drag down. So far i have manag...

i dont know how to do this for all the zed. you might need to clone xmls and add a variable to the attack but pointing towards a different player hitreach other than dodeath

i only manage to do the reverse too
force dragdown when hit by my zed under specified conditions

but yeah basically make the player do a different reaction then thats all there is to it

or perhaps you dont even need to specify the reaction(not sure if it will work)

craggy nacelle
#

Uhm, no my problem wasnt with stopping the EndDeath, my problem was to sync the result. If i have someone standing at the teleport endpoint, and someone far away gets dragged down, they end there and all is fine. The player stands at idle.

Problem is, if i have a char follow a nother to get dragged down and then get the other char back to the TP Endpoint where the dragged down char is, he finds the char lying on the ground, even if its still 'normally playable' on the ohter account.

Uh... does that make sense how i wrote it? Hm...

queen oasis
#

guess what doesn't work in lua?

for backpack in self.playerBackpacks:

it took me over 15 minutes to catch that dumb ish and I haven't touched python code in like 2 weeks

#

on to the next error... after removing all these prints trying to figure out why python didn't work in lua

plucky summit
#

Hello. When you pick up a furniture item, it says the name of the item. How do I fetch that name?

grizzled fulcrum
queen oasis
#

Well, maybe, idk. Umbrella isn't working right for me and there's squiggles everywhere

grizzled fulcrum
#

I think it's how your luals is configured

bronze yoke
#

there's lua implementation where this is valid so i don't think luals catches it

#

there's a lot of things luals doesn't catch tbh it's the loosest language server i've ever worked with

grizzled fulcrum
#

oh

#

yeah luals for me thinks that im configuring fields or something???

#

I get "undefined field: print" here but that's it

#

but that may only be because I configured my luarc to have this

#

I've set the severity for every single thing luals checks because most of it's defaults are not good

feral carbon
#

Note to b42.7.0 mod developers/installers!
A select few popular mods hid every single mod on my mod selection screen forcing me to play pure vanilla without being able to select or adjust any already installed mods - despite being already downloaded beforehand on the workshop!!
Note that I play on the Steamdeck, version 4.7.0 i actually decided to reinstall the game.. validate files.. whatever i could to fix the issue - but as it turns out, the break was a mod I installed that seemed to have corrupted the selection screen and hide all my mods.

Mods in question was one of these select few, as i decided to delete these new mods i installed to see if reverting back to when things work would fix it.. and it did!

  • Risky unarmed
  • HydeCo unlimited cars
  • Flashlight on belt
  • Do I have a car
  • Make jam/peanut butter
  • Bars/rods/tools weld
  • Animals in bags
  • military ponchos (b42)
    These mods are very popular and probably work perfectly fine, does anyone know if they have a similar issue to this regarding any of these mods?
thin swan
#

Anyone happen to know an easy way to reload an object with a 3D model placed in the world?
For context, my bike is now a weapon that accepts weapon parts as upgrades, I've hooked into onUpgradeWeapon to bypass the transfer calls so that I can attach a wheel to the bike without having to take the bike into inventory first. It all works, the wheel gets attached, but the world model does not update with the added attachment until I interact with it.

queen oasis
proud abyss
#

Hey, I'm new to modding for PZ and as a part of my first mod I'm trying to add custom pills that act like painkillers. Maybe I'm blind, but on the wiki I don't see any easy ways to make it so when someone consumes the drainable item it applies a custom amount of pain reduction?

silent zealot
#

A good place to start is look at how the vanilla painkillers work.

thin swan
# proud abyss Hey, I'm new to modding for PZ and as a part of my first mod I'm trying to add c...

Heyo! It's probably not going to be an easy thing to do. It would not surprise me if the pain reduction is handled in Java.

The closest I could find in the vanilla Lua files is ISTakePillAction but it doesn't seem to have a way to alter the amount of pain reduced from each pill.
You're probably gonna have to figure out how pain reduction works and then implement a custom solution.
Likely you want to play with these methods: https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/characters/BodyDamage/BodyDamage.html

silent zealot
#

...actually that's not obvious at all.

queen oasis
#

PZ notes say "If a food item needs to be Pills, then it just needs to use the food stuff and not the Pill/drainable stuff."

silent zealot
#

The actual pill effect is in Java, triggered by the timed action.

thin swan
#

Buddy picked a real doozy for a first mod 😄

silent zealot
#

So have an OnEat function (or whatever the fucntion is called when food is eaten) that calls CharacterObject:PainMeds(<number here>)

proud abyss
#

Damn 😂

silent zealot
#

I think it will be an easy mod, but only after looking through the decompiled java code.

#

You can also manpulate pain directly like Alex mentioned, through one of character:getBodyDamage() or character:getStats(). (I can't remember which of the various meters are in which class)

proud abyss
#

I figured custom pain meds would be one of the easier things to do for a first mod

#

I'll have to look into it I suppose

silent zealot
#

It will be easy:

#
  1. set the item type to food
  2. add an OnEat = myCustomOnEatFunction
  3. make a lua funciton something like
function myCustomOnEatFunction(foodItem, character, percent)
  character:PainMeds(0.45)
end
#

now when the "food" is eaten the custom OnEat function is called, and it gets passed the character object as a parameter so you can call the same function normal pills use. (optional: you could code in the "less effective when drunk" part as well)

#

This is the bit in the java that is triggered when you take painkillers, which are just called Pills

#

And thankfully PainMeds isn't a private or java-only method.

#

I guess the bonus learning here is "using ZomboidDecompiler and having the decompiled java code is really handy when you want to know how something works" 😛

thin swan
proud abyss
queen oasis
#

am I still drunk? wtf

#

I mean, it's pretty

red tiger
#

Frosty

topaz tangle
#

Blury face…

thin swan
grave ether
#

I'm thinking about making a true music pack in the vein of the GTA and cities skylines radio commercials. But with brand new commercials based on real retro commercials redone with a zomboid spin. Would anyone be interested in working with me on this?

signal niche
#

hey guys im new in here, im interested in hiring someone to create a mod for my server, how would one get in contact with a creator? any help would be appreciated.

proud abyss
steady flint
#

So I’ve decided to give up modding project zomboid as I don’t see it in my passion as much but I hope to you all who are new manage to enjoy I’ve decided to mod terraria and dwarf fortress

#

But I’m still gonna check in cause I might try again just rn I wanna take a break

bright fog
frigid wasp
#

for build 41 is the lua event trigger for eating "OnConsume" or something else for detecting if something is consumed

steady flint
grave ether
mellow frigate
#

I tried to post here a link to PZ Modding Community discord server. Is my message rejection a global policy or is there a specific problem with that discord ?

signal niche
red tiger
red tiger
#

Letting them shaders cook.

topaz tangle
#

looking nice!!!

red tiger
#

I wrote a framework in Lua to make the use of custom shaders easier.

#

I load them from a dummy script-model / script-item.

#

I also update uniforms giving me full control over the shader in realtime.

topaz tangle
#

nice!!!!

red tiger
ancient grail
bronze yoke
#

yes

#

your quesiton was answered like five messages below the one you replied to 😅

topaz tangle
#

Does anyone know if there is a way to do random wheel textures?
Like how the shell textures work

soft temple
#

Is there some sort of issue with sounds in b42? I can't seem to get the volume to change at all

granite ginkgo
#

what engine sound should I use for a sport car? sound { engine = VehicleEngineSUV,

#

its in sound block

main pasture
granite ginkgo
#

thhx

small osprey
#

While in god-mode some player interactions don't make a sound btw. 🙂

thin swan
proud abyss
#

Heyy is there anyone that could help me with a translation question? I have an item defined that I am trying to link to a ContextMenu_EN.txt translation file to replace the standard context menu, but it doesnt' seem to actually work. Am I doing this wrong?

item Morphine
    {
        DisplayName=Morphine Pills,
        DisplayCategory=FirstAid,
        Type=Food,
        Weight=0.1,
        Icon=Pills,
        HungerChange=-0,
        CustomContextMenu=true,
        OnEat=Morphine_OnEat,
        EatType=Morphine,
        Tags=Medical,
        CantBeFrozen = true,
        Tooltip=Powerful painkillers, use with caution.,
    }```

ContextMenu_EN = {
ContextMenu_Morphine = "Take Pills",
}```

proud abyss
bright fog
proud abyss
bronze yoke
#

CustomContextMenu=Morphine would link to the translation ContextMenu_Morphine

bright fog
#

I'll add some tiny bit more info to that wiki page

#

Done, it shows a proper example now

craggy nacelle
#

Im confused. I wrote a little mod for blackjack. Workes fine in sp, so i moved it to server, played it on my test server. Client command and server command work well - but the mod simply doesnt want to load on the server. Any advise what i could be doing wrong here?

craggy nacelle
#

In server. Both, the command listener and also the file that holds the table for the blackjack

#

On client i have the command and control program that should interact with the server to get information about the cards played and stuff so i could use the mod for multiple people playing with each other.

#

I mean i went already as far as moving the table from local to global and include the listeners to the same module, but it still cant load the remaining parts. Im clearly overlooking someting here, 😕

bronze yoke
#

what makes you think it's not loading?

craggy nacelle
#

I have a simple if querey in my clientcommand listener that uses a bool function from the black jack table. But it always jumps to else... the others dont even react. Hm, now that i think about it, i guess ill try to force a true and see if that works. But i think the problem might be with the init? i coupled it with the server start, since i coudnt find a nother event that might kickstart the hole thing.

#

And suddenly it works? Hm.... how is it albion just says 'what makes you think its not loading?' And my program suddenly decides to go along with that statement? 🤔

#

😂

#

All jokes aside, the strange thing is that it worked fine before i moved it to the server side and tryed it online. Guess ill have to comb through the code and see whats going on (online testing is just such a pain)

granite ginkgo
#

its stuck and it does not want to move, idk what I did to itded

#

At least it looks good but I really need help with this one

mossy steeple
#

so i'm trying to update my profession rebalance mod, but for some reason it just... refuses to update, somehow? like all the point costs and whatnot are stuck on the old version, even though i've completely replaced the files and relaunched the game multiple times

#

[user] > zomboid > mods is where i should be replacing, right? i'm not a fool?

mossy steeple
#

okay i deleted the mod from that folder, double checked the workshop folder and the other mods folder, and it is in none of those but the mod is somehow still there in the in-game mod list

topaz tangle
# granite ginkgo

I don’t fully remember what the fix is but try moving the wheels around maybe?

silent zealot
#

@mossy steeple are you subscribed to it on steam?

mossy steeple
#

nope, i am not

#

tried subscribing to it and unsubscribing again too

bronze yoke
#

doesn't the mod list tell you where the mod is

mossy steeple
#

i mentioned it in mod support but i have cleared out every single mod folder, restarted my computer and the game, verified game files, and reinstalled the game

silent zealot
#

[user] > zomboid > workshop?

mossy steeple
#

not that i saw, no

mossy steeple
silent zealot
#

If you gave teh files unique filenames, do a search for that filename

mossy steeple
#

why are there like four mod folders anyways

bronze yoke
#

the ones in ProjectZomboid/ don't do anything

silent zealot
#

first in c:\users\name\zomboid and ..\Steam\steamapps\workshop\content\108600

mossy steeple
#

thanks a ton though, this was driving me nuts and i think this is the issue

silent zealot
#

hahahah

#

I can imagine

#

[user]/zombboid/workshop is the place for any mod you want to upload to steam.

mossy steeple
#

yep, that was totally the issue- it's gone now, thanks a ton

silent zealot
ancient grail
#

i cant seem to remove the highlight on the container since its active.. if you notice the first blink thats when i attempted to remove it but it spams back in most probably by java

frustrating, i wanted to make glitch effect

silent zealot
#

B42 already has glitchy container highlighting.

#

Or maybe that's one of the 300-something mods I have.

#

But at some point in B42 containers started to often flicker when highlighted for me.

granite ginkgo
ancient grail
twilit zealot
#

I have a little question i would like to make a retexture mod because i want to change some texture in the game that i don't like, how can i make the retexture mod ?

slim swan
ancient grail
# slim swan You can take a look at IsInventoryPage and IsInventoryPane. There some content r...

oh damn youre right , it seems i havent actually read this lol
i just noticed


function ISInventoryPage:setForceSelectedContainer(container)
    self.forceSelectedContainer = container
    self.forceSelectedContainerTime = getTimestampMs() + 1000
end

which means i didnt really have to write this

function FunctionalATMs3.ensureLootPageFocus(targetContainer)
    local lootPage = getPlayerLoot(0)
    if not lootPage or not targetContainer then return end

    local attempts = 0
    while lootPage.inventoryPane.inventory ~= targetContainer and attempts < 10 do
        lootPage:selectNextContainer()
        attempts = attempts + 1
    end
end
slim swan
plain patrol
#

Hello, can you please tell me how to make animal models compatible with the game, which tool to use.

I want to add new animals to the game. but the problem is that the models that I use are not displayed in the game and are not compatible with it, there are no errors in the game.

thin swan
#

Anyone happen to know if all trunks have type TruckBed?

thin swan
main pasture
main pasture
#

from media/scripts/vehicles/template_trunk.txt: /* FIXME: This should be "Trunk" */ part TruckBed { ... /* FIXME: This should be "TruckBed" */ part TruckBedOpen {

silent zealot
# twilit zealot I have a little question i would like to make a retexture mod because i want to ...

It's as simple as making a mod that has the new texture in the same path/filename as the original, and loading your mod after the mod with the texture you're replacing. So if I wanted to change the look of the Ammobandolier I'd fidn the original texture is media\textures\WorldItems\AmmoStrap_Bullets.png then I'd make a mod with a different media\textures\WorldItems\AmmoStrap_Bullets.png in it.

(Then repeat that for the clothing texture.)

#

Tip: after changing a mod that replace textures you need to quit and reload teh game, the new texture will not show up after the "reloading lua" thingy.

silent zealot
#

Yes.

#

Some vanilla textures are in texture packs but I've not yet had a need to play with those

twilit zealot
silent zealot
#

C:\Users<user>\Zomboid\mods

#

The Workshop folder is an extra layer used for prepping your mods to upload to Steam.

#

The most common way to do thing is make a common folder and leave it empty, make a 42 folder and put everything in there.

twilit zealot
#

Ok thank man you really useful

bright fog
#

You should use the common folder for heavy files

bronze yoke
#

if you're not going to engage with the system properly it doesn't really matter which folder you use

bright fog
#

I guess

bronze yoke
#

but ideally you should put assets in common and code in 42

silent zealot
#

Some files need to be in 42 to work, they won't work from common.

bronze yoke
#

which files?

bright fog
#

But I'd rather teach people the proper way from the start rather than tell them later "actually we lied you should probably do that but we thought you wouldn't stay"

silent zealot
#

I figure spliting things up into common and numeric folders will be a lot more useful once B43 is out, but for now I don;t think anyone is bothering to support multiple B42 builds.

bright fog
#

That's the point of versioning folders

bronze yoke
#

it only matters when multiplayer comes out

silent zealot
bright fog
#

It's a singular file so that's ok

bronze yoke
#

until then, there isn't even the option to play on older versions

bright fog
#

But ask chuck what he thinks of repeating his textures and shit in multiple folders lol

bronze yoke
#

but it'll be a problem later so it's best to start now

silent zealot
bronze yoke
#

steam doesn't delete removed files when a mod updates so if you put code in common it's there forever for at least some of your users

bright fog
#

And there will be people not switching

bronze yoke
#

for me i just find it preferable organisationally

#

especially being able to put translations in common so it doesn't get bunched in with actual code

silent zealot
#

I started doing that for images/translations, then just.. couldn't be bothered for later mods . It won't be hard with the mods I've done to pull the few bits that belong in common into there later.

red tiger
#

Having fun modding shaders

silent zealot
red tiger
#

I've built a framework where I can hook to custom shaders and inject variables through Lua including the previous rendered frame as a texture.

twilit zealot
main pasture
red tiger
#

Also yeah I do.

#

I have a stupid amount of control over the rendering of UI now, down to even a polygon level.

#

I might do an immersive shader mod

main pasture
#

Which shaders can be edited? Is it only for custom objects, or is it possible for world objects, vehicles etc?

red tiger
#
LOG  : Lua          f:0, t:1746187924490> ### SHADER MAP FETCHED ###
LOG  : Lua          f:0, t:1746187924490> 0: zombie.core.opengl.Shader@428828f6
LOG  : Lua          f:0, t:1746187924491> 1: zombie.core.DefaultShader@39cc0d1a
LOG  : Lua          f:0, t:1746187924491> 2: zombie.iso.WaterShader@38e3be7a
LOG  : Lua          f:0, t:1746187924492> 3: zombie.core.opengl.VBOLinesShader@78aa4890
LOG  : Lua          f:0, t:1746187924492> 4: zombie.core.opengl.VBOLinesShader@3eab3d1d
LOG  : Lua          f:0, t:1746187924492> 5: zombie.viewCone.ChunkRenderShader@12b56b11
LOG  : Lua          f:0, t:1746187924493> 6: zombie.tileDepth.CutawayAttachedShader@2af2c8e0
LOG  : Lua          f:0, t:1746187924493> 7: zombie.tileDepth.TileDepthShader@240ee4a9
LOG  : Lua          f:0, t:1746187924493> 8: zombie.tileDepth.TileDepthShader@4a5eec77
LOG  : Lua          f:0, t:1746187924493> 9: zombie.tileDepth.TileSeamShader@6e7d67fd
LOG  : Lua          f:0, t:1746187924494> 10: zombie.iso.weather.WeatherShader@378003f5
LOG  : Lua          f:0, t:1746187924494> ShadeHammer ::
ScreenShader = {
        id = 24,
        javaObject = zombie.iso.weather.WeatherShader@378003f5,
}
#

I'm currently rendering from a custom shader side-loaded and hooked into from a dummy model call.

#

It's very technical code however the framework aims to simplify it while preserving controls when needed.

#

If this stuff were to be exposed naturally through a modding API this game would transform very quickly through shader mods, much like MineCraft.

#

This framework is a decent substitute for now.

main pasture
#

Does it need java changes?

red tiger
#

I added a recompile method to the shader's internal class code so I can reload it without crashing the game.

#

This is otherwise a 100% Lua mod.

#

I'm not waiting 1-2 minutes to reload a shader by killing the game.

main pasture
#

Nice. If it's possible to edit the variables provided to the object or vehicle shaders, that would open up very interesting possibilities

red tiger
#

For non-skinned shaders (weather, etc.) those need to use layout location definitions to properly control uniform values. For skinned shaders, those don't.

silent zealot
#

What does "skinned" mean for a shader?

red tiger
#

So items, vehicles, people, etc.

#

PZ has two shader systems.

silent zealot
#

Makes sense

thin swan
#

Ughh... Something broke the weight reduction on my container and I have no clue what.
Anyone see anything wrong with this?

module Bicycle
{
    imports {
    base
    }
    item Saddlebag
    {
        DisplayName = Bicycle Saddlebag,
        DisplayCategory = Bag,
        Type = Container,
        Weight = 0.01,
        Icon = AmmoCase,
        Capacity = 20,
        CloseSound = CloseAmmunitionBox,
        ClothingItem = Bag_AmmoBox_RHand,
        OpenSound = OpenAmmunitionBox,
        PutInSound = StoreItemAmmunitionBox,
        ReplaceInPrimaryHand = Bag_AmmoBox_RHand holdingbagright,
        ReplaceInSecondHand = Bag_AmmoBox_LHand holdingbagleft,
        RunSpeedModifier = 1.00,
        WeightReduction = 100,
        WorldStaticModel = saddlebag_item,
    }
}

It's showing 100 weight reduction in-game as well, but it doesn't actually end up reducing the weight when put in inventory...
Worst part is that it was working like 2 weeks ago and I didn't change the item script at all, so no clue what broke it

#

Ah wait nvm, weight reduction only works when it's actually equipped, not in inventory. Forgot I changed that.
Time to figure out a different way to reduce the weight of it when in inventory

thin swan
#

I'm thinking about parsing through the container and do setActualWeight(0) on all the items when the container is in the player inventory, and then when transferring it out from player inventory it sets them all back to their original weight.
Anyone know of a better/easier method?
Feels like it could get messy when there's nested containers in the container

thin swan
#

Well shit, this works for everything except weapons... Anyone happen to know how to change the weight of a weapon? 😭

slim swan
thin swan
#

Hmm, maybe I just let it stay at the weight it is, and just disable health loss from overencumbered while on the bike

lean pelican
#

Hi all, I'm creating my first mod and the mod seems to appear and I have it selected but I'm not getting the output I would expect when I launch a game. I believe the folder structure is correct but I'm not sure if the code is doing what I hope it might do; basically I just want to output a message upon a given event as a working PoC before venturing into anything more complex. I'm not seeing anything in console.txt besides LOG : Mod f:0, t:1746207440851> loading \MyMod
`local function logMessage(message)
print("CategoryMode: " .. message .. "\n")
end

local function OnGameBoot()
logMessage("OnGameBoot Started.")
logMessage("OnGameBoot Finished.")
end

logMessage("Register Mod for OnGameBoot Events.")
Events.OnGameBoot.Add(OnGameBoot)`

bronze yoke
#

lua files must be in one of the subfolders client shared or server

bronze yoke
#

🤷‍♀️

bright fog
#

But I guess it should now that it got restructured

lean pelican
#

Ah that would be why then, any idea where this structure is explained?

granite ginkgo
#

So, I ported my car from B41 (works perfectly) to B42 and I can not enter the vehicle

#

any ideas?

#

I might make my car B41 only if I can't fix this, any ideas?

bronze yoke
granite ginkgo
main pasture
granite ginkgo
bright fog
#

I think I planned on adding it to Lua (API)

granite ginkgo
lean pelican
bright fog
#

👌

granite ginkgo
bright fog
granite ginkgo
#

no, it was at 70+

main pasture
#

I tested it and had the same issue, even with everything set to the default items

small osprey
#

How do you handle tab-navigation in UI fields? I can't find a good reference to check

        if key == 15 then```
etc ..
bright fog
#

Where do you block exactly ?

simple helm
#

do i need a Lua for custom vehicle sounds, engine,idle,horn etc

topaz tangle
craggy nacelle
#

Run into a strange thing just now: I wrote in my code local lv_NumRnd lv_fRnd:random(iter1) clearly somehow (stupid i know XD ) i forgot to set = but my VSCode didnt point that out to me? Only found out when i tested the end result in PZ. Did i do something to my VSC or is that function of lua i didnt know of?

bright fog
#

No that should show something is wrong yea

#

You sure you didn't just miss it ?

craggy nacelle
#

No, the only two error messages are
Undefined field `name`.
because for some reason vs code seems not to realize that my variable points to a nother table. but those are unrelated to it and in another function.

#

Strange, so i tested it, and it seems it only happens when i remove the = in declaring variables, like for example local lv_fRnd newrandom() doesnt throw an error either

#

on the other hand something like:

   local test "hello"````
both throw off the error messages
bright fog
#

Yea that's why I'm a bit confused

bright fog
#

I mean code wise it does ?

#

Just not in the IDE if I understood right ?

craggy nacelle
#

Yes. When i check it in the debuger, it somehow shows an empty adress? It also very much throws an error. XD

#

Its just the ide seems not to recognize it. Which is why i wondered if i did something wrong to it (it does have some key combinations, o i was wondering if i pressed something wrong)

bright fog
#

You're the second guy with broken VSCode today wtf is going lol

craggy nacelle
#

Really? Must be a conspiracy then. XD Well, if you have never heard of something like that, it sounds like its one of those niche cases that seldom pop up, in which case i wont try any longer to figure out if i somehow messed up the settings. ^^

red tiger
#

Figuring out how to render 3D models with controls on UI

glacial flicker
#

Is there a way to allow Bleach to be added in the fluid mixing tool?

granite ginkgo
proud abyss
#

Hey, is there a way to quickly see the default values of (medical) items such as BandagePower, or do I need to dig into the game files?

tranquil kindle
ancient grail
tranquil kindle
#

OH, so you wanna eat cookie without opening the package.. got it.

#

PZ really has one of the simplest way to browse files. I think you might be able to see values in game with debug mode, but i'm not so sure.

ancient grail
#

i suggest saving the result to a file or onto your clipboard, thats what i did before(not for medical items tho)

#
function dbgClip.getAllFirearm()
    local result = ""
    local items = getScriptManager():getAllItems()
    for i=0, items:size()-1 do
        local item = items:get(i)
        if item:isRanged()  then
            result = result .. tostring(item:getName()) .. "\n";
        end
    end
    Clipboard.setClipboard(result); print(result)
    getPlayer():setHaloNote(tostring("open notepad and press ctrl + v"),150,250,150,900)
end
proud abyss
ancient grail
#

my bad

silent zealot
# glacial flicker Is there a way to allow Bleach to be added in the fluid mixing tool?
#

The fluid definition of bleach only allows it to be added to "beverage" which is why you can't mix bleach & bleach or put more than a few mL of bleach into a bucket (because after the first tick of fluid transfer it is "mixing" bleach and bleach)

#

I posted a fix in that bug report thread.

silent zealot
proud abyss
silent zealot
#

Easy, open up items_medical.txt

proud abyss
#

Yuppp just saw, now running into different issues kekg

silent zealot
#

The bits that matter are "BandagePower" and "Alcoholic" which rural Kentucky for "sterilized"

silent zealot
proud abyss
#

Modding's a whole different thing compared to back end stuff

silent zealot
#

If you want to get an idea how bandage power scales relative to medical skill, the AppyBandage action does that:

local bandageLife = ZombRandFloat((self.doctorLevel + 1) * 0.5, (self.doctorLevel + 1) * 1.0) + self.item:getBandagePower();
proud abyss
#

Ah cool

proud abyss
silent zealot
#

but it's still a "bandage"

#

You probably need to make a new item type and do some lua work to get what you want; check out medua/lua/client/XpSystem/ISUI/ISHealthPanel.lua

proud abyss
#

Yeah I figured I may need to make it a normal item with a context menu through lua, like I did with the morphine I made

silent zealot
#

You'd add a "stop bleeding" handler with associated timed action that when done doesn't call setBanadaged(), it calls something else to stop bleeding (and have a look for that thing to call before doing it)

#

And I guess it should also apply that to location "below" the tourniquet (so it you tie one on upper arm, stops lower arm and hand bleeding as well)

proud abyss
#

Hmm yeah, I'll have to figure out how to actually do any of that haha

silent zealot
#

First step is find the lua to stop bleeding so you know the idea is feasible.

#

bodyPart:setBleedingTime(0) might be the thing

proud abyss
#

Maybe I should make the tourniquet a food item so I can have the custom OnEat, and then somehow make it so you can remove the tourniquet

silent zealot
#

If you're super keen, make it a clothing item.

proud abyss
#

Ohh true

#

Though how would I call a lua function upon wearing a clothing piece?

silent zealot
#

OnClothingUpdated event

#

that gets called any time clothing changes, so you can do whatever checks you want then to stop bleeding or restart it if the torniquet was removed

proud abyss
#

Awesome, I'll have a look when I'm home

thin swan
#

Okay either I'm blind and/or stupid, or increasing the player inventory capacity to a specific number is harder than it reasonably should be.
I got it working with some help from chatgpt (because I'm shit at math), but goddamn, this is what it takes to make a number go from 12 to 20?

bronze yoke
#

there's literally no way that's necessary

thin swan
#

So blind and/or stupid it is then 😂 What did I miss?

bronze yoke
#

i don't actually know it just seems insane

thin swan
#

I tried setCapacity() and setMaxWeight() but they did nothing, only setMaxWeightBase() actually ended up changing the inventory capacity

#

This is working and giving the expected increase every time:

local function calcBaseForExtra(extraCapacity)
    local a = 0.005
    local b = 1.45
    local target = 12 + extraCapacity
    local disc   = b*b + 4*a*target       -- discriminant
    local root   = (-b + math.sqrt(disc)) / (2*a)
    return root
end
bronze yoke
#

seems like it just multiplies the value you give by a value based on player strength and then rounds it

thin swan
#

Just have to change it from using 12 to using the actual player capacity based on their strength

proud abyss
# silent zealot OnClothingUpdated event

Don't really see much documentation on this but I'm guessing I'd use ClothingExtraSubmenu=Tourniquet, and then something like this?

    if clothingItem:getType() == "Tourniquet" then
        local submenu = context:getNew(context)
        context:addSubMenu(context:addOption("Apply Tourniquet"), submenu)

        submenu:addOption("Left Arm", clothingItem, player, "Left_Arm")
        submenu:addOption("Right Arm", clothingItem, player, "Right_Arm")
        submenu:addOption("Left Leg", clothingItem, player, "Left_Leg")
        submenu:addOption("Right Leg", clothingItem, player, "Right_Leg")
    end
end

Events.OnClothingExtraSubmenu.Add(onClothingExtraSubmenu)```
thin swan
# thin swan Just have to change it from using 12 to using the actual player capacity based o...

"just" lmao, like it was gonna be easy.

But this is working, no matter what the character inventory capacity is, it does capacity + X every time I call ApplyUpgrade(player, X)

function InvertDeltaArg(extraKg, currentBase)
    local a, b = 0.005, 1.45
    local B = b + 2*a*currentBase
    local disc = B*B + 4*a*extraKg
    local root = (-B + math.sqrt(disc)) / (2*a)
    return math.floor(root)
end

function ApplyUpgrade(player, extraKg)
    local currentBW  = player:getMaxWeightBase()
    local deltaArg   = InvertDeltaArg(extraKg, currentBW)
    player:setMaxWeightBase(currentBW + deltaArg)
end
silent zealot
#

You've managed to get an extra mad answer lol

#

This works and avoids the issue of having the value reset by reapplying every update, but you;'ll have to play around to get the final value you want:

local maxWeight = 15
--15 is probably a lot more balanced.
-- 15 becomes 20, 20 becomes 50?

print("#### NepTweaks: ExtraWeight.lua")

function setPlayerWeight(player) 
    if player:getMaxWeightBase() < maxWeight then
        player:setMaxWeightBase(maxWeight)
     end
    -- player:setMaxWeightBase(player:getMaxWeightBase()+maxWeight)
    
end
Events.OnPlayerUpdate.Add(setPlayerWeight)
#

Try it as a OnCreatePlayer instead of OnPlayerUpdate, I put that together years ago and forgot all about it...

granite ginkgo
silent zealot
#

AI is good for images - images don't need to be perfect, and also you can quickly see if they meet your needs

granite ginkgo
#

yep

silent zealot
#

3D models for the same reason, though I've not played with that a lot.

#

But code is iffy, and "make a mod" is terrible

granite ginkgo
#

pz coding tho

proud abyss
slim swan
#

For example, I use ComfyUI for images, Claude for code-related tasks, and as for 3D modeling work, I mostly do it myself since it’s often faster than using AI.

#

But these are only can used to create quick preview effects for my clients.

thin swan
# silent zealot This works and avoids the issue of having the value reset by reapplying every up...

The problem I was having was to know what value to pass to get the exact weight I need.
Like if I have 7 strength then my inv capacity is 15, if I want to increase this by a number that is calculated from the weight of a container, then I need some formula, right? Or am I thinking about this in the wrong way?

Basically what I'm trying to do is that for my bike, I have a container that I put stuff in, when I hop on the bike this gets transferred to my player inventory and takes up capacity. I want to mitigate this by increasing the inventory capacity by the same weight that the transferred container has, which changes based on what's inside it.

Not sure how else to do it, but maybe I'm just approaching it the wrong way

silent zealot
#

What if you made an invisible bag that doesn't show up in the inventory UI (assuming that works the same as normal "clothing"), gave it 100% weight reduction and put stuff in that?

strange tulip
#

Week one mod I good but I hate when I’m at McCoy a sate and roit police march in my yard

#

The army comes out of no where

#

And I die to a biker gang

#

Goofy mod would play again 100%

thin swan
silent zealot
#

Debug mode, right click, edit let's you change weapon weight so there must be a lua way to do it

#

It might get reset though if attachments chamge

tranquil kindle
#

Like sling does

thin swan
#

Hmm, would it be possible to attach it to a weapon without adding the attachment slot in the item script?

tranquil kindle
#

Does it matter that much?

thin swan
thin swan
tranquil kindle
#

Wait, what do you mean by attachment slot?

#

as hotbar?

thin swan
#

I think the method I have now works though, is there something inherently heavy or bug prone about increasing the player capacity? I know there's an upper limit

tranquil kindle
#

Sling does reduce flat weight

#

Even when not equiped

#

Its literally free weight reduction

thin swan
#

I'd have to reduce the weight of each weapon inside the container, so would have to attach the weight reduction attachment to each one when parsing through

#

And it could be any random weapon, like a crowbar, a bat, an m9

tranquil kindle
#

I don't understand to be fair.

#

No

#

ADD sling to the bike

#

itself

#

and make it get weight from all stuff, then that value insert as weight reduction to said sling*

thin swan
#

Oh hmm, I don't know if that works, because the bike is not heavy, it's just 1.5, it's the container that has the items that is heavy

#

the container is not actually attached to the bike itself

tranquil kindle
#
DisplayCategory = WeaponPart,
Type = WeaponPart,
DisplayName = Firearm Sling,
Icon = TLOGSling,
Weight = 0.2,
WeightModifier = -0.8,
MountOn = Shotgun;DoubleBarrelShotgun;AssaultRifle;TLOG_Crossbow;AssaultRifle2;HuntingRifle;VarmintRifle;TLOG_HuntingRifle;TLOG_LeverActionRifle ;TLOG_MilitarySniper;TLOG_AssaultRifle;TLOG_Pumpshotgun1;TLOG_TacticalShotgun;TLOG_FullAutoRifle;TLOG_SemiAutoRifleAbby;TLOG_MPX;TLOG_Specter;TLOG_DoubleBarrelShotgun,
PartType = Sling,
Tooltip = Tooltip_Sling,
WorldStaticModel = TLOG_SlingGround,

So make it "MountOn" bike itself, and it is there by default. If possible make it non removable.
Here you have "WeightModifier = -0.8," in this example,
If you could come up with the idea of it being changed depending on amount of items that are in a bag of a bike?

#

But you want the stuff from bike to be transferred to player right?

#

When he equips it?

#

If you want, you could explain it in DM, then we might see if the idea i'm talking about might work?

#

Because right now im working on few things at the same time, so i might've missed a part

thin swan
#

Yeah we can do in DM 😄

icy night
#

Does anyone know the specific sprite name for the pile of ash that is left after burning corpses?

queen oasis
icy night
#

I think so

ancient grail
ancient grail
mossy steeple
#

okay i feel really stupid- where is the mod.info file supposed to go? i've tried like three different spots and i keep getting the 'your mod needs a mod.info file' message

#

i swear they keep moving it because i've uploaded stuff before no problem

#

and looking at other uploaded mods, my mod.info is in the same file location as those so like, what am i supposed to be doing here

#

doing a bit of research i'm seeing people say it's just b42 moving the file locations around a bit but like, none of my usual methods of looking at other mods to verify i'm doing it right are working, heh

small osprey
mossy steeple
#

in the workshop folder, right? i have it in mymod/Contents/mods/common/mod.info

#

i've also tried it directly in the /mods directory, and at /mods/42/mod.info

small osprey
#

so, I deploy my mod to my home/Zomboid/mods folder. These are local mods. I do not use a "Contents" folder and I have never heard about it.

The workshop installed mods btw. will live in steam/steamapps/workshop/content/<someIdsOneOfThatIsZomboid>/

mossy steeple
#

oh no i'm trying to upload to the workshop- those need to be in the user/zomboid/Workshop folder, right?

#

or can i upload directly from the mods folder

#

i only added the Contents folder because the in-game uploading tool demanded i have one

mossy steeple
#

ah! hadn't realised that page was updated for b42 yet, nice

small osprey
#

Very new, not every attempted by me

mossy steeple
#

okay, yeah, following that exactly and it's still telling me i need a mod.info folder

#

i'm genuinely not sure if i'm doing something wrong or if there's some other issue

#

ohhhh there needs to be 2 mod.info files. wow that is not at all intuitive.

#

devs should 100% update that text to tell you 'you are missing a mod.info file at x location'

narrow crown
#

hi guys I'm playing the 0.42 loading the mods I get an annoying blue panel on the right with the list of active mods how can I remove it?

bright fog
#

Confirmed working, I wrote that page like a few days ago

bright fog
mossy steeple
#

that wasn't much help either- i wound up using a steam guide to figure out that you need 2 mod.info files

bright fog
#

Unless you mod for both B41 and B42 in a single mod

mossy steeple
#

i mean hey, it started working as soon as i did that and it wasn't working prior

bright fog
#

You need a mod.info in the versioning folder and that's it for B42

#

And for B41 in the myMod folder

#

And to have the mod work for both, have both the files

bright fog
thin swan
mossy steeple
bright fog
#

Also I can assure you you just did a mistake somewhere, that's it

ancient grail
ancient grail
bright fog
ancient grail
#

nice, if you liked that then symlink might be something interesting for you

i have mine setup in such a way that all my files are done and kept on the mods folder

all thats there on the workshop folder are symlink, workshop.txt and preview
i save lots of space cuz of this
before i learned about this i used to have x2 file consumed storage space and then b42 came so it should be x3 lol

but yeah check that out man

bright fog
glacial cedar
#

I keep getting this error on WorldEd, any ideas? Im new to modding this game

ancient grail
#

workshop folder wont work with nosteam.
i use nosteam to test MP by running multiple instances

#

the startup time sucks compare to solo, and you cant stay too long on the error window
if you do then the server will auto close for some reason

finite scroll
#

does anyone know of a way to test mods in b41 multiplayer as if you were a client, instead of host?

#

don't have any other people to test it

finite scroll
#

oh lol

finite scroll
#

i didn't read cuz iwasn't expecting it to just

#

be there

#

sweet, thanks!

ancient grail
#

literally before you asked

#

coincidence much the universe is aligned for you lol

finite scroll
#

i guess so

#

just burnt up my luck for like the next week lol

ancient grail
#

theres another way btw
if you launch a server outside the game

idk the process tho

finite scroll
#

oh like a dedicated server or sum that makes sense

finite scroll
ancient grail
#

yeah local host ip

bronze yoke
finite scroll
bronze yoke
#

there isn't a third 'host' state, all in-game host does is run a dedicated server in the background and connect to it

finite scroll
#

i need to make sure my things are being done properly

#

because i currently have issues that only affect non-host players

tough palm
#

this is an extremely random question

#

but where are the new voices for zomboid located

#

the grunts calls breathing sounds

#

ive poked around and skimmed through the usual 4 bank files of zomboid but i cannot find them thus far

#

unless i am stupid

#

i do see a pzwiki post on creating a new voice but where are the default ones

#

christ almighty i forgot to set the beta back to unstable after i was playing earlier

#

god damn it

nocturne kiln
#

https://steamcommunity.com/sharedfiles/filedetails/?id=3472099488 Hi everyone, I'm working on a small mod called The Asinsina Experience: The Last Survivor — it's a simple idea I've had in my head for a while, where your character ages as time passes in-game, eventually dying of old age if you survive long enough. It's not a big or complex mod, but it's personal to me, and I believe it brings a different kind of tension to Zomboid. I'm not a technical expert, so if anyone out there would like to help me test it, polish it, or give some advice — I'd honestly be very grateful. Thanks for taking the time to read this.

silent zealot
#

You start at 20, age one year per 6 months, and start to get effects at 60.. so that's 20 years of gametime before you see effects.

#

Are those values adjustable in sandbox options? (start older, age faster) otherwise I'll never see any effect... My longest game was 15 months.

#

(also, next time you push an update add the Build 42 tag)

vast pier
bronze yoke
#

sorry, doesn't this take 7300 real hours of playtime (minus some to sleeping) to do literally anything??

rigid sail
#

how would I make or edit a profession with the profession framework

silent zealot
#

Only 1800 hours if you play with 15 minute days

#

(15 minute days are horrible, by the way)

#

The ageing thing would be more feasible if you could sandbox tweak the numbers and played the mod I can't recall the name of that skips days so you can get through the seasons quicker

#

Still not something I'd expect a lot of play with in Zomboid, where the game could start with a doctor trelling you that you had six months to live and it wouldn't change most playthoughs

#

But as a roleplay mod, even if it does nothing you know it's there so there is merit to it.

rigid sail
#

how would I make or edit a profession with the profession framework

granite ginkgo
#

Man, I'm stuck on this for like 10 hours tired

red tiger
granite ginkgo
red tiger
granite ginkgo
#

nice, what will u use it for?

#

advanced mechanics system?

red tiger
#

Either an augmented Moodle / FX experience mod or advanced mechanics.

granite ginkgo
#

nice, keep it up

red tiger
#

The idea for an advanced mechanics system is to be able to take a look at parts of the car and use visual cues for quality, not be able to see a massive chart UI box.

#

This will require me to make models for each part and their quality or damage.

#

It's a lot of work however I just proved that it can be done this way effectively.

granite ginkgo
#

ya should add some stats under the model in that case, ig you already thought of that

red tiger
#

A ton of mechanical inspection is guesswork based on symptoms, appearances, smell, etc.

#

Some things are clearer and more straightforward than others.

granite ginkgo
#

sounds also (rod nocking)

red tiger
#

But you get the point.

granite ginkgo
#

yep

red tiger
#

I shouldn't see a grid of values to determine the car's worth.

#

It also makes for more tense situations when looking for a getaway car.

granite ginkgo
red tiger
#

You shouldn't be able to right-click a car in a tense situation and go "Oh the engine is at 25%. Good enough."

granite ginkgo
red tiger
#

All of this is speculative as I haven't made a plan of action or a roadmap.

#

PZ can definitely do mechanics a lot better.

#

A major area with a lot of potential for improvement and quality.

#

I put about a week of coding spare-time to make this point / show how one could go about this and made a few discoveries along the way that were previously thought to not be possible in Lua alone.

red tiger
#

A possible potential use of model rendering on UI is showing a valuable item discovery / pickup.

#

Like if you found a OP weapon or something important.

#

Drop it on the screen with text.

#

More things like weather FX and moodle FX can be made using shaders.

#

It'd be cool to see god rays from mostly-cloudy days in PZ.

#

What sucks is that'd require modifications to the Java code in the game to accomplish.

#

Render passes would need to be added and those are only possible to do in Java.

#

So much potential.

nocturne kiln
brave bone
# red tiger

These effects looks cool, if you have a head injury and bleeding from there, it can be a neat effect, and the frost thing during winter/snowstorm 🙂

brave bone
red tiger
brave bone
granite ginkgo
red tiger
#

I'm stacking and changing some override uniforms to the shaders rendering the model in the UI there to make the highlight.

granite ginkgo
# red tiger

bro, we listening to same ambien i think, like right now

#

SCP: Research Center???

red tiger
# granite ginkgo bro, we listening to same ambien i think, like right now

SCP: Research Center, Part 2 — 3 Hour Ambient with Rain Sounds
Track: Zerofuturism - Sparkles (2022)
Inspired by Etherium Ambient:@EtheriumAmbient
Monolith - Dystopian Ambient: https://youtu.be/35yYuDNPhtY

Bandcamp: https://zerofuturism.bandcamp.com/album/obsidian

If you want to tip me: https://ko-fi.com/zerofuturism
Join YouTube Membership...

▶ Play video
granite ginkgo
#

YES

#

good tastes man

red tiger
#

I've known of that account for years.

granite ginkgo
#

i love this one I swear

red tiger
#

If only he'd reupload the 2-3 hour silent hill slowed mix.

#

Was my bread and butter coding music.

#

5 dollars says I can add a drop-shadow to the wheel lol

granite ginkgo
#

same bro, i also got a silent hill playlist

granite ginkgo
# red tiger If only he'd reupload the 2-3 hour silent hill slowed mix.

My fogcore music : https://linktr.ee/armandtormo1

Just some soundtracks from Silent Hill 1 and 2 by Akira Yamaoka, fogcore version. I don't own the songs nor the video, only the editing. All rights to the respective owners.


00:00 The Day Of Night
1:49 Fear Of The Dark
3:09 Laura Plays The Piano
5:...

▶ Play video
red tiger
#

Ah that one

#

I get so insanely spiritual about my coding sessions.

#

Music sets the entire thing alone.

granite ginkgo
red tiger
#

Check out that whole artist.

#

Also check out CryoChamber.

granite ginkgo
granite ginkgo
#

also, I like the "nuclear winter/mojave" playlists