#mod_development

1 messages ยท Page 292 of 1

bronze yoke
#

also you get a second chance to be on the front page ๐Ÿ˜ˆ

low shell
#

the coffi isn't bu-

bright fog
#

No

#

Make a secondary mod tbf

#

Like Albion said basically, depends on your mod

#

If it's heavy, make a second mod, if the file is just a few script files, don't bother

fading horizon
#

my other updates have been small enough that ive been able to integrate them but yeah, this update changes basically everything so i feel another listing is necessary

bright fog
#

After B42 they should keep the versioning structure

#

Allowing you to have B42 and B43 later in the same mod

fading horizon
#

theres still one last thing i cant seem to figure out but i think im gonna update without it since its kinda trival but i figure ill ask here just in case

bronze yoke
#

versioning will be useful even within b42, i heavily recommend anyone to take advantage of the common folder while you still can

fading horizon
#
local function changeTex(item, texture)
    -- >> set new texture
    item:getVisual():setTextureChoice(texture)

    -- >> set new name corresponding to texture
    item:setName(gothBags[item:getType()][texture].name .. " " .. gothBags[item:getType()][texture].color)

    -- >> get player object
    local player = getPlayer()

    -- >> update textures if equipped
    player:postUpdateModelTextures()
    player:postUpdateEquippedTextures()

    -- >> get icon object for new icon from filepath
    local tex = getTexture("media/textures/" .. gothBags[item:getType()][texture].icon)

    -- >> set new icon
    item:setTexture(tex)
end```
#

this is my function for changing backpack texture

#

its called via a context menu thats added when its right clicked

#

when youre wearing the backpack on your back and you update the texture, it updates immediately and everything works as intended

#

however

#

when you are wearing it in your right or left hand and you update the texture, the item name and icon change but the items physical, in hand texture does not

#

ive tried the other update functions on IsoGameCharacter but i can't seem to figure it out

#

someone told me it probably stems from the RHand and LHand models being in different XML files from the back version

#

however those XML files contain the same texture choice structure as the back version, so im not sure really what should change

#

or if i somehow need to check if its in the primary or secondary hand and change the texture with a different method other than item:getVisual():setTextureChoice(texture), but im not sure how i would even access the RHand and LHand versions since theyre not technically different item declarations in the item script

bronze yoke
#

have you tried player:resetEquippedHandsModels() ?

fading horizon
#

wtf

#

i love u

#

that worked

#

aaaaaa

#

thank yyou so much

bronze yoke
#

yayy i had my doubts LOL

fading horizon
#

that has been frustrating me for a while

#

my fault for only searching "update" on that page after figuring out how to update the model on the back

bronze yoke
#

i was thinking that held bags are technically still clothing so they might not care about this function that's usually used for weapons

fading horizon
#

now comes the boring and tedious task of making new mod images and all that fun stuff

#

but other than that, you just fixed the last thing i really needed to do in order to post the update

wet sandal
#

Mockup of upcoming crafting grid for Inventory Tetris

bright fog
#

๐Ÿ‘€

#

You're cooking man

low shell
#

integrated authentic z

#

Im bit sad models didn't work that good but I slowly deliver promised

sudden wing
#

Im getting this issue while trying to do some clothing, has anyone had it and know how to go about it?

#

This is on B42, Im trying to do an exported .x file from blender 2.79, I worked on that model on Blender 4.3 and exported it as an fbx to import to blender 2.79

#

But neither the .fbx or .x file work

#

Well... actually the .fbx file just worked lmao, but I do see that pz uses mainly .x files for clothing now, does any one know how to do it, I'm trying to figure it out

fading horizon
#

i wouldnt recommend using .x files if you can help it

#

.fbx has always been easier imo

#

preview of the upcoming b42 release of goth backpacks deskslap
It has been a lot of work, every model and texture has been remade

sudden wing
sudden wing
fading horizon
#

soon

#

im just double checking everything to make sure ive done it all

#

and making the new mod images

atomic hare
#

YAY!

bitter walrus
#

Is it possible to make the challenge modes available on mp servers? I want to try to make a mod that lets me play it with friends

umbral raptor
#

Hey, how do I access WorldObjectSprite?

#

I want the generator sprite/model.

tacit pebble
umbral raptor
#

how do i access a .pack file?

#

what software does it need?

bronze yoke
#

tilezed

#

it's bundled in the project zomboid modding tools which is in your steam library if you own the game

north rain
sudden wing
north rain
sudden wing
north rain
#

Yeah.. I would just keep using .fbx, there's really no difference between the two as far as I know

sudden wing
north rain
vivid imp
#

For sanity reasons its best to stick to FBX lol

sudden wing
vivid imp
#

Also i cant say ive hear of fbx files being less performant

#

If theyare its probably a very miniscule performance dip

sudden wing
sudden wing
vivid imp
#

Also using Blender2.79, jeez man do u like shackling yourself haha

sudden wing
#

It's like O(n) compared to O(n^2)

vivid imp
#

Hmmm where do you see that?

sudden wing
sudden wing
#

Not that it works like that really

north rain
#

lol that's a big difference in performance

vivid imp
#

I was about to say the difference bewtween O(n) and O(n^2) is BIG

#

So fairly sure its not like that

sudden wing
#

Yeah, imagine if it was like that hahaha

#

It would be a mess to use .fbx

vivid imp
#

Hmmmmm i disagree

#

I get wanting as much performance as possible but we're only human lol

#

It seems like youre having to limit yourself pretty hard

bronze yoke
#

where do you get this performance difference from?

north rain
#

Is there a modder here that has consistently exported .x files for their mods?

sudden wing
#

Lmao it was just an idea, not that it works like that at all

bronze yoke
#

i've never heard of anything like it but it's not like it's something we could easily benchmark (or that anyone would even really bother trying to use a .x in the first place)

vivid imp
sudden wing
north rain
vivid imp
#

Kinda, but it seems like itll be updated sooner rather than later!

round thorn
#

Does anyone know of a guide for making merge/compatibility patches for mods in PZ? I'm noticing a few little things that dont mesh well together in my mod list and might try to fix them.

hallow spade
#

Is tilezed just tiled for PZ?

round thorn
round thorn
north rain
#

I don't know if this would work, but utilizing the mod load order maybe you can make a mod that applies after those two mods load and replaces their respective recipes and values

earnest patrol
#

Thank you for the information. I am not too familiar with JVM, but am comfortable with Java as a language.

I plan to implement a small http server (server side) for admin purposes, calls Lua registered functions.
I was able to follow your tips and set everything up, but was unable to decompile zombie.network.GameServer , were you able to decompile it and would you mind sharing how did you do it if so? Thank youj

red tiger
#

There's one very tricky one in there if you don't know what it's trying to do

#

I'm at work so dm me and when I get home I'll send you a fixed copy

earnest patrol
#

Thank you so much!

bronze yoke
#

what decompiler are you using? i haven't decompiled b41 in a while but for me vineflower can successfully decompile all but one class in b42

silent zealot
#

And patch lua code as well if needed.

#

Just need to have your mod loaded after any mods you're modyifying.

round thorn
#

yeah just never worked with Lua, I know C++, but never done anything in lua, and its unstructured nature hurts my brain so far.

south bear
#

I've run into an issue with my code returning nil after running the following code from the server/for MP:

    print(playerIndex);  --prints "0" in the log
    print("TESTING 123!"); -- prints "TESTING123!" in the log
    local playerIndexToCheck = getSpecificPlayer(playerIndex); -- no exception thrown here
    print(playerIndexToCheck);  -- returns nil <==== This is the weird part to me    
 end```

Does ```getSpecificPlayer(playerIndex);``` need to be ```IsoPlayer.getSpecificPlayer(playerIndex);```? And can I even get IsoPlayer from server side?

(This is B41)
silent zealot
round thorn
#

pretty much yeah.

bronze yoke
round thorn
#

and finding good source/learning info seems more difficult than it should be, and no I dont want to learn LUA by modding Roblox, thank you YouTube.

tacit pebble
bronze yoke
#

there can technically be gaps in the local player list so you do need to nil check them but that shouldn't really be causing your issue here

#

when does this code run?

south bear
#

It is triggered via an RCON command

#

on demand

#

using a mod to allow RCON to trigger a lua script

bronze yoke
#

it's definitely running on the server then, you should use online ids/the arraylist of players from getOnlinePlayers()

south bear
#

Is there a place to find out what I can/can't access from serverside?

bronze yoke
#

no, the game's code isn't really clearly separated in any logical way

south bear
#

but I can't make much sense of what is and isn't available from server

#

Ok! Thank you so much! I appreciate ya!

silent zealot
bronze yoke
#

for b41, it is sadly a safe assumption that nearly everything is client authoritative

#

in b42 it seems extremely likely this will change

earnest patrol
#

I just zipped the zombie folder into jar and added it to a project as external library

south bear
bronze yoke
#

when i decompile, i jar all the folders with loose java in the game folder except zombie, copy that and all the other jars in the folder to a separate folder, and then pass that as context to the decompiler

#

