#mod_development

1 messages · Page 188 of 1

gilded hawk
#
module LLTDrinks 
#

You need the { and } between your items

short zinc
gilded hawk
#

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,
    }
}
gilded hawk
short zinc
#

it seams to work now thank you for you help

gilded hawk
#

You are welcome, good luck!

short zinc
#

thank you

plush sky
#

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,
}
gilded hawk
# plush sky Hi guys, I am trying to adjust vitamin, make it able to gain some endurance but ...

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,
    }
plush sky
#

Oh so I should make it a Food Type instead?

#

I will try that, thanks a lot!

mellow frigate
#

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 ?

still ledge
#

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.

short zinc
fast galleon
short zinc
#

Hello can someone link a good tutorial on how to setups items to spawn ingame

gilded hawk
#

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 😦

gilded hawk
#

Alright, how can I get a IsoGameCharacter ? getPlayer() seems to return something different

mellow frigate
short zinc
#

Bro my game crashed again for no reason idk what i broke

gilded hawk
bronze yoke
#

isogamecharacter is an abstract class, you can never get an instance of it

gilded hawk
#

Oh my fking god 😦

bronze yoke
#

iirc inherited fields are just a limitation of the weird field api

bronze yoke
#

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

mellow frigate
#

?! you can access the public fields no problem whatever the inheritance layer

bronze yoke
#

when you loop through getClassField you won't find fields from parent classes

mellow frigate
#

damnit I missed that

gilded hawk
#

Does anyone of you know a way to reliably get the knownMediaLines from the player?

bronze yoke
#

what do you need it for?

gilded hawk
#

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

bronze yoke
#

loop through the entire line list and do isKnownMediaLine for every single one drunk

gilded hawk
#

Dear god 😅

#

Fine I guess, how can i get the entire list?

bronze yoke
#

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

gilded hawk
#

Alright, how can I get the full list of media lines?

bronze yoke
#

they're all in a RecordedMedia table iirc

gilded hawk
#

Okay thank you

gilded hawk
#

FUCK YEAH!

#

I don't even need check all the recorded media 😎

#

I'm hijacking the function that adds the XP via VHS

bronze yoke
#

i was thinking about that but it won't work if the mod is added midsave

gilded hawk
#

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 😦

gilded hawk
bronze yoke
#

yeah

gilded hawk
#

Do I just have to put all flags to false?

bronze yoke
#

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)```
sick hamlet
#

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.

lethal phoenix
trail lotus
#

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 💀🥸🥸

gilded hawk
# bronze yoke there's a boolean in one of the calls that dictates whether it'll call the event...

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
verbal yew
#

who can support with injection into function.
just for not rewrite all function for maximal compatibility?

bronze yoke
#

you can't really inject into the middle

verbal yew
grave lion
#

What language do I need to learn to make mods for this game? What IDE should I learn to use?

bronze yoke
#

pz mods use lua, the most popular ide is definitely vscode but intellij works too if you're more used to jetbrains

grave lion
bronze yoke
#

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

grave lion
#

So learn lua with vscode? Alright thanks man I appreciate it!

nova socket
#

Did anyone hear if NPC will be compatible with MP in B42?

cosmic moon
# grave lion So learn lua with vscode? Alright thanks man I appreciate it!

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!

bronze yoke
nova socket
bronze yoke
#

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

nova socket
nova socket
#
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.

jaunty marten
#

if player will end action before it will be done => perform won't be called

#

use stop instead perform to stop sounds

nova socket
storm pecan
#

Does anyone know how to change Player speed in particular animation state? For example make walking in trees faster?

cosmic moon
storm pecan
#

Sounds doable
Thx for the tip spiffo

mellow frigate
#

you can also create other files under media\AnimSets\player\movement with specific conditions and other source for speed.

storm pecan
#

@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

mellow frigate
#

also once you added or removed xml files, restart your game 😄

storm pecan
#

yep yep
I restart every time I make change

mellow frigate
#

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).

storm pecan
#

btw do you know what exactly <m_SpeedScale> in AnimSet controls? Only animations speed or movement speed to?

cosmic arrow
#

@mellow frigate i think you accidentally put Mysterious Stranger's UI_EN.txt in your Balance Trait mod

cosmic arrow
#

if not, then by the time i can study and make a mod, can i have permission to use your Balance Trait mod code?

cosmic arrow
#

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.

cosmic arrow
mellow frigate
#

yes it is fine. no limit that I am aware of.

cosmic arrow
#

what happens if a trait cost is set to 0

mellow frigate
#

not tested, it may send you to hell because 0 is specific to profession traits in vanilla

cosmic arrow
mellow frigate
#

but not sure 😄

cosmic arrow
#

alright i guess i'll test that too

mellow frigate
#

I tested reverse and it worked

cosmic arrow
#

pretty curious

cosmic arrow
#

did it become a negative trait?

#

or just stayed positive trait with positive cost

mellow frigate
#

remained in the same box, changed color, changed value

cosmic arrow
#

alright, huge thanks really, gonna test it out later and tell you if i spot anything wrong, otherwise i'll give out another award

storm pecan
#

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)

mellow frigate
storm pecan
#

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)

mellow frigate
#

in your screenshot, it is overriden by the turning animation that leads to vanilla idle, bypassing your oncorpse

grave lion
mellow frigate
#

try without turning

storm pecan
mellow frigate
#

you can add the timestamps to the monitor

storm pecan
#

sure
one moment

mellow frigate
#

sorry mate, got to go.

storm pecan
#

ye np ヾ(•ω•`)o

