#mod_development

1 messages · Page 325 of 1

granite ginkgo
#

maybe on your taste too

red tiger
#

If you want the wildest ride of your life: https://www.youtube.com/watch?v=Px1cUKTa7dI

Dark Melancholic Ambient from God Body Disconnect, Full Album
👉Bandcamp: https://cryochamber.bandcamp.com/album/detune-the-tragic-light
👉Spotify: https://open.spotify.com/album/1mTtsFJ8neOmzoSsllWjLV

👉Tracklist:
00:00 The Voice of Depression
06:28 Portraits of Possession
15:43 Faraway and Far From Well
24:49 The Tragic Night When All S...

▶ Play video
#

@granite ginkgo this timestamp is where it gets good

red tiger
#

It's a ride and you sound like you'll enjoy it.

granite ginkgo
#

definetly

#

thx!

red tiger
thin swan
#

I tried playing around with this, but changing the weight there in the edit mode doesn't actually do anything, so it seems weapon weight is fully java sided at the moment

thin swan
small osprey
#

Careful, not all symlinking is created equal from PZ perspective 😬

ancient grail
thin swan
#

Waaaait a minute, you can have one item with two meshes that are attached to different bones and have strings between them? 😮
So a bow mod with animated string should be definitely possible then

ancient grail
#

the string is from vertex that isnt assigned to any vertex group

small osprey
thin swan
ancient grail
#

also happens to clothing mods . when you bump into other player the vertex stuck leaving a tethered line between 2 pvp players making it seem like a cheat

small osprey
#

I know you are contemplating whether to add "mounted archery skill progression" to your mod know 😄

thin swan
#

I feel like that could be exploited to make some cool mods, like nunchucks

ancient grail
thin swan
#

But I have so much other stuff on my plate that I'm not sure if I'll ever get around to making it

small osprey
drifting ore
#

I made a mod and want to adjust the poses. I've tried doing it in Blender a few times, but it doesn't work. Does anyone know what I need to do? The mod is based on the motorcycle mod.

bright fog
#

That's really cool

#

Very curious how you did the highlight

thin swan
small osprey
small osprey
#

not modding related but steam on Linux: Do you have issues since recently too with steam wanting to update gamepad drivers and restarting?

quiet rain
#

Okay, I'm getting a little confused because I had something like this working at some point.

local Guns = {
    'Base.Shotgun',
    'Shotgun', 
    }
    Events.OnPostDistributionMerge.Add(function() 
        if not isClient() then
            for i = 0, #Guns -1 do 
                local item = Guns:get(i)
                RemoveItemFromDistribution(Distributions[1], item, nil, true);
            end
        end
    end)

As far as I was aware, removing items from Distributions[1] should prevent the item from being put in the zombie loot pool, including items on preset outfits. In this case I'm testing the Police outfit by spawning them, but they still spawn with shotguns on their back.

bronze yoke
#

attached weapons don't use the loot system

#

see lua/shared/Definitions/AttachedWeaponDefinitions.lua

topaz tangle
#

https://outplayed.tv/project-zomboid/x0jvx4does anyone know why this happens when i get into two of the vehicles from my mod?
when i get into this model, aswell as another moden (not shown in the video) my whole screen goes black, is there a known reason for this?

#

link broke oops

quiet rain
plucky summit
#

Is ther an event hook that I can use when a client gets sync from IsoObject transmitModData?

#

I'm trying to store modData stuff into an IsoObject and did transmitModData, but I added a code below where it uses sendClientCommand, but it seems transmitModData is slower compared to sendClientCommand. The updating works but it only updates after a while.

#

the last resort would be to hook into OnTick.... eugh

bronze yoke
#

if you need something in the mod data immediately you can send it in the command

plucky summit
#

Oh. you mean send it in sendClient?

#

huh that actually works.

west dock
ancient grail
topaz tangle
#

i thought about that when i first encountered it, but ive done a bunch of edititing of the model so im not 100% sure

#

thank you for the suggestion though

thin swan
bright fog
#

That's what Ash used for its gun system, you can modify gun parts

#

That's really cool lol

#

You can even make the pedals ? 👀

thin swan
bright fog
#

hell yea

#

That's going to be incredible lol

thin swan
#

Hmm, seems to cause a bit of lag though actually, need to test more

bright fog
#

You could also add the option to just not have the animations

#

With mod options

#

I guess

thin swan
#

Yeah I'm not sure how to optimize it tbh, there's a stutter each time the rotation is applied, I'm guessing because it has to reload the model.
The way I do it is by basically creating a new instance of the attachment editor, and then change the rotation of the attachment using the functions as are used in the editor

drifting ore
drifting ore
# drifting ore

I modified an old animation file — changed the motorcycle riding pose into a broom-riding pose, but when I tried it in-game, it still shows up like in the video. It just freezes like that.

thin swan
bright fog
#

hell yea

keen fractal
#

can someone help me rq. I'm trying a woodenshelf test mod i'm making and i literally can't place it anywhere. The script, texturepack, and tiles is ready, i have the item in my inventory and it have the "place item" button, but i can't seem to place it anywhere. i'm kinda new to programming and i've been trying to find a solutions for hours. Below is the module script, please help me out. Thanks