i'm not sure if that'll have an effect on whether or not it *can* decompile but i found the output much better

fading horizon
south bear
#

getPlayerByOnlineID()

What is "OnlineID"? Steam64? Player Name? Account Name? Some other identifier?

#

I see it is an Int of some sort

bronze yoke
#

they're assigned to players as they join, they don't correspond to anything else

#

every connecting client will have a range of 4 online ids assigned to it (so 0-3, 4-7, etc) and they won't be reclaimed until the server restarts

winter bolt
#

all of the bones with nub in the name

#

you can select all bones by their name but im not at my pc rn

abstract cairn
#

Does anyone know how to make a message appear above a players head that is client side only?

north rain
ebon dagger
#

What is the relation of OnTick and PlayerUpdate and things like OnEveryMinute/Hour etc.

dull moss
abstract cairn
dull moss
#

HaloTextHelper.addTextWithArrow(player, "string", false, HaloTextHelper.getColorGreen())

#

Also look into mod that shows damage numbers

#

I don't remember but it might be the client only

bitter badge
#

yo can i get some help i made aserver yesterday and now when i join it wont load any mods but it works fine in single player

trail aspen
#

Can some modder make a mod for pz that adds real time shadows or its tooo complicated?

bronze yoke
ebon dagger
#

Ok, so its not like, 32 ticks to a minute or anything etc.

bronze yoke
#

yeah, it's not tied to any specific amount of real or in-game time whatsoever

ebon dagger
#

I'm working on a passive XP gain for my driving skill mod, and I get hesitant to do things on tick or update still if I can avoid it.

But fitness does it with "OnPlayerMove" so I don't see it being TOO bad if I'm exiting out real fast.

bronze yoke
#

people are way too scared of ontick

ebon dagger
#

I'm scared of MY CODE in ontick ๐Ÿ˜„

grizzled fulcrum
#

I didn't read much into your specific situation, but a lot of people underestimate the OnEveryMinute/Hour/Days event

ebon dagger
#

I was trying that, but the "passive gain" seemed off, like it rolled to infrequently

#

I default most of my over time effects to Minute

grizzled fulcrum
#

do you have like a chance thing that checks if the gain should be applied or something?

#

OnEveryMinute fires a decent amount in the span of a real life minute, maybe check with prints how much it fires

#

@bronze yoke do you know the conversion?

#

1 game minute to 1 real minute irl

#

or the hour/day

bronze yoke
#

1 in-game minute = 2.5 seconds at default game speed

ebon dagger
#

ZombRand(MyChance * GameTime:getInstance():getInvMultiplier()) == 0

Which is what is used in XpUpdate for fitness/strength

grizzled fulcrum
#

do you know how often it was firing (like a print every time it gives you xp in the console)

bronze yoke
#

yeah, this is compensating for the timing of ontick, so for oneveryminute it's compensating the incorrect amount (and far too much)

#

for oneveryminute you don't need to use a delta(/multiplier as pz calls them) because it fires at a constant rate

grizzled fulcrum
#

You could just do ZombRand(100) >= 30 to have a 30% chance every time OnEveryMinute fires right?

#

The good thing I like about the EveryX events is they dont fire in menu/game paused/etc so you don't have to code around it ๐Ÿ˜„

ebon dagger
#

Part of the reason I was doing it this way was my brains automatic assumption that it would be better to do it the way the IS code already does it ๐Ÿ˜„

#

But I am 100% willing to adapt lol

grizzled fulcrum
#

I recommend you drop that assumption soon, it's not good ๐Ÿ˜ข

ebon dagger
#

It would also be easier to explain to users that 30 means 30% instead of 700 means "magic numbers"

grizzled fulcrum
#

Sadly if IS coded perfectly, the people who learned from IS code would be good in lua, but unfortunately it isn't the case (because TIS lua code sucks, though slowly improving a little)

ebon dagger
#

I appreciate the help. I do love making my mods have lighter code. I would hate to be the reason someones older rig can't hang.

bronze yoke
#

basically multiplying by getInvMultiplier() reduces the chance proportional to how long the last tick took, so that you don't roll more successes when your framerate is higher and therefore making more rolls

#

when you're using events with constant timing you don't need to do that, only stuff like ontick that is variable needs it

ebon dagger
#

This newer version of the mod is leaps and bounds better already, the first one I made years ago was a GIANT single function called on playerupdate lol

bronze yoke
#

๐Ÿ˜ญ

#

ohh, did you make the one that was popular a couple years ago?

ebon dagger
#

I sure did.

bronze yoke
#

i had no idea, that's awesome

vast pier
fallow haven
vast pier
ebon dagger
#

I saw a few messages in passing here, saying that modding cooking for b42 was a bad time. That true? I'm looking at updating my food mod "Rugged Recipes"

bronze yoke
#

the only real change is that currently craftrecipes can't use x hunger of a food item

#

if you didn't need that you're probably fine

ebon dagger
#

Ah, I see!

#

Oh my, that does put a damper on a lot of mods I've used in the past, RIP

crisp fossil
#

hi is there a setting in debug mode to know the distribution type of a container?

hybrid tiger
#

lootzed

#

in inventory select

open drum
#

good fellows , i've been having an issue with coding I am doing since 2 days ago and I cannot solve it...

#

anyone willing to help me with it?

#

So i am trying to code, if a trashcan has "Dice" item inside. more trash will spawn around it

#

but it does it's job but also gives an error which that i don't understand

#

error states: ```-----------------------------------------
STACK TRACE

Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@3c7e19a1
function: getSurroundingSquares -- file: Growing-wuro .lua line # 32 | MOD: Wuro Core v42
function: Growing -- file: Growing-wuro .lua line # 82 | MOD: Wuro Core v42

ERROR: General f:232684, t:1736923546106> ExceptionLogger.logException> Exception thrown
java.lang.reflect.InvocationTargetException at GeneratedMethodAccessor1581.invoke(null:-1).
Stack trace:
```

#

and Line #82 shows as such:

#

and line #32 shows as such:

bronze yoke
#

when does this code run?

silent zealot
#

Is fish generation in the lua? I feel like making an EVEN BIGGER FISH mod.

#

Because what if a 44kg fish just isn't big enough?

bronze yoke
#

it is!

tacit pebble
silent zealot
#

No wonder Argiculture is broken. Look at what TIS considers to be a plant!

hallow spade
#

I'd love to be able to plant a few rows of cheese and bread. Just go outside in my garden and pick breakfast

undone elbow
#

What's not broken at all?

bronze yoke
hallow spade
silent zealot
#

Animals are delayed because of confusion about cats and dogs being the same creature, based on Catfish liking Dogfood.

#

Unless that makes it dislike dogfood? Every fish has one specific type of bai it does not like the taste of...

open drum
#

I used Event.Events.LoadGridsquare.Add(Growing)

#

to run the growing function

#

then within the growing function it has getSurroundingSquares() functions

#

so it runs whenever new grid loads

bronze yoke
#

that may be the issue, the squares around it are not all going to have loaded yet

open drum
#

hmm i see

#

what will be the best solution for this then?

#

should I have a checkloadedgridSquare function

#

before running getSurroundingSquares() function ?

#

also, wouldn't getOrCreateGridSquare(x,y,z) function

#

create the "unloaded" grid ?

abstract cairn
#

If anyone knows why I'm getting an error for this, please lmk

I can't seem to get the UIWorldMapV1 which I need to get the symbols API. I'm trying to get a reference to the clients map so I can add symbols to it via code.

for testing purposes AAAAAA is getting called every 10 minutes (my friend is helping me test stuff)

open drum
#

what doese the error say?

abstract cairn
silent zealot
#

WTF half these weights seems to be in kilos, half in pounds, with no indicator which is which other than multiplying/dividing by 2.2 at various points.

open drum
#

u r trying to use symAPI as table when it isn't one

silent zealot
#

Did you copy this code from somewhere else where it was part of an object?

open drum
#

whatever the "self" is, u have to make sure it is a "table"

silent zealot
#

I'm pretty sure self is a special lua thing that only works when you're in thing.function() to refer to thing

silent zealot
#

local nutritionFactor = 2.2 * fishSizeData.weight / item:getActualWeight()

bronze yoke
#

'weight' (actually called 'encumbrance' in-game for this reason) is just an arbitrary measure of how hard something is to carry, based on weight, size, and game balance

silent zealot
#

item:setActualWeight(fishSizeData.weight * 2.2) -- weight is kg * 2.2 (in pound)

bronze yoke
#

maybe they wanted the fish stuff to have a direct source

#

they renamed it to encumbrance really late in b41 because people kept nitpicking dumb shit about how x should technically weigh more than y

undone elbow
#

Seems there is no poison in FishFillet at all and it may be eaten uncooked.

abstract cairn
silent zealot
#

The symbols on the map?

abstract cairn
#

I'm intending to get the symbols API and then add symbols (I intend to add symbols to the players map via code)

silent zealot
#

The client can use them so it must be possible, but I don;t know what objects you need to call to get them - probably needs to look at the vanilla code that uses the symbol stuff

