#mod_development
1 messages · Page 325 of 1
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...
@granite ginkgo this timestamp is where it gets good
dang
God Body Disconnect makes stories in his albums.
It's a ride and you sound like you'll enjoy it.
A little cleaner animation.
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
oh that's sick!
Careful, not all symlinking is created equal from PZ perspective 😬
never had a problems with it yet
ive made a tool that automates creation. only time i dont use it if the mod has different files for b42 and b41
but that was just for this 1 mod i did
so yeah .. but thnx for the warning
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
the string is from vertex that isnt assigned to any vertex group
And supress a bow-muzzle-flash I guess? 😄
haha yes
iiiinteresting
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
I know you are contemplating whether to add "mounted archery skill progression" to your mod know 😄
I feel like that could be exploited to make some cool mods, like nunchucks
probably but how do you prevent that tethered line i just mentioned
well before you fix it you need to first do the said bug
If it can't be fixed easily then I'd probably just say the mod is incompatible with MP lol, but it would also be a future issue because I only make mods for b42
But I have so much other stuff on my plate that I'm not sure if I'll ever get around to making it
btw, the b41 "trolly mod" thing is also a weapon I guess, eh? Anybody maintaining that one? https://steamcommunity.com/sharedfiles/filedetails/?id=2478768005
I liked it 🙂
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.
Oh shit the highlight
That's really cool
Very curious how you did the highlight
You mean the B41 or b42 fork? I think the b41 is abandoned, but Missdeadite is working on the b42 fork
Oh I didn't know there is a fork. Good to know.
not modding related but steam on Linux: Do you have issues since recently too with steam wanting to update gamepad drivers and restarting?
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.
attached weapons don't use the loot system
see lua/shared/Definitions/AttachedWeaponDefinitions.lua
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?
Outplayed - The ultimate capture app for gamers. While playing, it automatically captures your best moments and biggest plays. When the match is over, relive your best (and not so best) moments by watching them in the match timeline.
link broke oops
OH YEAH, the attachment system. God I forgot about those thank you.
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
if you need something in the mod data immediately you can send it in the command
Late reply I know, but is this an inspect item tool you're working on? always wanted one of them
Yes, sort of
probably the whole model is blocking the screen? i dont have much vehicle mod exp so im not sure
but since no one replied to you then
yesh thats my best guess
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
So rotating weapon parts that are attached to a weapon that is equipped is a thing
Yup !
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 ? 👀
I should yeah! Just need to make them parts as well
Hmm, seems to cause a bit of lag though actually, need to test more
Make sure to optimize it I'd say
You could also add the option to just not have the animations
With mod options
I guess
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
Does anyone know why my new animation isn't working?🥺
wdym this doesn't work ?
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.
Oh shit it works! No stutter at all, and wheel is rotating smoothly
hell yea
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,
}
} ```
Missing comma
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
that does help with the missing icon, but i still can't place the shelf anywhere
I'm not too familiar with tiles and how to debug them sadly
Perhaps ask in #mapping or the mapping Discord
ah alright, thank you
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
funny bug that happens when testing my automatic flashlights
Is it trying to turn off the flashlight because the room is light now maybe?
Anyone can help me?
yeah, the light strength of the flashlights
Any suggestions on how I can track the original light level without the increased light from the torches?
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
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
All I can think of is to add a timer to frequently turn it off & on again to check the normal lighting
Disco bathroom lol
Walked in on the paparazzi
I believe there is either a file or a wiki page about it
Thank you
I'll try right away, thanks
That's a tough one. I feel like you'd have to check all the light sources in a room, and if it changes then you turn it off and run the check again to see if you should turn it on.
How are you currently detecting if it's dark?
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
server\Items\ProceduralDistributions.lua
Is your mod showing and can be enabled in the mod list?
yes
but don't add the module in the debugger item lists
if you want i can send you zip file
Yeah I can take a look
I'm really sure I made a very stupid mistake, the mod loads in the mod list but it doesn't add any items
Is the mod for b41 only?
if its b42, remove that URL in mod.info
had issues with them,
probs needs a \ or somethn
( entire line btw. )
i just want to try make a mod, i'm on 41.78.16
and i don't want multi version mod for the moment, i just tring to make something
The ColtelloMultiuso script you sent is missing the module
oh wrong file
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
}
}
It's working for me, I didn't change anything either
Oh wait it crashed when i equipped it
can I cry? XD
I think is because I don’t have set any sprite
Yeah was about to say, there's some stuff missing
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,
}
}
Flashlight turns on/off if the square under the player is below/above 0.5, using getLightLevel. Indeed a toughie. I'm gonna experiment with it some more and see how flashlight light strength impacts it
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
}
}
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 🙂
Missing " , "at the bottom, that's for sure
Also did you specify your module in item script?
I prefer to keep my model txt files with module base
You sure that last comma matters ?
At the top? Yeah
module MATILDA
{
imports
{
Base
}
item Matilda
{
ImpactSound = null,
MaxRange = 7,
WeaponSprite = MATILDA.matilda,
blabla...
}
}
and yeah the comma didn't fix it unfortunately
I might try that although everything seems to function normally, except that the model is missing ofc
Are the items still showing as InventoryItem when you call try to call item:isFluidContainer() and they're out in the world?
Yes instanceof(item, "InventoryItem") returns true
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?
yeah these are Items (actual instances of items use various subclasses of InventoryItem instead), kahlua (project zomboid's lua engine) only exposes java classes' methods to lua, not their fields, so you can get its properties with the getters on this page https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/scripting/objects/Item.html
Now try making your model txt file module base.
no comma here
AS far as i know that lack of comma breaks stuff
Be that item script or model
No I meant
In between entries sure
But not when there isn't an entry after no ?
in build 41 certain script types require the closing comma to parse
Wait which missing comma are we talking about
in no case does the closing comma cause issues so you should just always use it
I think the confusion is here on my side
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
In lua i guess, but itemscripts seem to require
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?
not really, it's absolutely ancient at this point, completely abandoned and was barely used at all even when it was in active development
huh dang, is there any active way to mod for java or is it just generally excluded
@grizzled fulcrum has been working on something for a while, i think it's in the very late testing stages now?
hm alr
is it this?
https://github.com/aoqia194/leaf-loader
it has an example mod "zomboid" folder but its forked from FabricMC?
yeah, it's literally fabric for zomboid
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
Join the modding Discord if you want to talk more in depth about it
Aoqia has a thread for it
And shares info there
- Pokit Paradigm Boots & Shoes
https://steamcommunity.com/sharedfiles/filedetails/?id=3476595954
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.
Just upload it ... ?
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
With working lamp
No wayyy. That is awesome bro
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
I forked like 90% of their whole toolchain and that is the loader which most people won't see, you probably want the leaf-example-mod repository
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
managed to locate one myself, OnCreatePlayer
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
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
I shared them the leaf thread on the modding Discord
If you are not slightly embarressed for your first publish timing then it means you are too later for the early adopters 🙂 . do it
Would this make a good billboard for the Advert Trailer or does it not fit the game style
I need a commision for creating a simple mod rn, if you r interested dm me.
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
As far as i know that if you use correct rotation and scale for your gun it should appear wherever your muzzle attachment point is.
Rotation/Scale in blender i mean*
What does correct mean in this context :p
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
I made my model in like 2021, so been a while. I'll check it out though thanks 🛐
thats gonna be fun to upgrade
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 🙂
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.
How do you transfer modData of an object to the item when you pick a furniture up?
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.
Yeah, but... I don't know what the generated item is when you picked it up.
function ISMoveableSpriteProps:pickUpMoveableInternal in ISMoveableSpriteProps.lua is an example.
Interestingly, if there is a "movableData" table in modData that gets copied.
The timed action ISMoveablesAction:complete()calls ISMoveableSpriteProps:pickUpMoveableViaCursor() -> ISMoveableSpriteProps:pickUpMoveable() -> ISMoveableSpriteProps:pickUpMoveableInternal()
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.
Thanks!
I would assume this also works from item placing to a square as well?
Yep, also works the other way around!
Do you know anyone who is good at 3D modeling?
for anyone interested in testing it for b41 https://steamcommunity.com/sharedfiles/filedetails/?id=3475096677
New coding / modding music mix just dropped
Music For Painting Warhammer 40K | Vol VIII perfect for painting miniatures, TTRPG, reading lore, reflection, meditation, relaxation, or as a background for creative endeavours.
Tracklist:
0:00 - 'Vox Militarum' https://www.youtube.com/watch?v=MyB4UQQycFM
59:52 - 'Divinity' https://www.youtube.com/watch?v=h646zo5V9vU&t=220s
1:59:32 - 'Lords Of...
Happy.
how to fix muzzle flash location? changing muzzle attachment location does nothing
this is epic, but I just wanna say, 1 hour tracks is INSANE
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?
i see
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
I am able to replace files with the same names from other mods?
Howdo?
Like the health menu?
like makeup UI or char creator
Not sure. I wrap the UI3DScene and modified shaders
I had to do some unorthodox stuff to work around the limitations
You can override theirs yes, as long as the file is in the same path
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
Hmm... Do zombies sometimes spawn with weapons equipped? Or just attached to them?
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?
yeah thats 100% doable
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
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 😄
Yes.
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.
You mean that your mod should add/remove a recipe if a different mod is active ?
Yes. :)
Wel, I've made it to work now. The code worked all along. I was just testing with steam on. 
when my mod is already published, and I am coding in ~/Zomboid/mods 
Ok good 👍
Btw, if it can be helpful, by looking at the code I have found the ActiveMods class which contains the getMods() method.
Oh hell yeah dude, I can already see so many possibilities with it! Looking forward to seeing your progress!
Unsub from your own mods
You already have them locally anyway
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
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)
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
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
That's interesting. My guess is the texture gets compressed by the game
The game will compress textures that are not in .pack files anyway
That's modded items tend to have blury icons compared to vanilla
so there's no way to like disable that?
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 😂
is it possible to change the color of the little squares for the skill levels?
You might be able yea
thank you for your worthless message
I want to know how
Dude, you literally ask if it's possible and I answered properly
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
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.
Most of the UI stuff is Lua sided
So unless that menu is special and is Java sided for some reasons, you can modify it
I just want to take a moment to express my gratitude to the modding community here! 
My personal projects are roaring in large thanks to you all 
You rock! 
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
Almost 80% of the UI is located in \media\lua\client\ISUI, and the scripts related to the skill panel can be found in \PlayerStats
Roaring with success, or roaring with the flames of being thrown on the burn-pile for failed mod ideas? 😛
sweeps pile of ashes under fridge to hide them
there is a ui reskin mod thats changed it before but i dont remember the name
You'd surprided how many UI stuff has not be done
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
And a bit of insanity to code a UI in LUA.
Eeh I find it okay
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
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?
There is an entry in PZ UI classes which is something like background and takes a rgba table
Might be located in ISPanel. Or it's likely directly refered to in the class
Before coding your own mod, what about: https://steamcommunity.com/sharedfiles/filedetails/?id=2866258937&searchtext=health
that gives you a simple unobtrusive health indicator
Yippie!!!
Gonna have a look at the mod and see if I can go make my own hud mod thanks to it.
It's set in ISUIElement:
function ISUIElement:drawRect( x, y, w, h, a, r, g, b)
if self.javaObject ~= nil then
if self.isCollapsed then
return;
end
self.javaObject:DrawTextureScaledColor(nil,x, y, w, h, r, g, b, a);
end
end
Changing the a changes the opacity, but it affects all UI elements, not just the health panel. The alpha value seems to be hard coded
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
Being in a car is still considered outdoors right?
I’d like to figure out how to make UI popup text
Would be cool to make things more arcadey with zombie health bars
If you have to open a door to get out you are technically indoor
That function is called from somewhere. Like I said every UI has a background table
I already modified some UI alpha values that way
Hell no don't do that
Also you can check the type of UI element due to how derive works which stores the UI element type in the class
You can draw texts with some methods on the UI
Can text be drawn directly to the viewport?
yeah, it's called XUI, you can find it in client/PZAPI/
Oh well that trivializes it then
This mod is a must-have for me. Keeping the health tab open all the time is kinda annoying.
It's not yet usable tho right ?
i've never heard anything like that
i played around with it alittle bit, seemed usable?
Yes, let me show you an example
TextDrawObject
Then you render it OnTick or smthg similar
Can be in UI render too
Why do you always meet the rude ones 
is there a mod that will allow you to load into a small world to quickly reboot?
Anyone has experience or used standardized vehicle upgrades (armor mod)???
i have a question..
would it be insane if there was a mod that was an inspiration from the Smile 1/2 films?
I'd expect it eventually to be a thing.
same here! it would be cool and hella terrifying
I probably deserve it lol
Wdym exactly ?
What would the mod do ?
well, it would be an interesting experience
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
nah man, that was uncalled for
you did answer the questions
they are just entitled
yes there is let me look for it
@wheat kraken made something like this iirc
i think its part of the community mod tools or something
its called micro map
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,
};
A bit of both maybe? I made some really fun custom Twitch Integration stuff and I now suffer nightly from chat (sadists) because of it. 
Muh ashes! =p
yes thanks, however Community Modding Projects is causing errors on build 42. I already reported this to Chuck
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?
NPCs die while smiling
Think about what needs to happen first there
- NPCs
- A graphical overhaul so you can see expressions in corpses
- 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.
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?
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?
Would it not be a matter of changing this line?
self.action:setTime(self.takeLitres * 10)
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)
I'll try changing it to self.action:setTime(self.takeLitres * 1) and see what happens
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"
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
Just isn’t any for b42 yet
The solution is to make a B42 mod with "eurobeat" in the name.
I hereby appoint you Head of Eurobeat
I've made an FF7moto mod but there is something wrong with passenger's position in b42.
Please someone can give me an advise
And task you with creating Eurobeat mods for B42.
mod'name is fenrir moto of FF7
I don't know anything specific to zomboid about this, but: are parts of model possibly "inside out" so the rendering engine gets all confused because the back face is the one on the outside?
yeah, your right..
but it would be a cool and terrifying experience still
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
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)
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. 😛
In general, I'm not a big fan of horror.
That's okay
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.
Alright
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. 😛
Appreciate your help. This mod was worked just fine with B41. I checked my model, the faces are right. Is there any other directions?The moto's model looks like slightly in front of the character's model. In some direction the characters position is right.
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
I don't know how you'd teach PZ modding in video format... but the best resources are the Wiki: https://pzwiki.net/wiki/Modding
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?
ty
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)
i want to make a mod with a realistic health system for a hardcore world
https://steamcommunity.com/sharedfiles/filedetails/?id=3060255898 (link is on the moding wiki)
Ah yea both pages
That wiki page will teach about the model section in your scripts
What would "more realistic" mean here? (in specific game changes)
That steam guide explains how to make guns and some specifics
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.
like a blood clot mechanic and getting sick from infections if you leave them for to long
I've already read this, I even tried the attachment editor. There seems to be no effect on the model I am trying to rotate on how it appears on the back..... Hm...
or like scabbing of small wounds with certain actions having a chance to pull the scab off and make you bleed again
You could track infection in body parts and trigger the sickness model, or make a new "blood poisoning" condition.
yeah and i could add blood typed
Then you'd have to decide what that actually does and code that in every relevent place.
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.
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
Don't they just stockpile type O blood?
no but i could just add that
So it doesn't matter if you have A/B/rhesus factor, you just get given type O
and id probably only have 3 types of blood because adding them all would make it useless almost
or id do this maybe
it would make the nurse and doctor class more useful because they would be better at giving themselves aid
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
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
put these ideas in your notes, then start coding. 😛
yeah i screenshotted my messages and sent all the links to my random files discord gc
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",
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
That's fine, we all had to start somewhere
You sure you used the tool properly ?
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)
The template in-game was not updatew to B42 I think
We have an unofficial one however from Chuck
Then that means you did not follow it correctly. I made that guide and i know it works as it helped alot of gun makers lately
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
Thanks. This helps. I did not make the models. STENDO did, but the mod was heavily on WIP, and I want to fix the models at least on B41.
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.
And now imagine me trying to figure this gimmick out years ago, when I tried to do my first gun mod, without a guide explaining it. I've spend few days figuring out, trying various combinations.
Been this close to giving up
Especially when I was blender newbie
Personally I'll not look at the new APIs much until I see more usage of them in game or other mods. Call me conservative but I would be afraid of still a lot of movement in the interfaces until things stabilize
And all that spoils when the electricity fails, hm?
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.
I sort of agree that we need in-game usage examples of it. In fact, I didn't even knew it was already in use
it gets hidden if there isn't enough activity
it's always been a thread
Sub to it and anytime a new message is sent there it gets shown to you
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.
you can't really hardcode that, it's a sandbox option
getTrueMultiplier is deprecated iirc
i think what you want is getUnmoddedMultiplier()
i documented what most of the multipliers do here https://github.com/demiurgeQuantified/PZModdingGuides/blob/main/guides/GameTime.md
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
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
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 🤔 .
That wiki page is old, before I got into reworking the wiki and most of the informations it gives here imo is not great
The Github guide on GameTime that albion made is more accurate to what most modders actually need
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.
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
hmm. alright.
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
thats what I mean.
Sooo getGameTime():getTimeDelta()*60 being very close to 1 for me is simply a framerate concidence? 😄
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 ..
yeah, if you're running at 60fps that should equal more or less 1 (rarely exactly, because framerate is never truly stable)
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.
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
Your item is bugged
I think Ground Crafting mod makes them go to the ground tiles so maybe I'll check their script
I am currently using the same mesh for 2 different items, could that be an issue ?
No that shouldn't cause any issues
Hmm
The item spawns in your inventory right ?
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. 🙂
what happens when you just drop the item?
When i drop them nothing bad happens, they spread a lot that's the only weird thing.
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.
Wait so the item does appear on the ground ?
I believe there's a limitations and a mod which fixes it
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 ?
yeah it could be
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"
i didn't know that just errored but that makes sense
Reworked Procedural Distribution ... again
- Less text, more concise about how loot generation works
- New section to explain the issues with the system and the solutions to it
https://pzwiki.net/wiki/Procedural_distributions
Yea I think there's a mod which fixes that
Haven't been able to find it tho ...
But it's recent
No worries. I can look for it on my own. Thank you for your help and time ❤️
Is it possible to update character animation sets somehow other than refreshAnimSets()?
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
Yes
This will involve visuals
It will involve ItemVisuals
Ah just to be clear this is equipped items and not something stored in their inventory (none displayed until dead) right?
Yes
Thank you so much!
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
bump 👉👈
You mean how gun cases are spawned, or how the spawning of items inside of gun cases works?
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 = { }
},
}
I tried something similar but probably missed something, I'll try
the require should just be 'Items/Distribution_BagsAndContainers' right?
You don't have to require it
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
?
He will never see your message that way
then how?
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,
};
That I got no idea but I can assure any other methods will lead to better results
Bcs, I've personally never seen KI5 around here or anywhere in fact
i found no other way then this or donating him money
Doesn't the guy take commissions ? He should have some socials somewhere then
and i dont have money
Then he doesn't want to get contacted
To talk to him you have to give him a message through a donation on his ko-fi.
ik but i dont have money
keep in mind that modders who make themselves hard to contact do it on purpose
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?
It's not recipes ?
no, i've searched
everything
there are recipes but for handmaking stuff
not building objects
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
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
You can, just it changed
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
ik, just kidding
You just add a recipe to media\scripts\entities\walls to make it buildable
anyway, maybe somebody can help me
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
Interesting, so it's still scripts then now
Tho they want to change the campfires, so maybe that's different
It should be similar I think, the campfire is in \media\scripts\entities\outdoors\entity_campfire.txt
👌
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
They worked for me early in B42, then stopped working
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.
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
B41 or B42?
41
I saw both the generic ones and the specific ammo type ones in the army gun storage table im pretty sure. Neither were working though
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
Thank you, I'll look at it now
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.
I see. I will keep in mind ❤️
No
That doesn't work 
Last time I checked, they still haven't fixed it and removing or adding a battery isn't done properly
Unless they did fix it in the last updates but to my knowledge no
I haven't checked the past 2 updates
I think
trying mod for serious this time a bandits submod basically
What will the submod do?
it will be like day one but extended and no nuke
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
Is it possible to update character animation sets somehow other than refreshAnimSets()?
Do you mean when adding a new xml file or when changing one? Or something else?
I change the SpeedScale parameter of an animation. But the new SpeedScale won't work until the character stops the animation and starts it again. I want to update the animation immediately after changing the value
Ah, no I don't think there's any other way to refresh them other than just waiting. You don't even need to do refreshAnimSets, it does it automatically when you make a change in the file
Why do you need it to update immediately?
Thank you, I got it
because the changes will be noticeable immediately
Haha well yes, but if you're just testing out your animations then waiting 2-3s for the files to reload isn't that crazy
yep, but I didn't mean testing
Are you trying to dynamically change the speedscale by something triggered in game?
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
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>
...
0x000000000000001d (RUNPATH) Library runpath: [$ORIGIN/../lib:/home/tim/Qt/5.15.2/gcc_64/lib]```
uhm 😄. Hi Tim! 👋
i think you can only have 2 scalars
Please tell me, what can be done in this case?
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
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
@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")
vanilla updates these every frame, so you will have to do the same
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
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)
thanks!
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.
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
Why i got a feeling its something to do with the lamp?
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)
model loading error, a mod is causing it to null,
thus revert to isosprite
Hmm, the weird part about it is that it shows the 3d model when equipped, but not when on the ground and I don't have a separate world model or anything like that, just one model used as the WeaponSprite
But I will narrow down which mod is causing it and see what's going on
it seemed to be sensitive to distance, hurting the sprite swap
It actually looks to be your EFTBP mod https://steamcommunity.com/sharedfiles/filedetails/?id=3432928943 but I have no idea why, I haven't started digging yet, but someone reported that they narrowed it down to a conflict with this, and it also appears in all the mod lists from the other users
Oof
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?
I do have a fileguidtable.xml, but my guid in it is just sfbicycle0-spec-0000-000000000001
It should not cause issues on its own though
I want to help because im genuely curious to why it doesn't work together
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 ...
It is very weird, I don't have much time to test right now, but I'm gonna dig into it in a little bit
How do I go about connecting this line if currentlyFullyDressed and not previouslyFullyDressed then player:Say("Fully Protected") with other translation options.
you need translation .txt files for that and call getText(<name of translation>) in the last line
Ok, thanks
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.
Is it fine to advertise/ask for help in the context of a modteam in here?
How do I make a ISCollapsableWindow resizable?
https://steamcommunity.com/sharedfiles/filedetails/?edit=true&id=3480024056 just published a mod
Never hurts to ask. What's it about? If idea stage then #1075939080287834113 ?
Oh its increddibly developed, not to toot our own horns but IMO the biggest total conversion mod ever so far.
Wow this looks expansive! 300 cells hm. A custom map or what does it mean?
Preview image needs some work, eh?
Then by all means blow that horn man!
not a map
the description added something random
updated description
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
Hey we have a mod project channel too on the modding Discord, you can advertise there if you want
https://discord.com/channels/136501320340209664/1125248330595848192
Thanks man, can you DM me a link?
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
Oh damn, that looks really neat 🔥
If you need help feel free to hit me up, I have a lot of experience in balancing stuff out and already made a couple mods.
Own occupations and traits could go really well with the conversion idea 👀
I did that, however, I found the issue now: I have ISPanels that form into 3 sections into my main UI. The section headers span all the way down WHICH COVERS THE RESIZABLE WIDGET!
Anyone have a massive modlist that works?
Ask in #pz_b41_chat or #pz_b42_chat if you look for version specific advice or simply in #general_chat .
This channel here is more for mod development than for mod collections I'd say.
Then you can resize there panels too and reposition them dynamically when the parent window itself is resized. I believe ISCollapsableWindow has a callback or hook that fires on resize, though I'm not 100% sure off the top of my head. You can try overriding window:onResize() in your custom class to update the size and bounds of your inner ISPanel's accordingly.
anyone happen to know whats wrong with my distributions?
yo this is so cool! My own group is working on an update to the old primative survival mod, so if you still need help i might be able to give input if i have time. i dont know much, but i can model, texture and troubleshoot.
looks fine, what problem are you having?
Not entirely sure, but i keep getting errors with it whenever i load a new save. I do not know what these errors mean.
are you in build 41 or build 42?
41
iirc it was capitalised BedroomSideTable in b41
i remember hearing somebody complaining about that
Yep thats the issue. Thanks a lot!!!
We need a weapon mod that is just a Pringles can stuck on your hand.
I'm 95% sure there were Pringles in '93.
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.
#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
Can you give a bit more detail on what you want from a developer? Your request is too vague to know what experience you need or if it's something worth getting invovled with.
you really need to understand that cells do not exist in this game
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
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)
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?
it never changes, isocell is a singleton
Is the nest a world object? And what spawns them/how are you tracking them?
ah nvm i mis understood you.. youre only sayin gthat it doesnt care about it but it still exist right? im just trying to use it for my purpose.. unless theres a better option
in a code sense they don't really exist
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.
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
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.
getCell() doesn't even take any arguments```java
@LuaMethod(
name = "getCell",
global = true
)
public static IsoCell getCell() {
return IsoWorld.instance.getCell();
}
,i added the xyz to the getCell
not the square
it does
try to print that in debug mode
im not making this up.. ill screen record
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
ive made a custom event called onCellChange
and the code i posted is what i will use to determine the mid point of the cell
#1070852229654917180 message
the mod im making is for b41 anyways
im not trying to confuse people if thats what you think
in anycase this works for my situation
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
Is it possible to make it so that the zombie does not react to the player's footsteps or reacts in a smaller radius
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.
Unfortunately that is in the java IsoGameCharacter:DoFootstepSound()
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.
very thanks!
Is it possible to prevent a knife from getting stuck in a zombie or to reduce the chance of it getting stuck?
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
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!
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
thx albion
Hi, so i have some trouble with my mod
https://steamcommunity.com/sharedfiles/filedetails/?id=3480466675
the guns are working but somehow after sometime, i just have a crash
im new for pz modding, but i have some xp with modding (hoi4)
(it's only obtainable by events on a server)
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.
it's not that different
most information on the wiki is for build 42
there are build 42 javadocs here https://demiurgequantified.github.io/ProjectZomboidJavaDocs/
for anything else, documentation is lacking for every version of this game 😅
await there are javadocs for zomboid !!!
You just left me speechless
Thanks a lot!"
You're always helpful Albion. Thank you. You absolute treasure.
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.
I did this. Thanks. However... its a bit odd that the resizing is finicky. If your mouse is too fast and goes over the ISPanel, the resizing stops. You need to be slow in order to resize the window smaller. Is there a technique to stop this behavior? I want it to be resized fluidly. For now, I added a padding between the resizable widget and my 3-section ISPanels.
bump
If you think that's good, download ZomboidDecompiler and get the actual java code to refer to! https://github.com/demiurgeQuantified/ZomboidDecompiler
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.
Ah, that finicky resizing behavior is due to the fact that ISPanel is consuming the mouse events before the ISCollapsableWindow has a chance to process them for resize handling. You need to propagate those mouse events from your ISPanel back up to the parent ISCollapsableWindow. You can override the panel's mouse handlers and explicitly forward the relevant events up the widget hierarchy.
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?
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
I will be up in a minute and have a look after
i think if you replace the vanilla sounds with the same names and file types its needs to work
How do I convert the value from readLine() into an integer/number?
😐
Ah, tonumber()
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
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?
You might be able to yes
Then I’ll start learning Lua.
We need Senior specialist , Who will be able to work with us for a long period. At the moment there are several tasks, I will provide details on our Trello board, where all technical tasks are posted.
Sounds too much like a job to me. I play Zomboid to escape from Trello boards. 🤣
No not quite, the mod.info goes into the 42 folder. I'd also suggest using the Zomboid\workshop folder instead of the Zomboid\mods
Your notation is weird
You probably want to start with media\shared\TimedActions\ISOpenCloseDoor.lua
https://pzwiki.net/wiki/Modding has a few links with more info on TimedActions, I think you just need to add an IsValidStart() function
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.
Use a tree representation bcs you're randomly adding -(mod.info) in the middle and this doesn't make sense
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)
No you need to rename
Or put it in a different folder
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.
Any tutorials I can follow? I'm quite lost.
Zomboid
└── mods
└── mydoormod
├── mod.info
└── media
└── shared
└── TimedActions
└── MyOpenClosePatch.lua like that?
oh that would make sense wouldn't it
okey thanks
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
media/lua/shared, not media/shared
Also, you're on B41?
42
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.
Well that's stupid, but thanks for letting me know!
The door mod would therefore replace isValid(), instead of adding isValidStart().
ı get it now
i guess
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?
yep, fbx and x
holy shite! Thanks mate!
I am quite new to this, and even though i am a sofware developer (jr) modding the game has it's difficulties at times.
You must place the texture in the textures folder and reference it in the models.txt file that defines the comunion between mesh and texture.
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.
tried both.. but nothing shows up not even untextured one :\
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.
let me check mine
to be sure do you have a model script?
i do.. i just took other working mod and trying to edit it
can i just use fbx? or i need .x?
you can use fbx
1m looks about right so scale is probably not it
yea, i compared it to other mod models.. 😄
did exactly same rotation and stuff but nothing..
ill try something later thanks 🙂
that's great. Let us know what it was if you find out! Might help someone else.
also, if im using fbx does it need to be in models_x folder?
Yup
I always placed them in models_X
kk thanks alot 🙂
np!
the models/ directory only supports a legacy format that shouldn't be used anymore
well the issue was, that even the mod i learned from doesnt show the model haha
ill get inspiration from some other mod thanks 😄
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?
it's just cleaner
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.
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
blood locations might be better since they correspond directly to covered areas, but flip flop loop holes would still work
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
awesome thanks so much! .x is so troublesome to work on nothing imports it natively glad i can use fbx
exporters are rare too 😅 only a few mods use .x, and that's probably because they don't know they don't have to
That sounds like insulation to me
declaration: package: zombie.characters.BodyDamage, class: Thermoregulator
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
Tyvm
I did that and it either plays over the vanilla sound or just keep repeating the sound
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
it shouldn't
Roger that. Thanks.
I've noticed the new recipe structure seems more complete. It can give more than one result now right ?
yeah
most of the dumb things you needed to use lua for can now be done in the recipe itself
Pretty cool. A welcome change for sure.
Do holes in clothing and the items general condition lower it's insulation value?
ThermalNode accounts for holes and condition
hole == zero insulation in that location
condition == reduce insulation
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,
}```
First off don't use notepad++, use VSCode
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
yeah im setting up vscode too but sometimes its just easier to open things in notepad++
Just open your whole mod as a workspace
Same for game files, to make it easy to navigate it and search stuff
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?
some of these would be fixed with umbrella https://pzwiki.net/wiki/Umbrella_(modding)
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
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.
if you're using the b41 version of umbrella, i think we still had a bug back then where SuburbsDistributions wasn't showing up
you can ignore that one then
it's complaining about body because it's a global variable but conventionally global variables should have uppercase initials (e.g. Body), i can't see where you define it but from context it looks like it might be global by accident?
but technically this is not an error, just a style nitpick
No that's not the case ? It complains about the typing without uppercase when you define it ?
Else it says it doesn't know what it is I'd have to say ?
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 😅)
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
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
What is body ?
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
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
Does anyone know if zomboid lua has the ability to do GET and POST? Or websockets?
Not sure what those are but I will assume it's networking stuff and that means no
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
build 41 can do GET requests only, build 42 removed this
Oh damn 😦
Can anyone walk me through adin a tile as an entity with a CraftBench component?
I really need to look in detail how these work to document them on the wiki
Interesting
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...
Thanks, that is what i've been looking for!
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
Wdym ?
found out where i should put it, HOWEVER, nothing works, so ill tinker with it later
What's the body location for a hoodie that is up?
I thought it was JacketHat or SweaterHat
Ah nvm, it is.
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.
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
im way too dumb to make mods
No you're not. You don't know how to do it yet, but you can learn if you want to.
i would love to learn how to but tutorials just confuse me
but help would be really appreciated
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.
the things I need to model is the gasmask bag and webbing
I'll look into it a little more once I get home
Even retexturing another person’s model, will get you DMCA’ed fast
Retexturing a vanilla mesh wont.
That’s the exception yes
Not if you don't repost their assets
Actually, not according to the rules of a DMCA, even if it’s ultra shitty