storm pecan
#

ight figured this out
thx again @mellow frigate

still ledge
#
-- Обработчик подключения игрока к серверу
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.

rich void
#

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 breakdance


<?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;
}

rich void
# still ledge ```lua -- Обработчик подключения игрока к серверу function OnConnect(player) ...

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 breakdance

somber scroll
#

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".

gilded hawk
#

How can I reliably check if the player started with the feeble trait? Or in particular how can I get it's starting traits

somber scroll
rich void
#

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

gilded hawk
rich void
#

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"

gilded hawk
#

Yeah, why not, could work

zinc mango
#

Hello Is there a way to connect the Log Extender mod to Discord, in short, to manage logs of individuals through Discord

rich void
# zinc mango Hello Is there a way to connect the Log Extender mod to Discord, in short, to ma...

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 PepeLove


<?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;
}

zinc mango
rich void
lethal phoenix
#

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?

lament crypt
#

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%
lethal phoenix
#

(I haven't used recipes yet so this is just a guess)

lament crypt
#

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

lethal phoenix
#

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
lament crypt
#

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

lethal phoenix
lament crypt
#

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")
neon bronze
#

Water is not an item

lethal phoenix
#

It works

#

Leave Result:Wire without any amount modifier tho

lament crypt
neon bronze
lament crypt
lethal phoenix
jagged arch
#
cosmic arrow
#

@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

bronze yoke
#

hmm, i thought i'd fixed that

cosmic arrow
#

guess i'll still use that one for now

bronze yoke
#

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

neon bronze
#

Is there to make a new sound slider to attach sounds to?

mellow frigate
bronze yoke
#

i meant the costs being arranged incorrectly

lament crypt
#

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]

bronze yoke
#

it's not a lua table, it's a java ArrayList, you can't use ipairs on it

lament crypt
#

Ok I see - so how do I run through the list?

#

I'm very new to Lua and how it connects to java

bronze yoke
#
for i = 0, myList:size()-1 do
    v = myList:get(i)
    
end
#

where myList is the list object

lament crypt
#

Thanks @bronze yoke

lament crypt
#

@albion Ok so now that I have my items, how do I check instanceof DrainableComboItem (java class)

#

Or anyone really that can help

bronze yoke
#

instanceof(item, "DrainableComboItem")

gilded hawk
#

What is the fastest way to kill your character in debug mode?

bronze yoke
#

getPlayer():die()

gilded hawk
#

In the console, right?

bronze yoke
#

yeah

gilded hawk
#

Thank you

rich void
mellow frigate
covert carbon
#

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

gloomy adder
#

Anybody have icons that just change to christmas and disco colors randomly? I'm already having XML errors adding an item to my mod

lethal phoenix
#

How can I add a new handler to ISHealthPanel?

gilded hawk
#

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 💀

gilded hawk
#

I'd like a better icon, but this will work for now I guess

lethal phoenix
#

"This is how you died, but whatever" ded

#

Jokes aside, good job dude! 4 days of debugging is rough

gilded hawk
#

Thank you

#

Hopefully this will worth the effort for when I release the full "Casualoid" mod.