abstract cairn
#

I can't find how I get access to this from the client

silent zealot
#

It might not be the best way, but it's a way that works.

abstract cairn
silent zealot
#

And where you copied the code from, "self" meant something.

#

What was the original function name?

abstract cairn
#

ISWorldMap_instance.javaObject:getAPIv1():getSymbolsAPI()

#

I've been looking for

#

a solid

#

30 minutes

#

and just found it by pure chance as I was scrolling through the 15 tabs to find the thing i was gonna send you

silent zealot
#

hahahahaa

abstract cairn
#

truly a W ty

silent zealot
#

coding is like that

abstract cairn
#

the straight up 7 mods ive looked at code for on how to do stuff:

silent zealot
#

With that, you could have

    local symAPI = self:getSymbolApi()```
and the "self"would be the "FactionMap" table.
#

or FactionMap object. Whatever you call it in the mess that is LUA.

#

I'm pretty sure everythig is a table, even when it pretends to be something else.

abstract cairn
#

Are the most recent errors in the debug menu at the top or bottom of the error stack list

silent zealot
#

Bottom, but rather unhelpfully when teh big full screen "LUA DID A BAD THING!" window shows up sometimes the latest error is missing when you click "errors"

abstract cairn
# abstract cairn

Also does this look right? Like the line
ISWorldMap_instance.javaObject:getAPIv1():getSymbolsAPI() should work for getting the symbols API right? (It has been a solid half a year since ive last modded and used instances)

silent zealot
#

But it's in console.txt, and when you leave that screen it's in teh command console

#

Quicker to try in and find out that figure out if it should work.

#

I think ISWorldMap_instance is something you can call from anywhere

#

If that does not work, lots of references in lua\client\ISUI\Maps\ISWorldMap.lua

abstract cairn
#

It works, it just gives an error when loading in (since the data doesnt get initialized before it gets called)

#

huge W

silent zealot
#

hooray!

abstract cairn
silent zealot
#

I once spent a few hours to create a mod that crashed the game when you put underpants on and I was so happy when I reached that point.

abstract cairn
#

I got to finally print the texture files and RGB values and location values since im making symbols out of thin air (and not copy and pasting them like every other mod)

abstract cairn
silent zealot
#

It was editing underwear to let you store stuff in your underpants.

#

Probelm is it deletes all underwear from teh world when you enable or disable it, because that's what happens when you change an Item to ItemContainer

abstract cairn
#

amazing knowledge I will use this to accidentally crash many servers

silent zealot
abstract cairn
#

(im now going to sleep as i am an hour up past my normal sleep time lmao coding gaming)

thank you, you absolute legends @silent zealot + @open drum

silent zealot
#

that file is set to only change the bra with straps red frills, but you'll easily see how to change that

#

Can also iterate through all items looking for matching clothing and catch modded items, but was just too much of a potential mess to release if it was going to occasionaly delete whoel categories of items if anything cause lua to nnot load cleanly

open drum
#

so i think i found the problem

#

just like what @bronze yoke said

drifting ore
#

why so many trash ew

open drum
#

after looking at the grid lines

#

seems like a grid is loaded while the other isn't

#

so the add tile won't work

open drum
#

it gives more apocalytic feel

#

similar to the 10 years mod

drifting ore
#

i mean its still cleaner than india today ngl

open drum
#

xD

drifting ore
#

just clean them if its near in your base

open drum
#

u can clean them like normal trsh

drifting ore
#

ofc

#

i wish you can sniff the trash in PZ when its unBEARable

open drum
#

hmm i dont' get why some grid gets loaded

#

while some doesn't

#

i guess only 1 cell? is loaded that's the problem

bright fog
open drum
#
function getSurroundingSquares(centerX, centerY)
    local surroundingSquares = {}

    -- ์ƒํ•˜์ขŒ์šฐ ๋ฐ ๋Œ€๊ฐ์„  ์ขŒํ‘œ๋ฅผ ์ถ”๊ฐ€
    for dx = -1, 1 do
        for dy = -1, 1 do
            -- (0, 0)์ธ ๊ฒฝ์šฐ๋Š” ์ค‘์‹ฌ ์‚ฌ๊ฐํ˜•์ด๋ฏ€๋กœ ์ œ์™ธ
            if not (dx == 0 and dy == 0) then
                table.insert(surroundingSquares, {x = centerX + dx, y = centerY + dy})
            end
        end
    end


    for i, sq in ipairs(surroundingSquares) do

        local x = sq.x
        local y = sq.y
        local location_sq = getCell():getOrCreateGridSquare(x, y, 0)
        
       local isoObject = IsoObject.new(location_sq,  "d_trash_1_20")
       isoObject:transmitCompleteItemToClients()
       isoObject:transmitCompleteItemToServer()
       location_sq:AddTileObject(isoObject);
  
    end        
    -- ์ตœ๋Œ€ 10๊ฐœ์˜ ์‚ฌ๊ฐํ˜•์„ ์„ ํƒ (์ด ๊ฒฝ์šฐ 8๊ฐœ๋งŒ ์ถ”๊ฐ€๋˜์ง€๋งŒ)

end```
bright fog
open drum
#

oh

bright fog
#

Are you trying to access squares that aren't even loaded in ?

open drum
#

im using the Events.LoadGridsquare.Add(Growing)

#

function Growing(square)

   local NeedTime = nil
   local player = getPlayer()
   local playerX = player:getX()
   local playerY = player:getY()
   local x = square:getX()
   local y = square:getY()
   local z = square:getZ()

   local WorldAge = getGameTime():getWorldAgeHours()
   local Days = (WorldAge)/24
   local EveryThreeDays = Days/3
   local Weeks = Days/7
   local Months = Weeks/4
   local Years = Months/12
   local LoadedSq = getCell():getOrCreateGridSquare(x, y, z)
   

   for j=0, LoadedSq:getObjects():size()-1 do 
       local object = LoadedSq:getObjects():get(j)
       local name = object:getSprite():getName()
            
        if name == "trashcontainers_01_16" then
            local ParasiteItems = object:getContainer():getItems()
            for i=0, ParasiteItems:size()-1 do 
               local item = ParasiteItems:get(i):getFullType()
               if string.find(item, "Dice") then
                  InZone1 = true
                  
                  local surrounding = getSurroundingSquares(x, y)
                  

                    
                  print("hi");
                  
               else
                  InZone1 = false
               end
            end
        end
    end

end

open drum
#

those two snippets are the whole thing i have

open drum
bright fog
open drum
#

correct

bright fog
#

Then that's the problem

open drum
#

is it?

bright fog
#

Yea, bcs it loads in cell/cell

#

But let's say your center square is on the border

open drum
#

yea

bright fog
#

Sure that one is loaded, but the squares in the unloaded cell aren't

open drum
#

yea, that 's what im experiencing

tawny blade
#

how do i make my own mods?

open drum
#

looking at the photo

bright fog
open drum
tawny blade
#

okay

bright fog
open drum
bright fog
open drum
#

along with the cell that is being loaded?

#

oh then i guess that coding isn't possible? or is there a bypass method

bright fog
open drum
#

what i want to do is.. having a trashcan with "certain item" in it as a tag

bright fog
#

Or use seed maps

open drum
#

seed maps?

bright fog
#

Noise maps

open drum
#

im unfamiliar with that

bright fog
#

Imo that's the best way to do this kind of stuff

open drum
#

do you have time to explain?

bright fog
#

Nop lol

#

Check out videos that explain them

open drum
#

oki, i guess ill have to search online

bright fog
#

I have plans to use noise maps to make my own 10 YL mod

open drum
#

yea that's what im planning too XD

#

i just have to search noise map?

#

looking at this .. it loads 1 cell

#

also part of other cell was loaded...

#

so.. why this is possible? do you know?

nimble slate
#

um um im kinda interested in commissioning a mod that has to do with like procedural map additions if anyone's interested or knows who to talk to B)

ancient grail
#

how do i add to MountOn property for weapon attachment items
esp if its vanilla, since there are alot of mod that actually overwrites the scripts
but i want to use do param but i would have to fetch what the data is currently so that i dont mess up other mods

#
 item AmmoStraps
    {
        DisplayCategory = WeaponPart,
        Type = WeaponPart,
        DisplayName = Ammo Straps,
        Icon = AmmoStrap,
        Weight = 0.5,
        WeightModifier = 0.5,
        ReloadTimeModifier = -5,
        MountOn = HuntingRifle; VarmintRifle; Shotgun,
        PartType = Sling,
        Tooltip = Tooltip_AmmoStrap,
        WorldStaticModel = AmmoStrap_Ground,
    }
#

sample i want to add to this item

nimble slate
#

damn somone told me to ask here skrunt can u send me a link mayhaps

open drum
#

found out that it's not the cell

#

it's the chunk

narrow yoke
#

the World Icon ist very big. What make i worg (sry for my english ๐Ÿ™‚ )

long thistle
#

Hi. I am trying to create a mod and I am following the right folder structure, and files. Don't matter what I do the mod doesn't appear on the mod list.
I am using b42, the mod is in c:/user/zomboid/mods and there is a valid media.info and poster.png files

