#mod_development
1 messages · Page 547 of 1
Yeah Events.OnFillInventoryObjectContextMenu.Add might be your best friend on that one
perhaps in a "beta" mode that allows
Java mods are possible but will never be allowed with workshop mods.
Java mods could be potentially dangerous and that's why mods are made with lua and interpreted by the game java. Also probably something to do with reloading mods.
To have audio streaming, the dev would need to add new functions that allow querying a stream url and encoding and playing it into fmod or something.
ok
What you can do is save those music files and pack them into your mod and play them.
But that will make the mod heavy in weight and it's also not what you were planning to do.
Anyone here super familiar with MediaData / recorded media etc?
Hey what exactly is the Hoot car zone? Color #FF007F, Not sure if its just a British car thing like boot/trunk or bonnet/hood or what. (realized looking at other peoples maps that it means hood :))
trying to track player's listened to media per line and it doesn't seem to be able to access it
Not sure why but I can't seem to access mediaData.mediaLineData's methods
Any javaheads know why?
the classes and methods are public
in your example mediaLineData doesn't seem to be a table try to print type(mediaLineData) and see what you get
oh nvm
Did try that and it comes back as a mediaData@mediaLineData with a bunch of references
i see
The only thing I can guess is the class.class structure is messing up the javalua?
but isnt it suposed to be :getTranslatedText() with the :
I understood doing .function with out () reads if the function exsists
I get the same error eitherway
oh right
I wonder if I could call MediaData.MediaLineData.getTextGuid(self) ?
but rather than self use the line object
Unfortunately the new knownmedialines aren't exposed from IsoGameCharacter
@thin hornet
LOG : General , 1656709730722> Watched - mediaData: (6bf936ee-53d7-47b7-b3a7-c3ea0b88d44b) 18
LOG : General , 1656709730722> ---type(): userdata - string: zombie.radio.media.MediaData$MediaLineData@10c66f8e
LOG : General , 1656709730722> -------------------------------------------------------------
attempted index: getTranslatedText of non-table: zombie.radio.media.MediaData$MediaLineData@10c66f8e
is getLine a commonly named method?
public boolean hasListenedToAll(IsoPlayer var1, MediaData var2) {
if (var1 == null) {
var1 = IsoPlayer.players[0];
}
if (var1 != null && var2 != null) {
for(int var3 = 0; var3 < var2.getLineCount(); ++var3) {
MediaData.MediaLineData var4 = var2.getLine(var3);
if (!var1.isKnownMediaLine(var4.getTextGuid())) {
return false;
}
}
return var2.getLineCount() > 0;
} else {
return false;
}
}
This is how the game does it on java's side
My guess is, again, the java translator
player:isKnownMediaLine(guid) is exposed tho
Yes but I can't get the guid
LOG : General , 1656710320609> Watched - mediaData: (6bf936ee-53d7-47b7-b3a7-c3ea0b88d44b) 18
LOG : General , 1656710320609> -------------------------------------------------------------
attempted index: getVariable of non-table: zombie.radio.media.MediaData$MediaLineData@3b2ff275
hmmmm
it has a reference but is considered null/non-table
ok
working on something funny
russian roulette of professions? 
germany roulette*
there's something silly going on here
If you can throw pies at the zombies im sold
this guy gets it
Do files in media/lua/server/ get run on the client's PC if they aren't the server host?
I'm trying to prototype something where I have a Settings object created in a media/lua/shared/ file. It gets modified by a file in the media/lua/client folder. And then it gets read and used by a file in the media/lua/server. What I want is for anyone to be able to modify their personal object, but only the object on the server's PC actually has any effect on the game. Currently, a non-server client's changes to that object are having an effect on the server and I don't know if it's because I have an error in my code's logic or if my understanding of the client / shared / server folders is flawed and can't be relied upon.
(To be more specific if it's still not clear. I have a mod with a custom weapon. I want clients to be able to modify the weapon stats through in-game settings that my mod has setup. But for MP, I want ONLY the server's modifications to the weapon to have any effect on the weapon within that server. But I'm hosting and friend is joining and they see the weapon stats that they've set, while I see the weapon stats that I've set [when what should be happening is that their settings make no difference because I'm the server host so only my settings should be applied].)
Hey, i can't find how the adrenalinejunkie trait works, have tried to look on all the lua files at no avail, does anyone knows where its effects are located? ty!
its in the Java, IsoPlayer.class line 1600 on my decompiled file
np, heres the steam guide I followed to do so:
https://steamcommunity.com/sharedfiles/filedetails/?l=dutch&id=2748451514
you can also use my updated tutorial here https://github.com/Konijima/PZ-Libraries
Thanks too! i'll have to discard an idea because this overpass my coding knowledge, but i'll try to inform me about how possible would it be to be done!
If someone here has the game prior to 41.71, could you share me the code from client/OptionScreens/MainOptions.lua, function GameOptions:new, around line 128
anyone know if they removed trunks being able to be installed to vehicles? trying to increase the trunk capacity, but the script trunks don't seem to be used atm
Might be a mod but I can weld metal sheets onto trunks to repair it
Also:
Does car weight impact speed?
I was expecting to be a rocket but it was not all that much faster
nope repairing trunks is vanilla, but when i overwrite the script of the trunk items it does not have any effect, so either those trunks are old items or items for the future that are not in-game yet
server does get run on clients
and you should use sandbox options for that
Do you by any chance know what the type should be for a dropdown menu in a sandbox option? For example:
option Susceptible.EveryoneIsSusceptible
{
type = boolean, default = false,
page = Susceptible,
translation = Susceptible_EveryoneIsSusceptible,
}
boolean = tickbox
double = textbox
integer = textbox
I can't find the vanilla files where the sandbox settings are described, and Susceptible (the only mod that I have that uses sandbox settings) doesn't have a dropdown setting.
Fixed it! It was calling options that were removed (gameOptions.get('windowed') etc; to fix just add a new valid option, eg: gameOptions.get('displayMode'))
Hey there, @slow granite ; it seems that the player object lost the isShoving method ? Any new way to replicate previous behaviour ? any page for me to see interface changes through updates ?
Hello hello, i've been looking through the game's recipes and i'm wondering if it's possible to make a recipe that gives multiple results ?
I have a craft in mind that requires to use hair dye, a pot of water and some fabric to dye. I want the result to be an empty pot and a dyed fabric but i can't seem to find a way to make it so there's two result to the craft
is it possible to create an item which increases the run and combat speed?
Hey Yaki, yes it's possible.
#mod_development message
In your case you just want to use the OnCreate function that you link with the recipe and in that function you add the extra items to the inventory
Basically create a media/lua/server/Yaki_Recipecode.lua
Then Add a global function with a unique name like
function MyRecipe_stuff_OnCreate(items, result, player, selectedItem)
player:getInventory():AddItem("Base.MyItem");
end
Oh that's really nice ! I was starting to make it as a cooking recipe, where you had to boil the pot for it to dye the fabric, but it looks reeeeaaally complicated for a beginner like me ahah, i guess i'll try to use the OnCreate function ! Thanks a lot ❤️
You can still easily make it so that the item need to be Warm
Look at how sterilize bandage does it
moreover, how do those run- and combat speed modifiers exactly work? for example, if an item has RunSpeedModifier = 0.87, does this means that that the player has 87% of the default run speed when wearing it? and if i put RunSpeedModifier = 1.0, does this means that there is no decrease in run speed at all?
hum
best way to know is to try it, add super low/high values and check if it has any effect. I would imagine that those speed modifier are stacked
that's a possible way but still a bit difficult to get a clear picture of those things...
@strange sequoia
recipe Disinfect Bandage
{
destroy Bandage,
WaterPot;5,
CanBeDoneFromFloor:true,
Result:AlcoholBandage,
Time:100.0,
Heat:-0.22,
Category:Health,
}
can set Heat:-0.22, to your recipe to require a specific heat level
So if i want to make it so it gives a dyed fabric and an Empty pot, it should look like this right ?
I forgot to change the result
It's supposed to be red fabric
@strange sequoia
in your recipecode.lua
function MyRecipe_stuff_OnCreate(items, result, player, selectedItem)
player:getInventory():AddItem("Base.MyItem");
end
in your recipe script
OnCreate:MyRecipe_stuff_OnCreate
and WaterPot is considered to have water in it.
if you want to specifiy the amount of unit of water do it like
WaterPot;5,
Ok i'm completely lost
Okay so, the recipe take a list of ingredients right.
Stuff like a water pot contains units of water (drainable).
So you could for example, say
Fabric,
HairDyeRed,
WaterPot;5,
for every 5 unit of warm water in the pot
give me a dyed fabric
so it would consume the items and 5 unit only of the water pot
Yep that i understand, but it's the RecipeCode.lua where you lost me i think
in your mod just create a file at
mods/mymod/media/lua/server/yaki_recipecode.lua
then you just make a global function with some unique prefix like
Yaki_Recipes = Yaki_Recipes or {};
function Yaki_Recipes.DyeFabric1(items, result, player, selectedItem)
local inv = player:getInventory();
inv:AddItem("Base.Item");
end
in the recipe script:
OnCreate:Yaki_Recipes.DyeFabric1,
Holy shit i feel so dumb and lost 
Okay explain me what you have done
I drank too much coffee my brain refuses to process that
lol
It's, like, i'm stuck at that "Yaki_Recipes" i don't know what to replace that with
okay so you have your file created in the server directory
RecipeCode ?
yeah
Yep
okay good
now if i understand you wanted to transform a fabric into a dyed fabric right?
Yeah, here's my recipe
I want to to give "Red Fabric" and an empty pot
I want it to use all the water in the pot
Yeah but the pot may be almost empty or full
So
recipe Dye Fabric Red
{
Fabric,
HairDyeRed;1,
WaterPot;5,
Result:RedFabric,
Time:130.0,
Heat:-0.22,
Category:Tailoring,
}
this would consume 1 fabric, 1 unit of the hair dye and 5 unit of water in the pot.
The pot will give an empty pot when empty
its automatic
Damn... It was that easy ? 
Hello. Question to the mod community. Is there a mod that provides players with some form of skill progress retention after death. Either full retention or even partial? That works for a dedicated MP server.
I do know of the mod that allows you to retrain skills back up (as in level up through books, as opposed to the xp applied bonus).
Damn, thanks a lot for the help then, because i was starting to make something def way too complicated for my poor skill in coding ahah
Thank you @thin hornet you may have just prevented one of my friends from quiting the game after playing it for a day. He was getting super frustrated with the erased progression after each death. He likes the game, but the constant forward an backward progress wasn't working for him.
Check the sandbox options in your server, you can customize the setting for the journal. Lots of options.
While I get it (especially in the early learning curve) I can see his view point on it not having any fun to it. I like the tactical sneaking survival. Thanks for the info again
Yeah when you focus too much on skill its suck to lose em. But after a few months playing you understand that death is inevitable.
yes.. I mean.. it's literally the words you read/listen to at the beginning of the game, death is inevitable (a lot)
the foreshadowing is real 😄
In my journey i'm at the point where I like the skill progression to be ultra slow, otherwise you max it too quick.
Also not everyone should be pro at everything, thats the point of having a medic, a mechanic etc that focus on its profession.
Agreed. Unfortunately he's the type of survival crafting player that wants to "do it all" 7days type 😆
To each its gameplay preference hehe, when easy gets boring he'll ask for harder. Slowly understanding the game better and accepting more challenges.
Yeah, that's sort of where the group of us started. One set up the dedicated private server.. an we slightly lowered some settings (0.8 zombie pop to reduce early numbers / slower shamblers/medium rear bites).. an bumped up a few multi-hit swings (10-20% more traits adjustments) just to give us a better chance to learn without just being brutalized over an over. At least until the basic move/combat forage/survival etcetera
I have a custom item dropping from zombies. To pick the loot rarity, I have in lua\server\Items\MyItem_Distributions.lua:
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "MyItemName");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 4);
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "MyItemName");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 4);
This works appropriately (if I set the number really high, it drops a ton, if I set it really low, it hardly ever drops).
I want to be able to make the drop rate a sandbox option so I wrote this function:
function ModifyDropRate(item_name, new_drop_rate)
local found = false
for k,v in pairs(SuburbsDistributions["all"]["inventorymale"].items) do
if found then
SuburbsDistributions["all"]["inventorymale"].items[k] = new_drop_rate
break
end
if v == item_name then
found = true
end
end
if not found then
table.insert(SuburbsDistributions["all"]["inventorymale"].items, item_name);
table.insert(SuburbsDistributions["all"]["inventorymale"].items, new_drop_rate);
end
found = false
for k,v in pairs(SuburbsDistributions["all"]["inventoryfemale"].items) do
if found then
SuburbsDistributions["all"]["inventoryfemale"].items[k] = new_drop_rate
break
end
if v == item_name then
found = true
end
end
if not found then
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, item_name);
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, new_drop_rate);
end
end
I have tried adding this function to so many different Events including:
Events.OnInitWorld.Add(ApplyDropRates)
Events.OnGameStart.Add(ApplyDropRates)
Events.OnKeyPressed.Add(ApplyDropRates)
Print statements are showing the values being changed when I refer back to them later however, the drop rates aren't changing at all. If I modify one item's drop rates manually in the lua\server\Items\MyItem_Distributions.lua, it drops all the time, but if I modify another item's drop rate with that function on any of those events, it hardly ever drops.
Is there something I need to know about changing drop rates once PZ is already open?
I don't think settings usually edit the loot table, you set a value then the sandbox setting for loot abundancy will take care to adjust it.
I think you might try to make it too much "customizable"
you can have like 3 mods 3 flavoir, like rare, normal, abundant, at least thats what im used to see.
I do agree it would be nice to have settings to make mods more customizable, loot table wise etc but the way it work i thinks it just make it more complicated
distribution must probably match on clients and server. Sandbox settings and any other custom mod settings can be adjusted while the game is running so that wouldnt really change stuff like a distribution table
Yeah you might be right.
Is it possible to print to console and read it from the main menu somehow? Even reading it from the debug menu would be fine. All I know about is the console box that shows up in a world, but sometimes I want to print from main menu.
I once found this in az. u can try to use it somehow idk
Events.OnPreDistributionMerge.Add(...)
@wooden falcon
another mod request: the ability to add room lights, like how existing buildings are with a light switch
A barotrauma style electrical engineering skill that could employ electrical wiring along with using/crafting fuses+switches to setup for various triggers an the like would be amazing!
yeah like the vanilla game where there is a light switch
and to create working cpu in pz 
Oh the possibilities that something of that nature could layer into PZ
I'm already had same idea with farming pipes for configurable auto-water plants and it's fine but with electricity I think will problem to setup wires (and create system for it) cos pz is 2.5d game and it will really pain in da ass 
conduits an housing boxes
craft insulated/protected conduits
an place
but yes I could see it being tricky
thats why I put the suggestion here, same with the electric register radiator heater, both systems already exist in the base game but in different forms
the light switches exist and the heater in vehicles exist
AND timers exist on microwaves and oven/stoves
minecraft...
officially add in immersive solar array mod into the main game