undone tapir
#

Does it skip the character creation window, like some respawn mods still have?

turbid gale
#

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

jagged arch
#

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.```
bronze yoke
turbid gale
#

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

bronze yoke
#

it shouldn't interfere, i imagine multiple mods calling it is an waste of loading time but nothing too noticeable or serious

turbid gale
#

what I think would happen too

verbal yew
#

How it event work:
Events.OnClothingUpdated.Add(OnClothingUpdated)?

#

i need something, what can be triggered if i wear and unwear some clothes item

verbal yew
#

and how to check equiped clothes item?

verbal yew
#

ehhh...

rich void
rich void
#

including damage etc?

crystal terrace
#

Would it be possible to tweak controller config by a mod or something else?

wet mountain
#

How can I add new npc or animals ?

still ledge
polar gyro
#

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

rich void
rich void
meager sun
#

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?

gilded hawk
#

@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 😮

verbal yew
#

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?

sick hamlet
#

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??

manic relic
#

quick question

#

how many vertices can project zomboid handle again?

sick hamlet
lethal phoenix
gilded hawk
verbal yew
lethal phoenix
# verbal yew yep, I know, but i cant check clothes is wear, its not work for me. stuff like ...

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.

bronze yoke
verbal yew
#

public boolean isEquippedClothing(InventoryItem item)

hmmm

tame mulch
#

Hello there! How is going your modding process?

verbal yew
gilded hawk
tame mulch
lethal phoenix
tame mulch
lethal phoenix
#

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.

tame mulch
lethal phoenix
warped condor
#

I hope b42 gonna fix health updating for object in multiplayer.

lethal phoenix
small topaz
verbal yew
#

and item:contains("myitemid")

#

should work

#

thanks a lot

#

my passive exosuit drunk

opaque fiber
#

is there a way to hide a crafting recipe from the right click context menu, but not from the crafting menu?

opaque fiber
#

that also affects the crafting menu

verbal yew
#

ouf... not... its hide from craft menu

rich void
cosmic arrow
#

@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

jagged arch
#

can someone explain for what i can use moddata ?

crystal terrace
gilded hawk
#

Is there a way to give the player XP without triggering the Level up sound?

rich void
gilded hawk
#

LOL

rich void
#

player:playSound("Hooooyeeeee")

ancient grail
#

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

reef sable
#

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:

gilded hawk
#

Does the game have a simple dialog with YES/NO options that I can reuse without making a new one?

verbal yew
#

worldstaticmodel = blablabla _GROUND
but your model id just blablabla, add _ground

#

path without format

reef sable
gilded hawk
tame mulch
gilded hawk
rich void
#

Anyone know of a valid method to set the world map to be openable or not for a specific player?

rich void
cosmic arrow
#

i recently studied it a bit to edit Chuck's MGRS

tardy wren
#

Anybody know from how far away do vehicles have collission?

neon bronze
#

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?

drifting ore
#

does anyone know any mods that add a guy fieri outfit

neon bronze
#

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

fast galleon
#

Action.isValid: if endurance <= min then return false

fast galleon
heady shoal
#

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

shy minnow
marble folio
#

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?

sleek heath
#

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

drifting ore
#

anyone know what happened to @jab ??

sleek heath
#

these are the complaints im getting

drifting ore
#

you'd have to see what other mods they are using to start

sleek heath
#

ye

faint jewel
#

he's around.

sleek heath
#

thats what i was thinking

bronze yoke
#

he's still around, he just stepped away from the pz community

drifting ore
#

his account is showing deactivated

#

does he have a new one?

sleek heath
#

but they're saying its for a world it worked in but didn't work after i simply added 2 songs to the mod

bronze yoke
#

his discord? it shouldn't be

eternal charm
#

How would I go on about making a start scenario mod?

drifting ore
#

yea i just found a post from him and noone of his info loaded into his miniprofile

#

sad 😦 thanks for checking @bronze yoke

eternal charm
bronze yoke
#

that's because he left the server

drifting ore
#

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

bronze yoke
#

i do, what do you need?

drifting ore
#

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 😄

marble folio
# bronze yoke yes

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

bronze yoke
#

it's a lua file, attachedweapons or something

#

shared/Definitions/AttachedWeaponDefinitions

gilded hawk
#

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()
marble folio
bronze yoke
#

it looks for CasualoidPerks.respawnHandlers as that's the first argument

#

use self:registerHandler not .

gilded hawk
#

Ah goddam lua, I did not see that

#

Thank you very much albion

gilded hawk
#

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."
}
bronze yoke
#

<LINE> needs to be spaced out

#

it'll eat any text it's 'touching'

gilded hawk
#

Oh really? I removed the spaces cause I assume it would add random spaces 🤦

drifting ore
#

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

lilac gorge
#

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

fast galleon
lilac gorge
#

o thanks!

lilac gorge
fast galleon
#

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.

lilac gorge
#

do you not think I can just replace the sprite for the containers?

fast galleon
#

You can make new sprites if you want.

#

Or replace them too I guess.

gilded hawk
#

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"

lilac gorge
fast galleon
#

actually proceed makes me want to click it without reading 🤔

gilded hawk
#

Yeah, I changed it to Ignore and DON'T recover XP

mellow frigate
#

make it red

verbal yew
#

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

crystal terrace
#

isnt it like stuff needs to be in a a room to use electricity?

neon bronze
#

You could get the player and then building they are in and then get if it has electricity

verbal yew
#

but it main it should be close to what i want...

crystal terrace
#

ye totally forgot about generators

verbal yew
#

like, your character should be in area working generator or in room with Electricity

crystal terrace
#

this stuff seems relevant to your requirement

verbal yew
#

nice

#

thanks

crystal terrace
#

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.

shy minnow
#

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

jagged arch
#

is ModData.request(); trigger some kind of event on server side ?

jagged arch
#

so i cant catch it

crystal terrace
jagged arch
#

ok thx i got an idea

crystal terrace
#

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

verbal yew
# tame mulch Ask in <#869327724504842330> chat

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....

tame mulch
verbal yew
#

rope for vanilla method, but with rope model for car from car

#

and hard towe for model with metall construction

opaque fiber
#

how would i go about replacing vanilla vehicles in the vehicle stories?

jagged arch
#

OnDisconnect fires after removing from the world isoplayer or before ?

gentle mountain
#

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.

bronze yoke
#

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

gentle mountain
bronze yoke
#

oh good!

drifting ore
#

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?

bronze yoke
#

you need to save the file with a specific encoding

drifting ore
#

Oh, had no clue about that, thank you! I almost thought I messed something up

fast galleon
crystal terrace
#

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?

fast galleon
crystal terrace
#

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.

verbal yew
fallow breach
#

hey, hello there! does anyone know the mod which allow you to use books newspapers and comics multiply times?

eternal charm
#

how do i make a start scenario mod

#

is there maybe a base script that i could use as a base and edit that?

tepid dawn
manic relic
#

whats the best file option for a clothing?

#

fbx or just straight up x

#

the model replaces the vanilla badolier so im unsure

neon bronze
#

Fbx

crystal terrace
#

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.

empty citrus
#

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

??

manic relic
#

anyone know how to fix the invisable bandolier

lean oasis
#

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

crystal terrace
crystal terrace
crystal terrace
manic relic
#

Its invisable on the Playermodel

crystal terrace
#

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.

manic relic
#

What?

#

No its replacing the original bondolier model

#

And everything has the same name as the original variants

crystal terrace
#

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)

neon bronze
#

Stupid question: but did you enable the mod?

manic relic
#

No i didnt

#

Cause it replaces all the original files in my folder

neon bronze
#

Well if you dont enable the mod the model wont be shown

empty citrus
#

/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

trim mist
ancient grail
ancient grail
#

You dont mess with the vanilla files when youre modding

crystal terrace
#

looking to do some stuff when a player consumes an item, any suggestions?

crystal terrace
#

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.

bronze yoke
#

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

crystal terrace
#

ill see how it goes

crystal terrace
#

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.

bronze yoke
#

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

crystal terrace
#

sweet, ill get to it. Thanks.

crystal terrace
#

unable to make this consumable

#

item here, mostly copied from beta blockers atm

bronze yoke
#

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

crystal terrace
#

is it this one? it's inside a script called ISTakePillAction.lua

bronze yoke
#

yeah

crystal terrace
#

i could try adding Pills to type

bronze yoke
#

you can, but keep in mind that custom behaviour for pills isn't really supported

#

most medical stuff is hardcoded on the java side

crystal terrace
#

seems to do the trick, i can always trigger custom behaviour through my override functions tho?

bronze yoke
#

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

crystal terrace
#

hmm so its basically means extends in lua

bronze yoke
#

it's lua's equivalent of class inheritance

crystal terrace
#

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.

spice abyss
normal scroll
#

Anyone knows a way to prevent player from canceling transition animations?

crystal terrace
verbal yew
#

for clothes item's can be param like can't be wet or something else?

fast galleon
#

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?

spice abyss
fast galleon
#

didn't notice the name before

fickle knot
#

Hello. Is there a guide to make sanbox-options.txt for my mod?

crystal terrace
#

im using this method, expecting Perk object as return type but it gives back just a string (name of skill).

ancient grail
storm pecan
#

Any one know how to give a perk after magazine use?

crystal terrace
#

anyone familiar with setting skill levels? is this good to use?

crystal terrace
#

wait this one only levels up the perk to a single level

fickle knot
# fickle knot Hello. Is there a guide to make sanbox-options.txt for my mod?

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,
}`