long thistle
#

Yep

vast pier
#

and you have your mod contents in the 42.0 folder?

winter bolt
#

the mod.info, icon, and preview need to be inside the 42 folder

vast pier
long thistle
#

Ah thank you kindly, i got it working, it was a typo on the 42.0 folder

trail aspen
#

why is the pz community so against global ilumination lol

#

I cant understand

frank elbow
winter bolt
flat cipher
trail aspen
winter bolt
#

i mean its not lol the game is 2d

trail aspen
#

Will the developers transform the game's scenery into 3D? like furniture walls trees etc?

#

At least someone could transform these things into 3D to add shadows, it would be insane

#

Over time, many 3D things have come out, such as cars, character models and items, is the same possible with the map?

vivid imp
#

I mean yeah if you want to spend a bunch of time replacing every sprite and refactoring the games code for a change thats not ultimately necessary

#

Ive thought about it too but its not worth it

trail aspen
#

No one knows if it's really worth it because they gave up before completing it. I bet it's worth it.

hallow spade
#

I mean nobody's stopping you if you think it's worth it

trail aspen
#

it would be so beautiful

tacit pebble
sour island
#

With the change to the renderer you can get pretty close to 3D furniture with out the additional overhead.

#

They obviously want to keep the 2D aspect for the map- although I do think doors and moving objects would be more robust as 3D objects. For example having doors stay ajar - although you could do the same with 2D.

winter bolt
#

i think doors are 3d now?

sour island
#

Are they? I didn't zoom all the way in, but it looked 2D.

#

I assumed the new depth renderer makes it look 3D.

#

Or well, layer properly

tacit pebble
#

i'm confused too, gonna turn on my zomboid again..

sour island
#

If there's still heavy aliasing it's definitely 2D

#

I haven't been on the game for like 3 weeks

#

I've been modding menus ๐Ÿ˜ฉ

winter bolt
#

the edges are clean

sour island
#

Not the bottom, but that might be the floor clipping.

winter bolt
#

yeah its the floor

#

better screenshot

sour island
#

I stand corrected, I might look into having to hold E to slowly open doors lol

trail aspen
#

I think it would also be important to transform some things into 3D like furniture so you can drag something wherever you want, without putting it in your pocket and leaving the furniture straight on a tile as an option, things outside the grid have an extra charm

sour island
#

Look at the doors hand panel

winter bolt
#

i remember in the blogpost where they showed off the door anim they said they want to be able to have door peeking and stuff

sour island
#

๐Ÿค”

#

Both can be done with 2D or 3D

#

I just figured it would be easier to scale as 3D- so if it is, good

winter bolt
#

the front side of doors still uses the tile sprite but the other sides are 3d i think

#

no idea how it works though

trail aspen
#

and about the doors, I think the character should control the opening of the door

vast pier
#

Hey chuck, was wondering if you saw this

winter bolt
#

oh theyre 3d even when theyre closed lol you can see the shape still

sour island
vast pier
#

Yeah I'd like if we can dm, this is probably just a misunderstanding

#

I sent you a friend request earlier, since I couldn't dm you.

sour island
#

I can't DM you either, I don't accept friend requests, but same server requirement should work.

vast pier
#

lemme check my settings

winter bolt
#

the clipping with the character is so clean that i think the door model just uses the tile as a texture?

#

clipping with normal tiles is super pixellated

sour island
#

Ah yeah you guys are right, that is definitely 3D

winter bolt
sour island
#

Makes more sense to make something basically rotating in an axis to be 3D

winter bolt
#

i'd love if opening doors was like amnesia and you had to like drag the mouse

sour island
#

The textures need to be upscaled again I guess? They look rougher than usual.

sharp plinth
#

Modix Game Panel: Build for PZ Server. by myself.

https://steamcommunity.com/sharedfiles/filedetails/?id=3320238921

The first image showcases the Mod Manager, which I'm currently updating. It now connects seamlessly to SteamCMD and the Steam API, enabling users to download mods directly from the Steam Workshop. My goal is to make the system much easier to use by adding features like automatic updates for all mods whenever an author releases an update. Any feedback on these improvements would be greatly appreciated!

teal rampart
winter bolt
#

it wasnt an actual mod

teal rampart
#

Ya... I meant that one, but it was a step towards that direction.

#

Of course, integrating that into zomboid would have been an entirely different kind of beast. But still... it looked remarkably well.

vague marsh
fair python
#

With the new camera depth system, the player is now having depth checks with the sprites, which looks a lot more realistic imo
why would you need 3d models when we have this new tech?

fair python
sly ivy
#