{
    imports
    {
        Base,
    }

    item WoodShelve
    {
        Type = Moveable,
        Icon = woodshelf
        Weight = 5.0,
        DisplayName = Wooden Shelf,
        WorldObjectSprite = woodshelf_01_0,
    }

} ```
bright fog
#

I didn't even read what you said, but I bet that's your issue lol

#

Missing comma on the Icon line

#

At the end of it

keen fractal
bright fog
#

I'm not too familiar with tiles and how to debug them sadly

#

Perhaps ask in #mapping or the mapping Discord

keen fractal
#

ah alright, thank you

hollow jewel
#

hi, i'm starting creating mod but i have a problem adding a new item, anyone can help me?

and this is in mod.info

name=Coltello Multiuso
poster=poster.png
id=ColtelloMultiuso
description=Aggiunge un coltello multiuso alla tua esperienza di sopravvivenza. Utile come arma e strumento.
url=http://theindiestone.com/forums/index.php/topic/2011-how-to-use-the-upcoming-modloader/

this is in ColtelloMultiuso.txt file

module ColtelloMultiuso
{
imports {
Base
}

item MultiToolKnife
{
    DisplayName = Coltello Multiuso,
    DisplayCategory = Weapon,
    Type = Weapon,
    SubCategory = Melee,
    WeaponType = Knife,
    Weight = 0.5,
    MaxCondition = 10,
    ConditionLowerChanceOneIn = 15,
    MaxHitCount = 1,
    BaseSpeed = 1.0,
    MinDamage = 0.5,
    MaxDamage = 1.2,
    CriticalChance = 30,
    CritDmgMultiplier = 2.0,
    Knockback = 0.3,
    KnockdownMod = 0.0,
    SwingAnim = Stab,
    SwingTime = 2.0,
    Categories = Cooking, Sharp,
    Tags = Knife,
    TwoHandWeapon = FALSE,
    CanBarricade = TRUE,
    Tooltip = "Un coltello resistente e utile per diverse attività.",
    Icon = HuntingKnife,
}

}

[05-05-25 00:34:23.909] LOG : General , 1746398063909> ERROR: ItemContainer.AddItem: can't find ColtelloMultiuso.MultiToolKnife.

but i have this error, i can't understand why

icy night
topaz tangle
icy night
#

Any suggestions on how I can track the original light level without the increased light from the torches?

compact tendon
#

Hello, is there a file that has a list of the names of containers items can spawn in? I don't have a lot of knowledge when it comes to this stuff but I want to try to fix some item spawning issues with some of the mods I use

icy night
# hollow jewel hi, i'm starting creating mod but i have a problem adding a new item, anyone can...

Copy a vanilla item script like this. I dont see your weapon model/sprites for example ``` item HuntingKnifeForged
{
DisplayName = Hunting Knife,
DisplayCategory = Weapon,
Type = Weapon,
Weight = 1,
Icon = HuntingKnife_Forged,
AimingMod = 0.8,
AttachmentType = Knife,
BreakSound = HuntingKnifeBreak,
Categories = SmallBlade,
CloseKillMove = Jaw_Stab,
ConditionLowerChanceOneIn = 15,
ConditionMax = 10,
CritDmgMultiplier = 3,
CriticalChance = 50,
DamageCategory = Slash,
DamageMakeHole = TRUE,
DoorDamage = 1,
DoorHitSound = HuntingKnifeHit,
DropSound = HuntingKnifeDrop,
/EnduranceMod = 0.5,/
HitFloorSound = HuntingKnifeHit,
HitSound = HuntingKnifeHit,
IdleAnim = Idle_Weapon2,
ImpactSound = HuntingKnifeHit,
IsAimedHandWeapon = TRUE,
KnockBackOnNoDeath = FALSE,
KnockdownMod = 0,
MaxDamage = 1.2,
MaxHitCount = 1,
MaxRange = 0.9,
MetalValue = 30,
MinAngle = 0.65,
MinDamage = 0.6,
MinRange = 0.61,
MinimumSwingTime = 2,
PushBackMod = 0.01,
RunAnim = Run_Weapon2,
SplatBloodOnNoDeath = TRUE,
SplatNumber = 4,
SubCategory = Stab,
SwingAmountBeforeImpact = 0.02,
SwingAnim = Stab,
SwingSound = HuntingKnifeSwing,
SwingTime = 2,
TreeDamage = 0,
WeaponLength = 0.25,
WeaponSprite = HuntingKnifeForged,
Tags = CutPlant;SharpKnife;ButcherAnimal;HasMetal;Sharpenable;KillAnimal;ButcherAnimal;Forge_Crude_Blade,

    Sharpness = 1.0,
    OnBreak = OnBreak.HuntingKnife,
    ResearchableRecipes = Forge_Hunting_Knife_Blade;Forge_Large_Knife_Blade;Forge_Crude_Blade;Forge_Small_Knife;Forge_Fleshing_Tool,
}```
#

Idk if this is a correct subcategory. I think Stab is the right one subcategory = melee

icy night
brave bone
icy night
#

Walked in on the paparazzi

topaz tangle
thin swan
hollow jewel
#

why i can't find any mod item in debug item lists? i adedd my mod and a downloaded mod, but i can't find any mod element in item lists

#

module Lele
{
imports {
Base,
}
item ColtelloMultiuso
{
DisplayCategory = Weapon,
MaxRange = 0.9,
WeaponSprite = HuntingKnife,
MinAngle = 0.65,
Type = Weapon,
MinimumSwingTime = 2,
KnockBackOnNoDeath = FALSE,
SwingAmountBeforeImpact = 0.02,
Categories = SmallBlade,
ConditionLowerChanceOneIn = 15,
Weight = 0.5,
SplatNumber = 4,
PushBackMod = 0.3,
SubCategory = Stab,
AimingMod = 0.8,
ConditionMax = 10,
MaxHitCount = 1,
IsAimedHandWeapon = TRUE,
DoorDamage = 1,
SwingAnim = Stab,
DisplayName = Coltello Multiuso,
MinRange = 0.61,
CloseKillMove = Jaw_Stab,
SwingTime = 2,
KnockdownMod = 0,
SplatBloodOnNoDeath = TRUE,
Icon = HuntingKnife,
RunAnim = Run_Weapon2,
IdleAnim = Idle_Weapon2,
TreeDamage = 2,
EnduranceMod = 0.5,
BreakSound = HuntingKnifeBreak,
MetalValue = 30,
CriticalChance = 50,
CritDmgMultiplier = 3,
MinDamage = 0.6,
MaxDamage = 1.2,
WeaponLength = 0.25,
DamageCategory = Slash,
DamageMakeHole = TRUE,
HitFloorSound = HuntingKnifeHit,
ImpactSound = HuntingKnifeHit,
DoorHitSound = HuntingKnifeHit,
HitSound = HuntingKnifeHit,
SwingSound = HuntingKnifeSwing,
AttachmentType = Knife,
Tags = CutPlant;SharpKnife,
}
}
mod info
name=Coltello Multiuso
poster=poster.png
id=Lele
description=Aggiunge un coltello multiuso alla tua esperienza di sopravvivenza. Utile come arma e strumento.
i copied hunting knife, changed name, but the mod don't add the Coltello Multiuso

#

Directory: C:\Users\Lele\Zomboid\mods\multiuse knife

Mode LastWriteTime Length Name


d----- 04/05/2025 18:13 media
-a---- 04/05/2025 18:09 265 mod.info
-a---- 03/05/2025 14:04 1863332 poster.png

Directory: C:\Users\Lele\Zomboid\mods\multiuse knife\media\scripts

Mode LastWriteTime Length Name


-a---- 04/05/2025 18:10 723 ColtelloMultiuso.txt

please help

ancient grail
thin swan
hollow jewel
#

but don't add the module in the debugger item lists

#

if you want i can send you zip file

thin swan
hollow jewel
#

thank you, give me a sec

hollow jewel
sonic needle
#

if its b42, remove that URL in mod.info

had issues with them,
probs needs a \ or somethn

#

( entire line btw. )

hollow jewel
#

and i don't want multi version mod for the moment, i just tring to make something

thin swan
#

The ColtelloMultiuso script you sent is missing the module

hollow jewel
#

oh wrong file

thin swan
#

No problem I'll just copy from the one you pasted above

hollow jewel
# thin swan No problem I'll just copy from the one you pasted above

module ColtelloMultiuso{

imports{
Base,
}

item MultiToolKnife
{
    DisplayName = Coltello Multiuso,
    DisplayCategory = Weapon,
    Type = Weapon,
    SubCategory = Melee,
    WeaponType = Knife,
    Weight = 0.5,
    MaxCondition = 10,
    ConditionLowerChanceOneIn = 15,
    MaxHitCount = 1,
    BaseSpeed = 1.0,
    MinDamage = 0.5,
    MaxDamage = 1.2,
    CriticalChance = 30,
    CritDmgMultiplier = 2.0,
    Knockback = 0.3,
    KnockdownMod = 0.0,
    SwingAnim = Stab,
    SwingTime = 2.0,
    Categories = Cooking, Sharp,
    Tags = Knife,
    TwoHandWeapon = FALSE,
    CanBarricade = TRUE,
    Tooltip = "Un coltello resistente e utile per diverse attività.",
    Icon = HuntingKnife, // puoi riusare un'icona esistente
}

}

thin swan
#

Oh wait it crashed when i equipped it

hollow jewel
#

can I cry? XD

hollow jewel
thin swan
#

Yeah was about to say, there's some stuff missing

hollow jewel
#

now work, but the icon don't work

#

module ColtelloMultiuso{

imports{
Base,
}

item MultiToolKnife
{
    DisplayName = Coltello Multiuso,
    DisplayCategory = Weapon,
    Type = Weapon,
    SubCategory = Melee,
    WeaponType = Knife,
    WeaponSprite    =    HuntingKnife,
    Weight = 0.5,
    MaxCondition = 10,
    BreakSound  =   HuntingKnifeBreak,
    ConditionLowerChanceOneIn = 15,
    MaxHitCount = 1,
    BaseSpeed = 1.0,
    MinDamage = 0.5,
    MaxDamage = 1.2,
    CriticalChance = 30,
    CritDmgMultiplier = 2.0,
    Knockback = 0.3,
    KnockdownMod = 0.0,
    SwingAnim = Stab,
    SwingTime = 2.0,
    Categories = Cooking, Sharp,
    Tags = Knife,
    TwoHandWeapon = FALSE,
    CanBarricade = TRUE,
    Tooltip = "Un coltello resistente e utile per diverse attività.",
    Icon = HuntingKnife,
}

}

icy night
random terrace
#

Trying to update my gun mod to build 42. I already updated the folder structure and distributions but haven't changed anything about the item script or model script. Anyone know what's up?

module MATILDA
{
    model Matilda 
    {
        mesh = Weapons/Firearm/matilda,
        texture = Weapons/Firearm/matilda,
        
        attachment muzzle
        {
            offset = 0.0000 -0.0280 0.1300,
            rotate = 0.0000 0.0000 0.0000,
        }

    }
    
    model matilda_MatildaStock
    {
        mesh = Weapons/Firearm/matilda_MatildaStock,
        texture = Weapons/Firearm/matilda_MatildaStock
    }
}
gritty tapir
#

Hello everyone

I am trying to make a mod that displays an items fluid contents in the detail view of the inventory panel.
I am overwriting "ISInventoryPane.drawItemDetails" and it works mostly apart from some items when they are on the ground (not in player inventory or crate).

Like the "jerry can" and "gas can" for example, when I check "item:isFluidContainer()" it returns false, but only when the item is on the ground.

Can anyone explain why or tell me how to get the fluid contents I would appreciate it 🙂

tranquil kindle
#

Also did you specify your module in item script?

#

I prefer to keep my model txt files with module base

bright fog
random terrace
#

and yeah the comma didn't fix it unfortunately

random terrace
thin swan
gritty tapir
lean pelican
#

Hi, I'm a professional developer of many years and I'm learning how to mod PZ so feel free to provide complex answers to the following trivial issue.
I'm just trying to get a list of all items in the game with:
local allItems = getScriptManager():getAllItems()
This returns 4,974 items so all good so far.
I assume these items are types of item not actual instances of game items. However, they only seem to contain Module, Name and Type how do I get access to other properties?

bronze yoke
tranquil kindle
#

no comma here

tranquil kindle
#

Be that item script or model

bright fog
#

In between entries sure

#

But not when there isn't an entry after no ?

bronze yoke
#

in build 41 certain script types require the closing comma to parse

bright fog
#

Wait which missing comma are we talking about

bronze yoke
#

in no case does the closing comma cause issues so you should just always use it

bright fog
#

I think the confusion is here on my side

bronze yoke
#

i haven't retested those cases with build 42, the script parser was completely rewritten and consolidated so it very likely doesn't happen anymore (or is at least consistent everywhere now)

#

i believe models are one of the ones that caused issues

tranquil kindle
elfin moss
#

is the Storm modloader recommended for use? I'm a java developer and would love to use java instead of Lua for more complex actions and stuff, also since I don't know lua, but is it buggy or is it generally pretty stable?

bronze yoke
#

not really, it's absolutely ancient at this point, completely abandoned and was barely used at all even when it was in active development

elfin moss
#

huh dang, is there any active way to mod for java or is it just generally excluded

bronze yoke
#

@grizzled fulcrum has been working on something for a while, i think it's in the very late testing stages now?

elfin moss
#

hm alr

bronze yoke
#

yeah, it's literally fabric for zomboid

elfin moss
#

oh dang thats kinda sick then cs im an active minecraft mod dev

#

i hope it gets more improvements i can see that being very useful

#

dang even mixins seem to work according to the docs, thx for the pointer

bright fog
#

Aoqia has a thread for it

#

And shares info there

broken kayak
#

Would some people be willing to try out and test my Drag To Place mod ?
I have a B41 and B42 version, both with out of the box support for Inventory Tetris.

sonic needle
thin swan
#

New bike system is damn near done!
Got a sick new bike model with attachments made by @tranquil kindle who also helped a lot with setting up the attachment system

icy night
finite scroll
#

could anyone inform me of an event that fires every time the player spawns? something like OnGameStart except not just when you first load into a world

grizzled fulcrum
#

I should preface this by saying that Java mods in my eyes should only really be used to extend Lua capabilities, for example creating APIs or changing heavy parts of the engine.

#

There is literally no point and more work involved to add an item through Java than it is to just add it using the base scripting system

#

Is in the stage now where I just gotta fix bugs, test it a lot

finite scroll
topaz tangle
#

Finished the cabover UV and texture re-work stuff, got a few things I wanna change tomorrow but then I’ve just gotta figure out how to do the random texture colors, and do some more varients of these and some new stuff

wicked summit
#

how much would it cost to commission someone to remake this abandoned mod https://steamcommunity.com/sharedfiles/filedetails/?id=3047756983&searchtext=nos for b41 MP specifically. author not respond
it works as it is right now, and looks to be out of the box compatible with modded cars too (ki5, fili rhymes anim beta), as well as RUST (the mod that lets you determine what rng roll car parts spawn as/condition etc)

but it is broken in the sense that nos canisters in cars reset every reload (perhaps more than that) and being near a vehicle after installing the mod triggers constant flooding of some coordinate log spam - well, being near a nos canister anyway). just those problems for it as far as my testing went with my friend. but the author not reply when i asked to pay for fix

bright fog
small osprey
icy night
#

Would this make a good billboard for the Advert Trailer or does it not fit the game style

brazen spindle
#

I need a commision for creating a simple mod rn, if you r interested dm me.

random terrace
#

Anyone know how one would line up the bullet tracer with the muzzle of a gun? I can't seem to find where it's defined in the vanilla files, I would've assumed its an attachment just like the muzzle is but doesn't seem so

tranquil kindle
#

Rotation/Scale in blender i mean*

random terrace
tranquil kindle
#

To my knowledge everything still works in b42

#

All my guns and others that did their guns using my guide did not had such issue

random terrace
#

I made my model in like 2021, so been a while. I'll check it out though thanks 🛐

sonic needle
bright fog
#

Oh shit yea!

#

Pimp my bike hahalol

elfin stump
#

I am using getSoundManager():PlayWorldSoundImpl called from a client. Everything is working fine except that other players cannot hear the sound called. I thought that the SoundManager was synced over the server but it does not seem to be. So I need to find a way to call this sound on all players. - Any ideas?

#

^B41

#

Looking back on old chats, looks like PlayWorldSoundImpl is client side, not sure about others like, PlayWorldSound. Going to try this, if anyone knows if any of these emitters can be called from client and plays on server, let me know 🙂

elfin stump
#

I solved it by using getCell()getGridSquare and converting my player coords into a square and playing the sound using getSoundManager():PlayWorldSound instead of getSoundManager():PlayWorldSoundImpl.

plucky summit
#

How do you transfer modData of an object to the item when you pick a furniture up?

silent zealot
#

manually.

#

You just take the bits you want to move and recreate them.

#

You could do a recursive copy of everything in moddata if you wanted; it's just a lua table full of tables and basic lua variables.

plucky summit
#

Yeah, but... I don't know what the generated item is when you picked it up.

silent zealot
#

function ISMoveableSpriteProps:pickUpMoveableInternal in ISMoveableSpriteProps.lua is an example.

#

Interestingly, if there is a "movableData" table in modData that gets copied.

silent zealot
#

With ISMoveableSpriteProps:pickUpMoveableInternal() creating the newly created item (local item = self:instanceItem(_spriteName);) which is returnem, and near the end it removes the world object with _square:transmitRemoveItemFromSquare(_object)

#

So you have a have a few options, the neatest of which is probably to just put whatever you want preserved into the moveableData table of the modData,

#

Or you wrap that function and the prefix gets the info you want from the world object, then the postfix applies it to the created item.

#

Or (dont do this!) you replace the whole function and add your extra stuff in the middle. Big potential for problem with other mods/patches.

plucky summit
#

Thanks!

plucky summit
plucky summit
#

Yep, also works the other way around!

wheat oyster
#

Do you know anyone who is good at 3D modeling?

granite ginkgo
red tiger
#

New coding / modding music mix just dropped

#

Happy.

crisp drift
#

how to fix muzzle flash location? changing muzzle attachment location does nothing

tranquil kindle
grizzled fulcrum
ancient grail
#

hey @bronze yoke
sorry to bother you
you mentioned before that the function that fetches the zombies from the cell actually returns all the zombies right?
is there function to just get those within the current cell? or do i have to check if they are manually?

fleet bridge
#

on client it fetches what the client has loaded in

#

On server it will fetch all

ancient grail
#

thnx.. not exactly what i need then.. cuz i dont want to call that table multiple times
cuz i want to just fetch a single special zed on the players current cell

plucky summit
#

I am able to replace files with the same names from other mods?

red tiger
#

Progress with shaders and 3D model rendering today.

sonic needle
# red tiger

Think you could render a fancy player scene there?

red tiger
#

Like the health menu?

sonic needle
#

like makeup UI or char creator

red tiger
#

I had to do some unorthodox stuff to work around the limitations

grizzled fulcrum
thin swan
# red tiger

This is fucking fantastic, great job! Are you gonna make it a framework? I'd love to use something like this for bicycle upgrades, open a new panel with a 3D version of it where you can click on the attachment areas to place/remove/replace parts

thin swan
#

Hmm... Do zombies sometimes spawn with weapons equipped? Or just attached to them?

thin swan
#

So theoretically if I were to add the skateboard to that weapon pool, and then make an animset for the zombie that changes the walk animation to the skate animation when it's equipped... Would there be a small chance for skating zombies?

ancient grail
#

you just have to make the skateboard part of an outfit
i dont think theres a way to detect the skateboard only.
i think Even item visuals will return []

idk
but yeah outfit works for me so i never checked any other way to do it

thin swan
#

Hmm, yeah I guess that would be the tricky part, ah well, it's a silly idea that I'm not gonna spend too much time on 😄

plucky summit
#

How do I dynamically add a recipe? I want to add a recipe if a mod is active; do not add if that mod is not active. I've been looking everywhere and can't find anything.

sturdy gazelle
plucky summit
#

Yes. :)

plucky summit
#

Wel, I've made it to work now. The code worked all along. I was just testing with steam on. ded

#

when my mod is already published, and I am coding in ~/Zomboid/mods ded

sturdy gazelle
#

Ok good 👍

#

Btw, if it can be helpful, by looking at the code I have found the ActiveMods class which contains the getMods() method.

thin swan
# red tiger Yes.

Oh hell yeah dude, I can already see so many possibilities with it! Looking forward to seeing your progress!

bright fog
#

You already have them locally anyway

icy night
#

I'd like to create a very loud church bell sound that emits from churches, to a distance similar to house alarms. Does anyone have ideas on how I could do that?

#

I was able to get it to emit from the church podium but that cut off the sound when I went outside or into another room

silent zealot
#

There are two parts to a sound - playing the sound so the player hears it (I can't help much there) and WorldSoundManager.instance.addSound() which is what attracts zombies and optionally causes stress to the player, (e.g. zombies thumping on your door)

fossil bear
#

I managed to edit the texture of the isocursor before to something like this, which looks really nice, becasue it is thin

#

however when I zoom in, then it becomes kind of round, despite the texture being very much sharp

gilded crescent
#

I don't know if I can send a link to it here but the PZ Modding Community discord has a commision request section

#

I believe there's a link somewhere in this discord I just don't know where

bright fog
fossil bear
#

the texture is like 32 pixels what do you mean compressed 😭

bright fog
#

That's modded items tend to have blury icons compared to vanilla

fossil bear
#

so there's no way to like disable that?

bright fog
#

Well, I'm unsure if that's even the cause of it lol

#

Perhaps there's ways to cheat the compression with the way you draw the thing

#

Like it cuts those corners, why not expand those corners maybe lol

#

Might be a shit idea 😂

fossil bear
#

is it possible to change the color of the little squares for the skill levels?

fossil bear
#

thank you for your worthless message
I want to know how

bright fog
#

I won't teach you english again, you asked "Is it...?" The answer is yes or no to this type of question

#

Now I can assure that ifthis is the kind of attitude you have with people here you won't get any answers

tight blade
#

I mean I’ve not seen anyone change it in all fairness.
I want to imagine it is but I don’t know either, and can’t check atm since at work.

bright fog
#

So unless that menu is special and is Java sided for some reasons, you can modify it

south bear
#

kardrave I just want to take a moment to express my gratitude to the modding community here! kardrave

My personal projects are roaring in large thanks to you all kardluv

kardchalice You rock! kardchalice

tight blade
# bright fog Most of the UI stuff is Lua sided

Java sided just to spite us…
No idea though, curious too since I’d of thought by now someone would’ve changed it, I mean people changed moodles and can mod to change the language, least client side but that can still impact server such as modifying your whisper text

slim swan
silent zealot
#

sweeps pile of ashes under fridge to hide them

bright fog
#

And yet had always been doable

#

Like the recent mods by Rocco changing every UI which had always been doable and yet no one did it

#

Bcs it tends to require good knowledge on how Lua objects work and how the game works

silent zealot
#

And a bit of insanity to code a UI in LUA.

bright fog
#

Eeh I find it okay

bronze yoke
#

i like the ui api

#

it's very low level so you have a lot of control

#

most people are used to something higher level, which i guess XUI fulfills now

sharp crystal
#

Is there anybody who could help me? I just want to make the Health panel background more transparent. I always have the panel toggled on. Sometimes it stands in a way. I have looked at D:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\lua\client\XpSystem\ISUI

#

there is a file:

#

Could somebody pls point me to what has to be changed pls?

bright fog
#

Might be located in ISPanel. Or it's likely directly refered to in the class

tight blade
thin swan
thin swan
#

The easiest, but also not the cleanest way I can see to do it would be to hook into ISNewHealthPanel:new and pass some super low number like 2 as both the width and height here:

function ISNewHealthPanel:new(x, y, character)
    local o = ISUIElement:new(x, y, 2, 2) -- 2 as width and height

And then you hook into ISUIElement:drawRect to check if both w and h are 2, and if they are then you override them with the width and height you actually want, and then set alpha to a value less than 1

This would make any UI element that is 2x2 pixel big also transparent, but there shouldn't be any that exact size tbh

There might be something else that changes the w and h between creating the health panel and drawing it, but you should be able to trace where it changes by adding logs here and there in ISHealthPanel and ISUIElement

icy night
#

Being in a car is still considered outdoors right?

tired glen
#

I’d like to figure out how to make UI popup text
Would be cool to make things more arcadey with zombie health bars

sturdy gazelle
bright fog
#

I already modified some UI alpha values that way

bright fog
#

Also you can check the type of UI element due to how derive works which stores the UI element type in the class

bright fog
tired glen
slim swan
#

I just found out that TIS has a new UI API.

bronze yoke
#

yeah, it's called XUI, you can find it in client/PZAPI/

thin swan
storm trench
bright fog
bronze yoke
#

i've never heard anything like that

#

i played around with it alittle bit, seemed usable?

bright fog
#

TextDrawObject

#

Then you render it OnTick or smthg similar

#

Can be in UI render too

tranquil kindle
muted garnet
#

is there a mod that will allow you to load into a small world to quickly reboot?

granite ginkgo
#

Anyone has experience or used standardized vehicle upgrades (armor mod)???

broken briar
#

i have a question..

would it be insane if there was a mod that was an inspiration from the Smile 1/2 films?

red tiger
broken briar
bright fog
bright fog
#

What would the mod do ?

broken briar
#

npcs die while smiling

#

you get possessed by the entity

#

and you go THROUGH the symptoms like hallucinations

#

and as ur character's mental health declines and approaches day 7

#

the entity appears, you stand there, stunned and disbelief

#

and most likely accept your fate

#

an npc appears once you get possessed and so, you die

#

infront of it

#

and thats how the curse gets passed on

ancient grail
ancient grail
ancient grail
grizzled fulcrum
#

its called micro map

random terrace
#

could someone give me a pointer on how the containers like gun cases are defined in build 42? Before it was just SuburbsDistributions but I don't think that works anymore. It seems it's supposed to be BagsAndContainers now but I can't quite figure out how to use it

require "Items/SuburbsDistributions"

SuburbsDistributions["MatildaCase"] = {
        rolls = 1,
        items = {
            "MATILDA.Matilda",        110,
            "MATILDA.MatildaClip",        110,
            "MATILDA.MatildaClip",        50,
        },
        fillRand = 0,
    };
south bear
south bear
muted garnet
open oriole
#

if i'm changing the textures in the game do i have to make a script that tells it to use those textures instead or will they just replace it

#

also my thing will not show up in the mod menu, im on b42, maybe i put it in the wrong directory? or maybe i did it wrong? can someone help me?

silent zealot
#
  1. NPCs
#
  1. A graphical overhaul so you can see expressions in corpses
#
  1. A whole new game style so the player cares about one corpse in thousands
#

I don't think Zomboid is the best game for this goal.

silent zealot
#

Apparently adding a link to B42 Mod Options Example to the Modding resource list would reveal dangerous knowledge.

#

Does anyone know what the automatic "harmful" filter dislikes about a link to a steam workshop page?

terse delta
#

B42 mod

Issue: takes too long to refill propane tank at gas pump

I wanted to modify lua file myself to speed it up, but I coudn't really comprehend it. Can anyone help?

tired jackal
#

Would it not be a matter of changing this line?
self.action:setTime(self.takeLitres * 10)

silent zealot
#

Probably - any timed action will set the amount of time needed in :new or :start, what is odd is the timed action in this case is getting passed "time" and "duration")

function UGTakePropane:new( pump, tank, player, time, duration, istorch)

    --print( "keyword: UGTakePropane:new() called")
    local o = {}
    setmetatable( o, self)
    self.__index = self
    o.maxTime = time
    o.duration = duration
    o.character = player
    o.tank = tank
    o.pump = pump
    o.stopOnWalk = true
    o.stopOnRun = true
    o.istorch = istorch
    
    return o
end
#

(looking at UGTakePropane)

terse delta
silent zealot
#

maxTime is never used, and duration is multiplied by the number of "charges" that will be refilled in :start()

#

Quick fix is to change UGTakePropane:start() so that self.action:setTime(take * self.duration) becomes self.action:setTime(take * self.duration * 0.1) to be 10x faster. Which honestly is good enough for a quick change instead of working to understand how the function that starts the action decides on the "duration"

abstract kiln
#

can someone instruct me on how to solve this problem - like, for all of us? Here to do what must be done.

#

context if-needed

silent zealot
#

I hereby appoint you Head of Eurobeat

wheat scarab
#

I've made an FF7moto mod but there is something wrong with passenger's position in b42.
Please someone can give me an advise

silent zealot
#

And task you with creating Eurobeat mods for B42.

abstract kiln
#

on it, commander

#

thank you for giving me a proper directive

wheat scarab
#

mod'name is fenrir moto of FF7

silent zealot
broken briar
silent zealot
#

Did Smile work through mirrors? You could make a mod that does panic/jumpscare if you get too close to a mirror.

#

Though, I can't think of an efficient way to do this that isn't constantly checking the tiles around the player for a mirror everytime they step onto a new tile, but maybe that wouldn't be too bad

broken briar
#

If multiplayer was released today, it would make a pretty good experience

#

I would've changed the lore slightly like taking place a week after the concert (basically the Smile 2 ending)

silent zealot
#

I don't know the details of the movies, just a bit of the high level plot after seeing a short clip of it used in a meme

#

...so enough to pretend I know everyhing about it, by internet standards. 😛

broken briar
#

I see

#

I actually watched both films

silent zealot
#

In general, I'm not a big fan of horror.

broken briar
#

That's okay

silent zealot
#

And I've not been in the mood to wtach movies for a loooooooong time... so much stuff to watch in my backlog.

#

But if you do want to think about a mod based on it, take your list of things to include any think about how they would actually be implemented in the game, as in what specific thing would happen that you could tell someone to code.

#

e.g.: convert "you get possessed by the entity and you go THROUGH the symptoms like hallucinations" into actual game effects.

broken briar
#

Alright

silent zealot
#

It's worth keeping some modding notes with ideas, even if they don't work out now.

#

I like OneNote, Obsidian is free version of that, there are plenty of other solutions... you build up a collectionb of ideas and notes on how to do things

#

I think there is a lot of scope to make Zomboid into a horror game, because the default isn't (IMO) horror - it's survival/action.

#

Or maybe I'm desensitized after killing so many zombies I don't see the horror in them anymore. 😛

wheat scarab
white pulsar
#

yo anyone know of like good videos to learn how to mod pz i thought of a really cool idea that i dont think exists as a mod yet

silent zealot
#

The lua and script files inside the game's media folder, and downloading mods similar to what you want to see how they do things

#

And asking in this channel, where we can often point you to a place to look to get started.

#

What is your mod idea?

plucky summit
#

Is there a tutorial or guide i can read about models? I have an existing gun from another mod that I am attempting to fix the rotation of how it appears on the back (or attached to the player)

white pulsar
silent zealot
bright fog
#

Ah yea both pages

#

That wiki page will teach about the model section in your scripts

silent zealot
bright fog
#

That steam guide explains how to make guns and some specifics

silent zealot
#

There's a lot you can access regarding player health, but also a bunch of stuff handled in java that would be more difficult to work around.

bright fog
#

Explains how to get some health stuff

#

Not everything however

white pulsar
plucky summit
white pulsar
#

or like scabbing of small wounds with certain actions having a chance to pull the scab off and make you bleed again

silent zealot
white pulsar
silent zealot
#

Then you'd have to decide what that actually does and code that in every relevent place.

white pulsar
#

types

#

so like

silent zealot
#

Adding a blood type to players is easy, though until you have transfusion I don;t wee it mattering.

#

If you're on B42 you'd want to make a new fluid for each blood type.

white pulsar
#

hospitals would have emergency blood bags and if you had blood poisoning or almost die of blood lose you can give yourself a transfusion

#

if you have like

silent zealot
#

Don't they just stockpile type O blood?

white pulsar
#

no but i could just add that

silent zealot
#

So it doesn't matter if you have A/B/rhesus factor, you just get given type O

white pulsar
#

and id probably only have 3 types of blood because adding them all would make it useless almost

white pulsar
#

it would make the nurse and doctor class more useful because they would be better at giving themselves aid

silent zealot
#

That's an easy starting point: add a "blood pack" item and when you use it your general health (which is sorta "how much blood is left") improves, but it doesn't heal the actual wounds

white pulsar
#

yeah

#

also i think having low blood should make you similar to inebriated effect

#

maybe even anemia could play a role like less endurance if you have low blood

#

imah try learning to mod after work tmrw

silent zealot
#

put these ideas in your notes, then start coding. 😛

white pulsar
#

yeah i screenshotted my messages and sent all the links to my random files discord gc

silent zealot
#

You've got good ideas that you can build up a bit at a time: add an item to the game, make that item restore "general health",

white pulsar
#

yeah thats gonna be my first task

#

i have 0 modding experience so its gonna take me a while fs

#

all ive done is code on scratch </3

silent zealot
#

That's fine, we all had to start somewhere

bright fog
silent zealot
#

You can build a mod that does nothing other than showing up in the mod list (I think there is a template for this included with the game)

bright fog
#

The template in-game was not updatew to B42 I think

#

We have an unofficial one however from Chuck

tranquil kindle
#

Your models rotation and scale is important for both how it appears on back, in hands, on ground and how the attachments appear on it.

#

Not only it has to be facing correct side in blender viewport, but also have proper rotation/scale in object info tab

plucky summit
#

I will do this then, but I guess I don't have access to the models themselves huh. x.x

#

What's weird is that when you hold the gun as primary, it displays correctly. It's just that when you unequip it and have it attached to your back does the weapon look reversed.

tranquil kindle
#

Been this close to giving up

#

Especially when I was blender newbie

small osprey
small osprey
#

Did #1075939080287834113 turn into some sort of child-channel thing? thread? It's gone from the sidebar. The discord information hierarchy is still a bit puzzling to me

edit: Yes seems a child now. Not shown by default left. Okay.

bright fog
bronze yoke
#

it's always been a thread

bright fog
#

Sub to it and anytime a new message is sent there it gets shown to you

small osprey
#

Trying to provide a "getTrueElapsedSeconds" based on player actually playing (not paused). I was thinking to simply (getGameTime():getWorldAgeHours() * 3600) / getGameTime():getTrueMultiplier() however the multiplier defaults to 1 and still the game time ticks seconds fast.
I would hate to make a stateful tracking via onTick etc.
Is there a linear relationship between Multiplier and in-game seconds per real-world-second? I measured a factor of 24 between real world time and game time on multiplier=1 🙂

edit: answer here I guess: https://pzwiki.net/wiki/Game_time 24h = 1real world hour. so I can hard code that safely IMHO.

bronze yoke
#

you can't really hardcode that, it's a sandbox option

#

getTrueMultiplier is deprecated iirc

#

i think what you want is getUnmoddedMultiplier()

small osprey
#

And I just found that getGameTime():getMinutesPerDay() returns 60

#

indeed, whaty you said. getUnmoddedMultiplier() looks like the one. Like, any kind of player or item resource reacharge should go faster/slower.

I'll experiment with that, thank you!

#
    local hours = getGameTime():getWorldAgeHours()
    local multiplier = getGameTime():getUnmoddedMultiplier()
    if not multiplier or multiplier <= 0 then
        multiplier = 1.0  -- fallback to avoid div-by-zero
    end
    return (hours * 3600) / multiplier / 24
end``` works ~~as intended~~ 🫶 . Thanks!