crystal terrace
storm pecan
#

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

crystal terrace
#

why dont you check if character has read a certain mag and then trigger your function

storm pecan
#

any info on how to do that?

crystal terrace
#

use one of those events everymin or everyhour, check if character has read a mag. If yes do stuff

storm pecan
#

how to check? What func?

#

I know from where in the code to call check, dunno how

crystal terrace
#

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.

storm pecan
#

should I define this recipe anywhere? Or it's just any random keyword, that I can check in lua?

crystal terrace
storm pecan
#

ight
will try it out
BIG thanks spiffo

crystal terrace
storm pecan
#

Worked like a charm
Thanks again @crystal terrace

#

sorry for ping

bronze yoke
bronze yoke
#

you can add a check to ISReadABookAction.perform if it's your item then add the trait

crystal terrace
bronze yoke
#
character:getXp():setXPToLevel(PerkFactory.Perk key, int perkLevel)
character:setPerkLevelDebug(PerkFactory.Perk perks, int level)
```i think
crystal terrace
#

sweet, i think i tried the first one. Ill retry and checkout the other one as well.

bronze yoke
#

both at the same time

neon bronze
bronze yoke
#

the difference is there isn't a non-debug version

neon bronze
#

So non debug calls the debug one?

crystal terrace
#

interesting, thats prolly why it wasnt working.

bronze yoke
#

what non-debug?

verbal yew
fickle knot
plain jasper
#

Hey guys, does anyone know if one can somehow pause the healing of a scratch or any other wound when its bandaged ?

verbal yew
#

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 drunk

bronze yoke
#

player:setAllowSprint(false)

#

also setAllowRun

verbal yew
bronze yoke
#

i remember finding it buggy

crystal terrace
#

lf a method to add a certain amount of xp to whatever you already have in any perk, this one seems deprecated.

bronze yoke
#

getPlayer():getXp():AddXP

crystal terrace
#

thank you, ill check it out.

verbal yew
manic relic
#

the model straight up didnt load

#

any ideas why this could happen?

tacit plover
#

did you weight paint and export the model with the rig?

manic relic
#

of course

#

here look

crystal terrace
empty citrus
#

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?

crystal terrace
#

something like this

empty citrus
crystal terrace
#

ye it goes into your scripts

empty citrus
#

Still nothing. u.u

#

At the moment, the structure of my mod folders looks like this, as simple as possible as I learn.

crystal terrace
#

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{}?

crystal terrace
# empty citrus

also no need to complicate the structure for now, since you're just testing stuff atm. So all this Contents, workshop stuff is unnecessary.

empty citrus
crystal terrace
#

after that your media folder will contain all the other folders like scirpts, sounds, lua etc

empty citrus
#

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

fast galleon
crystal terrace
#

didnt see the little devil

empty citrus
#

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.

crystal terrace
empty citrus
#

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.

fast galleon
#

I don't think it would fix it

crystal terrace
#

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.

crystal terrace
empty citrus
#

I have many more plans, hahaha.

but for now.. just open the box menu options xD

fast galleon
verbal yew
verbal yew
empty citrus
fast galleon
#

out of curiosity what does the tooltip show?

empty citrus
#

How do I add the option to open it here, like it exists for other items?

empty citrus
verbal yew
fast galleon
#

ah you changed it

empty citrus
verbal yew
#

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

empty citrus
#

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?

neon bronze
#

Remove the tooltip line for now from your item script

#

And restart your save

#

Also would recommend putting the scripts into scripts folder

empty citrus
#

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.

verbal yew
#

its all recipes

#

its not func

neon bronze
#

Yea

empty citrus
verbal yew
#

for open box for vanilla items in box - yep

#

one q

#

u want add random drop for your "open box" ?

empty citrus
#

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.

verbal yew
#

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

empty citrus
#

Let's see how it goes. hahaha

verbal yew
hot void
#

how to add clothing to zombie npcs

verbal yew
hot void
#

this ?

verbal yew
#

yep

#

u need add spawn distribution for zombie ESC_stripper too

hot void
#

like this?

#

i forgot how its done since its been 1 year

verbal yew
#

yep... but its look old style

hot void
#

is there a new one?

#

can i make zeds spwan with custom underware?

verbal yew
#

just

 table.insert(ZombiesZoneDefinition.Default,{name = "Yourname", chance = 1});```
