#mod_development
1 messages · Page 188 of 1
Like this?
Example
module Casualoid {
imports {
Base
}
item NutritionistMag1
{
DisplayCategory = SkillBook,
Weight = 0.1,
Type = Literature,
DisplayName = The Nutritionist Magazine,
Icon = NutritionistMag1,
TeachedRecipes = Nutritionist Trait,
ReplaceOnUse = NutritionistMag1,
StaticModel = Magazine,
WorldStaticModel = MagazineHerbGround,
}
}
Yeah, you also need the imports Base if you are making your own custom modul
it seams to work now thank you for you help
You are welcome, good luck!
thank you
Hi guys, I am trying to adjust vitamin, make it able to gain some endurance but lower thirst,
right now, only fatigue -8 and the weight adjustment applied, am I doing something wrong?
item PillsVitamins
{
EnduranceChange = 5,
FatigueChange = -8,
ThirstChange = 30,
Weight = 0.5,
UseDelta = 0.5,
Type = Drainable,
UseWhileEquipped = FALSE,
DisplayName = Vitamins,
Icon = Vitamins,
Tooltip = Tooltip_Vitamins,
StaticModel = PillBottle,
Medical = TRUE,
}
Try using as a base for your vitamins the ginseng
item Ginseng
{
DisplayName = Ginseng,
DisplayCategory = FirstAid,
Type = Food,
Weight = 0.1,
Icon = Ginseng,
EvolvedRecipe = Beverage:1;Beverage2:1;HotDrink:1;HotDrinkRed:1;HotDrinkWhite:1;HotDrinkSpiffo:1;HotDrinkTea:1,
Spice = true,
FoodType = NoExplicit,
EnduranceChange = 2,
Tooltip = Tooltip_Ginseng,
HungerChange = -1,
Calories = 0.1,
Carbohydrates = 0,
Lipids = 0,
Proteins = 0,
WorldStaticModel = Ginseng,
Tags = HerbalTea,
}
I would like to add custom body temperature increase when doing (short) moded timed actions like roll, climb, crawl, jump. I tried to use setMetabolics in each call of the update function but had no visible effect on any body temperature. Anyone has a clue on where to look at ?
Good day to all, please tell me if it’s really possible to do something so that when the player first enters, it checks which profession he chose and, depending on it, the player joins any faction (if there is no faction, it was created, but the player would not be a leader)
I understand that the question is stupid, I just want to make a small mod for my RP server with factions.
my Projekt is crashing on statup for sime reason
https://discord.com/channels/136501320340209664/1137801609800339526
you could try to delete the reset-mods file so that the game starts without any mods
Hello can someone link a good tutorial on how to setups items to spawn ingame
Does anyone know how the game saves that you have already watched a VHS or TV show? I'm looking for the code that stops you from getting XP again
Ah damn, is inside IsoGameCharacter.java -> knownMediaLines, but knownMediaLines is protected 😦
Alright, how can I get a IsoGameCharacter ? getPlayer() seems to return something different
IsoPlayer inherits from IsoGameCharacter.
Bro my game crashed again for no reason idk what i broke
But my code to get the class field, is not working on it, I can't find the knownMediaLines
local num = getNumClassFields(player)
for i = 0, num - 1 do
print(getClassField(player, i), " --", i)
end
isogamecharacter is an abstract class, you can never get an instance of it
Oh my fking god 😦
iirc inherited fields are just a limitation of the weird field api
i wonder what would happen if you used a Field object you got from the parent class, but in this case you couldn't even try it since you can't get an instance of the parent class to get the Field from
?! you can access the public fields no problem whatever the inheritance layer
when you loop through getClassField you won't find fields from parent classes
damnit I missed that
Does anyone of you know a way to reliably get the knownMediaLines from the player?
what do you need it for?
I'm making my own version of a respawn mod, and I'm trying to avoid people from cheesing the mod by re-watching VHS tapes
loop through the entire line list and do isKnownMediaLine for every single one 
that's kind of a joke but i also can't think of another way
you would use isKnownMediaLine to detect which ones are in the list
Alright, how can I get the full list of media lines?
they're all in a RecordedMedia table iirc
Okay thank you
FUCK YEAH!
I don't even need check all the recorded media 😎
I'm hijacking the function that adds the XP via VHS
i was thinking about that but it won't work if the mod is added midsave
I won't work, true, but peopl would be able to exploit this only once, so, it's not too much of a concern for me right now ngl
Now, I just need a reliable to way to differenciate between when a player starts with 5 fitness/str and 0 fitness/str
Cause my code can only check reliably the XP for non passive perks 😦
Is there a way for AddXP to not trigger the listeners added by other mods?
yeah
Do I just have to put all flags to false?
there's a boolean in one of the calls that dictates whether it'll call the event or not
float amount,
boolean callLua,
boolean doXPBoost,
boolean remote)```
I'm trying to create a custom moodles using the moodle framework and I have no idea what I am doing... I'm trying to make it work like vanilla hunger/thrist moodles and I haven't succeed anything so far. The Discussions from the steam page isn't really helping me much
Tried to make the moodle appears in-game with only 1 singular value to see if it's possible.
Thank you!
You can try to find an error at the console.txt in the Zomboid folder
Hopefully Albion doesn’t see me in here, cuz I said I was stopping 😈. but is there a way to alter the intro screen and input a video? I think I actually asked this question about images and was told that part is hard coded so you can’t alter the starting image when joining a server so I’m gonna assume you can’t add a video, but it’s been months so I figured I’d ask again to maybe see if anyone found a way or what not.
Oh god I’ve been compromised I should have made an alt 💀🥸🥸
My code to intercept the knownMediaLines
local injected_instance = nil
local old_ISRadioInteractions_getInstance = ISRadioInteractions.getInstance
function ISRadioInteractions:getInstance()
if injected_instance then
return injected_instance
end
local instance = old_ISRadioInteractions_getInstance(self)
local old_self_checkPlayer = instance.checkPlayer
local function new_checkPlayer(player, _guid, ...)
local result = old_self_checkPlayer(player, _guid, ...)
CasualoidPrint('ISRadioInteractions: _guid', _guid)
local casualoidRespawnData = getCasualoidRespawnData()
casualoidRespawnData.knownMediaLines[_guid] = true
return result
end
instance.checkPlayer = new_checkPlayer
injected_instance = instance
return instance
end
who can support with injection into function.
just for not rewrite all function for maximal compatibility?
my modded line:
192 - 285
you can't really inject into the middle
That is, for me, only the usual rewriting of the function remains?
What language do I need to learn to make mods for this game? What IDE should I learn to use?
pz mods use lua, the most popular ide is definitely vscode but intellij works too if you're more used to jetbrains
Honestly I'm new to coding over all but PZ has inspired me to start learning. So which would be better for a beginner?
definitely vscode
honestly intellij's lua support sucks bad, it's just a personal preference of a lot of modders who are used to using ides like that
So learn lua with vscode? Alright thanks man I appreciate it!
Did anyone hear if NPC will be compatible with MP in B42?
Just so you don't get too confused while you're learning, PZ uses lua for its scripts, but PZ itself was programmed in Java so you're going to have to get somewhat familiar with both of them. Get started with lua, and after you learn about variables, conditionals, and loops, make sure you watch a few videos on Java "classes". Also, make sure you look up the difference between scripts and code. Good luck!
npc animals? definitely, they wouldn't add a major feature without mp support
Nah, people NPCs. I know there are NPC mods but they are strictly singleplayer
people npcs aren't due until b43 i'm afraid
i'm sure they'll support multiplayer
i'm betting that npc mods will work in multiplayer in b42 - the reason they don't currently is because you can't actually render the npc in multiplayer, and it seems likely that modders will be able to use whatever animals use to get that working
exactly the reason why im waiting B42, at least for some template class of NPC that doesn't get purged by server
self.sound = self.character:playSound("BlowTorch");
self.character:getEmitter():stopSound(self.sound)
Does anyone know the reason why playSound randomly refuses to stopSound itself when played?
Context: It's done in TimedActions, sounds starts in start function and ends in perform.
I have no issues but people keep reporting that they have sound running. Just to be sure I performed that action myself maybe around a few hundred times - nothing.
perform calls on successful action
if player will end action before it will be done => perform won't be called
use stop instead perform to stop sounds
function ActionSafe:stop()
-- Mandatory, called once action is interrupted
if self.sound then self.character:getEmitter():stopSound(self.sound); end
ISBaseTimedAction.stop(self) -- Mandatory, performs core functions
end
Was there already apparently.
Does anyone know how to change Player speed in particular animation state? For example make walking in trees faster?
I don't know how to do that specifically. But you could check IsoGameCharacter:isInTrees() and then use the mod "SpeedFramework" to modify the players speed as needed
Sounds doable
Thx for the tip 
you can try controling with isoPlayer:setVariable('WalkSpeedTrees',floatValue) you wil probably need to override it each cycle
you can also create other files under media\AnimSets\player\movement with specific conditions and other source for speed.
@mellow frigate I tried to copy AnimSets files and set <m_SpeedScale>WalkSpeedTrees</m_SpeedScale> value to some random numbers. But it seems does nothing
I renamed them properly, changed m_Name value too. Set custom condition and trigger it from .lua
it all works except speed
For this method to work, you need to add a custom condition activated by your lua. you may look at InfectedPlayer mod for an exemple.
also once you added or removed xml files, restart your game 😄
yep yep
I restart every time I make change
if you only change values, it reloads automatically and you can save time. but any error and .. kboom
afaik you got the right process and it should work, ensure you do not reference vanilla files in your xml: it won't work. it needs to reference a local parent (afaik).
btw do you know what exactly <m_SpeedScale> in AnimSet controls? Only animations speed or movement speed to?
@mellow frigate i think you accidentally put Mysterious Stranger's UI_EN.txt in your Balance Trait mod
thanx
I was actually planning on making a similar mod but I barely have time to study PZ's modding rn.
Do you think you can make an alternative version similar to Doctrine? https://steamcommunity.com/sharedfiles/filedetails/?id=3000737027
Just have 2 sandbox string input boxes, one for names and one for new trait point cost. That way it's not only for vanilla traits, but also for any mod trait
if not, then by the time i can study and make a mod, can i have permission to use your Balance Trait mod code?
check the description: you just have to set the sandbox options and translation https://steamcommunity.com/workshop/filedetails/discussion/3016311206/3803905146211577007/
hmmm... so you're saying instead of going the 2 string box route, just go with the more int box route?
Thank you for creating that guide! That should be very doable.
it's fine to change the min max fields right? is there a known limit for trait points available/cost?
yes it is fine. no limit that I am aware of.
what happens if a trait cost is set to 0
not tested, it may send you to hell because 0 is specific to profession traits in vanilla

but not sure 😄
alright i guess i'll test that too
I tested reverse and it worked
pretty curious
you mean something like a previous positive trait (negative cost), gave it a positive cost?
did it become a negative trait?
or just stayed positive trait with positive cost
remained in the same box, changed color, changed value
alright, huge thanks really, gonna test it out later and tell you if i spot anything wrong, otherwise i'll give out another award
dang I don't understand
I created copy of inTrees.xml and modified it like so:
onCorpses.xml
<?xml version="1.0" encoding="utf-8"?>
<animNode>
<m_Name>onCorpses</m_Name>
<m_AnimName>Bob_WalkTrees</m_AnimName>
<m_deferredBoneAxis>Y</m_deferredBoneAxis>
<m_SpeedScale>0.01</m_SpeedScale>
<m_BlendTime>0.20</m_BlendTime>
<m_Conditions>
<m_Name>oncorpses</m_Name>
<m_Type>BOOL</m_Type>
<m_BoolValue>true</m_BoolValue>
</m_Conditions>
<m_Events>
<m_EventName>Footstep</m_EventName>
<m_TimePc>0.15</m_TimePc>
<m_ParameterValue>walk</m_ParameterValue>
</m_Events>
<m_Events>
<m_EventName>Footstep</m_EventName>
<m_TimePc>0.6</m_TimePc>
<m_ParameterValue>walk</m_ParameterValue>
</m_Events>
</animNode>
I can see it triggering properly in Animator Debugger
but <speedScale> in xml file does nothing
(didn't tried to use SpeedFramework so far)
I strongly suggest you recopy (and change names of the copies) all xml files related to intrees with the initial conditions + yours. Because: if the model has to choose, it is likely to choose the wrong conditions.
i renamed them
I copied player/movement/inTrees.xml and renamed it to player/movement/onCorpses.xml Debugger also says that it loads it (red arrow on screenshot)
in your screenshot, it is overriden by the turning animation that leads to vanilla idle, bypassing your oncorpse
Wow this looks really cool cant wait to test this out!
try without turning
it's cuz I was walking on one ropse and then stopped
you can add the timestamps to the monitor
sure
one moment
sorry mate, got to go.
ye np ヾ(•ω•`)o
ight figured this out
thx again @mellow frigate
-- Обработчик подключения игрока к серверу
function OnConnect(player)
if player:getDescriptor() and player:getDescriptor():getTraits():contains("Cook") then
-- Если у игрока есть трейт "Cook", добавляем его в фракцию "Cook"
player:getDescriptor():getFactions():add("Cook")
print("Player " .. player:getDescriptor():getForename() .. " added to Cook faction.")
end
end
-- Подписываемся на событие подключения игрока
Events.OnClientCommand.Add(OnConnect)
or i need player:getDescriptor():getProfession()?
Hello, tell me please, am I digging in the right direction or not?
I choose "cook/lumberjack etc" and I should be thrown into the "chef/lumberjack etc" faction when I enter the game. If there is no faction, it should be created but the player should not be the leader.
Hey gangstas, was asking a while ago about Webhooks and project zomboid and found out they had understandably been removed due to security concerns, I wrote a wee workaround in php for anyone who faces the same issue in the future.
Simply hook this up to a cronjob every minute and have it read a log file generated by your mod, the file will automatically be deleted after being read to ensure that only a single string is sent at a time. TLDR; you'll need to install the curl extension for php for this to work. $ sudo apt-get install php-curl
Hope this can help someone in a pickle in the future, I've been saved countless times already by the community in this forum 
<?php
// Directory to search for the log file
$directory = '/home/pzserver/Zomboid/Lua/youfolderthatstoresrespectivefilehere/';
// Name of the log file to process
$logFileName = 'filetoreadstringfrom.txt';
// Discord webhook URL
$webhookUrl = 'yourwebhookurlhere';
// Path to the specific log file
$logFilePath = $directory . $logFileName;
// Check if the log file exists
if (file_exists($logFilePath)) {
// Read the content of the log file
$content = file_get_contents($logFilePath);
// Check if the file is not empty
if (!empty($content)) {
// Prepare the payload for Discord webhook
$payload = json_encode([
'content' => $content
]);
// Send the payload to Discord webhook
$ch = curl_init($webhookUrl);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Check if the request was successful
if ($response === false) {
echo 'Failed to send webhook request for log file: ' . $logFileName . PHP_EOL;
} else {
echo 'Webhook sent successfully for log file: ' . $logFileName . PHP_EOL;
}
} else {
echo 'Log file is empty: ' . $logFileName . PHP_EOL;
}
// Delete the log file
unlink($logFilePath);
} else {
echo 'Log file not found: ' . $logFileName . PHP_EOL;
}
The main issue I notice is here I think
player:getDescriptor():getFactions():add("Cook")
I'd first check to see if there is even a valid method to create a new faction, getfactions should return all the factions in an array if called via faction.getfactions() < I THINK. Just doing a little scoure in the java docs though, I do see reference to sendFaction and sendFactionInvite, after establishing whether or not you can directly create factions within the API this would be where I'd look to first, you could consider having faction leaders preset in game with community members you trust and then allow the code to handle the invites to said factions after the player joins the server.
Also good practice to give your function a name other than "OnConnect" to avoid conflicts and for your own clarity have it be somewhat descriptive "setFactionOnConnect" or something 
Hey everyone!
Is it possible to play different animations on different bones at the same time? For example, upper body plays the walking animation and lower body plays a custom one.
I believe the term for this is "blend space".
How can I reliably check if the player started with the feeble trait? Or in particular how can I get it's starting traits
After getting the player:
player:HasTrait('Feeble')
should do it. Is this unreliable in some way?
Have you tried triggering 2 animations without timed actions just to see what happens? 👀
most the default anims that you call can be triggered with a flag that stops it interupting walking or running anyway, but I've never messed with making my own
This wont work if the mod is added mid save and player has grinded up to remove the feeble
when the player creates a new character, check then and store the results in moddata alongside their name
Then just load and reference it as needed
could store it in character moddata or in global, then just reset the moddata for the index of said character "onPlayerDeath"
Yeah, why not, could work
Hello Is there a way to connect the Log Extender mod to Discord, in short, to manage logs of individuals through Discord
The answer is webhook, however project zomboid doesn't natively support webhooks, however you could adapt the script I shared up here #mod_development message to parse the log file and send the contents to a discord channel using discords webhook integration, you may want to adjust the logic slightly to suit your needs, there is no back and forth communication in this script, it simply sends the contents of the log and deletes the file afterwards to prevent the same info being sent twice, but you could just as easily set your cronjob to run the script once an hour, or add logic to allow you to trigger it manually through discord itself, to do that you'd probably need to make your own bot, discord integration wouldn't cut it
The one I linked before specifies an individual file name but if you could do the exact same thing for all files in a directory if the logs are categorized by player names.. here you go 
<?php
// Directory to search for text files
$directory = '/path/to/text/files/';
// Discord webhook URL
$webhookUrl = 'https://discord.com/api/webhooks/your_webhook_url_here';
// Get all text files in the directory
$textFiles = glob($directory . '*.txt');
// Check if there are any text files
if (!empty($textFiles)) {
foreach ($textFiles as $textFile) {
// Read the content of the text file
$content = file_get_contents($textFile);
// Check if the file is not empty
if (!empty($content)) {
// Prepare the payload for Discord webhook
$payload = json_encode([
'content' => $content
]);
// Send the payload to Discord webhook
$ch = curl_init($webhookUrl);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Check if the request was successful
if ($response === false) {
echo 'Failed to send webhook request for file: ' . $textFile . PHP_EOL;
} else {
echo 'Webhook sent successfully for file: ' . $textFile . PHP_EOL;
}
} else {
echo 'Text file is empty: ' . $textFile . PHP_EOL;
}
// Delete the text file
unlink($textFile);
}
} else {
echo 'No text files found in the directory: ' . $directory . PHP_EOL;
}
oh thnx I will take a look at this
if u get stuck along the way feel free to reach out via dm 👍
Following up on my issue: it seems like I have 2 sensible options. Either I
1 (preferable). find a way to dynamically change the AlcoholPower for the soaps on inventory depending on the presence of water, or
2. make a separate menu for disinfecting wounds
Does anyone know if the first option is even possible?
Question: In the Lua code of a recipe create function - how do I set the percentage value of an item? So say I want to create 'Wire' at like 0.5%-1% of its max possible value, and how would I find the information for the calls I would need to make?
local wire = InventoryItemFactory.CreateItem("Base.Wire");
--set wire value to 1%
could this be done in the recipe.txt? I've seen items using the suffix ";<number>" or "=<number>". To me it looks like this defines the amount to use/create from a recipe.
(I haven't used recipes yet so this is just a guess)
If I set it to 'Result:Wire=1' it creates the wire at 20% - I want it at like 1%
So I don't know if it just can't be lower than 20% or what the deal is
If that's the case, sounds like I'll have to make a new 'item' object like 'smidge of wire' or something that can be crafted into wire
Looks like to me that you can only deal with UseDelta amounts
in ISCraftAction.lua
if resultItemCreated and instanceof(resultItemCreated, "DrainableComboItem") and self.recipe:getResult():getDrainableCount() > 0 then
resultItemCreated:setUsedDelta(resultItemCreated:getUseDelta() * self.recipe:getResult():getDrainableCount());
end
Yeah, and since it's at 0.2 and I dont want to overwrite vanilla for this Imma just make a new item and a recipe to craft those into wire
Thanks @lethal phoenix
Hey, but have you tried using wire:setUsedDelta()?
I haven't I could give that a shot.
Another Question: How do I see if the player character has Water anywhere in their inventory? Then how do I use x amount of that water (in lua)
I can do for instance:
local inventory = self.character:getInventory()
inventory:contains("Bleach")
but not?
local inventory = self.character:getInventory()
inventory:contains("Water")
Water is not an item
I actually tried this on my own
It works
Leave Result:Wire without any amount modifier tho
Ok - so how do I get all the 'WaterItems" that the player character has?
If im not wrong the wateritems are all drainables try calling getItemsFromCategory(“Drainable”) on your inventory
That works great man! Thanks so much 😄
Glad to learn along helping you!
hey could someone more experienced than me check into my problem https://theindiestone.com/forums/index.php?/topic/67977-how-to-update-corpses-removal-communication-client-server/
Hi... again... so after a long hours of trying to make corpse removal i got to the point that i remove corpses but only on server side (after i respawn i dont see corpses, but everyone else sees it) For testing purpouses I make that OnPlayerDeath event on server side and it worked then, but thats...
@mellow frigate okay so setting traits to 0 makes them like this
also, very minor issue (don't really care about this one tbh) traits won't be arranged properly (asc trait cost) if you haven't picked/remove one yet
oh lol, i selected then removed the 0 cost traits and they went below
hmm, i thought i'd fixed that
i was hoping setting them to 0 would disable being able to select (but still obtainable) them like Doctrine mod does 
guess i'll still use that one for now
i think the code this is based on did have that feature? been a while since i wrote it
not at zero but with a toggle - might look ugly for all vanilla traits though
plus some traits are necessary for the game to function
Is there to make a new sound slider to attach sounds to?
the unselectable traits are those with the profession boolean
i meant the costs being arranged incorrectly
Lua Question: So Im trying to run through the list of inventory items, here is the code...
for i, item in ipairs(inventory:getItems()) do
print("ZAP")
print(item)
print(item:canStoreWater())
print(item:getUseDelta())
if item:getCanStoreWater() and (item:getUseDelta() >= 1) then
waterItem = item
end
end
But it never runs through the list, I dont see any of my print messages in console.txt. what am I missing? if I do
print(inventory:getItems())
then it prints out this: [Clothing{ clothingItemName="Tshirt_PoloTINT" }, Clothing{ clothingItemName="Socks_Long" }, Clothing{ clothingItemName="Trousers_DefaultTEXTURE_TINT" }, Clothing{ clothingItemName="Shoes_Random" }, zombie.inventory.types.InventoryContainer@70833e5b, Clothing{ clothingItemName="Belt" }, zombie.inventory.types.DrainableComboItem@5e5cc00e, zombie.inventory.types.DrainableComboItem@2b395c91, zombie.inventory.types.DrainableComboItem@24ac03b1, zombie.inventory.types.ComboItem@4d349099, zombie.inventory.types.DrainableComboItem@75506581, zombie.inventory.types.DrainableComboItem@146c726e, zombie.inventory.types.HandWeapon@785ef887, zombie.inventory.types.Food@50994ad9, zombie.inventory.types.Food@3940a80b]
it's not a lua table, it's a java ArrayList, you can't use ipairs on it
Ok I see - so how do I run through the list?
I'm very new to Lua and how it connects to java
Thanks @bronze yoke
@albion Ok so now that I have my items, how do I check instanceof DrainableComboItem (java class)
Or anyone really that can help
instanceof(item, "DrainableComboItem")
What is the fastest way to kill your character in debug mode?
getPlayer():die()
In the console, right?
yeah
Thank you
Saved me a couple extra lines for future 
it was a regression on my side.
I kind of fucked up
I wrote my recipe code so wrong that the game is stuck on the "loading scripts" screen
Actually I think I know the fix
nvm I got it working
Anybody have icons that just change to christmas and disco colors randomly? I'm already having XML errors adding an item to my mod
How can I add a new handler to ISHealthPanel?
oh my fucking god I just made a respawn mod that not only it allows you to instantly respawn. But also gives you back any XP boost from the books you read before dying
No more having to re-read alrady read books on death 🎉
""Only"" took 4 days of debugging to make this work 💀
"This is how you died, but whatever" 
Jokes aside, good job dude! 4 days of debugging is rough
Thank you
Hopefully this will worth the effort for when I release the full "Casualoid" mod.
Does it skip the character creation window, like some respawn mods still have?
Trying to control spawns with sandbox settings, and I've come to the realization that I'll have to do my own file IO
as... it seems like the Distribution Merge happens before sandbox settings are loaded so
someone knew why server is sending damage to my character when im joining the server?
im full health btw no injuries
[08-08-23 03:24:54.936] LOG : General , 1691457894936> 114 259 550> [08-08-23 03:24:54.936][info] Player winnie the pooh shiesty(0) joined to chat server successfully..
[08-08-23 03:24:54.936] LOG : Network , 1691457894936> 114 259 550> [08-08-23 03:24:54.936] > ConnectionManager: [fully-connected] "" connection: guid=4503713775944832 ip=127.0.0.1 steam-id=76561198082268785 access= username="winnie the pooh shiesty" connection-type="UDPRakNet".
[08-08-23 03:24:55.130] LOG : General , 1691457895130> 114 259 744> Missing texture: media/textures/weather/fogwhite.png.
[08-08-23 03:24:55.137] DEBUG: Multiplayer , 1691457895137> 114 259 751> GameServer.receivePlayerDamage > ReceivePlayerDamage: "winnie the pooh shiesty" 100,000000.
[08-08-23 03:24:55.138] DEBUG: Multiplayer , 1691457895138> 114 259 752> GameServer.sendPlayerDamage > SendPlayerDamage: "winnie the pooh shiesty" 100,000000.```
you can use ItemPickerJava.Parse() to re-parse distributions after making your changes post-sandbox settings
I'll try that, sounds a... lot easier than parsing the sandbox settings file for what I wanted
hell yeah
and that shouldn't fuck with other mods, worse case the distributions table would re-parse mulltiple times
it shouldn't interfere, i imagine multiple mods calling it is an waste of loading time but nothing too noticeable or serious
what I think would happen too
How it event work:
Events.OnClothingUpdated.Add(OnClothingUpdated)?
i need something, what can be triggered if i wear and unwear some clothes item
and how to check equiped clothes item?
ehhh...
real tears, well done 👌🏻
looks right, probably just whenever a clothing item is changed in anyway
including damage etc?
Would it be possible to tweak controller config by a mod or something else?
How can I add new npc or animals ?
Thank you for your answer, but alas, I never mastered this matter, I had to score. My knowledge in this area is weak.
Anyone know how to create On Tick event which will proc like 30 times per game minute? Or maybe real minute?
I tried myself, but nothing works.... Sigh
Take your time brother, some days are learning days, and time learning isn't time wasted 👍
You could trigger the ontick event within a less frequent event and then use timers api, I've done this a few times to save performance when I only want an ontick function to run for a second or two, can be very useful
soooooooo
im trying to make a mod that replaces the menu song/songs
mx_menu_the_zombie_threat.wav
mx_menu_the_zombie_threat_mutation_i.wav
mx_menu_the_zombie_threat_mutation_ii.wav
am i right in my guess that those 3 songs are just 3 different ones so not always the same plays?
Will check. Thanks.
@bronze yoke And @mellow frigate . I just tested your trait rebalance mod. Super cool!
It really amazes me how to achieve the same objective we took such different approaches 😮
How it event work:
Events.OnClothingUpdated.Add(OnClothingUpdated)?
i need something, what can be triggered if i wear and unwear some clothes item...
and how to check equiped clothes item?
I made a simple timer, but I don't know how to set it so it doesn't go over the maximum value. For Example I made a countdown from 0 to 1, but the timer goes over 1 and keeps continuing forever. same thing when I setup a countdown from 1 to 0.
Does anyone know what I can do to fix it??
Check this out: #mod_development message
I can't really see the solution here, or maybe there is but I have to rewrite everything from scratch
I was thinking of "if Timer >= 0 and 1 >= Timer then" something like that and will stay at 1 or 0
Based on https://pzwiki.net/wiki/Lua_Events/OnClothingUpdated:
You create a function that is called when this event occurs. The function you create receives the player or character as a parameter, so you can do whatever you want with that inside the function.
You'll probably need to then check the equipped clothes in the character passed to the function in order to implement what you want.
Try checking the pinned messages in #modeling
yep, I know, but i cant check clothes is wear, its not work for me.
stuff like
playerObj:IsWearingClothes("item name")
not work.
I dont know method for check it...
check these:
https://zomboid-javadoc.com/41.65/zombie/characters/IsoGameCharacter.html
https://zomboid-javadoc.com/41.65/zombie/characters/IsoPlayer.html
there are methods like getClothingItem_Back() in both of these classes. Those might be what you are looking for.
Javadoc Project Zomboid Modding API declaration: package: zombie.characters, class: IsoGameCharacter
Javadoc Project Zomboid Modding API declaration: package: zombie.characters, class: IsoPlayer
wow
isWearingNightVisionGoggles
use this verison of the site, that one is old https://projectzomboid.com/modding/
oh thanks!
my brudda, help with it stuff 
Hello there! How is going your modding process?
is bed... is bed i oshibok)
Hello! Very good, I finally made my respawn mod working 🎉
Cool! Did similar stuff when I worked with mods)
Having trouble with the medical system. Do you know if it is possible to add a new handler to ISHealthPanel?
What exactly you want to do with med system?
Just add soap and water as a means to disinfect wounds. From what I gathered, disinfecting only check for alcoholpower in the item. Right now I can use soap by itself to disinfect but I'd like to also require water around or with the player.
As I know it's not easy to add new features to HealthPanel by mods (without overwrite code). You can try overwrite some functions or maybe exist api mod for health panel
Yeah, it doesn't seem easy for a first time modder 💀
I hope b42 gonna fix health updating for object in multiplayer.
I checked this mod (https://steamcommunity.com/sharedfiles/filedetails/?id=2709866494&searchtext=medicine) for some insights, but it does a whole lot. Maybe I'll try something else for a first project.
one way to do this is checking the body location. smth like this:
local item = player:getWornItem("Jacket")
"item" will then contain the clothing item which the player wears on body location "Jacket" (and nil if nothing is worn on the location).
not 100% whether the syntax I used is correct but it should be smth like that...
is there a way to hide a crafting recipe from the right click context menu, but not from the crafting menu?
IsHidden:true?
that also affects the crafting menu
ouf... not... its hide from craft menu
you educate me at least twice a day I swear.. 
@sour island I'm not sure if you've seen my comment on your mod MGRS, but this video shows the preferred behavior that me and my friends, and probably some of those who use your mod, want.
I don't have Github and I don't know how to add mod options (yet), but what I basically did here was comment out line 6 which sets cell grid to true upon opening world map, and inserting self.mapAPI:getBoolean("CellGrid") and in line 36, so it becomes if self.mapAPI:getBoolean("CellGrid") and self.currentGridID then which basically added a check if CellGrid is true.
here's the comment I had
can someone explain for what i can use moddata ?
Data you wanna store over the playthrough to trigger certain functionality based on that either on the client or server side.
Is there a way to give the player XP without triggering the Level up sound?
play a really loud sound at the same time so the player doesn't notice 
LOL
player:playSound("Hooooyeeeee")
Did you do the clothing xml?
Also what model arent you seeing the ground or the one the character
Also for these types of questions
I highly recomend
#modeling
Most modders that are knowledgeable about these stuff are there
Both models? The one on the ground and the one on the character?
m_MaleModel
And female
Should have a suffix
.fbx
Or
.x
Youre missing that
Did you add it on the fieldGuid.xml too?
Then you should
Try and look at clothing mods as reference
Its best you look at a mod that only adds 1 item so that it doesnt overwhelm you
You just need to know what are the files needed
Hello, i'am trying to patch "Take A Bath" mod to work with ra's skin. I have some basic understanding of coding but when stuff get little complicated i'am lost.
Problem:
Ra's skin has implemented workaround for cleaning itself, but it require to use vanilla "wash yourself" function, unfortunatly Bath mod is cleaning player model with: visual:setBlood(part, 0), visual:setDirt(part, 0). So i endup with visual glitch when character is clean in code but has bloodied skin. Until i use vanilla wash yourself button. I taught it will be asy (idiot me) since i taught i can just flip ra's metod or just inject few lines into Bath mod, well here iam 3hours later.
Ra's workaround:
Does the game have a simple dialog with YES/NO options that I can reuse without making a new one?
yep
worldstaticmodel = blablabla _GROUND
but your model id just blablabla, add _ground
path without format
nvm i throw AI on it its working now
Do you remember the name of the file?
ISModalDialog.lua
Thank you
Anyone know of a valid method to set the world map to be openable or not for a specific player?
check item GPS mod https://steamcommunity.com/sharedfiles/filedetails/?id=2877484605 or ask @uncut jasper
Already on this haha, looks like it's accessing the class from "require "ISUI/Maps/ISWorldMap", couldn't find any reference to this within my decompile or the java docs though, I'm sure AuD must of found documentation of some sort 
are you talking about ISWorldMap? it's in Steam\steamapps\common\ProjectZomboid\media\lua\client\ISUI\Maps
i recently studied it a bit to edit Chuck's MGRS
legend thank you
Anybody know from how far away do vehicles have collission?
I would remove the level for energy before you add the action
And then check if you have enough energy
Where do you call it?
does anyone know any mods that add a guy fieri outfit
you'd have to check before you add the timedaction if you are not already doing the same action and not add it to the queue
or hide the option altogether
Action.isValid: if endurance <= min then return false
interesting idea, can we make force field for vehicles?
script change
extents = 10 10 10,
instantly applies to area
my new map doesnt show in the in-game map? any possible reasons? (this is my first mod map, so i am kind of a newbie) ty in advance
Hello, I'm creating a mod on a mask but when I equip the mask that's where all bug.
Video showcase bug :
https://cdn.discordapp.com/attachments/1138637932807331920/1138637933709119499/2023-08-09_03-00-12.mp4
Hello folks! Been a long time
I got a question if someone can help: I'm taking a look at the Zombie Loots to do some changes based on professions. I found a list on the Distributions file with an Outfit Section and loot inside of said outfits.
Now, looking at another file, like the Clothing.XML one, the one that handles the zombie professions and their clothes I think? it has some other ones that aren't listed on the distribution file. The ones not listened, is it because they don't have any special extra loot besides their own clothing?
yes
ok so I'm getting a few people saying they're having issues with my mod but when I test I don't have any issues at all so I was thinking to come here and ask people to test it just to be sure.
here's the link to the mod itself
anyone know what happened to @jab ??
these are the complaints im getting
you'd have to see what other mods they are using to start
ye
he's around.
thats what i was thinking
he's still around, he just stepped away from the pz community
but they're saying its for a world it worked in but didn't work after i simply added 2 songs to the mod
his discord? it shouldn't be
How would I go on about making a start scenario mod?
yea i just found a post from him and noone of his info loaded into his miniprofile
sad 😦 thanks for checking @bronze yoke
I’ve no experience with pz modding but I know lua
that's because he left the server
ohh privacy weird i cant even me3ssage him very sad lol. do anyone fo you have him on friends?
i'm just trying to get in touch with him
i do, what do you need?
developing a chrome extension for kick.com
need his assistance
he's got a different level of knowledge and passion that i need lolol
i'm sure others might be familiar with manifest V3 and javascript/html but i have no idea who knows what and dont really wanna bug many people from pz on it 😄
Thanks!
Would you happen to know where the Zombie Equipped "Gear" is located on the GuidTable? cause like, I know police officers spawn with M9 pistol, others spawn with shotgun and etc, but that ain't located on the Distribution file so its probally on another file somewhere that I can't find
it's a lua file, attachedweapons or something
shared/Definitions/AttachedWeaponDefinitions
When I run this code, the game instantly, crashes, and it also crashes in the demo: https://www.lua.org/cgi-bin/demo
Can anyone explain why?
CasualoidRespawn = {}
CasualoidRespawn.respawnHandlers = {}
function CasualoidRespawn:registerHandler(data)
table.insert(self.respawnHandlers, data);
end
function CasualoidRespawn:init()
local CasualoidPerks = {}
self.registerHandler(CasualoidPerks)
self.registerHandler(CasualoidPostRespawn)
end
CasualoidRespawn:init()
OOOOOOOOOOH YEAH, THAT'S ALL I NEEDED!
Thank you very much
you aren't passing self to registerHandler
it looks for CasualoidPerks.respawnHandlers as that's the first argument
use self:registerHandler not .
Anyone?
Odd I'm using the ISModalRichText and it looks like it's cutting the text whenever it wants O.o
This is my locale file
IG_UI_EN = {
IGUI_KeepProgressModal = "You have saved respawn data. You can choose to recover your saved experience points, or you can ignore this and proceed with a new character.<LINE>If you recover the XP points, you will only gain the XP you earned. The XP recovery won't count free levels from previous occupations or traits.<LINE>You will lose all saved progress if you proceed with a new character."
}
Oh really? I removed the spaces cause I assume it would add random spaces 🤦
is this a thing? what is this lol wth
jab didn't actually know either. looking for someone who knows best practices with manifest V3 doing some javascript stuff
thank you for the responses also
hello everybody! I am looking into making a PZ mod and seek your wisdom and guidance!
I wanna start simple by making a mod that retextures cabinates and fridges and lockers and makes them open up if you interact with them, granted mods like prox inv would conflict with it but o well I think it'd look cool
so my question is, where do I start?
I do grasp the basics of 3d modeling, pixel art, python and c++ if that holds any merit
o also I do know where everything is folder wise like the mods, the game folders, configs etc
tiles are 2d right now. You can find some guide on pzwiki how to make them.
https://pzwiki.net/wiki/New_Tiles
o thanks!
my end goal is to make a middle eastern map with all custom items, traits, vehicles, weapons basically an entire overhaul of the game so every resource you can provide me with is appreciated!
I'm not sure if there is a system for it already but maybe you can combine it with regular doors / windows to get what you want.
do you not think I can just replace the sprite for the containers?
I swear to god I don't think I can make this message more clear, and STILL some brain dead will comment under my mod "aaa mod broken I lost xp when I made a new character aaaaaaaaaa"
ill just learn the spriting and then decide what to do ig thanks
looks good
actually proceed makes me want to click it without reading 🤔
Yeah, I changed it to Ignore and DON'T recover XP
make it red
guys, how to possible trigger Electricity for recipe?
OnTest from function or its can be triggered with some parameter?
i use recipe with OnTest for near object tile, me need trigger Electricity too

isnt it like stuff needs to be in a a room to use electricity?
You could get the player and then building they are in and then get if it has electricity
hmm, not sure...
I mean, generator can do Electricity in area and u can set fridge outside for example
but it main it should be close to what i want...
ye totally forgot about generators
like, your character should be in area working generator or in room with Electricity
this stuff seems relevant to your requirement
Play pz with controller these days, everything
's cool just miss that thing where you drag your mouse so that you can look ahead whatever its called
steam has done some sweet work with controller input stuff, really powerful.
Hello, I'm creating a mod on a mask but when I equip the mask that's where all bug, Someone can help me ?
Please
Ask in #modeling chat
is ModData.request(); trigger some kind of event on server side ?
so i cant catch it
ok thx i got an idea
basically when this event is fired, mod data from server is passed in as args and you can use that to do whatever with the data
hi.
Your towing mod be integrated in 42v?
i check with win merge stuff with towe from last pz version and last worked with better towing pz version and it's stuff different only with one number, but break all your towing mod...
not have skill level to reanimate it's best mod....
Hi. Towing already in vanilla game 🤨
Nah, like Hard towing with model item, rope or metall construction
rope for vanilla method, but with rope model for car from car
and hard towe for model with metall construction
how would i go about replacing vanilla vehicles in the vehicle stories?
OnDisconnect fires after removing from the world isoplayer or before ?
Is it possible to have a clothing item provide insulation for multiple body parts, e.g. torso and head? I've got a jacket that's got a hood, but said hood doesn't provide insulation when put on.
the insulation is based on the blood location iirc
i don't think you can have multiple but there might be one that covers both, or maybe an option to create one that does
Using BloodLocation = Jacket;Head, works like a charm!
oh good!
Uhh.. guys, may I ask..
I have been trying to make a translation for my small trait mod, for CS (Czech) language, but special letters like "Č", "Ř" "Ě" etc are messed up in the mod.
The game's localization works good itself, am I doing something wrong with the text?
Oh, had no clue about that, thank you! I almost thought I messed something up
there's a mod on steam that does it, basically it replaces the vanilla vehicle scripts with other vehicle scripts
while using OnEquipPrimary event, the item that's being passed as inventory item seems to be null each time the event triggers, could there be a reason or just some error on my part?
Item can be nil when it's unequipped.
oki ill try skipping when unequipped
seems to happen on equipping as well
issue seems to have resolved after reloading the save, events are like that i suppose, If you tweak something.
nice! Working passive exosuit!!! Done)
Thanks again)
hey, hello there! does anyone know the mod which allow you to use books newspapers and comics multiply times?
how do i make a start scenario mod
is there maybe a base script that i could use as a base and edit that?
paint it, black
whats the best file option for a clothing?
fbx or just straight up x
the model replaces the vanilla badolier so im unsure
Fbx
if im planning to target this UI for an item to say add a color or some stuff, any ideas where should i get started? the area is marked with green line in this image.
Hello people, I'm new to mods, I wanted to know in which path I should enter my mod folder to activate it in the game, I'm on a Mac
/Users/A/Library/Application Support/Steam/steamapps/workshop/content/108600
or
/Users/A/Zomboid/Workshop
??
anyone know how to fix the invisable bandolier
does anyone know how possible it would be to add new types of randomized house things (like burnt/survivor houses) to other buildings, like making it so other buildings, for example the police station, or stores, have a custom barricaded version.
i havent really messed with modding for pz, so i wanted to know if there were limitations that make this just impossible at the moment before i decide to try to learn how to mod this game
altho im not exactly sure but shouldnt matter with mac, on windows if you wanna test your mod in-game go for /Users/User/Zomboid/mods/YourModFolderHere but if you wanna upload then you use Users/User/Zomboid/Workshop/
the first one is where your downloaded mods go into
invisible? wym
Its invisable on the Playermodel
You would need to put a model in scripts for that, should be defined in staticModel i believe.
Assuming you're working with a mod and it's not a vanilla issue that you are asking about here.
What?
No its replacing the original bondolier model
And everything has the same name as the original variants
ah then im not exactly sure what could be wrong
just make sure you're in the right folder as well(could be an issue)
Stupid question: but did you enable the mod?
Well if you dont enable the mod the model wont be shown
/Users/macUserName/Zomboid/Workshop is the path for mods on mac
I managed to enter my mod and activate it without problems with said route
Hey y'all, I was just able to make public a commissioned mod from a month ago! It isn't able to get onto the recently released workshop page because of that, so I wanted to raise awareness
https://steamcommunity.com/sharedfiles/filedetails/?id=2993616454
SledgeSafe is a small mod that allows the use of sledgehammers in multiplayer without endangering safehouses.
Yea its possible
You use gridload event
But maybe you can use the debug scenarios and just make it mp sync.. idk if this is possible tho
But for sure
https://pzwiki.net/wiki/Lua_Events/LoadGridsquare
LoadGridsquare will work

You dont mess with the vanilla files when youre modding
looking to do some stuff when a player consumes an item, any suggestions?
after a little bit of digging, i realized i may have to override a function call related to eating food. Still not exactly sure how to go around it.
nothing wrong with messing with the vanilla files, it's faster to test things out that way
just make sure to verify when you're done
ill see how it goes
aye it works
if im overriding a function, i should prolly make sure to do stuff that was being done already. Because right now, it seems i might have broken the drainable mechanics after consumption.
if you don't need to change the original behaviour, you can save the original function into a variable and call that as part of your override
sweet, ill get to it. Thanks.
nothing in this script would would make them consumable
pills use a timed action, hardcoded to only be enabled if the item type starts with Pills
is it this one? it's inside a script called ISTakePillAction.lua
yeah
i could try adding Pills to type
you can, but keep in mind that custom behaviour for pills isn't really supported
most medical stuff is hardcoded on the java side
seems to do the trick, i can always trigger custom behaviour through my override functions tho?
at that point i'd just make my own action that derives from takepill to avoid running item checks
but most things you would want to do to the medical system are also hardcoded on the java side, so it might not be as cooperative as you'd expect
when i derive stuff from a script does that mean it'll follow the said script?
hmm so its basically means extends in lua
it's lua's equivalent of class inheritance
id like to trigger an event after a certain interval from consumption, how should i go about this? One of teh ways i could think is using modData and having an event checking if moddata updated every single hour.
Anyone knows a way to prevent player from canceling transition animations?
must suffer
for clothes item's can be param like can't be wet or something else?
must be done almost every time the map updates, lol
although buildings move less often than the decorations inside, so it's safer.
I don't understand fully what is happening, can't he just export this information?
https://twitter.com/lemmy101/status/1689679704574369795?s=20 It is about the NPC development
A while back I did one of these threads, and since we're missing Thursdoid today I thought I'd do another one with an update on build 43+ NPCs. More 'meta' simulation stuff (meta as in 'outside of', not stupid Zuck metaverse the word is known for now) a thread:
didn't notice the name before
Hello. Is there a guide to make sanbox-options.txt for my mod?
im using this method, expecting Perk object as return type but it gives back just a string (name of skill).
https://imgur.com/s1pdFhv
Leaper Dragdown Death Animation WIP
Any one know how to give a perk after magazine use?
anyone familiar with setting skill levels? is this good to use?
can use something like character:LevelPerk(Perks.Name)
wait this one only levels up the perk to a single level
Is it correct?
Autospawnchance.lua
local sandbox = SandboxVars.ATSS local VehicleZoneDistribution.parkingstall.vehicles["Base.AMC_bmw_classic"] = {index = -1, spawnChance = 1 * sandbox.ATSS_AMC_bmw_classic_parkingstall_spawn};
sandbox-options.txt
`option ATSS.VehicleZoneDistribution.parkingstall.vehicles["Base.AMC_bmw_classic"]{
page = ATSS,
translation = ATSS_AMC_bmw_classic_parkingstall_spawn,
type = integer, min = 0, max = 100, default = 3,
}`
tried this one but changes do not reflect in-game.
dang
I still can't figure out
I'm studying one mod that I wanna tweak. And I can see how trait is created, I can see how mod checks for if trait there
but I can't find any way to dive trait through magazine reading. Only recipes
why dont you check if character has read a certain mag and then trigger your function
any info on how to do that?
use one of those events everymin or everyhour, check if character has read a mag. If yes do stuff
this is how i used to check in my mod
it returns true/false if your character knows a recipe, as for recipe you can set up your mag so it gives yoiu recipe after being read by your character.
should I define this recipe anywhere? Or it's just any random keyword, that I can check in lua?
definied in my custom mag, its a random keyword from what ik. Whatever you set here will be recognized as recipe. and then you can use the method i mentioned earlier.
ight
will try it out
BIG thanks 
lf for ways to reset perk, if there's none ill stick to LoseLevel and a loop to reset level.
character:level0(PerkFactory.Perk perk)
you wanna add trait after reading magazines?
you can add a check to ISReadABookAction.perform if it's your item then add the trait
thanks, this will reset to 0. Is there anything else to do a certain level?
character:getXp():setXPToLevel(PerkFactory.Perk key, int perkLevel)
character:setPerkLevelDebug(PerkFactory.Perk perks, int level)
```i think
sweet, i think i tried the first one. Ill retry and checkout the other one as well.
both at the same time
Whats the difference between the debug and the nondebug version?
the difference is there isn't a non-debug version
So non debug calls the debug one?
interesting, thats prolly why it wasnt working.
what non-debug?
great, it works.
hello.
do u know parameter for remove sprint or run function from player?
I'm noob and i'm really need help...
ahhh... nope
Hey guys, does anyone know if one can somehow pause the healing of a scratch or any other wound when its bandaged ?
i mean, I need func
func do some stuff like:
PlayerObj():setCanSprint(false)
something like that.
but i dont know exist this parameter or not 
okey, it's work in one side.
second function should do standart param, and setAllowSprint true work wrong. Char move only with sprint, not walk etc
i remember finding it buggy
lf a method to add a certain amount of xp to whatever you already have in any perk, this one seems deprecated.
getPlayer():getXp():AddXP
thank you, ill check it out.
that is, the working script for disabling or enabling the sprint cannot be implemented?
did you weight paint and export the model with the rig?
It works, i was going through chat and saw one of your texts about pulling skill by name could be an issue due to translations, is there a workaround?
Hello guys, I'm still learning about programming mods. I've managed to create an item and successfully add it to the game, but I haven't been able to find a solution to make this box give me the option to open box when I right-click on it.
Does anyone know how to add this? So that in the right-click menu, the option of open box appears?
You would need to add recipe for this
something like this
this in my .txt item?
ye it goes into your scripts
Still nothing. u.u
At the moment, the structure of my mod folders looks like this, as simple as possible as I learn.
dont think you need to put the script in items folder, i didnt need to. Also have you tried to wrap this script inside module YourModule{}?
also no need to complicate the structure for now, since you're just testing stuff atm. So all this Contents, workshop stuff is unnecessary.
That's a good approach, keeping it minimal and necessary. I don't have the Lua folders yet since I have no idea what to do or how to do it. I'm slowly building the rest.
you need one main/parent folder, it will contain your media folder, mod.info and poster file.
after that your media folder will contain all the other folders like scirpts, sounds, lua etc
All of this is already set up.
is a simple mod, add a one item box
now just wanna add Open box and add an item to inventory
=2,
didnt see the little devil
For now, I'm not very concerned about achieving all the functions. I just want to, without fail, add the option open box to the right-click menu.
did it not work? have you tried what poltergeist suggested?
If clicking on open box triggers the opening process and it disappears, even if it doesn't generate an item, it's an achievement for me.
I don't think it would fix it
ye i understand that part, but that structure had me confused. It's hard to debug when you have so much stuff to look at.
also does having a line of space after "ingredients" in recipe a thing?
I have many more plans, hahaha.
but for now.. just open the box menu options xD
it has no practical use
if u edit script - u should exit in main menu, swap mod.
Ingame debug options reset only lua, not script
and "," in Result:Avocado
I would prefer to ignore the results and at least achieve getting the option to open the box.
out of curiosity what does the tooltip show?
How do I add the option to open it here, like it exists for other items?
this?
it's work like recipes in craft menu
ah you changed it
other same boxed items has recipe.
If ur char know recipe and u has item in Inventory and click on it rmb then context menu add string from recipe
it something like workaround
not main functional to open box, just recipe
Adding so many variables sounds complicated. Can't it be simpler? Like the nail box that just opens and gives nails, or the ammo boxes?
Remove the tooltip line for now from your item script
And restart your save
Also would recommend putting the scripts into scripts folder
Looking at the code for the nail box, it seems that I first add the items to be given in the "items" section, and the box would be in the "new items" section.
nail box and ammo box openned from recipes
its all recipes
its not func
Yea
Okay, so what I imagined was a "function" in PZ is actually a recipe, right?
for open box for vanilla items in box - yep
one q
u want add random drop for your "open box" ?
In the future, yes. For now, I just want it to be a box with the option to open it, and once opened, it disappears from the inventory – meaning it's consumed upon opening. I'll think about everything else later.
u can do it with param:
First:
RemoveResultItem:true
-in craft menu u see items what u get after craft, u can add dummy items in script with icon and name "Just open me" and set it in result.
second:
OnCreate:YourLuaFunction
and do func with add stuff some items in Inventory
Let's see how it goes. hahaha
yep, standart recipe, but its just workaround)
how to add clothing to zombie npcs
wear preset?
yep... but its look old style
just
table.insert(ZombiesZoneDefinition.Default,{name = "Yourname", chance = 1});```

without line 3 and 7
nothing u.u
nope bro
its for recipe param
not for item
u should
result:DummyBox,
RemoveResultItem etc
nothing
for u:
{
BoxTest,
Result:DummyBox,
removeResult:true,
Sound:PutItemInBag,
OnCreate:myfunc,
Time:5.0,
}```
add dummy box back into script
like item
ops, sorry
removeResult:true,
??
Heyo chat
can someone explain in VERY broad strokes what files and where I need to add world model to my item?
cuz from what I found I need to put model into:
media/models_X/WorldItems/MyModel.fbx
media/textures/WorldItems/MyModel.png
then maybe create model entry in some .txt file somewhere, so that I could write WorldStaticModel = MyModel in my mymod_items.txt
the Perks.Whatever method is fine, it's using Perk.FromName that's bad
models go into models_X yes, then you define em in your model script.
where should model script go? can't seem to find anything looking like it in ProjectZomboid media folder
since its not exactly lua, there's no way to get length of your tables right? gotta iterate over em?
all the scripts go into scripts folder
in vanilla folder, try to find model script
would that work with kahlua?
ight will look into it thx
Yea should be
aight, ill see how it goes.
With java arrays its mylist:size()
wait, isnt just # enough for the length? like i need this len function as well
dont remember, theres a couple of pinned texts in #modeling related to that stuff, i just know about icons need to be 32x32 and if you're not sure then try to find simliar texture in vanilla and keep it around that size.
No that was just to clarify what it means
ah got it
delete next strings from item boxtest:
-result
-resultcount
-removeresult
-OnCreate
another look fine
🥳
And
hmm but strange for DummyBox get Into inv
not should be
try find string in vanilla pz from recipes on removeresult
Maybe im wrong with register
Correct, your process seems to be on the right track:
- Create an item (e.g., "item_box").
- Create a second linked item (e.g., "item_dummy").
- Create a recipe (e.g., "recipe_open_box").
- Write a Lua file with the function to open the item.
Nah, u not need remove TestBox in lua, its should be removed from param RemoveResult:true from recipes
for param OnCreate:OpenBoxTest
it's trigger your OpenBoxTest func after complete recipe (5 unit of time)
yep, u can, but i cant understand why it's not work in your... situation
dummy item - it's for craft menu, open craft menu and find your recipe.
that has string with result
dummy item just workaround for fine view of recipe in craft menu
Is it necessary that everything is in the same item file? To have more order, I would like to have a file for the items and another for the recipes, is that possible?
yes
yep
ohh nice :D
On scrips/items: one file for items and one file for recipes same Module Mymod and same import Base
example of dummy item:
Maintence Of Body Armor - its dummy item with Display name and icon
https://steamcommunity.com/sharedfiles/filedetails/?id=3012449873
u can found stuff from this mod for recipes and OnCreate lua func
i go sleep
goodluck
I hope adding in mp3s is easy, but I want to mod the Death Music to play the theme of the walking dead
it does work btw, figured id let you know.
tables are so simple and yet confusing at the same time
Is this the right way to initialize values for undeclared keys in table, myTable.undeclaredKey=myTable.undeclaredKey or {}
how do you replace sound files?
is it possible to hook the :perform() part of a timed action the normal way you'd hook other functions or would that not work
checkout media/sounds folder in vanilla files, you can either replace sounds or tweak script where sound is declared. But im not sure how bank files work there.
yep!
thenks
Soo im trying to hook into a timed action perform method as follows:
if getActivatedMods():contains("Amputation") then
local old_ISCutLimb_perform = ISCutLimb.perform;
function ISCutLimb:perform(...)
old_ISCutLimb_perform(self, ...) -- Call the original function
print("This works!")
end
end```
This gives an exception,
``ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: perform of non-table: null at KahluaThread.tableget line:1689.``
I assume something is wrong with the way I am trying to access the method, not sure what though
is ISCutLImb from a mod?
probably actually considering the getActivatedMods check
require the file the function is defined in, your file is loading before it
you should always do this when working with other mods, otherwise even if it loads correctly in your tests, servers which have to manually set load order will have a lot of problems
e.g. if the file is client/MyMod/ISCutLimb.lua add require "MyMod/ISCutLimb" to the start of your file
Yup, this was indeed the issue, thanks so much!
For the .txt and .info files, can you add spaces to the names?
i feel like im doing something wrong here, inteded to restore the extra bit of xp but ended up adding more xp as end result.
wym ?
like will something not work if for example, title=My Zomboid Mod
you can give it a try, i usually dont leave space. If there's trouble loading mod after change then uk for sure.
is there any way to directly change a firearm's penetration ability
trying to give snipers a strong penetration functionality in my weapon modpack and wondering if that's even possible
Can anyone give me a hand?
I trying to inject in ISTakePillAction:perform() and seems like everything works fine.
Even print command working in right place.
But... when I trying to add ModData to it... it does not synch with ModData itself.
For example I have function which adds +1 to getModData().AlchoDrunkiness every one min when character Drunkenness > 0
In ISTakePillAction:perform()
I have string which sets getModData().AlchoDrunkiness = 0
and that's not working because it says that getModData().AlchoDrunkiness = nil
lol what are the odds, working on same function
🤨
can you explain a bit more, modData is not synced? have you tried using logger and setting break points, its an easy way to catch objects and read value on teh go
also one more thing, if a table isnt declared in lua for ex: myTable.someVal=val it will fail if myTable isnt initialized, so before setting a key make sure table is initialized.
ok i see
that's where the problem
I just has
local oldISTakePillAction_perform = ISTakePillAction.perform
but i need this
SOISTakePillAction.ISTakePillAction = {}
SOISTakePillAction.ISTakePillAction.perform = ISTakePillAction.perform```
if I get right
maybe... im not sure. sigh
naaa not working
i don't think that's what you need but idk exactly what you're working with, hopefully someone else responds.
i just need to sync mod data from different lua files
syncing is a concept for client-server tho, if you're on either one of this when you do getModData() it's not just a variable, it's sort of a pointer. What this means? Basically whatever you do to this getModData() it's automatically updated on client or server side respectively.
drop code
why is it giving me an error for no preview.png even though I have it inside the folder
i think its should be something like
PlayerObj():GetModData():YourCustomParam
send like text in ```
use something like pastebin dot com
So error when you add +1? Maybe param in modData not init before add?
i have this if player:HasTrait("SOAlcoholic") then if player:getModData().SODrunkinessFatigue == nil then player:getModData().SODrunkinessFatigue = 0; end if player:getModData().SOAlcoholActive == nil then player:getModData().SOAlcoholActive = 0; end end
main creation methods
so well... default values are = 0
when this code calls?
what problem then?
even function SOalcoholicfatiguerecover() working fine
but when i tryin to reset it with SOISTakePillAction it not working. but say string working
there full code
if self.item:getType() == "PillsSleepingTablets" then
player:getModData().SOAlcoholActive = 0 - this one NOT working
player:getModData().SODrunkinessFatigue = 0 - this one NOT working
player:Say("Sleepin?"); - this one working
end
I think this works, but this code reverts param back to 1
try print SOAlcoholActive in Say function:
player:Say("Sleepin? " .. player:getModData().SOAlcoholActive)
but then its back to
this
player:getStats():getDrunkenness() still > 0.01, so it sets to 1 again
hi!
how to disable sprint/run function to specific player?
As idea - every tick disable run/sprint by set param
yep, but what param should i use
some stuff i worked for a mod
setAllowRun and setAllowSprint must work. What problem?
i remember when i was testing with it would sometimes force you to sprint
when it false - its work, player cant run or sprint.
but after time for example i need do reset to default.
Its should be true - but player move only with sprint/run, not walk
or its param can be nil?
must be boolean. hmm
if im not wrong, for zombies exist param in moddata like CanSprint
not sure work it or exist for player
is there a way to tweak hunger or thirst for characters? i do see get multiplier methods but not much around tweaking em.
You can try also add this code after setAllow###:
player:setVariable("sprint", false)
player:setVariable("run", false)
thanks
i will try to do that after one hour 😆
hmm...
Chuck has mod for calorie burning.
I think u can use its method for hook it
when u get player thrist, do something with it, set player thrist
and for hunger
actually i might have an idea around it, i think i can just get the change between two instances of hunger and set hunger to 2x of that.
try my StatsAPI
it's not possible directly without reimplementing a LOT of stuff, the change between two frames can be used though
actually i forgot i don't have non-trait multipliers in right now 😅
if you're working on a trait it'll help but otherwise actually not useful right now
oh, no worries. Ill try something different, maybe trigger a function that finds a current rate of change per hour or something and then just change hunger at everyhour 2x of that.
figured out how to make entertaining books and magazines reusable, with a cooldown for re-reading.
But what's the point if it's to be realised in build 42...
B42 isn't gonna be here anytime soon
sad but true...
hmm. need add it to notebook, my be do it in free time
so many plans, so many plans...
named literature already does that doesn't it
rly?
Well, I do not claim to be a new invention
and can't check all mods xD
Proud of this community of modders...
God...
You guys are just turning the game into a dream that I saw and wanted 15 years ago...
But something went wrong... And I didn't get into gamedev... And I'm not a good programmer...
hah, Chuck :D
I'm not even surprised hahaha
success
nope, not work
iam trying to get grasp of LUA and zomboid api so i can later maybe create some of my own mods. I encounter a issue tho i want to create recipe that will result in diferent item based on character gender. I come up with this , but it seems taht game only create placeholder item after function testfunctionrecipe is finished, resulting in error. Anybody villing to help or share your metods of removing placeholder items from player inventory?
Single player?
yep
for the recipe
#mod_development message
Here are some links with resources to get familiar with making mods for Project Zomboid.
https://pzwiki.net/wiki/Modding
https://github.com/FWolfe/Zomboid-Modding-Guide
nice thank you <3
jsut a detail its not
RemoveResult:true
but
RemoveResultItem:true
anyone can locate a sound file of a male player being dragged down/screaming? i need it for funny purposes
this is the closest thing i could find related to that sound
The sounds are in the fmmod sound banks
is it something in debug mode preventing or messing with thirst values? Im trying to get rate of thirst but for some reasons i keep getting same value for thirst.
Did you disable god mode? Try adding temperature to yourself to see the value
only have these enabled atm
thing is i do get the correct vals for hunger, but not thirst.
Maybe try removing the ghost mode?
Also i think in the debug panel for character it shows the current thirst
ofc its the ghost mode
i have been looking through everything lol
lesson of the day, ghostMode will make your thirst value constant.
there's one more thing left to work on, right now i have this function right hungerRate, it's job is to get two hunger values at two consecutive hours and then update the change variable(which is basically next-prev). Which it does pretty good for the most part, but there was an edge case, for ex: lets say these two hunger values are prev and next, so if the character consumes something the next becomes lower than the prev which then makes the change negative. For now i just made it so if the value is negative, drop all the values and recalculate, but im wondering is there a better logic to handle it? maybe just take the abs value or something like that? Not sure if im jumping a case or two with that.
Yeah, it adds rereadability- with diminishing uses and a cool down - all customizable in sandbox. Also randomized names and visuals -- which is also coming to b42 as I understand.
The visuals and names - I don't think they're implementing diminishing returns on rereads
Can't really take credit either - it's probably something on their to-do for ages lol
They probably got tired of the "I ate book" jokes.
is there anyway to copy vertex groups (all of them at once) via 2 open instances of blender?
??
✌️
Hello! I'm wondering if there's anyone I could ask about the way fall damage works in Project Zomboid? Currently trying to help develop a mod that reduces fall damage.
every frame you're falling a falltime counter ticks up, when you stop falling you take damage proportional to your falltime
Is it possible to make changeble spawn chance with sandbox?
like spawnChance = 1 * SandboxVars.Myvars?
yes, you need to move the sandbox ones into an OnInitGlobalModData event handler and call ItemPickerJava.Parse() at the end
anyone knows some reasons why my clothing item could be invisable?
quick question, do you guys think it's reasonable that your food and water bars reach max within 6 hrs if you could get max skill in any one of abilities for a day? Normally it takes roughly 36 hrs i believe(without any traits or movements).
might be too rough if you add movements, debuffs and other stuff
is that 3 hours with high thirst? 
ye i realised it's too much lol
imma try to find a decent rate of increase, im not event considering other variables atm .
at 6 hours wouldn't you die if you went to sleep
actually probably not
thirst increases 8x slower while sleeping
that might balance out your rates during combat and stuff, but still id like to find a decent challenge.
the problem is water is quite easy to come by and autodrink makes it not even something you need to manage
Yes I'm thinking to have somewhat variable rate of increase maybe, like water goes up a bit quicker.
Now with changes the hunger/water peak is reached at roughly 8 hrs.
I think that's reasonable
im running into a bit of trouble, so i have earlier xp and skill level stored somewhere that way i can reset those back to normal vals in 24 hrs. But when the reset happens i get 1 extra level and more than what i had earlier in terms of xp as well.
this is mainly responsible for resetting levels back to earlier ones
where are you getting previousXp?
internally, xp is cumulative, it doesn't actually reset to zero each level (which is why you need to set xp when you set level) - if you're just adding back what xp they had before, you're adding the xp for their previous level *and* all of the xp they had, including the xp for that level
here
oh so im adding xp on top of levels
yeah, so then basically you're adding the xp for their current level twice - i think just using the AddXP call would be enough? it should handle all the levels and stuff, i think you need to pass some extra arguments to disable the multipliers and stuff applied to AddXP (and if it's for strength and fitness, they have some nutrition multipliers you can't disable)
im assuming setXpToLevel basically calculates remaining xp after you set certain level then
it sets the xp to the amount of xp you would need to reach that level
alr ill just try with add xp stuff and see how it goes
hmm this works
i'm not sure that i'm making it well, cause i'm having a game crush(
oh sorry, i thought you were talking about items - no idea how to do this with cars, it's probably similar but ItemPickerJava wouldn't be involved
Debug throws an null error on empty "auto_tsar_ss" table(
you can't have functions inside the options file, it isn't lua - so it's failing to parse it and your options aren't being created
the event handlers and ItemPickerJava call are used in the lua file that adds the items to distributions, since the options aren't actually set when lua first executes and reads the options
i thought coding in project zomboid would be easier
It looks like you can change the lua tables on the OnInitGlobalModData as albion mentioned, no extra recalculations needed. Just do it in a lua file, not the sandbox-options.txt.
Might need to make sure the total for a zone should always be 100.
I've took spawnlists from Auto Tsar Atelier mods. And made own sanbox by guide from https://github.com/demiurgeQuantified/PZModdingGuides/blob/main/guides/SandboxOptions.md .
I can make things to show on sanbox settings ingame, but cant make the change for the spawn(
I will try that. But i dont know how to make total for a zone like 100, cause every other mod has it's own spawnchance
It doesn't seem to be true anymore. Looks like that comment in distribution file is old.
is this not the way to do it? debugger stopped on this line.
ZombRandFloat takes a min and max
not just one argument
is the max value inclusive?
probably
it wouldn't really matter, the chance of getting exactly the max value is miniscule anyway
oki oki, btw any pointers for handling odds? Even with the numbers in 1-1.5 still managed to roll 3 capsules in the 2nd medical building cabinet in the same container. Tried checking with lootzed, says 3-7% for diff ones.
i was hoping to avoid this and use the vanilla texture but finally managed to have one for each pill.
Handling odds?
You shouldn't need to use use float tbh - the number is arbitrary when you can determine the max - but what kind of behavior are you looking for?
Earlier i was adding each pill to each location, that spiked the odds of more pills in one counter. So now im deciding to use ZombRand to pull a random pill for each room/building entry so that one room would only have one type of spawn randomly and then i wann randomise the odds value as well using ZombRandFloat b/w 0-1.5
basically i'd like to have a decent spawn chance on the rare side and avoid spawning mulitple instances of same Pill or diff in same building.
should i scale it down further?
Bertie Bott's Every Flavour Beans
seems like too rough, btw anyone knows how to get an icon along with item name. Its not issue with inventory or bags just the itemlist.
added part block if anybody want to double check it
https://pzwiki.net/wiki/Scripts_guide/Vehicle_Script_Guide#Part_block
somebody has a patch probably but you can use this to patch it yourself if you want
#mod_development message
so like i have to call it manually ?
copy vanilla file and change the line, simplest way. Don't release anything like that though.
also simple and not recommended to release
local getTexture = getTexture
_G.getTexture = function(...)
return getTexture(...) or Texture.trygetTexture(...)
end
There are other more efficient inceptions .
i don't understand, release as in i shouldnt do it in my mod or upload a mod using this?
It's fine if there's no alternatives, from User's Perspective they i don't think it will a huge problem.
uploading full vanilla files is a bad practice and can break other mods and vanilla after it updates. Not to mention uploading other's work.
ah ye that's too much responsibility from files perspective, so many variables that you have no clue about.
does anyone know where i can get files that make up the core gunplay
https://steamcommunity.com/sharedfiles/filedetails/?id=3019317764 Hope it's cool to share here, initial release is up😄 .
How to make a piece of clothing not get wet without increasing the moisture resistance parameter?
Is there any param for it?
Idea for a mod trait - Alzheimers: +20 trait points, you gradually lose xp in all non physical skills. Cannot level a learned trait beyond level 4.
Better if this trait would randomly delete stuff from ur inventory. Or move items at ur base to random places. Or teleport you to different places with a bit of time skip to simulate confusion of how u get there. In addition it also may change parts of your gear to something random
hello,
I like to know if there is a way to better handle NPCs/IsoPlayer objects that are on an unloaded square.
The Error message (reported by the modder/user 'EYO-07')
ERROR: General , 1691860982583> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "zombie.iso.IsoGridSquare.isInARoom()"
because the return value of "zombie.characters.IsoGameCharacter.getCurrentSquare()" is null at BodyDamage.UpdateBoredom line:1829.
Video of said error (provided by the modder/user 'EYO-07')
https://www.youtube.com/watch?v=MZQ33P8e4Ac&feature=youtu.be
Full Details at the github
https://github.com/shadowhunter100/PZNS/issues/34
Thanks!
I think for NPC in unloaded ares need write simulation system
Hi, i don’t know if it’s the right channel to ask but is there a standalone mod that allows to make roof and wall with angle ? Like a normal house
And also one allowing to build with logs instead of usual planks
Thank you !
Hello
How to make custom sandbox settings to load on game start and server restart?
with function OnInitGlobalModData(isNewGame)
it loads only on new game(
what about OnServerStarted and OnGameStart?
How to make them both to work? For solo and Host?
im confused, can you brief about your goal with this?
I'm trying to make sandbox options for car spawnchance.
It works now with local function OnInitGlobalModData(isNewGame) on new game
But i want it to work with solo and host, to load variables on game start/server start
sorry might not be of much help with details, but would recommend OnGameStart first see if it works with solo first then try hosting the game and repeat.
i used die method on character, it does the trick but quits to main screen, is there a better way to do it or something else?
that doesn't sound right
if you post it as text instead of pictures I could help you
I've made some changes.
This works on solo, with mod https://steamcommunity.com/sharedfiles/filedetails/?id=2670674997 my changes works after reloading solo game.
I cant understand how to make it work with host. Even i dont see sandbox settings in host menu
Even i dont see sandbox settings in host menu
are the mods enabled in main menu?
to change sandbox in-game on host, use setAdmin() so that to get access to admin settings.
Hi, is there a way to make clothes change depending on the skin color? I'm doing some body mods to the game (as clothing) but can't see how
was trying out a way to kill your characters, came across these two methods. Both work fine except, debugger pops up after trigger and then right after character's death. It jumps straight to main menu, which doesn't seem right. Should be able to choose new character after death.
it might be breaking because the player needs to be alive during code that happens after OnEquip is fired
what are some reasons why my clothing mod is invisable?
or what are some of the common reasons why clothing items are invisable?
This in addition to the above post would be a fun playthrough. I'd also add maybe randomly a skill would level up several times and last for a few hours in game as well. Like randomly your carpentry would go from 1 to 6 and then back down to 1 or 2 again and resume xp decreases to simulate the Alzheimer's fog lifting for a moment before smacking you down again
can't seem to figure this one out, it says object is calling nil each time this function is triggered.
could it be because im calling it inside an function which is overriding a timed action function
call nil means what you have before () is nil.
reload by exiting to main menu and if you need a local function declare it before you need it.
by local function you mean kill function? I declared it at the top of the my lua file. Then im calling it inside my override function for ISTakePillAction:perform
😅
think i'll avoid that.
Well, the other issue that has been reported is, well, NPC IsoPlayer object appearing as invisible with no collision.
https://www.youtube.com/watch?v=Zin9gAag0HQ&feature=youtu.be
B41 - PZNS - (Project Zomboid NPC Spawner) Mod Framework preview
NPCs spawned without a visible model/sprite and has no collision... still attacks zombies though!
System Info (MSI GE76 Raider)
i7-10750H
32GB Ram
RTX 3070m
Probably gonna need another rewrite in B42, this is mostly for my own learning experience with lua.
Support me (and feed ...
is that the so-called ghost mode?
Kill
wow, thanks ill retry.
still no luck, throwing the same errors. I can see there's character obj but idk what's messing it up.
ok had to load up again
it's weird like that
works now
Just out of curiosity, would it be possible for me to pay someone to make and model a sign into the map like on the highway that says welcome to Kentucky? idk how to do and im to lazy to figure it out.
Hello everyone, I'm looking for help to develop my mod "Voiced Radios and TVs". I need people to help direct and record Voice lines for my mod. You don't need any programming knowledge. I'll leave a link to my mod if you are interested: https://steamcommunity.com/sharedfiles/filedetails/?id=2950750587
The discord link to help develop the mod is in the description.
not a mod developer but I was wondering if its possible to create a function within the sandbox settings to randomize all parameters for a somewhat unique playthrough each play?
somewhat mod dev related
i made a tool that will pull all your mods and count your total subscribers
pretty neat
wanted to give a quick shoutout to @storm pecan for being so generous and providing these much more better textures than the earlier ones😄
i have a quick question regarding mod updates, im just updating new textures and adding this new item along with update in distribution file. Is is safe for existing users? what should i keep in mind for future updates.
the main thing is to never delete files
Hey all, hope everyone is having a chill time being productive.
Quick question.
Is it possible to limit the amount of traits a user can pick?
can somebody help me with my modding issue im a noob and i just cant seem to find a way to access my mod in my item directory in zomboid (pls ping me iyk the issue)
what if i replace those files with same names? also if i say tweak the spawn rates later on will that be a problem or just new spawn rates will be applied at locations that weren't visited before change.
you are supposed to paste the mod folder inside Users/User/ProjectZomboid/mods/ when you're testing/working on mod, for uploads it's workshop folder.
If im uploading the mod i put it in the mods folder but if im testing and updating it i keep it in workshop correct?
for uploading Users/User/ProjectZomboid/Workshop/, for testing/development Users/User/ProjectZomboid/mods
add them to quick access menu or something, will be much more efficient
Ok my problem is that it is in workshop but it doesnt show up…
are you uploading the mod? or just working on it?
Im done with it i just need to upload it
oki, for uploads you need to have a certain structure.
What structure
it's a bit complicated, but open the workshop folder(the one i mentioned not the one where you copied your mod folder), make a new folder name it as your mod.
That part is done
Do you have like a Content folder inside top folder?
changing spawnrates is fine
if it's the same name, it's the same file as far as steam is aware
the issue is that servers won't delete removed files, they only add new files and change changed files - so if your update removes a file, the server won't remove it, and the checksum will fail for all clients
well then it's not done, for uploading it's a diff structure. You can refer to Users/User/ProjectZomboid/Workshop/ModTemplate folder for structure.
Ah ok it seemed to work for other people ig not mine
that's a nightmare, then i would need to change all the instances where the old file was used?
You might be confusing it with something else, even after you do the structure and copy your mod folder. YOu still need to launch game, open Workshop and upload from there. Takes a couple of minutes to upload then you're done.
yeah thats the easy part its just i look at other people's mods and they all look the same and it works when i tested my mod but i just cant upload
in most you just need to make the file empty instead of removing it and it'll be fine
i can't wait to remove all my loose files when b42 breaks everything anyway
that does not sound right
, just waiting for B42 to clean up the mess and then you're stuck again.
I suppose for major updates you could always do a version 2 to smooth the transition and give some time before removing the old one.
still doesnt show up after doing the same format
can you show us the complete folder structure? also where are you expecting the mod to show up?