#mod_development
1 messages ยท Page 292 of 1
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
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
After B42 they should keep the versioning structure
Allowing you to have B42 and B43 later in the same mod
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
versioning will be useful even within b42, i heavily recommend anyone to take advantage of the common folder while you still can
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
have you tried player:resetEquippedHandsModels() ?
yayy i had my doubts LOL
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
i was thinking that held bags are technically still clothing so they might not care about this function that's usually used for weapons
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
Mockup of upcoming crafting grid for Inventory Tetris
integrated authentic z
Im bit sad models didn't work that good but I slowly deliver promised
that's my favorite part haha
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
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 
It has been a lot of work, every model and texture has been remade
Yeah, I totaly agree, the thing is that I would really like to know how to use them
It looks awesome btw, really love your work, very detailed
thats so cool
love that
GIMME! NOW!
will be uploaded tonight
soon
im just double checking everything to make sure ive done it all
and making the new mod images
YAY!
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
instanceItem("Module.Id"):getWorldObjectSprite() may work.
tilezed
it's bundled in the project zomboid modding tools which is in your steam library if you own the game
PZ has always used .x for its vanilla model files. It sees .fbx too though
Yeah, I know, that's also why I want to figure out how to work with .x files
You still having this issue? is the model's normals facing correctly?
Oh no, I fixed it, but only with a .fbx, couldn't get it to work on the .x file type
Yeah.. I would just keep using .fbx, there's really no difference between the two as far as I know
From what I know (I might be wrong, very likely) .x files take less memory space / processing power, and Animals work with .x files as well, so I want to figure them out hehe
valid reasoning, what are you using to export to .x?
For sanity reasons its best to stick to FBX lol
Only blender 2.79, nothing else rn
Also i cant say ive hear of fbx files being less performant
If theyare its probably a very miniscule performance dip
I know hehe, that's what I said to myself back when I did mods for b41, but idk, I just feel it like a challenge now
Yeah, It is miniscule, it only tends to make a difference if a lot of models are rendered at the same time
Also using Blender2.79, jeez man do u like shackling yourself haha
It's like O(n) compared to O(n^2)
Hmmm where do you see that?
Hahahaha I know, when I first tried it was so wierd
Oh no, I was just using a cs concept for it
Not that it works like that really
lol that's a big difference in performance
I was about to say the difference bewtween O(n) and O(n^2) is BIG
So fairly sure its not like that
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
where do you get this performance difference from?
Is there a modder here that has consistently exported .x files for their mods?
Lmao it was just an idea, not that it works like that at all
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)
Well i learned yesterday that Vanilla Firearms Expansion did but that ended up blowing up in their face
Not that I know of really, I mainly use .fbx and only .x in weapons and static stuff
B42 Modpocalypse casualty huh?
Kinda, but it seems like itll be updated sooner rather than later!
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.
Do you get errors?
Is tilezed just tiled for PZ?
It depends, what kind of mods?
No not really. just things don't mesh well together for balance / gameplay flow.
equipment and recipes mostly I suppose.
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
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
Yes. I'm familiar with the decompiled artifacts and have patched this file.
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
Thank you so much!
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
You can modify or add items and replaceor add recipies.
And patch lua code as well if needed.
Just need to have your mod loaded after any mods you're modyifying.
yeah just never worked with Lua, I know C++, but never done anything in lua, and its unstructured nature hurts my brain so far.
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)
Me when I started programming C: Why do I need to declare everything first! Why is it so strict on types! AAAARGH!!
Me now: I wish lua was strictly typed, AAAARGH!
pretty much yeah.
to be honest, if you write more like c++, you'll write better code anyway ๐ญ the vanilla lua and most mods are extremely messy and not because of the language
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.
Literally me rn lol
for i = 0, getNumActivePlayer():size() - 1 do
local playerIndex = getNumActivePlayer():get(i)
maybe?
you can't do this from the server side as it uses player indexes, but if it's running on the server getNumActivePlayers() should return 0 anyway and nothing will run to error
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?
It is triggered via an RCON command
on demand
using a mod to allow RCON to trigger a lua script
it's definitely running on the server then, you should use online ids/the arraylist of players from getOnlinePlayers()
Is there a place to find out what I can/can't access from serverside?
I know of this: https://projectzomboid.com/modding
package index
no, the game's code isn't really clearly separated in any logical way
but I can't make much sense of what is and isn't available from server
Ok! Thank you so much! I appreciate ya!
It's clearly separated into client, server and shared.... at random.
for b41, it is sadly a safe assumption that nearly everything is client authoritative
in b42 it seems extremely likely this will change
I was using vineflower
I just zipped the zombie folder into jar and added it to a project as external library
looks absolutely slapping
Yeah those look great!
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
https://steamcommunity.com/sharedfiles/filedetails/?id=3407733664
Goth Backpacks B42 has been released, I know many of y'all were waiting for it. I hope you enjoy!
getPlayerByOnlineID()
What is "OnlineID"? Steam64? Player Name? Account Name? Some other identifier?
I see it is an Int of some sort
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
all of the bones with nub in the name
you can select all bones by their name but im not at my pc rn
Does anyone know how to make a message appear above a players head that is client side only?
It's fine, I was able to figure it out by looking at the b42 vanilla .x file. I figured it was the bone because it was mentioned on your female body fix. Thank you!
What is the relation of OnTick and PlayerUpdate and things like OnEveryMinute/Hour etc.
I believe halo text is client only
you legend ty
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
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
Can some modder make a mod for pz that adds real time shadows or its tooo complicated?
Like
on tick fires every tick (arbitrary amount of time, just however long it takes the game to process and render one update, it is as fast as possible unless there is an fps limit), onplayerupdate is just every tick but for each player, on every minute/hour fires at those in-game time intervals
Ok, so its not like, 32 ticks to a minute or anything etc.
yeah, it's not tied to any specific amount of real or in-game time whatsoever
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.
people are way too scared of ontick
I'm scared of MY CODE in ontick ๐
Why don't you do it in OnEveryMinute?
I didn't read much into your specific situation, but a lot of people underestimate the OnEveryMinute/Hour/Days event
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
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
1 in-game minute = 2.5 seconds at default game speed
ZombRand(MyChance * GameTime:getInstance():getInvMultiplier()) == 0
Which is what is used in XpUpdate for fitness/strength
do you know how often it was firing (like a print every time it gives you xp in the console)
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
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 ๐
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
I recommend you drop that assumption soon, it's not good ๐ข
It would also be easier to explain to users that 30 means 30% instead of 700 means "magic numbers"
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)
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.
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
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
I sure did.
i had no idea, that's awesome
Nexus version of my mod "Semi Realistic Fluid Containers" for those of whom don't use the steam version of the game.
https://www.nexusmods.com/projectzomboid/mods/226
Looking for someone with knowledge on Noir's Shops
I have a multiplayer server and I am not able to modify this mod so that it has the items that I would like in the store or to be able to sell the items that I want, I modify the shopx lua and it is of no use, please, can anyone know? can you explain?
https://steamcommunity.com/workshop/filedetails/?id=2840330802
Should go in #mod_support pretty sure
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"
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
Ah, I see!
Oh my, that does put a damper on a lot of mods I've used in the past, RIP
hi is there a setting in debug mode to know the distribution type of a container?
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:
when does this code run?
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?
it is!
but calories.... something is just wrong
I'd love to be able to plant a few rows of cheese and bread. Just go outside in my garden and pick breakfast
What's not broken at all?
vegan grilled cheese
i haven't had any multiplayer related bugs
Make it 200kg and 4m and rename it to arapaima so someone can finally catch the fabled monster
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...
which function?
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
that may be the issue, the squares around it are not all going to have loaded yet
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 ?
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)
what doese the error say?
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.
u r trying to use symAPI as table when it isn't one
What is "self"?
Did you copy this code from somewhere else where it was part of an object?
whatever the "self" is, u have to make sure it is a "table"
I'm pretty sure self is a special lua thing that only works when you're in thing.function() to refer to thing
they aren't weights
well that's another problem then. ๐
local nutritionFactor = 2.2 * fishSizeData.weight / item:getActualWeight()
'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
Did anyone tell the devs that?
item:setActualWeight(fishSizeData.weight * 2.2) -- weight is kg * 2.2 (in pound)
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
Seems there is no poison in FishFillet at all and it may be eaten uncooked.
is there a way to get the Symbols API on the client?
The symbols on the map?
I'm intending to get the symbols API and then add symbols (I intend to add symbols to the players map via code)
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
declaration: package: zombie.worldMap, class: UIWorldMapV1
I can't find how I get access to this from the client
Oh that's easy.
- download a mod that adds symbols
- look at how they did it.
It might not be the best way, but it's a way that works.
thats what I'm doing T_T thats what the self ref was from
And where you copied the code from, "self" meant something.
What was the original function name?
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
hahahahaa
truly a W ty
coding is like that
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.
Are the most recent errors in the debug menu at the top or bottom of the error stack list
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"
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)
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
It works, it just gives an error when loading in (since the data doesnt get initialized before it gets called)
huge W
EXACTLY
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.
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)
thats amazing do send it please
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
amazing knowledge I will use this to accidentally crash many servers
(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
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
why so many trash ew
after looking at the grid lines
seems like a grid is loaded while the other isn't
so the add tile won't work
i like the dirty street
it gives more apocalytic feel
similar to the 10 years mod
i mean its still cleaner than india today ngl
xD
just clean them if its near in your base
u can clean them like normal trsh
hmm i dont' get why some grid gets loaded
while some doesn't
i guess only 1 cell? is loaded that's the problem
How do you access squares to create the tiles ?
like t his
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```
That doesn't tell me WHEN you run this code tho
oh
Are you trying to access squares that aren't even loaded in ?
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
like this
those two snippets are the whole thing i have
i thought i was loading them all but i guess i was wrong
You're placing tiles around a freshly loaded square no ?
correct
Then that's the problem
is it?
yea
Sure that one is loaded, but the squares in the unloaded cell aren't
yea, that 's what im experiencing
how do i make my own mods?
looking at the photo
Check the wiki
youtube tutorial
okay
is it possible to load adjacent cells
No
along with the cell that is being loaded?
oh then i guess that coding isn't possible? or is there a bypass method
If the square is not loaded, then buffer it until it's loaded
what i want to do is.. having a trashcan with "certain item" in it as a tag
Or use seed maps
seed maps?
Noise maps
im unfamiliar with that
Imo that's the best way to do this kind of stuff
do you have time to explain?
oki, i guess ill have to search online
I have plans to use noise maps to make my own 10 YL mod
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?
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)
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
Ask in the modding Discord
damn somone told me to ask here
can u send me a link mayhaps
the World Icon ist very big. What make i worg (sry for my english ๐ )
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
looks like this?
Yep
and you have your mod contents in the 42.0 folder?
yeah that too
contents of 42.0
Ah thank you kindly, i got it working, it was a typo on the 42.0 folder
@flat cipher Regarding #1318920979581501502 message: you may be interested in the new BitSet utility class in b42
its not possible to add lol?
Ohh thanks, I didn't know about that. It helps with some use cases, but still no fast bit shift T-T I also wonder why they rolled their own instead of using java.util.BitSet
apparently it's not possible, look how long the game has been around and no mods that add this
i mean its not lol the game is 2d
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?
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
No one knows if it's really worth it because they gave up before completing it. I bet it's worth it.
I mean nobody's stopping you if you think it's worth it
it would be so beautiful
then you can try for the worth thing. tbh, i can't find any reason for implementing the global illumination even i knew how to do that, i wouldn't do that. ofc i don't know how to do unless if i make TONS of tiles for shadows since tiles are 2D.
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.
i think doors are 3d now?
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
i'm confused too, gonna turn on my zomboid again..
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 ๐ฉ
the edges are clean
Not the bottom, but that might be the floor clipping.
I stand corrected, I might look into having to hold E to slowly open doors lol
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
Look at the doors hand panel
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
๐ค
Both can be done with 2D or 3D
I just figured it would be easier to scale as 3D- so if it is, good
the front side of doors still uses the tile sprite but the other sides are 3d i think
no idea how it works though
and about the doors, I think the character should control the opening of the door
Hadn't considered that
oh theyre 3d even when theyre closed lol you can see the shape still
I did, out of respect for the server and possible miscommunication I won't go into it here. You can DM if you like.
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.
I can't DM you either, I don't accept friend requests, but same server requirement should work.
lemme check my settings
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
Ah yeah you guys are right, that is definitely 3D
Makes more sense to make something basically rotating in an axis to be 3D
i'd love if opening doors was like amnesia and you had to like drag the mouse
The textures need to be upscaled again I guess? They look rougher than usual.
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!
There was a working prototype but I think development has been ceased. But it's definitely doable
if you mean that one guy in this server a while ago that was just a separate program that read the map file and rendered it with models
it wasnt an actual mod
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.
nice! its like stardrop from stardew valley
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?
Like here, it definitely looks 3d due to this system
Maybe the model loaded, but the scale is not matching?
Either one works, I would say 3D would only be more useful in cases where animations and rotation come into play.
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
also thanks for giving a good suggestion i'm gonna check that
(note, i just checked, i was using an FBX file since blender wont export to X, discovered X is not a weird FBX file, it is called DirectX and blender does not export to it,)
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.
45ยฐ rotation steps would be neat tbh
Given how it's a post-apocalyptic world, everything being in orthogonal order is a bit unimmersive.
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.
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?
did you have an empty common folder?
the common folder must exist even if there isn't anything in it
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
Ok, I will keep trying, thank you
If we are dreaming big, having the world be 3d would also allow for other camera perspectives
Which would also create other types of gameplay (FPS mods / easier youtube content creation)
Maybe could do something like don't starve
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.
project zomboid 2
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)
Indeed!
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
pz could have reliefs like this
Ngl that's going to be hard to do
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:
- Connecting game states to Python for real-time Data/Action synchronization.
- Designing multi-agent systems where agents can survive, collaborate, and compete.
- 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
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
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.
it will garbage collect
awesome. I didn't want to generate hidden crossbows lol
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?
i'm trying to make a custom racking animation and my character goes into the surrender animation instead ๐
thats the idea
currently you need to use b41 folder structure for animation files
As they're not read from new structure introduced by b42
so it goes into common?
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?
i have 42>media>animsets>player>actions
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
i'm going to try that then
@ornate sand Can you give your insight? I haven't really messed with b42 animations for guns and such
is the surrender anim because it can't find the anim set then?
Most likely
IF it were wrongly exported but not empty, it would deform your character most likely.
Dude
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
Oh... even double them... Yeah, im not touching animations till they fix it
i can see this is a minefield and probably not a great time to be trying to figure out how to do this
What makes you say most of the performance costs come from it being 2D?
I'd wager now that they've refined map-chunk and cell storage post of it is probably actually coming from item data storage..
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 โค๏ธ
thank you
you've saved me from banging my head against it for the rest of the evening/week
Sorry for trouble
You know I love you Nik
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 ๐
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.
Oh, that is pretty dope.
I belive onweapon doesn't change stats until hit was performed. So for Example you want your gun to have x2 damage . First shot will use base value and trigger this event so 2nd one will already have its effect and repeat it.
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.
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.
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.
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 ๐
In b41 OnWeaponsSwing was running after i finished my shot from gun, so next one was affected
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
I can do it on equip, but I would have to do it on perk level and gameload too.
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?
shared it here
#1070858800501891172 message
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.
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,
} ```
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
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
can someone help me update my mod for 42
i havnt modded inlike a year no idea wat im doing lol
There are some really helpful links in the pin up top
how possible do you guys think a drawbridge would be to make?
possible
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.
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
maybe whatever umbrellas do
if you mean open/closing them, they literally just become different items
you can just put it in the weapon's mod data
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.
yeah but I mean, they keep their durability n' stuff.
And would keep it as whatever firing setting you have it at
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
they don't use a model, their texture is applied directly to the player model
what does the clothing xml look like
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( , )
Decided to do things the super lazy way and just set everything to singlefire on load, no saving of states.
I canโt get the T-shirt texture to work for some reason
- If it is too dark to read but the character is inside a vehicle it will be possible to read as long as the vehicle's battery has charges.
#pz_b42_chat message my mod will be gone ๐ ๐
shortest time ever
https://steamcommunity.com/sharedfiles/filedetails/?id=3400437963
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.
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?
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)
declaration: package: zombie.characters, class: HaloTextHelper
but how do I get the ref to this? do I take the isoplayer and then get the character?
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
halotexthelper is globally accessible?
ty you legend
Anyone know how to fix this problem? The skin is showing through the trousers even though I'm using vanilla models
https://steamcommunity.com/sharedfiles/filedetails/?id=3408420806 IMO more fun than the debug mode infinite ammo, when you feel like a silly action-movie run.
strange logic
Anyone know how I can make it so my code checks if the player is locally hosting a world/non-dedicated hosting?
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
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
it's a global function
so just isCoopHost() works?
yeah
you are a godsend (I still remember you helping me with other mod ty again btw)
saving me sleep hours genuinely T-T
there isn't any real difference between in-game hosted and dedicated so there isn't much code to detect it or anything
๐ช
Is that possible to make the weapon can be wetted and broken when wet
Even if not, you can make your own "wet system" for weapons.
Looking at the API for InventoryItem, it includes
setWet(), getWetness(), isWet()
And HandWeapon inherits those.
So definitely possible.
declaration: package: zombie.inventory, class: InventoryItem
ive never seen a regular item get wet before so i think those are just for clothing
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
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
Likely list of fixes in next patch: so many fix/workaround mods that can be retired! https://pastebin.com/ZbZj8RZV
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Albion is da goat
Oh, is chickenpocalypse when you get too many and the game dies?
How can I make it so that when an item is equipped it takes off any pants?
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
maybe look at bandits mod?
you could probably salvage some code from there, but i doubt it'd work tbh
or maybe look at the PZ animal script?
@deep charm
Found the coding for animals and their pathfinding
steamapps\common\ProjectZomboid\media\actiongroups
I think this is what you're looking for.
Thanks @umbral raptor
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
Donโt forget to add a dead cat item and the ability to butcher it!
Itโs not Project Zomboid without gore
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?
yes, see TchernoLib mod. TchernoLib\common\media\lua\client\UI\DrawCircle.lua
Does this not work?
https://zomboid-javadoc.com/41.78/zombie/characters/IsoGameCharacter.html#setTemperature(float)
Javadoc Project Zomboid Modding API declaration: package: zombie.characters, class: IsoGameCharacter
No, as far as I remember.
Mod Manager for PZ server now available to download. https://steamcommunity.com/sharedfiles/filedetails/?id=3320238921 Any feedback it's welcome plus it's completely free ๐
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 ๐ซถ
anyone know this person or how to get in touch with them?
https://steamcommunity.com/profiles/76561198062412388
he is currently online and maybe you can add him on steam to message him
I've submitted patches through comments before and they've been missed, so.. I guess escalation is reasonable. LOL
i'm sure he'll work on it, he's pretty active with his mod :>
listFilesInZomboidLuaDirectory, listFilesInModDirectory ๐ซต๐ฏ
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
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
I think dyes can be mixed in any proportion.
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
yes
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
THEY KNEW EXPANDED They Knew (Mod overview) 2 New Game Mechanic: Dead Drop Trading 3 New Game Mechanic: Daily Radio Quests 5 New Game Mechanic: Offscreen Factions 5 They Knew Expanded Lore Zombies 8 Lore Items to Find 10 Equipment and Clothing 11 Medications 14 Positive Traits 15 Gained Trait...
Is there anything else that uses ButcheringUtil.lua? Im trying to have my custom animal be able to get butchered by its not working.
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 !
made a mod that disables the welcome panel in build 42 when you enter a game. You can also show or hide it by pressing F8:
https://steamcommunity.com/sharedfiles/filedetails/?id=3408704797
but like how do i even know what i'm mixing heh
newbie here... can't figure out how to look at the base item scripts
which file should i be looking at?
\Steam\steamapps\common\ProjectZomboid\media\scripts\items
thanks, never thought to look under media
you don't, i really hope you WILL be able to have a better idea of this stuff in the future since the crafting system as it is....not good
https://imgur.com/M7pkBX1
Can someone tell me in which ISUI .lua file that bar is located?
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.
damnit how do I make my professions work in multiplayer 
ISInventoryPage.lua
from quick investigation
what will be happen if string is not there because of translation or something? I'm new about that error too but I had similar one and it was because of translation
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
in out of time to test this but my next attempt will be to copypaste my main lua file that handles professions and pass it over to lua/client since it ls currently only in shared/NPCs
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.
Look at ISInventoryPage, or maybe ISInventoryPane but I'm pretty sure the overal window structure is in Page
Show your sandbox options file for your mod ?
What do you mean by outfit ID ?
The name of it linked to its composition ?
I ended up finding it, what I was looking for was in the clothing xml definitions
๐
appreciate the followup though thank you ๐
when i test my mod, is that have any way no need to keep close and open PZ
depends by what you've edited but mostly this works.
where can i find this tool
f10 or f11
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
does anyone have a tilesheet template
thanks~:)
So I'm brand new to modding but I wanna make a mod for this game, where would I start
basic description is here. you can figure what program you will need and what kind of work you are gonna do.
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?
why the rotate and offset for weapon didn't work
no matter what number i change ,it didn't work
like it doesn't do anything? no movement/rotation?
yes
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
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?
Just share the community debug tools which has a better UI for that and allows you to reload multiple files at once
is there any function to get actual game speed? i saw once before but i can't remember :/
if UIManager.getSpeedControls() then
local gamespeed = UIManager.getSpeedControls():getCurrentGameSpeed()
end
should work i think
declaration: package: zombie.ui, class: SpeedControls
Thank you ๐ i will try right now
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
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
I found the pinned thread, so I'll use that, nevermind then!
Check the wiki
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)
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
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
I like to make a local function debugMessage(text) that prints a message if a variable is true, then you can easily turn it on/off as needed or add [ ] Debug Mode to sandbox options.
Bugs.
Everyone who tries to work with animsets in B42 goes insane.
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
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.
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
I just do find:print replace:--print, and vice-versa