verbal yew
#

without line 3 and 7

empty citrus
verbal yew
#

its for recipe param

#

not for item

#

u should

#

result:DummyBox,

#

RemoveResultItem etc

empty citrus
verbal yew
#

for u:

{
   BoxTest,
   Result:DummyBox,
   removeResult:true,
   Sound:PutItemInBag, 
   OnCreate:myfunc, 
   Time:5.0,
}```
#

add dummy box back into script

#

like item

#

ops, sorry

verbal yew
empty citrus
neon bronze
#

Remove the result… from the box test

#

Those are only for the recipes and not items

storm pecan
#

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

bronze yoke
crystal terrace
#

models go into models_X yes, then you define em in your model script.

storm pecan
#

where should model script go? can't seem to find anything looking like it in ProjectZomboid media folder

crystal terrace
#

since its not exactly lua, there's no way to get length of your tables right? gotta iterate over em?

crystal terrace
#

in vanilla folder, try to find model script

neon bronze
#

Lua table length can be accessed with the # operator

#

#mylist = len(mylist)

crystal terrace
#

would that work with kahlua?

storm pecan
neon bronze
#

Yea should be

crystal terrace
#

aight, ill see how it goes.

neon bronze
#

With java arrays its mylist:size()

crystal terrace
storm pecan
#

recomended world item texture size is 256x256?

#

iirc

crystal terrace
#

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.

neon bronze
crystal terrace
#

ah got it

verbal yew
# empty citrus ??

delete next strings from item boxtest:
-result
-resultcount
-removeresult
-OnCreate

#

another look fine

empty citrus
verbal yew
#

not should be

#

try find string in vanilla pz from recipes on removeresult

#

Maybe im wrong with register

empty citrus
#

Correct, your process seems to be on the right track:

  1. Create an item (e.g., "item_box").
  2. Create a second linked item (e.g., "item_dummy").
  3. Create a recipe (e.g., "recipe_open_box").
  4. Write a Lua file with the function to open the item.
verbal yew
#

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)

verbal yew
#

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

empty citrus
#

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?

crystal terrace
#

yes

verbal yew
#

yep

empty citrus
#

ohh nice :D

#

On scrips/items: one file for items and one file for recipes same Module Mymod and same import Base

verbal yew
#

example of dummy item:

#

Maintence Of Body Armor - its dummy item with Display name and icon

#

i go sleep

#

goodluck

shut tapir
#

I hope adding in mp3s is easy, but I want to mod the Death Music to play the theme of the walking dead

crystal terrace
crystal terrace
#

tables are so simple and yet confusing at the same timeded

crystal terrace
#

Is this the right way to initialize values for undeclared keys in table, myTable.undeclaredKey=myTable.undeclaredKey or {}

shut tapir
#

how do you replace sound files?

hollow current
#

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

crystal terrace
crystal terrace
#

thenks

hollow current
#

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
bronze yoke
#

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

hollow current
#

Yup, this was indeed the issue, thanks so much!

shut tapir
#

For the .txt and .info files, can you add spaces to the names?

crystal terrace
#

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.

shut tapir
#

like will something not work if for example, title=My Zomboid Mod

crystal terrace
#

you can give it a try, i usually dont leave space. If there's trouble loading mod after change then uk for sure.

wicked plinth
#

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

polar gyro
#

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

crystal terrace
polar gyro
#

🤨

crystal terrace
#

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.

polar gyro
#

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

crystal terrace
#

i don't think that's what you need but idk exactly what you're working with, hopefully someone else responds.

polar gyro
crystal terrace
#

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.

shut tapir
#

why is it giving me an error for no preview.png even though I have it inside the folder

polar gyro
verbal yew
#

i think its should be something like
PlayerObj():GetModData():YourCustomParam

#

send like text in ```