Kentucky is rainy enough to rely on nature to water crops
fr
- when rain ends and after it I want to plant seeds there's no chance to start rain x)
just a dance with tambourine
for me wires system is awesome cos then I can move generator out of my house for 999km
I recently rip my save by big boom from gen 
I was able to get it working by having it be a main menu setting instead of sandbox. When the user saves their settings, it gets saved to a file. And then at the top of lua\server\Items\MyItem_Distributions.lua, I load from the file and use those loaded values for the initial distribution inserts.
Tested it where 2 of us used different settings, but the server host's settings were the only ones applied to the server.
neat
guys can someone explain it to me what's the meaning of this "KnockBackOnNoDeath"
I'm not sure but I think it means if player do attack zombie and this one didn't die then knock back him
@thin hornet Hey, i'm sorry i have a problem with the recipes again ;_; It works nice but it applies the heat requirement to the hair dye too, so i have to put it in the oven too to complete the craft.
How can i make it so the dye doesn't need to be heated ?
this not on melee but in the firearms code
mhm
I think firearm like sniper rifle should knock back target
nevermind i now know what this means

will probably need a OnTest function
the recipe would look like
recipe Dyed Fabric Red
{
destroy Fabric,
WaterPot;5,
Result:RedFabric,
Time:100.0,
Heat:-0.22,
Category:Trailoring,
OnTest:Yaki_Recipes_OnTest_DyeRedFabric,
}
hum...
actually i dont know
I haven't seen that kind of things in the game's code so i'm not sure it's possible 😮
Yeah ! I had that idea too
first mix dye into a cooking pot, then heat and dye fabric
I'd have to make it work like a regular water pot just not drinkable
Definitely yeah, i'll try that
Yeah it has to be a fake water pot item
basically a simple drainable item with the appearance of a cooking pot with red water
Yep, i took the lines of the Bucket full of water in the game's code
item WaterPotRedDye
{
DisplayName = Cooking Pot with Red Dye,
DisplayCategory = Water,
Type = Drainable,
Weight = 3,
Icon = Pot_Water_Red_Dye,
ReplaceOnDeplete = Pot,
UseDelta = 0.04,
UseWhileEquipped = FALSE,
StaticModel = CookingPotRedDye,
WorldStaticModel = CookingPotRedDye_Ground,
}
something like that
Ok nice ! Thanks a lot, again 🥺
No problem so after this you would have 2 recipes.
The one to mix red dye in a cooking pot and the one to dye fabric with a red dye cooking pot.
Will need a lua code to keep the drainable quantity when converting a water pot to a red dye water pot
But just hit me up ill try and write it with you
Yep, this is going to be a lot of copy and paste + replace with the color name to have them all
oof right
What's the name of the required LUA file ? I can try to look it up to see if i understand what i need to do
I like to make things complicated 👀
Yeah same, and frustrated too x)))
Or i can just remove the heat requirement and bam
oh
You know what, i think i'll do that xddd
good idea
That'll save me a lot of troubles
i didnt even think about this
I'll try again once i get better with coding, but for now this'll do
im trying to code birthday
but im getting tired and all these dates stuff getting me confused
Oh wow yeah, that sounds like a lot of work just thinking about it 😮
what would be the use of a birthdate and age system?
Aging
Im making a real life roleplay server
ill start with legal jobs system lol
lool
and then, corporate sabotage
followed by public exposure
in that order
your character led an interesting life
well now i know who to keep on the watch list 👀 xd
||KahliAvali||
Your phone will be tapped if you ever logon my server
darkrp on bangclaw 
Hello, does anyone here do mod commissions?
on ur server will be system like "Person description"? or it'll lite-rp
Mixed, if people want hard rp they can, others can lite rp too. In the end im going to try to code things in a way that you can play alone like an hermit.
I think u have to do option to auto-fill person description cos if there's no desc for some players then serious rp players will cry
computer based shop, with variable economy
Well in real life you dont have your life description written on your forehead
Roleplay should be about what you say and do
in real life u can customize ur char as u want but pz isn't
but maybe it's fine
never played rp exactly in pz
Well everything will be character name based, any username will be hidden.
And ill make interaction between player like showing ID card to someone.
Im also planning on making the game start on Kingsmouth island and eventually if too many players opens up more of the map.
sounds cool
How do I give the player multiple of the same item
like in a recipe?
:AddItems("item", 5)

