#mod_development

1 messages · Page 261 of 1

raven zinc
#

There was a project france?

sour island
#

Would be cool to crunch out KY and then go state by state

#

Coast to coast roadtrip challenge

safe seal
#

Managed to make my mod better, but good god it took me way too long to figure out how to do it. My lack of coding experience bit me in the ass for sure. I imagine it still would make more experienced modders cringe, but I think I've made it compatible with most other foraging mods

fresh isle
#

I'm looking at Better Flashlights, Grimlight. Is there a way to make something from an outfit have light without filling an attachment slot? It looks like the only options are to have an object act as a flashlight (in hand) or as an attachment to something, and then toggleable, like having a weapon attachment slot to interact with that is filled either as part of a gun or connected to a clothing that treats it as a weapon attachment slot filled

#

viewing headlight from Better Flashlights

cursive hull
#

ALright, I'm starting from scratch.

#

I want to make an identical copy of the friendship bracelet, renamed to the "Melon Bracelet". How do I do that?

#

Preferably using as many base in game assets as possissible.

hollow current
#

Anyone else getting failed to update the workshop item result=2 while trying to update a mod?
was working fine 2 mins ago, now its not for me

fresh isle
hollow current
#

That's really weird. Its refusing to update any mod at all of mine, even old ones that I didn't change

#

aaand its working now after I enabled a VPN

bronze yoke
#

yeah that's just the 'random steam issue' error

#

it usually goes away after restarting the game or steam

fresh isle
#

for each of the first aid items (rags, bandaids etc) there is the AlwaysWelcomeGift = true, what does that do?

analog summit
#

wait i actually never thought about using the crafting menu

#

i barely ever used it

#

but thered be too many stuff in the menu so i wanna do it in the tailoring menu instead

weary compass
#

Hello, Is there way to change animSet xml's property on game boot?
I'd want to access animNode by m_AnimName, but zombie's animation so it may be impossible through timedAction (no sure)

I understood, mod-loading and overriding media xmls is earlier stage than any of lua script functionality.
So it makes hard to provide configurable animiations 😦

drifting ore
#

translation files aren't lua, they're plaint text

#

the 1252 encoding might not support these characters

#

or there might be an issue where these characters are visually similar but are different code points so they don't map to ANSI characters

glossy frost
#
player:setHaloNote("Vous quittez la zone de combat, désactivation du mode PvP dans 10 secondes...", 252, 194, 3, 500)
autumn garnet
#

you must make sure that the encode of the FR file (translation) is in ANSI

distant quest
#

how about fesco
@raven zinc -also where can I find that mod

eager pond
#

hello guys, who can help me with creating car mod?

dull moss
#

A bit of server/client stuff question.
I have a function in my client file

local ETWCommonLogicChecks = {};

local strength;

local function populateSkills()
    local player = getPlayer();
    strength = player:getPerkLevel(Perks.Strength);
end

Events.OnCreatePlayer.Remove(populateSkills);
Events.OnCreatePlayer.Add(populateSkills);
Events.LevelPerk.Remove(populateSkills);
Events.LevelPerk.Add(populateSkills);

function ETWCommonLogicChecks.SewerShouldExecute()
end

return ETWCommonLogicChecks;

and I need to use it in my server file

local ETWCommonLogicChecks = require "ETWCommonLogicChecks";

local original_Recipe_OnCreate_RipClothing = Recipe.OnCreate.RipClothing;
---Overwriting Recipe.OnCreate.RipClothing() here to insert ETW logic catching player ripping clothing
---@param items any
---@param result any
---@param player IsoPlayer
---@param selectedItem any
function Recipe.OnCreate.RipClothing(items, result, player, selectedItem)
    local modData = ETWCommonFunctions.getETWModData(player)
    if #modData.UniqueClothingRipped < SBvars.SewerUniqueClothesRipped and ETWCommonLogicChecks.SewerShouldExecute() then
        local item = items:get(0)
        ---@cast item Clothing
        if detailedDebug() then print("ETW Logger | Recipe.OnCreate.RipClothing() item: " .. item:getName()) end;
        ETWCommonFunctions.addClothingToUniqueRippedClothingList(player, item);
    end
    original_Recipe_OnCreate_RipClothing(items, result, player, selectedItem);
end

And I got a report of an error in server console

ERROR: General     , 1725907727926> 17 983 052 429> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: getPerkLevel of non-table: null at KahluaThread.tableget line:1689.```

As I understand that's server trying to run `populateSkills` but why?
bright fog
#

You can technical force load a /client file in server side, but it is highly suggested to never do that

#

If there's a clear separration between both it's for a good reason

#

/shared and /server are loaded server side
/client, /server and /shared are loaded client side

dull moss
#

oooooh

dull moss
bright fog
#

So things being shared client side and server side should be put in /shared

#

Unless they are only used in /server then put them in /server

#

You can also check if a code is ran client side or server side with isClient() and isServer()

dull moss
#

this explains why server fucntion

local original_Recipe_OnCreate_RipClothing = Recipe.OnCreate.RipClothing;
---Overwriting Recipe.OnCreate.RipClothing() here to insert ETW logic catching player ripping clothing
---@param items any
---@param result any
---@param player IsoPlayer
---@param selectedItem any
function Recipe.OnCreate.RipClothing(items, result, player, selectedItem)
    local modData = ETWCommonFunctions.getETWModData(player)
    if #modData.UniqueClothingRipped < SBvars.SewerUniqueClothesRipped and ETWCommonLogicChecks.SewerShouldExecute() then
        local item = items:get(0)
        ---@cast item Clothing
        if detailedDebug() then print("ETW Logger | Recipe.OnCreate.RipClothing() item: " .. item:getName()) end;
        ETWCommonFunctions.addClothingToUniqueRippedClothingList(player, item);
    end
    original_Recipe_OnCreate_RipClothing(items, result, player, selectedItem);
end

was working in SP and MP while being in server folder xd

#

ye

#

do you think doing something like changing

local ETWCommonFunctions = require "ETWCommonFunctions";
local ETWCommonLogicChecks = require "ETWCommonLogicChecks";

to

local ETWCommonFunctions;
local ETWCommonLogicChecks;

if not isServer() then
    ETWCommonFunctions = require "ETWCommonFunctions";
    ETWCommonLogicChecks = require "ETWCommonLogicChecks";
end```
would work nicely then
bright fog
dull moss
#

functions

bright fog
#

Just your tool functions should be put in /shared

dull moss
#

can I require lua from shared in client/server folders?

ancient grail
#

ye this is also my problem
since recipes are on the server folder

dull moss
#

Ye I'm trying to avoid making my functions global

bright fog
dull moss
#

i dont

bright fog
#

Use modules like you're doing that's great

ancient grail
#

so is it possible to just put the oncreate functions on the shared

while we have our modules function on the client?

myModule = myModule or {}
--then recipe functions

the also use

if item:myModule.isValid() then
myModule.doStuff(item)
end

bright fog
ancient grail
#

ok yeah then global then

bright fog
#

But oncreate just needs to be globals

#

Idk if these run server and client side, but if they tend to be put in both I guess they do

#

So as long as both are global client and server side then they will work so shared or server doesn't matter

#

Tho I would suggest following what everyone does if people tend to put them in server

ancient grail
#

i remember back then when i placed the oncreates on client
after doing the recipe its says no such function

bright fog
#

Especially since it doesn't matter

bright fog
#

Put in shared or server

bright fog
#

Also

ancient grail
#

yeh i placed them on server
and just copied my functions from client and just made em local

bright fog
#

shared loads before server and client files

#

And I don't remember which loads first between server and client

ancient grail
#

question

if we have onPlayerUpdate
on server
and just have it sendServerCommand
will that work?
instead of having client to ping pong it back

dull moss
#

how often does player update? that sounds like a lot of commands

ancient grail
#

i think its similar to ontick

bright fog
ancient grail
#

right

bright fog
#

Check Albion's event documentation

#

She has the info on which runs where

ancient grail
#

right

fresh isle
#

Is there a status effect for being on fire? It doesn't occur with a moodle, I'm trying to figure out how to ignite a player to apply similar mechanics

#

Granted my main issue is not being able to make someone glow without a flashlight in hand or flashlight attachment worn

#

My fear is that fire does get overhauled in 42, but cest la vie

dire oracle
bright fog
#

give me a sec

#
-- example
if not player:isOnFire() then
    player:setOnFire(true)
end
proud flame
#

Hi. Can someone confirm to me that index refers to the vehicle skin? I had this idea but wanted to double check and can't find where I saw that information. Thanks!
VehicleZoneDistribution.construction.vehicles["Base.f700dump"] = {index = -1, spawnChance = 20};

coarse sinew
proud flame
#

Ah, thank you! That must be where I first saw it then. By the way, when they say the total for a zone should always be 100 does it mean the maximum spawn chance a vehicle can have or the total sum of all vehicles spawning for that zone? Is this percentage based?

coarse sinew
proud flame
#

oh perfect, thank you so much.

viscid ginkgo
#

Hello everybody. Does anyone know if it is possible to make a vehicle that spawns with different wheel options? I know that for the body you can make the Vehicles_XYZ_Shell transparent and the game handles color variations, or make every color variant manually and list them in the script. I was thinking of something similar to the latter for the wheel texture.

dull moss
#

My guess ppl in #modeling can maybe help better shrug

junior steeple
#

Hello guys, I have a question. I made a recipe to transform thread in twine or other stuff, and so I put the line destroy Thread=4, to make it disappear once transformed, but the problem is that it works even if the thread has only 1/10 unit, and I would like it to take 4 full units threads. How is that possible please ? thank you !

crystal crypt
#

module MonsterEnergy