polar gyro
#

i can't discord does not allow me

#

shrug

verbal yew
#

pechalno

#

cant see it from my smartphone)

crystal terrace
tame mulch
polar gyro
#

main creation methods

#

so well... default values are = 0

polar gyro
#

values are fine

tame mulch
#

what problem then?

polar gyro
#

even function SOalcoholicfatiguerecover() working fine

#

but when i tryin to reset it with SOISTakePillAction it not working. but say string working

polar gyro
#

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

tame mulch
#

try print SOAlcoholActive in Say function:

player:Say("Sleepin? " .. player:getModData().SOAlcoholActive)
tame mulch
#

player:getStats():getDrunkenness() still > 0.01, so it sets to 1 again

polar gyro
#

hmm

#

seems like moment of stupidness

#

i will check code. thanks

#

(facepalm)

verbal yew
tame mulch
verbal yew
#

yep, but what param should i use

crystal terrace
#

some stuff i worked for a mod

tame mulch
# verbal yew

setAllowRun and setAllowSprint must work. What problem?

bronze yoke
#

i remember when i was testing with it would sometimes force you to sprint

verbal yew
#

or its param can be nil?

tame mulch
verbal yew
#

if im not wrong, for zombies exist param in moddata like CanSprint

#

not sure work it or exist for player

