#mod_development

1 messages · Page 202 of 1

bronze yoke
#

systems have to be written to use tags instead of directly referencing specific items

#

iirc all the vehicle stuff just directly references the vanilla items they use

mellow frigate
#

exactly there is no tag

bronze yoke
#

so it is not trivial to add new items to them

bright wolf
#

wack

ebon needle
mellow frigate
#

albion above answers exactly that

ebon needle
#

Damn

#

Is there a list of Tags somewhere?

stray willow
#

SkillRequired:Foraging=8,

#

Trying to do a recipe that requires foraging,

is foraging the wrong word though?

I know like Metalworking is MetalWelding , so is there a similar thing for Foraging?

stray willow
stray willow
stray willow
outer crypt
#

Maybe a guru can confirm this for me... In single player any code will stay resident in the game no matter what. But on a multiplayer server all map changes must go through the server? Does this mean that if I create a function that destroys and replaces a sprite object into a container item that the server must run the code, not the client? Or does the client just need to update the server on the removed sprite and update the new container to the server? Thank you for any replies. digging through the forums and it seems like its all seperated but I do not understand how to make this connect.

mellow frigate
safe rampart
#

When it comes to commissioning mods, where would y'all say would be the most approriate or way to find people for that case of scenario?

outer crypt
#

It seems that I can use this command to remove the old sprite. But then the new object has not way to update. transmitRemoveItemFromSquareOnServer()

outer crypt
safe rampart
#

Jesus.

outer crypt
# safe rampart Jesus.

and everything seemed to be going well until it met the mutliplayer world, where nothing is compatible it seems

safe rampart
#

Now you're just giving me anxiety for what's to come worriedblob

mellow frigate
mellow frigate
outer crypt
mellow frigate
safe rampart
#

I wanted to ask some questions as well if you wouldn't mind.

#

Like, what would y'all say is an appropriate comission rate?

outer crypt
outer crypt
bronze yoke
#

i'd actually say it automatically networks too much usually

#

just not in these specific areas

mellow frigate
outer crypt
mellow frigate
#

well done and sorry then.

outer crypt
#

thank you for helping. in the forums there are a few posts that explain the scenerio but none seem to step on the same spot that I am at.

mellow frigate
bronze yoke
#

i've had luck with transmitAddObjectToSquare

outer crypt
#

Just realized I have tried that but not sure if I am using it correctly. Going to try a few things.

cedar anvil
#

I know it's very weird question, but is it possible to empty the recipe result?

#
        {
    farming.Strewberrie=15,
    ATTS.Zamabox1=1,
    Result: ATTS.ZaFarmbox=1,
        ~~~~~~~~~~~
    OnCreate:Zafarmresult,
        }```
#

And this is Zafarmresult, function Zafarmresult(items, result, player) local gambletime = ZombRand(1, 100); if gambletime < 24 then player:getInventory():AddItem("Base.PaintYellow"); elseif gambletime < 75 then player:getInventory():AddItem("Base.PaintWhite"); else player:getInventory():AddItem("Base.PaintBrown"); end player:getInventory():RemoveOneOf("ATTS.ZaFarmbox"); end

verbal yew
#

RemoveResultItem:true

cedar anvil
#

I tried to remove the result in Onc

#

oh my god thank you so much!

winter thunder
#

Weird question, but I think I might need some help trying to figure this out. I have variables I want to keep track of through a recipe. The player is allowed to use a set of different items for the recipe, but I want to keep track of how many of each item they used.

So, if the options for the recipe were effectively 10 total = Ruby, Sapphire, and/or Emerald. And they could use any combination that added up to the total.

I am trying to figure out how to go through that list and check the corresponding values to push that to the end result of the recipe.

verbal yew
#

like require item ruby/sapphire/emerald

#

1 count

#
  • OnTest:func
#

where u return true if total count 10

#
  • OnCreate:func2
    where u remove 10 items
#
  • Tooltip:localisation string
#

where u write thing like:
"On total count should be =10!"

#

thats all

#

for remove items u can use cicle for with count 9 where u check Inventory like:
if has ruby then remove 1 ruby
elseif has emerald then remove 1 emerald
elseif sapphire then remove 1 sapphire
end

#

i hope u understand me 😅

outer crypt
bronze yoke
#

MySquare:transmitAddObjectToSquare(MyObject, MyObject:getObjectIndex())

#

MySquare should be the square the object is on (MyObject:getSquare() if you don't already have it)

outer crypt
outer crypt
fast galleon
#

You want to replace a tile when it is first spawned? Take a look at some of game's map files like server/Map/MapObjects/MOCampfire.lua and MOCompost.lua.

cedar anvil
#

How can I search the fanny pack's inventory? I've tried to use getClothingItem_Torso():getInventory() but it didn't work out.

fast galleon
# fast galleon You want to replace a tile when it is first spawned? Take a look at some of game...

Also, maybe your issue is from how you change the sprite properties. It's best to change them during loading, before the map chunk start loading.

Similar to this.
https://github.com/quarantin/zomboid-ladders/blob/962ac2c29a572a8090d1495dcf3b8ad7f66c6405/media/lua/client/Ladders/Ladders.lua#L253C23-L253C23

GitHub

A mod for the game Project Zomboid to add the possibility to climb ladders - quarantin/zomboid-ladders

verbal yew
#

Guys, need help
i try inject tooltip for clothes, but it's not work, without any error...

mental jackal
#

hey folks im having issues with this line

    return ZombRand(SandboxVars.DrivingSkill.XPgainChance * GameTime:getInstance():getInvMultiplier()) == 0; 
end```
im wondering what the sandbox var would do to xp and how it is actually done - any help would be greatly appreciated 😄
fast galleon
verbal yew
#

YAAAAAAAAAAS!

#

GOD DAMN!

#

:O

robust terrace
#

Hello there, is any good way to make a code/script a horde spawn at some specific places working for sp/mp?

outer crypt
stray willow
#
  recipe Forge a Katana
  {
  MetalBar=3,
  SheetMetal=2,
  SmallSheetMetal=2,
  ScrapMetal=4,
  
  Result:Katana,
  Time:1000.0,
  Category:MetalWorking,
  Sound:Hammering,
  SkillRequired:MetalWelding=10,
  }
#

Can anyone see anything wrong with this :?

#

Keep getting recipe result as Null

neon bronze
#

Try Base.Katana

digital shard
#

Hi

blissful salmon
#

I still struggling with my problem form above:
#mod_development message
So far I found out that if I use the following lines to add and remove the items nothing seams to happen on the client.

container:addItemOnServer(resultItem)
container:removeItemOnServer(item)

But if I exit my hosted game (local) and restart. The container contains the correct item and the old one is removed. So it assume that the container doesn't sync to the clients. But I found no function to enforce a sync or something similar.
Does anyone have an idea how I can do this?

fast galleon
fast galleon
blissful salmon
#

Thx. I'll check this...

fast galleon
#

errors are limited if you make the UI dirty and cancel transfer actions.

blissful salmon
#

Do I have to make the UI dirty or the container?

fast galleon
#

I think fallen seraph said it works best to make the container dirty.

cedar anvil
#

Is there any way to move my custom context options place? I wanna put it between the Favorite and Equip but I have no idea how to do it.

#

context:addOption(activatezasc, getSpecificPlayer(player), onScannerUI) I believe I have to do something in here for that.

#

I found it! insertOptionAfter

mental jackal
mental jackal
bronze yoke
#

it adjusts the chance by the framerate so it doesn't trigger more times when the code is running faster

#

it's not really done properly though so idk if it actually works

outer crypt
outer crypt
hollow current
#

Anyone got an idea of how to add a custom part to the vehicle mechanics menu/a reference to how its done in vanilla? Can't seem to find it

bronze yoke
#

as long as the part exists it will be in the menu

fast galleon
#

nodisplay is for not appearing, use other categories.

hollow current
bronze yoke
#

you create it in the vehicle script

hollow current
#

ah i found it in the scripts folder ye

#

there a way to make a part exclusive to certain vehicles?

bronze yoke
#

it is only on the vehicles that it is defined in

bronze yoke
#

parts don't exist independently of vehicles, they are a child element

#

you can inherit from them as 'templates' to emulate that

fast galleon
#

A vehicle will only have the parts from it's script.

hollow current
#

ah so i need to create a template first for the part then add it to the vehicle's script file, got it

#

thanks so much!

bronze yoke
#

you don't have to create a template if it's only for one vehicle, it's just so you can reuse script without copy pasting

hollow current
#

i am actually adding a custom part, airbag, to multiple vanilla vehicles

hollow current
#

Any idea why a simple template file isn't working when I am trying to add it to a vanilla vehicle script? Adding the part directly to the script works

module Base
{
    template vehicle Airbag
    {
        part Airbag
        {
            area = Engine,
        }
    }
}```

Vehicle's script:

...
template = Battery,
template = Airbag,
template = Engine,
template = Muffler,
template = EngineDoor,
...```

#

Added it using this script. Works better for my approach

tame mulch
hollow current
tame mulch
hollow current
#

^ After adding the Airbag, template before the battery

tame mulch
#

how you name file with template?

fast galleon
hollow current
hollow current
tame mulch
#

maybe need rename vehicle_car_... file name?

fast galleon
#

I felt I didn't need to explain how to target specific vehicles.

hollow current
tame mulch
hollow current
tame mulch
#

@hollow current you just want add airbags to vanilla cars? Then better not overwrite vanilla scripts. Some mods can do same and then your mod will not work with this mods

hollow current
#

yea renaming the file worked

hollow current
#

either ways I am gonna resort to the script-ish way of adding the part instead of modifying the actual vehicle script file

#

that way I will have more freedom on which vehicles to target, since I aim to have an option for lore-friendly airbags

fast galleon
#
MyModifications = {

    ["Base.Van"] = "{template=MyModificationModule.van_modifications,}",
}
for k,v in pairs(MyModifications) do
        local vehicle = manager:getVehicle(k)
        vehicle:Load(vehicle:getName(),v)
end
#

similar to this

#

it had separate templates for different vehicles

feral crane
#

how does PlayAnim from IsoZombie work? doesn't play any animations with PlayAnim(string)

verbal yew
#

How to remove parameter from items without overwrite scripts file?

#

like

local function zReAdjustItem(Name, Property, Value)
    local Item = ScriptManager.instance:getItem(Name)
    if Item then
        Item:DoParam(Property.." = "..Value)
    end
 end

but remove param

fast galleon
verbal yew
#