Edit: But ignores speed setting
bronze yoke
#

oh, you shouldn't use the multiplier for this: it's a time delta, it won't be stable between frames

#

for calculating the total number of seconds passed i guess you'd just use minutesperday to convert game hours to real hours

small osprey
#

Instead of hard-coded 24 you mean? Yeah sure.

But I have to use one of the multipliers to be in sync with speed setting. I wonder why I didn't work even with the code above 🤔 .

bright fog
#

The Github guide on GameTime that albion made is more accurate to what most modders actually need

small osprey
#

appreciated. So, this kind of works for the purpose of calculating time between play-time-seconds, however, when the TimeDelta "multiplier" changes, the reported seconds make a "jump" - the then delta per measurement stays close to real time - but the jump can induce nasty conditions.

On a high multiplier it is like "If the player HAD run on this multiplier all the time since the start of the play, this would mean so many real time seconds"

    local hours = getGameTime():getWorldAgeHours()
    local multiplier = getGameTime():getTimeDelta() * (getGameTime():getMinutesPerDay() / 24)
    if not multiplier or multiplier <= 0 then
        multiplier = 1.0  -- fallback to avoid div-by-zero
    end
    return (hours * 3600) / multiplier / 24
end```
#

So I am currently assuming it is not possible to calculate stateless how much time was really played by the player in real-time seconds while normalizing for speed-setting.

Thats ok for me 🙂 just need to factor some failsafe into design.

bronze yoke
#

to clarify what the multiplier is, it's literally the difference in time between this frame and last frame: it's completely unstable based on framerate

#

the different multipliers put different modifiers on top of that

small osprey
#

hmm. alright.

bronze yoke
#

if you're trying to calculate the entire time that has passed since the start of the game, the multiplier is useless for that

#

if you're trying to count 'true' in-game time, you can't really retroactively know how much time was spent sped up

#

you could adjust for this as it happens with a running counter but trying to calculate it after the fact just isn't possible

small osprey
#

So I think I'll try with correcting via getPerformance():getFramerate() but keep working around the speed-setting with cannot be handled unless I'd be willing to collect data, which I really don't ..

bronze yoke
flat bluff
#

Hello, quick quiestion, this never happened to me before.
When i try to place the items i have created on the ground nothing happens, and this message pops up in my console.

LOG : General , 1746886646319> bugged action, cleared queue ISDropWorldItemAction LOG : General , 1746886646746> bugged action, cleared queue ISDropWorldItemAction LOG : General , 1746886651932> bugged action, cleared queue ISDropWorldItemAction

I've tried swapping models and redefining the references to the meshes but the problem persists. Anyone knows the possible causes for this bug?

I'm on build 41 btw.

icy night
#

Have y'all ever re-routed a recipe to make the output items spawn elsewhere? I'm wondering if it's possible to make them go into a nearby container instead of the player inventory

icy night
#

I think Ground Crafting mod makes them go to the ground tiles so maybe I'll check their script

flat bluff
bright fog
#

Hmm

#

The item spawns in your inventory right ?

flat bluff
#

I spawn it through the console in debug mode.

#

but it is craftable

minor summit
#

Does anyone know a mod/hack that would make possible taking over another player's character on an MP server? We saw that couple of weeks ago on our server and I'm trying to figure out how that was possible and ways to detect and prevent from happening again.
Some clues I gathered:

  • I think the hack works when a player dies. Somehow the hack allows you to take control of the character of another player that just died.
  • I believe it works with coop sessions, although our server settings disable it.
  • It allows to send messages on global chat as the other player.

Maybe not related but this person was also spawning zeds. I'd like to know how these hacks work and ways to prevent them, either on logs, lua scripts or server side java, I'd appreciate any ideas, thanks. 🙂

bronze yoke
flat bluff
#

MY issue seems to be when i try to place multiple units

#

If i try to place one no error occurrs and the item is correctly placed on the tile

#

But when i try to place multiple items close to each other the error seems to occurr

#

Yup, seems to be related to placing them near each other on the ground.

bright fog
#

Wait so the item does appear on the ground ?

bright fog
flat bluff
#

If i only place 1 it appears without flaw.
When i try to place multiple the bug comes into action.

#

When i try to place multiple near each other the message pops up on the console

#

like there's some sort of limitation to how many items i can place

#

Is Encumberance perhaps the reason ?

bronze yoke
#

yeah it could be

flat bluff
#

it had 1 7 encumberance, going to test with 1 encumberance to see if anything changes.

#

yup

#

Encumberance too high to place them so nearby

#

might be running out of "space on the ground"

bronze yoke
#

i didn't know that just errored but that makes sense

flat bluff
#

me neither

#

good to know i guess

#

I've learnt something new

bright fog
flat bluff
#

Thanks for hearing me out @bronze yoke .

#

You were my rubber duck 😄

bright fog
#

Haven't been able to find it tho ...

#

But it's recent

flat bluff
muted garnet
#

Is it possible to update character animation sets somehow other than refreshAnimSets()?

exotic orchid
#

Is there any way to add attachments onto a zombie without having to edit every single outfit?
Ideally looking to make a 75% chance it'll add between 1-3 items onto any zombie as an equippable clothing regardless of outfit

exotic orchid
exotic orchid
#

Thank you so much!

bright fog
#

You can modify zombies clothing directly with that

#

Pretty sure you can modify attached weapons with similar methods

#

And I know you can modify currently equiped body visuals such as bandages or gore

thin swan
random terrace
#

the latter

#

I already get my case to spawn but its always empty

thin swan
# random terrace I already get my case to spawn but its always empty

I'm not 100% sure, but looking at how vanilla seems to be set up you'd need to add your entry to the global BagsAndContainers table.
So something like:

BagsAndContainers = BagsAndContainers or {}

-- add your new bag
BagsAndContainers.MyCustomBag = {
  rolls = 1,
  items = {
    "MyItem",      2,
    "MyOtherItem",    1,
  },
  junk = {
    rolls = 1,
    items = { }
  },
}
random terrace
#

I tried something similar but probably missed something, I'll try

#

the require should just be 'Items/Distribution_BagsAndContainers' right?

thin swan
#

You don't have to require it

mint wraith
#

Hi KI5,

I hope you’re doing well! I’m a big fan of your Project Zomboid mods, especially the Humvee mod, and I would love to ask a few questions about your work. I was wondering if it would be possible to reach you on Discord to discuss some details?

Would it be okay if you could share your Discord username so we can connect?

Thank you in advance, and best of luck with your mods!

Kind regards, VTEC

bright fog
#

He will never see your message that way

mint wraith
#

then how?

random terrace
# thin swan You don't have to require it

didn't get it to work with this at least 😮‍💨

BagsAndContainers = BagsAndContainers or {}

    BagsAndContainers["MATILDA.MatildaCase"] = {
        rolls = 1,
        items = {
            "MATILDA.Matilda",        110,
            "MATILDA.MatildaClip",        110,
            "MATILDA.MatildaClip",        50,
        },
        fillRand = 0,
    };
bright fog
#

Bcs, I've personally never seen KI5 around here or anywhere in fact

mint wraith
bright fog
#

Doesn't the guy take commissions ? He should have some socials somewhere then

mint wraith
#

and i dont have money

bright fog
#

Then he doesn't want to get contacted

coarse sinew
bronze yoke
#

keep in mind that modders who make themselves hard to contact do it on purpose

knotty path
#

so i cant find txt file with building recipes, for example a wooden wall, is there anything like that, if not then what should i search for?

knotty path
#

no, i've searched

#

everything

#

there are recipes but for handmaking stuff

#

not building objects

bright fog
#

Yea bcs they aren't recipes

#

Tho I'm gonna be honest idk where they define those

#

My guess is a Lua file

#

It won't be Java

knotty path
#

i think i have one lua file that is responsible for the thing that i want to change

#

i mean the amount of twigs

#

u need to make a campfire

#

because stones are too much

#

i want to change just that

#

but i cant

#

in previous update u had to add just one recipe

#

in txt file

#

now you have to code whole game from scratch

bright fog
#

And trust me, that's clearly for the best

#

Bcs previously anything related to building was dogshit and most of the time required completely incompatibility with any other mods doing that too

#

You just got to look elsewhere than where you're used to, that's it

knotty path
#

ik, just kidding

thin swan
#

You just add a recipe to media\scripts\entities\walls to make it buildable

knotty path
#

anyway, maybe somebody can help me

thin swan
#

For example I have buildable custom gravel floor tiles, the file is \media\scripts\entities\walls\entity_floor_gravel_diagonal.txt and looks like this:

module Base
    {
        xuiSkin default
        {
            entity ES_GravelFloorDiagonal
            {
                LuaWindowClass  = ISEntityWindow,
                DisplayName     = Gravel Floor Diagonal,
                Icon            = Build_FloorGravel_Diagonal,
            }
        }

        entity GravelFloorDiagonal
        {
            component UiConfig
            {
                xuiSkin         = default,
                entityStyle     = ES_GravelFloorDiagonal,
                uiEnabled       = false,
            }

            component SpriteConfig
            {
                isThumpable     = false,
                OnIsValid       = BuildRecipeCode.floor.OnIsValid,
                OnCreate        = CustomFloorOnCreate,

                face N
                {
                    layer
                    {
                        row = blends_street_01_gravel_path_7,
                    }
                }
                ... more faces
            }

            component CraftRecipe
            {
                timedAction   = EmptyBag,
                time          = 100,
                category      = Outdoors,
                ToolTip       = Tooltip_craft_gravelFloorDiagonalDesc,
                inputs
                {
                    item 1 [Base.Gravelbag] flags[Prop1],
                }
            }
        }
    }

And it works to build from build menu in-game

bright fog
#

Tho they want to change the campfires, so maybe that's different

thin swan
bright fog
#

👌

random terrace
#

mmh, seemingly vanilla gun cases and ammo boxes are also empty for me, could it just be bugged or something

#

like surely these shouldn't be empty

#

or does lootzeds "refill container" break containers like this

knotty path
#

ty for help, i hope its gonna work

#

have a peacefull evening yall

silent zealot
#

I had a quick look once and it seems the various "ammo container" items have a generic version and a version for each calibre, but only the empty generic one is in loot tables and I can't see anything that would change it to one with stuff inside.

strong jasper
#

Hello, everyone. I have a question. I'm trying to create an object in which you can insert a battery and take it out. I have found only information about creating an object with Type = Drainable, but I can't remove the battery from it or insert it

silent zealot
#

B41 or B42?

strong jasper
#

41

random terrace
silent zealot
#

From memory: you need a drainable item, a seperate item that has no battery, and recipes to put battery in/out

#

Have a look at the vanilla flashlight, both item script and recipe script

strong jasper
#

Thank you, I'll look at it now

silent zealot
#

The recipe script will call a function that copies the charge from battery to/from the item

#

B42 does it better; no need for a seperate item when there is no battery and if you add the correct tag it will get included in the generic add/remove battery recipe.

strong jasper
#

I see. I will keep in mind ❤️

bright fog
#

That doesn't work drunk

#

Last time I checked, they still haven't fixed it and removing or adding a battery isn't done properly

silent zealot
#

Oh, damn

#

I thought they had 😦

bright fog
#

Unless they did fix it in the last updates but to my knowledge no

#

I haven't checked the past 2 updates

#

I think

stone garden
#

trying mod for serious this time a bandits submod basically

silent zealot
#

What will the submod do?

stone garden
#

and will fit with the ingame start date

#

crazy fight showcase

#

and the events from this mod end on day 28

#

also a reference to the lore character jackie jaye

#

after a week the army becomes hostile

muted garnet
#

Is it possible to update character animation sets somehow other than refreshAnimSets()?

thin swan
muted garnet
thin swan
thin swan
muted garnet
#

Thank you, I got it

muted garnet
thin swan
muted garnet
thin swan
thin swan
# muted garnet yep, like runspeed

Ah okay, what you want to do is to pass a custom variable as the SpeedScale like <m_SpeedScale>YourVariable</m_SpeedScale>, and then update that variable using player:setVariable("YourVariable", yourSpeedValue)

#

You can also pass a scalar, for example <m_Scalar>YourScalarVariable</m_Scalar> which will also affect the speed without changing the base speed scale, it's better as a modifier

muted garnet
# thin swan You can also pass a scalar, for example `<m_Scalar>YourScalarVariable</m_Scalar>...