crystal terrace
#

is there a way to tweak hunger or thirst for characters? i do see get multiplier methods but not much around tweaking em.

tame mulch
verbal yew
#

i will try to do that after one hour 😆

verbal yew
#

when u get player thrist, do something with it, set player thrist

#

and for hunger

crystal terrace
#

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.

bronze yoke
#

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

crystal terrace
#

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.

verbal yew
#

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...

crystal terrace
#

B42 isn't gonna be here anytime soon

verbal yew
#

sad but true...

#

hmm. need add it to notebook, my be do it in free time

#

so many plans, so many plans...

bronze yoke
#

named literature already does that doesn't it

verbal yew
#

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

reef sable
#

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?

tame mulch
verbal yew
fast galleon
reef sable
#

nice thank you <3

jsut a detail its not
RemoveResult:true
but
RemoveResultItem:true

wise ferry
#

anyone can locate a sound file of a male player being dragged down/screaming? i need it for funny purposes

crystal terrace
#

this is the closest thing i could find related to that sound

neon bronze
#

The sounds are in the fmmod sound banks

crystal terrace
#

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.

neon bronze
#

Did you disable god mode? Try adding temperature to yourself to see the value

crystal terrace
#

only have these enabled atm

#

thing is i do get the correct vals for hunger, but not thirst.

neon bronze
#

Maybe try removing the ghost mode?

#

Also i think in the debug panel for character it shows the current thirst

crystal terrace
#

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.

sour island
#

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.

manic relic
#

is there anyway to copy vertex groups (all of them at once) via 2 open instances of blender?

crystal terrace
manic relic
#

??

ripe jolt
#

✌️ drunk 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.

bronze yoke
#

every frame you're falling a falltime counter ticks up, when you stop falling you take damage proportional to your falltime

fickle knot
#

Is it possible to make changeble spawn chance with sandbox?
like spawnChance = 1 * SandboxVars.Myvars?

bronze yoke
#

yes, you need to move the sandbox ones into an OnInitGlobalModData event handler and call ItemPickerJava.Parse() at the end

manic relic
#

anyone knows some reasons why my clothing item could be invisable?

crystal terrace
#

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

bronze yoke
#

is that 3 hours with high thirst? stressed

crystal terrace
#

ye i realised it's too much lol

#

imma try to find a decent rate of increase, im not event considering other variables atm .

bronze yoke
#

at 6 hours wouldn't you die if you went to sleep

#

actually probably not

#

thirst increases 8x slower while sleeping

crystal terrace
#