it loaded in the rifle and data but not the model for some reason :(

#

painful

fair python
sour island
sly ivy
#

that could be it, given i had it loaded at 0.01 scale from earlier advice

#

btw, is it fbx? or do i somehow translate it to an .x model

sly ivy
sour island
#

Big furniture that just need to slide around would not benefit much more from being 3D unless the devs want to also allow for rotation of furniture that isn't 90 degrees- or another angle that they'd have to account for in a tileset.

#

If there was enough cases where 3D made more sense, Im sure they'd go that route for sure.

hallow spade
#

45ยฐ rotation steps would be neat tbh

teal rampart
#

Given how it's a post-apocalyptic world, everything being in orthogonal order is a bit unimmersive.

hallow spade
#

Though I might have come across a 45ยฐ armchair since playing on b42, but I'll have to take a pic if it happens again. Or see if I can figure out how to do it.

long thistle
# vast pier contents of 42.0

Funny when the files are ONLY in my 42.0 folder, they dont appear in the mod list, when i add them to the common folder they do, I must have them in all folders? Including the mod's root folder where common and 42.0 are located?

bronze yoke
#

did you have an empty common folder?

#

the common folder must exist even if there isn't anything in it

long thistle
#

Ah that must be it

#

I had the mod content both in the 42.0 and the common folder

bronze yoke
#

generally you should have assets and translations in common, and code and scripts in 42

#

and if your mod is going to support b41 you'll need a second copy of everything in the root folder, but that's not necessary if your mod is for b42

long thistle
#

Ok, I will keep trying, thank you

fair python
#

Which would also create other types of gameplay (FPS mods / easier youtube content creation)

vast pier
trail aspen
#

I prefer the world to be 3D but for the isometric perspective to remain.
The good thing about the world being 3D is that in addition to global illumination, it also allows relief on the ground at various slope levels.

lapis moth
#

project zomboid 2

vast pier
#

Nah it's not longer a project, it's just Zomboid

#

(we ignore the fact that the project part of the name is lore related)

fair python
#

I wondered at times to create a custom scenario for the game, with a short youtube video story as an epilogue for the custom scenario
Custom scenario aka Challenges

#

But it looks like it would be a pain to get the 3d models set and everything else

trail aspen
#

pz could have reliefs like this

bright fog
lapis moth
#

minecraft

#

The terrain of Kentucky is not undulating at all

magic eagle
#

Weโ€™re transforming PZ into a platform for studying AI agents. PZโ€™s complex survival systems and realistic interactions make it an excellent environment for testing and developing advanced AI models.

โœจ What weโ€™re working on:

  1. Connecting game states to Python for real-time Data/Action synchronization.
  2. Designing multi-agent systems where agents can survive, collaborate, and compete.
  3. Conducting exploratory experiments such as integrating Mixture of Experts (MoE) with HydraLoRA to enhance reasoning capabilities, generating synthetic data through self-play, recording inference paths with the "Trace" system, and implementing a "reasoning-action" loop via LLM+RL.

๐ŸŒŸ Roadmap:

  • Short-term: Train agents to master survival strategies and adapt to dynamic environments.
  • Mid-term: Host a live stream where 20 agents rebuild civilization in PZ.
  • Long-term: Release tools for generating real-time strategies and potentially open a server for players and agents to interact.

๐Ÿ“Œ Technical details: Details here
๐Ÿ“Œ Brief Overview: Overview here

Weโ€™re just getting started and would love your feedback, ideas, and collaboration! If youโ€™re interested in AI agents or have thoughts on how to push this project forward, join us in shaping the future of AI research in PZ

pearl prism
#

I think a 3D terrain respecting the game's aesthetics would be the best thing the Devs could do, most of the performance problems are precisely because the game is 2D

#

I know the aesthetics are a little different, but I would love for the PZ to have a lighting system similar to this

ebon dagger
#

I'm working on subverting the Aiming skill for archery skill items.

In order to simulate the effect that aiming has on accuracy, I'm hooking into "OnWeaponSwing".

My thought was to grab the HitChance of the scriptItem for the weapon and adjust it for each shot based on skill, but it looks like while HitChance is a field for item, there is no Get method for it.

if I create an instanceItem for the archery weapon, which should use the default values, and use that as the base to keep from accidentally "stacking" the archery bonus every shot, is creating the instanceItem then just abandoning it going to garbage collect correctly?

It is working for my script, I'm getting my desired effect.

bronze yoke
#

it will garbage collect

ebon dagger
#

awesome. I didn't want to generate hidden crossbows lol

vocal vector
#

is there a resource somewhere to help me understand the animsets xml files?

tranquil kindle
# vocal vector is there a resource somewhere to help me understand the animsets xml files?

Thats something some people have vague understanding, but noone really knows enough to make guide of it. I think devs said something about giving us more tools to set XML files, or even them being set when we use some other tool. I heard that devs don't write XML files for animations, as those are generated by their tools and we were kinda promised/ told that B42 will bring them?

vocal vector
#

i'm trying to make a custom racking animation and my character goes into the surrender animation instead ๐Ÿ™ƒ

tranquil kindle
#

Oh, i've done that.

#

Do you make it for b42?

vocal vector
#

thats the idea

tranquil kindle
#

currently you need to use b41 folder structure for animation files

#

As they're not read from new structure introduced by b42

vocal vector
#

so it goes into common?

tranquil kindle
#

So you know in B41 you have mods>yourmod>media\anims_X\Bob

#

Thats how you need to do it in B42

#

BUT IM not sure if its for Animations Alone, or for XML files too?

vocal vector
#

i have 42>media>animsets>player>actions

tranquil kindle
#

I think you need to skip "42"and "common" folders and instead puting it in them, have "media" (like in b41) and then there have your anims/x and animsets?

#

So everything new BUT animations go in old places

vocal vector
#

i'm going to try that then

tranquil kindle
#

@ornate sand Can you give your insight? I haven't really messed with b42 animations for guns and such

vocal vector
#

is the surrender anim because it can't find the anim set then?

tranquil kindle
#

Most likely

#

IF it were wrongly exported but not empty, it would deform your character most likely.

ornate sand
#

I'm at a very bad mental spot currently

#

AnimSets will not work

#

Custom ones especially

#

Stop trying

#

TIS issues a hotfix, or they don't

vocal vector
#

porca troia

#

but theres the emote packs for b42 no?

ornate sand
#

Si

#

You have to double them up

tranquil kindle
#

Oh... even double them... Yeah, im not touching animations till they fix it

vocal vector
#

i can see this is a minefield and probably not a great time to be trying to figure out how to do this

old ginkgo
ornate sand
#

I got custom animations via doubling, and I still can't get custom AnimSets like in B41

#

I want automatic fire to be automatic, not single - but I can't fix it

#

This is some hook in B42 unstable now

#

I wish I was God and could fix it, but I can't

#

Now let me watch Titanic and sleep โค๏ธ

vocal vector
#

thank you

#

you've saved me from banging my head against it for the rest of the evening/week

tranquil kindle
#

Sorry for trouble

ornate sand
#

You know I love you Nik

ebon dagger
#

Anyone know if the Java code checks "Hit Chance" during OnWeaponSwing or OnWeaponSwingHitPoint?

I'm realizing I have no ability to check if I am hooked early enough for my code affecting hit chance to actually matter lol

#

I'm looking at how to decompile now, to avoid these questions in the future ๐Ÿ˜„

stable yew
#

Hi, I'm creating new open sourced tool for PZ modding - clothing editor
https://github.com/PeterHammerman/PZ-modding-tools/

As it is in alpha stage it have very limited functions but already can be helpful with generating scripts or creating new items or to simply view items library.
Anyone who know C#, know how to make clothing mods for PZ and want contribute for this free open source tool is welcome for cooperation.

GitHub

Project Zomboid modding tools. Contribute to PeterHammerman/PZ-modding-tools development by creating an account on GitHub.

tranquil kindle
#

Its good for Siliencers when added together with onWeapon equip, so they both happen.

#

But also you need to make sure that if player loads with weapon in hand already, it still takes effect.

ebon dagger
#

I'm able to change stats between OnWeaponSwing, and the stats are reflected correctly in OnWeaponSwingHitPoint.

I'm basing the changes off of the script item so they don't end up stacking.

tranquil kindle
#
Events.OnWeaponSwing.Add(SuppressorTLOG)
Events.OnEquipPrimary.Add(SuppressorTLOG)
Events.OnGameStart.Add(function()
    local player = getPlayer()
    SuppressorTLOG(player, player:getPrimaryHandItem())
end)

It might not help you, but thats events i used for Suppressors.

ebon dagger
#

I just don't know if it matters, because if the attacks chance of hitting has already been determined by the time OnWeaponSwing fires, I'm doing it too late ๐Ÿ˜„

tranquil kindle
#

In b41 OnWeaponsSwing was running after i finished my shot from gun, so next one was affected

ornate sand
#

Rose sucks with the fire axe

#

I guess she's alright tho

#

She's a fatwide tho

#

Let Jack on that tabletop dudette, like c'mon

ebon dagger
#

I can do it on equip, but I would have to do it on perk level and gameload too.

flat relic
#

how exactly do oven recipes work regarding model transformation, as in changing the BreadDough model to the BreadDoughCooked, is it just automatic if a item is cookable?

ebon dagger
#

If I am reading it correctly, the chance of hitting isn't calculated until the same time as OnWeaponSwingHitPoint (in CombatManager.Java function called attackCollisionCheck) so, changing HitChance on OnWeaponSwing SHOULD do the trick.

I guess I can check it by setting the hit chance on the weapon to like 1000, then setting it to 0 in OnWeaponSwing

#

Welp, that confirmed it. The retical turned BRIGHT RED lol. It doesn't think I have a chance in hell.

#

One of my friends suggested I find a way to impliment pillow silencers. Single use, with an animation. And now I can't get it out of my head. Lol.

neon hamlet
#

So I just wanna make sure i'm doing this right.

{ 
    RpKit,
    Result: RPitemone,
    Result: RPitemtwo,
    Time: 2.0,
} ```

Is how it should look right? Or should result go one after another? Like this 

```` recipe Open RP Kit
{ 
    RpKit,
    Result: RPitemone, Result: RPitemtwo,
    Time: 2.0,
} ```
random lynx
#

Hey all ive never made a mod for anything before, i was playing in the discord with the boys last night (B42 unstable) all on our own instances (obviously lol) and i had an outloud thought about a feature that would add just a little drop of realism to the game, i just wanted to know how relatively easy it might be to build a mod that requires an item that already exists in B42 to complete a timed action that currently does not require that item? seems simple enough at first glance i just wanted to know if my assumptions were correct. If anyone has any input thatd be sick nasty

vocal vector
#

pretty simple, you can edit the existing timed action code to check the players inventory for the item

#

media>lua>shared>timedactions contains the existing timed actions

#

ISadditeminrecipe is a good place to start

winter coral
#

can someone help me update my mod for 42

#

i havnt modded inlike a year no idea wat im doing lol

ebon dagger
#

There are some really helpful links in the pin up top

limpid tiger
#

how possible do you guys think a drawbridge would be to make?

silent zealot
#

Is there any sort of unique identifier for an instance of an item, or at least for weapons? I want to save the fire status (single fire/full auto) so I don't have my rifle reset to full auto every time I load the game.

solar violet
#

where can i find an up to date guide or templates for modding everything im seeing is over 4 years old and out of date and wont function

bronze yoke
#

if you mean open/closing them, they literally just become different items

bronze yoke
silent zealot
#

I'll give that a go

#

And if that doesn't work, I'll just do it by name - so all M16s will get set the same etc which is good enough.

vast pier
umbral raptor
#

Hey, I was looking through PZ files in search for the model used by tshirts

#

i can't find it

#

i looked through all t-shirt clothingitems files and found them empty with no male or female model listed.

#

also

#

I have this glitch

bronze yoke
#

they don't use a model, their texture is applied directly to the player model

winter bolt
abstract cairn
#

Does anyone know how to use a custom texture when adding a symbol to the map in code? I'm looking at extra map symbols for reference.
I don't want this symbol to be able to be used by the player (IE they can add it to the map like a normal symbol) rather have it only be added via code.

so far I think my best lead is MapSymbolDefinitions.getInstance():addTexture( , )

silent zealot
#

Decided to do things the super lazy way and just set everything to singlefire on load, no saving of states.

umbral raptor
#

I canโ€™t get the T-shirt texture to work for some reason

tacit pebble
ebon dagger
#

The amount of times I have to post:

There is an FAQ on the mods page. You had to pass it to get to this comment section.

#

Is astounding.

abstract cairn
#

Does anyone know how I could possibly remove a specific marking?
I can clear ALL the map symbols but im trying to remove a specific type (I already know how to grab said specific type)

Worst case I could set its visibility to false... but I think that might just build up invisible symbols on the map lol

Release might be what I'm looking for though... thoughts?

abstract cairn
tacit pebble
# abstract cairn any idea how I'd get a reference to this function/call it from the client?

https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/characters/HaloTextHelper.html

addText(ISOPlayer, "YourText")
addGoodText(ISOPlayer, "YourText")
addBadText(ISOPlayer, "YourText")
addTextWithArrow(ISOPlayer, "YourText", boolean(arrowUP/Down), HaloTextHelper.ColorRGB)

-- For colorRGB, one of those
getBadColor()
getColorGreen()
getColorRed()
getColorWhite()
getGoodColor()
ColorRGB(r, g, b, a)
abstract cairn
tacit pebble
#
    local player = getPlayer()
    if not player:isReading() or not player:tooDarkToRead() then
        HaloTextHelper.addGoodText(player, getText("I truned off indoor lights."));

I just copied and pasted from my random lua files

abstract cairn
#

halotexthelper is globally accessible?

umbral raptor
#

Anyone know how to fix this problem? The skin is showing through the trousers even though I'm using vanilla models

silent zealot
abstract cairn
#

Anyone know how I can make it so my code checks if the player is locally hosting a world/non-dedicated hosting?

bronze yoke
#

isCoopHost()

abstract cairn
# bronze yoke ``isCoopHost()``

thats for normal hosting from the main menu like just clicking the host button yeah?

does it return true if the client is the one hosting, or return true if the session itself is hosted

i have an admin-access level check but you dont have access levels in local hosted servers

bronze yoke
#

it returns true if the client is the one hosting

#

i don't think the other clients even know if it's in-game hosted or not

abstract cairn
#

do I need to do player:isCoopHost() or something?

#

from isoplayer

bronze yoke
#

it's a global function

abstract cairn
#

so just isCoopHost() works?

bronze yoke
#

yeah

abstract cairn
#

you are a godsend (I still remember you helping me with other mod ty again btw)
saving me sleep hours genuinely T-T

bronze yoke
#

there isn't any real difference between in-game hosted and dedicated so there isn't much code to detect it or anything

abstract cairn
tacit pebble
slim swan
#

Is that possible to make the weapon can be wetted and broken when wet

undone elbow
#

Even if not, you can make your own "wet system" for weapons.

silent zealot
#

And HandWeapon inherits those.

#

So definitely possible.

winter bolt
#

ive never seen a regular item get wet before so i think those are just for clothing

crisp fossil
#

how do you get the available recipe of an item? this is what i got for now

local box = playerObj:getInventory():getFirstTypeRecurse("556Box")
local recipes = RecipeManager.getUniqueRecipeItems(box, playerObj, containerList)
print(recipes:size())

this size is 0
my plan is to get the recipe then perform it

true nimbus
#

Hello, could you help me on that one please?
I really have concerns about minimap size and i wanted to change it (i play on 1440p, i feel annoyed to not see it)

In ISMinimap.lua

function ISMiniMap.InitPlayer(playerNum)
    local width = 200
    local height = 200

Is it possible to import isminimap as mod and then use an ini/txt file where users would define their custom res?
thank you

silent zealot
hallow spade
#

Oh, is chickenpocalypse when you get too many and the game dies?

umbral raptor
#

How can I make it so that when an item is equipped it takes off any pants?

deep charm
#

Hey folks - I want to make a cat NPC mod, where the cat just follows the player - can someone point me towards some information on creating an NPC? What I've found so far is a bit vague and I'm not sure where to look next

umbral raptor
#

you could probably salvage some code from there, but i doubt it'd work tbh

#

or maybe look at the PZ animal script?

#

Found the coding for animals and their pathfinding

#

steamapps\common\ProjectZomboid\media\actiongroups

#

I think this is what you're looking for.

deep charm
#

Thanks @umbral raptor

weary forge
#

Is there a way to mod the street lamps? I tried finding the file they are contained in but had no luck so far (i wanted to make them sledge-able)

#

The lower half, i am aware that you can destroy the upper half

umbral raptor
#

Itโ€™s not Project Zomboid without gore

random finch
#

We can draw rectangles & lines using ISUIElement which I am pretty sure is using inaccessible LineDrawer. Is there a way to draw circles aside from using a texture?

mellow frigate
undone elbow
#

Is there a way to affect player's temperature?

#

I mean by using Lua.

random finch
undone elbow
#

No, as far as I remember.

sharp plinth
shell hull
#

hello! I'm trying to make a mod where players can buy items in exchange of currency. I made most items work except for books, cds, vhs and newspaper because the item code is generic. how do I make it so that the crafting recipe output will be the specific items? thank you ๐Ÿซถ

quiet plank
shell hull
quiet plank
#

I've submitted patches through comments before and they've been missed, so.. I guess escalation is reasonable. LOL

shell hull
#

i'm sure he'll work on it, he's pretty active with his mod :>

frank elbow
#

I've had moments where I've been like "man, I wish that was a thing"โ€”looking forward to it being a thing & hoping it can handle more than one level of directories

sly monolith
#

guys would it be possible to pull the name of the dye color in a bottle, the new b42 dyes only have that tiny stip of color, and you have to go guessing what hue it actually has

undone elbow
#

I think dyes can be mixed in any proportion.

hidden estuary
#

does anyone knows whats going on with the profession im making? it adds +1 Fitness +1 Strength

#

when booting into the game it stays +1 fitness +1 strength but then the traits section says I have both Fit and Stout traits

#

which are both +2, not +1, do you contract Fit and Stout from lvl 6 strenth and fitness?

#

it didnt seem to break anything, but I want to know what's the game doing exactly

#

and logs didnt help

#

build 41 btw

ebon dagger
#

Most of the mods I've been working on are being created because they are a system I wanted in my bigger mod. I've created my documentation for the BIG mod I'm working on. I would welcome feedback on my documentation if anyone is interested.

I also welcome feedback on the contents of the overall mod.

https://docs.google.com/document/d/1WXO2QpMfaGyKs4tQiZ1Jfb8_ORx3g7RVecLbw-mG0QY/edit?usp=sharing

blazing vine
#

Is there anything else that uses ButcheringUtil.lua? Im trying to have my custom animal be able to get butchered by its not working.

pearl cobalt
#

Hi guys ! I have a small issue that you might know how to figure out.

I'm working a mod where you can plug sinks/bathtubs to use em as water containers.

Doing so, i'm changing the tile of said sinks when there's enough water, but it seems like i have a transparency issue whenever i change the sprite. It also looks brighter for some reason

#

here's how it look like with the original tile

#

any idea how to fix this? thanks for any help !

open meadow
sly monolith
outer solstice
#

newbie here... can't figure out how to look at the base item scripts

#

which file should i be looking at?

ebon dagger
#

\Steam\steamapps\common\ProjectZomboid\media\scripts\items

outer solstice
#

thanks, never thought to look under media

buoyant juniper
errant bluff
ebon dagger
#

Hmmm. getting reports of the SAME error for two of my mods. But only SOME users.

When trying to addXP to characters, its having issues getting the SandboxVar for the amount. I can't seem to reproduce it, so I'm thinking mod conflict but not sure.

#

And now I can't get to the workshop lol

#

Cannot invoke "zombie.SandboxOptions$SandboxOption.asConfigOption()" because the return value of "zombie.SandboxOptions.getOptionByName(String)" is null

#

This tells me that the SandboxVar is coming back as null. Which is strange. It should default.

hidden estuary
#

damnit how do I make my professions work in multiplayer defeat

tacit pebble
quasi totem
#

can anyone point me to where outfit IDs are actually defined? I see the outfit distribution scripts but can't seem to find where outfits such as "Biker" are actually defined

hidden estuary
#

if anyone has had experience with professions it would help to know if im missing a step into making it multiplayer compatible, cause otherwise yhe perk works for both singleplayer B41 and B42
edit for the future person that's going to look up this exact issue: copypasting my lua file into lua/client seemed to do the trick for multiplayer without breaking singleplayer.

silent zealot
bright fog
bright fog
#

The name of it linked to its composition ?

quasi totem
#

I ended up finding it, what I was looking for was in the clothing xml definitions

bright fog
#

๐Ÿ‘Œ

quasi totem
#

appreciate the followup though thank you ๐Ÿ™‚

slim swan
#

when i test my mod, is that have any way no need to keep close and open PZ

tacit pebble
#

depends by what you've edited but mostly this works.

slim swan
#

where can i find this tool

tacit pebble
bronze yoke
#

you can also just return to the main menu and back, no need to close the game

#

if your mod affects the main menu there's a reload button there too in the bottom right

tidal geode
#

does anyone have a tilesheet template

slim swan
#

thanks~:)