regarding m_Scalar, please tell me, I tried to increase the vanilla walking speed, but the speed did not increase, what is the reason?

path: Animsets/player/movement/defaultWalk.xml

<?xml version="1.0" encoding="utf-8"?>
<animNode> 
<m_Name>defaultWalk</m_Name> 
<m_AnimName>Bob_Walk</m_AnimName> 
<m_BlendTime>0.20</m_BlendTime> 
<m_SpeedScale>1.04</m_SpeedScale> 
<m_Scalar>WalkInjury</m_Scalar> 
<m_Scalar2>WalkSpeed</m_Scalar2>
<m_Scalar3>MyValue</m_Scalar3> <----- Added this line 
<m_2DBlends referenceID="1"> 
<m_AnimName>Bob_WalkLightLimpR</m_AnimName> 
<m_XPos>0.50</m_XPos> 
<m_YPos>1.00</m_YPos> 
<m_SpeedScale>0.80</m_SpeedScale> 
</m_2DBlends>
...
small osprey
#
 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN/../lib:/home/tim/Qt/5.15.2/gcc_64/lib]``` 

uhm 😄. Hi Tim! 👋
bronze yoke
#

i think you can only have 2 scalars

muted garnet
bronze yoke
#

you could modify the value of one of the variables that is already being used as a scalar

#

the final speed is just going to end up being SpeedScale * Scalar * Scalar2 so if you multiply one of the scalar variables by your own speed you'll get the same result as having 3

thin swan
#

Also note that to get the variables, you have to use the correct getter that matches the type of value you're trying to retrieve, like getVariableFloat, getVariableString, getVariableBoolean

muted garnet
#

@bronze yoke @thin swan
using the example with walkSpeed: changing WalkSpeed ​​and adding prints, it is clear that the variable changes to my value and instantly changes to the vanilla value

player:setVariable("WalkSpeed", "5.0")

bronze yoke
#

vanilla updates these every frame, so you will have to do the same

muted garnet
#

then it's easier to just replace SpeedScale, which doesn't require constant updating. That's why I asked about a way to instantly update the animation speed

thin swan
# muted garnet then it's easier to just replace SpeedScale, which doesn't require constant upda...

I would probably just make a new xml that copies the defaultWalk.xml but replaces the SpeedScale with your own value, and then keep everything else the same.
Just add a condition and condition prio like

<m_ConditionPriority>10</m_ConditionPriority>
<m_Conditions>
  <m_Name>MyModActive</m_Name>
  <m_Type>BOOL</m_Type>
  <m_Value>true</m_Value>
</m_Conditions>

And then when you init your mod you do player:setVariable("MyModActive", true)

thin swan
#

Been having some users with a weird bug when using my bike that I can't seem to reproduce, anyone know what could be causing it?

The bicycle is a weapon, and the wheels are attachments for the weapon. When the bike is equipped it's showing just the frame (bicycle weapon itself) without the wheels even though they are attached.
When dropping the bike, instead of showing the 3D model, it shows a sprite.
So it's something with how the models are being loaded, but it's odd that only some users (4 reported so far) have this issue, and I can't reproduce it when using the common Lua mods between the users.

I think it might be a Java mod that they play with or something, but wanted to see if anyone here has experienced a similar bug.

bright fog
#

Hmmm

#

@sonic needle might know

thin swan
#

Got some new feedback, it has to be a mod conflict, I had a user with no java mods that made a save with just the bike and it works.
Gonna keep trying to narrow down which one it is

tranquil kindle
#

I can't see its model and since the model is not there when in hands, it will cause it to become sprite (the bike i mean)

sonic needle
thin swan
#

But I will narrow down which mod is causing it and see what's going on

sonic needle
#

it seemed to be sensitive to distance, hurting the sprite swap

thin swan
tranquil kindle
#

Hmmm...

#

Why would that be

bright fog
#

Oof

tranquil kindle
#

I literally have no idea Why would it cause issues to be fair

#

Empty Context menu translation would do that?

#

Thats the only thing i could think of

#

UNLESS you're somehow using same guid from my backpacks in your stuff?

thin swan
tranquil kindle
#

It should not cause issues on its own though

#

I want to help because im genuely curious to why it doesn't work together

small osprey
#

anybody has an AppImage for TileZed by chance? 🫠 I got it running once on NixOS but more by accident and no amount if FHS-wizardry can bring it back it seems ...

thin swan
icy night
#

How do I go about connecting this line if currentlyFullyDressed and not previouslyFullyDressed then player:Say("Fully Protected") with other translation options.

neon bronze
#

you need translation .txt files for that and call getText(<name of translation>) in the last line

icy night
#

Ok, thanks

small osprey
#

I want these 4hrs of my life back. OMG. NixOS in all its deterministic beauty requires patience to dance with properly.

Brings up the UI of TileZed. Though I haven't tested what might crash.
Good to know: even recent glibc works. No need to tinker with versions. No need to hard-code specific version hashes of any of the dependencies either 💆‍♂️ . Kudos to the author (RingoD? EasyPickins? Tim?) for not going too fancy.

shell.nix attached.

If anybody feels like taking over from here, transforming to a FHS environment and from there to an AppImage .. others may be thankful. Me, I need a drink.

p.s.: You may need to patch the TileZed binary with patchelf though.

rich dagger
#

Is it fine to advertise/ask for help in the context of a modteam in here?

plucky summit
#

How do I make a ISCollapsableWindow resizable?

small osprey
rich dagger
#

Oh its increddibly developed, not to toot our own horns but IMO the biggest total conversion mod ever so far.

small osprey
small osprey
stone garden
#

the description added something random

#

updated description

rich dagger
#

Hello there! I'm making this post here to ask for help in regards to basic XML coding and balancing. I am apart of a mod team developing probably one of the largest if not largest conversion mod zomboid has ever seen, currently the map is titled "Volga Ural" which is set in a period accurate 1993 Russia. Currently our team is a tad over burdened as we do not have many members, and we are looking for help in regards to clothing, weapon, and item XML. Basic balancing and testing. We have many high quality assets ranging from incredible clothing models and textures, vehicles to impressive weapons and basic house hold items that enrich the atmosphere. Thats not even counting the 100s, if not a thousand(s) of custom tiles for the map that will bring a fresh and new experience to the world

Prior experience is heavily preffered, feel free to reach out via dm!

Any work done for the mod would recieve credit and also contributor status of course!

#

There is a million things I could send but I dont want to take up the channel. There is like 20+ cars, 20-30 weapons, tons and tons of clothes, and all of it is insanely historically accurate. We just lack the time to polish the basic levels of code

bright fog
rich dagger
#

Thanks man, can you DM me a link?

bright fog
#

Click the link I sent

#

Even if it showns unknown

coarse sinew
# plucky summit How do I make a ISCollapsableWindow resizable?

Just call :setResizable(true) inside your class's constructor (new).

function MyWindow:new(x, y, width, height)
    local o = ISCollapsableWindow.new(self, x, y, width, height)
    setmetatable(o, self)

    o:setResizable(true)

    -- your custom setup...


    return o
end
half remnant
plucky summit
crude hedge
#

Anyone have a massive modlist that works?

small osprey
coarse sinew
dusty flint
#

anyone happen to know whats wrong with my distributions?

lament zodiac
bronze yoke
dusty flint
bronze yoke
#

are you in build 41 or build 42?

dusty flint
#

41

bronze yoke
#

iirc it was capitalised BedroomSideTable in b41

#

i remember hearing somebody complaining about that

dusty flint
faint ingot
#

We need a weapon mod that is just a Pringles can stuck on your hand.
I'm 95% sure there were Pringles in '93.

stiff jetty
#

We are looking for a Lua developer, preferably in understanding the structuring and architecture of the project. If there is someone with experience, please contact me in private messages.

ancient grail
#

#1070852229654917180 message
i was trying to figure out if character can always access center square of the current cell
it turns out , its not . you need to use getOrCreateGridSquare.() to access it

you only get
36100 / 90000

silent zealot
bronze yoke
#

isocell is not a cell, the game doesn't load in cells, it does not care about cells at all, they exist only for map load order and some limited meta stuff

#

isocell is just the currently loaded area around the player (some people call it the 'reality bubble'), it actually has nothing to do with map cells

ancient grail
#

well if it doesnt then ive manage to create my own version of it iguess
i just need to box the world bssically

to explain in further details
my goal is to make a queen parasite zed nest with a limit of
1 per cell(if theres no such thing in the game the lets make it so that we limit them 1 every 300x300)

ancient grail
#

also

 local pl = getPlayer()
local x, y, z = round(pl:getX()),  round(pl:getY()),  pl:getZ() or 0

print( getCell(x, y, z))
#

how come this doesnt change untill youre on the next cell based on the maps divider?

bronze yoke
#

it never changes, isocell is a singleton

silent zealot
ancient grail
bronze yoke
#

in a code sense they don't really exist

silent zealot
#

If you have a table of all next locations because the mod needs that anyway, then it's easy to tell if any given location is within 300 of those.

bronze yoke
#

you can still divide things by 300x300 areas if you want to but there are no cells codewise except from some meta stuff and some map loading logic

#

which is why you can't always access the middle of the cell: the game doesn't load in cells

silent zealot
#

And I'm pretty sure you will need to track the locations manually, because you can't rely on the nearest nest being within the "isocall" aka loaded world section.

bronze yoke
ancient grail
ancient grail
#

try to print that in debug mode

#

im not making this up.. ill screen record

bronze yoke
#

why would it? there's only one cell, it doesn't need coordinates to distinguish them

#

you'll notice even in a decompile of e.g. IsoGridSquare's getCell() it doesn't have any mechanism to return 'its' cell, only *the* cell, because there is only one

#

it's very likely that in an older version of the game there actually was more than one cell and it did actually correspond to map areas (the structure of the code really doesn't make sense as it is, it's understandable so many people are confused about it) but that simply isn't the case in b41 or 42

ancient grail
ancient grail
#

ok youre right i tested it now

#

it doesnt change the output

#

its jsut 1 cell

#

so i think its better to not divide 300x300 since the radius of the loaded chunk isnt 300x300

silent zealot
#

just use math.floor(x/300),math.floor(y/300)

#

like your own set of 300x300 cells

muted garnet
#

Is it possible to make it so that the zombie does not react to the player's footsteps or reacts in a smaller radius

uneven crescent
#

Hi. I'm trying to make my very first mod, a custom trait mod, but I've realized the trait I want to make is more complex than I thought, and I can't find any helpful instructions on the internet to do what I want to do.
I'd like to make a trait that keeps the Unhappy moodle at a default resting level of "Sad", but I have no idea how to write that in the lua file. I know how to do really basic stuff like add an extra beginning level of XP in a skill, but that's all.

silent zealot
#

all the volumes are in there, as well as the the WorldSoundManager.addound (which is what actually attracts zombies)

#

I think you could make the player completely silent by removing the footstep events from the animation xmls, but you'd need to do that for every animation that involves moving around and I don't know if there is any way to do that programatically and if tehre isn't you'd be replacing every animation xml related to walking/sneaking.running/sneakrunnig/limping/etc

#

Actually - you could also make it quieter by changing the parameter for the footstep event, change walk to sneak_walk etc.

muted garnet
#

very thanks!

muted garnet
#

Is it possible to prevent a knife from getting stuck in a zombie or to reduce the chance of it getting stuck?

silent zealot
#

That's done javaside in CombatManager:

#

You might be able to make a mod that detects when it has heppened and puts the weapon back in the player's hand

solar rover
#

Any simple way to make sure a mod triggers just after server start? I want to make sure my safehouse data backs up at each restart event. Thanks all!

bronze yoke
#

all code runs immediately at server start

#

if you want to do things then, just don't make your code wait on an event or anything

solar rover
#

thx albion

drifting ore
flat bluff
#

Do we have any sort of documentation for build42 modding?
I haven't found much online so far, only talks aobut how different it is without elaboration on why or what.

bronze yoke
#

it's not that different

#

most information on the wiki is for build 42

#

for anything else, documentation is lacking for every version of this game 😅

flat bluff
#

await there are javadocs for zomboid !!!

#

You just left me speechless

#

Thanks a lot!"

#

You're always helpful Albion. Thank you. You absolute treasure.

flat bluff
#

I'm getting that now Recipes changed a lot. I've seen the example "full" in their game files. Does it need anything else aside from the new syntax? I've seen mention of a recipe handler but haven't found examples in their files.

plucky summit
silent zealot
#

Depending on what sort of modding you're doing, it can be very helpful to look into the Java code alongside the game's lua code.

coarse sinew
wicked basin
#

Hello im new to the game and i was wondering if someone is currently working on a mod that brings Wonder weapons from cod zombies to PZ?

simple helm
#

anyone good with audio sounds in game ( vehicle )? if someone can show me how to replace the audio for engine etc that be great bc adding sound doesnt just cut it

drifting ore
#

I will be up in a minute and have a look after

drifting ore
forest herald
#

How do I convert the value from readLine() into an integer/number?

#

😐

#

Ah, tonumber()

mellow frigate
# forest herald How do I convert the value from readLine() into an integer/number?
local line = reader:readLine()--supposing you got your reader
if line then
  local numberStr = line:match("^([%d\.]+)")--looks for a number at the start of the line. remove '\.' if you do not want floating point numbers decimal parts to be valid
  if numberStr then
    local number = tonumber(numberStr)
    --now use your number for whatever
  end
end
burnt quartz
#

Is it possible to create a mod that prevents a door from closing if there is a corpse or zombie in the direction of the door's opening?

burnt quartz
stiff jetty
silent zealot
#

Sounds too much like a job to me. I play Zomboid to escape from Trello boards. 🤣

burnt quartz
#

C:\Users...\Zomboid\mods\mydoormod\Contents\mods\mydoormod-(mod.info)\42\media-(mod.info)\lua\client-(mydoormod.lua) does it correct?

thin swan
silent zealot
burnt quartz
#

C:\Users...\Zomboid\mods\mydoormod\Contents\mods\mydoormod-(mod.info)\42\media-(mod.info)\shared\TimedActions\ISOpenCloseDoor.lua like that?

silent zealot
#

No.

#

You don't want to just copy an existing lua file, you want to make yoru changes as minimal as posisble to avoid issues with other mods.

bright fog
silent zealot
#

If you can patch functions with a prefix or postfix that is best, if you need to replace something replace just the actual functions you need not the entire file.

#

And use a different filename, because I can't remember if duplicate lua names gets treated like duplicate script names (i.e.: completely replacing the vanilla files)

bright fog
#

Or put it in a different folder

silent zealot
#

You don't want to be the modder that breaks everyone's games when the devs add underpants made out of trash bags because you completely replaced the clothing files and now the new recipe is broken.

#

At a guess, your lua file will start with require "TimedActions/ISOpenCloseDoor and you just need it to have :

require "TimedActions/ISOpenCloseDoor"

function ISOpenCloseDoor:isValidStart()
    --<code goes here to check if there are any corpses on the square self.item is in>
end
#

You could replace isValid() as well but I think that won't matter unless you somehow kill a zombie on that square while in the middle of doing the action.

plucky summit
burnt quartz
#

Zomboid
└── mods
└── mydoormod
├── mod.info
└── media
└── shared
└── TimedActions
└── MyOpenClosePatch.lua like that?9889pain

bronze yoke
bronze yoke
#

isValidStart is only called if the action is starting after another action has completed

#

so if you queued multiple actions, the first one doesn't call isValidStart, but the second and onwards do

#

timed actions are really really dumb imo and require a lot of repeated code

#

isValidStart is basically used to ensure that the starting conditions of the timed action are *still* valid, if it's the first action in the queue then it was already checked by the context menu or whatever else offered the action in the first place

#

an api for timed actions that actually makes sense was something i was working on for starlit but i got sidetracked

silent zealot
#

Also, you're on B41?

burnt quartz
#

42

silent zealot
#

Then you need a different folder structure - see the stickied messages in this channel for details.

#

Oversimplified:

+mods
+MyModName
+common
+42

leave common empty, put all files/folders into the 42 folder instead of the MyModName directory.

silent zealot
#

The door mod would therefore replace isValid(), instead of adding isValidStart().

burnt quartz
#

i guess

valid kite
#

hey.. anyone could help me ? i have no clue how to use my fbx models for weapons.. i tried converting them to .x but i see other mods are using textures and there are no materials mentioned in their .x models, if i use some online converter it contains it... btw does the game support fbx as weapon models?

flat bluff
flat bluff
#

If you don't have a texture a weird thing shows up.

#

There are also "anchor points" that are important. Afaik in blender the gun should be looking barrel up. But I bet someone more experienced with guns can tell you much more and more specific.

valid kite
flat bluff
#

what scale are you exporting ?

#

The model might be so damn big compared to everything else in game that it seems like nothing is working but the problem might be that you actually might be "inside" the giant model.

valid kite
#

it says 1m long in blender

#

compared it to some other mod models

flat bluff
#

let me check mine

bronze yoke
#

to be sure do you have a model script?

valid kite
#

i do.. i just took other working mod and trying to edit it

#

can i just use fbx? or i need .x?

bronze yoke
#

you can use fbx

valid kite
#

okay, thanks.. so im doing something wrong somewhere... :\

#

ty anyways guys

flat bluff
#

1m looks about right so scale is probably not it

valid kite
#

yea, i compared it to other mod models.. 😄

#

did exactly same rotation and stuff but nothing..

#

ill try something later thanks 🙂

flat bluff
#

that's great. Let us know what it was if you find out! Might help someone else.

valid kite
#

also, if im using fbx does it need to be in models_x folder?

flat bluff
#

Yup

valid kite
#

or models?.. in models folder there are just .txt

#

okay ty

flat bluff
#

I always placed them in models_X

valid kite
#

kk thanks alot 🙂

flat bluff
#

np!

bronze yoke
#

the models/ directory only supports a legacy format that shouldn't be used anymore

valid kite
#

well the issue was, that even the mod i learned from doesnt show the model haha

#

ill get inspiration from some other mod thanks 😄

flat bluff
#

Does someone know why indiestone migrated the items to the categorized files? Is it just a sort of cleaner architecture or is it now a requirement?

bronze yoke
#

it's just cleaner

flat bluff
#

Fair enough. It looks much better for sure.

#

im guessing the same for the recipes (?)

bronze yoke
#

yeah

#

all script files are equal, splitting is always for organisation

flat bluff
#

I thought so, time ago I dissected someone else's mod and it was items, recipes, models and all the script.txt stuff fused together.

icy night
#

Hey all. I'm trying to make a function that checks if the player is wearing thick, winter clothing that covers the whole body. I currently check by clothing type (FullSuit, JacketHat, etc) but is there a better way? Specifically to make sure the player doesn't cheat the system by wearing flip flops if I require them to wear shoes lol

bronze yoke
#

blood locations might be better since they correspond directly to covered areas, but flip flop loop holes would still work

icy night
#

Yea

#

Maybe I can fix that by requiring a certain level of insulation

keen venture
#

question about using fbx vs .x files does it matter? I use maya natively and cant export .x with it so have to go through blender but noticed the game is also using fbx for assets. all the clothes are x for instance. can i use a fbx or for that or is it picky? I checked the wiki but couldnt find a clear answer on if it matters

bronze yoke
#

there is no benefit to using .x files

#

you can use fbx anywhere you can use x

keen venture
#

awesome thanks so much! .x is so troublesome to work on nothing imports it natively glad i can use fbx

bronze yoke
#

exporters are rare too 😅 only a few mods use .x, and that's probably because they don't know they don't have to

silent zealot
#

You can get a ThermalNode for each body location and look at getInsulation() and getWindresist()

#

And if you want to be really detailed, skinSurface/wetness

icy night
#

Tyvm

simple helm
flat bluff
#

Does Build 42 require something more than the craftRecipe definition ? I am trying to define a recipe for a custom item and can't seem to get it to work. Working fine in B41, no clue about B42

#

I've seen the definition changed but no clue what im doing wrong

bronze yoke
#

it shouldn't

flat bluff
#

Roger that. Thanks.

#

I've noticed the new recipe structure seems more complete. It can give more than one result now right ?

bronze yoke
#

yeah

#

most of the dumb things you needed to use lua for can now be done in the recipe itself

flat bluff
#

Pretty cool. A welcome change for sure.

icy night
#

Do holes in clothing and the items general condition lower it's insulation value?

silent zealot
#

ThermalNode accounts for holes and condition

#

hole == zero insulation in that location

#

condition == reduce insulation

crimson spindle
#

what language are the txt files like items.txt for example? I'm trying to get my notepad++ setup again. also is this proper snytax to have a comma at the end of the last... whatever these are?
for example:

{
   DisplayName = ExampleItem,
   Weight = 15.0,
   Tags = HeavyItem,
}```
bright fog
#