{

recipe Make Nails From Can
{
        EmptyPopCanMonsterWhite/EmptyPopCanMonster/EmptyPopCanMonsterRed/EmptyPopCanMonsterPacificPunch/EmptyPopCanMonsterUltraViolet/EmptyPopCanMonsterUltraParadise/EmptyPopCanMonsterMangoLoco/EmptyPopCanMonsterMIXXD/EmptyPopCanMGuaranáBaré/EmptyPopCanMGuaranáDolly/EmptyPopCanRedBull/EmptyPopCanFanta/EmptyPopCanGuaranaAntartica/EmptyPopCanPepsiMax/EmptyPopCanBangStrawberry/EmptyPopCanGuaranaJesus/EmptyPopCanSpriteSoda/EmptyPopCanCocaColaZero/EmptyPopBangBlackCherry/EmptyPopPurpleHazeCherry/EmptyPopBlueRazzCherry,
        keep [Recipe.GetItemTypes.Hammer],
       Result:Nails=2,
    CanBeDoneFromFloor:true,
       Time:80,
        Category:Carpentry,
        Sound:SliceMeat,
}

recipe Make RedBull And Whisky Mix
{
RedBullCan=1,
WhiskeyFull=1,
PlasticCup/GlassTumbler/GlassWineWater,
Result:CupRedBullWhiskey,
Time:20.0,
Category:Cooking,
OnGiveXP:Recipe.OnGiveXP.Cooking8,
NeedToBeLearn:True,
CanBeDoneFromFloor:False,
}
}
I make this recipes , and the rest is not apearing , can someone help me ?

crystal crypt
tranquil kindle
# junior steeple Hello guys, I have a question. I made a recipe to transform thread in twine or o...

Remove "destroy". Also is your goal to make one Full Twine from 4 Full Threads? I belive by default you would recive "full" Twine, but for it to require 4 Full Threads you'd probably need to use something like : Thread = 40 , because Thread has use delta of 0.1 and that means that it will use 1/10 of item per use, recipes included.

Going back to "destroy" Its mostly used to prevent item from becoming other item (there are items that once used: For example if you were to use DishCloth in recipe (it has 0.1 use delta) and required 10 units of it, When recipe would end you would get your result and Wet version of that item, because it has "ReplaceOnDeplete = DishClothWet," and its considered when in recipe, so in case you would prefer for it to not give you wet DishCloth, you would instead use Destroy (then there is no need for amount, since it will just delete item after recipe).

tranquil kindle
# crystal crypt Can you help me ?

You added both of those recipes in tabs Carpentry or Cooking and you look for them in general? If you write name of recipe and select the checkbox next to place you write it, it will check each category for that recipe.

crystal crypt
#

its not the recipes that i created

#

its the normal ones

#

i didint even searched anything

#

just like 40 recipes

tranquil kindle
#

Sorry, i might've read it wrong

#

My first guess you overriden vanila recipe file

#

How is your file where you have it named?

junior steeple
# tranquil kindle Remove "destroy". Also is your goal to make one Full Twine from 4 Full Threads? ...

I already tried with Thread=40 but it doesn't work because it requires 40 thread (complete or not, it doesn't understand the units and only the numbers of items in the inventory). The problem is, if I remove destroy, then the recipe won't show anything in the craft panel, it'll show an empty recipe.
I try to make a full twine with 4 full threads yes. The result is ok until now. The process isn't.

crystal crypt
tranquil kindle
crystal crypt
#

should i put the same name like in the game files ?

crystal crypt
tranquil kindle
crystal crypt
#

i will try it rn

junior steeple
tranquil kindle
junior steeple
#
{
    destroy Thread=4,

    Result:Twine,
    Time:250.0,
    Category:Tailoring,
    NeedToBeLearn:false,
    CanBeDoneFromFloor:true,
    OnGiveXP:ClothMendingXP10,
}```
tranquil kindle
#

Maybe destroy does not support "=4 or any amount" Im not sure. Can you tell me again why you think Thread = 40 doesnt work?

crystal crypt
#

it really worked

#

really thank you

junior steeple
tranquil kindle
junior steeple
tranquil kindle
#

It doesn't really make sense for me at least, but if you really wanted to force Full Threads only, i belive the only way is to use OnTest function similar to one used while crafting Molotovs, which checks if in molotov case the bottle is Full, and if it isnt, it does not allow for recipe.

junior steeple
#

Yeah i'm actually trying to do a OnTest function to make it work, but there is always a problem 🥲

tranquil kindle
#

Am i missing some logic here? 1 Thread = 10 units, 4Threads = 40 units, 8 times Half Thread means 8x0.5 = 40 Units too, You can already Consolidate Threads to make two halfes of thread to make one Full Thread.

junior steeple
#

Yeah it should be working too but I mean, idk how to apply this logic to my recipe. Atm it works even if you have 4 thread with only 1 unit on each of them.

tranquil kindle
#

But youre using "Destroy" right now

#

So it makes sense because destroy does not seem to care about How much uses there is per item, but only if there is an item.

junior steeple
#

Yes I know, but idk how to do it another way, i'm kinda noob in coding, that's why i'm asking for help ^^'

tranquil kindle
#

So thread = 40 should work

#

And then to revert it make it require Twine=1, and result Thread=4, or 40 (I think result will give you Full items, if no functions are involved, so you might need to test both)

junior steeple
tranquil kindle
#

I swear if i launch game and it works.....

#

(not mad)

#

Its just that i usually have to actually show people that something works in most cases

junior steeple
#

It doesn't really make sense for it to work since it takes 4 thread items in your inventory with =4 (not mattering the units) so 40 would require 40 items from your inventory (full or not)

crystal crypt
junior steeple
tranquil kindle
#

Thread does have UseDelta, so does ducttape, If item has use delta 0.1, it means that whole item has 10 uses

junior steeple
#

Yeah i get it for this point

#

That is the result when set to Thread=40

#

I can only if I have at least 40 items in my inventory, not 40 units of this item

junior steeple
tranquil kindle
#

Literally copied matress code

#

thats why its carpentry

junior steeple
#

Dang so the carpentry line did all the job ?

tranquil kindle
#

Twine has use delta of 0.2 so that means 1 Full Twine has 5 uses, so i use 5 twine for 40 Threads

#

No

#

I just got lazy and did not remove it

junior steeple
#

Oh sh*t i'm dumb, just realized you didn't use destroy that's why it litterally works and mine doesn't because I was still using destroy line -_-

#

Sorry for my slow brain

#

And thank you for explaining

tranquil kindle
junior steeple
#

It was so "simple" and yet i'm struggling like a donkey 😅

junior steeple
#

I tried and it works so I made all my "look alike" recipe as you explained me and it works very well. Thank you again ❤️‍🔥

ancient grail
#

iguess albions car reads the property from script and cannot be changed via lua,. owell

rugged sapphire
#

Can someone help me in the mod support plz

alpine scroll
#

Can sendServerCommand return a value to the script that called it?

#

Forget it, I'll just do a SendClientComamand back so I can deal with it

digital sail
digital sail
rugged sapphire
ancient grail
ancient grail
alpine scroll
#

Yea. I did it but now I need to know how to grab back, since I need it for a rcon response, but oh well

digital sail
digital sail
alpine scroll
# digital sail Was my explanation not answering that question?

I dont think so. Not for my case anyway. I do have a command that sends a ServerCommand, that gets intercepted by the client, do things, and sends a ClientCommand, that gets intercepted by the server. This part is ok. However its the command that sends the ServerCommand that returns when I send an Rcon command to the zomboid server

#

It does print correctly on the server, but I need something to return the value to the RCON client specifically, not simply make it run

digital sail
#

Then send a ServerCommand to the client

alpine scroll
#

Yes. I did that. And the client ran the command

#

That is ok

#

Look

#
LuaServerCommands.register(CMD_NAME, function(author, command, args)

    -- Check if the correct number of arguments are passed.
    if #args < 2  then
        return '/'..CMD_NAME..' [player] [range]'
    end

    -- NOTE: The helper only becomes visible in global scope when the first lua server command is fired.
    --       Make sure to reference the helper inside of the command's handler function.
    local helper = LuaServerCommandHelper

    -- Attempt to resolve the player using the helper method.
    local username = args[1]
    local player = helper.getPlayerByUsername(username)
    if player == nil then 
        return 'Player not found: '..tostring(username) 
    end
    local playerID = player:getOnlineID()
    local range = tonumber(args[2])
    sendServerCommand('refresh', 'container', {playerID = playerID, range = range, playerName = username})
    local containers = getNearbyContainers(player:getX(), player:getY(), player:getZ(), range)
    for i = 1, #containers, 1 do
        local container = containers[i]
        local items = container:getItems()
        if items:size() > 0 then       
            if container:getParent() then
                ItemPicker.updateOverlaySprite(container:getParent())
            end
            container:setExplored(true)
        end
    end
    return 'Command ran'
end)```
#

This is my code

#

Its a code that, when I send a command via RCON (this is important), it triggers something in game

#

So, it sends the command, on the sendServerCommand. That is ok and that is working

#

However, the sendServerCommand DO NOT RETURN A VALUE, which is my issue, so I made a separate thing to try to grab it back when it runs

#

which is

local CommandsTest = {};
CommandsTest.returnvalue = {};

CommandsTest.returnvalue.container = function(playerObj, args)
    print('player:' .. tostring(args.playerXx) .. '-containers:' .. tostring(args.containersXx) .. '-quantity:' .. tostring(args.quantity))
  return 'player:' .. tostring(args.playerXx) .. '-containers:' .. tostring(args.containersXx) .. '-quantity:' .. tostring(args.quantity)
end

local onClientCommandTest = function(module, command, playerObj, args)
    if CommandsTest[module] and CommandsTest[module][command] then
        CommandsTest[module][command](playerObj, args)
    end
end
 
Events.OnClientCommand.Add(onClientCommandTest) ```
#

So it prints on the server, it shows on the server, it works as I want, BUT it doesnt return as a value if I trigger the command as RCON to the RCON Client that triggered it

#

It works, it just doesnt return the value where I need it

#

I'll probably need to store the things in a variable most likely and somehow update that variable once I've grabbed the value

digital sail
#

(use ```lua for coloration)

alpine scroll
#

(I thought I was?)

#

Oh

#

Litteraly write lua

#

Sorry

#