zReAdjustItem("Base.Vest_BulletPolice", "FabricType", ""); (example)

#

If this parameter is at least somehow specified, then in the clothing inspection interface all actions related to sewing are available for it

fast galleon
fast galleon
verbal yew
#

Main problem - FabricType defined

#

if it defined - it's open all path for sewing and another stuff

rustic dock
#

Does anyone know if its possible to use a placed tile as part of a crafting recipe?

neon bronze
#

You can use a movable as part of a recipe

fast galleon
verbal yew
#

i'm try nil - look like this is string type

#

i will try it with null, one min

fast galleon
#

It seems like you need to patch the UI 😦

verbal yew
#

yep, same

verbal yew
fast galleon
verbal yew
#

it's possible to inject this stuff?
like

if not self.clothing:getFabricType() or self.clothing:getFabricType() == zReFackThisShiet then
        local x = (self.bodyPartColumn - self.noRepairWidth) / 2
        self:drawText(getText("IGUI_garment_CantRepair"), x, 22, 1, 0, 0, 1, UIFont.Small)
    end

?

fast galleon
verbal yew
#

emmm

#

emmmm

fast galleon
verbal yew
#

not sure how to do this...

fast galleon
#

ping me later if you don't figure it out. You would need to use the Clothing class most likely.

verbal yew
#

public class Clothing.ClothingPatch

verbal yew
#

thanks for help

lusty marsh
lunar shore
#

Is it possible to speed up tile erosion with code?

small topaz
# lusty marsh Is there any way to access the fields in java classes from Lua? I can see in the...

You should be able to call all methods listed in the java doc you linked in lua code. To get an idea what body locations the vanilla game has, you can check the vanilla code in media/lua/shared/NPCs/BodyLocations.lua. This file lists all body locations present in vanilla game and contains info about related stuff (e.g. what locations are exclusive, what locations hide other locations etc.). This file also should give you an idea how to use the java methods in lua code.

lusty marsh
#

I did always wonder where that was defined, thanks! I haven't touched java in a while and just remembered the field I wanted will be private so I can't get to it. my issue is that there's a private field called exclusive that I seemingly can't access from lua

#

the only way to get to it seems to be through a method isExclusive which is really annoying because I'm having to compare every body location to see if they are exclusive with each other

small topaz
#

@lusty marsh a method literally called "exclusive" seems indeed not present for the bodylocation class. but there is setExclusive and isExclusive

lusty marsh
#

maybe I should have clarified, I'm trying to find what a bodylocation is exclusive with not change it myself

small topaz
# lusty marsh the only way to get to it seems to be through a method `isExclusive` which is re...

To do this, you can check the lua code I mentioned and just read off what body locations the game declares as being exclusive, then hard-code whatever you'd like to do with them. As an alternative way, you can also iterate through all body locations via lua code and then test for exclusiveness. The latter method might be even a little bit better since it might increase compatibility with future vanilla updates as well as compatibility with other mods (updates or mods which change body locations or add new ones). But depends on what the specific goals of your work are ofc.

lusty marsh
#

yeah I'm doing the latter rn I was just seeing if it could be done a little cleaner bc it's going to get slower as the new locations stack up from other mods but it looks like this is my best method, thanks anyway!

small topaz
#

in case you just have to iterate once (say before game starts) there probably won't be any performance issues since there aren't so many body locations. even if mods adds new ones, chances are good that you won't have 1000s of them

lusty marsh
#

yeah true, I was told there was some performance problems so I was squeezing it out of everywhere but there's probably something I'm missing elsewhere in my mod

small topaz
#

hmmm... I am definitely not an expert on performance questions but a single iteration through body locations shouldn't be a huge issue I guess...

#

(presupposed that you don't iterate through them all the time during actual game play)

lusty marsh
#

dw I think I just had a brainfart I read my code again and I think it might have been reapplying clothing items to the model in a loop so that's probably what was wrongstressed

drifting ore
#

Is there a mod that enchances the visuals? Like filters

verbal yew
#

@fast galleon, bro, can I ask you to write this code, please? This would save a lot of my free time...

sacred jay
#

Hello frens pepeHappy
I'm running a modded server to play with some friends, but some mods aren't translated into our language. Not all mods have a GitHub page, so I cannot necessarily create a PR for all of them.
Can I somehow still translate those mods without ripping and reuploading them to the workshop? Like simply create the translated files server-side, so the clients can download them?

fast galleon
sacred jay
fast galleon
sacred jay
zenith igloo
#

if you wanna be lazy

bronze yoke
#

honestly i wouldn't say that'd be any easier

sour island
#

You can just include the structure in the translate folder, nothing else. The game will pickup the translations and add them.

verbal yew
#

but not all mods use getText in lua for localisation stuff and if its on not native lang thats can be problem

verbal yew
#

god of thumbnails:

#

ahh... message been delete

chilly basalt
#

Yeah I figured out a decent enough image

#

So I've uploaded a mod and posted about it in #pz_b42_chat, is that pretty much the extent of the advertising I can do on the server? It's not a substantial mod by any means, but I imagine it'll just be a word-of-mouth thing from this point on?

sour island
#

Atl east when I post any mods there usually the on-going conversations bury it

chilly basalt
#

Gotcha, I guess my work is done for the moment

sacred jay
zenith igloo
#

its surprisingly easy lol

sacred jay
#

I've never ever published something to the steam workshop for any game before 😄

zenith igloo
#

put the file click one workshop upload thats all

#

just google it to make sure and you will be fine 😄

sacred jay
#

just what I though 😄

#

Just curious: Can I reload LUA ingame or do I always have to restart my game?

#

I have the mod manager installed, btw, if that helps

chilly basalt
sacred jay
sacred jay
#

@fast galleon @zenith igloo It worked, thank you :3

zenith igloo
#

happy to help 🙂

coarse fable
#

who are you

drifting ore
#

how do i find the id for a food item that's cooked

#

coz i wanna use cooked meats for a custom recipe but i can only find the raw base item in items_food.txt

drifting ore
#

or whats the function i need to check if an item is cooked

#

coz i found

function Recipe.OnCanPerform.Uncooked(recipe, playerObj, item)
    if item and not instanceof(item, "Food") then return true end
    return item and not (item:isCooked() or item:isBurnt())
end

but from what i understand it tells you if the item is uncooked but i need it to only allow the recipe to continue if the item is cooked

#

@tranquil kindle do you know which it would be

drifting ore
#

I just modified it to be```
function Recipe.OnCanPerform.Cooked(recipe, playerObj, item)
if item and not instanceof(item, "Food") then return true end
return item and not (item:isUncooked() or item:isBurnt())
end

#

hopefully should work

frank elbow
drifting ore
#

forgot about boolean algebra

#

damn you de morgen

drifting ore
frank elbow
#

On the topic of boolean algebra, if you do make that change you can simplify the expression

frank elbow
#

It doesn't, because you'd be replacing the isCooked call with the negation of its result

#

nand? It'd be DeMorgan's law, which you referenced

drifting ore
#

right

#

but i said damn you de morgen coz i hate his laws

#

always forgot them

#

would it just be

    if item and not instanceof(item, "Food") then return true end
    return item and not (item:isCooked() or item:isBurnt())
end
``` then
frank elbow
#

The function you're modifying has return item and not (X or Y). You want the négation of X while still not wanting it to be burnt (I assume), meaning you would change it to item and not (not X or Y). Application of the law on the latter part of the expression means distributing the negation and changing or to and

#

In other words, item and X and not Y

drifting ore
#

oh right

#

yeah i remember commutative and associative and shit but not de morgen's

#

even tho his laws are arguably easier since they're similar but opposite if you know what i mean

frank elbow
#

Tbf I never actually think of the law, once you're used to it you can just apply it without needing to think through the logic

#

I say that to say I wouldn't worry all that much about not remembering the exact laws (unless you're studying CS)

drifting ore
#

i remind myself when i use them so i can think to myself "fuck you de morgen"

drifting ore
frank elbow
#

Gotcha, in that case it's worth knowing for the classes that ask for it then lol

drifting ore
#

yeah

verbal yew
hollow current
#

im moving to VSCode, is there an up-to-date plugin/way to autofill PZ methods?

bronze yoke
hollow current
#

thanks!

lunar shore
#

Why isn't the player's sickness being removed in multiplayer?

local function fix_sickness()
    local player = getPlayer()
    local name = player:getFullName() 
    local stats = player:getStats()
    if name == "Hima Ukid" then
        if stats:getSickness() >= 0.75 then
            player:Say("Sick")
            stats:setSickness() = 0
        else
        end    
    else
    end
end
Events.EveryTenMinutes.Add(fix_sickness)
last cloak
#

Hi folks ! Can someone tell me where to find the player death information into pz files ?
Like if it pop in a log.txt ? Where is this file , how it is specified ? " Character name is dead "
Thx a lot ❤

undone relic
sacred jay
#

@fast galleon @zenith igloo based on your support, I've started a small repo to collect mod translations and automatically build the corresponding files. It's in an early stage, but I plan to automate compiling and publishing soon ™️

https://github.com/tinyoverflow/pz-localizedmods

#

It requires a ton of refactoring, though. But it works for now, if the user doesn't make a mistake

brisk adder
#

Hello everybody! I'm trying to make a mod that add a custom category to the makeup menu. And it seems that I did everything (maybe, of course, not everything, but I shoveled a lot of information and similar mods to understand how and what to do) but for some reason when I throw the mod into the mods folder, all categories disappear in makeup in general 😦 Like in-game lipstick, eyeshadows and so on. Any help?

feral crane
#

how do I access values stored during an "OnEat" function in a different function?

sacred jay
sacred jay
feral crane
#

local currentstrength = player:getPerkLevel(Perks.Strength)

player:setPerkLevelDebug(Perks.Strength, 10)
buffdata = player:getModData()
buffdata.buffduration = 2

end

local function EveryHours()
if buffdata.buffduration == nil then return end

if buffdata.buffduration >0 then
buffdata.buffduration = buffdata.buffduration -1
end 

if buffdata.buffduration == 0 then
    print("times up")

 player:setPerkLevelDebug(Perks.Strength, currentstrength)