Secondly, it's not a specific language

#

However we have visual extensions for scripts in VSCode

#

That's why everyone uses it

#

And yes keep a comma at the last line

crimson spindle
#

yeah im setting up vscode too but sometimes its just easier to open things in notepad++

bright fog
#

Just open your whole mod as a workspace

#

Same for game files, to make it easy to navigate it and search stuff

sonic needle
#

Cute bonus stuffs for ava

crimson spindle
#

So, I'm getting back into a mod I was developing like a year ago. It compiles and loads in the game fine, but I'm seeing a bunch of warnings in VS Code. Can these safely be ignored? Or am I missing some definition to stop them from being undefined? Do I need to do require "base" or something like that?

bronze yoke
#

a couple look like they might be mistakes though and others are just nitpicking your style

#

e.g. undefined global 'i' definitely sounds like you did something weird in a loop or just forgot to use local

crimson spindle
#

I did enable umbrella and I did manage to find a mistake with itemRarity and correct that, but the others like body are still throwing warnings. Here's an example of how I have it coded.

#

Here are examples of the SuburbsDistributions warnings.

bronze yoke
#

if you're using the b41 version of umbrella, i think we still had a bug back then where SuburbsDistributions wasn't showing up

crimson spindle
#

yeah its b41 still

#

gotcha