robust copper
#

So I'm brand new to modding but I wanna make a mod for this game, where would I start

tacit pebble
#

basic description is here. you can figure what program you will need and what kind of work you are gonna do.

storm pecan
#

where can I find code that handles item drop logic when it dragged outside of inventory?

#

is it possible to modify or override it with lua scripting?

slim swan
#

why the rotate and offset for weapon didn't work

#

no matter what number i change ,it didn't work

sly monolith
#

like it doesn't do anything? no movement/rotation?

slim swan
#

yes

sly monolith
#

i think you shouldn't be doing rotate under the texture line, also offset of 50 seems like a really big number, in the game files it's usually something in 0.0s, tho i'm no expert ;p

slim swan
#

oh,i fix it ,it should be bip01_prop1

#

prop2 is second hand

umbral raptor
#

I have a question

#

how do u define a new stove?

#

i cant seem to find anything related to that other than defining its a moveable in scripts

#

like how do i tell through a lua script or smthin that this new moveable is a stove and should function as such?

bright fog
# tacit pebble

Just share the community debug tools which has a better UI for that and allows you to reload multiple files at once

tacit pebble
#

is there any function to get actual game speed? i saw once before but i can't remember :/

winter bolt
tacit pebble
fossil basin
#

hi everyone! does anyone have a guide on how to create your own COS mod? I want to make my model in the form of COS, while the original PZ character should be hidden