end
end
Events.EveryHours.Add(EveryHours)```
undone crag
#

currentstrength is a local variable set in the scope of a different function so it doesn't exist in the second function.

feral crane
#

yeah i know, thats why im asking how to do it

#

i dont want it to continously store the players strength, only when the item is consumed

undone crag
#

I have this code from an unfinished mod:

function SomeMod.DecreaseAttribute(player,modData,attribute,magnitude)
    print("DecreaseAttribute: "..tostring(attribute).." by "..tostring(magnitude));

    local Xp = player:getXp();
    local attributeXpArray = {1500, 3000, 6000, 9000, 18000, 30000, 60000, 90000, 120000, 150000};
    
    local stats = player:getStats();
    
    local perk = nil;
    
    if attribute == "Endurance" then perk = Perks.Fitness; end
    if attribute == "Strength" then perk = Perks.Strength; end
    if attribute == "Speed" then perk = Perks.Sprinting; end
    
    if attribute == "Endurance" or attribute == "Strength" or attribute == "Speed" then
        local attributeLevel = player:getPerkLevel(perk);
        if attributeLevel - magnitude < 0 then magnitude = attributeLevel; end
        if magnitude > 0 then
            local attributeXpFraction = 0;
            local attributeXp = Xp:getXP(perk);
            Xp:setXPToLevel(perk,attributeLevel);
            local attributeXp3 = Xp:getXP(perk);
            local attributeXp4 = attributeXp-attributeXp3;
            
            local attributeXp2 = attributeXpArray[player:getPerkLevel(perk)+1];
            attributeXpFraction = attributeXp4 / attributeXp2;
            local attributeXpRemainder = 0;
            for i=1, magnitude do
                player:LoseLevel(perk);
            end
            Xp:setXPToLevel(perk,player:getPerkLevel(perk));
            if modData.storedExtraXP ~= nil then
                if modData.storedExtraXP[attribute] ~= nil then
                    attributeXpRemainder = attributeXpFraction + modData.storedExtraXP[attribute];
                    modData.storedExtraXP[attribute] = nil;
                end
            end
            Xp:AddXP(perk,(attributeXpFraction*attributeXpArray[player:getPerkLevel(perk)+1])+attributeXpRemainder);
        end
    end
end
#


function SomeMod.IncreaseAttribute(player,modData,attribute,magnitude)
    print("IncreaseAttribute: "..tostring(attribute).." by "..tostring(magnitude));

    local Xp = player:getXp();
    local attributeXpArray = {1500, 3000, 6000, 9000, 18000, 30000, 60000, 90000, 120000, 150000};
    
    local stats = player:getStats();
    
    local attributeLevel = nil;
    local perk = nil;
    
    if attribute == "Endurance" then perk = Perks.Fitness; end
    if attribute == "Strength" then perk = Perks.Strength; end
    if attribute == "Speed" then perk = Perks.Sprinting; end
    
    if attribute == "Endurance" or attribute == "Strength" or attribute == "Speed" then
        local attributeLevel = player:getPerkLevel(perk);
        if magnitude + attributeLevel > 10 then magnitude = 10 - attributeLevel; end
        if magnitude > 0 then
            local attributeXpFraction = 0;
            local attributeXp = Xp:getXP(perk);
            Xp:setXPToLevel(perk,attributeLevel);
            local attributeXp3 = Xp:getXP(perk);
            local attributeXp4 = attributeXp-attributeXp3;
            
            local attributeXp2 = attributeXpArray[player:getPerkLevel(perk)+1];
            attributeXpFraction = attributeXp4 / attributeXp2;
            local attributeXpRemainder = 0;
            for i=1, magnitude do
                player:LevelPerk(perk);
            end
            Xp:setXPToLevel(perk,player:getPerkLevel(perk));
            if attributeLevel < 10 then Xp:AddXP(perk,(attributeXpFraction*attributeXpArray[player:getPerkLevel(perk)+1])+attributeXpRemainder);
            else
                Xp:AddXP(perk,(attributeXpFraction*attributeXpArray[player:getPerkLevel(perk)])+attributeXpRemainder);
                if modData.storedExtraXP == nil then modData.storedExtraXP = {}; end
                modData.storedExtraXP[attribute] = attributeXpFraction;
            end
        end
    end
end
#

Copied and pasted

#

There's also onPlayerUpdate to get the timing of buff removal more precise than every hour.

feral crane
#

yeah, but i want it to last 2 hours so its fine

undone crag
#

It may last 1 hour and 1 minute

feral crane
#

oh true

undone crag
#

Or 2 hour 1 minute idk how u code it gtg for a few minuts

brisk adder
sacred jay
sacred jay
# feral crane can you help?

I haven't created any real mods, but I googled a bit and there seem to be a mod data object that you can store data on

#

You might be able to use that to store the duration and strength data on the player and then retrieve it later on

feral crane
#

thanks, ill try

sacred jay
undone relic
#

Hi everyone! Do anyone knows if there is a way to open a TCP/UDP connection to an external server from the client side and of course, I'm not talking about the PZ official server tool. Is there any API in Lua modding for that or do I need to mod the Java part to make this work?

undone relic
sacred jay
#

So you want to access an HTTP API? I'm not sure about that, tbh.

undone relic
#

Exactly! In more details: I want to make a live-map website and my mod needs to be able to send the player position once every second or so.

jolly goblet
#

Hi guys. I have a question. I need to close the garage doors automatically at 9 o'clock, for example.
I have part of the code, but I can't make it work.

sacred jay
fast galleon
# sacred jay <@578454892364955655> <@271608736685096961> based on your support, I've started ...

nice, I will check it later. I have a bit of automation in place too. I use it to auto fill missing translations and it often helps me find minor issues of submitted translations.
https://github.com/Poltergeistzx/pz-translate-zx

GitHub

Project Zomboid translations automation. Contribute to Poltergeistzx/pz-translate-zx development by creating an account on GitHub.

verbal yew
#

How to remove known recipe?

fast galleon
livid badger
#

what variable is responsible for the miniature icon of the object that should be displayed in the admin panel, or created objects in the mod cannot have miniature icons.

feral crane
#

why wont setPerkLevelDebug affect level 0 skills?

fast galleon
livid badger
verbal yew
#

or playerObj:isRecipeKnown("RecipeID")?!

fast galleon
formal rain
#

im just practicing/learning about how to insert spawns in procedural distribution tables, i think i got that part down but how can i add loot spawns on zombies?

tranquil kindle
livid badger
tranquil kindle
#

Is there a easy way to use Zombie animations as a player for testing?

livid badger
tranquil kindle
cedar anvil
#

Does anyone know what script to use for searching entire containers near the player?

feral crane
uneven vessel
#

How does this work, in the zombie spawn/horde manager window? Are these outfits in the game? Or specifically pre-made zombies? I see some of my mods have outfits here. How would I go about making my own outfits? (I want to spawn specific zombie types for rp events on my server)

#

Is it in scripts?

tame mulch
feral crane
uneven vessel
#

Is there a function in the outfit manager that lets you pick a specific variant if an item has like 12 variants?

verbal yew
#

Guys

#

how to trigger all equipped clothes?

#

from all slots

#

not like:

ArmorSlot_TorsoExtraVest    = playerObj:getWornItem("TorsoExtraVest");
playerObj:isEquippedClothing(ArmorSlot_TorsoExtraVest) and ArmorSlot_TorsoExtraVest:hasTag("zReAAS_TAG_Vest")
#

i need get all clothes, take only with tag and work with it

stray willow
#

So I'm trying to make a recipe for a fishing net from Ivery's Mod to catch shrimp.

It works when you place it down because its considered an item, but then when you pick it up , its a moveable and the game no longer recognizes it for the recipe. How could I fix this?

#
  {
  keep ivery_SmallFishnet/ivery.Moveables.ivery_community_01_75,

I've been trying to figure it out for a while, would really appreciate some help ❤️

verbal yew
#

keep ivery_SmallFishnet/Moveables.ivery_community_01_75,

autumn temple
#

is it possible to make a item that can only be used X amount of times to craft? if so, how?

verbal yew
#

look like it doing with drainable items

autumn temple
#

yeah i might have to

bronze yoke
#

yeah that's a drainable

autumn temple
#

alright, i didnt know if it had to be drainable exlusively or if i could keep it as an item. but i will have to do some ghetto trickery to get it to behave how i want

verbal yew
stray willow
# verbal yew .

So I've changed it to say the following:

recipe Fish For Shrimp
  {
  keep ivery_SmallFishnet/Moveables.ivery_community_01_75,
  BaitFish=2,
  
  Result:Shrimp,
  Time:10.0,
  Category:Fishing,
  Sound:Hammering,
  SkillRequired:Fishing=7,
  }

The issue is , the item is also a tile, so when its picked up having been placed down it becomes Moveable, but that's not an item in the item list. How would I make the tile into an Item specifically?

#

If I'm making sense

autumn temple
bronze yoke
#

number of uses = 1 / useDelta

verbal yew
autumn temple
#

ah

#

that makes sense

#

thanks for the help

verbal yew
#

where u take moveable.object and in result get just an item

stray willow
#

Is it like an evolved recipe?

verbal yew
verbal yew
stray willow
verbal yew
#

hmmm... i'm not have issue when im use moveable items in my recipes

#

i think u should find what items in tile

stray willow
#

That's somethign I'm struggling with too, because I could just make a moveable item with the exact appearance.

verbal yew
#
item LabChromatograph {
        Type = Moveable,
        DisplayCategory = Furniture,
        Icon = LabChromatograph,
        Weight = 16.0,
        DisplayName = LabChromatograph,
        WorldObjectSprite    = demonius_vaccine_01_4,
        Tooltip = Tooltip_LabChromatograph,
    }
#

WorldObjectSprite = demonius_vaccine_01_4, - it's tile

#

but in total its Moveable.LabChromatograph

#

for example

#

same stuff should be in your mod

#

some item has WorldObjectSprite = ivery_community_01_75

stray willow
#

Oh from Demonius' Right..
So I see how liek the item is still called even after placing 🤔 and its name doesn't change.

verbal yew
#

your mod not have item for tile

#

maybe it's main problem

stray willow
#

Guess I'll need to play around with it more then

Where do you have Moveable.LabChromatograph in your items though? Is just marking it as type = Moveable enough?

Gotcha okay, so every tile needs an item for it? It just seems like the item reverts is my issue. I'll play around with it more though

stray willow
#

Maybe it's just that specific tileset. 🤔

verbal yew
#

just create item in script like module Base { item MyItem { Type = Moveable, DisplayCategory = Furniture, Icon = MyItem, Weight = 2.0, DisplayName = MyItem, WorldObjectSprite = ivery_community_01_75, Tooltip = Tooltip_MyItem, } }

stray willow
#

Hope i come back with good results

#

😄

verbal yew
#

in recipe it's should be Moveables.MyItem

#

hmm

#

one mi

#

Moveables

autumn temple
#

how do i get my drainable to be drinkable?

#

do i need to make it a water source?

verbal yew
#

find bottle in vanilla and copy

#
item MayonnaiseEmpty
    {
        DisplayCategory = WaterContainer,
        Type                =        Normal,
        DisplayName            =        Empty Bottle,
        Icon                =        TZ_MayonnaiseEmpty,
        Weight                =        0.1,
        ReplaceOnUseOn      =        WaterSource-MayonnaiseWaterFull,
        CanStoreWater        =        true,
        StaticModel = MayoJar,
        WorldStaticModel = MayoJarEmpty_Ground,
        Tooltip = Tooltip_item_OnlyPurifyMicrowave,
    }

    item MayonnaiseWaterFull
    {
        DisplayCategory = Water,
        Type                 =        Drainable,
        DisplayName            =        Water Bottle,
        Icon                =        TZ_MayonnaiseWFull,
        Weight                =        0.5,
        ReplaceOnDeplete     =        MayonnaiseEmpty,
        UseWhileEquipped     =         false,
        UseDelta            =        0.16,
        ReplaceOnUseOn      =        WaterSource-MayonnaiseWaterFull,
        IsWaterSource        =        true,
        CanStoreWater        =        true,
        FillFromDispenserSound = GetWaterFromDispenserPlasticMedium,
        FillFromTapSound = GetWaterFromTapPlasticMedium,
        StaticModel = MayoJar,
        WorldStaticModel = MayoJar_Ground,
        Tooltip = Tooltip_item_OnlyPurifyMicrowave,
    }
#

for example

autumn temple
stray willow
#
module Volke
{
  imports {
      Base,
  }

recipe Fish For Seaweed
  {
  Base.BookFishing1/Base.BookFishing2/Base.BookFishing3/Base.BookFishing4/Base.BookFishing5,
  keep Base.KitchenKnife/Base.HuntingKnife,
  
  Result:Base.Seaweed,
  Time:10.0,
  Category:Fishing,
  Sound:Hammering,
  SkillRequired:Fishing=5,
  }
recipe Fish For Squid
  {
  keep ivery_SmallFishnet/Moveables.ivery_community_01_75,
  BaitFish=2,
  
  Result:Base.Squid,
  Time:10.0,
  Category:Fishing,
  Sound:Hammering,
  SkillRequired:Fishing=9,
  }
}

None of these items are reading either x_x

#

Is there any noticable errors in the code ?

autumn temple
#

hm, maybe its discord but wouldnt the formatting be the issue, or is the imports base wrong?

autumn temple
#

Yes

#

But maybe the comma is freaking it out

#

Or the formatting

stray willow
autumn temple
#

Everything looks fine to me though. Though I don't think vanilla items need base Infront of them if you're importing base already

fast galleon
autumn temple
stray willow
#

So it was the start. thank you @autumn temple ❤️

autumn temple
#

Niice

stray willow
#

So is there... anyway to check what the animnode looks like?

#

I guess blender?

verbal yew
#

function: zReRipClothing_GetItemTypes_XXX -- file: zReRACAAS_recipecode_vanilla.lua line # 11 | MOD: zRe ARMOR ABSORB SYSTEM by kERHUS function: RipClothing_Leather -- file: zReRACAAS_recipecode_vanilla.lua line # 32 | MOD: zRe ARMOR ABSORB SYSTEM by kERHUS java.lang.RuntimeException: Object tried to call nil in zReRipClothing_GetItemTypes_XXX at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:82) at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:973) at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163) at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980) at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1827) at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:122) at zombie.inventory.RecipeManager.LoadedAfterLua(RecipeManager.java:166) at zombie.inventory.RecipeManager.LoadedAfterLua(RecipeManager.java:133) at zombie.inventory.RecipeManager.LoadedAfterLua(RecipeManager.java:119) at zombie.gameStates.GameLoadingState.enter(GameLoadingState.java:103) at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:145) at zombie.GameWindow.logic(GameWindow.java:298) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71) at zombie.GameWindow.frameStep(GameWindow.java:765) at zombie.GameWindow.run_ez(GameWindow.java:681) at zombie.GameWindow.mainThread(GameWindow.java:495) at java.base/java.lang.Thread.run(Unknown Source)

#
local function zReRipClothing_GetItemTypes_XXX(scriptItems, fabricType)
    if not ClothingRecipesDefinitions["FabricType"][fabricType] then
        return
    end
    local allScriptItems = getScriptManager():getAllItems()
    for i=1,allScriptItems:size() do
        local scriptItem = allScriptItems:get(i-1)
        if (scriptItem:getType() == Type.Clothing) and (scriptItem:getFabricType() == fabricType) then
            if ClothingRecipesDefinitions[scriptItem:getName()] then
                -- ignore
             elseif scriptItem:hasTag("zReRepairableVest")
             or scriptItem:hasTag("zReRepairablePart")
             or scriptItem:hasTag("zReRepairableChemsuit")
             or scriptItem:hasTag("zReRepairableSCRAPS") then
                -- ignore
             else
                scriptItems:add(scriptItem)
            end
        end
    end
end
#

@fast galleon what's wrong

#

why hasTag nil

#

don't undertand how to exclude items with tag

#

for recipe

neon bronze
#

what type does getAllItems include in its list?

verbal yew
#

all items

fast galleon
#

line 11 is this if (scriptItem:getType() == Type.Clothing) and (scriptItem:getFabricType() == fabricType) then?

verbal yew
#

11 where tags begin

fast galleon
#

Item doesn't have hasTag, use getTags() and contains("tag")

verbal yew
#

like scriptItem:getTags():contains("zReRepairableVest")?

grim spindle
#

When making a crafting recipe, are you able to have one of the ingredients be some of an item?
Like you craft something using baking soda, but it only uses 1/10 units of baking soda?

neon bronze
#

Use semicolon after the item like this: BakingSoda;10

nova socket
#

Is there any event that guarantees that getPlayer() is already existing at its runtime?

grim spindle
fast galleon
#

So yes.

grim spindle
#

Or does a green bar appear once you use some?
Like with Remaining:

#

Hm, I was wrong, I don't think you can drink 1/4

#

Bleach might be a single-use item

fast galleon
grim spindle
#

Sorry, still getting a grasp on modding

manic relic
#

does anyone here understand how to make multiple texture clothing use multiple icons?

#

what I mean is red hazmat gets the red hazmat icon while the green hazmat keeps the green hazmat

#

oh hey I got the builder title, nice :D

white tide
#

currently trying to trigger random weather events, managed to find a function that actually works well with mp -
getClimateManager():transmitTriggerBlizzard(12)
This currently sets the blizzard to trigger for what I'd assume is 12 hours but the climate debugger shows the current weather event as 14 hours (not sure why, though it does indeed start a blizzard at least)

Any ideas on how to best go about randomly triggering this?

jovial lava
#

what app is used to make pz mods?

grim spindle
#

But for unpacking the gamefiles, I've only heard that currently none of them are working, but that could be old news

jovial lava
#

cant i use java for it?

grim spindle
#

Yes

jovial lava
#

heard java is hard

#

so i stick to notepad++

pastel raptor
#

Hello everyone people, I'm looking for a modder. It's a paid work 😗 ❤️

nova socket
#

@bronze yoke thanks, managed to achieve this as a mod with isotoscreen

#

Snippet as example from my createChildren of UI

    self.textField = ISTextBox:new(0.001, titleH, self.width, inputH, "", self.text);
    self.textField.anchorRight = true;
    self.textField.anchorLeft = false;
    self.textField:initialise();
    self.textField:enableColorPicker();
    self.textField.yes:setVisible(false);
    self.textField.no:setVisible(false);
    self.textField:onPickedColor(self.color);
    self.textField:setVisible(true);
    self:addChild(self.textField);
#

enableColorPicker() enables it onPickedColor(color) sets and existing color from { r, g, b }

undone crag
shut meteor
#

Hello gents, not sure if this is the appropriate chat to ask this but is there anyone willing to be commissioned for a custom job mod?

undone crag
#

Hello everyone gents people, I'm just checking if there's a bot that puts spiffo on hello messages.

#

:o

formal rain
#

can someone tell me why these sizes are so weird? they stay the same no matter what i put in scale, and basegame tofu is also larger

#

i put them on 0.5 here

bronze yoke
formal rain
#

it worked with comma but basegame tofu is still getting scaled up

#

how do i fix that?

autumn temple
#

I dont understand why placing my item on the ground bricks the game, it never did that before and i didnt change anything?

outer crypt
#

if anyone has an idea how to make this work, let me know. I created a CO2 tank item that I want to deplete when it's used and the weight to match. I have it working in single player without issues but it doesn't update to multiplayer. It reverts to a full tank when found by another player. I have tried self.tank:transmitCompleteItemToServer() and self.tank:getWorldItem():transmitModdata() with no luck.

tame mulch
tame mulch
autumn temple
#

appologizes i was eating. I dont know which script to send. all it was is a custom food item

#

I removed the OnEat line, and it still break's when i place it on the ground

#

so i dont think it was that OnEat code that broke it

outer crypt
# tame mulch Where you call function with :Use() ?

I have been calling it from a timed action sequence. It updates perfectly for a single player game. In multiplayer it shows up as updated until it transfers to another player. Then the customweight and uses reverts to the initial weights and uses.

tame mulch
#

Maybe you somewhere reset tank?

#

or recreate

outer crypt
#

Thanks for checking I'll keep looking

autumn temple
#

i will throw a random icon on and see

autumn temple
outer crypt
# tame mulch Are you sure that :Use() not work?

Interesting, if I drop the tanks on the ground they update to all players on the server. Is there something in code that happens when items drop on to the floor that is correcting the failure? anyone know where I can find the code executed when a player drops something?

outer crypt
outer crypt
#

the popcorn spawns, we can both see it, if we try to eat it directly from the container or grab it directly from the container it disappears a second after we grab it. If we drop it on the ground and pick it up then it stays without issues.

#

and it only happens in multiplayer

autumn temple
#

huh, ive never had a texture error like this happen before

outer crypt
#

maybe the texture did not match the model?

autumn temple
#

oh it does, i just forgot to rename the texture to match what i named it in code. so i know what the issue is

#

but ive never seen it look like that ingame

outer crypt
#

been there 🙂

autumn temple
#

usually the item would just be invisable, not that jumbled mess

outer crypt
#

when I was making kegs I accidently made one bigger than the pub...

autumn temple
#

looks like it just threw a random texture from the game onto every one of its vertices

pulsar rock
#

Hey hi, I'm wondering if someone knows where fall damage is applied?

IsoGameCharacter's DoLand

cedar anvil
#

Could anyone figure out why my SandBox option is not translating? ```VERSION = 1,

