#mod_development
1 messages · Page 260 of 1
@digital sail , thanks for the answers, helped a lot!
yeah i just found that out
Please I beg you do not use fucking .x files
I know you do your animations on that shit ass software so okay sure but for anything please fucking stop using .x
The format is deprecated asf

Modern softwares don't even handle this format anymore
yeah
Only that shit ass software which is clearly a fucking malware accepts them
Only reason you'd use it is to open vanilla game animations
Blender is 1000x times better easily simply because you can literally do the same things, it's up to date, there's a massive community behind and it can easily get you a job when you've mastered it
If you've got to put hours in a 3D software, put them in fucking Blender, not that other shit ass software, that requires you TO TYPE THE FUCKING BIBLE TO OPEN IT
Their website isn't even secured mate
And this vidéo is amazing to learn low poly with blender : https://www.youtube.com/watch?v=1jHUY3qoBu8
You have literally thousands of tutorials for Blender and the community has became even more and more efficient for them in the decade that Blender existed
I remember back when I was 17 learning Blender I had no choice but to watch hours of tutorials
Now you can find extremely short videos, that are referenced extremely easily on google even for simple tutorials on things. It's even easier when you have the vocabulary in the field to find those
We even have tutorials for Blender PZ renderings
I was introduced to Blender with this vidéo https://www.youtube.com/watch?v=ePVe9FzuFfQ <3
This is the Blender Institute channel - with advertisement. We are testing if we can get the search hits & money from Youtube this way, instead of the freeloaders here who copy our videos with advertisement enabled.
For our videos without advertisement, please visit the Blender Foundation channel!
https://www.youtube.com/user/BlenderFoundation/
lol i did an autohotkey thing to bypass this long time ago
ik, doesn't make the fucking software less shady
blender is an amazing and rare success story of open source from rags to riches. Though there are many people that will insist that it's complete dogwater compared to things like maya.
Other than Blender I've only used 3ds max in like 2005. To this day Blender UX feels incredibly obtuse, like you need to memorize the 3d art equivalent of moonlight sonata worth of hotkeys to work with any amount of efficiency.
It feels like it's been made by people who use Vi and not, you know, Blender. Who built the hotkey chords and then begrudgingy added UI menu options for it.
GOD I hate maya
what does the ISUI folder for?
I'm trying to make a simple server/admin mod to reset player hunger/thrist but am unsure if I put it in client/server/shared/ or if it needs an ISUI folder
hi, trying to set up itemzed, cant seem to get it to find my mod? its just not showing up as an option and i have no idea how this program works
Not sure if this matters but I wouldn't recommend spaces in mod folder names, mod id or anything that uniquely identifies your mod
Spaces in folder is fine
too late, but it doesnt really matter
workshop condenses it to one word without spaces
when referencing the mod id, i mean
i see
ISUI folder is just a folder to categorise some lua files, the naming isn't special. If you want to make a admin mod, it's best to put most of the logic on the server and then if you want like an admin UI or something, do that on the client and then have the action send a command to the server
ty
mod ids can have spaces actually
you can, in general, put spaces in a lot of things that it feels very weird to put spaces in
If you put spaces in your mod id, I ain't downloading your mod
I agree
What events would work as a OnServerPostLoad and OnServerExit?
OnServerStarted for the first, for the latter... nothing, i'm afraid, if i'm correctly interpreting it as 'event that fires when the server is about to close'
yes, I would like to save a cache
you can use the ModData class to get tables that will be saved and loaded when the save is
hmmm
do you know if PZ is writing in ModData in realtime or waiting for the server to shutdown?
My guess is that it's doing it in realtime, I don't like it too much
it's not realtime but i don't think it's exclusively when the server shuts down either (or else you'd expect to lose the entire session's mod data when the server crashes, which i haven't seen happen)
I'm already done implementing a cache with a JSON library, I'm not ready to throw it away yet :'D
But I guess there's no other choice
there are OnServerStartSaving and OnServerFinishSaving
That could work
those are only fired when the server is manually saved with a /save command
oh
Maybe the server is kicking everybody out before shutting down? Then I can run a function in an OnTick event that calls my save whenever the number of player is decreased to 0.
maybe but i think you're overengineering
global mod data exists for your exact purpose and is straight forward to use
I have basically recoded the entire chat and radio system from PZ, at this point the entire mod is overengineering. :D
You're right though, goodbye JSON.
I keep looking for this information but I can't find it. Anybody know how big, say... West Point map is? I know it's a grid unit is 300x300pixels but I can't find how many grid units x grid units your typical map is.
How many cells it has you mean ?
Yeah cells sorry lol
So how many cells?
Hi all, i want to do a mods like this, should this work or i'm missing something? ty
function updatePlayerVisibilityOnMap(player)
if player:isPvPActive() then
showPlayerOnMap(player)
else
hidePlayerOnMap(player)
end
end
Well you are abstracting a lot of details here like where updatePlayerVisibilityOnMap is being called and what the show/hidePlayerOnMap functions represent but assuming those are all correct, you only need to change your if check because isPvPActive is not a function
if player:isFactionPvp() or player:getCoopPVP() then
Depending on which one you want, or both
yea, i really don't know the correct function names, do you know them? both for pvp state and map visibility, i can't find the lua file related.
well the updatePlayerVisibilityOnMap function is yours and you have to decide where you want to put it.
I am currently trying to find out how the game sets players as known, as all I can see so far is setting ALL of the players as known
I don't think it's possible
UIWorldMap isn't exposed, nor is WorldMapRemotePlayers, so idk
You could probably hack something together and get it to work but not easily I don't think
For context, the game does all of the map updating stuff for players in Java and it's not easily accessible from Lua (and in this case, impossible as far as I can see unless something gets a UIWorldMap)
So I had a weird thing happen where I had been updating a mod in my zomboid/mods folder, and I had been closing the game and reopening it every time I applied a change. It seemed like the changes worked, so I closed it down, then came back a few hours later. Now the updated mod doesn't work at all, and for some reason my debug launch option also doesn't either.
Was I doing that wrong? Is there some other way that works better? I'm just really confused why it worked then and then now it doesn't
probably best to just verify your game files as a start
assuming you are using -debug, you don't have to close game to test changes. Just reload lua in bottom right of main menu :p
Unlike its name, it doesn't just reload only Lua files but all the mods.
It's hard to say what directly caused your game to stop taking applying the debug param, as many things can indirectly affect other things (which is weird to think about)
No idea
Yeah, I already tried to verify files to get -debug to start working again, maybe I'll just have to reinstall zomboid.
I'm still really confused about how my mod changes seemed to run fine, then hours later just didn't. Hopefully using that reload Lua button will make the changes actually apply? Or whatever caused the issue
ty
idk its something you have to figure out yourself because its very complicated to find the actual cause. try removing your mod from the mods folder and see if the debug works fine, then you've isolated it to your mod specifically, etc
Alright, thank you
@oak ginkgo mine didn't either until I added an icon, just place holder I stole it from Moodle Framework
o7
icon has nothing to do with it
in the mod folder
Show the path
yeah no shit
That's absolutely not the mods folder
C:\Users\yourName\Zomboid\mods
That's the usual basic path for it
👌
How can I make a recipe
Hey peeps, I'm trying to make my mod translatable if other languages are chosen. I've added a HWM_DE.txt, do I need a Translations.lua file to apply the translations?
If anyone could help, it would be greatly appreciated 😄
Did you check out a mod that adds a recipe?
no
Your best friend is checking other's work to understand how the game works
Or dig through the java but I don't suggest starting with that lol
What kind of translation are you talking about here ? For item names ? Used for strings inside lua ? For recipes ?
Because in all of these the method is different I believe
For items and recipes... the text that will be shown in the menu. I don't have any messages that pop up
You don't need any lua files then
I thought that I could have all the items and recipe names and such in a single txt file, and replace the name/displayName in the scripts with the translation key
Not sure how translation works exactly for scripts tho
I would suggest checking vanilla script files, find an item or recipe which you know has a translation (or suppose so) and search in the translation files for the word of the display name
I've looked through other mods and can't see a translations.lua file, but in the scripts non of the names match with the translations
Possibly is something like item_displayNameOfTheItem ?
And within displayName = displayNameOfTheItem
I looked at the smokers mod and none of the names are written as the translation key, which is wigging me out
Show an example please
item GWH_Hanksie'sGuitarWallHanger
{
DisplayCategory = Furniture,
DisplayName = GWH_Hanksie'sGuitarWallHanger,
Type = Moveable,
Icon = GWHIcon,
Weight = 0.1,
WorldObjectSprite = HGWH_tiles_0,
}
Would mine look like this?
Smokers mod:
Items_EN = {
Recipe_Open_Pack_Cigarettes = "Open Pack of Cigarettes",
...
}
recipe Open Pack Cigarettes
{
destroy Cigarettes,
Result:SMPack,
Time:30.0,
Category:Smoking,
NeedToBeLearn:false,
CanBeDoneFromFloor:false,
OnGiveXP:NoXP_OnGiveXP,
OnCreate:recipe_OpenPackCigarettes,
StopOnWalk:false,
}
As you see, the names are normal and not linking to the translation key.
recipe Open Pack Cigarettes > Recipe_Open_Pack_Cigarettes
Spaces become _
So the ID of your recipe is basically your ID in the translation file
And it's most likely the same for items
Like I said
item_GWH_Hanksie'sGuitarWallHanger = "...",
so "recipe Open Pack Cigarettes" in the script becomes "Recipe_Open_Pack_Cigarettes", which then gets translated?
Yeah
ok, I'll give that a try. Thanks!
display name isn't used for translation in item names
display name is a weird and frustrating bit of design
you need a display name for translations to work, but it isn't actually used for translation at all, and what you put there is only shown if the translations don't work
in your ItemName_LANG file you'd do```
ItemName_Module.ItemType = "Item Name",
i can't see the module in the script you posted but the itemtype is GWH_Hanksie'sGuitarWallHanger there
oh... ok now I'm completely lost 🫠
I though I could have all the translations (items/recipes) in 1 file GWH_EN.txt, but do I need to have separate items_EN and recipes_EN files?
I feel like I've done everything completely wrong 😩
they need to be separate, the specific filenames you see in the vanilla translation folder are the only ones that work and things need to go in the right ones
this is one of the cases where files with the same name don't override each other if you were worried about that
hmmm... ok. So pretty much the original items and recipes files don't need to change (from before I replaced the names)...?
ItemName_EN {
ItemName_GWH.Hanksie'sGuitarWallHanger = Hanksie Guitar Wall Hanger,
}
item Hanksie'sGuitarWallHanger
{
DisplayCategory = Furniture,
DisplayName = Hanksie Guitar Wall Hanger,
Type = Moveable,
Icon = GWHIcon,
Weight = 0.1,
WorldObjectSprite = HGWH_tiles_0,
}
Like this? The file name is ItemName_EN.txt
there's a couple syntax errors:```
ItemName_EN = {
ItemName_GWH.Hanksie'sGuitarWallHanger = "Hanksie Guitar Wall Hanger",
}
Does anyone know if there is a mod that basically overhauls the professions to giving you boost to a set of skills that would make sense for said profession and make all other skills level at a very low rate? For example a Mechanic would have traits such as short blunt, mechanics, electrical, and metal working. And these skills would double or triple the rate they work but all other would be cut down to half speed or so. (Except for str and fit for obvious reasons) I'm looking for a playthrough with friends that makes it to where we all rely on each other instead of have one or two jack of all trades that do everything. If anyone knows a mod like this or as close to this as possible please pm me the mod.
@novel condor do you know about our dear god loops ?
loopy doopy loops ?
Do you know about loops @novel condor 
Holy jesus
Please use my framework I beg you, for your own sanity
Im developing a SvelteKit frontend for Zomboid Servers with built in RCON commands, admin commands, mod list editing,whitelisting, etc...