glass basalt
#

Hello everyone, haven't been here in a year. In case I am blind, is there a resource anywhere that explains any Lua or class changes between Build 41 and Build 42 for updating mods? If not, I'll try brute-forcing it and learn the changes from scratch

glass basalt
#

I found the pinned thread, so I'll use that, nevermind then!

true nimbus
#

hey there, i think i shat in my code and this is IF fest, but seems to work

function ISMiniMap.InitPlayer(playerNum)
    local width = 200  -- Default size
    local height = 200 -- Default size
    
    local reader = getFileReader("minimapsize.ini", true)
    if reader then
        local line = reader:readLine()
        reader:close()
        
        if line then
            local size = tonumber(line)
            if size and size >= 100 and size <= 500 then
                width = size
                height = size
                print("DEBUG: Setting minimap size to: " .. size)
            end
        end
    end

Is it ok like that or should i change something? It allows players to get a custom minimap size on a server (b41)

hidden estuary
#

this is hardly an if fest, its just error prevention

#

only suggestion I have is that after you confirm it works you should comment out the print, those tend to add up and you don't need them for releases

tranquil reef
#

animsets are ignored for custom animals, anyone know what the reason for this could be

#

copied a rat, it works fine as a new custom animal, but I copy paste all of the animsets for rats, rename it to my custom animal, and then change the name of the animset the custom animal uses. it says the custom animset folder doesn't exist

silent zealot
silent zealot
#

Everyone who tries to work with animsets in B42 goes insane.

tranquil reef
#

damn, I saw something about that but wasn't sure if it was just one guy

#

guess no custom animal animations till they fix it

silent zealot
#

I think there was a partial workaround by copying stuff into the mod's B41 animset path or something... good luck if you want to try doing it.

tranquil reef
#

That worked for one of my mods, but not for my animal one. I really didn't change anything besides the name of the folder though, so it should've worked unless I'm missing something

hidden estuary
#

like flipping a debug mode

silent zealot
#

until you have a function called printThing() and break the whole mod by making it --printThing

#

It will work fine for small file s(which honestly is a lot of modding) but I like to do the variable thing because it means I won't screw up

#

And also, if someone has issues with a mod I can ask them to enable debug mod and send me their console.txt

hidden estuary
#