option ATTS.jew
{
type = integer,
min = 1,
default = 5,
max = 10,
page = ATTS,
translation = ATTS_jew,
}
option ATTS.jew2
{
type = integer,
min = 1,
default = 6,
max = 12,
page = ATTS,
translation = ATTS_jew2,
}This is a sandbox-options.txt andSandbox_EN = {
Sandbox_ATTS = "Zamazon V2",
Sandbox_ATTS_jew = "Silver Jewelry Price",
Sandbox_ATTS_jew_tooltip = "Adjust price for jewelry. Default price is $4+CreditBonus",
Sandbox_ATTS_jew2 = "Silver Gem/Gold Jewelry Price",
Sandbox_ATTS_jew2_tooltip = "Adjust price for jewelry. Default price is $6+CreditBonus",``` this is a Sandbox_EN.txt which is translation file.

bronze yoke
#

is sandbox_en definitely in the correct location?

cedar anvil
#

Yes! It's in media\lua\shared\translate\EN

#

and saved it as UTF-8

bronze yoke
#

has this mod been posted to the workshop previously?

cedar anvil
#

Yes, and I just updated it with sandbox option.

bronze yoke
#

unsubscribe to the mod and restart the game

cedar anvil
#

Aye!

#

Btw I found more weird thing

bronze yoke
#

never test while subscribed to your mod, but sandbox options especially tend to bug out

cedar anvil
#

It works when I remove other mods

fast galleon
cedar anvil
#

After unsubscribing my mod, it works! I really appreciate it, Albion! You saved me a lot of times.

fast galleon
#

I'm glad I test with nosteam, makes things much better.

bronze yoke
#

i've recently set it to use a separate cache dir and refuse to load workshop

#

still steam mode, just no workshop

fast galleon
#

how do you do that, with -modfolders ? Can you load workshop mods with -nosteam?

bronze yoke
#

yes, -modfolders mods,workshop

#

the steam workshop is referred to as steam there iirc

#

not tried using that to make nosteam load steam workshop, would be neat but i wouldn't expect it to work

fast galleon
keen silo
autumn temple
#

I can't count the many times I downloaded my own mod from the workshop and couldn't figure out why my non-workshop version wasn't working. The pain is real.
But I properly back up my stuff now so I don't need to use my workshop as a file backup

fast galleon
#

Helps to find when and where you broke something... and a lot more...

You need both, but git is for version control like what was described above.

stray willow
#

How would I loop a sound for a single recipe?

#

Like for a single sfx for example, I want to loop the shoveling sfx for a single recipe but not make all shoveling sfxs loop for other recipes

neon bronze
#

Make a custom sound that is as long as the action you do

#

Either a sounds loops all the time or it plays once i dont think there is an inbetween

stray willow
#

aLSO @neon bronze since I'm currently in the testing phase; is there anyway to spawn in with stats maxed to test recipes or items? I hate having to get it each time x_x

#

like increase stats through stat menu, etc.

neon bronze
#

Make a OnCreateCharacter event function that pops all your stats to max

stray willow
stray willow
#
  {
 CatToy,
 CannedSardinesOpen/TunaTinOpen/filcher.SFCatfoodOpen,
 
 Result: Black_cat,
 Time: 5000.0,
 Sound: hungrycat,
 Category: Trapper,
 AnimNode:followme,
 SkillRequired:Trapping=4,
  }```

So I'm trying to figure out  why the AnimNode for followme doesn't work. Can animnodes only be actions :?
#

Everything else works, and other standard actions seem to work , just asking for anyone that has more experience

stray willow
#

Nvm I imagine it has to be an action?

stray willow
#

How would I use an emote as an action ? Or using something not under player/actions like fishing

fast galleon
stray willow
#

How would that work like for adding that xml to others

#

Basically I want to use the emote comehere for a recipe on a server that will be used with other people. if that makes sense 😅

fast galleon
#

make a mod with same file structure media/AnimSets/player/actions fix for typos.

#

You can manually play an emote during crafting, go with whatever you think is easier. Making the XML should be easier.

stray willow
#

Actuall I'll try it and tell you how it goes first sweatt

fast galleon
#
    <m_Conditions>
        <m_Name>PerformingAction</m_Name>
        <m_Type>STRING</m_Type>
        <m_StringValue>FollowMe</m_StringValue>
    </m_Conditions>
#

FollowMe would be the string you use in the recipe.

stray willow
stray willow
#

Sorry I'm new to coding 😅 , only picked it up very recently

#

OH

#

Nvm i see extends

#

Gotcha that's the issue I was having I think 🤔

formal rain
#

forageDefs.LLWildRose = {
type = "LLWildRose",
skill = 2,
xp = 2,
categories = { "WildPlants" },
zones = {
DeepForest = 50,
Forest = 50,
Vegitation = 50,
FarmLand = 50,
Farm = 50,
TrailerPark = 50,
TownZone = 3,
Nav = 3,
},
}

does "Nav" here stand for roads?

stray willow
#

So yeah roads often

formal rain
#

oh

#

i want certain items to only spawn on roads, do i increase their nav number here for it then?

#

(thank you for the video i didn't realize dirk himself had tutorials, will watch them asap)

stray willow
#

I believe so

#

Dirk ahs a bunch of tutorials

formal rain
#

this is more valuable than gold to me, thank you

stray willow
#

I know 🙂

#

He's a saint

stray willow
#

I copied what you said I think....

#

X_X

#

Also I removed the extend from ORIGINAL [BELOW]

fast galleon
white tide
#

Hey just curious, whats the last lua event to load when the game starts? Trying to load an event but it seems to be triggering too early, I've tried OnLoad but no joy.

I guess an alternative would be run the event using EveryMinute and make it initially call a function which checks if the functions/objects exist yet then remove the event, not sure if that would work though?

stray willow
fast galleon
#

give me a moment, you should copy values from default to this new file.

stray willow
#

😮

#

@fast galleon Thank you so much ❤️ - this is all really new to me, but you showing me this means I can now repeat it in the future with other actions, so thank you for taking the time to show me

pulsar rock
#

Anyone got a quick example on how you would go about overriding an existing IsoGameCharacter method with a conditional which either runs a new method, or the original?

#
local original = IsoGameCharacter.originalMethod

IsoGameCharacter.originalMethod = ...

My issue is on how to use/pass on self.

fast galleon
#

self (arg 1) is the class object, then follow the rest of the arguments, if there are any.

#

You would need to patch the function of the target class, so IsoPlayer for example and not IsoGameCharacter.

grim spindle
#

Is it possible to make a mod that allows you to attach more containers to your body?
i.e. backpack on your back, fanny packs on front and back.. then the mod could add duffle bag on side, first aid kit on hip etc...

fast galleon
#

Have you seen Authentic Z mod?

grim spindle
#

I have not :v

grim spindle
#

Hm, looks awesome, I'll have a go at it

fast galleon
#

If you just want fanny pack front and back then there's also eggons fanny pack mod.

Authentic Z has more than 10 attached slots, it will probably have something like what you're looking for.

grim spindle
#

Thank you! :v

grim spindle
formal rain
#

im trying to add recipes using Crafting Enhanced Core stations and in the readme example is this:

recipe Make Convert Nails
{
Screws=1,
keep Hammer,

    Result:Nails,
    Time:100.0,
    Category:Chemistry,
    Sound:Anvil,
    NearItem:Laboratory Table,
    AnimNode:BuildHigh,
    Prop1:Hammer,
    Prop2:Source=1,
}

my question is what does "Prop2:Source=1," stand for here?

coarse quiver
#

Can i safely add vehicle mods to an existing game? will the new vehicles spawn?

fast galleon
fast galleon
formal rain
#

it'll just make character's hands look empty with the animation

#

is that correct?

tranquil kindle
formal rain
#

nearitem is what makes CEC stations work

#

this

#

if i understood it right

tranquil kindle
#

I'll take a look at it once im home since im curious about it. Maybe it works for tiles?

fast galleon
formal rain
#

it makes it that you need to be in a certain tile distance of these tiles for the recipes to be craftable

#

i'd love to talk more about it since i barely understand how they work danny

tranquil kindle
#

If i knew it sooner id probably use this in my TLOU gun mod.... I was looking for a way to use table tiles as workbench, then would probably do my own tile.

grim spindle
#

Hm, it seems Authentic Z is not compatible with noirs attachments.. once a bag has been upgraded, noirs attachments won't interact with it

verbal yew
formal rain
#

they dont use workbench anymore afaik

verbal yew
#

wow

formal rain
#

(hi im a fan of your mods btw Blushcat )

verbal yew
#

need to look into scraps, thanks for info, its can help me so much :з

#

ah, yep, hello

mystic vessel
#

before and after.
I made small changes to the hazmat, reduced the gloves and changed the boot model.
Now if you wear military boots this becomes visible.

And it is compatible with any mod that uses the game's vanilla model

manic relic
#

bruh I was workin on the same thing xD

#

only I made a level C hazmat / hazard suit

mystic vessel
manic relic
#

well I guess kinda

mystic vessel
#

i maded only a little few changes, and it's not a stand-lone mod

manic relic
#

true

mystic vessel
#

It's from my mod "Boots over overalls"

#

Makes all coveralls to be tucked in boots, and a made the hazmat the same thing

manic relic
#

oh you made that?

#

nice

mystic vessel
#

Thanks :)

mystic vessel
# manic relic

But your model, it's look awesome man. You are doing a great job

manic relic
#

Thanks :D

#

really wasnt sure if it looked right

mystic vessel
#

It's look awesome, the "hood" idea its great

#

and make sense

manic relic
#

thanks

#

funny thing is the hazmat is a combination of the hoodie model with hood up and shellsuit pants

mystic vessel
#

works great

#

The only main noticeable its the boots

#

and i reduced a little the gloves

#

not so many changes

manic relic
#

honestly the still are notable

#

*noteable

#

makes it look more realistic

outer crypt
#

When a mod has a requirement file does the compiler look only in the mod, the mod and the core game, or all mods and the core game for the file? I know this one looks for a file called ProceduralDistributions but does it know the full path? Is there a way to distinguish where its coming from or can I pull a file from another mod I already created if it's a listed prerequisite? Example: require "Items/ProceduralDistributions"

mystic vessel
manic relic
#

Thanks a lot :D

#

and you keep making cool ideas that looke awesome :D

#

🤜🏻

mystic vessel
#

updated

mystic vessel
manic relic
#

100% spoken like a chad

mystic vessel
#

Thanks man, i'm waiting for you to post more mods here and share your ideas

manic relic
#

I will :D

#

you too

brisk moth
#

Hey
Have same one a Mod to Read Faster? it is so slow i need a Mod that works i have the Faster reading with Flsh on the Mod but its dont work have some one a mod for me

stray willow
#

🤔 Its under player actions but It still isnt doing the animation.

#

Okay, I see it String Value is fill_container_tap ,

What it just be as simple as changing the string value with FillBottleFromTap?

latent torrent
#

is this right? cause I cant seem to get it to spawn

hearty timber
latent torrent
#

i already tried 100 but changed it to 10 cause i thught 100 was breaking it

hearty timber
#

I put my weapon on 20 because it was spawning like 3 or 4 per cabinet

latent torrent
#

my Base and your RE31999 before the item what does that mean

#

it was just in the example so i put it

hearty timber
#

The RE31999 it's my script folder file

#

BenelliM3S is the model base

latent torrent
#

still cant get it to spawn, i can use another mod to spawn one in my inventory but the model is massive but it wont spawn anywhere in the map

quartz holly
#

Does anyone have a tutorial on how to create clothes? I use blender 3.6

tough peak
#

I have a problem to update my mod and want to your help. I would like to get answer by quoting of someone's question, same as me.

quote
I want to update my mod by adding 3D models to my items, but the models don't work - item icons show up when I place them. I got the models in "WorldItems" folder inside "models_X" folder in .FBX format. The textures of the models is in the right place too. I added "WorldStaticModel = ItemModel," to the item script as well.
unquote

hearty timber
latent torrent
#

It's called SpearSupremecy_weapons

#

And the name of the distribution file is ss_ProDistrubution

autumn temple
#

is it possible to give a melee weapon an animation. such as having a part of it constantly rotating or moving?

#

like an example being a sawblade like the Whirligig from bloodborne, the blades constantly spinning and when i go to attack the spin ramps up through the attack animation.

half pelican
#

how to correlate the coordinates like
attachment att {offset = 0.1400 -0.0300 0.0900, rotate = 280.0000 025.0000 85.0000,
with the position on the body?

fast galleon
tulip cipher
stray willow
#

Hmm

#

So I was looking in regards to soundblocks, and while looking at skill journals I saw this:

    sound PencilWriteSounds
    {
        clip { file = media/sound/Pencil1.ogg, }
        clip { file = media/sound/Pencil2.ogg, }
        clip { file = media/sound/Pencil3.ogg, }
        clip { file = media/sound/Pencil4.ogg, }
        clip { file = media/sound/Pencil5.ogg, }
        clip { file = media/sound/Pencil6.ogg, }
    }

    sound PenWriteSounds
    {
        clip { file = media/sound/Pen1.ogg, }
        clip { file = media/sound/Pen2.ogg, }
        clip { file = media/sound/Pen3.ogg, }
    }

If its written like that, does it mean it plays all of those sounds?

#

Or does it randomly choose one or how would the game read it?

{
category = Item,
    is3D = true,
    clip {file = media/sound/wildturkey.wav, }
    clip {file = media/sound/wildturkey2.wav, }
}

I tried to make my own with wildturkey sounds and the first one is a turkey gobbling and the second is a gunshot being fired so I was wondering if that would work 🤔

stray willow
#

For... Xp functions, is there anything specific or orderly about it?

    player:getXp():AddXP(Perks.Tailoring, 1);
end

function Recipe.OnGiveXP.Tailoring2(recipe, ingredients, result, player)
    player:getXp():AddXP(Perks.Tailoring, 2);
end

function Recipe.OnGiveXP.Tailoring4(recipe, ingredients, result, player)
    player:getXp():AddXP(Perks.Tailoring, 4);
end

function Recipe.OnGiveXP.Tailoring6(recipe, ingredients, result, player)
    player:getXp():AddXP(Perks.Tailoring, 6);
end

function Recipe.OnGiveXP.Tailoring8(recipe, ingredients, result, player)
    player:getXp():AddXP(Perks.Tailoring, 8);
end

function Recipe.OnGiveXP.Tailoring11(recipe, ingredients, result, player)
    player:getXp():AddXP(Perks.Tailoring, 11);
end```

-- These functions are defined to avoid breaking mods.
Get1TailoringXP = Recipe.OnGiveXP.Tailoring1
Get2TailoringXP = Recipe.OnGiveXP.Tailoring2
Get4TailoringXP = Recipe.OnGiveXP.Tailoring4
Get6TailoringXP = Recipe.OnGiveXP.Tailoring6
Get8TailoringXP = Recipe.OnGiveXP.Tailoring8
Get11TailoringXP = Recipe.OnGiveXP.Tailoring11
#

I see this but I also see like...

#
    player:getXp():AddXP(Perks.MetalWelding, 5);
end```

Give2MWXP = Recipe.OnGiveXP.MWXP2
Give4MWXP = Recipe.OnGiveXP.MWXP4
Give5MWXP = Recipe.OnGiveXP.MWXP5```
#

Is there a specific style? Do you need every skill or only if your using that specific amount of experience points for a recipe?

bronze yoke
#

you don't need to make anything you aren't using

#

they're just functions, the reason they're kept neat is for ease of use and maintenance

formal rain
#

im trying to figure out how to see how many charges a drainable item has

#

item Gravelbag
{
DisplayCategory = Material,
Weight = 2,
Type = Drainable,
UseWhileEquipped = FALSE,
UseDelta = 0.25,
DisplayName = Gravel Bag,
Icon = Gravelbag,
ReplaceOnDeplete = EmptySandbag,
ReplaceInSecondHand = Bag_Sandbag_LHand holdingbagleft,
ReplaceInPrimaryHand = Bag_Sandbag_RHand holdingbagright,
WorldStaticModel = GravelBag,
Tooltip = Tooltip_item_empty_sack_container,
}

#

is it the "UseDelta" part?

#

0.25 means it uses 0.25 of the entire thing and it means the item has 4 charges?

#

and if yes, can i change it to any custom amount while making a new item or do i need to write a lua for it like we do with custom exp amounts?

fast galleon
formal rain
#

so for new drainable items i need to use pre-decided numbers?

#

basically copy paste from vanilla items

formal rain
verbal yew
formal rain
#

thank you

verbal yew
#

and yep, like poltergeist say:
If item uses from actions - its coded on lua, like for gravel bag.
For recipes like with wood glue or other same - just without another lua-stuff

formal rain
#

precious info as usual

#

saved me some time from trying to figure out why my 100 charge flintstones wont work without fancy lua thingies

#

thanks again

small topaz
# tough peak I have a problem to update my mod and want to your help. I would like to get ans...

my guess is still that you simply forgot something while setting up everything. bringing 3d models into game requires completition of several steps and is super prone to errors. at least for me, it almost always happens that I am convinced that I've done everything right and the model still isn't there. it always turns out that I still forgot smth. 😅 can only speak for me but my guess is that other modders (even experienced ones) know this as well.

so I suggest to double, triple and also quadruple check everything you've done. you might also have a look at other working mods introducing new 3d items and try to set up everything in the same way as those mods.

small topaz
# quartz holly Does anyone have a tutorial on how to create clothes? I use blender 3.6

Here is a tutorial which explains the basics about bringing a new 3d model (including clothes) into the game: https://theindiestone.com/forums/index.php?/topic/37647-the-one-stop-shop-for-3d-modeling-from-blender-to-zomboid/

The Indie Stone Forums

Hello and Welcome! Here you will find a concise and comprehensive guide and tutorial of making 3D models for Project Zomboid. Currently, this will mainly pertain to custom Clothing creation but may include weapon creation in the future. This will present how to create models from scratch with Ble...

tough peak
bronze yoke
#

you don't seem to mention a model script in your post

small topaz
# tough peak Thank you for your words. I appreciate if you can tell me other steps that you g...

as albion said, you also have to set up a special script entry of the form

 model JarFoodBellPeppers_Ground
{
    mesh = WorldItems/JarFood,
    texture = WorldItems/JarFoodBellPeppers,
    scale = 0.4,
}

those entries can be added to a new txt file in your mod's script folder and appended to module Base { }. I am not exactly sure about naming convention for those file and its entries. (don't know this by heart).

bronze yoke
#

doesn't matter

#

all script files are the same

small topaz
#

I also don't know anymore what exactly you have to write behind "model...", "mesh = ..." and "texture = ..." to make it work

in case you can't find an answer here in chat, it can easily be figured by reverse engineering other mods or vanilla game

tough peak
#

Thank you so much guys~ I'll check and try again!

wicked crane
#

anyone familiar with tiles / tilesheets? I am having difficulties.

I have made tile properties modifications before, but I am trying to import my first texturepack.

I appear to be doing everything correctly- my folder structure is media\texturepacks, my .pack file is present, in the mod.info I have defined my tildef and pack, but whatever I do the tiles won't show in the brush tool. mod is present in-game

autumn temple
#

is it possible to have a melee weapon be animated separate from its normal idle and attack animations?

undone relic
#

Hello! I have defined some Tiles in a tiledefinitions.tiles file using the editor. How do I use them in Lua? I want to replace a default vanilla tile when the game loads with one of the tiles defined in the tiledefinitions.tile file.

wicked crane
# undone relic Hello! I have defined some Tiles in a tiledefinitions.tiles file using the edito...

hi- maybe this will help you. not quite exactly what you're looking for, but this is when @fast galleon made an oven sleepable

local tiles = { "appliances_cooking_01_16", "appliances_cooking_01_17", "appliances_cooking_01_18", "appliances_cooking_01_19", }

Events.OnLoadedTileDefinitions.Add(function(manager)
    for _, name in ipairs(tiles) do
        local props = getSprite(name):getProperties()
        props:Set("BedType","goodBed",false)
        props:Set(IsoFlagType.bed)
    end
end)
stray willow
latent torrent
#

does anyone know why my game isnt using my distribution, i can spawn the item in but it just wont spawn in any containers

fast galleon
#

optimisation question:

OnPlayerUpdate: compare current state with cached state
Vs
OnAiStateChange: check instanceof IsoPlayer

It seems like player update is less efficient unless there are a lot of zombies actively changing states.

lime delta
#

I'm trying to modify an existing mod so that it reduces plant health based on the temperature of the tile plant is on. I can load the mod into a server but it just won't do anything. The original mod that uses the outside temperature does work. I am not sure why it is not working.

#

If this is not a huge undertaking(I assume it is not) I am also happy to commision a modder that can make this change for my server

bronze yoke
#

this is a .txt file

#

change it to .lua

lime delta
#

I just sent a txt version so that it can be a collapsable text on discord. The original is in lua, and I can see it as a mod when I am in the server

latent torrent
cinder kindle
#

Fmod Bank Tools sucks 😔

undone relic
hearty timber
#

Hello buddys, i'm doing a second weapon mod, but it's don't appear, it's invisible, and shows on console "FAILED TO LOAD MESH", but it appears on attachament editor, what i could do to fix that?

#

When i spawn it, it's invisible :/, someone know how to fix?

hearty timber
#

I fixed it, was the name 😄

autumn temple
#

So for animations. If I want to make a custom animation for using an item. Do I just make a normal method of making character animations by using the character model but just adding the item to the model?

gilded hawk
#

Can someone remind me how require works in zomboid modding, and how it affects the loading of files?
I'm trying to come back into modding and I keep finding myself with _FilenameHere or 0Filename just to make sure a file is loaded before another one

sleek hull
#

What type of object is the Floor inventory that items go to when dropped?
Trying to get a list of all items on the floor within reach of the player

mellow frigate
sleek hull
polar basalt
#

is there a way to allow a listBox multiple selections

nimble spoke
gilded hawk
bronze yoke
#

both are perfectly valid

#

any function that takes one string argument can use this syntax

pulsar rock
#

Anyone got a clue how I'd go about overriding a method in IsoGameCharacter?

#

I've tried the following:

ConfigurableFallDamage.originalIsoGameCharacterDoLand = IsoGameCharacter.DoLand

IsoGameCharacter.DoLand = function(self)
    ConfigurableFallDamage.updateFallTime(self)
    ConfigurableFallDamage.originalIsoGameCharacterDoLand(self)
end
#

This doesn't appear to work, however

#

Wait, crap, do the IsoGameCharacter methods need :?

bronze yoke
#

nothing needs :, : just adds an implicit self

pulsar rock
#

Ah

#

Got a clue how I'd go about this?

bronze yoke
#

yeah, just waiting for my own projects to load up so i can double check and not tell you the wrong thing 😅

pulsar rock
#

Much appreciated! 😄

bronze yoke
#

it's been a while so i forget the exact syntax

autumn temple
#

I have an unanswered question about animations if anyone is knowledgeable enough to assist me

bronze yoke
#
local metatable = __classmetatables[IsoGameCharacter.class].__index
local original_DoLand = metatable.DoLand

metatable.DoLand = function(self)
    -- you know this part
end
#

turns out i was exactly right and did not need to check 😔

#

one thing to keep in mind though

pulsar rock
#

Ah, so I need to do the classmetatable stuff first?

bronze yoke
#

yeah, you need to edit the class metatable

bronze yoke
#

IsoGameCharacter is an abstract class so overwriting a function on it doesn't really do anything

#

if you're trying to target players you should overwrite the IsoPlayer metatable

pulsar rock
#

It seemed that DoLand was only implemented in IsoGameCharacter, so I figured that'd cascade down to any child classes?

#

Or am I wrong there?

bronze yoke
#

it would, but that's just not how they're propagated to lua

#

oh another important thing you might not be aware of

pulsar rock
#

Ah, alright, so I should override in IsoPlayer instead.

bronze yoke
#

this will only override the function for lua's purposes

#

if it's called from java there's not really anything you can do to it

#

the metatables store lua's references to the java methods, not the java methods themselves

pulsar rock
#

Hm

#

So there's no way to override the DoLand method I'm guessing?

bronze yoke
#

if it's called from java, no not really

pulsar rock
#

Any idea if there's a sane way of reducing fall damage? An alternative would be reducing it on player update (and making sure you don't reduce every single tick), but that seems... ugly

bronze yoke
#

someone who needed to eradicate fall damage just reset the falltimer every player update

pulsar rock
#

I want to make it configurable

#

E.g. 50% fall damage

#

I know how to do it using player update, but that seemed pretty ugly

#

Considering you'd have to take into account each time the falltime value updated and whatnot

#

Hence why I was hoping to just grab the final value before DoLand

#

No way to fire a method before a java method is called?

#

Some kind of pre-event hook?

#

/ make custom events?

bronze yoke
#

you could wait for isbFalling to become true, count the time, wait for it to become false again, and then apply fall damage

#

while keeping the fall timer at 0 so java doesn't apply any damage

pulsar rock
#

Hm

#

There's a fair bit of conditional logic in DoLand, however

#

Applying fall damage myself seems like it might act oddly in some scenarios / not play well

bronze yoke
#

yeah, i'm going for a full reimplementation angle here

#

you could modify the fall timer, e.g. each tick calculate a fall timer delta and halve the amount it changed by to (approximately) halve fall damage

pulsar rock
#

Guess I'll go for something akin to

previousFallTime = 0

on player update:
  if fallTime > previousFallTime:
    fallTime = fallTime * percentageFallDamage
#

Does fall time update each tick?

#

I'll go with the delta idea

#

Good idea

#

That's an elegant solution, actually

#

Thanks!

#

Just curious, what usecase would there be to override a class's metaclass if it doesn't propagate to the actual execution? @bronze yoke

bronze yoke
#

whenever the method is called from lua, some methods are exclusively called from lua and others are at least sometimes called from lua

pulsar rock
#

Ah, is there some documentation on this?

bronze yoke
#

e.g. in one mod i overwrite InventoryItem's getName since the ui lua uses that to get the item's name

pulsar rock
#

This should technically work, if DoLand were to be called through LUA, right?

--- Store the original IsoPlayer:DoLand() method.
local metatable = __classmetatables[IsoPlayer.class].__index
ConfigurableFallDamage.originalIsoGameCharacterDoLand = metatable.DoLand

--- Override method IsoPlayer:DoLand() to apply the fall damage multiplier.
metatable.DoLand = function(self)
    ConfigurableFallDamage.updateFallTime(self)
    ConfigurableFallDamage.originalIsoGameCharacterDoLand(self)
end
#

Just so I've got it down for potential future mods

bronze yoke
#

looks good to me

pulsar rock
#

Got'cha, thanks

#

Is there any documentation which methods are called through LUA, and which through Java?

bronze yoke
#

not really

#

sometimes it's intuitive, sometimes you just have to look through it yourself

pulsar rock
#

Alright, thanks!

sleek hull
#

How does one actually check if all players are asleep?
IsoPlayer has isAsleep() to check if the given player object is asleep, but it also has allPlayersAsleep(). The latter is just causing my mod to hang anytime it calls allPlayersAsleep() regardless if it's singleplayer or multiplayer...

bronze yoke
#

how are you calling it?

sleek hull
#

p:allPlayersAsleep()
p being an IsoPlayer object of course

bronze yoke
#

IsoPlayer.allPlayersAsleep()

#

it's a static method so it can't be called on an instance

sleek hull
#

Huh, the more you know. So I can just call it like IsoPlayer.allPlayersAwake()?

#

The answer is yes it would seem, thanks albion!

fast galleon
bronze yoke
#

since it only modifies the rate of change, it should only be affected to the same extent vanilla is

fast galleon
#

I didn't register the damage received but it seems like it would not scale the fallTime gained during the last tick.

#

There's an alternative to add back the "FALLDOWN" damage, but it's also not perfect.

cinder kindle
#

Is there an other way to extract bank to wav, other than Fmod Bank Tools ?

pulsar rock
fast galleon
#

It should work well in 99% cases.

cedar anvil
#

Can I use multiple images on a single item? like item Zabpbody { DisplayCategory = Junk, Weight = 0.1, Type = Normal, DisplayName = ProtoType Part Fragment, Icon = Zamapart1;Zamapart2;Zamapart3, }

vast nacelle
#

You can do that for clothing items that have multiple variations defined in their xml as they use the "IconsForTexture" parameter instead of "Icons".
Not for any other item though.

cedar anvil
#

Ah ha, that's why only the clothitems have multiple icons/textures. Thank you!

tough peak
#

I'm going to place an item I made on the floor and use it as a tool to make another item. I'm trying to apply vaccine mod "on test" engine, but I don't know what <IsNearLabEquip> is.

---------------------------------------- OnTest ----------------------------------------

-- Checks if there is Microscope near by
function LabRecipes_IsNearMicroscope(sourceItem, result)
return LabRecipes_IsNearLabEquip("LabMicroscope") ~= nil;
end--function

drifting ore
#

does anyone know to make a true music mod

tough peak
drifting ore
#

I have a mod idea i just don’t know how to code.. i can do the modeling but if someone would like to colab with me and do the code that would be great 😭 dm if ur interested

sand saddle
#

Hey there is there a way to do a "getparam" like there is "doparam" ? i was making a mod for personal use that added a sandbox setting to adjust the weight of "ALL" (included modded in) items. i got stuck on WeightWet and WeightEmpty. is there a way to "read" these values? whenever i try to adress them i only get "nil" back.

#

silly example if i dont adress these values is a propanecanister that weights 2.5kg when full and 5kg when empty..

dapper aurora
#

Anyone know if a higher res inventory UI mod exists? Something's been bugging me lately about the inventory icons taking nice crisp pixel art and barfing out blurry pixel icons

formal rain
#

did anyone get around checking crafting enhanced core stuff? pepeLurk is there an extra step i need to take to make my recipes have dependancies on another mod?

fast galleon
formal rain
#

that's to add it to steam page right?

fast galleon
formal rain
#

oh... that's weird

#

just made it work without doing anything

#

is that... bad?

sand saddle
#

you can access most stuff of other mods as long they have it. the dependency is mainly for your users. if they only enable yours.... it wont work. the require makes sure they enable it.

formal rain
#

so require=id is what makes the requirement load in too when you pick a mod to ensure they load in together

#

right?

sand saddle
#

yes

#

or it will show as red if they dont have it

bronze yoke
#

the module in your script and in your distributions file don't match

sonic osprey
#

so I should use the same? like FALANGE.camiseta_falange?

bronze yoke
#

yeah

stray willow
#
module volke
{
    imports
    {
    Base
    }

    item tiedbranch
{
    Weight  = 3.0,
    Type    = Normal,
    Icon    = tiedbranch,
    DisplayName    = Tied TreeBranches,
    ResizeWorldIcon = -0.3,
    }
}
#

What's being read wrong here?

#

🤔

tranquil kindle
#

Try adding DisplayCategory = Material,

#

?

#

Also whatsResizeWorldIcon = -0.3,

stray willow
tranquil kindle
#

I dont think thats possible

#

Could be wrong, but why would you want to do that?

stray willow
#

Let me try and play around with it some

tranquil kindle
#

Item being big?

bronze yoke
#

you're looking for ScaleWorldIcon

stray willow
#
module Volke
{
    imports
    {
    Base
    }
    
recipe Make Bundle of Twigs
  {
  Treebranch=10,
  Sheetrope=2,
  
  Result:tiedbranch,
  Time:75.0,
  Category:General,
  Sound:ClothesRipping,
  CanBeDoneFromFloor:true,
  }
recipe Unbundle Treebranch
  {
  tiedbranch=1,
  
  OnCreate:Recipe.OnCreate.GiveRope,
  Result:Treebranch=10, 
  Time:50.0,
  Category:General,
  Sound:ClothesRipping,
  CanBeDoneFromFloor:true,
  }
}
stray willow
stray willow
iron sapphire
#

are there any experienced developers here that are able to answer a few questions about the limits of modding in PZ

bronze yoke
#

sure

iron sapphire
sand saddle
#

im currently messing around with lua scripting and ran into a problem. i am making a mod for personal use (for now) that adds a sandbox setting to adjust the weight of "ALL" (including modded) items. it works fine with getActualWeight() and "doparam()"i got stuck on WeightWet and WeightEmpty. is there a way to "read" these values? whenever i try to read these values i only get "nil" back. i can set them just fine with doparam but i need their orginal values for the sandbox settings

#

wasnt there a parameter "hastobe learned" or something like that? maybe add that. i would need to google the correct wording.

bronze yoke
#

oh, hold on

sand saddle
bronze yoke
#

yes, that syntax only works with my api installed

#

apparently i just missed the getters though 😅 you don't need to use the field

#

item:getWeightEmpty() item:getWeightWet()

sand saddle
#

my first experiment returned something silly. full Propane tank : 2.5kg . empty tank 10kg ;P

#

item:getWeightEmpty() these return "nil" as well.

#

ahh. your mod. right.

#

also i think the performance impact is low on my end. even if using your mod. cuz i only invoke it once at the creation of the server. i just loop trough all the items ;P

bronze yoke
#

there shouldn't really be any large impact, but if the getter is returning nil i'm not sure if my api would help

sand saddle
bronze yoke
sand saddle
#

ok now i am very confuzzled. did i mess up some other way?

#

dives back into notepad++

bronze yoke
#

yeah, i checked and the getters don't do anything strange, so my api is not needed here

#

it doesn't seem like it should ever return nil, it does have a default value of 0 so even if it wasn't set somehow you shouldn't get nil

sand saddle
#

ahh right i got confused lemme try that again.

#

works like a charm now. however i get strange trails.

#

LOG : General , 1698864393223> [CustomizableWeightMultiplier] Item: Base.Pillow
LOG : General , 1698864393223> [CustomizableWeightMultiplier] Old Weight: 0.800000011920929
LOG : General , 1698864393223> [CustomizableWeightMultiplier] New Weight: 0.07999999821186066

bronze yoke
#

that's fine, just floating point inaccuracy

sand saddle
#

but it really gets every item now. included modded. this is with a multiplier of 0.1 (10 times ligther)

#

LOG : General , 1698864394391> [CustomizableWeightMultiplier] Item: TW.LargePropaneTank
LOG : General , 1698864394391> [CustomizableWeightMultiplier] Old Weight: 20
LOG : General , 1698864394391> [CustomizableWeightMultiplier] New Weight: 2
LOG : General , 1698864394391> [CustomizableWeightMultiplier] Old WeightWet: 0
LOG : General , 1698864394392> [CustomizableWeightMultiplier] New WeightWet: 0
LOG : General , 1698864394392> [CustomizableWeightMultiplier] Old WeightEmpty: 10
LOG : General , 1698864394392> [CustomizableWeightMultiplier] New WeightEmpty: 1

#

i should remove the "print()" calls i used for debugging now

bronze yoke
#

i was going to mention that, prints are the most expensive thing in the game so they should be disabled/removed when a mod is finished

sand saddle
#

i wonder if such a mod would be worth publishing. 🤔

#

my idea was why try to increase carry weight if its limited to 50kg anyways. why not reduce the weight of everything instead?

#

yes i am a hoarder

#

since math.floor isnt working anyway im removing that too.

#

also a last question. what "Events." should i use? i currently use Events.OnInitGlobalModData.Add(myfunction) i wonder if thats the best option.

bronze yoke
#

i'd say it is

#

that's the one i recommend

sand saddle
#

nod nod thanks albion.

sand saddle
#

off to the next adventure! equalizing runspeedmodifier, stomppower and combatspeedmodifier!

bronze yoke
#

the first thing to discover on this adventure is that runspeedmodifier doesn't do anything

sand saddle
#

i plan ahead 🙂 many mods do also

#

plan : run trough all items. note down the highest value of each. run trough them again and adjust to the highest value.

#

will report back when i get it to work 🙂

stray willow
#
module Volke
{
    imports
    {
        Base,
    }

item tiedbranch
{
    DisplayCategory = Furniture,
    Type    = Normal,
    Icon    = tiedbranch,
    Weight  = 3.0,
    DisplayName    = Tied TreeBranches,
    ScaleWorldIcon = 0.1,
  }    
recipe Make Bundle of Twigs
  {
  Treebranch=10,
  Sheetrope=2,
  
  Result:tiedbranch,
  Time:75.0,
  Category:General,
  Sound:ClothesRipping,
  CanBeDoneFromFloor:true,
  }
recipe Unbundle Treebranch
  {
  tiedbranch=1,
  
  OnCreate:Recipe.OnCreate.GiveRope,
  Result:Treebranch=10, 
  Time:50.0,
  Category:General,
  Sound:ClothesRipping,
  CanBeDoneFromFloor:true,
  }
}
#

Trying to figure out what's wrong here

#

I've seldom made custom items

granite arch
#

Not sure if this is the right channel, but I'm looking to commission someone that's able to make me a few clothing items. Feel free to DM me!

vast nacelle
outer crypt
#

Is there a way to force a refresh of the items in a container? Example: If you have a stack of food items and change the state of them to cooked it doesn't update immediately. I have seen this in the player's inventory too if its in a stack, the player needs to click on an item before it updates and separates the cooked item from the rest of the stack.

ebon needle
#

Any idea how I could add more sounds to schizo? Would love to add a Discord ping sound just to mess with the schizos on my server

drifting ore
#

Where can i find the 3d files for the vanilla cars?

drifting ore
#

Would anyone know the function for removing an overlay?
Trying to have overlays come and go on sound queues, I can get them to popup, but dont know how to remove them

ebon needle
drifting ore
ebon needle
drifting ore
sand saddle
#

i made a mod but my stupid brain cant decide to publish it or not -.- ----what if it still has bugs,---- what do i use for pictures,---- what do i write into the description... aaaarrrghh

fast galleon
sand saddle
#

its a pretty simple mod. it just adds a sandbox option to change the weight of all items (included modded ones) by a multiplier. 0.5 half as heavy, 2.0 double as heavy.

#

im not a graphics guy so. how do i make screenshots for that laughs

ebon needle
fast galleon
# ebon needle

You need to go to the Schizophrenia mod folder.

e.g. Steam\steamapps\workshop\content\108600

ebon needle
#

I am dumb

#

When loading mods through the workshop, how do I make sure my modpack always gets loaded at the end?

fast galleon
#

For servers you would list it last in the ini. For solo you turn it on and off.

#

If you just want to edit other lua files, you can require that file in your lua file and then make changes.

ebon needle
fast galleon
# drifting ore

nevermind, everything is local and not as a module. Overwrite the full file.

ebon needle
fast galleon
#

Use the exact same path.

ebon needle
#

Gotcha. Thanks!

#

You're a godsend

sand saddle
sand saddle
#

kinda happy. released a the mod 2 hours ago. 23 people looked at it and 13 currently have it subscribed 🙂

#

whopping 50% subscribers 🙂

knotty quartz
#

How can I make a mod that changes zombie sounds?

pulsar niche
#

There was this one mod that let you set, which items you empty from a bag to which container, emptying with one button.

What was it called?

pulsar niche
#

Brilliant!

#

Do the mods update in-game or do I need to reboot the game until a new mod appears in it?

fast galleon
#

Download depends on your steam settings. To add a mod you will need to quit to menu and enable the mod for the specific save.

autumn temple
#

where can i find "Idle_Weapon2" ive been looking into trying to modify that for a custom weapon mod but i cant seem to find the animations

#

same thing with Run_Weapon2

#

i cant find any reference of them when searching, even though you have to put them in your weapons

fast galleon
fast galleon
# last cloak Up

Maybe you can give more detail about what you are looking for?

last cloak
fast galleon
last cloak
fast galleon
# last cloak yes

There are logs user % died, % is dead, % killed %.

Logs are in your cache folder, e.g. %user%/Zomboid/Logs

fast galleon
autumn temple
grizzled fable
#

anybody knows how to modify the over-encumbered damage?

fast galleon
#

e.g. AnimSets/player/run/run2hands.xml

autumn temple
#

ahhh thanks

#

i will look into it

autumn temple
fast galleon
autumn temple
grizzled fable
#

anybody knows how to modify the over-encumbered damage? i wanna raise to more than 75%

autumn temple
#

this being the example, with this item in my weapon pack. I want the blades to constantly be rotating

fast galleon
autumn temple
#

ive been trying to ask it for 3 days with no luck of being noticed deadge

autumn temple
fast galleon
#

This is something that is necessary for a working whip weapon.

verbal yew
#

@fast galleon do you know each number part for bodyPartIndex?

autumn temple
#

so its basically another thing that i need to wait for build 42 to hopefully make possible?

#

which seems to be a trend with like 90% of the things i want to do deadge

fast galleon
pulsar niche
#

Some items go to my pocket automatically (emptying a pot, shredding clothing).

Is there a mod that moves them automatically to whatever container I carry on me?

verbal yew
#

RecoilDelay on guns - it's ROF?

bronze yoke
#

kinda