Also if it's the one I found ( https://steamcommunity.com/sharedfiles/filedetails/?id=1095810873&searchtext=realistic+durability )
The mod author said he's updating it this week.
#mod_development
1 messages · Page 501 of 1
Are there any mods that add creatures? I would love necromorphs, or creatures that appear in the fog whenever the fog comes. Or even just any type of tougher zombie would be nice
Anyone down to be funded to make a tiny mod? 😄
Its just removing tthe burglar occupation
cause I dont want people just hotwiring everything in the MP server
Hi all! Here I come with my daily quesion, does anyone knows how to implement a parametrable key binding for a new Events.OnKeyPressed action I have created?
I would preferably do this without dependencies to Mod Options, to make sure it is more robust to future updates. Though I could use it if the standalone solution gets too complex.
Oh, just saw the message from co` from earlier, I will try to manipulate the keybinding table too
It worked!
welp, finally have the time to fix my M113. It's a bit of a mess.
And also I always hear reports of it being way too common, along with reports of it being impossible to find. I'm confused at best about that.
I'm working on an m113 too
oke 👀
what will you add to yours?
significantly overhauled durability and hopefully a new thing or two
along with probably modifications to the model and fixed overlays
Damn, I feel our mods will compete with each other
How about you abandon yours and join mine?
we make a mod together
yeah in about a month will be the thing's 2nd year on the workshop. I remember uploading version 1 before I left my dorm to go to a class.
So, all mods already compatible with 41 stable?
Nevermind, these news are only 3 days old =_=
hey just wondering, for Authentic Z mod where could you find zombie hit lists?
anyone knows why a weapon when placed in the ground shows the icon?
i've changed icon name and I've setted up a model correctly
the weapon shows the mesh and texture on qhile equipped (hand or slot), but when it's on the floor turn into the icon
I have the same issue with some items but in weapons is more infuriating
@blazing radish I had the same issue and, from experience, I had to declare the models inside Base instead of my own module to make it work. But I may be missing something, at least this worked for me ⤵️
module Base
{
model WoodenDowelMod_Ground
{
mesh = WorldItems/RifleAmmo,
texture = WorldItems/WoodenDowels,
scale = 0.8,
}
}
module DowelsMod
{
imports
{
Base
}
item WoodDowel
{
CanStack = TRUE,
Weight = 0.02,
Type = Normal,
DisplayName = Wooden Dowels,
Icon = WoodenDowel,
WorldStaticModel = WoodenDowelMod_Ground
}
}
(full code of the mod that you can try and see it is working & how it works here https://steamcommunity.com/sharedfiles/filedetails/?id=498634342)
You can keep your module for everything else I believe, just declare the models in base and then import Base in your module 🙂
at first I thought I was doing something wrong with the icons
but afte rmany tries I couldn't understand what the hell happened
really weird bug
I found this one to be very usefull! https://github.com/FWolfe/Zomboid-Modding-Guide
Also check the pinned message of this channel, you can get some pretty good resources there.
thanks pal 🙂
I was just making sure of things since things changed alot over the games 41 beta
Can't wait for the animal/hunting update
(I'm one of those people who keeps up with PZ news)
and once thats done... It'll come, The ever lusted ever NPCs.
guys I want to make a mod about a radio channel, I want to add my custom music to game with creating new radio channel
how I can do that ?
You might want to mess around with those mods that add music to the game
Also setting up my new computer today 👀 Can't wait to digg into those files
Random dumb question, and sorry if it sounds stupid cause I'm not much of a coder, but how does the game load up all the code from vanilla to mods? Does it grab everything on launch and bring it all in sequentially treating it all like one super long document? I was having trouble modifying some variables in the vanilla files and found just copying the whole block from vanilla, slapping it into my mod, and making the changes there did the trick. Basically overriding the vanilla code even though I left the vanilla settings the same. Are there situations where it doesn't load something until requested or under a specific condition?
Libraries mainly, can also craft them.
Anyone know where vanilla traits are defined?
Also, is there a place that lists all the variables that we can put when we create clothes?
{
/Necessary
Type = Clothing,
DisplayName = My Jacket,
ClothingItem = My_Jacket,
BodyLocation = Jacket,
Icon = My_Jacket,
BloodLocation = Jacket,
/Stats
RunSpeedModifier = 0.89,
CombatSpeedModifier = 0.96,
BulletDefense = 10,
BiteDefense = 10,
ScratchDefense = 20,
NeckProtectionModifier = 0.5,
Insulation = 1.0,
WindResistance = 1.0,
WaterResistance = 0.60,
Weight = 3,
ConditionLowerChanceOneIn = 15,
ConditionMax = 15,
RemoveOnBroken = true,
/Switch to other cloth
ClothingItemExtra = Jacket_Open,
ClothingItemExtraOption = OpenJacket,
/Optional
Tooltip = "A vest"
WorldStaticModel = My_Jacket_Ground,
}```
It's all that I found but I'm curious if there is more
ClothingItemExtra = Jacket_Open,
ClothingItemExtraOption = OpenJacket,
you can also do stuff like this so that you can switch to a different clothing item using the right click menu
Nice, I did not know and it can be useful to me!
the "OpenJacket" thing would be a new context menu entry in a "ContextMenu_[LANGUAGE].txt" that you can include in your mod files
you can also add a sub-menu for multiple different clothing items in the right click menu but i cant remember how you add it
ContextMenu_EN = {
ContextMenu_OpenJacket = "Open Jacket",
}
like this
I get this error ERROR: General , 1640274269084> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: setTint of non-table: null at KahluaThread.tableget line:1689.
My item.txt look like this
{
Weight = 1,
Type = Clothing,
DisplayCategory = Prosthesis_cloth,
DisplayName = Wooden hook,
ClothingItem = ArmRight_WoodenHook,
BodyLocation = ArmRight_Prot,
Icon = wooden_hook,
Tooltip = "Wooden hook for right hand",
ClothingItemExtra = ArmLeft_WoodenHook,
ClothingItemExtraOption = change_to_left,
}
item ArmLeft_WoodenHook
{
Weight = 1,
Type = Clothing,
DisplayCategory = Prosthesis_cloth,
DisplayName = Wooden hook,
ClothingItem = ArmLeft_WoodenHook,
BodyLocation = ArmLeft_Prot,
Icon = wooden_hook,
Tooltip = "Wooden hook for left hand",
ClothingItemExtra = ArmRight_WoodenHook,
ClothingItemExtraOption = change_to_right,
}```
do you have the context menu thing set up like this?
Yes
idk then,the only thing i can think of is that the body location is messing up since theyre a nightmare to deal with
The menu is displayed and I can launch the action but once the bar is full and the action ends, I have the error
do both items work normally?
oh i might know why
i think including underscores in the context menu thing might cause errors
maybe try just ChangeToRight
That's not it, anyway the menu is displayed so the game can read the variable. The problem is elsewhere
oh weird
It that newItem:getVisual() return a nil
yeah body locations are the only thing i can think of then
but newItem is a clothing so it should work
newitem?
it could also be that ClothingItemExtra breaks if the item you specify uses a different bodylocation than the original item but i'm not sure
wait nvm that cant be right
its not that
local visual = item:getVisual()
local newItem = InventoryItemFactory.CreateItem(itemType)
local newVisual = newItem:getVisual()
newVisual:setTint(visual:getTint(item:getClothingItem()))
newVisual:setBaseTexture(visual:getBaseTexture())
newVisual:setTextureChoice(visual:getTextureChoice())
newVisual:setDecal(visual:getDecal(item:getClothingItem()))```
This is where the error is. It's in `media\lua\client\TimedActions\ISClothingExtraAction.lua`
If I change a lua file in my workshop mods for the server I'm hosting, lets say changing one thing from true to false (disabling an option in the lua file) are clients going to be effected by this is it going to be appear as a mismatch
idk then
A custom cloth return me a nil when I use getVisual(). Where do you think the problem is coming from? The clothing must lack a variable
is the .xml file for the clothing item there?
and is it listed in the fileguidtable?
Yeah, they works separately but the swap does not work
Wait a minute ... no
I forgot the .xml of one item 
It's work now thx to try help me, I was just stupid xD
what is the range for hunger? [-100..100] ? or only positives
Very good question I also wonder the range of pain, fatigue, fear ... If it is the same for all. For me it is [0-100]
Yes i belive so. howevere there are calories, fat, carbs, and protein to worry about
i end up doing stuff like that all the time lmao
sometimes i add something to a mod and then launch the game and wonder why it isnt working and then realise i never copied it to my mods folder
Hello my dudes, can i ask for a bit of help?
yes @west crystal
Can you download my mod and test if it works? Never uploaded anything on my own before
why not move the manual install to a different folder, and subscribe to it?
Well it works for me, but 1 positive case is not really enough
what is different between your game and mine?
if it works on your system, you should expect it to work on all systems
if it doesn't, then people can complain and maybe you can fix it
Yeah, probably will wait for "does not work" comments, thx
what is everyone's fav QoL mods?
Are there any mods that add creatures? I would love necromorphs, or creatures that appear in the fog whenever the fog comes. Or even just any type of tougher zombie would be nice
Anyone here interested
in fixing Raven Creek?
The new foraging system doesn't work in it
have you asked the person who made the map ?
How do I get the lightlevel for a square?
He's been inactive for a while
also i think its a new atributed placed with the worldedit tool and there is no current way after my knowlagde to decompile a generated map files. which mean you will need the original files of the map "not the generated onces " to be able to add the new foraging system.
Fuck
alright thank you
Anyone aware of a dairy mod that works? Like, say, if a guy needs some milk and we're 8 months into an apocalypse. Craftable Dairy Foods (https://steamcommunity.com/sharedfiles/filedetails/?id=1939995891) would be good but it hasn't been updated since August so I'm not wholly sure that it still works and am kinda nervous to test it.
Basically I want milk to be found even after it has spoiled, something craftable and more immersive perhaps. Not sure if this is the right place to ask.
the mod said it work in currently Version 41.53.
so im pretty sure it work fine
Finished my latest mod 🎉 thanks @weary matrix and @quasi geode for your help during the last few days! It allows you to instantaneously loot an item... with consequences! (in the same fashion as in State of Decay) You can find it here ⤵️
https://steamcommunity.com/sharedfiles/filedetails/?id=2691346300
That mod looks sick!
Nice
Thanks 😁 It was quite the task, I had to cut the scope a bit to have it released but I am happy with it as a first form.
Started that on Monday evening thinking "It should not be that hard, I'm starting to understand well how all of this work". Famous last words 😅
I'm having frustrations with being able to intercept death events prior to the game processing them. I was able to intercept about 90% of them by looking for player:getHealth() == 0 on player update but some things (like the dropping of items in your hands) I cannot intercept.
We really need OnPlayerDeath to be split into OnPlayerPreDeath and OnPlayerPostDeath
Try player:getHealth() <= 0, maybe that can do the trick
Anyone know where watched TV shows are stored? Or if at all?
media/scripts/newitems.txt
I mean stored for players
yeah, I wish the was the issue. You can see the hand items fall to the ground even before registering the death animation. So I'm trying to find out where to intercept that
yeah I just understood
I assume you can't keep rewatching tv shows/VHS tapes non stop?
There is a event OnCharacterDeath too
A mod adding Smileys to the MP chat would be great with the possibility of easily adding custom ones
yeah, OnCharacterDeath actually comes after my player:getHealth() <= 0
You mean if the boredom stops going down after a while? I do not think so
Mmmmm there is a event onItemFall, maybe you can check here if the player is death
{
SutureNeedle,
Thread=2,
AlcoholWipes=2/Disinfectant=5,
SutureNeedleHolder,
Tweezers,
Gloves_Surgical,
Scalpel,
CottonBalls,
Bandage,
Result: TOC.Real_surgeon_kit,
Time: 30.0,
NeedToBeLearn: false,
CanBeDoneFromFloor: false,
OnGiveXP: NoXP_OnGiveXP,
SkillRequired: FirstAid=4,
Category: Surgeon,
Tooltip: "Tooltip_Real_surgeon_kit"
}```
The line `AlcoholWipes=2/Disinfectant=5,` give me an error, what do I do wrong ?
let me see what that returns. thanks for pointing it out
Great job! I was able to intercept the drop. Will see if I can match it to player death and remove it.
It is worse than I thought. On death, hand held items are forcefully spawned with no previous owner identifier. I'm going to assume this is hardcoded and cannot be modded out.
What are you trying to do ?
ensure that all items are removed on player death in support of my mod https://steamcommunity.com/sharedfiles/filedetails/?id=2685600088
I have an option to "retain equipped" items upon death, but want to ensure there isn't any duping. I can ensure this with everything other than handheld items
I mean, the game knows if you've watched a VHS for skill xp or not
Mmmmm a somewhat complex method would be to check the player's death chunk, take all the objects on the ground, distance them from the corpses and if it is very close, delete the object
I don't know at all how to do it but it seems possible to me
Are the skill VHS not the same as the live tv shows?
Letting the game play on FF and none of the VHS on learning materials is getting highlighted
does anyone know there is a mod that u can see your friends on your map while playing coop
Anyone knows how to do an animation mod?
i guess animation is under modeling. and if you have made all that i would just look how the player animation was build op in vanilla if it was.. but personaly i have never tried that so far.
hm
It looks like the item ID is retained on drop. So it will be a simple ID match to force delete.
What do you mean ? Btw it's the error java.lang.NumberFormatException: For input string: "2/Disinfectant"
It doesn't seem to detect the separation
on death, the hand items that are dropped retain their ID
I'm just saying I found a possible way to capture the correct dropped item(s)
O yeah mb
media\lua\shared\RecordedMedia
mmmm no, it seem to be the text
Hey guys, very quick dumb question. I have a server running latest build, are mods currently somewhat stable?
Is there any mod with a bicycle in it?
Are there any mods that add creatures? I would love necromorphs, or creatures that appear in the fog whenever the fog comes. Or even just any type of tougher zombie would be nice
Is Paw Low still an active moder in pz?
Is there a mod that brings back the old foraging system
I wish
it'd be easier to just make a mod that increases the foraging spawns lol
How hard would it be to make and Eldridge horror mod in zomboid would it be possible? To been honest I think it would be pretty cool but extremely hard to do especially if you where making it to be used in servers. But is it possible
I have no modding experience but maybe I’ll try it out because this idea is so cool
it seems you cant do multiple items when using /
if you figure it out tho, let me know
Nice! Congrats!
Does anyone know how to get it so when the item your using breaks it gets replaced with a new item?
@agile swallow just do what you said, replace it with a new item 😛
My friend and I are trying to figure it out but we are stuck. Basically once our axe breaks we want it to add a new item to the players inventory.
Holy shite
https://steamcommunity.com/sharedfiles/filedetails/?id=2642582759&searchtext=animation This is gonna be the best mod ever. Brings back a feature we already had and went away for some reason
Anyone know the reason why, when i drop any item it dissappears?
You have Paws Low Loot?
I think so
Because that mod is currently broken and will cause any items you drop to disappear.
Ok, thanks
Nother question, Ravencreek alot of SWAT vehicles around. Is this normal?
Is there some sort of hook for adding ingredients to an evolved recipe? I'm developing a recipe mod that lets you put ingredients in recipes where they don't belong (like chili powder in a beverage) and want to add an unhappiness penalty to the result (since you're drinking chili water)
something like
function JustAddedToEvolvedRecipe(recipe, added, result) {
if (added.DoesntBelong in recipe.Name) {
result.Unhappiness += added.Unhappiness * 0.05
}
}```
Hey all, looking for a bit of help implementing this mod to an already existing dedicated server: https://steamcommunity.com/sharedfiles/filedetails/?id=2623855083
Specifically, on the mod description, it has a "Map Folder" listing along with the workshop and mod IDs. I know where to put the workshop/mod IDs in the .ini, but where do I put this "Map Folder" line? It's listed as "STRSpawn"
I assume this allows the assets to be populated into the world organically, but I've never used a mod with such a listing before
OnMakeItem seems to trigger for evolved recipes, though I don't think I have access to the item used for a particular step of an evolved recipe
by any chance does the spices field of a Food item contain all of the ingredients in an evolved food, not just the spices @weary matrix? there appears to be no corresponding field for regular ingredients
@hearty fractal please ask in #mod_support if you need support, here it's only about developing mods
@pastel estuary sorry I have no idea
oh, the link I posted was not meant as a response to your question, sorry
My bad, thanks
@pastel estuary mmm it seems OnMakeItem is deprecated, not sure you should be using that
try to check Lua code from vanilla for the timed action for recipes, then you could hook the :perform() method I guess
@weary matrix Seems you tagged me by mistake in your reply, you're looking for @pastel estuary 😄
@hearty fractal aw damn, I have to stop doing this, thanks for telling me 😅
yes and no
he is aware of the broken stuff
@craggy furnace about the item that disappear I think it shouldn't be too hard to fix
yeah ive been wanting a fix
you just have to add the item to the square with the proper transmit*() function
havent really gotten around to work on it
ive been meaning to do some work for eris too
@craggy furnace https://zomboid-javadoc.com/41.65/zombie/iso/IsoGridSquare.html#transmitAddObjectToSquare(zombie.iso.IsoObject,int)
declaration: package: zombie.iso, class: IsoGridSquare
i wish i could drum up the courage to code for PZ
but its not something ive wanted to do since i do not like coding at all lol
@craggy furnace guess you have a good occasion to start right now 😅
i saw that emote change boi
typo 😛
yeah the best time to start to start was yesterday but the second best is yadda yadda
i am in a rush to finish atleast 4 mods atm
heh
if i can figure out this issue thats 1/4 😅
turns out OnMakeItem wasn't actually firing, my code was just erroring because I forgot to itemtweaker a food type onto the item
🤞
now I'm just blanking on how to override vanilla lua files
@pastel estuary you found the lua class for applying recipes yet?
@craggy furnace which issue?
yeah, ISAddItemInRecipe.lua
self.baseItem:setJobDelta(0.0);
self.character:removeFromHands(self.baseItem)
if self.sound and self.sound ~= 0 then
self.character:getEmitter():stopOrTriggerSound(self.sound)
end
self.baseItem = self.recipe:addItem(self.baseItem, self.usedItem, self.character);
ISAddItemInRecipe.checkName(self.baseItem, self.recipe);
-- needed to remove from queue / start next.
ISBaseTimedAction.perform(self);
end```
ah, right, you have to do something to allow adding any item, mmm
I was mostly talking about adding the malus when you apply the recipe
I can use itemtweaker to do that part:
TweakItem("Base.DogfoodOpen", "FoodType", "NoExplicit");```
the part that probably needs lua is applying unhappiness penalties for illegal food items
its a texture issue
seems to conflict with blood
might be a mask
@pastel estuary guess you have to check this: client/TimedActions/ISCraftAction.lua
@craggy furnace ah I can't help you with that I guess 😅
yeah its bizarre
might have it fixed in 20
media\lua\client\ISUI\ISLiteratureUI.lua This is the menu with the books and vhs already seen that you can reach from the character menu. Should be what you're looking for in it. For exemple that looks promising: local categories = getZomboidRadio():getRecordedMedia():getCategories()
oh yeah, I can just copy the file I want to override into the mod and it takes priority
it's been a while since I last did mods
@pastel estuary no, avoid doing that, your mod would break or break the game as soon as the file is updated by the dev
@pastel estuary you can probably do something like this:
local ISCraftAction_perform = ISCraftAction.perform
ISCraftAction.perform = function(self)
ISCraftAction_perform(self)
-- add your malus here
end```
@pastel estuary check the :new() method in the same file, you'll see what attributes you have available
like the reicipe and the resulting item
the recipe might contain the ingredient you added, not sure though
Anything special to do to add new traits ? I do TraitFactory.addTrait() from OnGameBoot event, also added the corresponding png in media/ui/Traits, but I can't see my new trait when starting a game
and I added the corresponding entries in media/lua/shared/Translate/UI_EN.txt
You do something like that local drinker = TraitFactory.addTrait("drinker", getText("UI_trait_drinker"), -12, getText("UI_trait_drinkerdesc"), false, false); ?
yes
ah damn, I was subscribed to the mod, so it was ignoring the one in ~/Zomboid/mods
my bad
@main lion Just curious, but did you ever figure out why Eris NVG's lua decided to murder dropped items out of the blue? I'm really curious as to why that happened. Heck, I'd probably read a white paper about it.
@zealous wing sounds like a call to square:transmitAddObjectToSquare() is missing when dropping the items
Is the problem only with MP?
mmm wondering if modData is per mod or not
like if two mods use the same index in getModData(), does that conflict?
so far, so good
dear PZ: please behave 🤞
any ideas why this occurs when there is blood?
that's not static right?
yeah, so probably should be a UV mapping issue
its not my model, its from the skeleton that TIS made so thats also possible
time to revert to static then
Does anyone know what the "animnode" for welding is?
tried weld or welding but neither work
there is none specifically for "welding"
AnimNode:Disassemble,
hello, I have some question regarding the scope of modding in PZ. I'm a modder in RimWorld and KSP but I've never modded a game that uses the java/lua combination.
Guys how do you get your iso objects on a clicked square when that iso object is on a table for example.
Cause using ClickedSquare for me doesn't always pick the items unless i click under the object on the ground (square).
Maybe there is a better way of picking the objects when we open a context menu?
(Clicking directly on the iso object which is Y offset higher doesn't pick it)
Ask your questions we will answer what we can.
well, I intend on doing reworks for some mechanics like shadows casting for fow, projectiles with bounding boxes and more. If are you familiar with rimworld mods such as CE it would make sense. The main issue is I'm a dot net dev and my familiarity with game development/modding with games no based on unity is limited, Thus I can't tell what is possible or not. The main reason for asking this is the absence of reflection in java and function pointers so I have no idea if you can just straight up replace entire functions like we do in unity based games.
You mean in OnWorldObjectContextMenu when you right click items?
@weary matrix yeah its weird depending on what table i have my iso object it pick very well
ill show screenshot soon
Everything happens in lua, so you will have some limitations in what you want to do
Well first, modding in PZ is done only in the Lua scripting engine.
PZ is built on Java, it uses script engine to interpret lua and exposes a specific range of classes and methods to the lua environment.
So you might be limited alot on what you want to do.
@craggy furnace thanks
np
@granite yacht
its like there is "things" that appear under but when right clicked its over
in the image top row: it pick the bench behind
in the image bottom row: it pick the window on the wall south of the character (which is transparent)
you can try using IsoObjectPicker
example:
local x = getMouseX()
local y = getMouseY()
local body = IsoObjectPicker.Instance:PickCorpse(x, y)
at the moment i use local square = clickedSquare
the global clickedSquare
i will research how that global get assigned its value
ISWorldObjectContextMenu.fetch = function(v, player, doSquare)
clickedSquare = v:getSquare();
for i,v in ipairs(worldobjects) do
ISWorldObjectContextMenu.fetch(v, player, true);
end
mhm
so basically i only get the last v object in the loop
so i should loop myself the worldobjects
ah yes, wanted to ask if you did 😂
hey im not sure if this is the place to ask but does anyone happen to know which mod has this ID attached to it? 2619072426
i need to find out how which one it is cause one of the servers i am trying to join is apparently using a more updated version than what I have
however when i restart steam none of my workshop items are updating
Something i just threw together this afternoon, i made it for my server but its something that should be in the base game https://steamcommunity.com/sharedfiles/filedetails/?id=2691818554
@blissful meteor hey, interesting, are those iso object?
or actuall item u just drop on the ground
ah so its movable iso objects
ill take a look to see if this works with FuelAPI
Does someone know any padlocks mod that works in doubledoors?
also, is there any way possible to claim all buildings as a safehouse not just residentials?
Hey mate, sorry for the delay. Information like this would be better answered over in #mod_support.
The mod you're questioning about is this:
https://steamcommunity.com/sharedfiles/filedetails/?id=2619072426&searchtext=2619072426
Anyone know how works Translation_Data?
@thin hornet I did look at FuelAPI, problem i had was if they are a 3d Object you can walk through them, This way it works and they are stackable
if its possible to be able to take and add fuel directly to them though that would be nice
yeah im testing atm
i just updated it to remove the Gas writing
looked weird when you have too many, now they are just red haha
loll haha the way he weld the barrel is funny
yeah i know, maybe can be improved lol
i just noticed i made they look different when empty and not, two different sprite
used different ones...... guess ill re do it later
how much gas does the large fuel can from fuelapi hold?
large gas can has a usedelta of 0.04
so 25 unit
small one is 8 unit
how do i add fuel to the gas barrel
need 5 full gas cans worth
oh you made it so that i need to pick the barrel
@thin hornet i did make it originally so that it worked like a gas pump
problem was with the world gas pump settings if set to empty they never had any gas
you could take fuel from it but couldnt add fuel also
I'm doing some curiosity research on how loot distribution works. I have a question about Distributions.lua.
I see the label forceForTiles, does that mean use this distribution for these tiles in room X
For example, garagestorage has:
{name="GarageFirearms", min=0, max=99, forceForTiles="furniture_storage_02_8;furniture_storage_02_9;furniture_storage_02_10;furniture_storage_02_11"},
I used the tile editor to figure out that furniture_storage is a tile map and those are the gun locker rotations.
Does this mean that If a gun locker appears in a garage, use the firearms distribution
Also, is there any way to figure out what a room looks like? Garage storage seems obvious, but some are harder to guess
so getting fuel from pump doesnt work if the world settings is set to empty/none
yeah and that affects the barrels too when they are made that way
but you could place them and "take fuel"
ideally thats the way i wanted it tho
ha, im very limited in lua
i could mod a version so it works like a gas pump if you like though
and you could work from that
with a custom context menu we can probably get it to work ill check the limitation of the initial fuel world settings first
Hi, not the right place indeed. You should ask in #mod_support, better chance to get an answer there
@blissful meteor so basically square:getPipedFuelAmount() method is the one checking for SandboxOptions.getInstance().FuelStationGas.getValue() and force return 0
we can still check for the fuelAmount moddata itself
Would you like me to make a version like the old way i had it, you can just modify it and throw it into fuelapi if you like
@thin hornet
Hey nice one, I wanted to make a mod like this! 😄
@blissful meteor yeah if you can send it to me in dm ill look at it and we can workout something.
alright
at this point with fuelapi it could help make any isoobject an actual fuel container easily
so the barrel could have just some moddata with information on capacity and content and fuel api would make it behave as it should
So FuelStation start at 20000 litres.
Then based on the WorldFuelSetting it change it the first time getPipedFuelAmount is called.
base on the setting it multiply by this
Anyone has a good mod that spawn random items (food, melee weaps and etc) on zeds?
@karmic tree better ask in #mod_support
mmm so the lua function next() is not available in Kahlua right? If anyone knows
ah guess I could simply use table:isEmpty() though 😅
damn, when you declare a table like this: t = {}, you can't call the methods from KahluaTable on it? 😦
Is there a command to respawn loot in a container and/or some way to see what decisions the game made? I want to see why some containers are coming up empty]
Ok so I went to the army surplus store this guy went to: https://www.youtube.com/watch?v=I0pDIvYPgTY&t=817s&ab_channel=EmberDG
The gun lockers in mine were empty, so I thought it might be bugged. But now I'm wondering if it was intentionally removed because the "locker" definition is empty, is that it?
The chunk debugger says the room name is armysurplus.
Distributions.lua:
armysurplus = {
...
locker = {
rolls = 1,
items = {
}
},
In this Project Zomboid Let's Play video we'll be Raiding a hidden gun shop with guns everywhere! Gameplay of Project Zomboid with Mods, Guide and featuring Resident Evil Characters and Mod!
Please Consider Subscribing to help Support the channel: https://tinyurl.com/emberdgsub
Hidden Gun Shop Location: https://map.projectzomboid.com/#0.3059339...
@fringe finch can you show the code you wrote for distribution?
Oh, this is just what's in Distribution.lua, I didn't write anything. I'm on a mission to understand how loot works, that's all
real qusetions that need real answers why hasen't anyone made a kg to pounds mod
because kg are more intuitive
Again I shall ask: how do I get the lightlevel of a square?
Does the chunk debugger show that? I just started using it so idk
because zomboid doesnt necessarily use kilos
the weight is more like a measurement or how awkward it is to carry
@gleaming valve This is from \media\lua\shared\Foraging\forageSystem.lua - you might want to look at the file if you want more information with how this function/values is/are used for light level.
function forageSystem.getLightLevelPenalty(_character, _square)
if not (_square and _character) then return 0; end;
local lightLevel = _square:getLightLevel(_character:getPlayerNum());
local dayLightStrength = getClimateManager():getDayLightStrength();
--just make it fully bright if over 80%
if lightLevel > 0.8 then lightLevel = 1; end;
local effectReduction = forageSystem.getDarknessEffectReduction(_character);
if _square:isOutside() then
return math.max(dayLightStrength, lightLevel) * effectReduction;
else
return lightLevel * effectReduction;
end;
end
@brittle jewel I was looking at this yesterday, but I suppose I was too tired to accomplish anything with it
got it to work now, thanks
@gleaming valve not sure if it;s really doing what you need, but IsoCell has a getLightSourceAt(int x, int y, int z) method, and both IsoCell and IsoLightSource are exposed to Lua
hmm anyone there can remember which debug option i need to turn on to be able to test out building stuff with out have the resources for it ?
Anyone good with car mods as I am building my own car mod and having difficulties with debug mode and I could do with some help and tips on fixing the mod. I know the distro works as the cars do spawn in the world but as shadows so I would like to know what causes that and how to fix it. Plus I need to know how to use debug mod in order wheel aline the models and entering spots on the vehicles. Cheers
The modeling is done, its to do with code
mmm I mean if you get a shadow instead of a car it sounds more like a modeling problem, but maybe I'm wrong though
I followed the format of the car modeling its now to do with the editor and code its more to do with the coding how a item spawns into the world but if somebody who does car modding knows what causes it I would like to know
@faint cape
Paying for someone to make a functional mod that spawns random items on zombies
Where's it at? 🤔
Is it customizable ?
you could add more items via the distributions page all you have to do is change what the item base.[name] is
It's the most basic of mods
And that would be done in the mod files right? Wouldn't that be overwritten by players?
All this mod does is have a roll chance for random specific items I added in
like crisps, peanuts, tissue, gas can, hammer etc
Where can i find it's files?
Just curious, why did you reply with that?
Because he is a streamer and likes to find easter eggs etc @fringe finch
@karmic tree Drive>Program Files(x86)>Steam>steamapps>workshop>content>108600>2686972114
add this line for ever item you want to add and edit the bold lettering with the Base.Object you want
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "Base.Disinfectant");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 5);
All item codes:https://pzwiki.net/wiki/Items
roll chance
100
I don't need donations man, thanks though
I mod for fun, this is a hobby for most people here
Since this is sort of on topic, is there anything you can use to debug loot distribution? Like does it show up in any logs, are there any commands you can use in debug mode, any debug windows that show you what happened, etc.
Like those gun lockers, I'd love to force an item respawn and see if anything shows up in them. Or maybe a log file that says what it chose
I understand
I couldn't find it
Already subbed / unsubbed
What a coincidence
Yeah but i dont have that one
do you have 2 drives? maybe on another one
Yup! Was in another drive :p
:>
Thank you so much for the time @drifting ore and @west crystal 🤭
I literally did nothing but ok
@drifting ore Done, i've given you every single award 🤭. Thank you again!
The fuck
Anyone know why Say() might be getting processed through the player with SuperbSurvivors on?
When people use conditional speech with SS all of the NPCs speech goes through the player - but nothing was changed in the mods
@drifting ore he won't see it till later as cheese is streaming
if one wanted to make a cat ears mod completely from scratch with 0 experience, how would one do so?
@sour island have you tried to add a small mod that just does Say to see if that would reproduce the issue with SS?
Nope.
Just going to disable CndSpeech support for NPCs
But the debug messages have the actual NPC as the playerobject
You can look for bunny ears in the game files for reference, or take a mod from workshop and look how it's done. Also don't forget about a day or two (or eight) of fucking with blender
it just seems like once it hits Say() it is grabbing the client's player
would be curious to know if it's a bug in the engine or in SS 😅
I can't even test SS - as it throws up errors non-stop and I have to spam F11
May just test it with Aiteron's NPCs instead in a next pass
@analog iris authentic z adds cat and bunny ears to zombies in the world you don't need to make a mod if there is already one
Well i mean if he wants to, why not
true true
well is there a maid dress mod
I believe there is
thats in the mod as well i think
THEN WHAT IF I WANNA PUT AMONG US CLOTHES THEN
sussy zombies
you don't get bitten, you get ejected
i WILL add catboys into project zomboid
well good luck
@analog iris authetic z adds full out fits and there is a maid out fit in the mod
in authentic z?
yea
oh
Not short ones
i should add blood gulch
I just remembered why i even came back to pz modding, to make some fishnets
what good is a game without blood gulch
does anyone know of a mod that would give me a clipboard copy of all the steam workshop ID's for the currently loaded mods
rather than having to manually copy them from every steam page
any most have mods i am new to the game?
None of the mods are must have
no but what are the most recommended mods
Better Sorting is my bet
Also textures to remove underwear
https://steamcommunity.com/sharedfiles/filedetails/?id=2691116248
(yes i am sneakily advertising my own mod)
that just sounds weird


Why does he have a pig nose
Kept sniffing to keep his running nose too much.
What is a good introduction to lua PZ modding wise? and or do you guys have a guide on lua?
Got my new pc set up its time
I decided to start with just making like skillbooks, I knew they were common af so I just had fun giving them dumb names.
Otherwise have a browse at people's workshop creations you can learn a lot.
I need help why the hell if i only make one server it makes 2?
whenever i edit mod settings it doesnt save em when i hit save
for example cars with gas dont save to server after i hit save
why are there multiple mod allowace windows should just have one in the mod menu for the ones i dowloaded not 2 it gets confusing af
the loot rarity is mostly common hit save go back log in nothing is set exit go to mod menu and it all resets to rare...
Have anyone considered or created a patch system for java?
By patching the java byte code to add prefixes postfixes etc to methods or straight up patch some parts?
Like the only difference between it and an approach like harmony is that harmony works in runtime
There is an event like OnPlayerBitten or OnPlayerInfected? I find nothing. The objective is to know when the player is infected
Also, how do i equip a weapon in a specific hand in lua? And if it is possible to know if we can equip the weapon with one hand or only with two hands.
so inorder to make server settings i have to go to the bottom server copy and edit that to be the sameas the top one?
since in list there is 2 copys of my server and one is apperently the savings?
Oh yeah, first one so far
and so it begins
Well i consider 1 out of 250 subscribers a not so bad result
Hello I am here to tell modders that their mods don't work nothing happens alright got to go oh also pls fix
Tells modder than their mod does not work
Does not provide any further context
Leaves
YES
i can feel it because this dude does not respond and his profile is private so i can't even dm him
they probably just dont know how to enable a mod or something
This would be the best case scenario because i have no fucking clue what to fix in a folder with 5 textures and nothing else
i must ask, how do you acquire the specialist role because it seems like they're being handed off like candy lol
I have no idea, i was survivalist last time i was present in "modding community"
curious

lol
Like, literally, what the fuck should i fix
its probably just a problem on their end
i wouldn't think too much of it
people have all sorts of wacky issues all the time
Anyone know of a way to claim non residential buildings, and if i do not claim one and use it as a base, will i lose stuff in it?
Anyone have a way to test MP code alone?
with two PC jeje
seems legit
@west crystal You might have made a coding mistake or a Typo (such as one of the textures not be capialized but in the code it is) Or your missing a comma. Happens to me all the time, Does it work for you?\
i'm pretty sure it does
there is no code...
and or you didn't put all the files into the md
at all
Really, that is just a folder with 5 body textures
Yes
And i think other 260 peeps would tell me if it would not work
Ah ok, sorry i thought something was up
if i wasen't working for one guy then its props his game/how it was installed
You can test it yourself, the more info the better for everyone
Basely tell him to reinstall zomboid and see if it works then, and or to check the error logs and send them to you
So many people forget the error logs/logs exist 🙄
The error/logs help a lot
or ask them to turn on debug mode and see the problem
I think if he can't fix it himself turning on debug mode is above his level
Of course, I'm so sorry your having this problem but ask him to send the error logs tell him what file its in
And tell him the date of the file he must check it should be something liek Log-24-12-2021
Well i wrote the comment, waiting for him to respond
Cool, Your doing amazing work thanks for modding the game
little labors of love they are

btw do you guys have some guides on lua? beginner tips ect
i was just inspecting other mods as a reference
The guy doesn't understand how to activate his mods for multiplayer, it's not your fault.
hey what do you guys think of the defecation mod
@sour island Change 'steam=1' to 0 in the StartServer bat file and do the same in the ProjectZomboid bat file in the game directory. Then you can launch multiple instances (with the .bat)
It is the best. I'm totally not biased and I'm totally not the mod author.
it doesn'
lol good job man love the audio
It works for everyone else. I would make sure you've got it installed and activated correctly.
is this about my mod?
no the poop mod,
ok ok, good
well not good if it's not working
good that it's not mine that doesn't work
Tbh in PZ sometimes i just play dress up before playing the game like: I'm gonna look so fine
also if possble can someone mod in facial hair for younger characters?
facial hair... for younger characters?
Hey guys, is ```c
Events.EveryTenMinutes
@ionic galleon I made a system to load java mods but it's not ready for MP yet. No patching though
I guess you could use OnPlayerUpdate
local primary = true
local twoHands = false
ISWorldObjectContextMenu.equip(player, player:getPrimaryHandItem(), spear, primary, twoHands)
also you can use IsoPlayer method: setPrimaryHandItem, setSecondaryHandItem
is it possble to add weight based off the streight stat?
Ok i think i'm ready to start my busy work where are the code files held?
Soon! 😄
Oh that's handy
I got 9 comments on a single mod and now I can't see the page's comments?
Do you mean ProjectZomboidServer.bat?
Weight as in like carry weight, I assume?
Since I know the code that handles that is "setMaxWeightBase" and it's default value is 8.
And setting it to 10 makes it increase your capacity by 25%
No i ment the characters weight.
You know more KG per streght stat
You way more because of your streght stat
Oh I see, I haven't looked for that so I don't know that's line of code atm
I might be able to figure this out my self where are the code files kept?
I'll look for them my self if that can't be answered
Well I know this is where you can find out how to get you can find codes so I can imagine you are able to find the code that gets the weight value and code from there
thank you jackpot
np, it helped answer a lot of my own questions especially when deciding on how to do "extra damage" more reliably.
@sour island just found this in Aiteron NPC mod, though it might give a hint about the issue with conditional speech and NPC speech going through the main player:
o.sayDialog = NPCSayDialog:new(o.character)```
Do modded maps work in MP?
i'd assume theres nothing that would make it conflict other what i'd assume being the mini map
Also i'm lowkey map that you don't need a map for the mini map ugh,
What's that mod
is there a specific list of known mods that work with multiplayer?
Ammo Maker from my mod pack that will be updated soon! 😄
Is it on GitHub?
why not make the game load it instead of the other way around?
@ionic galleon how would you do that without patching the game?
well you would need a patcher however since it's only a hook it shouldn't be extremely complicated
@ionic galleon it's not about being complicated, the problem if you patch the game is whenever the game updates or when users check file integrity with steam your java mods would be broken basically
you'd have to reinstall the patch every time
I'm aware of that issue, tho I have done it before
i did it in rimworld with cecil
That's what I told myself but I wanted something else for performance issues
@drifting ore don't worry too much about the performance, it's Lua

unless you do something crazy (as in algorithm complexity) you should be fine
how bad is the current multiplayer situation, I have a feeling that a sync horror show is happening
@ionic galleon can you imagine how much support you'd have to provide with all the people complaining about the java mods not working because there was a game update or checked file integrity with steam
Yes but it will check every moment against checked once in the game. It's the kind of little opti that I like to think about upstream
not going to be worse than rimworld
nothing is.
@ionic galleon anyway that was just to answer your question about why I'm launching the game instead of the opposite
I don't want any patching to occur, to avoid the problems I mentioned earlier
What is the main reason to do a mod in java instead of lua ? Performance ?
@drifting ore nothing about performance, just have access to the whole java engine, you can do stuff that would be impossible from Lua
tbh, unless it has some type of runtime patching, it's going to limit what can be done. the way I used to do it is by keeping a copy of the unpatched game and launching the patched version
Ok just for java libraries, make sense
@drifting ore for example the first javamod I made as a proof of concept was a quicksave mod, from Lua you can probably save your gave, but you won't be able to reload the saved game, unless you do it manually
@ionic galleon let's agree to disagree 😅
for example the average zomboid player is not able to locate zomboid install folder on their hard drive
I don't have the time or energy to spoon-feed all the people that would complain because their java mod don't work (after they updated the game or checked file integrity without realizing the impact)
right now I can expose any java class to Lua + add all the global functions I want
only limitation is if you want to add custom Events
but there are ways around this most of the time
@ionic galleon also there are other projects for java mods that patch the game if you need
oh I know, I have ptsd from that
i print the path to log ingame
I think Aiteron made his own Say()
hehe
I have a combined of 300k users in rimworld and a small amount in ksp
prolly he did, but it makes me wonder why he would have done it unless to solve the same issue you have with conditional speech
in my experience you educate a small part of the user base to do the support heavy lifting
and in return give them insider access and a say in what you do.
sure you could do that if you want
the way I do my stuff it can only break if the dev change the mechanism to expose java class to Lua and global functions (for the java mod loader itself I mean) or if they change the way the game is launched
Are there any changes to make for the mod to work in multiplayer? I am using getPlayer(), which is the only place I can have a problem if the game takes the wrong player
Merry christmas btw all 
@drifting ore not 100% sure about that yet, but I think if it's only client-side code, getPlayer() should be ok (it's just assumption on my side though)
I hope so, I will need to find someone to test with
@drifting ore in which context do you need access to the player object?
from a Lua event handler or something else?
I can help you test it if you need
I use it everywhere, that's what scares me a little but if I'm doing well, I can clean everything and use it once per player
Thx, I don't know when I gonna finish it. In 2-3 days I think, I text you when I need you
I'm having a problem uploading a mod to steam and it's driving me nuts. Has anyone had this happen:
I don't really understand what the problem is and it's driving me insane.
you need to put the mod.info file inside the actual mod file instead of the workshop folder
the workshop folder needs a workshop.txt
What documentation are you using that instructs you to do that? I looked a few tutorials and that hasn't been mentioned as part of the upload process, so I'm sure I'm making other mistakes too. (EDIT: Turns out that there was a folder in my 'mods' directory that didn't contain a mod.info file)
theres a mod template folder in the workshop folder that has all the file structures and stuff for uploading already there
I saw that but I thought that it might be an outdated version of the requirements, I'll try it exactly that way.
@winter bolt can I message you with some additional questions?
ok
how do i change my charactera weight in debug mode?
Hey Guys im having trouble getting autotsar trailers working on my dedicated server
any suggestions
you should try #mod_support instead
ok
May it help someone i'll drop this here again:
For Client/Server communication
*replace **ModuleName *by your module name ex: MoneyMod
*replace **CommandName *by your command name ex: SendMoneyTo
On the **server ** script:
When the server receive a client command
local Commands = {};
Commands.ModuleName = {};
function Commands.ModuleName.CommandName(playerObj, arguments)
--- do things on the server when this command has been received
--- playerObj is the client who sent the command
--- arguments is the kahlua table containing the data
end
function onClientCommand(module, command, playerObj, args)
if Commands[module] and Commands[module][command] then
Commands[module][command](playerObj, arguments);
end
end
Events.OnClientCommand.Add(onClientCommand);
On the **client ** script:
When a client receive a server command
local Commands = {};
Commands.ModuleName = {};
function Commands.ModuleName.CommandName(arguments)
--- do things on the client when this command has been received
--- arguments is the kahlua table containing the data
end
function onServerCommand(module, command, arguments)
if Commands[module] and Commands[module][command] then
Commands[module][command](arguments);
end
end
Events.OnServerCommand.Add(onServerCommand);
Sending Commands:
-- Send command CLIENT to SERVER
sendClientCommand(playerObj, "ModuleName", "CommandName", { someData = 1 });
-- Send command SERVER to CLIENT
sendServerCommand("ModuleName", "CommandName", { someData = 1 }); -- to all player
sendServerCommand(playerObj, "ModuleName", "CommandName", { someData = 1 }); -- to specific player
Just pushed an update for Sleep With Friends, now uses an option in Time under Sandbox thanks to @weary matrix
Also recovers endurance faster as well
@civic galleon great mod man 🙂
Thank you
We have more planned for it, but I may have to wait until the mrs goes to bed, she seems a little peeved I just spent 3 hours messing around with PZ on xmas eve
🤣
oh its xmass i forgot
Right before Christmas we had a Covid and quarantine situation :|
Does someone know how the game networks moddata? Is an object's moddata edited independently on each client and on the server? Is it networked with each update, in which case care should be taken to avoid lagz? Is it networked less frequently than it may be updated?
IsoObject moddata can be transmitted
Transmit IsoObject ModData to everyone
myIsoObject:getModData().testValue = 1;
myIsoObject:transmitModData();
Okay so maybe it is not networked by default. I imagine this could cause some desynchs maybe.
It is not transmitted by default you have to call the method on the IsoObject after it's changed
Okay hmm thou hast my thanks for that knowledge.
I still have to test for InventoryItem modData to know how that works
didnt see a transmitModData method there
I noticed there's a function to transmit removing a world item or picking up an item as well as the local picking up of the world item, and just one function for putting the world item there...
A placeholder version of one of the "workbench" items required for higher tier crafting in a project. They're not drivable; towable; or pushable, and randomly spawn with other vehicles.
ie, for MP, higher tier crafts require going to randomly generated public locations with your materials, to generate both risk and interactivity.
This vehicle would be used for crafting and repairing bladed melee weapons.
The purpose of this one should be self-evident.
And you can access the trunk/cargo while inside the vehicle for ease of crafting.
is there a value for furniture quality that one can pull its data from?
a sleep modifier if you will but just for the furniture quality
finish up her outfit with meshed baggy socks 🙂
Anyone know of a easy way to add a function to all active zombies every minute?
Speaking of chainsaws I wanna play as Power from Chainsaw man!

there is a chainsaw on authenticZ mod, but he did not add a sound when you swing it yet 😛
kinda works thou lol
I know there is an animation for using a chainsaw in the game. I had wanted to test my modeling skills buy making a picture chainsaw weapon

haha
please help
Looks like you gotta force update your mod
how
try to unsub and sub again
First try unsubbing to it and redubbing. If that doesn't work I'm pretty sure there is a guide to a more sure fire fix but idk what the link is.
oh man i still need to play the multiplayer... but i had a major problem back on b41 im kinda scared now lol
you got a server Nalmac?
i think i want to join some server sometime before i make one
I've been doing more personal coop stuff since I find the game better suited to that but for normal MP play I've just been joining well populated server I can find on the browser
Which btw I have to say the browser really needs some work. I'm hoping that is one of the first things the devs touch up after the holidays
they said to join 'whitelist:On' servers but all i see there are 'off' lol
and when i try to join it says i have to be invited
i'm having a issue right now with gun sound
When i shoot standstill the sound plays perfectly but when i shoot then move my character around or rotate my camera the sound start stuttering any idea ?
Yea that basically Means they are locked to invite only
like all the servers are invite only?
Not all but most it seems
never seen one that is not yet
It's hard to tell
i see
maybe you guys can invite me sometime? i just want to play MP a bit lol
not now i mean when you guys play
idk the server might be lagging
like the other too
i m still checking
ah
Like I said my server is only really a small coop one for me and a few friends. I'm helping them learn the game
I'm also looking for a more community server
yeah i prb should make one but i had a major bug when i did back on the beta test version, i had to re-install the game
im kinda scared lol
What bug?
literally a lot
Things have been working pretty solidly on my end. Some zombie weirdness at times but I've been playing DayZ since 2012 so it's nothing I can't handle
My only real complaint lies with the server browser. I was really hoping we would get a revamped one to replace the the old build 40 one.
Because man is it not good 
@civic galleon Hi mate, if i didnt set ```
SleepWithFriends = {
SleepLength = x,
},
will it default to something?
i dont know man i create this server and when i tried to load it a second time it crashed the game and i had to re-install it, but was back when was on b41 and i was switching all the time to 41.56 to play solo... i think that wont happen now
was nasty
no
if you manually applied it, x has to be replaced
no i mean if i didnt add anything
ohhhh
yes, it will default to 2, which is 2 hours
I believe I have the math right to be able to set mod by IRL times, but that is not close to ready yet
cool man 😄
like, set 1 min sleep no matter the day length
also, im close to an AutoWake toggle
then you will want the setting to be 1
Alright, I have updated Sleep With Friends yet again
and it now has an option to enable or disable Auto-Wake
merry xmas
and goodnight
If I can manage to sleep at this point lmao. No I feel like I gotta figure out how to include a custom moodle to notify players on servers with auto-wake off and not using Minimal Display Bars when they have fully rested and are just sleeping extra
I mean, notifying via chat box would likely be easiest, but thats lame as hell
Updated FuelAPI to let modders add Fuel Containing IsoObject
Vanilla Barrel can now contain Fuel
Nice
Very nice
awesome!
Also, is anyone else having issues with Sleep With Friends v1.1.1?
what kind of issues?
Or is someone commenting its broken cause they didnt make sure it updated right
Oh hey lol
hey 😄
No sleep with friends work very well for me
Hi guys, is there a way to get a table with all the zombies in a chunk with players in it?
Sorry, I was away from my computer all day. You probably already figured it out, but I have the dedicated server installed, so I edit the StartServer64.bat in the dedicated server root. I haven't tried it with the ProjectZomboidServer.bat in the game root.
I started having issues with the mod and my personal dedi not updating mods correctly, so I freaked out and delisted Sleep With Friends so people dont complain it doesnt work because it didnt update properly
If its a rare issue i will relist it, but right now I cannot work on it
hmm is there any example on how to make or add a new meta/properties setting under sandbox options?
Hey is it just me or workshop mod update is anoying asf?
like people need to unsub/resub the updated mod
check my spear traps mod: https://github.com/quarantin/zomboid-spear-traps/blob/main/media/sandbox-options.txt
is there a way like we go all complain somewhere to steam so they fix that asap
@thin hornet are you 100% sure it's a steam bug?
fun part was thining about pm you lol
well man, mod is updated, and we keep having issues about mod not on right version until we unsub and resub
just asking cause I never used mods with other steam games, but I guess you're right
hehe
Relisted the mod with a note for people that I cant help them if they have issues today
On xmas of all days smdh
It just sucks the issues are so over the map and never exactly the same. Personally seems like an issue with PZ commuicating with The Workshop consistently
Or vice versa
Cause even my private dedi is giving errors trying to update FluffyHair, and every mod down the line as I removed tbem
@mint sphinx also check media/lua/shared/Translate/EN/Sandbox_EN.txt
Then in code you can use the value like this: SandboxVars.SpearTraps.SpearTrapsKillPlayer
i know i just try to see how you add a new page like foo
ah haven't tried to add a new page though
i already knew how to grab the variable from sandbox 🙂
mmm guess you could try to set it in sandbox-options.txt directly maybe
let me know if it's working
also guess this part might be a bit more out of normal scope for most games lol
which part do you mean?
that people add to SandboxVars?
mm I guess it's legitimate to add custom sandbox vars, seen plenty of mods doing it
might just play the wrong mods then
why do you need the sandbox vars anyway? Just curious
first just to learn all small part of the game all form tiles. and tiles propeties when i have a break from writing my thesis xD and after that. i want to make a larger mod in the long run. which added quite a bit of things..
have you found your answer yet?
No not yet, i'm with my family today for the holidays so i will see tomorrow but i was asking the question upstream in case there is an easy and obvious way to do it
@drifting ore I guess OnZombieUpdate is just called for zombies that are in a chunk where there's a player but I'm not 100% sure
Make sense, worth a try, otherwise I saw a mod to help manage chunks
do you need something efficient?
but I try to calculate the distance between the zombies, if I start to do it just for all the zombies without chunking history it may quickly require too much computing power. But an isoLivingCharacter does not have a variable of the type nearbyZombie
Yep, that the main issue
then I guess your best bet is to use OnZombieUpdate and store each zombie in a table from there, something like:
AllZombies = {}
function OnZombieUpdate(zombie) {
AllZombies[zombie:hashCode()] = zombie
}```
D'ailleurs un gros merci pour ton aide en général et les docs que tu mets a disposition, super boulot ! @weary matrix
I don't think that's gonna do it, i have to calculate the distance from each zombie to all the other zombies. The number of calculations is a factorial, for just 100 zombies, that's 9.3e+157 calculations!
But I can do it for every 10min ingame and not every update so I don't need a perfect opti
what I showed you is just to get the table of zombies, then of course you'd have to compute your stuff in another place
may I ask why you need to compute distance between each zombies?
You can get cell coords and comparate with zeds coords, this way you can get all zeds on cell
I can actually launch two instances of the game using the bat's and use the Host in menu - then just connect to my local ip with the other.
The idea is to make a mod which, if a zombie has enough zombies in a perimeter, it will fly for 10min (get on a higher height). The objective is to do a bit like in world war Z with the waves of zombies that stack up and can climb walls. This is to remove exploits like the impregnable base by removing the stairs
oh nice
pretty sure there's a better way than computing distance between each zombie though
Isn't that calculating the distance? I don't understand your idea I think
I don't think so, the principle is based on whether there are enough zombies in an area so I necessarily need the distance. Otherwise I have to rethink the whole idea but there may be an alternative that comes up with a similar result
mmm so for the stacking to occur, you'd need multiple zombies on the same square or how would you decide if you should stack them?
is there a simple mod to look at for learning purposes that just has a script that triggers on an event?
Something like this, if there are 5 or more zombies within a radius of .5m from the zombies, bring them up. After I look for a good number and radius with tests
any particular event in mind?
what about checking for each zombie if the squares around it have zombies on them?
Oh sorry, my bad
try with this
--OnZombieUpdate Event
if not zombiesCoords[Zombie] then
table.insert(zombiesCoords, Zombie))
else
for k,v in pairs(zombiesCoords) do
if v ~= Zombie then
local zombieCoords = {x = math.floor(Zombie:getX()), y = math.floor(Zombie:getY()), z = Zombie:getZ()}
local Vdist = math.sqrt(((math.floor(v:getX()) - zombieCoords.x)^2) + ((math.floor(v:getY()) - zombieCoords.y)^2))
if Vdist < 0.5 then
--- your code
end
end
end
not tested (Obviously, you need improve it, for example. that the above is fulfilled only if they are at a certain distance from the player)
Try
--my code
End
Events.eventFunction(myFunction)```
Arg1, arg2 et eventFunction are on internet
Easy one, I will try it thx
I prefer not to do a gobal table, for example if I end up with a stack of 10 zombies. The risk is that 8 detects that there is enough zombie and goes up but I don't want that. I try to do it one after the other, the zombie detects this around, goes up and changes to another zombie. Like that on the stack of 10, only 2-3 goes up because there are fewer and fewer zombies nearby
What would a script look like that plays a defined sound when a certain item is picked up or equiped?
Hello.
I am trying to find a way to remove/disable a couple of vanilla recipes in a mod i'm working on.
The recipes in question are the Rip Clothing that apparently use the same name to normal clothing, denim and leather. i've tried to use Override:true and Obsolete:true to no success, anyone know how to work around it?
not sure how to catch item picked up or equipped :/
@tall compass what are you trying to achieve?
Hello.
I created a mod so people can cut leather and denims with knifes, axes, machete keytars, anything edgy. The issue is that it's showing both the original recipe with the scissors and the new one, even when i put override
ah I see
uhhh... since when keytars are... sharp?
@tall compass guess you could just remove the context menu entry for ripping cloth?
i said edgy, not sharp. =p
guess he meant katana but spell check failed 😅
i mean it's not even edgy
it's literally a midi keyboard made from plastic
how i can do it?
and excuse me, it's the edgiest instrument ever created and i shall die in this hill. (also a small easter egg because why not =p)
not sure it's the best way but this should work #mod_development message
this example will remove the first menu entry
guess you'll have to iterate the context menu to find the index your want removed
How to get computed player damage (with all modifiers, including perks and debuffs)?
print(getPlayer():getDamage()) -- always 100
Now out of curiosity, is there a call or tag that i can use to get all items/weapons that do cut/slash/whateverIsCalled damage? the same way i can use [Recipe.GetItemTypes.RipClothing_Leather] for things tagged to create leather?
I ask that because one obvious improvement i see in the mod is supporting knives of others mods
for example I use this to get any kind of spear from player inventory:
local items = getPlayer():getInventory():getAllEvalRecurse(function(item, player)
if item:isBroken() then return false end
if item:getScriptItem():getCategories():contains('Spear') then return true end
return false
end, ArrayList.new())
ok, thx
your check might be different though, like checking tags instead of categories etc
oh boy, i just checked
i was thinking in using he category, look for small blade
but butter knife is there
know what, i'm lazy i will look for mindamage above 0.2 XD
Which decompiler works for PZ for now?
ButterKnife has no DamageCategory though
not sure about other small blades
@weary matrix do you know if you can overwrite vanilla .tiles if you have other value insite a mod ?
both butter and bread knife have Categories = SmallBlade,
no idea, but why do you need overwrite? Can't you just place your custom tiles on top of existing ones?
@tall compass so you check category == "SmallBlade" and DamageCategory ~= nil or something like that
dont know if i can that i might also i kind of find it funny how the dev have made the things 🙂 you enable to set a max number on some object through the tile editor if you then go and look how the dev have done it is not even using that system xD
prolly they made the new system after making the old tiles
and haven't migrated since
That might be true also didn't check if it was an sandbox option on it.
does anyone know if Paws low loot works in MP
dont know but did you ask in mod_support about that question ?
hey how do i change the translate files?
Question: Are there any special considerations one has to take into account when ensuring a mod works for multiplayer? I.e., things like file structure or whatnot?
Asking because I've gotten several bug reports regarding some of my mods not working in MP, despite functioning perfectly in SP.
Like I said, not sure what to fix because AFAICT there's nothing broken/to fix.
what is the proper way to remove an item from the world? All of these return an error:
obj:remoobjeFromWorld();
obj:remoobjeFromSquare();
obj:setSquare(nil);
obj:setWorldItem(nil);
obj:setJobDelta(0.0);```
absolutely. but thats too vague to answer without specifics. 90% of bug reports i've been noticing lately are just plain wrong... being blamed on the wrong mod etc... unless they're giving a complete report with stack traces and all, best you can do is fire up a server and test yourself to reproduce the issue then go from there.
LMAO, great to know.
Also, I don't suppose you know if the devs changed how the game reads distribution files? I'm noticing a lot fewer errors on my end in regards to those.
E.g., I'm reworking a distro for one of my mods. the container "CrateRandomitems" no longer exists, but the old code no longer throws an error like it normally would have. Have they set it up to just ignore/skip wrong and broken containers like that or is it something else?
i havent looked at the distro files in ages
All right.
Sorry if I was interrupting.
not at all lol
my friend and i just got the game any qol of life mods worth getting? im getting absolutely shreked and i can't find him
Ive been wondering the same thing about mods and errors. Doesnt help that a lot of people are trying to cram 30+ mods when that wasnt the most stable in SP
Ive had so many various reports about my mod working or not working, version issues, coding not working but only sometimes
Cant tell if everyone is having a problem cause lord knows how many people just click unsub and move on
i feel that lmao. i keep getting people telling me my mods dont work in multiplayer even though they work fine whenever i use them in mp
are you trying to remove an item that is in player inventory maybe?
could you be more specific? 😅
Sure, I'm looking to change the text in the game, and i'd like to know what files i need to edit and how to make it work?
media/lua/shared/Translate/
How do i be able to put it in other peoples game/ my game?
it should work if you have same ID for the translation, I'm not 100% sure though
Can i just change the ingame file or do i have to put it in a mod file?
ingame file?
lol
you mean the file from vanilla?
if you modify the file from vanilla directly it will only affect you
Ah ok and how can i make this a mod?
well just make a mod with the translation you want to replace
And what file names do i need for that?
Mod/media/lua/shared?
then the text file to replace it?
same as in vanilla
cool,
guys i made a bracer model here, but as you guys can see it protect the Hand part, i want the Forearms, but you cant simple set BodyLocation = Forearms on the item file because there is not such a body location, anybody could help me create a new bodylocation? (like the guy from scrap armor did with shoulders)
so can you tell me all the file folders i need for it to work?
then i should be good to go?
the game uses the bloodlocation to determine what body parts a clothing item protects
just mod.info and the translation files I guess
cool.
i'm not sure what the name of the one you'd want is but it might be "lowerarms" or something like that
@terse matrix if you think a translation is not good you should submit a pull-request to TIS's github though
yes but you need to create new groups i think, i tried with 'forearms' and got 200 errors lol
its not a translation its just me edited a text file so something is more to my liking
try BloodLocation = LowerArms,
I made it an edit to the opening screen to make it more "Hopful" if anyone wants it here you go
I'm sick of PZ negtivety, so have fun with a more hopful zomboid
but all it says is "THESE ARE THE NEW TIMES" "THERE WAS HOPE OF SURVIVAL" AND "THIS IS HOW YOU SURVIVED"
(Yes you may upload it to the work shop
i will, let u know soon
im finishing a boot mesh here
Coming soon... ish..
group:getOrCreateLocation("myBodyLocation")```
you put it in lua/shared/NPCs/ExtraBodyLocations.lua
BloodLocation? u mean Body right?
woah! thats it?
but where do i set what parts of body (like forearms and such) my new bodylocation covers?
That I don't know, I don't use it by if you find something let me know
trying to delete an object that fell to the ground
that did not change anything, still protecting the hands
mmm each square is a container, so maybe you have to remove it from the container first?
what does your item script look like?
item Wiz_SheraBracer
{
DisplayCategory = Accessory,
Type = Clothing,
DisplayName = She-ra Bracer,
ClothingItem = Wiz_SheraBracer,
BodyLocation = LowerArms,
Icon = Wiz_SheraBracer,
BloodLocation = Hands,
Insulation = 0.05,
WindResistance = 0.1,
ScratchDefense = 100,
BiteDefense = 100,
Weight = 0.4,
FabricType = Leather,
WorldStaticModel = GlovesLong_Ground,
}
i think i will remove that fabric entrance, since its a metal bracer hhee
or people would be able to rip it
aparently the game reads 'LowerArms' on body location as 'hands' too, or im missing something here?
BodyLocation != BloodLocation
BodyLocation is only for clothing location and BloodLocation is the bodypart protection
change BloodLocation = Hands, to BloodLocation = LowerArms,
Anyone knows which mod causes most vehicles to be missing their seats?
ah cool i will try now, bodylocations is for like the cloth order then? like what goes over what?
but i dont have to set a group for the lowerarms like dislaik said?
yeah pretty much
you might still want to make the bodylocation though since i'm not sure what existing clothing slots would work for bracers
If you do this keep the first two lines and make the last one “this is how you survived”
You don’t need the first two
ey all, anyone have any tips for making a character spawn wearing a specific item of clothing? struggling to understand which event to use, among other things lmao
Is anyone able to make a mod to quickly toggle between controller/mousekeyboard? I'm guessing not a lot of people play with controller but i wish there was an option to. I wish to use the "Place item" feature a lot, but it's not very usefull on controller. But i have to turn off my controller which takes like 10+ seconds of holding the PS button, so i can finally switch back to Mouse/keyboard and then place items , then take control with controller again..
The game instantly recognizes when a controller disconnects, so i was hoping someone could figure out how to "force" it instead
yeah just changing the bloodlocation give errors and the model wont show; i have to create a new group, i just dont know how to link it to Forearms part
Caused by: java.lang.RuntimeException: unknown location "LowerArms"
at zombie.characters.WornItems.BodyLocationGroup.getLocationNotNull(BodyLocationGroup.java:29)
at zombie.characters.WornItems.BodyLocationGroup.isExclusive(BodyLocationGroup.java:61)
at zombie.inventory.types.Clothing.DoTooltip(Clothing.java:215)
at zombie.inventory.InventoryItem.DoTooltip(InventoryItem.java:592)
... 46 more
aparently it even mess around the zombie stuff lol
this only happens when i set LowerArms to BloodLocation, when i set to Body nothing changes
thats the bodylocation lol
anyone knows how to use FMOD studio? 😅
I need to understand how the strings bank is created
its set on both look
item Wiz_SheraBracer
{
DisplayCategory = Accessory,
Type = Clothing,
DisplayName = She-ra Bracer,
ClothingItem = Wiz_SheraBracer,
BodyLocation = LowerArms,
Icon = Wiz_SheraBracer,
BloodLocation = LowerArms,
Insulation = 0.1,
WindResistance = 0.5,
ScratchDefense = 100,
BiteDefense = 100,
Weight = 1.0,
WorldStaticModel = GlovesLong_Ground,
}
and dont ask me why but the errors only happens when i set the blood location lol