that might balance out your rates during combat and stuff, but still id like to find a decent challenge.

bronze yoke
#

the problem is water is quite easy to come by and autodrink makes it not even something you need to manage

crystal terrace
#

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

crystal terrace
#

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

bronze yoke
#

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

crystal terrace
#

oh so im adding xp on top of levels

bronze yoke
#

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)

crystal terrace
#

im assuming setXpToLevel basically calculates remaining xp after you set certain level then

bronze yoke
#

it sets the xp to the amount of xp you would need to reach that level

crystal terrace
#

alr ill just try with add xp stuff and see how it goes

crystal terrace
#

hmm this works

fickle knot
bronze yoke
#

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

fickle knot
bronze yoke
#

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

fickle knot
#

i thought coding in project zomboid would be easierunhappy

crystal terrace
fast galleon
#

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.

fickle knot
fickle knot
fast galleon
#

It doesn't seem to be true anymore. Looks like that comment in distribution file is old.

crystal terrace
#

is this not the way to do it? debugger stopped on this line.

bronze yoke
#

not just one argument

crystal terrace
bronze yoke
#

probably

#

it wouldn't really matter, the chance of getting exactly the max value is miniscule anyway

crystal terrace
#

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.

sour island
#

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?

crystal terrace
#

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?

fast galleon
#

Bertie Bott's Every Flavour Beans

crystal terrace
#

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.

fast galleon
fast galleon
crystal terrace
fast galleon
#

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 .

crystal terrace
#

It's fine if there's no alternatives, from User's Perspective they i don't think it will a huge problem.

fast galleon
crystal terrace
#

ah ye that's too much responsibility from files perspective, so many variables that you have no clue about.

sharp timber
#

does anyone know where i can get files that make up the core gunplay

crystal terrace
verbal yew
#

How to make a piece of clothing not get wet without increasing the moisture resistance parameter?

#

Is there any param for it?

long grove
#

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.

storm pecan
#

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

lone nest
#

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!

tame mulch
tacit turtle
#

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 !

fickle knot
#

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(

crystal terrace
#

what about OnServerStarted and OnGameStart?

fickle knot
crystal terrace
#

im confused, can you brief about your goal with this?

fickle knot
crystal terrace
#

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.

crystal terrace
#

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?

fast galleon
#

if you post it as text instead of pictures I could help you

fickle knot
fast galleon
#

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.

storm ridge
#

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

crystal terrace
#

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.

bronze yoke
#

it might be breaking because the player needs to be alive during code that happens after OnEquip is fired

crystal terrace
#

oh so i chose the wrong trigger

#

k thanks, ill use something else.

manic relic
#

what are some reasons why my clothing mod is invisable?

#

or what are some of the common reasons why clothing items are invisable?

timber river
crystal terrace
#

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

fast galleon
crystal terrace
#

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

lone nest
#

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 ...

▶ Play video
#

is that the so-called ghost mode?

crystal terrace
#

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

shadow pumice
#

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.

keen silo
cobalt canyon
#

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?

fading horizon
#

somewhat mod dev related

#

i made a tool that will pull all your mods and count your total subscribers

#

pretty neat

crystal terrace
#

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.

bronze yoke
#

the main thing is to never delete files

median prairie
#

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?

cyan zinc
#

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)

crystal terrace
crystal terrace
cyan zinc
crystal terrace
#

for uploading Users/User/ProjectZomboid/Workshop/, for testing/development Users/User/ProjectZomboid/mods

crystal terrace
cyan zinc
crystal terrace
cyan zinc
crystal terrace
#

oki, for uploads you need to have a certain structure.

cyan zinc
#

What structure

crystal terrace
#

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.

cyan zinc
#

That part is done

crystal terrace
#

Do you have like a Content folder inside top folder?

cyan zinc
#

no its just a main menu mod

#

Do i need that?

bronze yoke
#

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

crystal terrace
# cyan zinc Do i need that?

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.

cyan zinc
#

Ah ok it seemed to work for other people ig not mine

crystal terrace
crystal terrace
cyan zinc
bronze yoke
#

i can't wait to remove all my loose files when b42 breaks everything anyway

crystal terrace
#

that does not sound right ded , 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.

cyan zinc
crystal terrace
cyan zinc
#

yeah sure i just want to be able to upload it but it only shows Mod Template