easy, just print( and --print(

tranquil reef
#

Is there any optimized way to spawn something next to trash can objects around the player

silent zealot
#

You mean in reaction to the player interacting with the trash can? Or just when they go near one?

#

If it's a reaction you can tie your code to whatever interaction they do (move items in/out) or even things that normally don't trigger actions like bringing up the context menu or looking at the inventory contents.

#

No performance issues with that.

tranquil reef
#

I meant near one, but actually I should probably just do interaction

silent zealot
#

Near: I have no idea how you'd do it without a "every time the player moves to a new tile see if any of the tiles near are garbage bins"

tranquil reef
#

I could maybe have a thing where it checks within a 10 square radius every 10 minutes, if there's a trash can then it has a chance to spawn something there, but eh

#

I could try to make it happen even less, but at that point nobody's ever gonna see the thing appear lol

silent zealot
#

Probably not unreasonable, especially if you cache the location of bins on a tile.

#

What are you spawning from the bin?

#

Trash zombies?

tranquil reef
#

Raccoons

#

Adding them early, but that's partly why I want it to be kind of gimmicky and easy to find them. No point in having an ambient "early raccoons" mod if by the time you'd find one they're already added by TIS

silent zealot
#

They are at least partially in the code

#

no idea how functional/complete though

tranquil reef
#

Incomplete and no spawning logic

silent zealot
#

You can pick them up!

#

otherwise they run around in a panic whcih I guess is all they need to do for "suddenly you're in a random house for no reason"

#

Could spawn them whenever a player looks in the trash, by adding to ISInventoryPage or (more likely) ISInventoryPane with a "container being displayed is a trashcan" check.

#

...and play the suprise zombie sound too

tranquil reef
#

5000 mod incompatibilities to let people use raccoons

#

But yeah, I'll try doing that. Can the surprise zombie sound just be called randomly?

silent zealot
#

a lua prefix patch won't break anything - you don't need to change the code of existing functions, just find displayContentsofContainer(container) and do a prefix with your check then call the original function.

keen silo
#

Hey, I need help with some coding \ debugging
essentially what I need is to get the time each line in a broadcast is shown
to do this, I was thinking of using something like an in game timer in seconds, marking the start of one line, and the start of another, and making the difference
however
I do not know what function I can use to get this time in seconds
up to the second decimal
I dont care if its something like utc

(like 1234894897427.53 to 1234894897431.14, because I'd just do the difference and get a reasonable time in seconds, 3.61)

silent zealot
#

Even if another mod patches the same function it's fine, you can glue on as many prefixpostfix style pacthes as you want... the problem is when a mod copy-pastes an entire function.

keen silo
#

yes, I need to know exactly how long each line lasts

#

It is my understanding that you can control it with a special tag ${t:3.27} for instance

#

but it does not seem to be working properly

silent zealot
#

if you find the data for each station you can read the numbers from that

keen silo
#

how can I do that?

silent zealot
#

Or do you mean you need that info for each line as it is displayed?

keen silo
#

I'd like it as it is displayed

silent zealot
#

Try ProjectZomboid\media\radio\

keen silo
#

no

#

you didn't understand

#

I don't need when it is shown

#

I need how long each individual line lasts

#

Im playing audio clips on each line

winter bolt
#

it depends which emitter the game uses for it i guess?

keen silo
#

so if it doesn't last exactly how long the audio is, it desyncs

#

and sounds bad

silent zealot
#

Look for lua files with "radio" or "television" in the name, check out likely ones.

tranquil reef
silent zealot
#

that is less evil ๐Ÿ˜‚

tranquil reef
#

"Mod for adding raccoons early big_smile", anyone who plays it gets jumpscared every 5 seconds

#

god, do I have to locate every single trash can tile manually through all of these tilesets?

#

does it go from left to right order or top to bottom

silent zealot
silent zealot
tranquil reef
#

you'd be right Hollow

silent zealot
#

also, maybe not. there is an iventory type. Let me check...

#

I've got some code in Put Anyting in Anything to spit out the container "type"

#

"bin"

tranquil reef
#

lol I'm an idiot, turns out there really was a tileset with a bunch of trash cans. guess the search bar is broken in tilezed

silent zealot
#

So from the inventory object (which you're getting from hooking into InventoryPane , if inventory:getType() == "bin"

#

that's what gives a container this icon in the inventory window:

tranquil reef
#

Which function in inventorypane do you think I should hook into?

#

I accidentally did the inventorypage so I did selectContainer

silent zealot
#

also "dumpster" as a typoe

tranquil reef
#

But I'll switch to inventorypane

silent zealot
#

You can probably use either

#

if you have the container object call GetInventory() to get the inventory object attached to it.

#

test by adding a prefix to that for print(button.inventory:getType())

#

Then you can see exactly when it gets called.

#

Then replace print with createRacoon() and you're done. /s

tranquil reef
#

Can I get the container location from that?

silent zealot
#

from inventory you can getParent()

tranquil reef
#

I need to check the button & I need to know where the trash bin is so I can spawn it there

tranquil reef
#

selectContainer only does it if you swap in the inventory moyai

silent zealot
#

which I think will be the isoworldobject, which should have a way to get location.

silent zealot
tranquil reef
#

ISInventoryPage:setNewContainer(inventory) would maybe work

buoyant violet
#

Not any hopes up since im still waiting for permission from Paw, but slowly porting to v42 and removing all those incompatibilities, will mostly focus on armors. Weapons maybe but for now, no

buoyant violet
#

and adapting to the new crafting

buoyant violet
silent zealot
#

I have vague memories of that being broken in B41.78.

buoyant violet
#

Due to some LUA stuff left in the mod

silent zealot
#

Possibly because it copy-pasted some nightvision code that was bad? Been a while. But I wanted the witch hat.

#

And now that's in vanilla!

buoyant violet
#

that mainly yes

#

and also some unneeded armor code

silent zealot
#

Also, if you like Witch-in-tactical-armor check out Tactical Breach Wizards. https://store.steampowered.com/app/1043810/Tactical_Breach_Wizards/

Tactical Breach Wizards is a turn-based tactics game in which you lead a team of renegade wizards in kevlar, as they unravel a modern conspiracy plot and/or find the most stylish way to punch a Traffic Warlock through a 4th story window.It's a story-driven campaign of about 14 hours, in which you...Combo spells for satisfying resultsEach of your...

Price

$19.99

Recommendations

7811

Metacritic

87

โ–ถ Play video
#

Or at least watch the trailer, which is hilarious.

silent zealot
#

Same vibe ๐Ÿ˜‚

trail aspen
#

Could someone make a mod that makes the zombies walk more "realistic" like in TWD and make them more rotten? Could it be compatible with that mod with more death animations, it would be incredible

silent zealot
#

Redo all animations?

#

Not impossible, but sounds like a huge amount of work.

#

"more rotten" can be covered with different textures, you don't want to use more detailed models when there will be hundreds on screen at once.

tranquil reef
#

Not sure if you mean you want animations like that, or if that's not enough. Stumblers do walk a lot more like TWD though

winter bolt
#

zombies actually do get more rotten the more time passes ingame

vast pier
#

I've spent more time trying to mod the game than actually playing it, seems to always happen when I find a new game

trail aspen
winter bolt
trail aspen
#

Whats the real name

tranquil reef
# trail aspen Cant find this mod

Not a mod, in the sandbox options you can change zombie speed between shamblers, whatever the name for the normal ones are, and sprinters

vast pier
#

I think the new default is random between fast and shambler

tranquil reef
#

Each have custom animations, shamblers are a lot cooler to play with imo but I like playing vanilla entirely, so I usually just don't see them often

tranquil reef
#

Normal ones with a lower chance of shamblers

vast pier
#

I usually play with sprinters set to low. Gotta stay on your toes

#

I don't want constant sprinters, as that feels like overkill.
But a random sprinter that comes up behind you and catches you while you have a horde you're training around? Perfection

pearl cobalt
vast pier
#

can't you already use them as water containers in vanilla?

pearl cobalt
#

there's a lot of cool stuff being done here, that's awesome. it's a shame we don't have topics to organize all of this, if would give visibilty to everyone

earnest grove
#

where can i find tutorials for how to export the contents/certain filetypes of an existing mod as well as how to convert certain clothing into other types of clothing? planning to convert some wigs from another mod into an actual hairstyle. Thanks

vast pier
#

I feel like trying to categorize mod development would cause less visibility to smaller mods or less popular types

pearl cobalt
vast pier
#

It's already exported into your computer directory

#

C:\Program Files (x86)\Steam\steamapps\workshop\content\108600

pearl cobalt
vast pier
pearl cobalt
vast pier
#

Dude if you have the mod installed. you already have the assets. What is confusing about that

#

I saw the message before you deleted it

#

Not you Velk, Mail sent and deleted a message about how these answers aren't helping. Even though I literally told them that they already have the contents of the mod on their computer, they literally just need to copy paste the mod files

pearl cobalt
#

I understood ๐Ÿ™‚

vast pier
#

Just wanted to clarify so you didn't think I was going crazy on you ๐Ÿ˜…

pearl cobalt
#

I saw it too, don't worry

vast pier
#

Is it possible to have modded models reference vanilla textures, or do I need to make copies of the textures?

earnest grove
#

I think i get it now though so it's really helpful too

vast pier
#

I mean, would you not be able to extract the files by knowing where they are located? They're not like, encrypted

vast pier
earnest grove
#

yeah theyre not encrypted at all it's almost like that's not the question and i just dont know whatever an .x is nor how to open them

vast pier
#

x is a model format

earnest grove
#

What!

vast pier
#

I do not know how to open them either, a lot of people use fbx instead since it's modder friendly

earnest grove
#

gee i wonder why we cant open them

vast pier
#

Since the model is already being used as wig, I don't think you will need to modify it anyway

earnest grove
#

thank you btw

vast pier
#

I personally don't know how to open x files, I'm sure it's possible

earnest grove
#

yeah i dont know what i use either it's almost as if im trying to ask what to use

vast pier
#

Okay but do you even need to modify the model? I thought you just wanted to turn it into a hairstyle

#

Someone here may know a more direct way, just did some googling to try to find an answer for you.

earnest grove
#

it was that simple

vast pier
#

what do you mean

earnest grove
#

thank you for this btw and as well as the part where you point out where my own files are lcoated i appreciate that as well actually

vast pier
#

yee

#

I didn't know any of this either.
Take it with a grain of salt, as I haven't messed with .x files.
This is just what I found after searching online a little bit.

earnest grove
#

whatever man

vast pier
tranquil reef
#

Can I call "self." for variables if I'm adding onto IS functions

vast pier
errant bluff
tranquil reef
#

Can't tell if this is paradoxical or not

#

the original function returns the button

winter bolt
#

at the end of your function you'll need to also return the button

tranquil reef
#

thank you

#

they really gotta improve this debug menu

#

not only does it give you 0 information, but you have to scroll through the thousands of lua scripts to reload a single one rather than just search for it in an input field

winter bolt
#

i dont trust the reload lua feature tbh

#

i just restart the game

robust locust
#

i've noticed that sounds in recipes don't work... have they been disabled for now?

tranquil reef
#

yeah, it doesn't work every time. still though, adding "return" or fixing a typo usually works with it, and it's a pain in the ass to spam F11 and Escape to try to break free from the error popup, get back to the main menu, then reload the save

errant bluff
robust locust
#

does anyone know if it's possible to trigger sounds from onCreate functions or some other function in a recipe?

pearl cobalt
# winter bolt i dont trust the reload lua feature tbh

especially with UI mods, you have to reload the game, otherwise your UI in mod gets duplicated.

I also noticed that whenever you had an exception in the game, the reload won't work correctly
Plus, if you add new vars, you need to reload to see them in debug

winter bolt
#

i dont know much about how sounds work though so i dont know if you can play it on other sound emitters

robust locust
#

oh nice! thanks, i'll give that a stab

winter bolt
#

im not sure what object type self.charger is here

pearl cobalt
#

i'm getting there! two sinks left

And... I forgot i have the tubs to do too xD

robust locust
#

I have an onCreate that uses craftRecipe, Character... so that should work

winter bolt
#

yeah you can do it then

tranquil reef
#

how do i disable this animal text

bright fog
# tranquil reef

Also you store the original in a table, but then don't use it from the table

#

Also you need to pass self here

#

A lot is wrong in your decoration here

tranquil reef
#

I already passed self and it works now, but not sure why the other thing is needed

bright fog
#
  • store in a local variable, not in a variable inside the class
  • return button like spongie mentioned before
  • your arguments need to pass self then the 4 arguments
bright fog
#

ISInventoryPage.o_addContainerButton = ....
But you then call o_addContainerButton
Which isn't the function in question

trim quartz
#

Hi all, trying to get "getAllRecipesFor" to work, but its returning nothing, only docs I can find say its expecting a string, but not what value specifically its looking for, is it the short name? the entity name e.g. Base.Whatever or something else?

bright fog
#

Wait no

#

No bcs that gets all recipes here

trim quartz
#

Haha, no worries. Are there docs for this or is it a bang face into it until success type deal? ๐Ÿ™‚

bright fog
trim quartz
#

I assume that part is in the exe rather than in the lua

#

couldnt find it in the lua

winter bolt
# tranquil reef

yeah i didnt even notice this it should just be local o_addContainerButton = ...

bright fog
#

Check the wiki

winter bolt
#

then when you call the function you pass in self before the other parameters

bright fog
#

For Decompiling game code

#

Also check the Visual Studio Code page

#

This might have info you are interested in, notably how to search in every files in a folder

trim quartz
#

Yeah got all that setup thanks. managed to find most stuff but thats in script manager I'm guessing its in the code elsewhere

#

all good

#

appreciate the input

vast pier
tranquil reef
#

It doesn't show up half the time even in debug mode

#

There's gotta be something that triggers it, just not sure what it is

stiff fiber
#

I want to make the cars in my mods easier to control. I want them to turn a bit faster and a bit more, but not as much as some other modded vehicles (like the barracuda for example).
I know that the steeringIncrement value determines how much the wheel actually turns but what determines how fast you can turn the wheel? The steeringClamp value?
I also want to ask you what the ideal values for these settings would be in your oppinion?

vast pier
#

huh that's strange

#

Imported beer has its own texture for when drinking, but uses the normal beer texture on the ground

#

they do not look similar, must be a mistake

#

white/yellow in hand, brown on ground?

bronze yoke
#

it was in sandbox options for years and enabled by default but didn't do anything

ancient grail
ancient grail
trim quartz
#

hey all, anyone think of a reason why "getScriptManager():getAllRecipes();" is returning an empty table?

winter bolt
#

they left zombie smell in sandbox for years until b41 blew up and they removed it because people kept spreading urban legends about it

bronze yoke
#

'recipe' refers to the b41 recipe system that isn't used anymore, the new ones are called craftRecipes

pearl cobalt
austere roost
#

Sorry, does anyone know how to replace the weapon model when shooting? I want the Taser model to change to a model without a cartridge when fired. I tried doing this through the items.txt file and wrote code myself, but it didn't work.

solar lake
#

Hello I have a mod who add a wild fruit for foraging and now i try to add a sound when i pick it up .
I have my script and .ogg but i don't know how to proceed with .lua
If i need to add a sound in the soundbanks or what ?
Thx you !

vast pier