I've never gotten answers so quick, so that surprised me lol
Where would I find the server settings for a solo local save game? For some reason it's not letting me pick a safe house in the building I've started stockpiling at. Found it, not sure what listed parameter controls safehouse claims (if there is in the server setting file)
where can I find the debug log?
Anyone know how to link the switched on overlays to stoves (ie light interior)?
Is there a way to check if I'm within like 2 tiles of a corpse on the ground
function getAllCorpseOnGround(squareToCheck, distance)
local result = {}
for x=squareToCheck:getX()-distance,squareToCheck:getX()+distance do
for y=squareToCheck:getY()-distance,squareToCheck:getY()+distance do
local square = getCell():getGridSquare(x,y,squareToCheck:getZ())
local objects = square and square:getWorldObjects() or nil
if objects ~= nil then
for i = 1, objects:size() do
local obj = objects:get(i-1)
local item = obj:getItem()
if item:getType() == "CorpseMale" or item:getType() == "CorpseFemale" then
table.insert(result, item)
end
end
end
end
end
return result
end
local lastSquare
local function checkIfCorpseInRange(player)
local square = player:getSquare()
if square ~= lastSquare then
local corpses = getAllCorpseOnGround(square, 2);
if #corpses > 0 then
-- i found corpses
end
lastSquare = square
end
end
Events.OnPlayerMove.Add(checkIfCorpseInRange);
@tranquil reef
something like this
Thank you
hey guys! is there an guide for making animations in blender for zomboid? i coudnt find one 🙂
Really easy lol
Well the hardest (or time consuming) part would be the 3D modeling of the items
anyone got a mod that helps removing these?
right click youll have a submenu with a list of object on the square to remove
in single player you need to have debug enabled
i do have debug enabled
mhm
i can show you ? xD
nah im going to update it in a moment
i made the mistake of just checking for admin
testing real quick and ill update it
@dawn sparrow updated!
i love god too and im glad it saved the game for you
apparently the game does not like this
WaterBottleFull=1/MayonnaiseWaterFull=1/RemouladeWaterFull=1/WaterPopBottle=1/GardeningSprayFull=1/WaterBleachBottle=1/WhiskeyWaterFull=1/WaterPot=1/WaterSaucepan=1/FullKettle=1/BucketWaterFull=1/WateredCanFull=1/WaterMug=1/WaterMugRed=1/WaterMugWhite=1/WaterMugSpiffo=1/WaterBowl=1,
is there a way to be able to use a little bit of one type of water container in a recipe
WaterBattleFull=1, by itself removes a bit of water from it, but doing the slashes gives a ton of errors
still not sure about doing more than one bit of water but apparently just having it do WaterBottleFull/WaterPot/etc. still works the way I need it to
dont use a =
use a ;
WaterBottleFull;1/MayonnaiseWaterFull;1/RemouladeWaterFull;1/WaterPopBottle;1/GardeningSprayFull;1/WaterBleachBottle;1/WhiskeyWaterFull;1/WaterPot;1/WaterSaucepan;1/FullKettle;1/BucketWaterFull;1/WateredCanFull;1/WaterMug;1/WaterMugRed;1/WaterMugWhite;1/WaterMugSpiffo;1/WaterBowl;1,```
you can also make it cleaner by making a GetItemTypes in lua
That's kind of weird, but if it works it works lol, thank you
Since this is pretty small and I'm never gonna have to touch that recipe again that's not really needed, but I might use that in the future
MonkeyShark_Recipes = MonkeyShark_Recipes or {};
function MonkeyShark_Recipes.GetItemTypes_WaterContainers(scriptItems)
-- scriptItems:addAll(getScriptManager():getItemsTag("FishMeat"))
end
yeah cool
Thanks again 
youll have to edit the recipe if TIS release new water containers
Probably won't be too bad but I've also worked on this from like 3 AM to 9 AM so I can set it up with something like that tomorrow
for now I can sit back and enjoy the fact that I've wasted 6 hours of my life on a mod for plucking and cleaning corpse teeth
does anyone know how to read error logs??? server im on has so many errors but nobody knows how to fix them
is there a good gettign started resource to use?
need help how to disable the knockback when you get fired by a firearm?
ive been thinking about a mod, similar to the Save Our Station, but instead of the radio, its power and water. i wish i knew lua
the beta for 41.68 is still available, so you can go onto the beta to check it
bikini is working on that
no idea if it will be publicly released tho
I am a GOG user
guys how to disable the knockback when you get fired by a firearm.
hi some friends and I are trying to search mods to add realistic animations. I find the "True Actions. Act 2" and "AuthenticAnimations" but neither work in multi
Hello my lovely modders, I'm here with yet another question.
What would be the OnEat-Function to make an item on consumption lose you weight?
For example a mixture of herbs that makes you lose 1kg instantly. Is that even possible?
Please tag me here or DM me as I usually miss a lot of messages on this Discord. Thanks in advance.
possible to hook onto item spawning? i.e when item is spawned, change one property of that particular spawn
Hey people, if i want to add a function to ISHealthPanel.lua, is it necessary to overwrite the entire file, or just adding the local-function would work? same for editing functions inside
(or any contextual interface file, like adding new types of tailoring patches and etc, for easing compatibility and etc)
(checked the wiki and in theory its possible to just add my part/overwrite with load order what needs to be overwritten, but wanted to be sure so if anyone has info @ me without remorse xD)
I'm not sure if you can overwrite a local function, but you can certainly overwrite non-local functions. If it's from a vanilla file, it doesn't matter what you name your file (mod files are always loaded after vanilla ones). If it's another mod you are overwriting, you need to name yours (your actual file's name, not the mod's name) lower alphabetically.
If you want to still keep the original functionality of the function, but just inject some of your own code, the pattern you want is something like
myObj = myObj or {}
myObj.originalFunction = myObj.originalFunction or VanillaModule.originalFunction
function VanillaModule:originalFunction()
-- your code to run before original
-- call the vanilla function
local originalResult = myObj.originalFunction(self)
-- your code to run after original
-- make sure you keep the vanilla return value unless you know you want to return something else
return originalResult
end
If you want to overwrite it without keeping the original functionality, you don't need to bother saving the original function and you don't need to make that call in the middle.
Is it possible to have print statements show up somewhere in the main menu? If I'm debugging something while I'm in a world, it's easy enough to see what's printed in that little console box. But if I'm debugging something in the main menu, I have no idea how to see any prints? Would I have to write to a file and then read from the file or something? Or is there an easier way?
Thanks! Will do a trial and error with this for checking
Is there anyone who takes requests or does mods im trying to get some characters in a rp discord server
Everything gets printed to the console logs. In your user/Zomboid folder
Console.txt for SP, Coop-Console and Server Console for MP
Is the RV interior broken in MP?
I have a new save and have the mp version enabled but I keep getting black screened
I think you have to change one of the anticheat values in the ini file as per the workshop pages direction
I was able to add it to my server without having to make a new save, but it depends I would think
np!
Weapons in the /media/scripts/items_weapons.txt file have the following attributes:
MinimumSwingTime
SwingTime
BaseSpeed
Anybody know how these differ?
Also, it seems like if I have a weapon with SwingAnim = Stab, it never knocks enemies down. Anyone know if there's a way to keep that animation, but still have it possible to get knocks? I tried setting the KnockdownMod to higher numbers, but that doesn't seem to make any difference. The swing animation suits my custom weapon much better than any of the other animations, but the no knock is not ideal.
got another mod request
the ability to have a shop light, like the ones you see in garages that hold two long skinny bulbs, they function just light lamps and mountable lamps where you click on them to operate them
also adds a new item, incandescent light tube
player:setAttachedItem(weap:getAttachedSlotType(), weap)
player:setAttachedItem(weap:getAttachedToModel(), weap)
player:setAttachedItem(weap:getAttachmentType(), weap)
None of these are working. Anybody know how to attach a weapon (e.g. to the back)?
hi! i want to store some additional data associated to the player which may change during game. is it safe to store those data in global variables if i define and put them into the client folder? definitely works for single player but i don't know how this behaves in multiplayer. (since i am not a multiplayer, i cannot play-test it.)
i think this is fine if im understanding your question properly. just make sure the global variable is named in a unique way.
Ok, thanks! I just name them like "MyModNameMyVariable". So there shouldn't be conflicts with globals from the vanilla game or other mods.
where I can store global moddata? getWorld have no getModData function so I have no idea (no I don't need moddata linked to character)
I tried to find something in pz or mods but there's 2233 matches 
I checked some of it but found nothing
finally found it if anyone will need this one:
GameTime.getInstance():getModData()
is there way to find out whether the time is fast forwarded?
maybe something like "TimeFastForward(3)=true" means time is speed up 3 times?
ModData.getOrCreate(String key)
this is the actual global modData
uh, thanks 
iirc
getGameTime():getTrueMultiplier()
theres pretty much never a reason to use a global variable ever
there isnt
@drifting stump in case you introduce new types of data for the player, where would you store them when you need to access them in different .lua files? moreover, note that specifically in lua, every function can also be seen as as a variable. so every mod which uses global functions uses global variables im this sense...
btw it will moddata that same for all worlds?
would recommend reading about lua specfically modules
and function are variables just declare them local
its per world
thanks again
@small topaz
if i just randomly browse the mods i've subscribed to from other modders, i don't see a single one which does not introduce new global functions... but anyway... maybe i misunderstand sth
and? theyre just not well coded
local functions/variables do improve performance
I don't have words about pz modders cos I'm still even didn't saw anyone who even use tables without table.insert and after do deep search in loop
or maybe I just don't check good mods yet xp
wow. really didn't knew this. and what about tis themselves? the vanilla code is full of globals...
its more about code design and pattens but most of this stuff is ignored in a world where everyone has massive ram and hard drives. Back in the 80s you needed to recover as much memory as possible to make advanced anything. Now its more of a bug creation/hack thing
who said to u what pz code is good? XD
if vanilla has globals it would explain why it uses gigs when it just opens
but in open world generation it would be hard to control the amount of globals
barely seen anyone who codes well but tbf its because most people dont have a software engineering background
the vanilla code is not great
its basic code design. If you only need it for a few make it local as possible. If you need it later 1 time then make something return it via a function or property its not even difficult
its easier to understand once you write something with a global and you got 50 things all manipulating that global without ur knowledge and your trying to trouble shoot it
ill be honest if i was modding i prolly wouldnt care
to open craft menu with a few mods once without some mod with fix one and already want to die
i have planned a rewrite of the crafting menu and server browser
ill get to it when i have time
with mark "Serach everywhere"*
I want to do same thing but may have problems with compatibility
but if don't change variables name then it's almost fine
but my code style won't let me do this
so I drop this idea xp
my mental health is more important
i just want to make a chop n flip hydroponics mod
and im too lazy
is there a way to test your mod your building when you have 40 mods installed for some mp server? can i just single player with just a test mod installed or something?
i havent tried modding since like
2015
just create preset via mod manager
can you get a building name without cycling through roomDef?
any way to catch moment when placing build object switch from one square to another one?
without caching prev pos and check it with current
where can i find the placement info for a rain collector? i cant seem to find any info on that one
try to find smth with "barrel"
tried
i cant figure out the file
ill find it
just weird how that one seems to be hidden and i can find everything else under the sun
Are there any tutorials on adding new a GUI to the game (or is it even possible?)
I want to make something similar to the radio UI
I started doing that, gotta figure out what everything does now
hi guys. how are you doing? i tried finding a tutorial, but couldn't find something that helped me.
how do I create a fix recipe for use in vehicle mechanic ui?
in lua/server/vehicules/VehiculeCommands.lua here what I found :
function Commands.fixPart(player, args)
local vehicle = getVehicleById(args.vehicle)
if vehicle then
local part = vehicle:getPartById(args.part)
if not part then
noise('no such part '..tostring(args.part))
return
end
local item = part:getInventoryItem()
if item then
part:setCondition(args.condition)
item:setCondition(args.condition)
item:setHaveBeenRepaired(args.haveBeenRepaired)
part:doInventoryItemStats(item, part:getMechanicSkillInstaller())
if part:isContainer() and not part:getItemContainer() then
-- Changing condition might change capacity.
-- This limits content amount to max capacity.
part:setContainerContentAmount(part:getContainerContentAmount())
end
vehicle:updatePartStats()
vehicle:updateBulletStats()
vehicle:transmitPartCondition(part)
vehicle:transmitPartItem(part)
vehicle:transmitPartModData(part)
else
noise('part item is missing'..args.part)
end
else
noise('no such vehicle id='..tostring(args.vehicle))
end
end
function Commands.repairEngine(player, args)
local vehicle = getVehicleById(args.vehicle)
if vehicle then
local part = vehicle:getPartById("Engine")
if not part then
noise('no such part Engine')
return
end
local condPerPart = 1 + (args.skillLevel / 2)
if condPerPart > 5 then condPerPart = 5 end
local done = 0
for i=1,args.numberOfParts do
part:setCondition(part:getCondition() + condPerPart)
done = done + 1
if part:getCondition() >= 100 then
part:setCondition(100)
break
end
end
if done > 0 then
if args.giveXP then
player:sendObjectChange('addXp', { perk = Perks.Mechanics:index(), xp = done, noMultiplier = false })
end
player:sendObjectChange('removeItemType', { type = 'Base.EngineParts', count = done })
vehicle:transmitPartCondition(part)
end
player:sendObjectChange('mechanicActionDone', { success = (done > 0), vehicleId = vehicle:getId(), partId = part:getId(), itemId = -1, installing = true })
else
noise('no such vehicle id='..tostring(args.vehicle))
end
end
function Commands.takeEngineParts(player, args)
local vehicle = getVehicleById(args.vehicle)
if vehicle then
local part = vehicle:getPartById("Engine")
if not part then
noise('no such part Engine')
return
end
local cond = part:getCondition()
local condForPart = math.max(20 - args.skillLevel, 5)
condForPart = ZombRand(condForPart / 3, condForPart)
local numParts = math.floor(cond / condForPart)
if numParts > 0 then
player:sendObjectChange('addItemOfType', { type = 'Base.EngineParts', count = numParts })
end
part:setCondition(0)
vehicle:transmitPartCondition(part)
player:sendObjectChange('mechanicActionDone', { success = (numParts > 0), vehicleId = vehicle:getId(), partId = part:getId(), itemId = -1, installing = true })
else
noise('no such vehicle id='..tostring(args.vehicle))
end
end
so a really dumb question i guess. on Steam workshop mods for like mp and such where are the mods located for me to just rip them open and look at code
it really seems thats going to be easier then asking random questions
oh wow
Steam>steamapps>workshop>content>108600>IDOFTHEMODS>
thanks
thanks @violet shell
i think its elsewhere tbh
no ur right
jesus
the folder naming is throwing me off
i keep going into project zomboid
the name of the folders are just the workshop IDs
yeh
not so hard 🙂
SteamLibrary\steamapps\common\ProjectZomboid\Workshop
i keep going in there
looking
its there a mod for view behind ur character even if u don t look?
i would like one
Hi everyone. Follow up question on my question before regarding the permanent night mod. Turbo ultimately ended up helping me figure that out, and over the past few days I've managed to make a couple of other tweaks so that the lighting remains consistent both through the game's natural weather system as well as weather altering mods like Eternal Snow, Infinite Weather, etc.. However, one problem I seem to be running into involves the AMBIENT value of climate. The basis of the mod remaining almost entirely pitch black depends heavily on AMBIENT, however, whenever weather kicks in, the AMBIENT value seems to be overwritten by some sort of settings exclusive to those particular weather events. I can't seem to find anywhere in the files that would plainly define the lighting settings behind things like storms, tropical storms, and blizzards. Does anyone have any idea where they might be?
there is a ClimateManager.java file, and I can't find any equivalent in the lua files, so it looks like that is all on the java side
are you referring to the ClimateManager.class?
because in the .class file i did find the value names for AMBIENT, VIEW_DISTANCE, etc. but can't figure out a way to potentially change any values since i'm not sure what program to run the file in
its the same i think? im not so used to java but from my understanding .class is just the compiled file, whereas .java is source. im looking an the decompiled code.
maybe you can try using the methods for the climate manager to get it to do what you want. https://zomboid-javadoc.com/41.65/zombie/iso/weather/ClimateManager.html
Javadoc Project Zomboid Modding API declaration: package: zombie.iso.weather, class: ClimateManager
i guess my dilemma is i already have code that overwrites the base game's AMBIENT, so when you run the mod and there is no weather going on, the AMBIENT value in the code works
the issue then becomes when weather starts up, something overrides the AMBIENT value in the mod's code
How do you rotate in the vehicle editor, anybody know?
I think I figured it out, i put it in my code that the ambient value should be set as an AdminValue instead of ModdedValue and it seems to have forced the actual game to check the AMBIENT value and set it permanently to 0
did anyone face issue when trying to query the player modData from the server?
i tried to player:transmitModData() to kind of force it to send it to the server but not getting the modData from the server side
but since IsoPlayer is also an IsoObject i would have guess that it worked. Maybe im just missing something here
well after many test it seem player mod data is not transmitted at all and even when trying to force it. I wonder why.
also that would mean that if i delete my local save and join a server again, it would reset my moddata since its seem to be local only
yeah thats what it seems when reading the source
but again that mean player modData is unreliable
saving thing in player mod data would be lost if we deleted the save file and loaded back in the server
the kind of things youd store on player modData make sense in global modData as an alternative
i supose ill start using global moddata instead yeah
ill check how it work with the server
you can look at some of my mods if you need an example i use that to store server side player data
neat do you have a url real quick ?
are you saving the listing in a file cause the moddata are not saved in the world on the server?
or is it just a config file
its a config yeah you can ingore that for what you want
cool 😄
what matters is basically just ModData.getOrCreate("serverPointsData")
and the commands to query from a client
dont u ever transmit mod data?
why would i
you send the info from a command but couldnt mod data be sync between server and all clients?
the clients dont need the whole data in that case
depend of the situation
like in a banking system do you need to receive the info from everyones bank account?
if you want to check everyone score with a leaderboard for example you would already have all the data on each client to check it right?
yeah banking info i do understand
so basically i could create different modData and some be public info and other server only
yeah in that case it makes sense to have everyone have the data and use the server to sync it
for example Bio
instead of requesting a bio everytime you want to check everyone could have the bio of anyone
kind of
json isnt needed anymore since they fixed global modData saving on the server
yeah any modData is supposed to save with the game
thats dope ill play around with the transmit and see how that work
wouldnt want to overwrite stuff cause of unsync data
reason i dont use transmit is simply because transmit sends the whole table and thats unnecessary for these uses
yeah i could see why
might have to optimize the structure of table
to separate and store smaller stuff in tables
or use a query system like i do
yeah
making a new global modData entry for each player wouldnt make sense so only way of sending smaller and only necessary data is with those queries
Do we have a list of events that explains if the event is ran on both server or just client?
Hi, I'm looking to make a mod and am trying to learn how electricity works in game. I'm trying to find the code for the car battery charger and how it works, but am very lost.
@thin hornet Hey hey, it's me again. Hope i'm not bothering you with my questions, but, if i wanted to make multiple crafts for one object that has multiple textures and each craft gives a different texture. How should i do that ?
Like a single item with different color ?
I think the only limitation about this is the 3D model of the object cannot be changed but the icon can.
Basically, now that i have different fabric colors, i want people to be able to craft these dresses, which all use the same model but with different texture. They also share the same XML
Clothing items are the only items that can have different color easily
okay so what you want is to set the clothing item color to a specific color based on the recipe right?
Yep, i want the recipes to be like "Make red dress with red fabric", "Green dress with green fabric" and so on
Because right now i have a single craft for those dresses and it gives a random texture each time
yeah just a moment i used to have a code for that made for someone else but ill find a refence again
Yep no problem ^^
@strange sequoia so you have set multiple texture choice in the xml if i remember right?
Yes, the XML looks like that
alright
do you have the recipecode.lua that we talked about the other day or did you remove that?
No i removed it since i didn't use it
okay we will probably need it this time to change the result item
wait a moment ill write it for you
😛
Oh, ok 😄 i was trying to find another recipecode.lua file in other mods folder, to see if i could start with an example
Place this into your mod lua/server/ directory
now on the recipe script you want to plug those function like so:
OnCreate:Yaki_Recipes.OnCreate.DyeClothingRed,
Thanks a lot, you're so nice 🥺
No problem 😄
let me know if it worked
I think you could have done the clothing with tint too, so you would be able to actually set the color with RGB
Ok, so on this recipe for example, i have to write it like that ? :
{
FabricRollRed=2,
Thread=2,
keep Needle,
Result : Dress_LacedRed,
OnCreate:Yaki_Recipes.OnCreate.DyeClothingRed,
Sound : ClothesRipping,
Time : 50.0,
Category : Tailoring,
AnimNode : RipSheets,
}```
yess
Yeah i was thinking about doing that but last time i tried it with hair colors, i was lost because the game didn't seem to use the normal rbg codes i know
usually from what i remember they use from 0.0 to 1.0
Yeah i can't remember but i gave up after a while xd
Thank youuuu ❤️ ❤️ I was scared it would be too much of a niche mod, since it was made for RP purposes xd
I'll see if the file you gave me word, thanks a lot again ❤️
yes let me know!
Btw, how does the game know which model and texture to give from your code ? So i can recreate it for other recipes
function Yaki_Recipes.OnCreate.DyeClothingGreen(items, result, player)
if result:getClothingItem():hasModel() then
result:getVisual():setTextureChoice(1);
end
end
result variable will be the result item of the recipe you plugged the function to
setTextureChoice(1) the number here will be the texturechoice you set in the xml starting from 0 for the first one
if im not mistaking of course
Oohhh right, ok i see. I doesn't directly pull the texture it just tells the recipe to use the first, second or third texture choice
yeah it all depend of the result item set in the recipe script itself
plug that on a recipe for a cooking item it would probably create an error
No wait nevermind, i got it wrong
I can just use the 3 different oncreate for any recipes
well if all your object have the same color choices, in the same order in the xml, then that function would work for any of your clothing item
and technically we could make it a single function if you want to add a new field to the recipe, we would just fetch that value in the item modData
oh no nevermind
Ah damn, you lost me again
i just confused myself lol
Ahahahah
No problem :p Thanks again, you're really helpful, i'll make sure to credit you in my mods page for your help 😄
cool cant wait to see the mod 😄
Ooh wait, i read "mod" and not mods, the mod you're helping me with is already out rn 😄 https://steamcommunity.com/sharedfiles/filedetails/?id=2827080218
ohh
It's for the different dresses on the medieval set 🙂
neat man, makeshift clothes Dye able!
I wanted to make them dye able in all the colors available with the hair dye, but oh boy would it take forever to make
So right now i'll stay with Red Blue Green xd
I think if you did it with Tint it would be doable
you would just need the base texture to be white
Would it be easier to make ? 😮
well it would be less textures to make
if you look at how a tint able vanilla clothing item is made
you could do similar
then code wise, we would just use setTint instead of textureChoice
In the XML ?
with a rgb color
<?xml version="1.0" encoding="utf-8"?>
<clothingItem>
<m_MaleModel></m_MaleModel>
<m_FemaleModel></m_FemaleModel>
<m_GUID>093e8f6f-7cd9-4e9e-9cfb-c4d9f0e02ff4</m_GUID>
<m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>true</m_AllowRandomTint>
<m_AttachBone></m_AttachBone>
<m_BaseTextures>clothes\shorts_textures\bikini_white</m_BaseTextures>
</clothingItem>
example this bikini use <m_AllowRandomTint>true</m_AllowRandomTint>
and the base texture is a white version
then
-- Written this way so that you can re-use in different mods of yours
Yaki_Recipes = Yaki_Recipes or {}
Yaki_Recipes.OnCreate = Yaki_Recipes.OnCreate or {}
-- DyeClothingBlue
function Yaki_Recipes.OnCreate.DyeClothingBlue(items, result, player)
if result:getClothingItem():hasModel() then
local color = Color.new(0, 0, 1, 1);
self.item:setColor(color);
self.item:getVisual():setTint(ImmutableColor.new(color));
end
end
-- DyeClothingGreen
function Yaki_Recipes.OnCreate.DyeClothingGreen(items, result, player)
if result:getClothingItem():hasModel() then
local color = Color.new(0, 1, 0, 1);
self.item:setColor(color);
self.item:getVisual():setTint(ImmutableColor.new(color));
end
end
-- DyeClothingRed
function Yaki_Recipes.OnCreate.DyeClothingRed(items, result, player)
if result:getClothingItem():hasModel() then
local color = Color.new(1, 0, 0, 1);
self.item:setColor(color);
self.item:getVisual():setTint(ImmutableColor.new(color));
end
end
it set the color of the item for the inventory icon then it set the model color tint
So still need to create a function and recipe for all color you need but at least you can fine tune the color with rgb
Oooh, man i should have done that from the start 😮 It looks so much easier
actually
it could probably be done with a single recipe if you allows all Dye object as an ingrediant
in that function we can get which dye was used
actually that would be the correct way of doing it
show me the script for the FabricRollRed item
If I made the recipe from a single item, right? Because right now it uses two items, If you don’t count the fabric, water and dye
well the recipe itself could be a single recipe if you allow multiple fabric and clothing item
then in the lua function we will check what fabric was used and change the color
That sound complicated o_o
if you can just copy/paste the script for a single colored fabric
your item xml would look like this
<?xml version="1.0" encoding="utf-8"?>
<clothingItem>
<m_MaleModel>media\models_X\skinned\Clothes\M_Dress_LacedRedV2.fbx</m_MaleModel>
<m_FemaleModel>media\models_X\skinned\Clothes\F_Dress_LacedRedV2.fbx</m_FemaleModel>
<m_GUID>af20cac1-583e-43da-8678-5caf85ecc68d</m_GUID>
<m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>true</m_AllowRandomTint>
<m_AttachBone></m_AttachBone>
<m_Masks>3</m_Masks>
<m_Masks>5</m_Masks>
<m_Masks>13</m_Masks>
<m_Masks>14</m_Masks>
<m_Masks>15</m_Masks>
<m_Masks>9</m_Masks>
<m_Masks>7</m_Masks>
<m_BaseTextures>clothes\dress\Dress_LacedWhite</m_BaseTextures>
</clothingItem>
you would create a white version of the texture Dress_LacedWhite
then in each fabric we will set the RGB color that we want (very simple)
ok ok, I think I already have a white texture in my files somewhere
But how is the RGB color set for the fabric though ?
lets go in step by step
so the lua code would be something like this
-- Written this way so that you can re-use in different mods of yours
Yaki_Recipes = Yaki_Recipes or {}
Yaki_Recipes.GetItemTypes = Yaki_Recipes.GetItemTypes or {}
Yaki_Recipes.OnCreate = Yaki_Recipes.OnCreate or {}
-- All YakiDyeFabric
function Yaki_Recipes.GetItemTypes.YakiDyeFabric(scriptItems)
scriptItems:addAll(getScriptManager():getItemsTag("YakiDyeFabric"));
end
-- All YakiDyeableClothing
function Yaki_Recipes.GetItemTypes.YakiDyeableClothing(scriptItems)
scriptItems:addAll(getScriptManager():getItemsTag("YakiDyeableClothing"));
end
-- DyeClothing
function Yaki_Recipes.OnCreate.DyeClothing(items, result, player)
local found, r,g,b
for i = 0, items:size() -1 do
local item = items:get(i);
if item:hasTag("YakiDyeFabric") then
local itemModData = item:getModData();
r,g,b = itemModData.r, itemModData.g, itemModData.b;
found = true;
break;
end
end
if found and result:getClothingItem():hasModel() then
local color = Color.new(r, g, b, 1);
self.item:setColor(color);
self.item:getVisual():setTint(ImmutableColor.new(color));
end
end
Oh but wait
there's a problem though
The dress uses two different colors
Blue and white
oh
well yeah that might be a problem then
this would tint the blue part a different color
only the white part would be the correct color
Yeah, and i'm not sure there is a way to mask colors 😮
i dont think i remember any tintable clothing item to be made of two color
if so one of the color will be changed
Arff, then yeah i think i'll need to use the first technique you sent me, because most of my clothes use twi different colors
There's only one that uses tint
yeah we can still improve the code if you want tho
Sure, how so ?
we can assign the textureChoice index to the dye fabric item script
then recover that value in the function
so it makes 1 function for all
Ok i see yeah
you just need to make all texture choice the same order
we can probably make it a single recipe too
for all the clothing recipe
Ok, but what about clothes that don't share the same order ? For example there's a tunic that has Grey, Brown and Blue colors instead of RGB should i change it ?
oh so not all dyable clothing has the same colors?
first stage for my water pipes system 
like if you have 5 dye fabric color shouldnt all your clothes be dye from those fabrics?
Some of them have another order, but it's, like, only two of them
I dye the fabric not the clothes
you craft the clothes from the dyed fabric
Yep
so i supose all makeshift clothes can be crafted in all of those fabric color right?
Well that's the problem, not all of them requires the "fabric" item to be crafted
And some not in the same color scheme
Right now only the clothes from the medieval set are dye able. They all use the Fabric material to be crafted, but both the "Peaseant Tunic" and "Peaseant Dress/Skirt" are in a different color scheme than the rest of the clothes
by the way not sure what OnCreate:Recipe.OnCreate.Pot, is for but i doubt its needed
Isn't it to give back the empty pot once the craft is done ?
it shouldnt remove the cooking pot cause its a drainable item
it should use the the amount of water unit and when depleted it will already return an empty pot
Oh, right, and it uses only a portion of it's water. I forgot sorry. I guess it's just leftover lines i'll remove them
anyway Recipe.OnCreate.Pot is no where to be found in vanilla recipecode
I think it was left from when you wanted me to create one in my RecipeCode
so how many clothing item use the same color scheme?
anyway if you just use this #mod_development message
and add the recipe function you need it should do it
if all clothing had the same colors then i say we could make a function to handle all
but if you have bunch of exception for different object then might be better to do it like this
The other clothes either use a single texture or tint
oh
Nope, made a mistake, the last one "Nice Tunic" is RGB
so only two color schemes
so the long belt dress cannot be brown and grey
cause you dont want to or there is a reason?
it's because i wanted fancy clothes like the dresses to have more vibrant color scheme. The other clothes that uses Brown, Grey, Green are like clothes worn by peasants and they're in a colder color scheme
cool
so then
-- Written this way so that you can re-use in different mods of yours
Yaki_Recipes = Yaki_Recipes or {}
Yaki_Recipes.OnCreate = Yaki_Recipes.OnCreate or {}
-- DyeClothingBlue
function Yaki_Recipes.OnCreate.DyeClothingBlue(items, result, player)
if result:getClothingItem():hasModel() then
result:getVisual():setTextureChoice(0);
end
end
-- DyeClothingGreen
function Yaki_Recipes.OnCreate.DyeClothingGreen(items, result, player)
if result:getClothingItem():hasModel() then
result:getVisual():setTextureChoice(1);
end
end
-- DyeClothingRed
function Yaki_Recipes.OnCreate.DyeClothingRed(items, result, player)
if result:getClothingItem():hasModel() then
result:getVisual():setTextureChoice(2);
end
end
-- DyeClothingBrown
function Yaki_Recipes.OnCreate.DyeClothingBrown(items, result, player)
if result:getClothingItem():hasModel() then
result:getVisual():setTextureChoice(0);
end
end
-- DyeClothingGrey
function Yaki_Recipes.OnCreate.DyeClothingGrey(items, result, player)
if result:getClothingItem():hasModel() then
result:getVisual():setTextureChoice(1);
end
end
considering that green is always set to be third aka 2
So you just assign those function to the correct recipe for the correct item
Green is the third ?
I mean, i can change order it is in the XMLs so green is always the second choice ?
It would make it easier, no ?
make it last yeah
since the two first are different
or make it first
as long as it fit the other scheme
Ok so, Brown Grey Green, and Red Blue Green
yeah
And that would make the oncreate lines Blue and Grey = 1, Red and Brown = 0 and Green = 2
Ok, gotcha, i'm sorry if i sound so lost btw 🥲
if i have grey fabric i might be confused as to why i cannot craft a laced dress with it (as a player)
but i understand the reason why not as you explained it to me
Yeah but it's assigned to the clothes recipes, not to the fabric's color, right ?
So you wont have to make a grey dress out of blue fabric, since the fabric's color won't matter
i just mean that if i have 5 dyed frabric choices i would expect to be able to craft any makeshift clothing with any of those
i do understand the style idea behind it, just that lets say all i have is gray fabric cause i couldnt find any other dye
lol
but still want that laced dress cause its sexy
might just have to make the texture for those dress 😛
two more texture color for them 😄
yay!
😛
And more colors for the peasants clothes too
me i like grey, my whole life is grey
lesgo
Well, i'll go do that, it won't take long x) brb
Also i just realised that i've been writing "Peaseant" in all my files when it's "Peasant"
id say you might want to ask that one in #mod_support (here is mostly mod development related)
OK, the textures are done, and the recipe is made, but it still gives random textures. Did i do something wrong in the recipe ? @thin hornet
Hello modders 👋
I am playing around the zombie:makeInactive and my intent is to set a zombie inactive. So, I call the zombie:makeInactive(true) and I see that the zombie become Shambler. Unfortunately, I am noticing that is not working perfectly for all the zombies. Sometimes I can still see some zombies moving at their default speed setting Fast Shamblers. Looks like the zombie:makeInactive sometimes doesn't work. Do you have the same experience? Any known workaround to effectively inactive a zombie?
did u change the choices texture numbers accordingly?
Normally yeah
Is there a "The last of us" Mod?
try setting the zombie inactive in the OnZombieUpdate event
might have to set it every frame im not sure
https://steamcommunity.com/sharedfiles/filedetails/?id=2820757649&searchtext=10+years This mod is pretty close
I need Walker, which looks like being infected by the Cordicepts
Thanks! Is there any that reskins the Zeds?
No it's only for the world to look overrun by nature unfortunately
let me check @strange sequoia
I did this once, unfortunately the OnZombieUpdate doesn't work correctly in MP. So, I had to switch to OnTick to be sure all zombies are getting updated.
Yep, no problem 🙂 I'm going to go out for a moment to get groceries, i'll be back in less than an hour
im not sure but maybe this would work
-- Written this way so that you can re-use in different mods of yours
Yaki_Recipes = Yaki_Recipes or {}
Yaki_Recipes.OnCreate = Yaki_Recipes.OnCreate or {}
-- DyeClothingRed
function Yaki_Recipes.OnCreate.DyeClothingRed(items, result, player)
result:getVisual():setTextureChoice(1);
result:synchWithVisual();
end
-- DyeClothingGreen
function Yaki_Recipes.OnCreate.DyeClothingGreen(items, result, player)
result:getVisual():setTextureChoice(2);
result:synchWithVisual();
end
-- DyeClothingBlue
function Yaki_Recipes.OnCreate.DyeClothingBlue(items, result, player)
result:getVisual():setTextureChoice(3);
result:synchWithVisual();
end
-- DyeClothingBrown
function Yaki_Recipes.OnCreate.DyeClothingBrown(items, result, player)
result:getVisual():setTextureChoice(4);
result:synchWithVisual();
end
-- DyeClothingGrey
function Yaki_Recipes.OnCreate.DyeClothingGrey(items, result, player)
result:getVisual():setTextureChoice(5);
result:synchWithVisual();
end
really just a guess cause im not testing in live
I'll tell you that when i come back home ^^ Thanks again for all the help ! I can never say that enough eheh
oh i see for MP that might cause an issue if the zombie owner is an other player
not quite sure how to handle that, but maybe check any zombie mod that would handle zombies in an update loop
I did 😢
I started to think that the zombie:makeInactive can cause desync issue between client and server.
just in case you didnt see the source for that function, if it help in anyway
public void makeInactive(boolean var1) {
if (var1 != this.inactive) {
if (var1) {
this.walkType = Integer.toString(Rand.Next(3) + 1);
this.walkType = "slow" + this.walkType;
this.bRunning = false;
this.inactive = true;
this.speedType = 3;
} else {
this.speedType = -1;
this.inactive = false;
this.DoZombieStats();
}
}
}
one of the reason we need to call this function on every tick is that its being reset by the internal zombie update function every frame
OnZombieUpdate is called after the internal makeInactive call so technically using makeInactive in your own OnZombieUpdate should work
i dont know how to help you so im technically just doing some observation in the source
Yes, I've see both these methods, makeInactive and updateInternal (which is called by the update).
I see your point, and I believe you are right. I think what is happening is that the updateInternal will try to call the makeInactive(false) if zombie should be active (the active only sandbox setting), and this can "collide" with the one we call with the mod. Maybe? 🤔
You are testing without any other mod on?
But the OnZombieUpdate stop to being called in MP as soon as the player leave the spawn area.
Yes exactly. But, it is a very subtle bug. The chance that a zombie is not getting updated is very low. It's a rare circumstance, but it can happen.
It's even difficult to reproduce.
If OnZombieUpdate is not called, that mean the client didnt detect a zombie to update
i dont mean to interrupt, but this looks like java code. is it?
yes Antoneeee
What kind of car?
ive learned how to code in java but im not sure how to mod zomboid, kinda intimidated
Actually mods are made with Lua
the java you see there is just us looking at the decompiled files for reference
to learn about the behind the hood
the game is made of java but it has its own lua interpretor so it loads mods in lua and only allow a range of exposed methods and objects to be used.
well im really a car guy, and i simply feel like the cars havent had as much detail or simulation put into them.
theres lots of audio and game mechanics around them, yet the models seem simple. too simple. and i wish the mechanics and models were more accurately represented.
also, ive recently seen a post on reddut about the cybetpunk city in zomboid, and thats given me in inspiration to make my own cars based on cyberpunk, and implement them into zomboid
i think cars you can set their driving stats but i doubt you can change the core physic of driving
if only i could mod in java. oh well ive learned java maybe i can learn lua too
Well pz is a good place to learn lua, cause you have so many example code to look at.
it might not be the best way of writting lua, there is old and new code so some stuff is better then other but still
the only java mod that would work would be server side java mods. Cause clients wont have to download em
is there a way to make mods somehow edit the core to how cars work? so that im able to make more detailed cars?
i mean, ive seen aiterons npc mod, and its just a regular mod that you can install
a
You would have to research the codes to learn whats doable and whats not
hm
if im able to add bodygroups to cars kinda like how gmod works, and then just have the code switch between the bodygroups depending on the state, i theretically should be able to achieve what i want on a baseline level.
id like to also add a torque curve, and more realistic engine stats too cuz honestly 360 hp is for performance engines, yet its on a budget car
360 torque however is more realistic, but its not a good way to compare how good an engine is
i feel this way because i believe zomboid cars behave more similarly to how an ev would. not to mention the cars transmission and how it instantly shifts too.
idk if any of this is possible, i dont have any experience in modding zomboid, honestly.
id like some info on how to get started on modding
Id say check the forum and the pinned section here
also check other mods that do similar stuff than what you want to do.
what mods?
idk i mean to learn how to make your new car check other car mods.
oh
Yes, I think is the best way to learn. I think @thin hornet wanted to say to check the workshop for all the existing mods that deal with vehicles, and try to see how they are made.
man idk
make flying car bro 😛
setting up the map editor was one thing
getting it to work was another thing entirely
but even then it still didnt work
yeah mapping is hard as f if you ask me
yra
it works in that vehicle spawn works, but it doesn't even override the map
those who make successful maps have spent a ton of time figuring it out probably.
do small things, you wont get what you want in one day thats for sure
@valid escarp best little mods you can learn from is making items and recipes. Thats a start if youve done no other modding in pz yet.
alright ill see about doing that
a police station building isn't actually called a police station in lua anywhere is it? looks like buildings are defined by their rooms?
so a police station building might have a room called "policestation" right
yeah they are defined by their set of rooms at least safehouse are
or it might not
but their might be defined by zone
like if I want to know if something is a house, I have to check all rooms for "bedroom" and "bathroom" perhaps
well i know that theres lots in the game
i know bank have a bank zone
oh zone, ok I'll check that out
😉
thought it meant like foraging zone
yeah its mostly used for the foraging
getting zones will give you an array so if you know what you are looking for like Police or FireDept you can loop and break as soon you find it
the zone seem to be much bigger and extend outside the building so if you need to be inside the building just check if player is in interior too
safehouse are considered kitchen + bathroom + (bedroom or livingroom)
@thin hornet Hey, i'm back, sorry 🙂
I tried the other code you sent me, now it kind of works but the colors are all over the place. the Red recipe only gives Green, Blue gives Brown, Green gives Blue, Brown gives Grey and Grey gives random colors xdd
They are all ordered like this : Red, Green, Blue, Brown, Grey
wait
the index was starting at 1
-- Written this way so that you can re-use in different mods of yours
Yaki_Recipes = Yaki_Recipes or {}
Yaki_Recipes.OnCreate = Yaki_Recipes.OnCreate or {}
-- DyeClothingRed
function Yaki_Recipes.OnCreate.DyeClothingRed(items, result, player)
result:getVisual():setTextureChoice(0);
result:synchWithVisual();
end
-- DyeClothingGreen
function Yaki_Recipes.OnCreate.DyeClothingGreen(items, result, player)
result:getVisual():setTextureChoice(1);
result:synchWithVisual();
end
-- DyeClothingBlue
function Yaki_Recipes.OnCreate.DyeClothingBlue(items, result, player)
result:getVisual():setTextureChoice(2);
result:synchWithVisual();
end
-- DyeClothingBrown
function Yaki_Recipes.OnCreate.DyeClothingBrown(items, result, player)
result:getVisual():setTextureChoice(3);
result:synchWithVisual();
end
-- DyeClothingGrey
function Yaki_Recipes.OnCreate.DyeClothingGrey(items, result, player)
result:getVisual():setTextureChoice(4);
result:synchWithVisual();
end
has to start at 0
Ooohh, my mistake then
No i remember i changed them after making the new textures because i thought it had to begin at 1
🥲
yeah but for your defense, java start at 0 lua start at 1
and setTextureChoice is a java function called with lua
😆 
It works !
😄
the icon is also the correct one right?
They are yes, i changed the order too
Made a mistake with the new textures though, but it's easily fixed x)
Phew, now that this is done, i have to recreate all the other recipes lol
oh no did you removed them?
No but i need to make the new recipes for the different colors
Good morning everyone.
Is there any way to create your own clothes?
haha he might have asked the right question at the right time
Completely yes ahah
@edgy locust Yep you can, the screenshot just above is from one of my clothing mod
Is there perhaps a good tutorial and info what I need everything?
I'd suggest looking at this guide https://steamcommunity.com/sharedfiles/filedetails/?id=2648115890 And at the pinned messages in the #modeling Channel, there's a bunch of helpful things in there ^^
@iron salmon May I suggest to add an event that is called before the server shutdown, so that we can do some stuff and save some data before shutting down.
Events.OnServerShutdown.Add(doThisThenSaveMyStuffRealQuickServerIsAboutToGoDark);
this thumbnail makes me wonder
is pepsi man in the game as a mod?
i can't remember seeing a mod with him in it, but im pretty sure it would be easy to make
OOOOOO
@thorn cipher combined with 10 Years later...
Omg! THANKS
I just need scrap-weapons, and lets go
there's a last of us sound track in the workshop too
literally just search 'last of us'
😄 enjoy
i do not know what black magic this is, but after deleting the local savefile, it seem that the player modData was still available O.o
it might not be available on the serverside when requesting it but clearly it has to be transmitted somehow
in any case im happy about it
Tweaking an items stats in an existing mod. However, results in duping the item. How do I prevent this while keeping the items behavior in the original mod intact?
through lua
getScriptManager():getItem(""):whicheverFunctionYouNeedToUse()
which file did you delete
the directory in save
This is where I added the item with custom stats.
media\scripts\Swatpack_items.txt
module swatpack
{
imports
{
Base
}
/************************Helmets************************/
item Hat_SwatHelmet
{
Type = Clothing,
DisplayName = SWAT Helmet,
ClothingItem = Hat_SwatHelmet,
BodyLocation = Hat,
Icon = Hat_SwatHelmet,
CanHaveHoles = false,
BloodLocation = Head,
BiteDefense = 100,
ScratchDefense = 100,
BulletDefense = 100,
ChanceToFall = 5,
Insulation = 0.45,
WaterResistance = 0.40,
Weight = 1.5,
}
}
Then something like this?
media/lua/tweaks.lua
if getActivatedMods():contains("Swatpack") then
getScriptManager():getItem("Swatpack.Hat_SwatHelmet"):OnObjectAboutToBeRemoved()
I just added bullet protection. Deleting tweaks.lua
Swatpack uses module Base, that's why you're creating duplicate items FYI.
delete media\scripts\Swatpack_items.txt
make a file in media/lua/shared
This is a simple way to tweak the swat pack helmet to have Bullet Defence; should be in shared or server.
local item = ScriptManager.instance:getItem("Base.Hat_SwatHelmet")
if item then
item:DoParam("BulletDefense = 100")
end
Oh wow, thanks. Kept looking at how other mods do it. Most used Item Tweaker API but it seems to be too dated. Much appreciated.
Tweaker API is a good newbie resource, but has issues with operating in Client and not Shared/Server last time I looked.
But it's really training wheels in that once someone learns a bit of lua it's unnecessary? There's nothing you can do with it that you can't do with DoParam using the format of the above example.
The less intermediaries/dependencies the better IMO. Especially with how there's so many issues with people using mods with dependencies in MP.
Item Tweaker also has issues in that some people have uploaded their own modified versions on Item Tweaker to the workshop, with the same modID, which then causes lua checksum "file does not match" issues when someone with one of the modified version of Item Tweaker downloaded tries connecting to a server that running a different version of Item Tweaker.
(uploading mods to the workshop with the same modID as existing workshop items, even if it's an authorized modification is a very very not good thing to do).
Makes sense. Haven't messed with lua in 5+ years, but I completely understand wanting to minimalize dependencies for sure.
This is just my personal opinion, but I don't think dependencies are necessarily "viable" with b41 MP?
Firstly we have the issue with multiple modIDs for stuff like Item Tweaker, which right there, IMO, "breaks" those mods for MP.
Secondly dependencies can get broken by updates or become obsolete; which can be compounded if the author is no longer updating the dependency.
Thirdly it looks like a significant portion of people trying to set up servers have issues with setting up dependencies; a huge amount of the posts in mod_support are people trying to set up mods to work on their servers with dependencies. More can be done with how the server hosting interface handles mods + dependencies, but I can still see issues where people set up the mod lists using a text editor and the ini files?
nm the wiki has the info if i look hard enough
Hello! has anyone have found a way to mod the camera in PZ?
For example zoom more, or have edit the sensibility of camera pan, make your own character invisible, move the camera permanently, even a free camera...
I started to try cinematics in PZ, and the actual camera is a real pain to manage
I know that the game is basically a 2D map with isometric assets where 3D models are moving, so there is no point to change the camera angle, but i'm curious about "what if" someone did that, what would it looked like (example for green screen)
You can set the player object's alpha to 0. It changes back to 1 quickly gradually, but you can set it to 0 in each player update.
that's still a workaround to keep the character invisible, would the shadow still be there?
I'm not sure but mb u can use it
https://zomboid-javadoc.com/41.65/zombie/characters/IsoGameCharacter.html#doRenderShadow
Javadoc Project Zomboid Modding API declaration: package: zombie.characters, class: IsoGameCharacter
¯_(ツ)_/¯
🤔
@drifting stump I red what you said about player modData. So if I understood well the thread, this code will not do what expected right ?
Events.OnGameStart.Add(function()
local player = getPlayer()
local pData = player:getModData()
if not pData.FirstTimeItem then
player:getInventory():AddItem(MyMod.MyStartingItem)
pData.FirstTimeItem = 1
end
end)
So I would need to use your trick to store datas in a global modData table with player IDs as index and true/1 as value ? And run my check in this table rather than directly in player modData ?
is there a way to manipulate the farming growth time
M1A1 Abrams in Open Beta now :D
https://youtu.be/dT9hhSzx62k
https://steamcommunity.com/sharedfiles/filedetails/?id=2830466876
hi, can I somehow change the price of vanilla profession
check for ProfessionFactory
once you find the profession object that you want to edit you can setCost()
Thank you, I'll try to figure it out, this is my first mod, so if it's not difficult, could you give an example or tell me in more detail, if it's not difficult
does anyone know of a zomboid mod which makes these maps actually readable? This Muldraugh map is sideways and I can't read it
I need it to be upright so I can read it, because in this playthrough I made all loot extremely rare and disabled the world map, because I get off to suffering etc, but I at least want to be able to read a map properly
so mods which make sensible realistic things possible are all fair game
that's the orientation of Muldraugh though, the map is displayed in a top down view and the top of that map is north. the only part about it that's odd is the name placement, but that's just down to space constraints
but I don't think there's any mods that map the in-game map items isometric
there is also an option on the bottom right of the in-game map and mini map to switch to a Top down view of the map if that helps you at all with navigating with the maps
nice mod man
You can find the class for ProfessionFactory at media\lua\shared\Library\ProfessionFactory.lua
I suggest you download and check the Profession Framework to see how this work it might help you.
Thank you very much
More ui stuff 
Hello modders! Does anyone knows if there is a way to get all zombies that are near the player? Not using the player:getCell()
no what you have should work
might be worth looking into OnNewGame instead i dont remember if that one only triggers one time
I'm trying to edit the Only Cure mod to make it take less time to pick up items while missing an arm but I can't find the file that modifies that transfer time, any help please?
--- Handle initialization (network available from here)
local function initialize()
Events.OnTick.Remove(initialize);
local function givePlayerFirstTimeItem(player)
local playerModData = player:getModData();
if not playerModData.FirstTimeItem then
player:getInventory():AddItem(MyMod.MyStartingItem);
playerModData.FirstTimeItem = true;
end
end
--- Store local players reference
local lastPlayerObject = {};
--- Check character spawn and respawn
local function playerUpdate(player)
if not player:isLocalPlayer() then return; end
local playerNum = player:getPlayerNum();
if lastPlayerObject[playerNum] and lastPlayerObject[playerNum] ~= player then
print("Player respawned after dieing in game.");
givePlayerFirstTimeItem(player);
elseif not lastPlayerObject[playerNum] then
print("Player spawned after click to play.");
givePlayerFirstTimeItem(player);
end
lastPlayerObject[playerNum] = player;
end
Events.OnPlayerUpdate.Add(playerUpdate);
end
Events.OnTick.Add(initialize);
On the first tick of OnTick network is available in MP.
We check inside OnPlayerUpdate so that we get all local player (splitscreen friendly).
We also make sure to give that starting item again if the player die and make a new character midgame.
for vehicles also that will works (mean method not content) ?
No, that would not work.
there is way to simple add something to vehicles without overwrite with whole files of it ?
like expl i wanna add for car A,B,C one more line like template = CustomPart,
then is there way to simple add that line to specific vehicles like A,B,C
I don't know of a means to do that?
lets say wanna to make custom addon for van in game
so to not create new vehicle or to overwrite whole existing one
want just to add that line to it then car can use that custom addon
You can add an additional car type using the old one as template - keeping both cars. Or you could inject into the script using the scriptmanager - editing the vanilla car. The easier way to do this is to copy and paste the entire script and make your changes that way.
Oh, vehiclescripts don't have a doparam, so you'd have to use setvariable - but that doesn't work on all kinds of variable types. So it depends on what you want to change.
just add temple line
?
Hey guys
Anybody else having issues with weapons spawning from britas weapon pack?
Hello my lovely modders, I'm here with yet another question.
What would be the OnEat-Function to make an item on consumption lose you weight?
For example a mixture of herbs that makes you lose 1kg instantly. Is that even possible?
Please tag me here or DM me as I usually miss a lot of messages on this Discord. Thanks in advance.
@wooden lodge it is possible
local nutrition = player:getNutrition();
local currentWeight = nutrition:getWeight();
nutrition:setWeight(currentWeight - 1);
that is for lowering the weight
local original_ISEatFoodAction_perform = ISEatFoodAction.perform;
function ISEatFoodAction:perform()
local itemModData = self.item:getModData();
if itemModData.eatInstantWeightChange then
local nutrition = self.character:getNutrition();
local currentWeight = nutrition:getWeight();
nutrition:setWeight(currentWeight + tonumber(itemModData.eatInstantWeightChange));
end
original_ISEatFoodAction_perform(self);
end
We hook into the EatFoodAction and if the item has a custom field named eatInstantWeightChange (for example)
We will apply the weight change and then we call the original EatFoodAction.
and for the script item you can add eatInstantWeightChange = X, to
item DogfoodOpen
{
DisplayName = Opened Dog Food,
DisplayCategory = Food,
Type = Food,
Weight = 0.8,
Icon = DogfoodOpen,
CannedFood = TRUE,
EatType = can,
Packaged = TRUE,
ReplaceOnUse = TinCanEmpty,
DaysFresh = 5,
DaysTotallyRotten = 7,
HungerChange = -30,
UnhappyChange = 50,
Calories = 498,
Carbohydrates = 77.56,
Lipids = 12.58,
Proteins = 16.04,
StaticModel = CanOpen,
WorldStaticModel = CanOpenDogFood,
eatInstantWeightChange = 2, -- if you want to gain
eatInstantWeightChange = -2, -- if you want to lose
}
@thin hornet maybe u know difference between these functions? especially the last two
square:RemoveTileObject(obj)
square:DeleteTileObject(obj)
square:getObjects():remove(obj)
square:getSpecialObjects():remove(obj)
getSpecialObjects would be door and window i think
I found different ones in same functions but different files and want to know if these're same
public IsoObject getDoorOrWindow(boolean var1) {
for(int var2 = this.SpecialObjects.size() - 1; var2 >= 0; --var2) {
IsoObject var3 = (IsoObject)this.SpecialObjects.get(var2);
if (var3 instanceof IsoDoor && ((IsoDoor)var3).north == var1) {
return var3;
}
if (var3 instanceof IsoThumpable && ((IsoThumpable)var3).north == var1 && (((IsoThumpable)var3).isDoor() || ((IsoThumpable)var3).isWindow())) {
return var3;
}
if (var3 instanceof IsoWindow && ((IsoWindow)var3).north == var1) {
return var3;
}
}
return null;
}
huh
kk, thanks
just want to know if there're some specifically features
will test anyway

a SpecialObjects can be a IsoBarricade, IsoDoor, IsoThumpable, IsoWindow, IsoGenerator, IsoCompost
and thats just what i found there is probably more i dont know much
I think that means PhysicalObjects
all objects but character/item/vehicle

from what i can see its all object that can be destroyed/damaged by zombies
yeah
I tend to refer to them as World Objects as they are typically represented by the static tile sprites as opposed to 3D items. A few more that come to mind include IsoStove & IsoFireplace.
Throwing this in here because I forgot who made the bike mod, but I found an item called "Regular bike suspension type sport" in a random garage and it has a question mark icon. Placed it down and it started racking up errors. Not sure what this means
Also still can't find a bike anywhere lol
This is for #mod_support . Also a screenshot would help on what mod it is since there are a few bike mods.
As someone already said, it's a question for #mod_support for any future end-user mod questions.
But it should tell you what mod it came from when you hover over it; and yes screenshots would help a lot.
If you know what mod it's from, may be wise to report it to the mod creator.
oh my bad didnt see that channel lol, i just know the creator is in here, so figured hed see it. workshop is kind of not working well for me currently, but sorry for the wrong channel!
It's all good, I have no problem with it, I just know some people are very picky about it. 
Otherwise, it just sounds like a bugged item.
May be wise to check in console.txt too.
Question about sandbox-options.txt - is there some way to invalidate sandbox options and return them to defaults on mod update. Or this happens automatically?
@willow estuary could you rename the channel to mod_making?
what's this mod name?
One way to invalidate them would be to rename them, but that mean to rename it everywhere
Thanks. Is it possible to modify sandbox options via lua script? Because I thought I could add enum option, with mod version (single option) - check it runtime, and if doesn't match - reset sandbox options to default values.
its possible but it might require an admin account for MP, a normal account wouldnt sync with the server
Should be possible - as part of the server script?
Might be worth trying to change it from the server and see if the change reflect on your client
might want to check getSandboxOptions()
Worst case it is possible to send update config command from server to clients - I'm doing it already, however I use custom ini config
Perhaps you remember, which API I should look at for modifying sandbox options?
If there's any Aliens fans about https://steamcommunity.com/sharedfiles/filedetails/?id=2830762848
I only write mods to make posters https://steamcommunity.com/sharedfiles/filedetails/?id=2830661685
It's my true calling
is there a way to turn food items into drainables? wanted to change bleach into drainable, using itemtweak api, but whenever i try to clean blood, it just returns me
"bugged action, cleared queue"
Doesn't have a name haha, is just some tweaks for a server where I play
I'm trying to make a custom WeaponReloadType, but i don't know how to tie my IS<weapon>Weapon.lua file to a type word, like ISShotgunWeapon to the type shotgun, could anyone tell me what the proper way to go here is? Thanks!
so i have a question on farming. So i added a new plot to grow and i have textures for like empty..seeded...then ready to harvest but i dont see how to make it go from 1 texture to another when its ready? does anyone know where i would link this up?
or have something that i can look at to figure it out
Can someone point me to where code for electricity and car batteries is in the file structure? Thanks
Got a message from on-high for anyone who makes models for PZ mods.
Small request from Spiffo-on-high for those who make models for PZ mods.
Oversized textures for weapons/clothing/vehicles etc within mods are currently becoming more of an issue with mod users - sometimes causing memory leaks and performance issues when mods stack up.
Please try to avoid using model textures that are larger than the ones used in Vanilla PZ for equivalent items.
Generally speaking vehicles are 512x512.
Body and clothing textures are 256x256.
Weapons are generally 128x128 - but vary due to the variation in sizes.
Hats are 128x128.
Also in the same ballpark: using tricounts higher than vanilla can also have negative effects on performance too.
We will endeavour to help this situation along code-side, but in the meantime if people could try to keep within these limits we would be super-grateful.
@thin hornet I ended up making the different pots of dye like the first idea you had. And i managed to make them work, It's a miracle ahahah ! 😄
Neat - are each of those pots different item types?
I left them as the "drainable" type
Ah, I'm trying to recolor/retexture the same model in multiple variants - but hit a road block
I personally did that via the model_item.txt file. For example :
{
mesh = WorldItems/CookingPotFull,
texture = WorldItems/DyePotRed,
scale = 0.4,
}
model DyePotGreen
{
mesh = WorldItems/CookingPotFull,
texture = WorldItems/DyePotGreen,
scale = 0.4,
}
model DyePotBlue
{
mesh = WorldItems/CookingPotFull,
texture = WorldItems/DyePotBlue,
scale = 0.4,
}
model DyePotBrown
{
mesh = WorldItems/CookingPotFull,
texture = WorldItems/DyePotBrown,
scale = 0.4,
}
model DyePotGrey
{
mesh = WorldItems/CookingPotFull,
texture = WorldItems/DyePotGrey,
scale = 0.4,
}```
They all have the same model but different textures
I need them to have the same module.type though - my project tweaks how books behave and I'd like to keep Base.Book as the only type to not deal with other's mod compat issues or loot tables.
Any chance you could send me a link or something? I'd love to have that in my server (private server for friend group)
hello i have very specyfic problem
you see whenever user has different language than English, crafting tab vanishes
I updated some code in my mod, uploaded to workshop, got a success message - no error. However, it never actually updated.
debug log: https://pastebin.com/5VYxyPHg
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
you don't have to block the ID number, it's public
How do you know it hasn't updated?