bronze yoke
#

you can ignore that one then

bronze yoke
#

but technically this is not an error, just a style nitpick

bright fog
#

Else it says it doesn't know what it is I'd have to say ?

bronze yoke
#

yeah you're right, that's not the same warning as the screenshot

#

'Global variable in lowercase initial' results in a blue underline, 'Undefined global' is yellow

#

there probably is a real mistake somewhere if you're getting that one and the code may not work

#

(but lua being what it is, it can't show a red error because any global can be real if it wants to be 😅)

crimson spindle
#

its been a while since i looked at his code so I'm trying to trace what it is doing now. I do know that body is referring to corpse bodies, and what is supposed to happen is that if the player has a scalpel and test tube in their hand, then they get a context menu option when they right click on a corpse to take a blood sample.

As far as I can tell, the code seems to work as intended. I get the context menu as expected, so probably its fine but I can't help but want to clear all the warnings 😤 and also I do want to try and adhere to some coding best practices as best as i can

crimson spindle
#

i managed to clear all the other warnings except body... still not sure where exactly its getting defined but ill have to check later. The other stuff was as you said I forgot to define them as local variables so thanks for the guidance

bright fog
#

Like that body variable if not defined anywhere, is not a thikg in the base game

#

You need to be aware that variables can't come from no where. Either they are global in the vanilla Lua, such as timed actions classes etc

#

Or they are not a thing

#

Or are defined from the Java like Events

#

body in itself doesn't mean anything, it can't be the player body, bcs it wouldn't know which player it's supposed to be

#

So either you retrieve the player body from functions, or you define it as a global somewhere in your code but I feel like VSCode would know about it then

#

And at the end of the day you both:

  • shouldn't use globals unless you know why you need it
  • you shouldn't name a global with such a generic name
distant grail
#

hello

#

i have been looking for a mod that includes a very specific military uniform

#

the great thing about it is that it is extremely simple. im way too dumb to make mods but if anyone wants a quick (i think) project i have an idea

#

its completely green with just collar tabs

#

and equipment

gilded hawk
#

Does anyone know if zomboid lua has the ability to do GET and POST? Or websockets?

bright fog
#

However, you can make a java mod server side only if needed

#

And if you need to communicate to the server code wise you send and receive server client server stuff

#

And server side it can write in a file stuff you want which a script server side running can read and do stuff with

bronze yoke
#

build 41 can do GET requests only, build 42 removed this

gilded hawk
#

Oh damn 😦

novel elk
#

Can anyone walk me through adin a tile as an entity with a CraftBench component?

bright fog
#

I really need to look in detail how these work to document them on the wiki

strange cobalt
#

Hi guys, can you send me any useful link how to make sandbox setting menu for my weapon-mod loot rarity? I want it to be customizable for users, not just "hard fixed" stat...

strange cobalt
#

Thanks, that is what i've been looking for!

lunar brook
#

made something, have no idea where i should be putting anything

#

i wanna test it first

#

its supposed to be a VATS type mod

#

okay it showed up, but theres a period in the dependency line, and i cant enable it

lunar brook
#

yea na it aint working

#

ill tinker with it later

lunar brook
# bright fog Wdym ?

found out where i should put it, HOWEVER, nothing works, so ill tinker with it later

icy night
#

What's the body location for a hoodie that is up?

#

I thought it was JacketHat or SweaterHat

#

Ah nvm, it is.

solar rover
#

I'm struggling.. I want to add a different recipe for the different armor types and upgrade types for Standard Vehicle Upgrades 3 and I just keep failing. I've added new entries aside from the "carRecipe" that is linked to each item for things like "carHeavyRecipe" but once I get them added these items no longer require any recipe at all once tested in game. I'm just not sure what to do if anyone could spare the time to take a look, I cant thank you enough.

My latest thought is to make a few version of SVUCore and rebuild each item section to another recipe call but feel like that will only fight with the base mod.

solar rover
#

these are from different locations in the script and I'm just fumbling around here.

--(Vanilla tuningtable)
            local carRecipe = "ATAVanillaRecipes"
              --added this 
        local carHeavyRecipe = "ATAVanillaHeavyRecipes"

--(Core TuningTable) I tried keeping both recipes in the same function and even splitting the functions as I did here

function SVUC_setVehicleRecipesBullbars(tuningtable, carRecipe, vehicle, part)
    tuningtable[vehicle].parts[part].Small.install.recipes = {carRecipe}
    tuningtable[vehicle].parts[part].Large.install.recipes = {carRecipe}

function SVUC_setVehicleRecipesBullbars(tuningtable, carHeavyRecipe, vehicle, part)
    tuningtable[vehicle].parts[part].Medium.install.recipes = {carHeavyRecipe}

And this only removed the requirement for a recipe

silent zealot
distant grail
#

but help would be really appreciated

silent zealot
#

Is your idea just a different coloring of colthing items that already exist, or a whole new 3D model?

#

You can skip a lot of that if you're using an existing 3D mesh - in that case you basically copy an existing clothing item and give it a new texture.

#

I also recommend downloading a few clothing mods and having a look at the files to see how they did things.

bright fog
#

Tho don't steal their files

#

If you plan on reusing their files

#

Ask for permission

distant grail
#

the things I need to model is the gasmask bag and webbing

#

I'll look into it a little more once I get home

past radish
silent zealot
#

Retexturing a vanilla mesh wont.

past radish
#

That’s the exception yes

bright fog
past radish
#

Actually, not according to the rules of a DMCA, even if it’s ultra shitty