Uh

#

I dont know how to do that?

#

It just wrote lua on the code

dry chasm
digital sail
#
function()
alpine scroll
#

Got it

#

But anyways

#

Since I send the code, it is being returned "Command ran", as I added to the return code

#

Im pretty sure something breaks if I dont add a return there, let me test

digital sail
#

is LuaServerCommands from the Java API?

alpine scroll
#

From Jab's mod

#

This is what allows Rcon to begin with

digital sail
#

haha, that parts was important

#

I'm not familiar with it, it might be buggy

#

did you try their discord (in mod description)?

alpine scroll
#

Its not a bug in Jab's mod this thing specifically

dry chasm
alpine scroll
#

Because for most things, you can run the code on the server side

dry chasm
#

although If you do need it outside lua, I don't think that mod supports that

alpine scroll
#

Messing outside lua wouldn't be a problem

#

But yea, I think I may have to do another look on what I am doing

#

Maybe check if I can update the containers outside the client side

digital sail
#

the only way to know is to have a look at their java code

alpine scroll
#

I think I could ask him about something like that, but I think that will not be necessary

#

I will try changing the focus here from the clientside of the code to the serverside of the code, and see if the serverside works too

digital sail
#

it's not even open source, so we'd need to uncompile it first 😩

alpine scroll
#

It isnt?

#

I am almost sure Jab did it on github somewhere

#

Oh well

#

Let me try the serverside thing here and lets see if serverside it works

digital sail
#

I decompiled it

#
   protected String Command() {
      int argCount = this.getCommandArgsCount();
      if (argCount == 0) {
         return "/luacmd <command> <varargs>";
      } else {
         String command = this.getCommandArg(0);
         KahluaTable tableArgs = LuaManager.platform.newTable();

         for(int index = 1; index < argCount; ++index) {
            tableArgs.rawset(index, this.getCommandArg(index));
         }

         String author = this.getExecutorUsername();
         if (author == null || author.isEmpty()) {
            author = "console";
         }

         KahluaTable ourObject = (KahluaTable)LuaManager.env.rawget("LuaCommands");
         LuaClosure outFunc = (LuaClosure)ourObject.rawget("onCommand");
         LuaReturn luaReturn = LuaManager.caller.protectedCall(LuaManager.thread, outFunc, new Object[]{author, command, tableArgs});
         return !luaReturn.isEmpty() ? luaReturn.get(0).toString() : "Executed Lua command.";
      }
   }
#

looks like it's supposed to print it

#

well, I guess, it's printing is somewhere since he's forwarding your return value

#

do you ever see an "Executed Lua Command." message?

alpine scroll
#

So, John. The thing is it prints, but it doesnt return because it prints outisde the function that has a return

#

I just refactored the thing to run serverside instead of clientside, so I'll see if it works this way

#

If it does, great

#

If it doesnt, its back to the drawing board

digital sail
alpine scroll
digital sail
#

They way it could work, but I guess they did not write the code for it, is by having their java plugin register a callback, wait for the answer then call another lua function with the result.

#

basically what you are emulating right now with a servercommand

alpine scroll
#

I think if I want it to work, I would need another code, so when code 1 works, it writes on some ModData, and when code B works, it reads from the ModData

#

And then maybe a third code to clean the ModData

#

maybe

#

dunno

digital sail
#

you just want an object on the client side that remembers the call, ModData is for persistent memory (alive after a reboot)

#

but you probably don't need to remember anything about the command itself from the client side, the servercommand should contain every instruction you need to execute

alpine scroll
#

Yea, probably

ancient grail
#

but client to server to client

ancient grail
digital sail
#

I think you're right. I only knew about ModData and that got me confused. I looked at the decompiled game and I see there is a GlobalModData which, I'm guessing, is sync with the server at all time?

bronze yoke
#

no, it's the same thing

#

ModData is the lua wrapper around GlobalModData

#

it's usually just called global mod data to differentiate it from object mod data

digital sail
#

how is it synchronized with the server then?

#

oh, there is a transmit

#

and receive

#

ok

bronze yoke
#

the methods for it are kind of unreliable from what i've heard

digital sail
#

I did not know about it and made my own packets with commands :D

bronze yoke
#

good!

#

besides the reliability concerns the provided transmission works by sending the entire table every time

#

it can get really wasteful for most applications

bronze yoke
#

i had an issue with a mod i helped with where once the table got big enough receiving it just disconnected you because the client timed out processing it 😭

#

the issue there was twofold with the mod having the most terrible algorithm imaginable on receiving it but it can demonstrate how big the tables can get

digital sail
#

keeping the spirit of the vanilla code, I like it

bronze yoke
#

yeah that's no issue

digital sail
#

The worst programming habit I've ever witnessed was years ago, at my first job. Someone took the source object that should have been read only. Modified a string in this object to serialise the value of an int and then parsed the int and modified the string back to the initial state further in the code.

#

I was amazed.

analog summit
#

what is that supposed to mean 😭

digital sail
analog summit
#

ojjj

digital sail
#

oh, sorry

analog summit
#

i meant oh 😭

digital sail
#

and here I was searching what "ojjj" meant on duckduckgo, only to find "only joking" :D

grizzled fulcrum
#

lol

alpine scroll
#

I updated a container on the server side. How do I make the client grab the container again?

#

If I log out and log back, it shows the items, however just moving away and back dont

neon bronze
#

Dont know the exact command but you need to draw tje ui „dirtty“

crystal crypt
#

imagine that i make items and i put "Module Bla Bla Bla" why do people sometimes put Imports Base ??? i just want to know

tulip valve
#

Is there anyway to disable the bleeding and injured moodles for a specific trait? You still bleed and get damaged, but the moodle wouldn't show up

analog summit
#

do yall know any mods that tamper with the tailoring panel??

#

im gonna explode i cant find anything on it at all

ancient grail
#

not really sure about the syntax here but the point is you dont need to add the module everytime you use anything from Base

nimble badger
#

Hello, How can I get stats:setEndurance(1.0), to get the current endurance, and add x value over the amount of times the program has been run, and after to reset the program run times, it will be implemented as a wearable

bright fog
nimble badger
# bright fog Did you try replacing set with get ;) ?

Yes, but do I then assign it to a variable, say i for example:

player:getEndurance()
stats:setEndurance(i+0.02)

how do I then set the Get endurance to i, so that I can add it to the current endurance? (im trying to fix the stalker exoskeleton fix mod)

drifting ore
#

i = player:getEndurance()

crystal crypt
#

The Fatigue Value is for sleep ? what is the value for tireness ??

bright fog
#
local endurance = player:getEndurance()
stats:setEndurance(endurance+0.02)
#

