#mod_development
1 messages Β· Page 270 of 1
if you want to catch players moving items it's best to hook the inventory transfer action, there isn't really an event for it
Okay , thank you so much , ill find another way to do it with the inventory transer action 
@digital sail I hate seeing that you had to backport bitwise ops support yourself. Wish I could've told you I did this too.
I wrote one that searches the game's API for exposure to bit32 bitwise ops on the Java side to make them faster.
Been a bit pushy for the past couple of years to get Build 42 or a future build to expose some math tools like this.
Oh, I did not have to do much, I picked an existing library (MIT), you can find it in the credits at the end of the description.
That's why I said what I did. Thanks.
I ended up writing my own as a result to work with a optional Java patch. =)
Been building a commons-like library for these sorts of tools over the past months to help others find it if they need it.
I had to admit I did not benchmark it at all. You think the Lua implementation is slow?
I don't know if yours is but mine is yeah. Adding Java into the interops calls speeds mine up by ~ 5x
I'll link mine. I put it in a gist too.
I don't want to edit the Java code though. I would if it was supported by Steam workshop. As it is it would be detrimental to the mod to ask people to move a file manually.
Yeah. It's Java patch with pure Lua fallback.
It's optional, not mandatory.
The code asks if that class is present and if so then set the function to call the Java API else run the pure Lua alternative.
I see.
I'll keep that in mind after benchmarking the mod if I need to optimise the code then. I could add some info on the mod page on how to install it.
I emulate bitwise ops over strings based off an earlier example I saw. I wonder if this one does something much faster.
Yours looks faster. I'll play with that and see how it fares against mine.
Right now I'm packaging up a 2-month project but this is interesting enough to look at. Thanks for posting it in your credits.
You're welcomed
I needed mine for an AES encryption library I modified to work in the PZ Lua environment
I really needed that CRC32 library as I did not want to implement it myself, because I'm lazy :D
It ended up being so slow I moved to a simple key-expanded char-code modifier encryption solution for now.
Why do you need AES?
Encrypted LuaNet packets.
I wanted true encryption but had to settle for less since Kahlua is so dramatically slow and ill-equipped for tools from the JVM that aren't exposed.
This was my console last night:
haha
you are brave for trying to make sense of the mess that is PZ code
I just try to encapsulate whatever works :'D
I think the funniest thing about this project is that I worked on it a couple times over the past year. I had brain surgery between those two points.
If it's not YanSim code, it's doable
I was a little surprised when I realised Khalua does not implement next (table [, index])
I wrote a primitive integer library before I got that rock out of my skull. xD
pcall is f'd too.
@digital sail This is so stupid. Why does this work?
I'm working on a silly little thing with my silly little program
hahaha, what the hell
you need to find a game with C programming or something low level like that
I think like a C programmer. Thanks for realizing that. Yes I am a little odd...
hahah
We make mods for Project Zomboid, we are all odd here. No worry.
10 years of it will bake yer brain. You'll become one of them..
So this is all for an anti-cheat, btw.
makes sense
It's to securely package and send over a payload of code to the client that then checks for game mods and kicks them.
The keys are cycled every x seconds.
Are there a lot of cheaters in PZ?
It's all handled by bootloader code on the workshop.
When I released my server-side anticheat patch in 2022, servers reported drops in populations around 40-65%.
π¬
It's really funny.
But now I have a way to check client-side with obstacles in the way from compromised clients duping the anti-cheat so now the real fun begins.
One could write a true build 41 anti-item-dupe check.
And because of the nature of serving the anti-cheat code from the server's machine through the workshop bootloader, a server could modify their copy to be stronger / resistant to otherwise template copies.
Are there any mods out there that gradually decrease zombie populations to simulate them dying of starvation AKA 28 Days Later, or is this already doable in the advanced zombie settings?
I don't think I ever got an answer for this in the past, but this is the one thing I'd love to do in order to simulate a Rage Virus run, in order for me to actually outlast the Infected.
You can sort of do what you want in the advanced game settings. In advanced zombie options, setting the peak population multiplier to less than 1 will make any new area you enter have less zombies as time approaches the peak pop day. It won't clear already spawned zombies though.
Sweet. I'll have to try that once I hop on the game again.
I'm kind of surprised it hasn't already been made as a mod though. Imagine the longer you survive, you just find more and more corpses lying around everywhere as the infected slowly starve to death.
I still have this issue when I'm highlighting squares. The starting position moves even though it is only set once and doesn't change. Does anyone know why this is happening?
-- set startX, startY from OnMouseDown function
startX, startY = ISCoordConversion.ToWorld(getMouseXScaled(), getMouseYScaled(), getPlayer():getZ())
-- set endX, endY from OnMouseMove function
endX, endY = ISCoordConversion.ToWorld(getMouseXScaled(), getMouseYScaled(), getPlayer():getZ())
local x1, x2 = math.min(startX, endX), math.max(startX, endX)
local y1, y2 = math.min(startY, endY), math.max(startY, endY)
-- standard for loop to getSquares and highlight floor
Are you rounding or flooring input values?
I'm not too sure but that's my first thought.
I usually see glitches like this from floating values as inputs not being sanitized.
I'll check. I was under the impression that ISCoordConversion.ToWorld returned a floored number but maybe not
Yeah it's good to double-check.
I'm speaking purely from a first-glance observation.
that's a lot of decimal
pcall strikes again. .__.
This whole custom pcall business PZ does is really a sore thumb.
Libraries use pcall(require) to check if libraries are present and carries on if not. PZ literally forces me to modify source code of imported libraries to fix this from causing complete failures.
thanks Jab, idk why I didn't check that. it's fixed
Working on retro-fitting a MD5 library in pure Lua 5.1 to work inside of Project Zomboid.
It'll be useful for verifying string payloads transmitted through server-files to client for additional security options for people who use my code-loading framework. =)
Am I working hard or hardly working?
A question that you folks might be able to help me with:
Open wardrobes function as intended and display clothes when they're placed at map creation, but they stop displaying anything once moved. Is there anything that can be tweaked, either in debug mode or with a simple mod, that would fix that issue?
I tried using the brush tool in debug mode, but that wardrobe also failed to display anything.
Documentation isn't ready yet however I'm happy to have all this code up on the workshop and on GitHub:
Basically, EtherHammerX is the content mod and ModLoader / Asledgehammer Utilities are the libraries that power it.
EtherHammerX is a mod that securely checks the client-side for mods that enable hacks & cheating on multiplayer and zapps it. Even if the client is compromised to check for my anti-cheat somehow the server will have ways to figure that out and handle them.
ModLoader serves the contents of the anti-cheat and allows for servers to add additional checks of their own and diverisfy their security so that it makes it harder for cheats to combat the anti-cheat. =)
Open-Source + Security-hat gang. <3
It's probably going to be around 8 - 10 hours of documentation for this but hopefully this'll help the multiplayer community combat the more recent cheats out there on the marketplace.
hi im fairly new to zomboid mapping however i got a quick question
if i creating an area in a vanilla tile and i leave a tile blank, will the vanilla tile be overwritten?
I'm building an access manager. Whats an easy way to wipe player logins not just the whitelist
players.db?
or perhaps the whitelist is the login...
the game crashes whenever i try to load in with the mod I've been tryna make
here's the code, mostly made with the help of folks on here lol:
-- if you want an icon for this trait, put an 18x18px PNG
-- named trait_Autism.png into media/ui/Traits
local Autism = {} -- don't pollute, keep it local
Autism.doTraits = function()
local addTrait = TraitFactory.addTrait("Autism",
getText("Autism"),
-1,
getText("A mental disability. This trait is not a 1-1 recreation of the real experience, nor is there only one unified experience for everyone with ASD. This is simply based on my own."),
false,
false)
TraitFactory.sortList()
local traitList = TraitFactory.getTraits()
for i = 1, traitList:size() do
local trait = traitList:get(i - 1)
BaseGameCharacterDetails.SetTraitDescription(trait)
end
end
Events.OnGameBoot.Add(Autism.doTraits)
Events.OnWorldSound.Add(function(x,y,z,radius,volume,source)
print(volume)
if volume > 3 and getPlayer():HasTrait("Autism") then
getPlayer():getStats():setPanic(25)
end
end)
Seems to work ok
name the file yourtrait.lua or something, just make sure it's .lua extension
make sure to save the file is in C:\Users\yourusername\Zomboid\mods\whatevermodname\media\lua\client\
local Autism = {} -- don't pollute, keep it local
Autism.doTraits = function()
-- this initializes the trait and adds it to the trait list
local addTrait = TraitFactory.addTrait("Autism",
getText("Autism"),
-1,
getText("A mental disability. This trait is not a 1-1 recreation of the real experience, nor is there only one unified experience for everyone with ASD. This is simply based on my own."),
false,
false)
-- sort all traits
TraitFactory.sortList()
-- idk if this needs done, but it was in the guide you were using so I kept it
local traitList = TraitFactory.getTraits()
for i = 1, traitList:size() do
local trait = traitList:get(i - 1)
BaseGameCharacterDetails.SetTraitDescription(trait)
end
end
-- add the trait when the game boots
Events.OnGameBoot.Add(Autism.doTraits)
-- when there is a world sound, do this
Events.OnWorldSound.Add(function(x,y,z,radius,volume,source)
local player = getPlayer() -- the player object
local stats = player:getStats() -- the stats of the player
local panic = stats:getPanic() -- the current panic of the player
if volume > 3 and getPlayer():HasTrait("Autism") then
player:Say("It's loud") -- visual indicator for testing
stats:setPanic(panic + 25) -- add 25 to the current panic level
end
end)
Do I do the same thing as panic for stress too, or is it different?
Is it technically difficult to make a mod where the donor part, for example, the door retained its original color?
it is impossible
vehicle parts can't have a unique colour from the vehicle
you can have different pre-set colours using part models with different textures but it couldn't match the original vehicle's colour as they are randomised tints and there's likely millions of possibilities
If you leave it blank it will either be part of the void (so you can't walk on it) or it gets overwritten by what's around it
So if some tiles are blank and it's on vanilla tiles will it still be vanilla tiles or the void
Yes
Yes to the void or yes to staying as vanilla tiles
Prolly both, I dunno lmao
The void is more likely though
I doubt that the PZ engine automatically overwrites stuff
np
Good morning, I'm trying to make my first mod, it's a very simple mod but I still can't get it to work. What would be the correct way to test it?
global function AddWorldSound(player, radius, volume)
radius is sound range
what is volume ??
i'm checked test of same radius a dffren volume 10~100
result is all same
I believe
It's how fast the sound volume lowers based on distance
ive tried to set coordinates for a zed(teleport)
and what happened was it just teleports back
question if anyone knows if this will work if its send to server and back
or is it just another limitation
Hello people. Is it possible to create the following crafting dropdown menu flow? I see most people have tons of recipes in their mods for repeat actions and I'd very much like to create a more compact set of recipes
Right click wooden spear > Bind > Leather, Cloth, or Tape > Fork, Knife, Machete, Letter Opener, etc.
By compact I mean on the UI end
Is there anyway to address the parked vehicles in project zomboid?
I'm trying to figure out how the game knows where to spawn cars, the rotation of the car and other data.
Good evening. Can anyone tell me how I can add an item to a selected area of ββthe floor?
i think that i can use this method
sq:transmitAddObjectToSquare(objNew, index);
maybe anyone know better way??
Does anyone know what volume most gunshots are in code? I can't decide on what volume to make the character panic and get stressed from
The original 3 value i put makes the character panic from opening a door lmao
I put all my map stuff into the correct folders (as per a tutorial I found), uploaded em to the workshop, subscribed to and enabled it, started a new save, went to the location I edited, and there's no change
I really need some help rn, this has been the project of the last three days
and I don't want all of this to be for nothing
Just put a new mod up for dismantling alarm clocks... 
https://steamcommunity.com/sharedfiles/filedetails/?id=3367571659
debug mode
i think it has something to do with zed hearing
if volume is low then zeds with poor hearing wont hear it
this isnt fact, just what i think it is. cuz theres no better explanation. ive not yet read the java regarding this so yeah..
item like inventory item?
square:AddWorldInventoryItem(item, 0, 0, 0);
making a map mod?
try
#mapping
You should check there too lol
they are defined via zone
i think its related to map mods too
im not very familliar with this
refer to
shared/VehicleZoneDefinition.lua
if a zombie hears multiple sounds it is more likely to go to the louder one
Okay. My goal is to add a slight rotation to when cars are spawned in to give them more realistic parking.
that totally makes sense
But I don't know how to identify the event of vehicles spawning.
should probably refer to worst vehicle mod
cuz it has something to do fetching the vehicles
you can then just despawn it and replace it from your list
So, the next feature I'mma try to add for this mod is gonna be meltdowns
The idea is that once stress reaches the maximum, the character just freaks out
Once their panic goes away, they get tired and sad. Any idea how to do this without always making them tired/sad every time they panic?
Perhaps a new kind of moodle/character state
I think I have an idea on how to make them panic when the stress is too much, at least
Honestly, Lua is surprisingly similar to Godot's scripting lol
Quite a bit more complicated but it hasn't been too rough switching over
Thanks ππΌ
Is there a way to increase game volume? During meltdowns, everything seems louder for me so maybe I could try to portray that in-game
idk why this keeps happening, but the trait has stopped appearing lmao
here's all the code:
local Autism = {} -- don't pollute, keep it local
Autism.doTraits = function()
-- this initializes the trait and adds it to the trait list
local addTrait = TraitFactory.addTrait("Autism",
getText("Autism"),
-1,
getText("A mental disability. This trait is not a 1-1 recreation of the real experience, nor is there only one unified experience for everyone with ASD. This is simply based on my own."),
false,
false)
-- sort all traits
TraitFactory.sortList()
-- idk if this needs done, but it was in the guide you were using so I kept it
local traitList = TraitFactory.getTraits()
for i = 1, traitList:size() do
local trait = traitList:get(i - 1)
BaseGameCharacterDetails.SetTraitDescription(trait)
end
end
-- add the trait when the game boots
Events.OnGameBoot.Add(Autism.doTraits)
-- when there is a world sound, do this
Events.OnWorldSound.Add(function(x,y,z,radius,volume,source)
local player = getPlayer() -- the player object
local stats = player:getStats() -- the stats of the player
local panic = stats:getPanic() -- the current panic of the player
local stress = stats:getStress() -- the current stress of the player
if volume > 50 and getPlayer():HasTrait("Autism") then
player:Say("TOO LOUD!") -- visual indicator for testing
stats:setPanic(panic + 10) -- add 10 to the current panic level
stats:setStress(stress + 0.1)
if stress == 1 and getPlayer():HasTrait("Autism") then
player:Say("OH GOD!")
stats:setStress(0)
stats:setPanic(100)
end
end)
``
--code
``
what are you trying to do here?
Make the character panic and gain stress from loud noises, then if the stress gets too high they completely freak out
its probably your get text
gettext is used to pull strings from the translation
That was working before, it only started bugging out once I added the high stress thing
the usage here is weird but getText never causes errors
i thought so too
but theres nothing else i can see that could cause issue
stress is stats right and not body damage?
Yeah, it's stats
why not just trigger based on distance instead of volume?
Distance as in the radius of the sound?
I could try that, but I have no clue about the radius
yeah like if its 3 squares away then causepanic
or something
but then quiet sounds would cause panic
I don't want it to be any nearby sound
Just especially loud ones
Like, for example, gunshots
yeah if its near enough why not
i see ok then
Footsteps
I'm trying to base it on how sensory overload is for me, and it's usually sudden loud noises that cause trouble
I was thinking of having shouting cause it too, but I don't really ever freak out from my own yelling so that wouldn't make much sense
your file fails to compile because you have an unclosed scope
Ah
add an end here
So, 3 ends?
seems like the volume is always 20
you really should use distance now
I have it at 50 volume, which makes it only react to gunshots
i see
Idk what volume bombs are but I want them to react to bombs too
the same sounds will always be the same volume, that isn't unexpected
does the sound not get louder or quieter in game the further the gunshot or event is away?
Could you see what volume a bomb going off is?
Bombs don't make the character freak out
For some reason my game won't let me go debug
I've put it in my launch settings
the language here is confusing but it's best to assume nothing we're talking about actually has anything to do with audio
world sounds are an ai thing (primarily) that lines up with audio to simulate hearing, they aren't audio themselves
'volume' doesn't really mean anything in particular, it's just a tiebreaker for zombie attraction
oy what mod u use to display source info?
none
i just wrote the code and pasted on debug
didnt saveit
but is basically a halo and print based on the params from the world sound event
i just added the direction from my other mods function but it seems inaccurate
ohh I thought you were tallking about the sound itself
Just wondering
How could I make the character gain unhappiness and tiredness after calming down from the panic caused by meltdowns?
okay so it seems like the meltdowns don't work
here's the code for that:
if stress == 1 and getPlayer():HasTrait("Autism") then
player:Say("OH GOD!")
stats:setStress(0.1)
stats:setPanic(100)
end
Okay, I changed the stress check and it works now
Also wondering if it's possible to delay driving like how being drunk does without making the player drunk
Regarding creating weapons, specifically on magazines, does the GunType have to match with the gun its intended to be used in? and as a follow-up, can that field take multiple entries?
Does anyone know where traits' effect strength is defined? I'm specifically trying to change the amount of the Organized trait, but can't find anything when decompiling and reading through the .class files I'd think would have it (files with "character" or "trait" in their name πΆ). I'm pretty novice at modding and java, so I'm not really sure exactly what I'm looking for
if you want to find how a trait works you need to look for where the effect is actually applied - in this case ItemContainer
generally the game doesn't really define the effects of traits as attributes of the trait, it just hardcodes checks for specific traits in the parts of the code where they would be needed
theres a very low chance for this to trigger
esp if stress are float despite being ranged 0-100
you should instead
do
if not getPlayer():HasTrait("Autism" then return end
-- this would reduce memory usage
--for other players who dont have the trait
if stress >= 1 then
--code
end
ooops i might be wring
stress is 0 to 1?
but still
its better to use
=
<=
than use
~=
for anything with numbers
Hello. I'm interested in a couple of things about the server. My players are complaining that loot appears poorly or does not appear at all in some places on the map. Please tell me, does the second setting in my screenshot require the game or real time to be specified?
i think thats game time but not sure
Autism? π
best trait in the game
in game time, 576 in game hours is 24 in-game days
so if its 2 hr days, basically loot respawns every 2 days
So I thought correctly that my loot would spawn once every real day (1 day of play = 1 hour in life). Then you don't know why some boxes remain empty? For example, half of the dorms in March Ridge do not generate loot at all. Only the wipe of this dorm helps
afaik
if the container (when first discovered) didnt initially produce loot it will never spawn stuff
and also if you loot from a container but didnt leave it empty
it will not respawn stuff
(this is what i learned back when i was playing but i never actually checked if this is true code wise)
and maybe the mapper just didnt add some of the containers to the loot def
How do I check the distance from a sound? The character is having constant meltdowns from a house alarm across the city lmao
I would try:
distance = IsoUtils.DistanceTo(playerX, playerY, noiseX, noiseY)
i wanna get in texturing so i could make some wwe attires in the game
if someone could tell me
where to start
i would really appreciate it
but i'm afraid it would need 3d modelling knowledge?
anyone know any weird or wacky cars?
It depends if vanilla models are fine for you, you can even do modded ones i suppose. the texture is just a .png, you can open the vanilla clothing texture files and edit them in an image editor, assuming you can make it out well enough and draw your own design on it. sometimes the texture is too stretched and hard to make out though. you'd have to grab the model that goes with it also so it all lines up right. of course doing this all in blender would likely give you better results
How should I start modding?
Make something cool
depends on what you want to mod. a good start is scripts, it is the basic way to add stuff. here is a guide, https://pzwiki.net/wiki/Scripts_guide ,i would use other mods for examples the wiki doesn't have 100% clear guides on everything
ππ»ππ»
local InfoMessage = {
isServerAlert = function(self) return self.isServerAlert end,
getText = function(self) return self.text end,
getTextWithPrefix = function(self)
-- you may want to transform text here to match usual server messages
return self.text
end,
new = function(self, text, isServerAlert)
return setmetatable({
text = tostring(text),
isServerAlert = isServerAlert
}, self)
end,
isShowAuthor = function ()
return false;
end
}
InfoMessage.__index = InfoMessage
-- to add a server message:
function servermsg(msg)
ISChat.addLineInChat(InfoMessage:new(msg), ISChat.instance.currentTabID - 1)
end
servermsg('This is ServerMessage send for All Player!!!!')
Thank you guys, thanks to you I found a way to replace /servermsg
Hey guys, I have a question, what determines if an object is Thumpable or not? I have a set of tiles that are supposed to be thumpable but when placed, become IsoObjects instead of IsoThumpables

I don't remember exactly, but there's a different between player built tiles/walls etc and world stuff
hmm, somehow furniture end up becoming IsoObjects despite being player-placed
Ah, I think I know whats causing it
Ill keep checking but Im hoping theres an easier way to differentiate between thumpable and not thumpable π¦
You can just use instanceof
thats what im doing actually
but i need specific tiles to be thumpable and the other tiles not thumpable
is there a way to check the name of the tile im placing down so that I can set it to be thumpable or not?
No idea
interesting how this causes the tile to be IsoObject instead of Thumpable
How do I make the panic only happen when it's a certain distance away? Idk how to measure the distance n stuff
-- to get an object sprite name
object:getSpriteName()
-- to get the floor tile texture name
square:getFloor():getTextureName()
Not sure if you can just flip something to thumpable, I've never tried it.
Have you checked what DistanceTo() returns? I can guess but I've never used it myself. Put the code below into your OnWorldSound event and have a look.
distance = IsoUtils.DistanceTo(player:getX(), player:getY(), x, y)
player:Say(distance)
did you ever get debug mode working?
Once
I think you would have an easier time modding if you got that to work.
And I'm sure you did this but: open steam, right click on Project Zomboid, click properties and type -debug in the launch options under General. Close the properties window and start the game.
Hello,
i would like to start making zomboid mods and as an first project i would like to make an map mod. idk yet if i want to add it to the main map or create a new one. i basicly want to create my school for an game day we have at school.
Does anybody have some good up to date tutorials to reccomend to me?
(pls ping me)
Yep, I did that
Is this a moveable item that you place the tile with? You can get any placed objects from the event OnObjectAdded and get and set it's properties from there
You might try disabling all mods then trying again. If that doesn't work, you can verify game files and hope that resolves it.
If none of that works, you might want to head to pz_techsupport with your log files.
I have so many mods that it'd probably take hours to reenable the ones I want to enable π
Haio, currently making some clothing. I am currently trying to find a BodyLocation that occupies pants/jacket but allows a vest and such unlike "FullSuit" and things
do you have any cheat mods enabled?
good to know, thanks
though im wondering if you can also change the type in OnObjectAdded, from IsoObject to IsoThumpable for example
That could be why
this isn't something that i have messed with but it appears that you would have to make a new thumpable and replace the isoobject with it
IsoObject:getThumpableFor(IsoGameCharacter) this returns a thumpable
depends on how its placed
did it work for multiplayer?
you need to create custom body location definition
seriously? thats good to know
yeah thats what it says it does lol idk if it works though
you can spawn tiles with different properties and not follow its original properties
but that requires you to nanually add the object not just use moveable placement function
Anyone ever run JDecompiler on the server? Where is the bloomin Jar file?
oh, looks like JD-Gui is no more
what Java Decompilers are people using?
ive got decompiled code i honestly dont remember what i used but its on intellij. but if you just want to see the code and what it does https://github.com/asledgehammer/Umbrella i've seen people use this
A collection of LuaCAT typings for Project Zomboid's API - asledgehammer/Umbrella
thanking you!
Its alright
BoilerSuit
Met the properties I was hoping for β€οΈ cheers anyway
fernflower fork maintained by jetbrains
there is no JAR file, it's only class files in server/zombie
Hello Rokem where can i find the Buildings ID?
i made a lua event that detects if player just changed cell
Beautiful java
Nice, what do you plan to do with that ?
Umbrella is just for auto completion
Could be used to create biome zoning?
Like imagine one place is a red zone with only sprinters
Than a green zone is shamblers
Yellow fast shamblers
Like it detects when you enter the cell
And it changes the zombie ai depending on the cell
i think chuck already has a mod for that
o
check out zone api
probably use to trigger functions that has something to do with getzombielist
since thats cell based right?
so basically reinitiate the table
and set the needed properties to those zed maybe
but im not 100% sure if its worth doing since i didnt need this before
how do you guys check for memory usage ?
to determine which method is better interms of memory
No the getCell for zombie list is the player cell, not the world cell
It's impossible to detect a zed being loaded in
It's loaded in when in the player cell
Not when the world cell is loaded
In the 75 tiles radius or so I don't remember the exact value
Yes this event is based on player cell?
i used
getPlayer():getCell
then / 300
the x and y
i messed up?
That's the world cell
That's why I asked what you'd use it for
Bcs world cells are loaded way further than current player pos
- sometimes some further are loaded I believe
But these do not load zombies
i see
I believe they load world zombies
Which aren't active for zombie list or zombie update so you can't do anything on them
i remember testing out chunk range with pao
we determined it was around 1k square
That's wayyy too high I feel like
what we did was we send fire command like far away then teleport if theres no fire then it wasnt loaded
we gradlually decreased it
i think he was triggering the fire command and i was the one teleporting to check
iirc
1k fire shows up
but + 1 more square didnt
weird huh?
now that i think about it
we could have just made function count instead
something like this maybe
(untested)
function countLoadedSqDistance()
local player = getPlayer()
if not player then return 0 end
local startX = math.floor(player:getX())
local y = math.floor(player:getY())
local z = math.floor(player:getZ())
local count = 0
local x = startX
while true do
local square = getCell():getGridSquare(x, y, z)
if not square then break end
count = count + 1
x = x + 1
end
return count
end
my bad it wasnt 1k its just 100
Yea that works
Pack Mentality feature added to my Project Zomboid - Dog Zed Mod
contact me if youre looking to commission custom Project Zomboid mods
Pretty cool !
I'm curious on a few things. How do you manage the movement of the zombie ?
you managed to draw on the ground before the objects like trees are drawn
how did you do that?
I remember I managed to do it with one callback but there were significant issue so I gave up
not sure what youre refering to
are you talking about the markers? or the name tags? or the green radiation effects?
this one?
those are just world markers
oh, right, it's a function you can call, meant for debugging, but you cannot use the texture you want, right?
you can add custom pngs if you want
ive done that
like this
i added the destination marker png
and used it instead of vanilla circle
https://youtu.be/XtEcwiMLsfE?si=sQ4rMdkIthumvaG-
Dungeon Maker Mod:
Allows Server Admins to Setup Dungeon Challenges
Keys = Entrance
Chest = Exit (you may also exit anytime via right click context option)
Keys and Chest Colors are related to their Level
| LEVEL | COLOR |
| 1 | White |
| 2 | Blue |
| 3 | Red |
| 4 | Gold |
Teleport:
Entering / exiting will je done v...
Can I have a look at the code to see what API function you're calling?
sure check out
dungeon maker mod
Hello good evening. Is it possible to create a log on a server running Ubuntu? For protection reasons, there is no access to relative or absolute routes (I don't remember which one, I think it's the absolute one). On the client, it was difficult, but I was able to generate general logs, however, the logs in this case have to be generated by the server. Specifically, I wanted to generate records with 2 events, with onEnterVehicle and onExitVehicle. I try in several ways, but I can't do it. If there is any tutorial or step to follow, I will appreciate it.
I was even looking at a mod that generates logs on the safehouses, but it says that it generates them in the Zomboid/Lua route and on the server, I don't have that route. I have not been able to generate the logs on the server. In the client yes. But in this case, I need them on the server.
local function OnEnterVehicle(character)
local log = getModFileWriter("patagonia", "media/lua/logs/" .. os.date('%Y_%m_%d') .. "_on_enter_vehicle_log.txt", true, true)
local vehicle = character:getVehicle() -- BaseVehicle
local vehicleScript = character:getVehicle():getScript()
log:write(string.format("JUGADOR: %s. TP: /teleportto %d,%d,%d. VEHICULO: %s. ID(): %d. CALIDAD DE MOTOR: %d.\n", character:getUsername(), vehicle:getX(), vehicle:getY(), vehicle:getZ(), vehicleScript:getFullName(), vehicle:getID(), vehicle:getEngineQuality()))
log:close()
end
This on the client was working fine for me, until I realized that I didn't need the log on the client, but on the server. Although doing that also cost me a little time.
local function OnEnterVehicle(character)
local vehicle = character:getVehicle() -- BaseVehicle
local vehicleScript = character:getVehicle():getScript() -- VehicleScript
local text = string.format("JUGADOR: %s. TP: /teleportto %d,%d,%d. VEHICULO: %s. ID(): %d. CALIDAD DE MOTOR: %d.\n", character:getUsername(), vehicle:getX(), vehicle:getY(), vehicle:getZ(), vehicleScript:getFullName(), vehicle:getID(), vehicle:getEngineQuality())
sendClientCommand("PatagoniaLog", "writeOnEnterVehicleEvent", { text })
end
Currently, I am trying to do that, based on another mod, but I cannot generate the log.
you can write files to the server exactly the same way you write them to the client, if they're not showing up you should add prints to check if your code is actually running
On the client, the files are generated within the folder of the mod itself. But on the server, I don't see those files being generated. From what I saw from another mod, you have to use commands. I based myself on this mod to try to generate the log. https://steamcommunity.com/sharedfiles/filedetails/?id=2987361264
i wouldn't generate files inside the mod folder (or at least not the lua folder) as this can cause checksum issues
you can use getFileWriter to get a file writer inside the Zomboid/Lua/ directory
They were generated within media/lua/logs if I remember correctly (on the client). But on the server, it couldn't do it.
I don't have that folder on the server.
I have that structure on the server.
where is the save file stored then?
It doesn't get stored anywhere, that's the problem.
this is the game install location but there should also be a cache location where things like server settings, save files, etc are stored
That's right, the cache folder contains everything except the Zomboid folder. And no matter how much I generate it manually, the file does not appear.
Now I show you what the cache folder has.
Even if you generate the folder manually, the log is not generated.
Obviously, I must be doing something wrong.
What if I give you the github repository? Can you review it?
so to be clear you've tried creating .cache/Lua/? here .cache is what would normally be called Zomboid
No, I'm not trying.
I try it.
Thanks.
We will see if the log is generated.
looks correct, i hope that fixes your issue
π
π€
I'll check it later.
Thanks for the clarification. Zomboid = .cache
π€£
how do you open these files? the direct X texture tool keeps saying that theres been an error
Of note, and more strangely, the icon works but the mesh does not.
messin around with tile anim
not really a mod but hey!
Nice
95% chatgpt
ive been trying my best to learn python for over a year but i swear nearly nothing is sticking with mer
so chat gpt is my friend
have you tried claude 3.5???
not really ive been using chatgpt before it was called chatgpt, when gpt was only accesible through openai.com/playground
ive experimented with running llama on my own machine, but even a 4070 struggles and when writing code its slow. you dont have to deal with stupid blockages or not
i even got it to tell me how to make bombs and drugs ect
You need to try it
wheres the folder for containers? im trying to change the capacity of some, but cant seem to find the folder
Yeah Claude 3.5 is da shit πͺπΌ
Is there a way to make vehicle part installs/uninstalls recognize a modded tool (screwdriver/wrench) as a viable option for the action?
I tried adding it to the parts' required items, but then it just requires the vanilla tool and the modded tool simultaneously.
Worked on a more comprehensive anti-cheat delivery framework this past month. Will write out stuff for announcements however it's already out for use & testing.
how exactly do you plan to change it?
I assume the capacity of containers is just a set number, so I was hoping if I could find the script I could modify that.
Specially the metal two tile shelves
It's a property of the tile iirc
you can only change it max of 100 using tilezed
but you can change them via lua
i did it for gatcha mod
https://steamcommunity.com/sharedfiles/filedetails/?id=3366797514
Oh?
yep i set it to 1k but i think it can go further than that just didnt test cuz 1k was already alot
Might be cancerous since most people would tend to store it with 20000 ripped sheets and then corrupt the chunk or something

ah players cant add/take items from gatcha containers only admins can
Ah
Updates:
Fixed the panel related bugs
opening admin panel now shows the current value of the item
spinners can no longer be sledged
fix the issue with infinite mod rolling the same item everytime
removed the highlight blink effect as it caused bugs
fix the missing audio
added container texture
fixed the currency bug
all spinners will become 1k c...
Is it possible to make a gun always spawn with a certain attachment equipped? and if so how is that done?
i dont think so
but you can make a function that auto adds the attachment once the item is discovered by a player maybe
hm, interesting.
Trying to get around the fact that this pistol has its grip as a separate attachment, but I dont want separate grips, just one set
you can, just use an OnCreate function
in your script add OnCreate = OnCreate_MyWeapon,
in a lua file (untested):```lua
OnCreate_MyWeapon = function(item)
item:attachWeaponPart(InventoryItemFactory.CreateItem("Module.MyAttachment"))
end
so something like
OnCreate_MyWeapon = function(CZ75)
item:attachWeaponPart(InventoryItemFactory.CreateItem("TBS.CZWoodGrip"))
end
OnCreate_CZ75 = function(item)
item:attachWeaponPart(InventoryItemFactory.CreateItem("TBS.CZWoodGrip"))
end
Okay got one more then Iβll bug off: Iβve got animation .xml files for a lever action, how would I implement those? Is there something similar to how models are done? looked into it, seems as tho Brita's and Guns of 93 actually don't have any custom anims
How should i spread this?
https://github.com/Roadbobek/Project-Zomboid-ModManager-X-ModManager-Server-Mod-List-Transfer-Tool
i think ill make a post on the reddit
Hey guys, are there any resources on getting started with UI editing? I'm trying to add a new UI to the Client menu but Im not sure where to begin since the modding resources doesnt seem to have much in the way of UI resources
UI 
posted it here
its not spreading it but atleast we get to compile stuff
I think the easiest way would probably (currently) be to just work off of an existing UI.
For example if there's one that already does most of what you need, to just work off of that one and modify whatever you need (inheriting from that one, not just editing the original)
Otherwise it can be quite confusing and annoying to get into, depending on your plans.
After that, you probably figured most of the stuff out and can start on a completely custom one, or just modify the other as desired still.
Regardless, good luck and remember to take your time and enjoy it!
Hi, does anyone know how to stop an animation from playing, either before it starts or while in progress? Particularly the hitreaction animations. I've already tried playerObj:setHitReaction(""); and playerObj:changeState(IdleState:instance()) (among a few other things), which does stop the animation from playing sometimes, but once the animation loop starts I can't stop it (when you are getting hit by multiple zombies for example).
Is it true that I can learn LUA in 24 hours ? Does that include sleep and meals and breaks? Cuz I feel like knowing C++ prevent me from learning LUA. Too corrupted by type checking on compilation and static typing.
Feel like Im too old to learn another language too
i think lua is a pretty simple language to learn, especially for people who already know another language - it's intentionally very minimal so there isn't that much to learn
Im so confused by the arrays and classes though. And by interoperability... like there are those lua gui library why cant they work in an embedded lua scenario like zomboid ?
lua doesn't have any kind of native rendering library so it's always going to be dependent on some external api
if you want type checking the most popular lua addons for most ides will support some variant of luacats type annotations, i personally make as much use of type annotations as possible
they aren't checked at run or compile time (they're just comments) but the ide will show warnings/errors for them
I wish that intellij had some sort of plugin for the game specific lua and a live debugger. Feels like im coding blind otherwise
normally when I code in C++ I have intellisense running and my first line is debugging so I can inspect all the vars content and all the available obhect to learn whatever API Im using but cant do that here π¦
we have type stubs for pz here https://github.com/asledgehammer/Umbrella
oh nice! I'll try that at least I'll be less blind. At this point I was gonna changing the game code with java and doing like the fps mod and releasing a dll as a mod but I know that's not really a mod nor easily to share and really really conflict prone cuz at least in java I could attach intellij debugger and code anything and see all the variables
fun fact: I hate visual studio code for a long time until I was hospitalized for 4 weeks (car accident) and all I had to pass time was ubuntu with vscodium/vs code and made a little pygame roeguelike to pass time
i prefer jetbrains ides myself but unfortunately they're undeniably inferior when it comes to lua
Only had 4 gb of ram, tried to use it but the laptop would lock up. It's a 2009 laptop
so could I asks about a piece of game code that has me very confused even thoughj I tried to learn lua a bit ? Like I dont understand where some of the variables it's using come from even if I grepped the whole codebase
Some things come from Java. Certain classes are βexposedβ to Lua from there, so they won't show up as a definition in Lua
The type stubs that albion sent include these, but for details of the implementation you'll need to decompile the .class files
But you don't really need that just to start modding, just if you need details on how stuff is being handled Java-side
oh for my first code modification I wanted to make debug available in normal mode but some stuff like right-click an item to get a menu I cant figure out how to do. The game code seems to use a giant method for it testing every possible type of item and it's really not obvious to me what handle items in inventory right-click vs item on the ground because it seems to check the type of an item but the way it check if it's inventory or not is really unclear to me
2nd mod would be modifying basements so they never run out of electricity/water but charge money from another mod for it so Im going to need to have them as requirements
not suree if here is the right place to asks about lua game code since you cant make a mod out of it
the way mods add context menus isn't the same as how the game does it
for mods you listen to the OnFillInventoryObjectContextMenu/OnFillWorldObjectContextMenu events and add your options to the context menu they pass
I see that's where I was wrong I guess. Wanted to give items on the ground the edit item right-click thing so I though I had to modify the existing one in the lua game code
anyone know why if an item works fine otherwise but i try to spawn it with square:AddWorldInventoryItem() it spawns but without a model
Does anyone know what I'm doing wrong trying to edit the Tiles2x files for Grass etc. but when I repack it and put it in the mod folder and load it nothing changes still default textures in game are you supposed to have a script or something to go along with changing pack files?
whats the difference ?
OnReceiveGlobalModData (Triggered when the game client is receiving GlobalModData from the server.)
SendCustomModData (Triggered when the game server is sending custom ModData to the client.)
one comes right before the other?
well thats true
i guess with these separate events you can catch mod data and modify before it goes to the client, outside this doesn't probably matter
did you set up your mod info file to load your pack properly?
good catch that might be it
this is weird i assume that onrecieve moddata is sent back to all clients from the server
but it seems that the sender wont receive it(which is good but i assumed wrong)
ah i messed up nvm
i got that backwards
Pretty sure is this right? name=Snow Lands
id=Snowlands
description=ReTexture
poster=poster.png
pack=Snowlands
tiledef
reminder to add your tile def here to avoid conflict
https://pzwiki.net/wiki/Tiledefs_used_by_mods
Custom mod data might be object mod data?
OnReceiveGlobalModData fires when receiving mod data, SendCustomModData fires after a client requests mod data from the server
it should be noted that the game does not automatically respond to mod data requests, the event is where you are expected to send it
i recommend refering to my event list rather than the wiki's, as it has things like this detailed already (i answer most of your event questions from it) https://github.com/demiurgeQuantified/PZEventDoc/blob/develop/docs%2FEvents.md
this is confusing
i thought that onrecieve dont trigger unless you request
but thats sendcustom ?

yeah, it's a little confusing - on receive just fires when receiving mod data, whether it was requested or not is irrelevant (ModData.transmit doesn't even know if it was), i guess send is called that because that's what you're supposed to do with it
imanage to make it work without using send custom
even ny older mods
i don't personally make any use of the mod data networking, i don't find it to have any practical benefits over commands
imo storing anything synchronised as mod data on the client is poor design (even if it is mod data on the server, which there are good reasons for)
anyone know how to get the shader class of a VehiclePart? (or set alpha value of a vehicle part)
hi there,
Little Question which is the best event for player is ready and spawned on the map on client to trigger a server command once ?
how do I find out the name of this item so I can adress it in lua, like making it dismantlable. I know it's a generator but the question is generic. I dont know which debug tool to use to click/right-click on it and see the dev string for it :
local function AddToContextMenu(playerIndex, context, worldItems, test)
local player = getSpecificPlayer(playerIndex)
if worldItems[1] ~= nil then
local square = worldItems[1]:getSquare()
local objects = square:getObjects()
for i = 0, objects:size() - 1 do
local obj = objects:get(i)
local properties = obj:getProperties()
if properties:Is("CustomName") and properties:Is("GroupName") then
print("CustomName: ", properties:Val("CustomName"))
print("GroupName: ", properties:Val("GroupName"))
end
end
end
end
Events.OnFillWorldObjectContextMenu.Add(AddToContextMenu)
this prints the custom and group name of the tile, and you can then use them with similar script to add context menu item to do what you want
I can add that to the in-game lua editor right ? Or I have to make a full blown mod with it with the startup method etc ?
I'm not sure. haven't really used that. should work if you add it to any lua file
in which of the 4 logs does print goes ?
seems to works with container but the generator in the screenshot or pile of tire gets this: function: prerender -- file: ISTilesPickerDebugUI.lua line # 173 | Vanilla.
[23-11-24 11:36:45.818] ERROR: General , 1732379805818> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: missing argument #2 to 'format' at KahluaUtil.getArg line:380.. (etc) can pastebin it if needed
so it seems for static items Id need some other code
where for a container I get 23-11-24 11:33:25.277] LOG : General , 1732379605277> DEBUG:Counter Steel.
[23-11-24 11:33:25.277] LOG : General , 1732379605277> DEBUG:None None.
[23-11-24 11:33:25.277] LOG : General , 1732379605277> DEBUG:Counter Steel.
[23-11-24 11:33:25.439] LOG : General , 1732379605439> CustomName: Counter.
[23-11-24 11:33:25.439] LOG : General , 1732379605439> GroupName: Steel.
either the above or that error too: attempted index: item of non-table: null. Maybe istilespickerdebugui.lua is unrelated and because I insist on having debug features in normal mode
I've recently done this via an OnTick event handler that's immediately removed after sending. In my experience, the events tied to player creation/update weren't successful since sending a client command requires an "ingame" flag to be set
OnTick is triggered after a function that sets the flag is called (see IngameState.java), so it should be good-to-go for sending events at that point
That said, I'm unsure whether there's a better way. I'd defer to albion since I know she's looked closely at the various events
okay i did now OnPlayerMoved and set a Init var on true that it only get trigget on first move
yeah no those two methods are the best i've found, it's a little ugly but overall fine
meh even with for key, value in pairs(properties) do
print(key .. ": " .. tostring(value))
end It seems they have no properties at all π¦
M07DEBUGTRACE.
[23-11-24 11:46:50.423] ERROR: General , 1732380410423> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Expected a table at KahluaUtil.fail line:82.
you can only loop over tables with pairs, not objects
it is a PropertyContainer
what should I do? Trying to find out on my own by enumerating all possible properties of my static objects since they dont seem to have a CustomName or GroupName
you can loop over its metatable with pairs but that would just tell you about methods (which you can just see in much better detail on the javadocs anyway)
i tend to identify objects by object:getSprite():getName()
I mean since they aren't container they are entity/tiles in the javadoc right ?
a lot of objects that can't be moved or dismantled might not have specific names set, this just gets the sprite's name in the sheet
my bad. I used that code because movable objects don't seem to have proper sprite names
you may need to nil check getSprite() if you're using this on unknown objects
Im trying to make them dismantled like the old mod I once used made them but I dont remember the name of that mod
so the only solution at this point is for me to make a mod to make them dismantlable
but for this I need some sort of id/name for them
And also yeah: getSprite of non-table: null at KahluaThread.tableget line:1689.. on the car lift, tire piles, generators etc
that sounds like you're doing something else wrong
this error means your object is nil
which is to say you do not have an object to check the sprite of to begin with
i think dismantling is configured in the tiledefs, i think you can decompile vanilla's and build a new one with just those sprites to override them with new properties
I right-clicked the pile like this: . That is how Id expect it to tell me what it is
right to the left of "building menu" in the tire texture
i don't see how your code could ever get nil in place of an object so i would look for typos
the object list you're looping over can't contain nil
local player = getSpecificPlayer(playerIndex)
if worldItems[1] ~= nil then
local square = worldItems[1]:getSquare()
local objects = square:getObjects()
for i = 0, objects:size() - 1 do
local obj = objects:get(i)
local properties = obj:getProperties()
print("M07DEBUGTRACE")
print("Name: ",object:getSprite():getName())
if properties:Is("CustomName") and properties:Is("GroupName") then
print("CustomName: ", properties:Val("CustomName"))
print("GroupName: ", properties:Val("GroupName"))
end
end
end
end
Events.OnFillWorldObjectContextMenu.Add(AddToContextMenu)``` that is the current code
anyway trying to find out how to pick a tile for the tile picker, maybe that will tell me what the tile is π¦
maybe add this after the "if properties"
else
print(obj:getSprite():getName())
end
then it prints the sprite name if it has no custom/group name
finally it was in the brush manager dev option all along:
is it possible to create new shaders with a lua mod? you can edit the existing .frag files with mods, but copying one with a different name and trying to use it doesn't seem to work
you can, make sure to copy the vert and static frag shader too
you can't do anything fancy like passing new uniforms or anything though so the usage is fairly limited
How difficult is it to retexture an existing vehicle? Is there any existing guide about this topic?
I copied vehiclewheel.frag and vehiclewheel.vert from the game files and renamed them to vehiclewheel2. the game just freezes when the part renders that tries to use it (in a vehicle). am I missing something?
ah. nvm. realised I renamed the static one incorrectly. thanks for the help! wouldn't have quessed you have to have that too
Added that but still not showing in-game, if I repack the entire Tiles2x pack with the modded Tiles it works, but that is 16k+ items thats not needed only trying to edit the grass textures right now, or do you have to use the entire Tiles2x pack for it to work?
ok so still trying to figure how to add a dismantlable item in the world. Like I found examples like function DAMN.OnCreate.DismantleWoodenArmor(items, result, player, selectedItem) but those are for crafting recipes. Tried to grep microwave in the game code since it's allegedly a dismantlable world item but I can't find any .java or .lua that seems to handle that
it's not lua or java, it's baked into the tiledefs
I know I need a bunch of player:getInventory():AddItem("") aftre that in the method but I still dont know how to hook dismantling up . Oh can't I change the tiledefs by code ?
not sure, never tried
if you download Project Zomboid Modding Tools on steam, one of the tools in there is for editing tiledefs
I am abit confused on what is happening here
Looks like the beach to me β±οΈ
When implementing custom dismantling properties for sprites, you donβt need to hook into dismantling functions. Instead, assign the appropriate properties directly to the sprite definitions using the OnLoadedTileDefinitions event. See this snippet #mod_development message
These properties allow you to define dismantling behavior, including materials yielded, tools are assigned automatically based on the mats outputted.
For example, the relevant properties for defining dismantling behavior include:
CanScrap: Enables dismantling.
CanBreak: Allows the object to be broken apart.
Material: Defines the primary material yielded (e.g., MetalPlates, SmallMetalPlates, MetalScrap), for a full list see ProjectZomboid\media\lua\client\Moveables\ISMoveableDefinitions.lua L327-L433 in the games files.
Additional materials can be specified with Material2, Material3, etc., for yielding multiple outputs.
Here's how the code should look:
Events.OnLoadedTileDefinitions.Add(function(manager)
local sprites = {
"industry_02_64", "industry_02_65", "industry_02_66", "industry_02_67",
"industry_02_68", "industry_02_69", "industry_02_70", "industry_02_71"
}
for _, sprite in ipairs(sprites) do
local props = manager:getSprite(sprite):getProperties()
props:Set("CanScrap", "", false)
props:Set("CanBreak", "", false)
props:Set("Material", "MetalPlates", false)
props:Set("Material2", "SmallMetalPlates", false)
props:Set("Material3", "MetalScrap", false)
props:CreateKeySet() -- finalize property definition
end
end)
To see the name of the object sprite you can use debug, press F2 and then select the tile and the sprite name will appear where I have underlined in red.
Very good info thanks a lot! What if I want it to drop 5 metalplates ? Do I need to repeat material, metalplates five time or there is a parameter for that ? I think both dismantlable and CanScrap need to be set according to latest update patch note : "Added functionallity for any object existing as Iso and Inventory (such as radios) to be dismantable/scapable in their IsoObject form by looking up the inventory item dismantle recipe. For this to work the spriteproperties must be set to 'CanScrap' AND have at least one dummy material defined for the scrapcode to recognize it as valid scrapable, the actual materials returned will be from the recipe". Maybe Im confused between scraping and dismantling though
you wont have any choice
since your method is overwriting an entire sheet
you should still have the other ones on that sheet with same properies and same filename
otherwise it will mess up the game cuz if its part of the world then the properties will still apply to invisible areas that those tiles previously occupied
i suggest doing it via lua and just use setSprite()
you can
apply to thump objects
if not obj:isDismantable() then
obj:setIsDismantable(true)
end
function Recipe.OnGiveXP.DismantleElectronics(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.Electricity, 2);
end
i think this is the only thing thats connected to inventoryitem dismantle
dismantle is for thumpables not inventoryitems
what is a thumpable ? π¦ googled but I found the programming docs but I dont know what a thumpable is.
How can I implement a custom animation for holding a weapon? and what mod example is there?
i think they are tile objects that can be interacted with by zombies..? its like an extended isoobject
Is there a known bug where the sandbox vars edited with the UI would not be saved after restarting the server?
if your server uses udderly up to date your sandbox vars are permanently fucked and will never change unless you mess with your save file
that's the most common cause of issues like that
π©
Thank you so much
As per popular request I worked on making my chat mod compatible with Udderly Up To Date
so I had the mod enabled...
it's a very short and simple mod, it should not be too hard to fix
but the mod is not open source and the author does not seem to be working on PZ anymore
it looks like most donations on their Ko-fi comes from Rimworld, I don't blame them
You would not happen to know why some people receive discord messages with a getText() returning : @discord-bot-id message (like @90702379879878 message) and some others just message?
to my knowledge the problem simply is not fixable
it's been investigated before
the function they call to save the world just does that
the issue is that it creates map_sand.bin which is not supposed to exist in multiplayer saves and freezes the sandbox options
it needs a java server side mod
you saved my testing environment, that's good enough for me :'D
not from lua :>
exactly
By the way, is it me or the community feel little entitled?
def not just u
when you make something, some people will always ask 'but when will you add more'
Yes, and that's the nicer ones
In the meantime the contribution are very scarce.
I had people add me on discord to tell me I needed to implement additional feature for my mod to be used on their "professional" server
tell them "Pay me Money" and ignore them if they dont start talking about how much
π true
I told them how they could contribute
when I dont have time to add something or dont want to personally, I just say "the github's there and I will merge your PRs when you add them" and they never say anything back usually
I'm not doing this for money, I would never get enough from PZ mod to just... stay alive, I am just happy to give something for people to enjoy
at this point I'm using my ko-fi to make it clear this is actual work
that's pretty much my experience :'D
thats fair. i just think if someone is demanding that 'I' do this in a dm then they better already have a plan to make it worth my time
otherwise if its just a suggestion I have an open mod page
I never had this experience before, or not to that level
my neither thats weird
but i dont really make any clear connection between this and my steam and i dont add anyone on there so im all locked down on getting random dms for that
I'm definitely not adding anyone else out of the blue like that :D
to nuance what I said, there are also nice people writing Github tickets, making small donations or just being nice without ulterior motives
@bright fog
someones askin abt your mod
#mod_support message
just a heads up
something recent lol
it's funny because I know that guy π
It was most likely said sarcastically, like sometimes after you make a small mod they say "now make build 42"
probably right
hello everyone
I would like to create an item that is a copy of the mannequin object but weighs very little. Unfortunately I can't find the mannequin item among the various scripts
Can someone help me???
you guys got any trick if a modded game dont load and seemingly with no lua errors ? cuz 1 mod and this happens so Im pretty discouraged and about to never play the game again. It froze at click to start game then I clicked. Does the same even if I remove my mod
otherwise dont see the point of modding a game that wont even tell me why it cant load a save
If it is your own mod, you need to give details on your mod. IF it is not your own mod, the channel you seek is mod_support.
Im asking if there is a lua command I can type in debug mode or something I can do to make it load anyway, pretty generic question
there is no errors so mod support cant do anything for me. Like maybe I can get into the lua debugger thing and run something or something...?
with all the debug tools in the game maybe there is something I dont know that could help that was the point of the question
the mannequin is a moveable tile object. the game handles the item part of it in lua. I would redo the tile and making a corresponding item to go with it
%USERPROFILE%/Zomboid/console.txt. That's pretty much the most anyone can suggest without you providing more details
not sure if its relevant but
here i explained abt manequins
I saw your mod... I need a dummy with a weight of 0.1 so that it can be used as an avatar by players when they are offline. to simulate their presence inside their shelter. The low weight makes it easy for players to carry.
you can just convert the weight as it enters the inventory
Can the desync while driving in a car with others be fixed by modding?
They're adressing it in b42, though it was said that initial release will not have MP
Like the parent car tracks location of the passengers and the person driving is the one loading chunks. The passengers are childed to the car/driver and cannot leave the car in case of desync. The rest load at their own pace and when the cars come to a stop they can get out.
Maybe this is dumb. I am dumb. I know nothing of modding or anything
Yes, I saw that. But they could have atleast fixed the car desync problems.
I know combat might involve zombie code, but cmon, the car? Don't know why they didn't fix that
does this setting only allow for placed items and items in containers to be taken, or does it also allow for people to unbarricade/dissasemble your base?
I want to make a mod which would require safehouses to be entered/lootable but also be so you cant dissasemble anything or unbarricade.
would having safehouseallowtrespass and safehouseallowlooting both be on allow people to enter/take items from ground / placed / containers while also not being able to open windows, unbarricade windows and dissasemble/move stuff?
i dont understand the question
in guessing the barricade thing isnt related to that
doesnt matter i tested it ingame
its connected to the allow trespass itself
so basically you cant disable it when you allow trespas
thats where you should add your mod
the mod isnt even working lol
wdym doesnt matter?
like on or off you can disasemble?
show the code
i dont know lua so im guessing
it cant be done without lua
ik
lemme find the error
do i use Events.OnPlayerLoad, Events.OnCreatePlayer, or Events.OnPlayerUpdate to trigger code on players spawn?
you have to have 3 functions
1 checker function to detect if youre in a safehouse that is not yours
2 hook to disable disassemble action
3 hook to disable sledgehammer
probably disable pickup moveables too
i cant find anything here https://projectzomboid.com/modding/
package index
find what exactly
which one is currently used
i found 3 things that do the same thing? but they just give me back an error
Events.OnCreatePlayer.Add(function(playerIndex)
error:
attempted index: Add of non-table: null
i know its something thats probably obvious but idk
is that your whole code?
-- Key Assignment on Spawn
function givePlayerKey(player)
if not player then
print("Error: Player is nil!")
return
end
local username = player:getUsername()
local lifeCount = (player.getLifeCount and player:getLifeCount()) or 1
local keyName = username .. "'s Key #" .. tostring(lifeCount)
local keyItem = InventoryItemFactory.CreateItem("SMPL.Key")
if not keyItem then
print("Error: Failed to create key item!")
return
end
keyItem:setName(keyName)
player:getInventory():AddItem(keyItem)
print("Key added to inventory: " .. keyName)
end
-- Use OnCreatePlayer for assigning keys
Events.OnCreatePlayer.Add(function(playerIndex)
local player = getSpecificPlayer(playerIndex)
if player then
givePlayerKey(player)
else
print("Error: Player is nil in OnCreatePlayer event.")
end
end)
-- Crafting Keys
function canCraftKey(player)
if not player then return false end
local scrapMetal = player:getInventory():getItemFromType("Base.ScrapMetal")
local keyItem = player:getInventory():getItemFromType("Base.Key")
return scrapMetal and keyItem
end
function craftKey(player)
if canCraftKey(player) then
local scrapMetal = player:getInventory():getItemFromType("Base.ScrapMetal")
player:getInventory():Remove(scrapMetal)
local keyItem = player:getInventory():getItemFromType("Base.Key")
local newKey = InventoryItemFactory.CreateItem("Base.Key")
newKey:setName(keyItem:getName())
player:getInventory():AddItem(newKey)
player:Say("You have crafted a new key!")
else
player:Say("You need a scrap metal and an existing key to craft a new one.")
end
end
-- Door/Window Interactions
function onInteractWithDoor(player, door)
local keyItem = player:getInventory():getItemFromType("Base.Key")
if keyItem then
door:setLocked(false)
player:Say("Door unlocked!")
else
player:Say("You don't have the correct key!")
end
end
Events.OnFillWorldObjectContextMenu.Add(function(player, context, worldObjects)
for _, object in ipairs(worldObjects) do
if instanceof(object, "IsoDoor") or instanceof(object, "IsoWindow") then
context:addOption("Unlock with Key", object, function(door)
onInteractWithDoor(player, door)
end)
end
end
end)
-- Lock Containers
function lockContainer(player, container)
local keyItem = player:getInventory():getItemFromType("Base.Key")
if keyItem then
container:setLocked(true)
player:Say("Container locked!")
else
player:Say("You don't have the correct key.")
end
end
Events.OnFillWorldObjectContextMenu.Add(function(player, context, worldObjects)
for _, object in ipairs(worldObjects) do
if object:getContainer() then
context:addOption("Lock Container", object, function(container)
lockContainer(player, container:getContainer())
end)
end
end
end)
/////////
well im not getting an error anymore but the key isnt being added to inventory still
use OnPlayerUpdate
player object probably isn't available to receive the item
function yourFunction(player)
player:getInventory():AddItem("your key")
Events.OnPlayerUpdate.Remove(yourFunction)
end
Events.OnPlayerUpdate.Add(yourFunction)
thx
my items.txt didnt look like other mods so i just copied their structure but now my game crashes when loading scripts?
****module SMPL
{
imports
{
Base
}
item SMPL_Key
{
Weight = 0.05,
Type = Normal,
DisplayName = SMPL Custom Key,
Icon = Item_Gray_key_icon_48x48,
}****
Missing a closing curly bracket
do you know a good place i can find info, i tried searching in the modding doc but nothing comes up
the code doesnt have any errors, but its till not making the item |:
-- Create the custom universal key (this won't conflict with vanilla items)
local customKey = InventoryItemFactory.CreateItem("SMPL_Key")
if not customKey then
print("Error: Failed to create custom key item!")
return
end\
LOG:
[SimpleMultiplayerLocking] Error: Failed to create custom key item!.
.
im trying to search the doc but even puting in something like OnPlayerUpdate just says no results found
Your not assigning your function to the event, you're running it and giving the result to the event
Also use code blocks to share code please
i dont know much, that doesnt mean anything to me
for example my mod would crash the game because my textures didnt have Item_ at the front
how was i supposed to know that
|:
ive been doing a python masterclass for ages and its so hard, its supposed to be a 2-3 month course
im not very good at this
im pretty sure ive completed the course 4-5 times now
and i still have no idea how to program
i feel like nothing sticks with me?
well anyway, theres not much documentation. i often ask chatgpt for help but he knows just as much as i do reffering to pz.
Yea don't use chatGPT for PZ, however you can use A LITTLE BIT for some lua basics
Don't go too deep tho as the lua version we have is 5.1 and some stuff we don't have access to
yeah i know chatgpt wont know much about pz doc, but the documentation doesnt have any mentions of things like onplayerupdate
is it outdated?
package index
are there any good resources for pz modding
a list of lua events can be found here: https://pzwiki.net/wiki/Category:Current_Lua_Events
not 100% sure how up-to-date the list is but it seems to contain most of the stuff which is typically used
thx
For a general introduction to PZ modding, I always recommend the guide by Fenris_Wolf: https://github.com/FWolfe/Zomboid-Modding-Guide
ive been looking at a similar repo
chatgpt is actually pretty capable at writing code but many times it says that X is the error and then gives me code with the error lol
the best i can do is for my code not to remove the vanilla key
It's not outdated no
Just open events, you'll have example codes on how to use thzm
I don't have time to help in detail rn sadly
i searched for OnPlayerUpdate and theres no results?
would be helpful if you knew what the error was
you can look here for events
dont use oncreateplayer as a globsl function
https://pzwiki.net/wiki/OnCreatePlayer
local function OnCreatePlayer(playerIndex, player)
-- Your code here
end
Events.OnCreatePlayer.Add(OnCreatePlayer)
Been scratching my head with this. Its probably something simple but I can't figure it out. I want to achieve activating the mouse and keyboard and deactivating the joypad on a onPress keybind. And then on releasing that keybind it activates the joystick and deactivates keyboard and mouse. Id like to aim with the mouse. I'm playing on the steam deck so I can map the keys I need and use the gyro as a mouse. I found a mod that does this in a sense where it switches to keyboard and mouse fluidly but when it gets to reactivating the joypad it goes through a menu to select the player or make a new player. I just want it to reactivate the joypad. Heres the code in the mod maybe its just as simple as adding something basic
local function disbleJoypadKey(key)
if key == getCore():getKey('Aim') then
local joypadData = JoypadState.players[1]
if joypadData then
JoypadState.useKeyboardMouse();
local playerData = getPlayerData(0);
if playerData then
playerData:revertToKeyboardAndMouse();
end
end
end
end
Events.OnKeyPressed.Add(disbleJoypadKey)
-- Store the original joypad data when we switch to keyboard/mouse
local savedJoypadData = nil
-- Function to handle key press (switching to keyboard/mouse)
local function disableJoypadKey(key)
if key == getCore():getKey('Aim') then
local joypadData = JoypadState.players[1]
if joypadData then
-- Save the current joypad state before switching
savedJoypadData = joypadData
-- Switch to keyboard/mouse
JoypadState.useKeyboardMouse()
local playerData = getPlayerData(0)
if playerData then
playerData:revertToKeyboardAndMouse()
end
end
end
end
-- Function to handle key release (switching back to joypad)
local function enableJoypadKey(key)
if key == getCore():getKey('Aim') then
if savedJoypadData then
-- Restore the saved joypad state
JoypadState.players[1] = savedJoypadData
local playerData = getPlayerData(0)
if playerData then
playerData:setJoypadIgnoreAimUntilCentered(true)
playerData:setAuthorizeMoveReset(true)
playerData:setJoypadBind(1)
end
savedJoypadData = nil
end
end
end
-- Register both event handlers
Events.OnKeyPressed.Add(disableJoypadKey)
Events.OnKeyReleased.Add(enableJoypadKey)
Something like this?
Don't know if it works lol
that was a fast reply thanks bud. I will give it a shot right away π π―
If it don't work it might give you a few ideas π
no luck switching back to joypad. But I've got something to work with now. Ill just keep trying things till it works. Really appreciate your help mate π
I don't own a joypad else I'd try and help π difficult for me to test haha
Hey folks, does anyone have a tip to help make freaking arts for crops?
I wanna make a mod that adds crops to all the plants n herbs found on the vanilla game (plus a few other others maybe) and GAH, I'm having a extremely tough time drawing the crops, couldn't make any usable thing yet
i was looking in projectzomboid.com/modding
-- This function is called when the player spawns in the game
function giveKeyOnSpawn(player)
-- Add the key item directly to the player's inventory
player:getInventory():AddItem("SMPL.SMPL_Key")
end
-- Register the function to be triggered when the player spawns
Events.OnPlayerSpawn.Add(giveKeyOnSpawn)
.I dont want other people to code for me, but ive been trying for hours i have no idea
OnPlayerSpawn doesn't exist, you're thinking of OnCreatePlayer
that passes the player as the second argument so you'd have to change your function signature to e.g. function giveKeyOnSpawn(_, player)
thx
Does anyone know if there is a way to edit the existing skill categories?
Quick example of what I am seeking to do:
I wrote a driving skill mod a few years ago, and I want to make a category (ie: parent) of "Vehicle Skills" and move Driving and Mechanics into it. Been searching for the last day and a half and havent found anything.
i have this in media/shared and the module is SMPL and the item is SMPL_Key:
-- This function is called when the player spawns in the game
function giveKeyOnSpawn(_, player)
-- Add the key item directly to the player's inventory
player:getInventory():AddItem("SMPL.SMPL_Key")
end
-- Register the function to be triggered when the player is created
Events.OnCreatePlayer.Add(giveKeyOnSpawn)
why wouldnt it work?
does the item work? you can spawn it from the debug list normally?
Do you have reference to "player" in your code already?
function giveKeyOnSpawn() local player = getPlayer() player:getInventory():AddItem("SMPL.SMPL_Key") end
the event passes one
Oh derp, yeah.
looks like generated by chatgpt
i see some pseudo syntax
yeah
i dont know lua
ive been trying for a long time to learn but i think its to difficult for me currently
And..?
and nothing im not against ai being used as a tool
its up to the modder how to use them tho
directly having it write entire code isnt something its capable to do not unless you feed it syntax or your own code
i often use it for math formulas
Just thought your comment was a pretty weird contribution to my attempt at helping someone that's all. Pointing out the fact I used an ai to assist, like ok... You could've suggested an improvement where the code was going wrong.. that would've been helpful..
The newer models deffinitelly can, used it to write this. Didnt write a single line of code.
https://github.com/Roadbobek/Project-Zomboid-Mod-Manager-X-Mod-Manager-Server-Mod-List-Transfer-Tool
Even the older gpt models before chatgpt, when u had to go to an unlisted link to use it could, not aswell but they could.
the only problems i had with it was misunderstanding what i wanted it to do, but the code didnt have any errors.
sorry if it seemed that way
it wasnt my intention
im just stating facts tho
im not convinced yet but thnx for letting me know
i think chatgpt can barely access resources
if it has access to the decompiled java and be able to use it to be able to write lua codes then that would be great
esp if it can also provide animation and clothing xmls
it can search the web well, but often you have to ask it to
and if you try feeding it a lot of data it just says the message is to long
it doesnt work very well with something like pz, because it doesnt know the doc
and i cant just send it a file that long
im well aware of that
which is why i mentioned i only use it for functions like math.
also use it to refactor my checker logics when it becomes messy
i find it hard to learn stuff when i can barely understand the documentation, so i really like using chatgpt to explain things to me
i want to be able to write my own code
also bugfixing, good for that
maybe you find something here
#1070852229654917180 message
Using ChatGPT to rubber duck / review is mostly fine if you give it good enough instructions / limit scope.
But you should probably disclose that you used it when giving out snippets that may or may not work.
I would recommend anyone using it to learn to avoid being swept up with the results, maybe try to read along the code to figure out what it's doing- ask it to make changes, see what it changed. Read the little blurbs it adds at the bottom explaining changes.
Source: I've used it before for some PZ mods, and currently using it to learn GameMaker (Studio 2) and often times the model goes haywire and just gets confused if you keep the session going.
Keep in mind that this is using Python which is a well documented language. PZ uses Kahlua which is heavily undocumented and the AI doesn't know most function names letalone how to optimise it well enough.
Not to mention the only little amount of training data for PZ over Python which OpenAI probably datafarm so much Python code
Didn't even use chatgpt used Claude π
tbf claude is much better than chatgpt imo for most langs
but the thing about AIs not knowing much about kahlua still exists
Yeah I get you. I did say it probably won't work after I posted it
I usually test it vigorously but the issue I was addressing relating to a gamepad which I had no way of
Tried to be helpful at the very least βΉοΈ
I feel like the AI is more useful to ask for ideas on how to layout the code yourself more than writing the code straight up
I've used copilot for help with logic before. I never asked for code. Just asked for a "class derived from ISBaseTimedAction for selecting an area with the mouse in Project Zomboid" and it spit out some almost usable code.
ask the AI to decide on certain systems of your mod
I think it's good for blocking code logic out. Even if it makes non existent functions out of thin air if you manage to systematically go through it and check I find it very powerful
anywho, does update function of a timed action run per tick or?
yea
nice. thanks!
for example. the progress bar uses the underlying update function (after the timed action's update func is called)
apparently, the last time I touched this code I had decided to rewrite it using ISBaseTimedAction but didn't comment anything so I got myself all kinds of lost.
some nice looking functions in there though. Inebriated me writes ok code.
Inebriated is the best way to code
well, I mean, I don't really remember starting to rewrite this module and there's zero comments. makes it interesting.
I think I was trying to get away from using Events for the mouse
Waking up in the morning and seeing 7 commits you don't remember doing π
My favorite is uploading an update and waking up to complaints that it's breaking games and trying to remember what you did
guys is there a mod that increases loot chances at night? I'm playing on a "everything insanely rare" hardcore world with runners at night and I wanted to incentivise nightly escapades (since regular looting literally yields barely anything useful at all) so I wanted to switch all rarities to "rare" or vanilla default at night
Why are the world 3D models so difficult to get working? I have tried every combination of things I can think of. I want to use a vanilla mesh with a custom texture but when it's placed on the ground, it shows the old 2D icon style item
Check your script where you define and use the model.
His model script might also be goofed- logs will say if something isn't able to load.
Nothing showing in the debug console.I think I'm getting in a loop of fixing one thing but breaking another between the scripts
Show your scripts here, could be something obvious
I don't have access to them at the moment, but can I reply to your comment later on with them?
I'm looking to get a recipe item query to be a little more advanced, but my brain is not. I'm trying to look for all empty water bottles, of those all the ones that have an AttachmentType, but exclude certain specific items from the returned list. How is that done? Or am I overreaching here?
Nevermind man. Im a dumbass and gave my model script a .Lua extension
classic, it happens to the best of us π
I'd have to do a pretty nested function, I'm gonna look into that more
I want to make a mod that increases loot rarity at night, but I've never modded and idk where to even begin. I understand I just need to find which functions handle loot rarity and checks if it's night or not and make a single if statement, but idk what they're called, where to look etc. Any help would be appreciated!
I don't think it would be that easy. AS far as i know, loot is generated around player, i think its alot tiles, but don't know exact numbers, so if you for example visit area by day, it would spawn said loot. If you were to visit that area later by night, it would be already generated, unless you made so it changes/respawns? But then this opens doors for alot of exploit by looting at day, then again by night and once again by day.
I imagined it would work something like that with loot spawning, the question is how big the spawn radius is. I wouldn't want to do the second option you mentioned because of the exploit possibilities, but if the spawn radius is for example 5 tiles (by tiles I understand it refers to roughly the size of for example a carpentey wall being placed which equals to 1 tile?) I think it would work well with the first option cuz then the player could simply avoid certain POIs during the day and raid them at night for the bonus but if the tile radius is like dozens of tiles then it would make it really problematic for the player lol
"this should work. why doesn't this work?"
whispers: because you named two functions the same name, like a genius
continues whispering: and if you paid attention to the error highlights, you would have known that 10 minutes ago...
so you would want to add to an event. i would use LoadGridSquare. this event passes the squares as the player loads them. you would just check if there is a container in the square and add loot to it. I would imagine theres a way to tie in to the games loot generation and just tell it to generate more but idk
I'm lost again. I'm getting a nil error but everything looks good to me.
I'm calling ISTimedActionQueue.add(ISInventoryTransferAction:new(playerObj, item, item:getContainer(), stageSquare, 150))
I get the error: function: new -- file: ISInventoryTransferAction.lua line # 700 | Vanilla / Object tried to call nil in new.
Line 700 is: o.stopOnWalk = not o.destContainer:isInCharacterInventory(o.character) or (not o.srcContainer:isInCharacterInventory(o.character))
destContainer is an IsoGridSquare
player walks all the way to the square and then it errors
item is a ComboItem... bet that's my answer
I tried floor and got the same thing. I'm playing with ISDropItemAction again and I think my problem is I'm loading up the ISTimedActionQueue. Lemme post some code.
local wobs = square:getWorldObjects()
if wobs then blah blah let's find logs
local dropLogs = ISWalkToTimedAction:new(playerObj, stagingSquare)
dropLogs:setOnComplete(Forestry.dropLogs, o:getItem(), playerObj)
ISTimedActionQueue.add(dropLogs)
and then
Forestry.dropLogs = function(item, playerObj)
ISTimedActionQueue.add(ISDropItemAction:new(playerObj, item, 150))
end
This causes the player to get the specified amount, walk to the "stagingSquare" and think for a second, and drop nothing. Sometimes the player goes back for more, sometimes the action bugs.
bear in mind that it's a timed action *queue* for a reason, you don't need to do weird stuff with on completes, you can just queue both actions
I was trying to defer checking the players inventory until they got to the drop off square. I could have been doing it wrong, but using luautils.walkAdj it would run the function to check the player inventory immediately.
from my research it would seem the loot spawns upon world generation or at least in a massive area when the player first walks into it so it complicates things a lot lol. I'll try to maybe change the loot generation system in general instead of adding on top of it cuz i dont want to spawn new loot to already looted/opened containers.
Also thanks for the suggestion, I'll try to make use of this event!
How does the game knows that those new body locations correspond to "lower legs" etc. in the base game?
group:getOrCreateLocation("KATTAJ1UpperLegs")
group:getOrCreateLocation("KATTAJ1LowerLegs")
group:getOrCreateLocation("KATTAJ1UpperArms")
group:getOrCreateLocation("KATTAJ1LowerArms")
And then in the scripts:
BodyLocation = KATTAJ1LowerArms,
Now on the workshop: https://www.youtube.com/watch?v=YCrdf55Bcic https://steamcommunity.com/sharedfiles/filedetails/?id=3373052306
Architect Mod for project Zomboid
https://steamcommunity.com/sharedfiles/filedetails/?id=
Create blueprints. Build from blueprints. Share blueprints.
You can create bnuildings from Map buildings, not from dynamically constructed rooms.
Should I be looking for a third script hooking them together?
it doesn't really know at all
body locations basically just represent item 'slots', items with the same body location/incompatible body locations can't be equipped together
for stuff like protection, insulation, etc, it's the blood location that's used, which maps directly to areas of the body
Uh, so blood location IS the thing that hooks everything together, thanks, I had a suspicion that it was the case but it sounded a bit weird
Very nice! Going to take copy/paste off my todo list. I like this better.
my head is almost on straight but idk what I'm doing wrong here. getItemsFromFullType("") returns an array.
local logitems = playerObj:getInventory():getItemsFromFullType("Base.Log")
for i=1,logitems:size() do
local log = logitems:get(i)
ISTimedActionQueue.add(ISDropItemAction:new(playerObj, log, 150))
end
That gives me an InvocationTargetException error when I try to set log
I also tried local log = logitems:get(i):getItem() but that gave me an getType of non-table: null
for i=0, logitems:size()-1 do
I tried that, and also going backwards. I still get nil for the first iteration, and a comboitem for the second
lemme double check
well ok then, maybe I didn't try that
Anyone have any idea on what setting I need to muck with to prevent a custom context menu from duplicated on stacked items?
Figured it out. For anyone in the future with this issue, you need to add a boolean check to the function you add the context item with.
Example:
`function ResearchContextMenuEntry(player, context, items)
local needsContext = false;
local items = ISInventoryPane.getActualItems(items)
for _, item in ipairs(items) do
if not instanceof(item, "InventoryItem") then
item = item.items[1]
end
if item:getFullType() == 'YourMod.YourItem' then
needsContext = true;
end
end
if needsContext then
local character = getPlayer()
context:addOption(getText('IGUI_YourString'), items, YourCallback, player)
end
end`
I tried making a clothing mod. I have a prototype (let's call this Shirt A) that basically functions, so I used it as a base for the other shirts
The original prototype works and shows up in the game, can be selected during character creation and appears
The other ones, they show up in character creation, but when I choose them the game forcibly unequips the clothing
What I did was:
replicate the files in media/clothing/clothingItems one for each piece, with unique GUID
add the items to media/scripts/clothing text file that contains Shirt A (which, again, works)
add the unique GUID to fileGuidTable
Is there a step I'm missing?
The thing is, since the shirts are basically just the same texture with different color, if I set them as alternate textures with mBaseTexture they work
it's just that, the separate item entries do not work
Holy crap I'm dumb, the file names in clothingItems have a single teensy small whitespace in it lmao
Anyone manage to decompile and recompile LootRespawn.class successfully? Or anyone has made a patch for LootRespawn.class to fix the empty loot respawn?
I feel this is probably pretty easy, or impossible, idk lol. Can I rename the output item from a crafting recipe? And since it's a sheet of paper, can I also write on it? Like have it craft already written on?
This is my first attempt at modding
Yes, you can do it using OnCreate
https://youtube.com/shorts/EZjKDWaD1mw?si=xBs2XNjIGgG4PW1c
people either troll or they just really want weird mods
i accidentally mirrored the paint weights from the other leg lol
Is there a limit to the amount of actions you can add to the ISTimedActionQueue before it bugs?
Hello everyone. The game has a java module (I assume it is java), which is responsible for displaying a message on the server "The player died" in the chat. I want to change this output phrase a bit. Do you have a suggestion, which module is responsible for this?
Or perhaps you know how this can be changed without having to decompile Java files?
The first place id look is translation files.
In media/lua/shared/translate/en for example
If its not there, and its not in the lua somewhere (not likely) then its probably hardcoded in Java and that's gonna be an endeavour.
I just want to randomize this phrase. you know, add different funny descriptions, like it's done in Minecraft, for example. I'm afraid the translation file won't help with that?
Oh yeah, then you might be out of luck
I don't know much about chat system, but tbh it sounds like that element would be hsrdcoded
If no one else can help you, the idea might have to be put on temporary hold
the problem was so very obvious that I feel ashamed
thank you, I'll look into that!
it's hard coded of course: ChatServer.getInstance().sendMessageToServerChat(((IsoPlayer)this).username + " is dead.");
I supposed you could turn off death announcement and make your own
Can you tell me where exactly this is programmed?
line 1349 in IsoGameCharacter.class
thanks, I'll try to decompile this and create something like a dictionary there and randomly write one of the phrases to a variable, and then substitute it into a function. theoretically, this should work
I would turn off the death announcement sandbox option and hook the OnCharacterDeath event to send a message to chat.
Shows WIP on the log gathering function in a Project Zomboid "Forestry" mod. Lots left to do.
When I start reading, item in hands are hidden. If I override the hand item after starting the read animation, the holding hand is not animated. Do you know how I can keep the visual StaticModel in hand during the animation ? ```lua
self:setAnimVariable("ReadType", "newspaper")
self:setActionAnim(CharacterActionAnims.Read);
self.character:reportEvent("EventRead");
--if self.item then
-- self:setOverrideHandModels(self.item, nil);--does not work. forcing the item inhibit hand animation
--end
Hmm, check out the timed actions
There's options to have an item equiped during the timed action I believe
Looks like you need to flip the variables in setOverrideHandModels
The way it is used in ISReadABook is:
self:setActionAnim(CharacterActionAnims.Read);
self:setOverrideHandModels(nil, self.item);
that's swapping between right and left hand. the hand with the item is not animated. (in my case primary hand, in your -vanilla- case secondary hand)
I probably should not override primaryAnimMask and secondaryAnimMask which I did but not write here that I did 
for what it's worth, one of my timed actions which does no such thing also hides items when performing it
yeah that's default behavior to remove items when all the bones are used in an animation (i.e. when using setActionAnimin the timed action), probably to avoid strange movements of poorly attached items. setOverrideHandModels is here to compensate that (e.g. when reading). primaryAnimMask and secondaryAnimMask are preventing the matching hand animation and hand model override.
By removing primaryAnimMask and secondaryAnimMask the hand override finally works. thanx you three.
What causes Could not find bone index errors?
I'm creating new body locations, it's probably related
From sightreading the code, it seems that basically there's a map of bone indicies for each anim node and if the bone index for that node doesn't exist, then it will do that error
and this skips all of the other bone stuff like pos, rotation, scale
Well it looks like the error solved itself somehow, I love when they do that
i have a βspecialβ infected mod idea iβd like to share with someone who might be mod capable in that regard
dm me if you are a modder and want to hear the idea i wanna see if itβs doable
In regards to whether or not it's doable, Sir Doggy Jvla did some neat mods in regards to custom zombies.
Though if you do want someone to mod it, I'm not sure if he'd be up for it. He does however have a framework to help with it afaik, so might be worth a look if you do want to implement it yourself!
i have zero modding experience but i happen to have good ideas for mods
Might be worthwhile to gain modding experience to make those ideas come true 
Just takes time to learn and get used to it
And community is nice if you ever stumble somewhere and need some help
What's your idea ? I won't do it, but I can give some thoughts on if it's possible to do
iβll try to summarize, but itβs based off a dream i just woke up from a few hours ago
-# a viral outbreak had occurred in a fictionalized version of my apartment complex. the behavior of the afflicted was very strange and could be divided into three subtypes of infected
The Dormant
The Far Gone
The Vampires
-# The Dormant do not have much physical aspects that let others know theyβre dangerous, itβs in their behavior that lets you know to steer close from them. The Dormant tend to act in strange ways, such as standing and staring at nothing, doing random acts around the area despite the threats around, etc. If the Dormant happen to be children, the Dormant will not often attack unless they feel threatened, utilizing methods of grouping or swarming to spread the disease faster. The same cannot be said for adult Dormants though, as an adult Dormant will at some point try to grab you or attack you. Dormants primarily spread the infection through airborne means, having a sort of βauraβ of the virus around them that puts people at immediate risk. Paired with their risks, the behavior of a Dormant can be easily mistaken for a normal human if youβre not observing their behavior enough, as Dormants tend to utilize the ability to knock on doors to try and draw out unsuspecting individuals.
-# The Far Gone are somewhat easier to notice, as their physical appearances alter slightly with appearances of blood, dirt, or torn clothing, and are more feral in how they act. Just like Dormants, they are attracted to slight changes in the area such as a shift in sound or a visual shift, like lights turning on or off in an apartment, and unlike Dormants, will try harder in their attempts to get to wherever it is they want to, going so far as to bang on doors like zombies. Their ferality is more evident than that of a Dormant, making them a bit easier to spot from the rest.
-# The Vampire is where things took a turn in my dream. A strange man with a strange appearance had caught my eye in the beginning of the dream and later appeared again. Almost as though he was observing the chaos, this βVampireβ had been outside for a good amount of time. His presence paired with a few teenager Dormants had made me briefly think I was delusional regarding a zombie attack, but when I asked the Vampire, who was outside on the pavement and I on a fire escape stairwell, if he was a zombie, he gave me a sinister chuckle that all but confirmed my suspicions.
-# Vampires are highly dangerous and assumed to be rare (I didnβt dream long enough to study them further). Their tendencies are far more dangerous, having little signs to indicate that they are infected, other than an βobservationistβ or βstalkishβ behavior that of which is peeled away whenever a Vampire feels that the time to strike is now. When a Vampire is ready, a slight mutation process will occur where the Vampire will let the full effects of the virus overtake them (possibly temporarily if not for an extended period of time), gaining far more strength, speed, and ferality at the cost of the more human benefits it once had. They give a terrifying scream when transforming.
-# A Vampireβs mutation doesnβt entail too much change, sporting a more malnourished physicality, a sunken face, and a pale skin pigmentation. Alongside this, are enhancements to their speed, strength and ferality.
hereβs the dream too
it began at my apartments
-# i felt something strange and began to saw people outside chasing each other weirdly and banging on other peopleβs doors but their behavior wasnβt entirely feral, like they had some sort of control left but only sometimes
-# anyways, as it began to start i realized what was going on rather fast and began to call everyone i could to warn them about what was going on, i called my mom and damn near hyperventilated trying to tell her the zombie apocalypse was happening now, i tried to call my buddy and warn him, it was fucking terrifying. then, i began to lock down the entire apartment and barricade it, using whatever furniture i could to block off doorways, windows, stairways, etc
-# there was one specific figure who caught my attention during all this, a very very strange man with an even stranger demeanor, and i somewhat knew or felt that he was one of them, but the way he acted was more intelligent. i wasnβt the only survivor in this apartment complex, i had to deal with a young Japanese guy who the language barrier was very evident with, but we managed to communicate with each other about what we needed to do to feel safe.
-# me and him turned off all the lights in our apartment, started to crawl around, and began to watch the behavior and the method of operation for the βzombiesβ, which was quite scary given i found out that the βzombiesβ were attracted to movement and light, and there seemed to be at first two types; the dormant and the far gone.
-# The dormant ones were like you and me, relatively normal looking in physical appearance, but acting out in strange ways. For example, at some point, me and the Japanese guy caught sight of someone working out in the track field next to the apartment, just straight up doing pushups. We could somewhat tell that they were infected though due to the way they jogged, which was a sort of a stiff, feral limp. Then we saw a couple other kids doing the same stuff, and got the idea to try and get their attention to see if we were exaggerating or if there really was a problem.
-# I made a light whistle towards them in the dark of the apartment, and the two-three we were originally watching multiplied into about 5 or so kids from out of nowhere. It was like we woke them up from a trance. Admittedly we asked them if there was any zombies, one of them replying no despite the obvious answer being YES. They then immediately began to swarm up together and knock on doors like it was Halloween. They were the dormant.
-# The far gone were those affected by it long enough to have their mind almost entirely lost. Almost entirely feral, these were the ones who were banging on doors and trying to break them down. When I was barricading the bottom floor, one managed to break in and I had to dodge it and run away since I was unarmed. Something we observed was that if the Far Gone werenβt attracted by anything, they would enter a state of focus in order to look for something, anything, to set them off and give them a reason to move. When we shut the lights off and began the observation process, we saw this occur with a slightly buff looking lady who was in this state of focus. Had we not had our lights off I do believe she wouldβve gone to seek us out.
-# I mentioned that there seemed to be two types. The man with the exceptionally strange demeanor I mentioned earlier. When I looked out from a fire escape window on the second or third floor of the apartments, he was less than maybe 30 feet from me on the ground. Looking at me, watching me. And I asked him, βare you a zombie? are you one of them?β and he just chuckled. He just fucking chuckled. And it wasnβt a lighthearted chuckle, it was a sinister βoh, you poor, unaware foolβ chuckle. Then he said βNoβ.
-# Out of nowhere a third survivor who looked like he was ready to kill LITERAL vampires with his fucking Bloodborne getup climbs up my fire escape, goes βDonβt listen to him, heβs one of themβ and proceeds to help me board up the fire escape window. I thank him and go βalright hereβs the deal we have a safe house upstairs fully boarded off.β Just as weβre starting to climb the stairs we hear a horrifying roar. A transformation roar. My fight or flight kicked in, and me and the new survivor sprinted up the stairs as quietly as we could. I looked down the stairwell because it was one of those stairwellβs you could kind of peek.
-# I saw that same strange man sprint up the stairs in a far more physically chaotic way than the others carried themselves. This was a ferality comparable to a vampire. And considering his appearance and demeanor, assuming others were like this too, Iβm calling this third type the Vampire. A third stage that was either a sign of the normalities to come, or a sign of rare mutations that were to be seen occasionally around.
-# The vampire had luckily not seen us, but at that point that fucker was already in the apartment. It was terrifying.
Pretty cool story and principle
Definitely doable
holy essay! no offense lol, just was surprised)
Yea lol
an interesting idea for zomboid would be turning off name tags if you cant already
in a multiplayer environment, and with zombies that can look similar to players, that would be really terrifying
if you ever feel like making a mod based off of that feel free to
same for whoever else might want to
just credit me for coming up with the idea lol
you can
server settings
also from lua I believe you can
i did not read this but saw vampire
if its similar to my proj then 1 of your ideas will come to life
i just recieved a vampire mod commission request
tho i still have 2 mods to finish first.
then will do the vampire
i did read parts of your message and saw they are rare
but mine will be complete overhaul
world wont have any zeds
only vampires
take a gander itβs worth the read
nope
im working on a mod rn
just took a break which is why i was able to chat here
fair enough
And using what lua method can you send a message to a chat from the βperson of the serverβ?
I haven't looked into it, but if ChatServer is accessible from lua, that would be ideal. If it isn't, then a server command might be doable.
something like SendCommandToServer("/servermsg someone ded")
I guess I don't know how that would render. I can look into it later though.
because I think a servermsg pops up on the screen too?
Yes
local function sendMessageToServerChat(messageText)
local chatServer = ChatServer.getInstance()
chatServer:sendMessageToServerChat(messageText)
end
local function OnPlayerDeath(player)
local username = player:getUsername()
local deathMessage = string.format("%s test!", username)
sendMessageToServerChat(deathMessage)
end
Events.OnPlayerDeath.Add(OnPlayerDeath)
I tried this but ended up still getting an error:
STACK TRACE
-----------------------------------------
function: sendMessageToServerChat -- file: death.lua line # 4 | MOD: death
function: OnPlayerDeath -- file: death.lua line # 17 | MOD: death.
[30-11-24 02:18:31.371] ERROR: General , 1732907911371> 19 228 483> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: getInstance of non-table: null at KahluaThread.tableget line:1689..
[30-11-24 02:18:31.371] ERROR: General , 1732907911371> 19 228 483> DebugLogStream.printException> Stack trace:.
[30-11-24 02:18:31.373] LOG : General , 1732907911373> 19 228 486> -----------------------------------------
STACK TRACE
-----------------------------------------
function: sendMessageToServerChat -- file: death.lua line # 4 | MOD: death
function: OnPlayerDeath -- file: death.lua line # 17 | MOD: death.
And this is what I found in the documentation:
declaration: package: zombie.network.chat, class: ChatServer
declaration: package: zombie.chat, class: ChatMessage
Don't judge strictly, I practically don't remember this documentation... It's alien to me. And I'm not a lua programmer
But maybe this will give you something so you can tell me which way to look
any mods that changes the hud/UI appearance?
I have one server, but it wonβt change anything regarding the chat. There is only extra. command /suicide
However, the absence of this mod did not affect anything
The error occurs here:
sendMessageToServerChat(deathMessage)
and here:
local chatServer = ChatServer.getInstance()
quick test and I don't think ChatServer is exposed in lua
Then could there be any analogue?
Is anyone creating a mod that can integrate AI like CHATGPT into NPC interaction with the player?
my wife is catching up on the new Matlock so I have plenty of time to give this a look
If I need to send a server message, I create a βmimicβ message to add to the chat & just make it look & act as a server message
You'll need to do this for every player, which can be achieved via a server command. See https://github.com/omarkmu/pz-omichat/blob/abf38937a908bce2edbbcf11fc1030cb1d2f60cd/Contents/mods/OmiChat/media/lua/client/OmiChat/API/ClientChat.lua#L345
I think someone working on it a month or two ago. You might do search in this channel for "ai chat" or something similar. It should come up.
I'm glad I never said it's easy. I thought it would be but PZ. I would check out Omar's OmiChat and see how they did it. Or go with the java mod you were thinking about.
yeah, if you want a proper integration without having to run like a listener service or something alongside the game, you probably want a Java mod
wonder if one can fake an OnAddMessage event... it still wants a ChatMessage, nvm
thought I broke the inventory panels(again) but nope, they were just closed for whatever reason.
Hi, your project looks very interesting. I'm creating an NPC mod and I wanted to include AI.
What is the 2nd argument for context:addOption() supposed to be? I see the player being passed on some examples and on others not.
context:addOption(actionName, nil, callbackFunc)
the first argument to pass to the function
it's dumb but basically addOption(name, arg1, callbackFunc, arg2) calls callbackFunc(arg1, arg2)
Yeah that is kinda dumb, thank you for clarification
okay, i know this is hard to explain but im gonna go and try to share my idea and see if someone is able to help me out on this one.
so if you guys have played the Day One mod by Slayer (wich btw its amazing and i love it) youll know theres this little feature that basically throws a nuke at you. so im trying to do this kind of cinematic end to one of my worlds in wich i want it to begone with one of these nukes, iΒ΄d like it to be activated via a button either made in the game or one similar to this debug tool from their mod itself (pic1) and when it being pressed and advertisement similar to this one (from cod mw2019 pic2) thus making the player die instantly alongside the world itself, do you guys think something like this could be possible? does someone know where to start?
The menu is called a context menu I think
You can create an option when right clicking anywhere in the world
i understand
local handleOptionClicked = function()
--Stuff happens here when you press the button
end
local function OnFillWorldObjectContextMenu(playerIndex, context, worldObjects)
context:addOption("Option Name", nil, handleOptionClicked)
end
Events.OnFillWorldObjectContextMenu.Add(OnFillWorldObjectContextMenu)
my syntax is disgusting rn hope you dont mind
sincerely, my "programming experience" its about 1 day old so i surely dont mind since i dont even know how to code that myself
You have no experience in lua?
uhhh
yesterday
Basically none lol it's fine
it is none
Put this in a script and test it
right click anywhere in the world it should show up as an option
okay im going to test it rn
I added one myself called "trigger timed action"
I am trying to set up timed actions and I noticed the require method and it seems like it doesn't throw an error, even if the path is invalid so how can I be sure if it has required anything
scrap it im gonna start at the beginning, i tried to implement the trigger timed action on the mod i was trying to do but i think its best if i just start all over
oh rip
I am trying to learn how to make timed actions myself but nothing is happening
Following this https://github.com/MrBounty/PZ-Mod---Doc/blob/main/How to make a custom timed actions.md
Maybe it will help you
im following it too now thank you
apparently with this you can trigger any event just like the mod but im not pretty sure how to link that to the event itself
It's still not working for me under the path media > lua > client > TimedActions
require "TimedActions/ISBaseTimedAction"
MyTimedAction = ISBaseTimedAction:derive("MyTimedAction");
function MyTimedAction:new(character) -- What to call in you code
local o = {};
setmetatable(o, self);
self.__index = self;
o.character = character;
o.maxTime = 30; -- Time take by the action
if o.character:isTimedActionInstant() then o.maxTime = 1; end
return o;
end
local handleOptionClicked = function(player)
local plrString = "Timed action has been pressed"
getPlayer():Say(plrString) --Make player say something for debug purposes
MyTimedAction:new(player) --Nothing is happening
end
local OnFillWorldObjectContextMenu = function(playerIndex, context, worldObjects)
local player = getSpecificPlayer(playerIndex)
context:addOption("Timed Action", player, handleOptionClicked)
end
Events.OnFillWorldObjectContextMenu.Add(OnFillWorldObjectContextMenu)
lmk if you figure it out
try asking him here
https://discord.com/channels/136501320340209664/1307047640453877780
thanks, i messaged some stuff in there, hopefully he can help me out.
@bronze yoke
youve always mentioned that the load order doesnt work like how most people think of(based on whats written first from the modlist)
https://youtube.com/shorts/ubleyA7WnZE?si=cJ5Zd9KYf7-nS4-x
i saw this and wondered why tis would make something that has a load order control?
In this video, we take a look at the mod management menu mentioned in a previous Thursdoid post by the developers of Project Zomboid.
Enjoy!
------------------------------------- Important Links -----------------------------------------
Patreon & Server Whitelists: https://www.patreon.com/mratomicduck
My Discord: https://discord.gg/EwyjPw4HY...
also someone showed me this
but i know what youre saying is in regards of lua tho but id like to ask you what your take on this matter
thnx in advance
i don't know why they would do that, but load order does matter in very specific circumstances (but well written mods rarely rely on these factors because they are avoidable and you should never rely on the user to do your work for you)
load order affects the order in which mods 'load' but that's mostly meaningless as most types of files that are run during the main 'mod loading' phase do not really care what order they run in
it doesn't affect things like the order in which script and lua files run, which is the main thing people seem to think load order does
the only real effect it has on scripts and lua is if multiple mods have the same file (a 'file override') the one from the mod latest in the load order is prioritised
aside from that, load order rarely matters (map load order can matter of course but this is technically a separate system entirely - don't think the order in which you load the actual mods affects anything there)
i've also heard that incorrect order of tile mods can cause some kind of corruption, but i haven't looked into why that might happen (so may or may not be another superstition)
but when you hear things like 'load library mods first' this is mostly nonsense and doesn't affect anything whatsoever
if a mod overrides a file from another mod, then it will require it, which in singleplayer forces the game to put it later in the load order anyway, so it's not a big deal there (though i will always argue that file overrides are unnecessary and just add a new avenue of failure)
so overall the only time you really need to change the load order is if two mods override the same vanilla file - but in most cases this just means they won't be compatible no matter what you do with the load order, so it also doesn't matter much there lol
Hi
i would like to start learning how to make mods for this game, where could i start?
There is no good answer for that question
Any bad answer?
Okay
I would suggest making an item!
https://github.com/FWolfe/Zomboid-Modding-Guide/blob/master/scripts/README.md
Good suggestion
Thank you
This will give you basic concepts and help you get the file structure and such.
Its how I learned, I started by making a cooking mod, which is mostly just items and stuff (its called Rugged Recipes feel free to tear into the code)
Once you get into it, I find just looking at what other people did and looking at the base files for PZ is the Best source.
WILD ASK, but has anyone ever successfully removed a base game skill?
Working on an overhaul and I would love to combine sneaking and lightfooted into one skill.
Is there anyway I can remove Nimble from the Perks object?
if not, would creating my own custom skills overlay that just so happens to forcibly ignore it work?
probably not wise to actually remove it if possible as there'll be java-side queries for it you can't prevent
probably better as you suggest to just get the ui to hide it
I didn't even think of the Java side calls. Thanks for reminding me. Lol. I've been wanting to learn to make the UI windows for a while anyway. Good reason to do it.
Can anyone point me in the right direction on how to make timed actions (I assume thats their name) where the progress bar appears above the player? I tried copying this but nothing happens:
https://github.com/MrBounty/PZ-Mod---Doc/blob/main/How to make a custom timed actions.md
My code: #mod_development message
When you say "nothing happens"
Are you doing this with a context menu? Does the context menu show?
Yeah context menu shows
Ok, when you click it, does it Error out, or just do nothing?
Ok, with the code you posted there, is that the WHOLE code?
Timed actions need a bunch of different entries. I found a blank in a mod, lemme grab it.
Yes it's the whole code
Ok, I found this "BlankAction" in Better Lockpicking by Aiteron
require "TimedActions/ISBaseTimedAction"
EmptyAction = ISBaseTimedAction:derive("EmptyAction")
function EmptyAction:isValid()
return true
end
function EmptyAction:update()
end
function EmptyAction:start()
end
function EmptyAction:stop()
ISBaseTimedAction.stop(self)
end
function EmptyAction:perform()
self.func(self.arg1, self.arg2, self.arg3, self.arg4)
ISBaseTimedAction.perform(self)
end
function EmptyAction:new(character, func, arg1, arg2, arg3, arg4)
local o = {}
setmetatable(o, self)
self.__index = self
o.character = character
o.maxTime = 1
o.func = func
o.arg1 = arg1
o.arg2 = arg2
o.arg3 = arg3
o.arg4 = arg4
return o
end```
What is the path of the script (in case it matters), otherwise thank you so much
\media\lua\client?
media\lua\Client\TimedActions
But the MEAT of your code should be in :perform()
That is what is called when the action actually DOES something
How do I call it tho? with :new()?
local handleOptionClicked = function(player)
MyTimedAction:new(player)
end
ISTimedActionQueue.add(YourAction:new(varb, varb))
That adds a timed action to the Queue
In my case I assume
ISTimedActionQueue.add(MyTimedAction:new(player))
Yep!
It errors
did you add definitions for :start, :perform, etc?
yup
Same code just replaced the line
oh wait I believe I know now
One second
Great it works. The progress bar appears now
Thank you so much
No problem! I just got through learning most of that this last few days.
can anyone give me a quick crash course on how to make a new item that is a reskinned canned food?
ive created some textures
and im using the canned beans code as a base
how do i make it use my own custom texture?
these are the textures ive made
i just need to know how do i like give them to a item
true
i dont really get why it matters to them ill ask people
for the items icons where do i put them?