WIP
👀
#mod_development
this chat is for people who are developing mods. to talk about game assets and code etc
#mod_support
this if for people asking stuff about mods
how to use them
how to fix them
bug report
if theres such mod etc...
local original_ISRipClothing_perform = ISRipClothing.perform;
---Overwriting ISRipClothing:perform() here to insert ETW logic catching player ripping items apart
function ISRipClothing:perform()
print("ETW Logger | caught ISRipClothing:perform()")
original_ISRipClothing_perform(self);
local item = self.item
if ETWCommonLogicChecks.TailorShouldExecute() and instanceof(item, "Clothing") then
---@cast item Clothing
print("ETW Logger | ISRipClothing:perform(): item:getName() " .. item:getName())
end
end```
I'm getting 0 prints when ripping clothing
am I missing something?
Like i'm not getting even initial print that I'm inside the function
I'm overwriting a bunch of other fucntions in exactly same way

try
local original_ISRipClothing_perform = ISRipClothing.perform;
---Overwriting ISRipClothing:perform() here to insert ETW logic catching player ripping items apart
Events.OnGameStart.Add(function()
function ISRipClothing:perform()
print("ETW Logger | caught ISRipClothing:perform()")
original_ISRipClothing_perform(self);
local item = self.item
if ETWCommonLogicChecks.TailorShouldExecute() and instanceof(item, "Clothing") then
---@cast item Clothing
print("ETW Logger | ISRipClothing:perform(): item:getName() " .. item:getName())
end
end
end)
overwriting like 5 vanilla functions and they always worked as intended, but rip clothing is being pepeg for some reason
nope, still no print

I'm creating a mod that allows a minimal chance of healing from the zombie infection. Now if you are lucky and heal I would like to give some malus to the PG I would like to make sure that he loses 1 level to strength and 1 to physical form.
do you have a function to suggest that allows the lowering of 1 level to the 2 skills?
local pl = getPlayer()
local perkType = PerkFactory.getPerk(Perks.Strength)
--pl:getXp():setXPToLevel(perkType, 0);
pl:LoseLevel(perkType);
SyncXp(pl)
maybe you want to try it without using syntax sugar like
function ISRipClothing.perform(self)
-- do stuff
end
Check the logs. is your ISRipClothing.lua (or any file containing your overloading method) loaded after the game ISRipClothing.lua?
I don't remember how I got there, but I ended up hooking into Recipe.OnCreate.RipClothing and triggering an event. Probably not the best way to do it but I'm dumb and impatient.
local ripThatShit = Recipe.OnCreate.RipClothing
function Recipe.OnCreate.RipClothing(items, result, player, selectedItem)
triggerEvent("rippinShit", player)
ripThatShit(items, result, player, selectedItem)
end
oh wait yeah
that timed action isn't even used, it's a recipe
i remember seeing this before
was suspecting it has some fuckery to do with recipes

you really have to fight against the game to make anything work :'D
it's hard enough fighting against my typos
REAL
got a short example of triggerEvent?
or is it just a function?
there's triggerEvent method so not sure how's what
Javadoc Project Zomboid Modding API declaration: package: zombie.Lua, class: LuaEventManager
they're using the global
i'd say it's not wise to use events from lua in most cases, here just trigger your code directly
local original_Recipe_OnCreate_RipClothing = Recipe.OnCreate.RipClothing
function Recipe.OnCreate.RipClothing(items, result, player, selectedItem)
---random shit here
original_Recipe_OnCreate_RipClothing(items, result, player, selectedItem);
end
would this jsut work?
Like isnt it fired on creating recipes
so it wont work on doing the rippin
LuaEventManager.AddEvent("rippinShit");
Events.rippinShit.Add(
function(player)
player:Say("Rippin that shit")
end
)
listen to albion though
Maybe there's a better way of doing this. What I'm trying to do is catch what player ripping
Plan is to track amount of unique items ripped
you should be able to grab "items" and plug it into wherever you keep track of that
also, just to justify my bad coding, I used an event because Recipe.OnCreate.RipClothing is server and I wanted to get it back to client without too much work
oh I can send shit between client and server, thatnks to albion help I got the routing going and can send stugff back and forward without problem
mod data is prol the way to go. and albion is god/dess
yep
so Recipe.OnCreate.RipClothing(items, result, player, selectedItem) is fired on server, right?
it's in the server folder
I don't remember exactly how I got to what I did, but I don't think it worked in the client folder
ok cheers, I'll go tinker
idk, I have covid brain so I'm dumber than usual
plan is to overwrite it on server side and send command to client to update moddata
local original_Recipe_OnCreate_RipClothing = Recipe.OnCreate.RipClothing;
---comment
---@param items any
---@param result any
---@param player any
---@param selectedItem any
function Recipe.OnCreate.RipClothing(items, result, player, selectedItem)
local item = items:get(0)
---@cast item Clothing
print("ETW Logger | Recipe.OnCreate.RipClothing() item: " .. item:getName());
original_Recipe_OnCreate_RipClothing(items, result, player, selectedItem);
end
LOG : General , 1725588017791> ETW Logger | Recipe.OnCreate.RipClothing() item: Knee-length Skirt
works
I meant to send this one
but didnt find it in gifs 
what happens if I sendServerCommand in sp?

oh wait nvm there's a better way to do it
I don't think it does anything in sp?
they're just kinda slow and you don't need them
their purpose is primarily to trigger lua code from java, you can already trigger lua from lua
sometimes the event structure is desirable though - reimplementing them in lua is pretty easy and faster, but events are actually one of the things that suffer least from java overhead, so it's not that much worse to just use regular events
hi i need some help, my issue right now is that items is nil when trying to open a context menu for an item, my goal is to make a submod of the roleplay descriptors that allow you to craft an exclaim, but also allow the player to change the colour
-- Debugging information
print("CreateColorChangeMenu called")
print("Player:", player)
print("Context:", context)
print("World Objects:", worldobjects)
print("Item:", items)
if not items then
print("Item is nil")
return
end
-- Check if the item is one of the Exclamation items
local itemType = item:getType()
if itemType == "ExclamationGreen" or
itemType == "ExclamationRed" or
itemType == "ExclamationOrange" or
itemType == "ExclamationYellow" or
itemType == "ExclamationBlue" or
itemType == "ExclamationPink" or
itemType == "ExclamationPurple" or
itemType == "ExclamationWhite" or
itemType == "ExclamationGray" or
itemType == "ExclamationBlack" then
local submenu = context:addOption("Change Color")
local subMenuContext = ISContextMenu:getNew(context)
context:addSubMenu(submenu, subMenuContext)
-- Add options for each color
subMenuContext:addOption("Green", worldobjects, function()
player:getInventory():AddItem("RPDescriptors.ExclamationGreen")
player:getInventory():Remove(items)
end)
subMenuContext:addOption("Red", worldobjects, function()
player:getInventory():AddItem("RPDescriptors.ExclamationRed")
player:getInventory():Remove(items)
end)
subMenuContext:addOption("Orange", worldobjects, function()
player:getInventory():AddItem("RPDescriptors.ExclamationOrange")
player:getInventory():Remove(items)
end)
subMenuContext:addOption("Yellow", worldobjects, function()
player:getInventory():AddItem("RPDescriptors.ExclamationYellow")
player:getInventory():Remove(items)
end)
subMenuContext:addOption("Blue", worldobjects, function()
player:getInventory():AddItem("RPDescriptors.ExclamationBlue")
player:getInventory():Remove(items)
end)
subMenuContext:addOption("Pink", worldobjects, function()
player:getInventory():AddItem("RPDescriptors.ExclamationPink")
player:getInventory():Remove(items)
end)
subMenuContext:addOption("Purple", worldobjects, function()
player:getInventory():AddItem("RPDescriptors.ExclamationPurple")
player:getInventory():Remove(items)
end)
subMenuContext:addOption("White", worldobjects, function()
player:getInventory():AddItem("RPDescriptors.ExclamationWhite")
player:getInventory():Remove(items)
end)
subMenuContext:addOption("Gray", worldobjects, function()
player:getInventory():AddItem("RPDescriptors.ExclamationGray")
player:getInventory():Remove(items)
end)
subMenuContext:addOption("Black", worldobjects, function()
player:getInventory():AddItem("RPDescriptors.ExclamationBlack")
player:getInventory():Remove(items)
end)
end
end
-- Hook into the context menu
Events.OnFillInventoryObjectContextMenu.Add(function(player, context, worldobjects, items)
print("OnFillInventoryObjectContextMenu triggered")
CreateColorChangeMenu(player, context, worldobjects, items)
end)
is worldobjects passed with that event?
this is on server
local original_Recipe_OnCreate_RipClothing = Recipe.OnCreate.RipClothing;
---comment
---@param items any
---@param result any
---@param player IsoPlayer
---@param selectedItem any
function Recipe.OnCreate.RipClothing(items, result, player, selectedItem)
local item = items:get(0)
---@cast item Clothing
print("ETW Logger | Recipe.OnCreate.RipClothing() item: " .. item:getName());
if not isClient() and not isServer() then
ETWCommonFunctions.addClothingToUniqueRippedClothingList(player, item);
else
print("ETW Logger | Recipe.OnCreate.RipClothing() sending command");
local serverArgs = { item = item };
sendServerCommand(player, "ETW", "addClothingToUniqueRippedClothingList", serverArgs)
end
original_Recipe_OnCreate_RipClothing(items, result, player, selectedItem);
end```
this is on client
```lua
Commands.ETW.addClothingToUniqueRippedClothingList = function(args)
local player = getPlayer();
local modData = player:getModData().EvolvingTraitsWorld;
---@cast modData EvolvingTraitsWorldModData
print("ETW Logger | Commands.ETW.addClothingToUniqueRippedClothingList: args.item: " .. args.item:getName());
end
Commands.OnServerCommand = function(module, command, args)
if Commands[module] and Commands[module][command] then
local argStr = ''
for k, v in pairs(args) do argStr = argStr .. ' ' .. k .. '=' .. tostring(v) end;
print('received ' .. module .. ' ' .. command .. ' ' .. argStr)
Commands[module][command](args)
end
end
Events.OnServerCommand.Add(Commands.OnServerCommand)
when I do repairs and send command
sendServerCommand(player, "ETW", "carRepairCheck", serverArgs) it prints
received ETW carRepairCheck repairedPercentage=2
and yet when I rip clothes it doesnt print receiving command
ETW Logger | Recipe.OnCreate.RipClothing() sending command```
any ideas?
oh currently testing on locally hosted server (from main menu)
but if repairs sending commands work then ripping should to, no?
does it crash though?
I mean among the technical reasons it can fail, there aren't really any that seem like the culprit. sendServerCommand can fail if it's not running on a server, or if IsoPlayer doesn't have associated network address. OnServerCommand may not receive the command if it was sent to a different player. Your handler may not call the function if the module or command wasn't exactly matching.
There is one additional failure mode of sendServerCommand and that's if the table cannot be serialized, but there's an exception for InventoryItem specifically and it gets serialized as a special case, but nothing else except basic Lua types can be serialized.
(by the way serializing the whole object is a huge waste of network traffic if you just need its name)
is there a way to make custom moodles?
thank you forgot this exists
doesn't help that there's not much sound effects to reflect moodle status
thats a mod I wanted to make for a while before I got busy lol
that would for sure be a great mod to add some depth
like stomach gurggling for qeasy and giggling for high and drunk
i guess if you just found free sound effects it wouldn't take very long
yeah
i'm working on a galaxy gas mod rn
for the meme
already made a Zyn knock off mod, now im making another drug smh
can you provide me?
i love alternatives to cigs
thanks bro
if you wanna recommend flavors im open to suggestions
yeah but they wont spawn in already loaded loot locations
you'd have to visit an area you haven't been (houses, gas stations etc)
yeah it's a bit op with -20 i believe but it's meant to simulate how a snus pouch lasts up to an hour or more with how strong some are
do they spawn on zeds>
i keep forgetting to add that but I could do it easily
i will tomorrow since you just reminded me
yeah that would be badass
working on a way to add a double decker option but for some reason im having trouble
yeah for sure, i already had them kinda high originally but i think i got em dialed in now
https://steamcommunity.com/sharedfiles/filedetails/?id=3307580100
yeah if this counts lmao
is making mods hard?
simplest thing ever but useful if you need a lot of stones and don't find a lot when foraging. funny too cause once i made it, my troubles with never finding stones went away
im thinking if you make your own mods ittl be better
it can be
depending on what ur doing
modders have done a lot of good documentation and stuff so at least there's a decent bit of help in that regard
It depends on what you want to do
i wanna do special traits or something
pretty sure custom traits are simple enough
like traits with actual mechanics
Yeah just check other mods how they are done
not just some +1 free skills
wdym by mechanics?
like it has a feature to it
what's an example you have in mind
like schizophrenia trait mod
ohhhhhhh yeah i get you
ye
haven't done trait stuff before but i don't think that would be super hard
like Josko said, looking at mods similar to what you wanna make is super helpful
long as you're not just ripping code without permission
right
Thing is I have exactly same command that works
new images for the modelo mod, not really a pixel artist just doing this for fun any thoughts?
Pretty good
they look better when not poopy resolution I swear
Yeah they aren't supposed to be high resolution for icons, that's good
just gotta make a six pack now and we're done
what's your reference ?
Someone know if we can create a mod who will be useful for open bag in container ? Or we cant do that in the game ?
you should be able to do this yeah
wdym ?
open container inside a container
Check those out
Tho Inventory Tetris is a bit more than that
breddy kool
But Nested Containers work great
inventory tetris dont do that i think im talking about open a Bag in a container like a car trunk
IT does it ....
daam its new ?
You can double click containers inside other containers to open them
last time i played with inventory tetris was a year ago
Pretty sure it was always a thing
im just dumb thanks ;)
Anyway Nested Container kind of does that but it's constantly opened, shows in the container bar
np
Got a question for the people here. I have an idea for a very simple mod that I want to implent. This mod uses what I believe to be, stock assets(The friendship braclet).
My question is this: How does zomboid "Change" items? My mod idea is to essentially use/duplicate the "Friendship Bracelet" into a Paracord braclet, that gives twine. Simple mod. You have 10 units of twine, and at least 2 tailoring, you can turn twine into a wearable "paracord" bracelet. And anyone can turn it from a braclet back into twine. Wearable on either wrist(preferably the non-watch).
I suppose my question is what mods should I look at that does this kind of behavior, to try and duplicate it?
Wait, I think I found one: AUthenticz
Paracord ?
Paracord, also known as 550 cord, is a lightweight nylon cord comprised of 9 nylon strands, each caple of holding about 80 lbs each. It's called 550 cord because it's rated to hold up to 550 lbs. It's often used in survival task, as it is a lightweight, synthetic(And therefore doesn't rot) cordage used for everything from making fishing traps to shoe laces.
The closest in-game thing we have, is twine.
Why not use directly twine or just make a new item which you can find ?
That's exactly what I'm doing,.
But you want to transform twine into paracord ?
No, Paracord was just what it is IRL.
A placeholder name, as the case may be
{
Bracelet_RightFriendshipTINT,
SkillRequired:Tailoring=2
Result:Twine=2,
Time:50.0,
}```
This is what I got so far.
I'm alos going to work on a few new modified items.
Basicaly, there's a school of thought, isntead of having two things on both wrist(A watch and a braclet), you instead wrap paracord(Or in this case, twine), around the watchband to kill two birds with one stone. This Also allows you to store items in the wrappings of the paracord. Items such as a Paperclip. That you should always have on you.
So, The item i'm making will require the use of a digital watch(Black or Red), 10 units of twine, and a paperclip and/or nail. I'm also thinking about doing one with fishing line, and just make it more efficent since fishing line has less uses than twine.
@bright fog Makes sense?
Alright
anyone knows how to use setScratchDefense()
for items
its not working for me
im only seeing the bodypart version not the clothing version
if you made a 3d model of this, and then saved a pic of it at this angle for an icon, it would look a lot better as the static icon than the pixel art
galaxy gas model + texture pretty much done now
time to start on the code
Hey have you guys run into issues trying to use isWallTo()? I've been calling it on an instance of IsoGridSquare but the error logs are saying it doesn't exist, the square does though
Is it because it's being called from a nested function that there could be data integrity issues?
what error are you getting specifically? tried to call nil?
can you show your code?
your error is on a previous line
for c in cardinals do cardinals is not an iterator function
you likely meant for i, c in ipairs(cardinals) do
oh yeah i forgot lua needs that thanks
thing is ill never do 3D modelling for my mods as they are for memes
i get that, but i still make 3d models for mine even tho they're memes
yeah but effort
snus and galaxy gas but i still want it to be somewhat quality u feel me
against the point
I dont want quality tbh I just be making the mods for me you feel me?
i need to post to workshop so friends can use them in server tho
fair enough, if you wanted to for modelos tho u could prolly just go into the game files and reskin the existing beers
like ive used blender before done the donut and all that
true
if u want actually i could make the texture for u
I mean half the code already uses the default beer
not gonna say no id just need to pop the texture in the files do what you want
mods are practically open source so
bet ill find the original model and texture and reskin it and send it to ya
alr shouldn't take too long
right sick Ill do the distributions after a shower and upload this to workshop to show you
hell yeah i'll add it to my server
citrus pack comes with all my mods maybe ill drop a seperated version thats just modelos
to my knowledge there isn't an existing modelo mod so you could be the first if you uploaded it independently
bet
@sudden kestrel
made a basic kinda shit carrier for them if you'd wanna use this to add 6 packs
if u wanna use it lmk and i'll make a texture for it
prolly shoulda put this in #modeling but oh well
ngl I dont know how to make world textures work
think I got it, put it in models_X, WorldItems
trial and error chat we'll get em
yeah nah i got that but its the script file
which script?
model textures go in textures\WorldItems btw idk if you know this as well
bro made zyns
imma drop it quickly maybe you can spot my error
bet
Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).
couldnt send the mod file so i put it into a drive
Hello guys, I have a question please, Is it possible to create a recipe that need multiples items to fix an item ? I mean, for example, I would like that to repair an axe that would need blowtorch, scrap metal and welding rods. But no matter what I try, it's impossible to add a second Item. Blowtorch and scrap metal is ok, but i can't add another component.
Anyone could tell me if it's possible ? And if yes, how ? Thanks
@sudden kestrel
oh my fault lmao
yessir this is very possible with a crafting recipe
gimme 1 sec
At the moment, my code section is like this for the axe
{
Require : Axe,
GlobalItem : BlowTorch;
Fixer : ScrapMetal; MetalWelding=5,
}```
It works pretty well, but idk how to add another needed component
module FixAxe
{
recipe Fix Axe
{
BlowTorch=1,
ScrapMetal=1,
WeldingRods=1,
Result:AxeName,
Time:100.0,
Category:Crafting,
}
}
Thank you, so I need to create a module for each item I would like to fix this way ?
yeah pretty much
Dang
it can all be in the same file though
Yeah I could name it module FixMetal for example and put all the item I want to be fixed this way inside ?
So I guess it's impossible to do it with the "fix" system of the game
module FixFireAxe
{
recipe Fix FireAxe
{
FireAxe=1
BlowTorch=1,
ScrapMetal=1,
WeldingRods=1,
Result:FireAxe,
Time:100.0,
Category:Crafting,
}
}
module FixWoodAxe
{
recipe Fix WoodAxe
{
WoodAxe=1
BlowTorch=1,
ScrapMetal=1,
WeldingRods=1,
Result:WoodAxe,
Time:100.0,
Category:Crafting,
}
}
ngl I'm just not sure but I'd assume it is possible
i just don't know how cause i've never done that
@sudden kestrel what was wrong w ur mod again?
Alright, thanks for your help anyway, I appreciate 😄
looking thru those files rn
the model is still just a png ingame
@junior steeple ofc bro np
trying to get it to be the 3d model
you have no models_x folder
true
inside media create models_x\WorldItems
3d obj files go inside worlditems
you put your .fbx inside of textures\WorldItems
that's where the texture for your 3d model goes
item static icons go just inside textures
ur good bro i was doing all that for the first time just about a month ago
still unfortunately
update that drive with where u have ur files rn
ight
1 sec
module JYTSnusMod
{
model Original
{
mesh = WorldItems/jyttin,
texture = WorldItems/original,
scale = 0.35,
}
model StaticOriginal
{
mesh = WorldItems/staticjyttin,
texture = WorldItems/original,
scale = 0.35,
}```
duplicate the model, name it staticModeloBottle, put it in models_x\WorldItems along with the other one.
in your CVModelo_Model.txt (forgot what u named it cause u deleted it lol), add another model named StaticModelo with the mesh being your staticModeloBottle, texture is the same name.
in your items.txt file, do:
```lua
StaticModel = StaticModelo
WorldStaticModel = Modelo
Icon = whatever the pixel art file name is
@sudden kestrel
you got me lowkey stressed out lmao imma try and repost to google drives
LMFAO my bad bro i tried to explain that as simple as possible
if u need me to hop in a VC to explain i will
i agree
pay me one million dollars to implement this and then fix it when build 42 comes out
currently trying to rally my PZ friendgroup behind this
im geeking so hard
@sudden kestrel just join the vc i just made bro lmfao
Guys, who can help me add my custom car in game, please?
Nobody likes this disgusting clip art style and yet every corporation is using it front and center. It's like selling customer data after they opt out of it is not enough, they want to see how much straight up disrespect to their customers they can get away with.
(bonus points for selling your data being default from which you must opt out)
(bonus points x2 for opt out page being locked behind EULA which permits them to sell your data as soon as you click OK, and they sell your data anyway if you never accepted the EULA)
bro
is client code loaded first? compared to server
.luas that is
actually doesnt matter, it works so whatever
although would be nice if someone could explain how and why this works
this is server function
local original_Recipe_OnCreate_RipClothing = Recipe.OnCreate.RipClothing;
---comment
---@param items any
---@param result any
---@param player IsoPlayer
---@param selectedItem any
function Recipe.OnCreate.RipClothing(items, result, player, selectedItem)
local item = items:get(0)
---@cast item Clothing
print("ETW Logger | Recipe.OnCreate.RipClothing() item: " .. item:getName());
ETWCommonFunctions.addClothingToUniqueRippedClothingList(player, item);
original_Recipe_OnCreate_RipClothing(items, result, player, selectedItem);
end```
this is client lua
```lua
---@param player IsoPlayer
---@param item Clothing
function ETWCommonFunctions.addClothingToUniqueRippedClothingList(player, item)
print("ETW Logger | ETWCommonFunctions.addClothingToUniqueRippedClothingList() item: " .. item:getName());
end
this is print of my friend console who joined on my local server as client
ETW Logger | ETWCommonFunctions.addClothingToUniqueRippedClothingList() item: Knee-length Skirt
I thought Recipe.OnCreate.RipClothing is fired on server but how come then it prints in his console
I am confusion
separate question, when do I even need to use include in luas. Like arent all files loaded before player joins server/save anyway? so if I have a func a in ddd.lua and also have nnn.lua and use func a in nnn.lua won't it work anyway?
I use require in lua to include local functions from other files. there might be other reasons. Lua is not my jam yet
A function which is local in a file can't be accessed anywhere else than in this file
Your only way to access functions that are stored locally is to store them in a table, and return at the end of the file this table, then requiring this file and writing inside a variable, you'll retrieve the table
That's called a module
-- file1.lua
local function testFunction()
-- do stuff
end
local module = {}
module.yourFunction = function()
-- do stuff
end
-- end of file
return module
-- file2.lua
-- can't use testFunction in anyway
local module = require("file1")
-- use the function
module.yourFunction()
If a function is global, you can access it anywhere too, as long as you make sure the file it's from is loaded first
Best way to do that is requiring the file
-- file1.lua
function globalFunction()
-- do stuff
end
-- file2.lua
require("file1")
globalFunction()
local module = require("file1")
There's also the folder in which the lua file is in which is important, tho ngl I'm too lazy to explain it rn lol
Does anyone know, are sandbox settings only stored on the server side? I try to pull the same variables from the sandbox settings and on the server side it shows the choices made but on the client side it shows the default settings on the same variables...
so working on dynamic radio stations and the variable is pulled like this and shows in the log when it's pulled.
local TMRChannel1 = SandboxVars.TrueMusicRadio.TMRChannel1
when does this code run?
LOG : General , 1725734110735> scriptmanager = zombie.radio.scripting.RadioScriptManager@5f0ed174, isNewGame = true
LOG : General , 1725734110735> name = True Music Radio, freq = 94000, cat = Radio, uuid = 94000
LOG : General , 1725734110736> name = True Music Radio, freq = 95200, cat = Radio, uuid = 95200
LOG : General , 1725734110737> name = True Music Radio, freq = 95400, cat = Radio, uuid = 95400
LOG : General , 1725734110737> name = True Music Radio, freq = 95600, cat = Radio, uuid = 95600
LOG : General , 1725734110737> name = True Music Radio, freq = 94800, cat = Radio, uuid = 94800
LOG : General , 1725734110737> name = Automated Emergency Broadcast System, freq = 92200, cat = Emergency, uuid = EMRG-711984
LOG : General , 1725734110737> Found radio channel: True Music Radio, freq = 94000, freqcheck = 94000, multi = 1
LOG : General , 1725734110738> Found radio channel: True Music Radio, freq = 95200, freqcheck = 95200, multi = 1
LOG : General , 1725734110738> Found radio channel: True Music Radio, freq = 95400, freqcheck = 95400, multi = 1
LOG : General , 1725734110738> Found radio channel: True Music Radio, freq = 95600, freqcheck = 95600, multi = 1
LOG : General , 1725734110738> Found radio channel: True Music Radio, freq = 94800, freqcheck = 94800, multi = 1
LOG : General , 1725734110738> Found radio channel: Automated Emergency Broadcast System, freq = EMRG-711984, freqcheck = 92200, multi = 1
so it initially runs when the server starts up and adds the radio channels
so not on any event?
OnLoadRadioScripts
it appears correct at that stage
then later I am trying to pull the same variables when turning on and off radios and it shows the default values on the client side
local TMRChannel1 = SandboxVars.TrueMusicRadio.TMRChannel1
during the toggleonoff
print("Channel1: " .. TMRChannel1)
print("Channel2: " .. TMRChannel2)
print("Channel3: " .. TMRChannel3)
print("Channel4: " .. TMRChannel4)
print("Channel5: " .. TMRChannel5)
LOG : General , 1725734156920> Channel1: 94000
LOG : General , 1725734156921> Channel2: 94200
LOG : General , 1725734156921> Channel3: 94400
LOG : General , 1725734156922> Channel4: 94600
LOG : General , 1725734156922> Channel5: 94800
I have used sandbox settings and was able to pull the setting from both sides without issues
this is something new
so what ends up happening is I get the new stations on the radios but the music tries to send it to the defaults.
I just assumed that the sandbox settings were available to both clients and server, especially on a solo game.
there isn't a separate server at all in singleplayer
so wierd
if you're having this issue in singleplayer then something is very wrong
generally though, sandbox settings are synchronised and something is wrong here
at least I know something it wrong, thank you 🙂 Maybe I can trick it into pushing the variables on during the radio process.
if I change the defaults it works on all the frequencies that are open, so its not an issue with the channels. just the data being passed on from the sandbox later in the game

This question makes a lot of sense if you haven't been introduced to the living scope of Lua variables. By default any function or variable you declare in Lua is global. That means you do not need to use require to access it from any other file since all files are loaded in a batch in PZ.
function ThisFunctionIsInTheGlobalScope()
end
ThisVariableIsInTheGlobalScope = 1
However that's considered bad practice and it can make it hard for you to know what variable contains what, or remember what function is supposed to be called from outside a file or not.
So you should use the keyword local any time you declare a function (not a method) or a variable, unless you explicitly want it to be global (very unlikely).
local function ThisFunctionIsLocalToTheFile()
end
local ThisVariableIsLocalToTheFile = 1
Whenever you want to expose a variable from your file to any other file you should return it at the end of the file.
local MyFileObj = {}
function MyFileObj.method()
end
return MyFileObj
And then get it from another file where you need it:
local MyFileObj = require('path/to/MyFileObj')
MyFileObj.method()
The rule to remember when declaring a variable or function is : always use local.
I figured it out, thank you. Instead of pulling the setting to a variable, I started pulling it each time its called and that fixed the issue. It must have been pulling that variable before it was updated.
New update available for my game manager made for PZ. Check it out, any questions fire away. https://steamcommunity.com/sharedfiles/filedetails/?id=3320238921
Image of my UK themed map ft. a chippy
10/10 realism 🙏
Is this done and live? Looks sick
Still in the process of making it, It's going to be a pretty small map for the time being, just a small UK village
I'm looking at most recent workshop uploads and something like 50% of it is copyrighted music. That looks like a legal disaster waiting to happen.
It won't
not to mod makers
Ppl been putting copyrighted stuff in mods for decades
nor to IS
But to steam it might. PZ's workshop right now is an equivalent of a pirate mp3 repository.
Hopefully if (when) they recieve legal notice they'll just bulk wipe everything that has to do with true music and that'd be that. But it might actually result in PZ workshop getting closed. Big media takes piracy very seriously.
That's so much speculation that I can't even asnwer that
We all know what happened to napster.
And no the site doesnt' have to be dedicated to piracy, individual instances of illegaly distributing copyrighted music also count.
Like you said usually nothing happens, because usually nobody cares.
Even Nintendo doesn't goes after individual romhacks with small playerbase.
But PZ isn't exactly small and Steam Workshop isn't exactly your basement server website. Which is why the way I see it, it's a legal disaster waiting to happen.
I think you're coping
i'll just mark it down in case it happens, so you can answer to the fact and not the speculation
Deal 
nah man "that's a lof of copyrighted music being uploaded" is an observation and "this is totally fine nothing can possibly go wrong" is cope
I mean you said that they will recieve lagal notice
I 
I dont think lables care enough tbh
to bother with it
Well with entities like Steam and Project Zomboid it's a matter of time. What happens as a result is the question. "Nothing" is not one of possible answers.
True, just like it happened in OSU, where millions of ppl share songs/beatmaps whatever they are called
Except those are still shared
I think there's 0% chance that OSU didn't have to have the talk with their lawyers.
No actually. Steam might.
PZ doesn't have anything to do with what mods people make for it.
But Steam has everything to do that's uploaded and distributed through its servers.
Neigher does steam
When you upload to steam you confirm that you ahve legal right to upload the files you uploading
so what if you upload Judas Priest album and click "I own the copyrights for it" that means it's all fine? lmao
No it means that its not steam problem if label sends them DMCA
it's nothing unique to pz
the entire steam workshop is a hub for redistributed copyrighted content
steam will shut down your mod and if needed forward legal documents to you
always has been
if you think steam will get in legal trouble for its dumb users uploads you're wrong
there are pages of legal documents that you accept by using workshop
that clean steam hands
I mean duh. The entire reason DMCA exists is so platforms that allow uploading of content get excused from being legally responsible for the fact of uploading.
"steam might get in trouble"
"duh, ofc steam will not get in trouble"
?
But DMCA is not a legal defense tool. It's a legal attack tool.
Without DMCA you have to win in court to do anything. With DMCA you just issue the notice and the website must instantly comply lest they want to go to the court. But you can skip DMCA entirely if you so choose.
you are right, multi-billion company is gonna get in trouble for 20yo modder from Moldovia uploading Slayer album in PZ

Legal negotiations started over less haha.
True, PZ is first game that has copyrighted music on workshop, so obviously now that this is the first precedent Steam will get in trouble /s

It's on the energy spectrum of quantum legal responsibility. Depending on where you fall on it, there are different odds of anything happening.
And it goes from 0 to 100 instantly, there isn't gradual transition.
Well the entire counter-argument is basically an appeal to.. what it's called now? It's not appeal to incredulity exactly.
No argument, you are right
We know it does happen, but you argue that there were N cases where it didn't happen (yet) so in here this also wouldn't happen.
Dude please. The meaning of this is "No argument, you are wrong" and that's honestly pretty disrespectful.
No, I mean I withdraw whatever I said
You are right
Gg
Steam will get in trouble cuz of copyrighted music in PZ workshop

Nah that's not how it works.
You withdrew by making a punctuation that you were unquestionably 100% correct all along, by making an ironical opposite statement.
That is literally what you saying
Everything one says is literally what he says. 😛
Also, water is wet. More news at 11.
Anyway I didn't say you were wrong on that. It is all factual.
So when you say that steam will get in trouble it's ok but when I say it's suddenly ridiculous?
I say it might get in trouble, by which I mean it might get a letter from some lawyers. And then what happens is hopefully (probably) just mass take down.
I'm only challenging here the assertion that, within margin of astronomical bad luck, it will absolutely never happen. Because it did happen in the past, to different people over variety of similar reasons.
I mean it's mostly Nintendo's shenanigans. But still.
Like a couple of mods might get taken down. That's all that can happen
Steam will not be monitoring pz workshop
If you correct that to *probably will then that'd be on point.
IS won't be monitoring pz workshop
Everything will be exactly the same
And you know why? Because ppl been uploading copyrighted content on workshop for more than a decade, and guess what, it's still there and steam doesn't enforce non-copyrighted content and game devs don't enforce non-copyrighted content, and you know why? Because nobody cares enough to have someone checking thousands of new mods daily
So ye
Good luck with your assumption that suddenly things will change
Or steam will suffer
Or content will be moderated
Youtube cares to chech every single video. Not manually of course. Steam doesn't do it because it has the excuse of not having the technology.
I don't care why steam doesn't do it. Steam will not get in trouble. Few mods might get taken down. You're free to believe unrealistic things
The one thing I can guarantee 100% is that things will get worse over time. At some point in the future, Steam will moderate content using AI, if it doesn't implodes before that point. The others will take it's place like Epic Store or what other Chinese platform is there, and they will do the moderation instead.
Aforementioned YouTube didn't used to have BPD-suffering AI as the principial comment moderator. Now randomly vanishing youtube comments are the norm.
Is there a way to remove pyrophobia from the burn ward patient trait ?
Youtube BTW is in a special place regarding copyrighted music specifically. It struck mostly a blanket deal where it's a publisher for that music, and most of the ad proceedings go towards copyright holders.
it's from a mod, right? Depending how it's implemented, the difficulty is between piece of cake and almost impossible.
yea its from More Traits
step 1 is to dig into that mod source code and see how exactly ward patient is implemented
i imagine there's probably a function that checks for pyrophobia conditions and manually applies debuffs
i also imagine it's embedded inside a bigger all-encompassing traits processing function, but this might not be the case
if it's all contained within a single function, and that function is global, then you can remove this function from all events that use it
it'll simply never run so debuffs will never apply
hmm
i found the code that makes me panic and stuff near fire
but i don't think it has the code that makes me unaable to use fire items
can i post the codee here ? It's a local function
oh wait you meant remove pyrophobia trait from ward patient profession
yeah
well that one i'm not sure but you can probably figure out easily enouhg from checking professions code
its a trait tho
it must add it manually at some point
I think this one is only for the panic and stress when near fire
ig being unable to use fire items is somewhere else
yeah you probably need to look in file that defines professions
and search for pyrophobia
ahhahahah
i found it
it was in an on equip local function
seems like he removed each fire type item manually
does anyone know what this does ?
that's the trait itself, you need to look for profession that adds the trait to your character
isn't profession stuff like officer and fire ranger ?
burn ward patient is just a negative trait
well i'm not using that mod so clear and literal communication of these things is necessary
if "pyrophobia" isn't a trait and "ward patient" isn't a profession then we gonna need to start over
oki
Burn ward patient is a negative trait and it doesn't explicitly state it gives me pyrophobia. But it does make me unable to use fire items like molotov and makes me panic/stress near fire.
so pyrophobia is just what you call the effect of being unable to use fire items and being stressed of fire
yup
allright
so you want to remove just inability to use fire items?
yeah
you need to make a function like this but without hte hightlighted text, and replace the original with it
or you can just change the effect to increasing stress to max level idk
either way since this is embedded inside an encompassing function, you need to override the entire encompassing function
The upper part of the function is for other traits so I'll probably only need to remove the bottom part
dam no indentation in .txt
yeah basically copy and paste the whole thing into your mod file and edit out the bad part. The issue though is that it's a local function. Is it being exposed in any way? Like returned at the end or put inside a global table?
not sure what a global table is but there is no return at the end. this is all the burn related code in that function.
global table is one declared without local
hi
can i ask for the name of the lua folder that includes stuff related to tailoring
kindly be more specific as to what part of tailoring or describe the thing you want to do
tailoring has multiple lua files involved in it
contextmenu
items
skills
traits
translation
player
panel
etc
ah!
i think i might need the panel
im trying to make a mod where you can tear specific parts of a clothing item
thanks❤️
panel
client/ISUI/ISGarmentUI.lua
thanks❤️
wizardry

Thanks dude! Yeah got sick of tcadmin with it's ridiculous pricing so just made my own. Hopefully it helps others with the Mod Manager.
is it useful for local host while modding?
Yeah it runs locally and uses your selected windows batch
I want to take an existing container and rework the look slightly as a new object, where are the "skins" for the original so i can tweak?
i did, couldnt see any furniture
then the icon you're looking for is probably inside a pack
PZ is has been in development long enough to have a wild mixture of all sorts of crap
and not by a company like Microsoft that enforces a consistent coding and packaging standard
they are within the texture packs
.pack files
clothes and accessories modders, is there a go-to spawn rate that you use for containers and/or zombies?
Base yourself of vanila items and rates that are similar to yours
That's a solid idea, thanks!
Working on some stuff, still heavily WIP but interested to hear if anyone would want these features as an API for guns/weapons
If anyone has suggestions for features lmk.
as a brita enjoy, I approve of this 
This will most likely not support Britas
yea no worries. It's just nice to see this kind of functionality
oh nyo
Anyone tried to use DrawTextureScaled? It looks like the PZ rendering engine does not understand basic maths very well.
I get stuff like: 64 * 2 = 127. It's not even a floating issue.
are they still 2 entirely separate items with own models and such as far as the game is concerned?
Hey ! it would be cool if each weapon was composed of various parts ( magazine, barrel, stock, trigger, springs, etc ) that change the gun stats . and the player could be able to disassemble the gun , upgrade and repair parts ( so a gun could have a destroyed/missing non essential part but still shoot )
sorry my english is not that good lmao
im trying to add emotes to a emote mod by retargeting fortnite anims onto the zomboid skeleton and every time i export it and try to use the replaced anim, nothing happens. he jusjt stands there.
Are there specific things I need to do to get animations to work?
like is there a file size limit or something that stops zomboid from playing animation files
I've tried reverse engineering both existing emote mods several times now and always when i get to getting my own anims in, the anims just dont do shit.
Hey
So I'm lost as shit with this mod.
Can I upload this somewhere so someone can review my really bad code?
Not really feasible using the vanilla system as you can't define new 'parts'. But those things you've mentioned are also very tiny and could be done with modData. I'd only worry about if something like that would be 'fun'. 😅
FWIW, it's worth to take a break and go at it with a fresh mind on the next day
assuming no one will look at it
This is the mod. Here's what it's supposed to do:
Use the base game assets(Friendship bracelet, and Red/Black Digital watches), to create Survival bracelets: Bracelets that are essentially friendship bracelets that weigh more and can be broken down and turned into twine + Whatever usefull stuff was made using it. There is a lot. It's all in the "Dean's Items" txt file. I also added a reciepie to craft a friendship bracelet out of 2 stacks of twine(10 units, total, I think?) which can be worn, and then unraveled for twine.
Here's what it's doing: That code for twine to bracelt and back? That works. Nothing else does.
All of the items are visible, in the inventory. I used a cheat to spawn them. Only the watches tooltips work. You can't put anything on, and you can't break down any of the modded bracelets into their components. I am lost. Please help.
This is the next day :v
At this point i'm just..out of ideas on what's wrong with it.
None of my testing of the code has changed anything,.
This was supposed to be a Quick coding adventure. IN and out. Twenty minutes. Tops.
Uh
Mods?
<@&671452400221159444>
SMACK
HIS
NUTS
But either way, I suppose I'll wait. I've posted the Mod Here: #mod_development message if anyone who mods here would like to take a look and see just where I fucked up. I would be most appreciative.
ty
pls help me 😦
I am also super new to coding, so this may be no use, but other mods start with Recipe.OnCreate.etcetera<><><>
So I'm wondering if the typo (Recipie) matters? or if that's something you get to define
Sup guys, do anyone know a way to check if the inventory panel is opened ? I know that has the inventoryPane.isVisible() but I want to check if the panel with the items is opened...
Oh, Well shit. I thought I did that.
Let me see
@fresh isle Well shit. My bad spelling will be the death of me. I saved it after I fixed it, so I'm going to try again.
hoping for you C:
Thanks.
So, I tried it. It failed. I got the stack trace
ERROR: General , 1725838464920> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: setTint of non-table: null at KahluaThread.tableget line:1689.
For the survival bracelets, it seems to be trying to tin them.
tint*
Like they're friendship bracelets. I'm fine with this, but it's throwing erros and not working.
How does tinting with clothing Work?!
Oooh, GUIDs.
Gotcha.
@fresh isle For what it's worth..
https://steamcommunity.com/sharedfiles/filedetails/?id=3025955520|Workshop This is the guide that helped me figgure out what I was missing.
I completelly missed the fact that new clothing items are weird and different and require new GUIDs.
I'm personally struggling with runspeedmodifier/combatspeedmodifier, I thought it would be straightforward, but I can't tell if this still only impacts shoes
Does anyone know what the proper export settings are for exporting animations/models with animations from blender
I thought that code was commented out.
combat applies, runspeed does not iirc
Nope, the GUIDs weren't the issue. Gotta be an issue with the code 🤔
{
DisplayCategory = Accessory,
Type = Clothing,
DisplayName = Tailoring Survival Bracelet,
ClothingItem = Bracelet_LeftSurvivalTailoring,
BodyLocation = LeftWrist,
Icon = Bracelet_Friendship,
Weight = 0.25,
ClothingItemExtra = Bracelet_RightSurvivalTailoring,
ClothingItemExtraOption = RightWrist,
clothingExtraSubmenu = LeftWrist,
Cosmetic = TRUE,
Tooltip = Tooltip_SurvivalBraceletTailor,
}```
This is an example of one of the items that's not working.
{
destroy Twine=2,
destroy Needle,
destroy RippedSheets,
destroy Thread=21,
Keep Needle,
SkillRequired:Tailoring=1,
SkillRequired:PlantScavenging=1,
Category:PlantScavenging,
Result:Bracelet_RightSurvivalTailoringTINT,
Time:180.0,
Sound:PutItemInBag,
AnimNode:RipSheets,
OnGiveXP:Recipe.OnGiveXP.None,
}
recipe Unwrap Survival Tailoring Bracelet
{
destroy Bracelet_RightSurvivalTailoringTINT/Bracelet_RightSurvivalTailoringTINT,
Category:PlantScavenging,
Result:Thread=20,
Time:180.0,
OnGiveXP:Recipe.OnGiveXP.None,
Sound:ClothesRipping,
OnCreate:Recipe.OnCreate.recipe_Unwrap_TailoringSurvivalBracelet,
AnimNode:RipSheets,
}```
And this is the code that controlls "Wrapping and unwrappnig". I can't get it to work at all.
And that function for Oncreate:
local inv = player:getInventory();
inv:AddItem("Base.Twine",2);
inv:AddItem("Base.Needle"); ```
Which also doesn't work, cause the recipe doesn't work.
I'm pretty much stumped at this point. I've gone throuhg and made sure my syntax is right, but it's not..working. What's frustrating is that this is working. Without any errors. it's all on the same "Recipe" Txt file:
{
destroy Twine=2,
SkillRequired:PlantScavenging=1,
Category:PlantScavenging,
Result:Bracelet_RightFriendshipTINT,
Time:180.0,
Sound:PutItemInBag,
AnimNode:RipSheets,
}
recipe Convert Ripped Sheets into Bracelet
{
destroy RippedSheets=20,
SkillRequired:PlantScavenging=1,
SkillRequired:Tailoring=1,
Category:PlantScavenging,
Result:Bracelet_RightFriendshipTINT,
Time:240.0,
Sound:PutItemInBag,
AnimNode:RipSheets,
}
recipe Convert Bracelet into Twine
{
destroy Bracelet_RightFriendshipTINT/Base.Bracelet_LeftFriendshipTINT,
Category:PlantScavenging,
Result:Twine=2,
Time:180.0,
OnGiveXP:Recipe.OnGiveXP.None,
Sound:ClothesRipping,
AnimNode:RipSheets,
}```
So if anyone has any ideas, I'm all ears. Please feel free to ping me.
hey, sorry if im bothering anyone but im trying to make the simplest of mods, a new drink... ive gotten to the part where i have my folder created and the mod.info.. what next? is there a guide i can see or something?
nvm
lol
i found it
I have a foraging mod I got to work, but I'm trying to tidy it up because it's an absolute mess and I'm terrible at actually doing any programming.
I'm trying to change some of the forageCategories categories in forageDefinitions.lua , but only a few of them. I thought these functions in forageSystem.lua might help me out, but every time I try to use them I get an "attempted index of non-table" error.
Could someone explain to me how to use this?
I do also have my mod file. It's just a modified forageDefinitions.lua file, but it's a mess. I didn't want to change too much until I could get a simplified mod file to work, so all the actual changes are in forageCategories and below.
im having an issue with whether to use PopBottleEmpty(which doesnt seem to work) for my ReplaceOnUse... it works with WaterPopBottle, but that of course means its full, i want the empty one. but it throws an error which i cant explain. i guess my question is, what would you use
EmptyPopBottle and EmptyWaterBottle also seem to fail
try prefixing vanilla items in your custom module'd script with "Base."
like Base.PopBottleEmpty?
Yes
thank you
so i'm taking a crack at trying to fix a mod ive been wanting to use but haven't been able to due to a broken recipe. all the mod does is multiply the amount of ammo you get per box by 5 times. here's a screen shot of the particular recipe which is broken. as far as I can tell the shotgun shells opening recipe is set up correctly by the original mod maker, yet while this mod is on I can no longer open shotgun shell boxes anymore. craft helper even shows that there is no recipe to do so, but there is one to pack shells into a box. so i'm pretty much at wits end with this, anyone have a theory on what might be broken here?
here's a screenshot of all the scripts the mod has
upon closer observation, the guns of 93 recipe file does have a repeated recipe name, so i'll try giving it a different name and seeing if that somehow magically fixes it
oh my fucking god it did
that one duplicated name recipe is what broke the shotgun shells recipe
I guess you did not find a way around that bug?
What event should I use to draw something at 60FPS (not the UI at around 10FPS)?
OnPostRender is kinda working but I get some glitches, 1 frame every 200 frames or so where the elements are printed somewhere else.
The zone drawn around the character blinks because it is drawn on the top right every few frames...
I'm printing the coordinates right before calling the draw, I'm positive they are always the same.
I managed to make it work with OnPostFloorLayerDraw. OnPostRender seems unusable.
Guys, who can help me add my custom car in game, please?
You just made a copy of forageDefinitions.lua ? Do not do that, start all over
These tables are most likely globals, tho I haven't looked at it in detail
Wdym connecting it to a function
it doesn't really matter, the only practical difference is that an anonymous function is harder to mess with externally and can't be disconnected from the event easily
Yeah
oh i see
thx for explaining
Tho we should teach good practice of making it accessible
depending on your code structure making it accessible might not be a big deal
Of course, but still
i don't personally lean as heavily on the 'make everything accessible' practice as some people do
and there's a trick to hijack any event handler even anonymous anyway
Considering how little effort it demands to make everything accessible, it sure as hell sound like a great practice everyone should have
Too many times did I have to patch mods that are not accessible
it has performance repercussions and can be poor api design
I'm not putting a single minute patching a mod that does not make his shit accessible
Then you end up with incompatibilities that you can't even make patches for without replacing the entire file
Ofc there's most likely things that do not require it, but really I'd rather teach people to do it than not do it
Hiya
I'm translating my mod but am getting weird characters when there is a foreign character in a word. I'm not sure how to fix it.
I've opened the txt files in notepad++ and encoded to utf-8 and saved it, but that didn't work.
Any suggestions that would help?
Encoding matters
What is cp 1252? I can't see it as an encoding option in notepad++. How do I encode to that?
Hi, a total noob here. Is there a mod to bind Necroforge commands to letters so that I could summon the undead upon my bidding?
same as windows-1252
particularly bizzare that PZ supports unicode but enforces specific encoding for specific languages
i don't really see how it could've reasonably happened stemming from low adoption of unicode at the time, because it was already at 50% and sharply rising
It makes it easier for other people to modify your mod. Which is in line with the spirit of modding.
As for performance hit, it's a valid point. In hotloops you want to avoid dereferencing a bunch of tables.
Though it's usually an option to precache the specific key-value from an accessible table each time you enter a function.
Assuming the function itself isn't in a hotloop, the penalty is close to nothing. But then dependency injection is also an option.
I do purely local for things like "check for identical table contents" function. It's not really reasonable to expect functions like that to be modified to implement a feature.
Thanks for finding this. I've been a hiatus with my mod and need to get back to bug fixing. The duplicate is actually suppose to have a different name for shotgun slugs vs the normal buckshot.
I encoded to windows1252 and it is still showing incorrectly in-game... Is there a magic word that needs to be said? 😦
i seem to recall that in Notepad++ this options sets read encoding, but not write encoding (but don't quote me on that)
🤦♂️
I use VSCode and the one and only encoding option both reads as given encoding and saves as given encoding
anyway try to see if save-as screen has encoding options
I've been using VSCode but someone said to use np++
eh idk, seems like the only advantage of notepad++ is that it's not built on chromium so it's not extremely bloated, but i wouldn't call it a huge advantage per se
i have 64 gigs of ram as one does on a development machine
that's a lot of gigs!
it helps that I got AMD cpu so my machine can't even accept fast memory, and slow memory is cheap
also it's limited to 96 gigs pretty much, as is the upper limit of twin-stick memory packages
Hello, im new to modding and can't seem to find any lua documentation (although i might be missing it in the sea of posts) specifically I'm looking for available timed actions to call from vanilla and if i can get some kind of return or callback from actions added to the queue?
you can look in the original game's source code, timed actions are in /media/lua/client/timedactions
great, thanks
Actual documentation is almost nonexistent, sorry. It's pretty customary for modding APIs.
Hey, is there a way to display a text message on a player screen for a couple of seconds please ?
What do you mean exactly?
I have a potential solution - to create a ISPanel and make it render text, add a countdown and have it close itself when it runs out, and attach it to UIManager
but it's probably not the best depending on what you need to accomplish
I would like to inform a player who is entering a pvp zone by displaying a message somewhere
you can make the player character say text
like "I'm now entering hostile grounds..."
I tried SetHaloNote() yes but I'm kinda new to modding and don't even know how to call it lol
self.IsoGameCharacter:setHaloNote("Test")
Is that correct ?
I don't even know xD I'm using another mod as example
actually nevermind, if you're new you probably don't know eityher
well in any case, when you check a player entering a zone, you have a reference to said player - use this function on that player object
Where can I find the documentation btw ? I was looking here but it never mention player anywhere 🤷♂️
https://zomboid-javadoc.com/41.78/zombie/characters/IsoGameCharacter.html#setHaloNote(java.lang.String)
Javadoc Project Zomboid Modding API declaration: package: zombie.characters, class: IsoGameCharacter
I though IsoGameCharacter was the actual thing to call before sethalonote
implying that player is the name of the variable you're using
oh
IsoGameCharacter is a java class, it has functions attached to it
when an object is of that class, it can use its functions
I'm using the PvPE mod as example, here he's using self.character:getX() to get the character I'm assuming
local isNonPvpZone = NonPvpZone.getNonPvpZone(self.character:getX(), self.character:getY())
so can I create a text like that ?
self.character:SetHaloNote("Test")
Obviously it's not working as I intended that's why I'm asking here ahah
IsoPlayer IS an IsoGameCharacter
uh
No it depends where you're calling your function
local old_ISSafetyUI_prerender = ISSafetyUI.prerender
function ISSafetyUI:prerender()
old_ISSafetyUI_prerender(self)
local isNonPvpZone = NonPvpZone.getNonPvpZone(self.character:getX(), self.character:getY())
local safetyEnabled = getServerOptions():getBoolean("SafetySystem");
if safetyEnabled then
local isPvpZone = ForcePVPZone:getPvpZone(self.character:getX(), self.character:getY())
if isPvpZone and not isNonPvpZone then
if self.character:getSafety():isEnabled() then
self.character:getSafety():setEnabled(false)
getPlayerSafetyUI(0):toggleSafety()
self.character:SetHaloNote("Test")
end
self.radialIcon:setVisible(false);
end
end
end
That's the entire function
What's ISSafetyUI ?
I mean I guess yeah you do
I would suggest caching self.character tho
local old_ISSafetyUI_prerender = ISSafetyUI.prerender
function ISSafetyUI:prerender()
old_ISSafetyUI_prerender(self)
local character = self.character
local isNonPvpZone = NonPvpZone.getNonPvpZone(character :getX(), character :getY())
local safetyEnabled = getServerOptions():getBoolean("SafetySystem");
if safetyEnabled then
local isPvpZone = ForcePVPZone:getPvpZone(character:getX(), character:getY())
if isPvpZone and not isNonPvpZone then
if character:getSafety():isEnabled() then
character:getSafety():setEnabled(false)
getPlayerSafetyUI(0):toggleSafety()
character:SetHaloNote("Test")
end
self.radialIcon:setVisible(false);
end
end
end
But yes that should be it IF character is defined within self
I'll try thanks
Btw I'm reloading lua using the F11 tab in debug mode, does it actually reload the entire file ?
It's not working sadly
yes but unless the file specifically has a reload handler, it mostly has no effect
Okay I managed to get it work yay
getPlayer():setHaloNote("Test")
Now another question lol what's the different between those 3 ?
setHaloNote is misspelled in it
misspelling including something as trivial as capital casing is not allowed
the last one sets color and display time, the other two use defaults
Why nothing is explained on the documentation ? Like the variables etc ?
too much work
So how do you know x)
Wow ok lol
Yep I was talking about this, nothing is really explained here except for the variables type
has names in this one, like String str, float dispTime and such.
While not "perfect" it's certainly better than String string, float float1
and helps a lot in guessing what some argument might be for
Ooh okay thanks !
Does anyone know what unit the maxTime of timed actions is? And if it's ticks is there any conversion between in-game or real seconds or is the tick rate non-constant?
It's tied to in-game time but I'm not sure what unit exactly it is. Might be minutes.
then the digging continues, thanks anyway
most of the code operates on minutes, hours, or days. It's usually easy to tell.
Right
whoops, i thought the other guy wrote it
hi
so im trying to make a mod where you can rip a part of a clothing piece but idk how i would approach it 😭
can someone help
make a recipe that takes clothing piece and produces whatever else you need
i need help in removing/hiding the muzzle flash
for some reason it covers the whole screen
take a look at items.txt and recipes.txt
yeah you might need to fiddle with reopening and saving
it's not jank it's just really counter intuitive
Nope still not working :/
I also tried to restart the game
at default game speed, 48 timed action ticks is one real second
for i=0,items:size() - 1 do
local item = items:get(i)
if item:getType() == "CoinMould" then
result:setName(item:getDisplayName());
result:setCustomName(true);
end
end
end
Is there a way to do something like this? Basically I'm trying to have a coinmould item that's used as a (keepable) recipe ingredient which passes on its name to the result of the recipe
ETA: This was actually a mistake in the script file. I had "Oncreate:StampCoin", not "OnCreate:Recipe.OnCreate.StampCoin"
so it's in-game seconds
are backpacks consider as clothings ?
you should double check your maths on that 😅
well default game speed is 30 minutes per day and then default sandbox settings make it 60 minutes per day
which works out to be x48 game speed vs real time and x24 game speed vs real time respectively
but it's 48 ticks per second at 60 minutes per day
is there any guide on how to make a backpack ?
getCell() should return a 300x300 grid, correct?
ok good
How can I publish the translation as a mod?!
getCell() is probably not the cell you are thinking about
Did you make the translation ?
the 300x300 map cells are largely unrelated
I get 15876 squares from getCell which is better than the 90k I was expecting
I hope they improve that in b42, it's quite confusing
Almost, but I want to know how to publish it as mod
i haven't checked older versions but the code gives the distinct impression that they did use to be equivalent but no longer are
If the translation works, make the translation itself a separate mod and make it require the original mod (to make sure people don't just load your translation without the original mod)
Ok, I have to know the basics of the mod development
the gist of it is to follow the same folder structure as example workshop mod, and paste your modded files into /media/lua/translate
Looks like lua don't support é & ê characters, they simply don't appear at all in game :/
Even if I save the lua file as ANSI etc
is 32x32 the max resolution for icons ?
if I get bugged action, cleared queue when attempting a custom timed action how can I find out whats wrong/bugged so I can fix it?
Logging 🙂
Tempted to farm backend processing for a mod im writing outside the server into a more server friendly application thoughts?
turns out the isValid method was bugged, fixed it
is there any template exemple avaible or tools when it comes to making clothings ect..
Yippee, red postbox in my UK map!
No there won't
So the map's going to be set in the world of zomboid where shops and stuff aren't the same as irl, like Greenes, Gigamart, Spiffos
I might make a Tesco like shop kinda based on it, but it won't be called tesco
and I plan to add a spiffos chain restaurant somewhere, I imagine spiffo's is a gobal fast food chain
as long as there's something tescos like we'll be pleased - well we'll be pleased regardless, we've both wanted a uk map for a while
Same man
I got so tired of waiting I had to make it myself
This is the entire map at this point
I plan for the map to have the village and the surrounding area to begin with
i'll be watching with interest
I'll keep people updated, just expect it to take at least 2 months or so, It's a pretty large project, not as large as ravencreek or something, but I'm still learning PZ modding, so it might take time
yep, thinking this is how I'll have to do it too, thanks
haha yeah something like that
UK map ? 👀
After Project France, we're getting Project UK