(make variables local, NEVER global

bronze yoke
alpine scroll
#

From server?

bronze yoke
#

yeah

#

if you are removing items, you must use a server command to send the ids of the removed items to the clients and remove them manually

alpine scroll
#

I am refilling the container contents with the ItemPicker.fillContainer(container, player)

#

This works, considering I do receive a new stock of items in the container, however it just updates on the client after I logout and login

bronze yoke
#

yeah the game doesn't really have convenient ways of modifying items from the server

#

if the container is empty before you use the itempicker (as i believe it'll delete existing items) then sendItemsInContainer is sufficient, otherwise you'll probably need to use a server command to delete all the existing items

drifting ore
#

pretty weird that some object synchronize automatically and others don't

#

like, in what scenario would you want clothes out of sync between clients and servers?

severe crane
#

If a recipe has a lua component for whatever reason, do I still put the NeedToBeLearn in the function or the script recipe?

ancient grail
severe crane
#

I have a recipe I want to adjust so that you need to learn it, it has a module base entry and a lua entry. I've tried putting the NeedToBeLearn variable on the base recipe, but it doesn't seem to work. So I was just wondering if it needs to be added to the .lua side?

bronze yoke
#

it should be part of the script

severe crane
#

ty, I'll keep at it, just wanted to make sure it wasn't something obvious with the lua (which I suck at)

ancient grail
#

can you show us both script and lua

ancient grail
weary compass
#

hello small Q, which event will be fired after sandbox setting is changed?

nimble badger
bright fog
#

???

#

No you need to get it ???

bright fog
#

I'm so fucking confused like did you read the code snipet ?

grizzled fulcrum
#

@nimble badger if you don't know lua, I'd recommend reading the PIL guide before you start modding https://www.lua.org/pil/

bright fog
#

Sry I'm tensed, getting only stupid questions today lmao

dull moss
#

Like it's just reading

#

its not bitwise shifting where you have no clue whats happening if you dont know it

bright fog
twin turtle
#

Hi, one question, does anyone know where i can learn in a guided way the api for the game and how to mod it? thanks

nimble badger
#

Thanks for the help btw

grizzled fulcrum
#

and bitwise shifting isn't any different, it's easy to understand once you know it, but you have to learn it first to know it

dull moss
#

Doesn't matter

weary compass
#

ty, I am just finding the info on decompiled javas.
hm.. if you can give another favor to me. What way seems good to catch the sandbox changes (especially on dedicated server)?
@bronze yoke

dull moss
#

you could write them into mod data or something and then check if they changed every 10 min for example

bronze yoke
#

only real way is to check periodically, if you're waiting for a specific option you can cache that value and do something if the current value doesn't match the cached one

weary compass
#

well I wanted to avoid periodical events, but it looks only way :/
Thank you 🙂

hexed ferry
#

can someone make vhs / cd player and storage ( if you put vhs / cd in it they will weight 0 and ability to play that music and tapes, something like mp4 player ) , it is portable and be usable while walking and sprinting

hexed ferry
#

is there any good thing to store VHS / CDs

dull moss
nimble badger
dull moss
nimble badger
#

Well yeah, im specifically trying to find player variables, like Endurance so i can write them correctly (eg endurance or Endurance)

dull moss
#

Aka you cant just

playerEndurance = 1```
you need
```player:setEndurance(1)```
#

(pseudocode)

nimble badger
#

This is how my code is looking at the moment

local stats = player:getStats()
local EnduranceRG = player:getEndurance();
stats:setEndurance(EnduranceRG + 1.0);

it breaks at stats.setEndurance

dull moss
#

getEndurance should be run on stats

#

(i think?)

nimble badger
#

so stats;getEndurance?

dull moss
#

what does it say

#

the error

#

I'd expect it to error at
local EnduranceRG = player:getEndurance();

#

not at stats:setEndurance(EnduranceRG + 1.0);

nimble badger
#

Can't really screenshot the debugger, but the green bar is at stats;setEndurance(EnduranceRG + 1.0);

#

could be that its calling nil value??

dull moss
#

First things first, you should have console.txt open pretty much 24/7 when u making mods and testing them ingame so when it errors you have easy access to error

nimble badger
#

I think I fixed it hold up

dull moss
#

open console.txt, ctrl+f for error and check latest one

#

should be yours

nimble badger
dull moss
#

Ye but did you look at error

#

Learning to read those is going to help a lot during modding

nimble badger
#

Callstack?

dull moss
#

nah above it

#

send the error

#
-----------------------------------------
Callframe at: removeItemOnServer
function: transferItem -- file: ISInventoryTransferAction.lua line # 399 | MOD: Snow is water - Full Version
function: perform -- file: ISInventoryTransferAction.lua line # 260 | MOD: Snow is water - Full Version
function: perform -- file: AutoLoot_DisplayLooted.lua line # 88 | MOD: AutoLoot
function: perform -- file: ETWActionsOverride.lua line # 122 | MOD: Evolving Traits World (ETW)

ERROR: General     , 1726083822845> 16,241,616> ExceptionLogger.logException> Exception thrown java.lang.reflect.InvocationTargetException at GeneratedMethodAccessor1226.invoke.
ERROR: General     , 1726083822845> 16,241,616> DebugLogStream.printException> Stack trace:
java.lang.reflect.InvocationTargetException
    at jdk.internal.reflect.GeneratedMethodAccessor1226.invoke(Unknown Source)```
#

as exacmple

#

i was wrong you were right, the stacktrace

#

xd

nimble badger
#

there's no error anymore, and there's nothing above call stack??????

#

Wait

#

you made that mod?

dull moss
#

i jsut grabbed random error from my console

nimble badger
#

Found it thanks

fresh isle
#

Is there a way to make the protection stats of clothes random in the .txt?

#

or will i have to call on some sort of lua function :C

bronze yoke
#

you'll have to rely on lua

fresh isle
#

unfortunate but expected news

#

client or server? I'm thinking it could be done when items are spawned but I'm not actually sure

#

like, how to make sure stats are associated with different instances rather than the server deciding on some random level that will dupilcate across all instances of an outfit

bronze yoke
#

you can do it on the server

#

items can have an OnCreate function associated with them, that would be the easiest way to do this

#

usually editing item properties per instance can be a pain as they usually aren't persistent but i have a feeling this will be because tailoring changes the defence of clothing instances anyway

fresh isle
#

Interesting, I was doing this to mod jewelry, so tailoring would be something I can avoid, sounds pretty doable C:

red tiger
next shell
#

Is there a way to seperate player related deaths vs pve deaths?
I want to know the possibility of a mod that can separate the two so that players when they die to, for example zomboids, they wont get punished but if they do get killed by a player they get blocked or something along those lines

fresh isle
#

won't work unless infection is enabled though <w>

next shell
#

We use a mod that logs players deaths, skills, inventories, etc, would it be possible, with the mod makers permission of course, to pull this data and use in the way I was describing?

ancient grail
#

then check using instanceof

pastel raptor
# dull moss

is there a way in which I can read all the pz supported functions ? Like this site?

dull moss
#

You mean detailed documentation?

#

There is none

pastel raptor
#

do you have a website or something?

dull moss
#

Closest thing you'll have is umbrella

pastel raptor
dull moss
#

I thought you saw a link 3 msgs above

#

And wanted more

pastel raptor
#

no I didn't see any link lol

#

XD

dull moss
#

Well now you do

pastel raptor
#

mmmmmmmmmmmmmm no :E

dull moss
#

Literally

#

Look 5 msgs above

pastel raptor
#

oh sorry wtf

dull moss
#

From the screenshot

#

xd

pastel raptor
#

lol sorry :E my apologize

dull moss
#

Np

#

I still recommend umbrella tho

#

Google luacat umbrella project zomboid

pastel raptor
#

yeah i'm there thx

#

just one more question maybe you can help since i'm not so good ^^'

#

I'm trying to make a new skill called Gunsmith and apparntly I managed to do it. Now the guns are defined with a tooltip that I want players to read only if the gunsmith skill is above or equal to 3.

#

I made a small lua script but chatgpt suggest me this event t make the script run :E
Events.OnPreItemTooltip.Add(showTooltipBasedOnGunsmith)

#

I don't think that "OnPreItemTooltip is something that should work ahhaahhaha

#

any suggestion?

dull moss
#

By initial idea (which might not be the best) is to catch tooltip in UI and if it's a gun, overwrite it

#

Not sure how to do that though as I think tooltip code is generalized and it's not separate for different items

#

Which mean you'd be catching every single item tooltip with your code

#

Which again can he fine but not ideal

#

Albion is smarter than me, wait until she sees your question or ask her when she's around, she's the galaxy_brain

pastel raptor
#

U.U

#

I made the same with meds. Meds have the same icon as "pill" or "syringe". If you have enough level in doctor you see the name of the pill and what is it used for u.u

#

The problrm is the event which handles everything. I am trying OnPlayerUpdate

dull moss
#

Wait if you have it for meds already can't you use same thing but for guns?

#

Also what exactly are you doing OnPlayerUpdate

#

I believe that event is fired very often

#

Like on the OnTick level often

pastel raptor
#

I never use on tick

#

It s very performante killer

ancient grail
#

you can just use setTooltip()

dull moss
#

Chatgpt is decent help as long as you ask it Lua questions and not PZ questions

#

Aka
"How do I loop through 2 depth table modData.MyMod" and not "how do I make weather change to rain in PZ with event"

pastel raptor
# ancient grail you can just use setTooltip()

local function showTooltipBasedOnGunsmith(player, item)
-- Check if the item is the "Pistol" (or whatever weapon you want to use)
if item:getFullType() == "Pistol" then
-- Get the player's skill level in "Gunsmith"
local gunsmithLevel = player:getPerkLevel(Perks.Doctor) -- Use your custom skill perk name

    -- Only show the tooltip if the player has level 3 or higher in Gunsmith
    if gunsmithLevel >= 3 then
        -- Show the tooltip (normal behavior)
        item:getModData().showTooltip = true
    else
        -- Hide the tooltip
        item:getModData().showTooltip = false
    end
end

end

-- Hook the function to run when the tooltip is being displayed
Events.OnPlayerUpdate.Add(showTooltipBasedOnGunsmith)

chatgpt made this 😄

dull moss
#

I mean general idea is good

#

Just gotta refactor it so it works in-game

pastel raptor
#

🫠

bright fog
#

It will give you a fuck ton of wrong things

#

For example here

#

item is not sent to OnPlayerUpdate

ancient grail
#

item:setIcon()
doesnt work

#

is there a way for doparam to be applied to old items?

tranquil kindle
#

I think icon will be applied to old items with do Param. I set sounds for guns that way and it works for new and old ones.

#

I believe stats like condition and damage might still use old values, but icons/sounds/attached models do work on both from my experience

viscid ginkgo
#

Currently, in the settings menu, the largest texture size for the vehicles is 2048x2048, but there is also a checkbox for "Double-sized textures". So the question is, what is the resolution of the texture file supposed to be? Actually... How does the checkbox work in the back? is it just a large texture that's downscaled if it is unchecked?

empty flame
#

i have created a deathtracker bot script for discord that send an image on player death, if u are interested dm me

bright roost
#

whats the best way to debug your code in game?

drifting ore
# bright fog Don't use ChatGPT for PZ modding unless it's basic algorithm

Don't use chatgpt period. It generates text that looks like human text, and merely that. Since the information itself isn't stored anywhere, there isn't even a way for it to tell if it's hallucinating or saying truths. If it's correct, it is purely because what it generated happened to match real world information. And otherwise, it's confidently incorrect.

bright fog
#

People keep saying to not use it, they are the same people who don't even know how to use it

drifting ore
#

automation bias isn't a sign of being an idiot tho

#

also you don't know what you don't know, so if you ask chatgpt for something you didn't already knew, you have no way to know if it's saying the truth or hallucinating

bright fog
#

Again, you just don't know how to use it

#

If you try to use it for knowledge, you haven't understood the whole point of the tool

#

I'm telling you: you just don't know how to use it

drifting ore
#

paraphrasing search engine something something

#

same issue occurs but in a different plane

bright fog
#

Example of what you can do

kind turret
#

Write an essay through ai, test it, tell ai to make it more human, test it

#

It’s undetectable

ancient grail
bright fog
bright fog
drifting ore
bright fog
bronze yoke
# bright fog

finding new, more computationally expensive ways to find and replace

ancient grail
drifting ore
#

i'm not a hater i'm just quick to point out its limitations

bright fog
kind turret
#

Even tho ai might take our jobs doesn’t mean we can’t use it to our benefit

bright fog
#

There's a lot of examples I've used this tool for easier repetition

bronze yoke
#

ctrl-r takes you 15 minutes? 😟

drifting ore
#

i mean i wouldn't have had 400 gbs of llms downloaded if i hated the idea of using llms

bright fog
#

I mean sort of I guess

#

I can leave it do the thing, go do something else in the mean time. This is a bad example I think in this case

drifting ore
bright fog
#

The voiceline example is the one I've used a lot

bronze yoke
#

voicelines makes sense to me

drifting ore
#

fun fact: it's in principle possible to make PZ NPCs that use llama-3b to talk to you

#

it'll require a java mod + not sure what else but it's a thing

bright fog
#

Pythoid

bronze yoke
#

it's been done

drifting ore
#

cool!

bronze yoke
#

using ai to generate code will usually hold you back - for new users it creates things they have no hope of understanding, but even for an experienced user it'll just slow them down

bright fog
#

Pythoid is the go to here ngl, if you have to use a manual installer, you could directly use Pythoid to link Python to PZ

bronze yoke
#

if it generates something wrong (and it will) it's actually quite difficult to go through something that looks correct and verify every bit of it - much easier to just write it yourself in the first place

bright fog
drifting ore
bright fog
#

Don't tell you to write an entire application or yes it will break

#

Tell it to teach the steps to follow to make such application, where to start etc

drifting ore
bright fog
#

We'll have to see how it goes

drifting ore
#

it's not an llm so there's no reason to dunk on it before it's out

#

it's just in the past few years llms have been all the rage so people associate AI in general with LLMs specifically

#

it went from "a program that can speak like a human? wow, magic" to "a program that can speak like a human, whop dee doo" in like a year

bright roost
#

one of the main things im noticing is when i try to get the player on a server side, im getting an exception thrown and it doesnt tell me why there is an error, and according to the local variables in game this is correct:

-- Function to get the correct player for singleplayer or multiplayer
local function getCorrectPlayer(player)
if player == '0' then
print("Server: Singleplayer mode detected, getting local player")
return getPlayer() -- For singleplayer
else
print("Server: Multiplayer mode detected, getting player by ID")
return getSpecificPlayer(player:getOnlineID()) -- For multiplayer
end
end

#

ignore my debug statements

ancient grail
#

use isClient()

bronze yoke
#

it's because getPlayer() returns a local player but the server has no local players because it is not a client

bright roost
#

player in local is a '0' so my logic should have not errored correct?

bronze yoke
#

getSpecificPlayer also deals with local players

#

use players' OnlineIDs with getPlayerByOnlineID

bright fog
bronze yoke
bright roost
#

interesting that the single player isnt being hit, im in the carpentry scenario if that makes a difference

bronze yoke
#

isClient() returns false in singleplayer

#

singleplayer is considered neither a client or a server

bright roost
#

so when i do the following

local function getCorrectPlayer(player)
    if isServer() then
        print("Server: Multiplayer mode detected, getting player by ID")
        return getPlayerByOnlineID(player:getOnlineID())  -- For multiplayer
    else
        print("Server: Singleplayer mode detected, getting local player")
        return getPlayer()  -- For singleplayer
    end
end

-- Prevent unauthorized interactions within a safehouse
local function onPlayerInteract(player, context, worldobjects, test)
    print("Server: Player interaction detected")

    local actualPlayer = getCorrectPlayer(player)
    local playerSquare = actualPlayer:getCurrentSquare() -- error on this line
    local isInSafehouse = false
end

i get the error:

attempted index: Add of non-table: null

I can see that actualPlayer has an isoPlayer object

bronze yoke
#

i don't see an Add index here, are you sure it's not on another line?

#

usually that would indicate a typo in an event name

bright roost
#

me either 😦 local actualPlayer = getCorrectPlayer(player) this gets called however

bright roost
#

another note, is there an event for when an item is crafted using carpentry? i looked on the docs and i couldnt see anything obvious?

nimble badger
#

one off here but where can I check print() functions? command line?

bronze yoke
#

console.txt or in-game lua console

nimble badger
solar rover
#

@mystic vessel Hello friend! We cant make brown paint with your Machines! mod, need a quick edit to the paint recipe here:

    {
        PaintbucketEmpty=1,
        PaintRed=2,
        PaintYellow=2,
        NearItem:PaintMixer,
        Result                   :PaintBrown,
        Time                     : 500,
        Category                 : PaintMixing,
        Sound                     :CanisterAddFuelFromGasPump,
        CanBeDoneFromFloor      : TRUE,
        NeedToBeLearn: falsed,
    }


    recipe Make Brown Paint
    {
        PaintbucketEmpty=1,
        PaintGreen=2,
        PaintBlue=2,
        NearItem:PaintMixer,
        Result                   :PaintCyan,
        Time                     : 500,
        Category                 : PaintMixing,
        Sound                     :CanisterAddFuelFromGasPump,
        CanBeDoneFromFloor      : TRUE,
        NeedToBeLearn: falsed,
    }
#

Rather, you need to make sure you have the right items and not just click "make brown" as it will choose either recipe to use.

mystic vessel
#

i'm also late for that, but i'm almost uploading machines II

#

It took a lot longer than it should have, but for a good reason.

solar rover
#

I spent the last week editing fish models and skins for my server, I get it hahah. Thanks for the hard work!

hollow lodge
#

How can I make a clothing item that isn't affected by other clothings masks?

#

Should I create a new body location?

fresh isle
#

dedicated clothing slot

topaz tangle
#

i have an idea

#

no clue how imma do this tbh

fresh isle
#

Is there a way to change the color of light from attachments?

#

(aiming to have an orangey gold candle glow...)

hollow lodge
#

is there a guide or template to create body locations?

bright fog
#

yes

grizzled fulcrum
#

the ones wrapped in gold

topaz tangle
#

Real coin

grizzled fable
#

Hi all, is there a way to change the maximum amount of runners in the vanilla Casual setting for zombie speed?

raven zinc
#

UK Map update now with zebra crossings!

tulip valve
#

Is there anyway to make FullSuitHead BodyLocation protect feet from scratches if you have no shoes? I'm using a clothing model that has shoes on the model itself.

#

If I could modify whatever code that checks if you have Shoes, also check for FullSuitHead should fix the problem hmm

bright roost
#

Anyone know the event for when something gets constructed like a storage box

strong lagoon
#

Mods are programmed in Lua right?

grizzled fulcrum
#

mainly yes

#

There is a little bit of zedscript which is some weird text scripting thing but it's pretty easy to learn, pzwiki has a bunch of docs for that (or look at vanilla game files in \media\scripts\

bright roost
#

I have a custom vending machine how can i use the existing mesh, cant seem to find it in the media folder

bronze yoke
#

vending machine? they aren't 3d

hollow lodge
#

I have shirts above jackets

bright fog
#

I'm not too familiar with that guide, it should tell you tho ?

#

Bcs I'm pretty sure it tells about clothing priority or shit like that

#

Which I believe are defined in a lua file

hollow lodge
ancient grail
bronze yoke
#

if we're being pedantic about the term 'programmed' neither zedscript or xml count

#

but let's not LOL

grizzled fulcrum
ancient grail
bronze yoke
#

lua counts, scripting is a subcategory of programming

#

but zedscript and xml are not scripting, they're just data storage

ancient grail
#

i see good to know

bronze yoke
#

there's probably an argument that animation xmls should count as scripting

ancient grail
#

is it normal to use xmls for animations?

bronze yoke
#

don't you have to?

grizzled fulcrum
#

I think glytcher means in general and not specific to pz

bronze yoke
#

oh, i don't really know exactly what formats for it are common, most games i've looked at have proprietary binary formats for it, but animation xmls basically just set up a finite state machine which is a pretty standard way to handle animations

bright roost
#

any modding gurus want to talk me through some issues im having? please dm me

topaz tangle
#

making an entierly different type of mod... gotta find a tutorial!!

topaz tangle
#

would... anyone be able to help with making an item mod? im so confused by this

bronze yoke
#

what are you having trouble with?

topaz tangle
#

so, the items.txt file has two different ways of making item scripts and what on earth!

#

it makes very little sense to me...

bronze yoke
#

wdym two different ways?

topaz tangle
#

like.... these are so different

bronze yoke
#

i think part of the confusion here is just because you're looking at it in notepad, the indentation is all messed up

topaz tangle
#

oh shit true
i should use notpad++

#

it looks better id say

bronze yoke
#

the differences in values specified is just because most items don't need to specify most fields, they're either not relevant to that type of item at all or they have default values to fall back on

topaz tangle
#

okay makes sense
what is metal value?

bronze yoke
#

in the current version of the game, literally nothing

#

it would've been for melting things down for blacksmithing, no idea if they're still going to do things that way though

topaz tangle
#

alr!!

#

im working on a coin mod

#

its gonna be small on release but thats okay

#

can, i put whatever i want as the category? or would i have to make a new one for that to work

bronze yoke
#

you can put whatever you want, they don't need to be declared anywhere

#

you'll need to add a translation entry for it somewhere for the name to show up correctly, let me check where that is

#

yeah, if you have for example DisplayCategory = MyCategory, then in IG_UI_EN.txt you should have an entry like IGUI_ItemCat_MyCategory = "My Category"

topaz tangle
#

okay... what is IG_UI_EN?

#

im trying to...

#

im not very snart

#

mostly confused on file stuff, i get the stuff i need to write

ancient grail
#

maybe to create scrap metal or something

ancient grail
topaz tangle
#

ill just use one of the ones from the base game, probably just "junk"

ancient grail
#

ye thats what most people do anyways

topaz tangle
#

maybe ill do it in the future

#

another question, can i put all of the item stuff in one txt file?

bronze yoke
#

you can

#

for some reason most modders separate each type of thing into a separate file (items file, models file, etc) but it doesn't actually matter at all how script files are organised

topaz tangle
#

thanks!!

#

ill keep pennys with pennys, nickels with nickels tec

#

ect!

#

etc@

#

^

grizzled fulcrum
#

but it is a pain to scroll through a large file

topaz tangle
#

kinda figuring it out!

#

never done an item mod so, yn

bronze yoke
#

separating models and items can make sense but when you only have a couple items it feels kind of cumbersome and i think sticking strictly to that way of doing things is what makes people not think to group objects more logically (e.g. items_carpentry.txt, items_cooking.txt instead of a giant items.txt)

topaz tangle
#

uh oh.... ive done something wrong

#

fixed it

#

okay, model... isnt appearing

topaz tangle
#

unsure why

#

icon wont aswell

next shell
#

Possibility of a everyone has schizo mod?

pine patio
bronze yoke
#

i recall that using a tag, like HasMetal or something

ancient grail
bright roost
#

anyone good with script files?

bright roost
#

what i specifically want is some guidance on if i cant use the script file system to use a custom tileset/pack instead of using a model

bronze yoke
#

you should read the site - it makes the point that people won't want to respond to a question like that because they don't know what problem you're having and they don't want to commit to helping you when they don't even know if it's something they can help with

#

there's a good chance someone who knows the answer to your question will not respond because they don't know what your question is

bright roost
#

can i have guidance on if i cant use the script file system to use a custom tileset/pack instead of using a model

dull moss
# bright roost im asking so i dont waste the gen publics time ¬_¬ ass

Learn to ask proper questions instead of insulting people. I've sent this here a dozen of times and every single time person asking adjusted their question in a way so someone could help them. Except you, that is. You're not saving time, you asking ppl to spend more time to help you. You asking ppl to spend time to figure out what your question is, instead of posting your question straight away.

#

And shove your unwarranted hostility someplace mentioned in your comment :)
The website is not an insult, it's a genuine advice, and I'd recommend using it, instead of being offended

grizzled fulcrum
dull moss
#

GigaChad 🤝 GigaChadMirrored

#

We all learn galaxy_brain

bright roost
#

im guessing it cant be done then i will model it

dull moss
#

I just bully albion for all my questions PepeLaugh

bronze yoke
#

i'll be honest that i hadn't read any of those sites until recently and i did always get the vibe that people posting them were a bit snarky

#

but they actually make pretty great points that make it easier for everyone

dull moss
#

I mean it is a bit snarky but youknow

#

When every day like 3 ppl ask to ask...

bright roost
#

there has to be a way of using a tileset/pack with the script txt files

#

for carpentry for example with the bookshelves

onyx valve
#

Hello, I have a question, how can I change the fire rate of a weapon?

bright roost
onyx valve
#

Thkx a lot

bright roost
#

within scripts, when defining the object what file does this need to go into, i have seen a variety

ancient grail
ancient grail
bright roost
#

oh so i can put the recipe etc all together?

#

each guide i read seems to differ slightly

exotic orchid
tranquil kindle
craggy delta
#

Hey all, trying to make my first mod. I get an error in game, the little red box down in the right hand corner. How can I see the console? or is it log file only? if so, where are the log files?

bright roost
#

its a log file in your mods

#

its how i see them

craggy delta
#

found it, thank you

topaz tangle
#

where are icon photos stored in the base game????????

ancient grail
#

texturepack folder

topaz tangle
#

Damn

lament hound
#

Somone point me in right direction how I would go about making a mod to make the back of toilet's containers

echo snow
#

im so good at editing

lament hound
#

Wish there were more modding tutorial videos 😭 but I'm assuming I'd just need to look at an example of a mod that has made custom object containers already to see how it's put together any suggestions?

exotic junco
lament hound
#

Thanks for support I don't think it should be the hardest thing to do 😭 just recently started learning to map and made a item following Blackbeard's video so yeah I'll poke around for awhile end goal for me is to learn how to make a trainable skill with custom items animations and object interactions but yeah one thing at a time 😅

quiet fulcrum
#

I'm trying to SendClientCommand, I already have added a hook to OnClientCommand but when I'm hosting a game, it doesn't seem to be firing my 'hello world'. Am I doing something wrong or does this not work when you host the game on non-dedicated?

crystal crypt
#

recipe Make Nails From Can
{
EmptyPopCanMonsterWhite/EmptyPopCanMonster/EmptyPopCanMonsterRed/EmptyPopCanMonsterPacificPunch/EmptyPopCanMonsterUltraViolet/EmptyPopCanMonsterUltraParadise/EmptyPopCanMonsterMangoLoco/EmptyPopCanMonsterMIXXD/EmptyPopCanMGuaranáBaré/EmptyPopCanMGuaranáDolly/EmptyPopCanRedBull/EmptyPopCanFanta/EmptyPopCanGuaranaAntartica/EmptyPopCanPepsiMax/EmptyPopCanBangStrawberry/EmptyPopCanGuaranaJesus/EmptyPopCanSpriteSoda/EmptyPopCanCocaColaZero/EmptyPopBangBlackCherry/EmptyPopPurpleHazeCherry/EmptyPopBlueRazzCherry,
keep [Recipe.GetItemTypes.Hammer],
Result:Nails,
CanBeDoneFromFloor:true,
Time:80,
Category:Carpentry,
Sound:SliceMeat,
}

#

I have this recipe for empty pop cans

#

and its giving me 10 nails idk why

#

its supossed to give me 1

#

i already tried Result:Nails = 1,

#

@tranquil kindle

tranquil kindle
# crystal crypt recipe Make Nails From Can { EmptyPopCanMonsterWhite/EmptyPopCan...

If i remember correctly when you open vanila box of nails it gives you 100 nails, right?

recipe to open box of nails
 recipe Open Box of Nails
    {
        NailsBox,

        Result:Nails=20,
        Sound:PutItemInBag,
        Time:5.0,
    }

But in result you have 20, which leads me to belive that result:nails=1 will equal to being 5 nails

    item Nails
    {
        DisplayCategory = Material,
        Count    =    5,
        Weight    =    0.01,
        AlwaysWelcomeGift    =    TRUE,
        Type    =    Normal,
        DisplayName    =    Nails,
        Icon    =    Nails,
        MetalValue = 1,
        SurvivalGear = TRUE,
        WorldStaticModel = Nails,
    }

Because it has Count = 5 means one unit as result of recipe will give you 5 nails. Im not sure why TIS went with that approach. It does not even make sense for me, but its same for opening boxes of ammo.

tranquil kindle
#

So you can either leave it as nails=1 and be it 5 nails, or you'd need to use lua for that, which is actually hillarious

crystal crypt
#

so i need to put 0.25 ?

tranquil kindle
#

It wont work i belive

#

Never tried though.

crystal crypt
#

soo i need to create the nail ?

tranquil kindle
#

If you really want it to be 1 nail and not 5, you'd need to make onCreate Function which will give player exacly one nail

crystal crypt
#

how do i do that hahaha

#

i just know how to create models items translate recipes

#

just the basics of that coding thing

#

never tried and i dont even know how to learn

tranquil kindle
#

I belive you, i myself been there.

#

Let me see if i can cook something up for you

crystal crypt
exotic junco
#

pottery i'm working on :3

crystal crypt
exotic junco
#

thank ye ^^

tranquil kindle
# crystal crypt thank you

Okay, so you'd need to create lua file in your mod and put it in lua>server>Your file and all you need is to paste this

function Recipe.OnCreate.didizaoNails(inventoryItem, result, player)
   local SingleNail = InventoryItemFactory.CreateItem("Base.Nails")
    player:getInventory():AddItem(SingleNail);

end

then
on your recipe you add those 2 lines

OnCreate:Recipe.OnCreate.didizaoNails,
RemoveResultItem:true,
crystal crypt
#

the name of the file should be didizaoNails ?

tranquil kindle
#

anything, but it has to be rather unique so other mods wont be overriden, or you do not override vanila file.

crystal crypt
#

why the didizaoNails in the second code ?

tranquil kindle
#

I just named it like that

#

Because of your nickname here

crystal crypt
#

okk how can i learn more ?

tranquil kindle
#

What do you mean?

crystal crypt
#

how can i learn to do that ?

#

like more

tranquil kindle
#

Same as you did with just script items and such. You try, you fail, you check other mods to see how its done

#

Many ways

#

Others would write you this from memory and would guarantee it works, i actually had to test it first just to make sure.

crystal crypt
#

thank you

#

on "OnCreate:Recipe.OnCreate.didizaoNails,
RemoveResultItem:true," i just paste it

#

i dont need to delete nothing ?

tranquil kindle
#

Nope

crystal crypt
#

ohh , thank you

#

im going to try it now

#

you re really good making mods

tranquil kindle
#

IF it worked before and only gave you more nails, now it will give you one, if it didnt work, then....

craggy delta
#

Ok, so a few hours of meddling around with all this. I this I have a basic version of what I wanted working. I want useless items to be useful. Saw several tear underwear mods, but found then buggy and not what I wanted.

I now can tear any base game boxers into sheet rope. I will add the other underwears and add rip cloth to the one that make sense.

I ended up using ItemTweakerAPI to do this. Is it still supported? I found something its lacking and I am working on adding it.

crystal crypt
#

whats your steam @tranquil kindle ?

tranquil kindle
#

I belive its pinned to my discord profile, why?

lament hound
#

Wish I was at home rn to learn more 😭 y'all seem to be having fun

#

Question tho would it be possible to change the zombies into like rpg monsters that only attack when aggroed and non humanoid models w animations or should I wait for the npc update in 42

bright roost
#

what in scripts to i need to do to have an item be crafted in a similar way to how carpentry/metal working is done, i want a siloette of the item being crafted and when clicked crafting will commence

lament hound
#

The preview tile ?

craggy delta
#

so some testing and I think I fixed ItemTweakerAPI

#

not sure if its still active or if there is a preferred form of communication 😅

small topaz
craggy delta
coarse sinew
# bright roost what in scripts to i need to do to have an item be crafted in a similar way to h...

You're referring to builables, well the game doesn't have predefined method to add those kind of objects like there is for .txt script items. But I created a framework for such objects, the "Building Menu". Here is a guide if you want to use it https://github.com/eI1on/pz-building-menu/blob/main/DEVELOPMENT.md. And the workshop page https://steamcommunity.com/sharedfiles/filedetails/?id=3067798182. But from what I've seen devs will add their own version next build.

small topaz
craggy delta
#

I wasn't sure if there was github or something.. I can comment there but I don't think I can add all the code changes there

exotic junco
#

all the pottery items i'm making are considered food items internally so i can "cook" them... thankfully we can disable the eat property so youre not chomping down on clay lol

craggy delta
exotic junco
#

more progress :3

bronze yoke
crystal crypt
#

@tranquil kindle can you help me in dms ?

#

Im making a mod to a server that just works in singeplayer idk why , i maked a mod with media/textures/vehicles and i put the modified textures of the advert trailer with the same name , and it actually works on single player but in mp its not working

tranquil kindle
crystal crypt
#

it works in sg but doenst work on mp

#

im trying

tranquil kindle
#

But how does it not work

#

Does not show custom texture, or does but only for you?

cursive hull
#

Hey, my mod's done.

#

Is there somewhere I can post the steam link?

craggy delta
#

ok, I need opinions 😄

My goal was to make underwear useful by being able to rip it.

  • all base game underwear types are able to be ripped into sheet rope except the garter.
  • all base game stockings are able to be ripped into 2x sheet rope.
  • all base game boxers and briefs are able to be ripped into ripped sheets.
  • all base game corsets are able to be ripped into leather strips.
  • all ripped sheets will be +1 per 5 levels of tailoring.
  • all ripped sheets give chance of producing tread at the same rates as base game.
  • easy patch support for third party underwear mods

Am I missing anything?

dull moss
#

KEKL

        local finalRainCounter = modData.RainCounter + rainGain - rainDecrease;
        modData.RainCounter = math.min(upperBoundary, finalRainCounter);
        modData.RainCounter = math.max(lowerBoundary, finalRainCounter);
        modData.RainCounter = finalRainCounter;
#

Very smart. Big brain. Much code

digital tinsel
#

what is the thing about .pack files? is there a way to see the contents?

#

lets say i want to replace a texture or something inside it

bronze yoke
#

you can extract it using tilezed, which can be found in the Project Zomboid Modding Tools automatically added to your steam library if you own the game on steam

digital tinsel
#

I got tilezed downloaded, do you mind showing how to extract? i cant open the file inside of it

craggy delta
craggy delta
#

now I just have to figure out how to package it and put it on the workshop lol

exotic junco
lofty frigate
#

What is the time I have to set for the "WearClothingHat" animation? I set it to 40 or 60 and the animation plays and ends but the "SetJobDelta" never ends and the action is not performed.

digital tinsel
#

created a folder, set everything up correctly i guess

#

just doesnt do anything after clicking on OK

exotic junco
digital tinsel
#

to be more specific im trying to edit the tiles2x

#

to create custom tiles for a retexture attempt

#

maybe someone already has that unpacked probally, but the tilezed isnt doing the job atm apprently(checked at the forums)

exotic junco
digital tinsel
#

yeah, idk what is happening

#

not sure if windows has something to do with it

exotic junco
cobalt latch
#

Hi guys! I'm just starting my attempts to understand modding, and I've encountered a problem. I'm trying to spawn a zombie of the appearance I need when I press a button. The hair color has changed, but the zombie's suit for a policeman does not change. What am I doing wrong?

    local x = 10907
    local y = 10094
    local z = 0

    local square = getCell():getGridSquare(x, y, z)
    
    if square then
        local zombie = createZombie(square:getX(), square:getY(), square:getZ(), nil, 0, IsoDirections.S);

        local visual = zombie:getHumanVisual()

        local hairColor = ImmutableColor.new(0.0, 0.0, 0.0, 1.0)
        visual:setHairColor(hairColor)

        zombie:dressInNamedOutfit("Police")
        
        zombie:resetModel()
    end
end

Events.OnKeyPressed.Add(function(key)
    if key == 34 then
        SpawnZombie()
    end
end)```
bright fog
onyx valve
#

Hi, I hope you are having a nice night, I have a question, how can I make my 3D model of a gun magazine visible when I place it on the ground? When placing it, only the icon appears but I would like the 3D model to be shown, I already made a script where I place everything necessary including the WorldStaticModel, I made a folder with the name world items and placed the OBJ file so that it can be " detected" but nothing happens, I appreciate your help and thank you very much.

grave cosmos
#

Does anyone know if there is a way to add protection to a specific body part on clothing? For example, I made pants with leg protection and I need them to only protect the legs

grave cosmos
onyx valve
#

The model is already in FBX jeje, which is why it seemed strange to me that the model did not already appear having used both formats

onyx valve
#

I don't know if I'm okay, I have worlditems in the models_x folder and inside is the 3D model in fbx, I have 2 .txt files in scripts, one is for my weapon and the other is for the magazines and in this I have all the configuration of my gun magazines. Is the order okay? Or am I failing in something? Jejeje

grave cosmos
pastel raptor
#

Hey guys please help. I'm really going OUT of mind with a stupid On.Create function which does not add what I want è_é
I got this Recipe:
recipe Scuoia cervo
{
keep ButcherKnife,
DeadDeer,

    Result        :DeadDeerSkinned,
    Sound        :Butcher_short,
AnimNode     :BuildLow,
Prop1        :ButcherKnife,
NeedToBeLearn   :true,
SkillRequired   :Butchery=4,
OnGiveXP:Recipe.OnGiveXP.Butcher10,    
Category    :Hunting,
    Time        :4500.0,
CanBeDoneFromFloor :TRUE,
**OnCreate: Recipe.OnCreate.DeerSkin,**
  
}

This is the On.Create function placed in Lua/Shared

function Recipe.OnCreate.DeerSkin(items, result, player)
local itemContainer = player:getInventory()
if not itemContainer then return end

itemContainer:getInventory():AddItem("LeatherCustom", 1)

end

I don't know why I get the recipe result (DeadDeerSkinned) BUT I don't get the item LeatherCustom from the On.Create function. Please help I?m really going out of my mind ç_ç

bronze yoke
#

the Recipe table isn't created until then, if you put your function in shared depending on how you did it it will either error or get silently deleted

pastel raptor
#

I tried in server also but nothing :E

pastel raptor
#

nothing I'm going literally crazy

#

è_é

ancient grail
digital sail
#

did someone manage to reload a lua script without reloading the game?
I noticed there is an option to do that in the debugger but for some reason it never worked for me

bronze yoke
#

it works, it's just often not advisable

digital sail
#

I understand the implications but I could never redefine a function with my new code by doing that so I assumed it did not work at all

bronze yoke
#

i've never heard of it straight up not working

#

it's fairly commonly used

#

i don't personally make much use of it but there aren't any quirks to it i know of

digital sail
#

maybe I gave up to early on it then

#

I'll give it a try when I have a chance to do so

solar lava
#

Does anyone happen to know the variables for holes in clothing by chance? I've found these ones but they don't really help me. I want to transfer holes from one piece of clothing to another and im not seeing what I need to get it done.

getHolesNumber()
copyPatchesTo(Clothing newClothing)```
sour island
digital sail
#

thank you for the link, I'll have a look at that

sour island
#

I create modules, and keep event adds elsewhere

quiet fulcrum
#

is there a way to get the server to sync all animation variables with clients or should I be individually calling my mod's setVariables on all clients?

hollow lodge
lofty frigate
empty flame
#

anyone knows what this means?

[2024-09-15 17:08:52] [AppID 108600] CAPIJobStoreUserStats::BInit() - no stats found, aborting

alpine scroll
#

Let me check here

#
public class CreateHorde2Command extends CommandBase {
   public CreateHorde2Command(String var1, String var2, String var3, UdpConnection var4) {
      super(var1, var2, var3, var4);
   }

   protected String Command() {


      int var16;
      for(int var12 = 0; var12 < this.getCommandArgsCount() - 1; var12 += 2) {
         String var13 = this.getCommandArg(var12);
         String var14 = this.getCommandArg(var12 + 1);
         switch (var13) {
            case "-count" -> var1 = PZMath.tryParseInt(var14, -1);
            case "-radius" -> var2 = PZMath.tryParseInt(var14, -1);
            case "-x" -> var3 = PZMath.tryParseInt(var14, -1);
            case "-y" -> var4 = PZMath.tryParseInt(var14, -1);
            case "-z" -> var5 = PZMath.tryParseInt(var14, -1);
            case "-outfit" -> var11 = StringUtils.discardNullOrWhitespace(var14);
            case "-crawler" -> var6 = !"false".equals(var14);
            case "-isFallOnFront" -> var7 = !"false".equals(var14);
            case "-isFakeDead" -> var8 = !"false".equals(var14);
            case "-knockedDown" -> var9 = !"false".equals(var14);
            case "-health" -> var10 = Float.valueOf(var14);
            default -> {
               return this.getHelp();

}``` Yea, here is a snipped of the code in java, but you mostly need the 'case' section to know what to use
cobalt latch
uneven ore
#

How can I configure the Time it takes for a Player to Eat a Food Item?

robust locust
#

Hi, does anyone know why my tilesets are getting split like this?

ancient grail
#

ongamestart event returns getmoddata as nil even if i have initiated the moddata already
whats a better event for initiating player moddata?

OnLoad?

dull moss
#

I run mine there

#

works as intended

digital tinsel
digital tinsel
#

tilezed refuses to actually fucking work, getting on my nerves at this point

#

packing seems fine btw

#

unpacking othewise does not work

ancient grail
#

anyways on load worked

bronze yoke
#

no, every time

#

OnNewGame is the first time only

ancient grail
dull moss
#

can someone save me 3 min of testing and tell if infection level 100 or 0 if sandbox is set to everyone is infected?

    local bodyDamage = player:getBodyDamage()
    local infectionLevel = bodyDamage:getInfectionLevel()
bronze yoke
#

0

dull moss
#

cheers

bronze yoke
#

100 activates the damage effect

dull moss
#

I see, ty

ancient grail
bronze yoke
#

it's just something i've looked at before

hoary pagoda
#

how do i make a single shirt to be wore by all zombies in the game?

bright fog
digital tinsel
#

Yo, any goood soul would mind unpacking the tiles2x.pack and this file here too? my tilezed can create .pack, but unfortunetly, I cant unpack, it doesnt work.

rain dock
#

If I wanted an outfit mod made is this a good place to make a request?

weary compass
#

Hi there.
Short question. I don't want to provide other language's translation of my sandbox options for now. Can I make EN as default?
If then please let me know the way 🙂

dull moss
#

EN is default

weary compass
#

hm.. then it seems due to that I missed putting commas.
ty

digital sail
#

Is there an easy way to detect an update in sandbox variables ? I would like to send some info to the client when they change. I could save a state and compare it to the new state every few seconds but that's not so pretty.

onyx valve
#

Hello, I hope you had a great day, I have a problem, I made a separate script so that my weapon was detected and the attachments could be placed, and when I rack the bullet it does not appear in the inventory it simply disappears and I get an error what is
Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@d99f9350
function: removeBullet -- file: ISRackFirearm.lua line # 71 | Vanilla
function: rackBullet -- file: ISRackFirearm.lua line # 50 | Vanilla
function: animEvent -- file: ISRackFirearm.lua line # 122 | Vanilla

#

Does anyone know what I can do to solve it?

quiet fulcrum
#

is there a way to make it so zombies won't attack a player? I know of setGhostMode but that seems to make my char invisible to other players doesn't it?

ancient grail
ancient grail
digital sail
#

I have been updating my unlisted mod for a few months and it's almost ready to come out. Should I reupload it so the workshop shows it as a new mod? Is it bad for its visibility if I just change it to public?

bronze yoke
#

there's some evidence that it won't always count time before it was first made public but overall the algorithm heavily punishes older mods, i would reupload it

hoary pagoda
#

Maybe a script that inputs "every zombie will wear this shirt"

digital tinsel
#

I tried unpacking the specific .pack files i said, but no luck, aparently an issue on my side, using w11

#

but thanks

bright fog
#

By visuals I meant the clothings of zombies

#

In real time

#

Change the item they wear

#

They are called ItemVisuals

hoary pagoda
#

Right

#

Im kinda new i just made a shirt mod texture and worked at first try

grave cosmos
#

Hello, please tell me how the NeckProtectionModifier works? I saw it in the vanilla hoodie code and I don't understand how it works. Is it possible to implement it for other body parts as well?

onyx valve
silk wadi
#

im curious if its possible to have it so lightbars dont flash on the clients end or something? like is it possible/does it exist? or something. im trying to find a way to deal with seizure triggers, as far as i can tell currently other ppls lightbars r completely out of my control

tranquil kindle
#

Because Hoodie with hood up will cover neck and head too, so its to slightly nerf it, but I might be wrong.

onyx valve
ancient grail
onyx valve
#

Oh ok ok sorry

placid delta
#

has anyone used PZ Upacker recently?
I'm trying to upack UI2 but its been running for hours and doesnt appear to be doing anything.
is that maybe an old method? i've been away for some time

coarse sinew
#

In the Extract .tiles images window under Prefix did you put the tilesheet name? And not the name from that list in Pack Viewer.

placid delta
#

but the process starts working, and it never finishes or does anything, even after waiting hours and hours

coarse sinew
placid delta
#

oh lol me and my ancient tools, you making me feel old

onyx valve
small topaz
#

Hello! When using the command

local item = InventoryItemFactory.CreateItem("Base.MyItem")

is there a way to check whether an item with script ID Base.MyItem acutally existis?

I use this for creating a clothing item and in case the item does not exists, the game displays the usual red-white canvas when the clohting gets equipped.

I tried if item then but this didn't work for me (i.e. variable item seems to contain smth although the clohting item does not exist).

bronze yoke
#

it should return nil if it really doesn't exist

#

it sounds like the item does exist but the ClothingItem doesn't

small topaz
#

sorry for asking! was really thinking for quite a long time about it. then I asked my question here and immediately afterwards, I remembered this 😦

bronze yoke
#

haha don't worry that's how it always is

grizzled fulcrum
#

Maybe it's failing to create item from the previous line

#

idk why

drifting ore
grizzled fulcrum
#

that is official lua, not mine

#

but addItem and AddItem are same I believe

drifting ore
#

no they take different argument type

bronze yoke
#

yeah it sounds like the item is probably nil

drifting ore
#

with more context it might be that the issue is 9mmBullets doesn't exist yeah

bronze yoke
#

likely either a typo in the reference to the item or if it's a custom item something may be stopping that script from being parsed

grizzled fulcrum
#

and return same thing

drifting ore
#

only lowercase version accepts just the inventoryitem object

glossy fulcrum
#

Hii idk if this is the right place to ask, but is anyone here looking to become an actice developer for a small team for PZ content creation? JJ_A_Think

drifting ore
#

wait what no

#

ok nevermind, i got bamboozled by PZ api again

#

lowercase version doesnt accept string objects but uppercase works for all types

onyx valve
#

I can reload, shoot, equip, unequip and add attachments to the Thompson normal but at the moment i rack the gun the error appears and bullets do not appear in inventory

cursive hull
#

ugh

#

Finally fixed my mod.,

bronze yoke
#

i suspect if everything else is working it's just a typo in the name of the bullets or something

hoary pagoda
bright fog
hoary pagoda
#

wwhat doc

bronze yoke
#

i actually can't really see how this error would occur

#

the method has null checks, it shouldn't be able to throw an exception because of that

hoary pagoda
#

nvm found it

onyx valve
bronze yoke
#

if loading them works fine i have no idea what's going on here

red tiger
#

Spent too much time working IRL to advertise a new anti-cheat for EtherHack users on multiplayer servers.

#

It exists, though.

ancient grail
autumn sierra
#

okay so im working on changing zombie clothing and all i did was add the hat to the fossoil zombie clothing XML and they now spawn without shirts or pants 100% of the time. any idea what i could've done wrong to cause this? does the hat need to be a subitem?

#

they also appear to be wearing only default clothing

digital sail
bronze yoke
#

unfortunately InvocationTargetException

#

which basically just means 'there was an exception'

#

i think i see what could have happened

#

if you passed nil and it chose the string overload that string isn't nil checked

bronze yoke
onyx valve
#

jahaja thkx It didn't work for me but you made me realize my mistake and I compared my code from Thompson script with Magazine Script and I put in magazine script Base.Bullets9mm and changing that, everything was solved

glossy fulcrum
#

Hii, sorry again if this is the wrong channel but #1285397103652372500 we are hiring modders for a content creator / content creation

onyx valve
#

Just another question, how could I make my firearms mod compatible with another? For example, with Vanilla Firearms Expansion (VFE) only in the attachments section, or would I have to ask for permission first?

proud flame
#

Hi, I'm currently trying to add some items to the distribution tables through procedural lists but the lists are not appearing in the tables. In fact, two of the lists are but the rest refuse to appear, and even these two lists only appear in one room definition and no more. I have checked this through LootZed in debug mode.

I have both proceduraldistributions and distributions files in the /server/items folder and followed the guide in the forums.

This is what the proceduraldistributions file looks like. Here I just have the first and last entry of the file, the ones that appear in the container, together with one of the procedural lists that refuses to appear.

#

This is what the distributions file looks like (with just one room definition to summarise). As you can see all but the last two refuse to appear in the container.
If I remove those from the list the others don't appear either way.

local LDFDistributionTable = {
    
    carsupply = {
        isShop = true,
        metal_shelves = {
            procedural = true,
            procList = {
                {name="CarTiresOffroadFR", min=0, max=99, weightChance=40}, -- missing
                {name="CarTiresCommercialFR", min=0, max=99, weightChance=40}, -- missing
                {name="CarTiresEquipmentFR", min=0, max=99, weightChance=40}, -- missing
                {name="CarTiresClassic1FR", min=0, max=99, weightChance=30}, -- missing
                {name="CarTiresClassic2FR", min=0, max=99, weightChance=20}, -- missing
                {name="CarTiresClassic3FR", min=0, max=99, weightChance=10}, -- missing
                {name="CarBumpers1FR", min=0, max=99, weightChance=100}, -- missing
                {name="CarBumpers2FR", min=0, max=99, weightChance=80}, -- missing
                {name="CarBumpers3FR", min=0, max=99, weightChance=60}, -- missing
                {name="CarAttachmentsFR", min=0, max=99, weightChance=40},
                {name="CarHubcapsFR", min=0, max=99, weightChance=80},
            }
        },
    },
}

table.insert(Distributions, 2, LDFDistributionTable);
#

Can someone help me see if I'm doing something wrong? Thanks!

#

Here's a screenshot showing just the last two procedural lists appearing in the container loot probabilities.

stable yew
digital sail
#

Is there any way you can think of for the server to send an image to the client?

#

I'm talking about a PNG that the server would have in a directory but the client would not.

#

I've seen it's possible to write files but I guess it's only in text mod.

placid delta
coarse sinew
ancient grail
#

anyone knows how to fetch the players target, specifically zombie
i think i saw it before, and it involves hightlight

placid delta
civic galleon
#

Is there a method for checking when an item has entered a player's inventory?

Attempting to make infinite ammo 9mm mags for a weakened copy of the basic pistol to keep reloading a necessity.

placid delta
coarse sinew
# placid delta

In File > Open .pack > select D:\SteamLibrary\steamapps\common\ProjectZomboid\media\texturepacks\UI2.pack and it will populate that list circled in green. Those names in the list you will not use to extract images. You will use the image prefix in File > Extract images...

placid delta
#

I tried opening with 2 different versions of TIleZed, neither can open my
C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\texturepacks\UI2.pack

maybe my pack files are messed up, can someone send me their copy of
C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\texturepacks\UI2.pack

coarse sinew
placid delta
#

how long should this part take?

coarse sinew
#

for me it took less than 1s

placid delta
#

i must still be using wrong version of TileZed I guess, what version are you guys using and can you share the download link or zip and attach here?

coarse sinew
placid delta
#

i downloaded mine from TIS forums

#

i'll try yours now

#

yep, i guess i was using old version that cannot open current .pack files

#

thanks for your time

coarse sinew
#

glad that helped

placid delta
smoky cipher
#

What is the app called to make a pz map mod

hollow lodge
#

I'm getting reverse values when using
ClothingItemExtra
Like for the lumberjack shirt, I convert the first texture and i get the last one, seems like evrything is reversed

quiet fulcrum
#

in TimedActions, what time units is maxTime based on?

bright fog
#

No idea, if you find out I'm interested lol

plush urchin
#

Can I use fbx for weapon models as well or only items?