like flipping a debug mode
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
easy, just print( and --print(
Is there any optimized way to spawn something next to trash can objects around the player
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.
I meant near one, but actually I should probably just do interaction
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"
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
Probably not unreasonable, especially if you cache the location of bins on a tile.
What are you spawning from the bin?
Trash zombies?
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
Incomplete and no spawning logic
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
5000 mod incompatibilities to let people use raccoons
But yeah, I'll try doing that. Can the surprise zombie sound just be called randomly?
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.
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)
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.
Like TV/radio broadcasts?
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
if you find the data for each station you can read the numbers from that
how can I do that?
Or do you mean you need that info for each line as it is displayed?
I'd like it as it is displayed
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
it should be possible i think but im not sure
it depends which emitter the game uses for it i guess?
That is evil.
Look for lua files with "radio" or "television" in the name, check out likely ones.
Lol by random I meant can modders do it on command
that is less evil ๐
"Mod for adding raccoons early
", 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
It might be inside the java ๐ฆ
...I'm going to take a wildguess and say the trashcans are not all neatly labelled "trash"
you'd be right 
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"
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
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:
Which function in inventorypane do you think I should hook into?
I accidentally did the inventorypage so I did selectContainer
also "dumpster" as a typoe
But I'll switch to inventorypane
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
Can I get the container location from that?
from inventory you can getParent()
I need to check the button & I need to know where the trash bin is so I can spawn it there
ah, okay
selectContainer only does it if you swap in the inventory 
which I think will be the isoworldobject, which should have a way to get location.
somewhere in the InventoryPage code it has to set the starting container...
I have code from another mod to get the location, so that should be fine
ISInventoryPage:setNewContainer(inventory) would maybe work
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
Paw Paw Loot?
and adapting to the new crafting
yes
I have vague memories of that being broken in B41.78.
Due to some LUA stuff left in the mod
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!
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...
$19.99
7811
87
Or at least watch the trailer, which is hilarious.
lol
Same vibe ๐
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
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.
Have you played with stumblers?
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
zombies actually do get more rotten the more time passes ingame
visually or just stat wise?
I've spent more time trying to mod the game than actually playing it, seems to always happen when I find a new game
Cant find this mod
visually but i think they also lose strength as well
Whats the real name
Not a mod, in the sandbox options you can change zombie speed between shamblers, whatever the name for the normal ones are, and sprinters
I think the new default is random between fast and shambler
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
Yes
Normal ones with a lower chance of shamblers
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
I'm allowing myself a lil bump if that's okay ๐
can't you already use them as water containers in vanilla?
nope, after water shutoff, they are useless with the current version or without plumbing with collector (which doesn't even work too in current build)
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
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
I feel like trying to categorize mod development would cause less visibility to smaller mods or less popular types
Maybe ask the creator ? they probably would want to know if you reuse their assets anyway
what do you mean export the contents? The mod gets installed to your computer directly
It's already exported into your computer directory
C:\Program Files (x86)\Steam\steamapps\workshop\content\108600
well, if one just post one random message here, it gets losts in the mass, isn't it ? I don't know, i have trouble knowing what is being worked on here, for exemple ๐
I think it might be possible to just have the original mod be a dependancy. I don't think it would need to edit the original models, so it would just need access to the models and new scripts
Yeah but still, maybe ask the creator first is the best entry point to this question ?
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
I understood ๐
Just wanted to clarify so you didn't think I was going crazy on you ๐
I saw it too, don't worry
Is it possible to have modded models reference vanilla textures, or do I need to make copies of the textures?
Yeah haha sorry about that. I didnt realize that apparently i was asking about the file directory of the mods because thats not a given and that im actually not asking about how to open the actual files themselves so i could access them so i could mod them myself. Thanks!
I think i get it now though so it's really helpful too
I mean, would you not be able to extract the files by knowing where they are located? They're not like, encrypted
All mods you install from workshop will go to this folder
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
x is a model format
What!
I do not know how to open them either, a lot of people use fbx instead since it's modder friendly
gee i wonder why we cant open them
Since the model is already being used as wig, I don't think you will need to modify it anyway
thank you btw
I mean you probably can, I just don't know what you use. I just mention fbx because project zomboid used to use fbx files I'm pretty sure, and it's inherently compatible with blender
I personally don't know how to open x files, I'm sure it's possible
yeah i dont know what i use either it's almost as if im trying to ask what to use
Okay but do you even need to modify the model? I thought you just wanted to turn it into a hairstyle
GameGuru lets you build your own world, using easy to use, creative and enjoyable tools. Join the community and create together.
Someone here may know a more direct way, just did some googling to try to find an answer for you.
it was that simple
what do you mean
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
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.
whatever man
If you have a lot of mods installed and are looking for a specific one, go to the mod page and find out what the ID of the mod is up top.
Can I call "self." for variables if I'm adding onto IS functions
The ID will be the folder name in the directory I sent earlier
https://imgur.com/V8jYVs8
which files refer to this menu with its submenu?
Good question
Can't tell if this is paradoxical or not
the original function returns the button
at the end of your function you'll need to also return the button
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
i've noticed that sounds in recipes don't work... have they been disabled for now?
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
ButtonPrompt
does anyone know if it's possible to trigger sounds from onCreate functions or some other function in a recipe?
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
if onCreate has access to the player you can do this
i dont know much about how sounds work though so i dont know if you can play it on other sound emitters
oh nice! thanks, i'll give that a stab
im not sure what object type self.charger is here
i'm getting there! two sinks left
And... I forgot i have the tubs to do too xD
I have an onCreate that uses craftRecipe, Character... so that should work
yeah you can do it then
how do i disable this animal text
Use the community debug tools
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
Why this?
I already passed self and it works now, but not sure why the other thing is needed
- 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
You're currently storing the original function in a table, not the table you are calling
ISInventoryPage.o_addContainerButton = ....
But you then call o_addContainerButton
Which isn't the function in question
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?
It's the recipe ID
Wait no
No bcs that gets all recipes here
Haha, no worries. Are there docs for this or is it a bang face into it until success type deal? ๐
You can decompile the game code to check what the function does exactly
yeah i didnt even notice this it should just be local o_addContainerButton = ...
Nop
Check the wiki
then when you call the function you pass in self before the other parameters
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
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
In the java
turn off debug mode lol
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
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?
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?
weirdly enough that was a fake feature
it was in sandbox options for years and enabled by default but didn't do anything
you mean ask the indie stone devs?
havent i mentioned earlier to use fragmotion?
i thought i did
but anyways
import the .x file
then export it as obj
import that to blender
hey all, anyone think of a reason why "getScriptManager():getAllRecipes();" is returning an empty table?
why were there so many of these lmfao
they left zombie smell in sandbox for years until b41 blew up and they removed it because people kept spreading urban legends about it
in b42 that is expected
'recipe' refers to the b41 recipe system that isn't used anymore, the new ones are called craftRecipes
no the original mod creator he's referencing
ohhh thanks, appreciate it
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.
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 !
I dont think items usually make a sound when you pick them up, particular reason you want it for the fruit?