#mod_development
1 messages ยท Page 179 of 1
Someone has already been able to modify a trait cost from sandbox options ? I'd prefer not to reimplement that if it is available. ๐ lazy dude
i implemented it in these files
https://github.com/demiurgeQuantified/Zombie-Contagion/blob/develop/Contents/mods/ZContagion/media/lua/client/zcontagion/traits/traitsUI.lua
https://github.com/demiurgeQuantified/Zombie-Contagion/blob/develop/Contents/mods/ZContagion/media/lua/shared/zcontagion/traits/traits.lua
I've added a bunch of "overlay" icons that can be set on an entry in the radial context menu. It's an easy way to add some context to an icon you're setting without having to actually add a bunch of icons yourself. This isn't all of them, but shows the gist/vibe of what I got. Player is for scale of the radial's size. Unfortunately the big issue with this mod is that entries from other mods won't have icons unless they use a vanilla string or function I catch, or set the iconTexture themselves. Hopefully these overlays help to encourage y'all to add support for this when adding context entries, and I tried to do this in a way that won't conflict with vanilla even with this mod disabled. I'll have documentation on all this on release though (which should be soonish).
Another funny mod that owes some of its magic to Albion: https://steamcommunity.com/sharedfiles/filedetails/?id=3002791010
lol @ the endgame
hello everyone, I like to introduce my new NPC framework mod for B41 (with the aim of replacing all Superb Survivors variants).
This is very much a work in progress, the NPCs are currently limited to hold position and follow at the moment for their basic orders.
https://steamcommunity.com/sharedfiles/filedetails/?id=3001908830
I have included 2 projects as a starter and examples for other modders to try their hand at creating their own NPCs.
Standalone, no group NPC: https://steamcommunity.com/sharedfiles/filedetails/?id=3001910188 (< 200 total lines of code)
Grouped NPCs: https://steamcommunity.com/sharedfiles/filedetails/?id=3001909546
Framework main github: https://github.com/shadowhunter100/PZNS
Example standalone NPC: https://github.com/shadowhunter100/PZNS_AgentWong
Example grouped NPCs: https://github.com/shadowhunter100/PZNS_RosewoodPolice
I am also looking for help to further develop the framework; as in it's current state, it is very barebones, but 100% stable in my own testing.
What it means to use the framework; a dependent mod can call the required framework and use all of the framework functions without needing to write additional data management functions.
https://imgur.com/a/OaaK2tG
NPCs in action example: https://youtu.be/F_AcFR68qs8
B41 - PZNS - (Project Zomboid NPC Spawner) Mod Framework preview
NPCs Invite to Group Test Demo.
The Police Group is actually a separate mod, this test demo shows the Framework mod can be extended/referenced by other mods.
Zombie population set at INSANE.
Using Bikini Tools, Professional Framework, and Insurgent P...
for your need of spawning On IsoGridSquare Load, you can look at Spawner subpart of TchernoLib and how it is used by Portal mod. I used it for spawning items, you can do the equivalent with NPCs.
I will probably take a look later; we worked separately and I was unaware of your object spawning functions in the library.
in the mod.info file of your client mods, you can add the line require=PZNS_Framework
This will allow you to avoid all the lua code questionning whether the framework is active or not
Still looking for an answer about this
You mean loot?
Yes
There are special distribution tables in Distributions.lua near the bottom.
Based on the event, a table is selected. Stash houses can use any table you set.
I'll look into it, thanks!
still need help with this if anyone is able to lend a hand ๐
They should take priority over the room tables.
thanks!
okay seems to be what I've been looking for but one more thing, anything specific for car wrecks/general car containers on the road that seem to be in a bad condition? (Want to handle spawns in cars but generally not have the item spawn in cars which look to have good condition)
onfillcontainer check general condition of the parent vehicle
do wrecks even spawn items? if they do then you can check wreck too
well obv not wrecks which contain cars at an unsuable condition those don't spawn loot afaik
so basically onfillcontainer, check if its a vehicle, check overall condition, and if condition is above threshold and item spawned in it, just delete the item
yeah, something like that
Thanks! :)
if I declare a local, can i get the length of it in lua?
local myListOfThings = {
"thingA",
"thingB",
"thingC",
}
for i = 0, myListOfThings:size() - 1 do
for i = 0, myListOfThings.count - 1 do
for i = 0, myListOfThings(length) - 1 do
I think, in lua, the "correct" syntax is
for i = 1, #myListOfThings do
print(myListOfThings:size[i]);
end
iirc :size() is used if the list is from Java.
#myListOfThings
it can only count array-like tables correctly
it just counts from 1 until it reaches nil
if you need the length of another style of table then i think you have to resort to```lua
local count = 0
for _, _ in pairs(myListOfThings) do
count = count + 1
end
... come to think of it, doesn't lua list index start at 1?
so this is no good? refactoring my ProdecuralDistribution
for i = 1, #locationsCommon do
addLoot(locationsCommon[i], itemToAddHere, 1.0 * rarityMultiplier)
end
or is it
local count = 0
for _, _ in pairs(locationsCommon) do
addLoot(locationsCommon[count], itemToAddHere, 1.0 * rarityMultiplier)
count = count + 1
end
to clarify, your 2nd for-loop is iterating through a table, the pairs() call is iterating through each key-value pair in the table.
albion stated as such
your first for-loop should work from what I can eyeball at least.
yeah that looks correct
well it depends on what addLoot expects, the syntax looks a bit odd around that
but the loop itself seems correct
Hmm, I didn't even get a print in my console. but maybe the function got called at a bad time.
local locationsSchool = {
"SchoolLockers",
"ClassroomShelves",
}
for i = 1, #locationsSchool do
print("iteration " .. [i] .. ", about to add loot to " .. locationsSchool[i])
end
that should be perfect
oh. my print caused a stack trace unexpected symbol near [.
oh right
iteration " .. [i] .. ", should be iteration " .. i .. ",
square brackets are only used when you're trying to index something
should locationsSchool[i] be #locationsSchool[i] as well? or just the i is the problem
just the i i think
cool
if you did #locationsSchool[i] you would basically be trying to index a number, since # returns the length
So I have an item that acts just like eating something, I wanted to ask if there was a way to limit movement while the items are being consumed?
do you guys know where to find the mod.txt file anywhere? it has the list of mod active on a server.
it could be called loaded.txt
your currently active mods C:\Users\user_name\Zomboid\mods\default.txt
a particular server's mods C:\Users\user_name\Zomboid\Saves\Multiplayer\ip_address_here\WorldDictionaryLog.lua
not exactly what you were looking for, but the mods are listed in that .lua, if you open it with notepad
@strong scaffold
Just a probably dumb Lua question: if I create a local table like "local myfunctions = {}", then do "function myfunctions.myFunction()", will that function be local without needing the local modifier?
yeah
it doesn't exist outside of that table, so access modifiers don't really apply to it
any idea what method to use to return overall condition of a vehicle?
thanks man ill check it ouy
do you think copy and pasting the default.txt content to the .lua file would break anything?
i just want the exact same mods
thats more of a question for #mod_support channel,
but, your game should download all mods from a server, when you try to join. you don't need to do it manually.
anyone see the problem here?
my code isn't 'closing' correctly?
lua would probably be easier to use, learn & understand with accurate spacing, intellisense and visual studio, umbrella, zomboid studio, whatever. but for right now im just in Notepad++, and i feel like this should 'close'?
I normally write C#, but according to my google searches, this should be good to go, in lua
cringe
thanks
don't worry, lua runs against a lot of what you learn in other languages.
and PZ has its own flavor in kahlua
Let's request they change it to tcl
Fun progress ๐ panels instantiated when hovering over containers
OOP is hard in Lua 
Here's my procedural distribution lua script.
local function addLoot(proc_name, itemToAdd, chance)
local data = ProceduralDistributions.list
local c = data[proc_name];
table.insert(c.items, itemToAdd);
table.insert(c.items, chance);
end
this works:
addLoot("SchoolLockers", myItem, 6.0)
addLoot("ClassroomShelves", myItem, 6.0)
I would like to refactor it, to work like this. But 8 hours in, it just won't work.
local locationsSchool = {
"SchoolLockers",
"ClassroomShelves",
}
for i = 1, #locationsSchool do
addLoot(locationsSchool[i], myItem, 6.0)
end
Does anything jump out as wrong with this?
note; THIS debugs fine! it looks great! they are both added nicely
print("iteration " .. i .. ", adding myItem to " .. locationsSchool[i] .. "with rarity = " .. 6.0)
the error I've been getting all day reads:
Callframe at: getLootModifier
function: doRollItem_CalcChances -- file: SpawnRateChecker.lua line # 158 | Vanilla
not much comes up on google for those errors
- file: SpawnRateChecker.lua line # 158 | Vanilla
What's at line 158?
i also wouldn't rely too much on chat gpt and google for kahlua/lua
because lua has far fewer projects those AI/LLMs have trained on
they can create basic examples and explain some of the workings, but don't expect 100% accurate and working code from your first query.
I am trying to align attachments to the player and I have been quitting out of the game, updating the .txt document which contains the attachment point and starting up the game to check my updates.
Is there a better way of doing it?
Two questions ๐
- How can I get the nice display name of a container? (container:getSprite():getName() is pretty ugly)
- How can I get some unique way to identify a container or a container's IsoObject (to differentiate them from each other) ?
Anyone know of a way to send a message into chat for only a player to see? like a system message?
If you use debug mode, there is option, however depending on scale and rotation of your model it might differ from what you see on character and in its menu, it also overrides text file so you dont have to restart
that is super useful, thanks!
Until i had it figured out i usually had to put muzzleflash where stock is , and scope/reddots were usually upside down in here
Fresh off the presses: https://steamcommunity.com/sharedfiles/filedetails/?id=3003095456
Had it on the shelf for a bit, decided it was not doing anything there. ๐
I still can't find the function to do it. Best way I can think of is manually iterating over each vehicle part and calculating average but seems too troublesome. Surely there is a native way of doing it, no?
Looks like you have two broken images in the description
Its good now ^^
๐
Working on a new mod.
you guys think it would be possible to have a robot race where they need to learn mechanics and stuff to repair themselves like a car and they need coolant and batterys to live?
the lore could be
Escaped darpa lab robot heads out to find signs of life and adventure
or a tesla robot type thing
instead of bites taking you out maybe you loose wires controlling your left of right arm or something
and other weird debuffs like not being able to use guns and youre noisy when walking
or extra noisey when running
could i create an item that when interacted does a teleport event?
If there's anybody here available to work on commissions there's a few job postings here: https://discord.com/channels/136501320340209664/1125248330595848192 
Yes, there's a few mods that do this already.
oh shit thanks man
thanks
im actually doing this for a commission
yeah
Is there a mod a way to have combobox/multiselect as a sandbox option?
At the moment I only see these options:
boolean
double
enum
integer
string
text
enum?
Isn't enum a single options?
what enum
enum is drop-down list
ah
But it only allows you to choose one options
then use booleans?
I can't because I need to generate the list at run time ๐
Unless, there is a way to dynamicaly add sandbox settings ๐ค
Example of what I would like to have
multiple enums ๐ฆ
Manually added multiple enums? ๐ฆ
yes shame
Maybe I can do something to make this work ๐ค
If I can hijack the ISTextEntryBox for setting.type == "text" when it's loaded inside SandboxOptions.lua I could use a format like this [Value1,Value2,Value2] as serialized array ๐ค
Third time since middle school I used trigonometry for something
no no its a website im working on ๐
i was thinking... is there any way to configure a mod of npcs in pz with artificial intelligence? i've seen it done in several games, like skyrim and matrix, for example
For now its going to be a crafting tree with everything, I plan to implement custom items and to visualize how things are crafted, whats in them (eg. Bread = Flour, Yeast, Water, Salt ...) if someone wants to make a mod with lots of new items or just something complicated it would help to visualize stuff.
will u support all available recipes variables?
And looking back into one of thursdoids I saw an image with super huge crafting tree and wondered how would that look detailed and interactable, like you press an item and it highlights all the steps and stuff required to make that item, like a cake recipie lol
Yes, actually I do imported all of the parameters
cool 
hello guys i want to start moding this game but i dont know where is the docs etc. also i think its java code is it correct?
Its mostly LUA
yeah but i do want to do car mod and i wanna do like animated doors etc.
where can i access the library?
Everythings is here https://pzwiki.net/wiki/Modding
Java docs here: https://zomboid-javadoc.com/41.78/
Javadoc Project Zomboid Modding API package index
so java knowledge enough for modding?
this version of the javadocs is better https://projectzomboid.com/modding/
thank you but how can i gain access to this in intelliji idea
most mods are just lua scripts, java mods are possible but not commonly made and not many people will install them
it will be a basic car mod rx7
if you want to have lua intellisense stuff in intellij you can use umbrella https://github.com/asledgehammer/Umbrella
lua should be enough to make car mods
if you know java, you can pick up lua
yes but i dont want to learn whole new language for just a game
java mods require manual installation and you won't really find any support in the community for making them
ahh i seee
than how do i write with lua? which program should i use? and how i will access with lua?
lua syntax is easy, however it is limited and its best to get to know it first, codecademy has a free course about lua
i like using intellij with the emmylua plugin, vscode is popular too
I recommend VS Code and extensions
emmylua is kind of crappy tbh and vscode has much better support for lua, but i take that sacrifice to use jetbrains
tool looks cool.. but can you tell me more about the zomboid automated test framework??
its making intelliji idea lua?
nice
ok thanks so anything diff in lua?
for VS Code theres that: https://marketplace.visualstudio.com/items?itemName=asledgehammer.zedscript-vscode
from java
https://github.com/Notloc/zomboid-automated-test-framework I just added bunch of usefull links there, all of them are from here
dawg
lua is multi-paradigm language, not like java which is object oriented
and like there arent any ; and {}
yeah
...
but I think you can use them anyway
i saw a gtr mod and it was wroten with java i guess
and you really wasnt able to manual install it
for loop becomes
for i=1,50 do
(...)
end
(i checked the codes of animations etc.)
you can use ;s but not {}s
Not to distract from the current conversation but we were talking about StackExchange a few days ago and how awful it is. After spending all day stuck on some selenium stuff I finally found my answer on SE and wanted to thumb it up as a thanks. I created an account and everything, only to find out I don't have enough reputation to thumb it up...
I'm scared of posting any questions there, people are so toxic if you do one mistake in your question
i'm forever thankful for those poor souls who ran into issues that i had but were brave enough to post there so that i may get help lol
I think Albion is right on the money with this one "i just google, and if google doesn't have the answer it's impossible" #mod_development message
Theres ChatGPT to the rescue!
or to make the question even more impossible to answer
chatgpt aint openai
its basicly using templates
Hum, I added new sandbox options values (with default values set) to a mod and someone seems to have the new lua code without the sandbox options. how is it possible ? I thought the default values were used when loading in a preexisting game save.
Same here !
I have an idea for this animals that move with you thing I was wondering if you might be interested in collabin' to make it more awesome
Like maybe they have health or can attack zombies if there's a zombie on the square they move to
Getting there
That would be awesome. But That's too much complexity to handle.
eh I iwll figure it out, just gotta loop over the square when the animal spawns in it's spot and if there's a zombie object we deal damage to it and play a sound effect
if player can be made to face a direction, can you face the dogs and alligator
player:faceLocation(isoObjectHere:getX(), isoObjectHere:getY())
not sure if making such a complicated mod right before b42 is a good idea 
Eh itll Bridge things
Also the animals are items so we have to use SetWorldZRotation
I had it working in an earlier version where I calculated the charachters rotation value and then assigned the correct z rotation but I lost the code snippet of it working.
"right before" b42 lol
ยฏ_(ใ)_/ยฏ
Honestly I've heard its months out still and its more of a novelty mod anyway.
Tryna think of other uses for the system of an item that follows you.
Can probably do interesting things with like models that affect the appearance of the ground.
new idea:
since this is working,
addLoot("ClassroomShelves", myItem, 6.0)
but this is not
local locationsSchool = {
"SchoolLockers",
}
addLoot(locationsSchool[1], myItem, 6.0)
maybe I need to cast it to a string? (if lua can)
locationsSchool[1].tostring()
string(locationsSchool[1])
unlikely, as they both return strings, when i print them to console, but maybe?
in lua it's tostring(var), but yeah doesn't seem like it should help
it can't not work cos they are same but just different location name
what's the error?
it was mentioned here #mod_development message
a vanilla script media\lua\client\isui\adminpanel\lootzed\spawnratechecker.lua
so, i only get a stack trace when i check the container. with lootzed
otherwise, checking school lockers, they do not have my new item(s)
here's not full error msg
the problem appears to be line 158 local lootModifier = ItemPickerJava.getLootModifier(itemName)
but i'm not the greatest at understanding the PZ debug error window, or the stack trace info in console.txt
I do this often now. Check out "Roles Display In Chat" for an example.
anyway it can't not work, it's absolutely same cos u push same string there and strings can't be referenced thing to smth else
can u give me ur test code fully?
ye
Download ErrorMagnifier it will parse errors into copy-paste bits.
i have it. any way tp clear the list, aside from closing PZ?
quitting to main menu, and starting a new game, my errormagnifier ends up having 20 things in it. i guess the one at the top is newest?
Thank you, I will
Oh, wow, the way you did it is so much cleaner than mine ๐
But it lacks UI, which is what I'm trying to achieve, thank you, this will be such a good base for my work!
How Time is defined in the game? Like disassembling furniture is eg. Time=500, Hows thats calculated to ms/s? And game speed is basically 1x,2x,3x?
@sour island I already made a UI injection that seems decent
What are you trying to todo?
Im adding something like โneeded timeโ for an item
1 real second is 48
from getting the raw materials to finished item
Cool, good luck man! You might want to use some of my code as a base for your mod
It intercepts every single timed action
local ActionBlacklist = {
ISWalkToTimedAction = true, -- Always ignore
ISPathFindAction = true, -- Always ignore
-- ISEquipWeaponAction = true, -- Can be skill depended but enabled because makes the game snappier
ISReloadWeaponAction = true, -- Skill depended
ISReadABook = true, -- Affected by FastReader and SlowReader
ISGrabItemAction = true, -- Affected by Dextrous and AllThumbs
ISInventoryTransferAction = true, -- Affected by Dextrous and AllThumbs
}
local old_ISTimedActionQueue_addToQueue = ISTimedActionQueue.addToQueue
function ISTimedActionQueue:addToQueue(action)
local actionType = getmetatable(action).Type
CasualoidPrint("FasterActions: actionType: " .. actionType)
if not ActionBlacklist[actionType] and action.maxTime > 0 then
local modifier = SandboxVars.Casualoid.FasterActionsModifier
CasualoidPrint("FasterActions: old maxTime: " .. action.maxTime)
action.maxTime = math.max(action.maxTime * (1 - (modifier * 0.01)), 0)
CasualoidPrint("FasterActions: new maxTime: " .. action.maxTime)
end
return old_ISTimedActionQueue_addToQueue(self, action)
end
Another weird question, is there a way to iterate over all items using lua?
looking for somone help me finish fairly simple mod just need lil help with traits and random things character will say
if you can help
please dm me
il credit you in description
if you want the item scripts you can loop through ScriptManager.instance:getAllItems()
๐
Yess exactly, Thank you!
Yes
local allItems = getScriptManager():getAllItems()
for i=1,allItems:size() do
local item = allItems:get(i-1)
if item:getType() == Type.Literature then
if SkillBook[item:getSkillTrained()] then
table.insert(skillBooks, item)
elseif item:getTeachedRecipes() ~= nil then
table.insert(other, item)
end
end
local mediaCategory = item:getRecordedMediaCat()
if mediaCategory then
media[mediaCategory] = media[mediaCategory] or {}
table.insert(media[mediaCategory], item)
end
end
odang, a random varaible, which was supposed to be camelCase, was UpperCamelCase. im so used to visual studio and my C# compiler, not letting me use bad variables. but notepad++ don't care. well, my problems fixed now
one of many reasons not to use notepad++ 
using 'bad variables' isn't wrong in lua but most ides will at least help you identify that
Uh it's using the internal error list ๐
So technically no, but I can try to just manually track after the fact and "hide" them
Oh wth discord took its time to update/send messages
@nimble yarrow
Oh wow, that's nice
And yeah, I have a string manipulation fetish ๐
@sour island error is gone, i had a typo somewhere
๐
this is a snippet from vanilla proceduraldistributions
GigamartHouseElectronics = {
rolls = 4,
items = {
"Battery", 20,
"Battery", 10,
"Radio.CDplayer", 20,
"Radio.CDplayer", 10,
"CordlessPhone", 20,
"CordlessPhone", 10,
"VideoGame", 20,
"VideoGame", 10,
},
If i wanted to remove cordlessPhones, would i need to remove it twice, from the table?
edit: i guess it shouldnt be too hard to test, with lootzed
update: just tested it, you must remove it twice.
Did it ever happened to anyone that a function that in the debugger is clearly returning something, on the file it has been called, it returns nil?
function CasualoidStringToTable(_string)
local values = {}
local map = {}
for text in string.gmatch(_string, "([^;]+)") do
values[#values + 1] = text
map[text] = true
end
return values, map
end
For some reason it keeps returning nil when called
local _, map = CasualoidStringToTable(self.selectedValuesString)
the debugger needs some debugging
it doesn't understand multiple assignments like this
Ah, no?
if it's the debugger telling you it's nil i wouldn't trust it basically
wtfff it still returns nil
I changed it to this: local res = CasualoidStringToTable(self.selectedValuesString)
and this
function CasualoidStringToTable(_string)
local res = {
values = {},
map = {}
}
for text in string.gmatch(_string, "([^;]+)") do
res.values[#res.values + 1] = text
res.map[text] = true
end
return res
end
And it stil says nil when it's not nil!
I think pz studio shat itself and was not updating my code ๐ nope pzstudio is fine
๐
isn't CasualoidStringToTable this supposed to be here? I didn't use this part of debug menu so not sure
wtf is happening, why is the table not inside the res var O.o?
Also, yeah, why is that not in the stack
any actual error there?
Nope, no error, the function just returns nil
did u tried to exactly print it instead checking in debug menu?
Sorry to interrupt you guys, but is there any event that is triggered when the user clicks on "Accept" in the Game Options screen?
I can't seem to find anything related to that
man I can't for the life of me seem to be able to set the WorldZRotation of this item I'm placing down and it's driving me nuts
bout ready to give up on it
wow, I removed the vanilla item "Video Game" from 10 vanilla procedural distributions lists. went to a school locker, bam - a vanilla VideoGame. it doesn't appear in LootZed. hmmmmmmm, i didn't know things could spawn in containers, if they were not in lootzed.
if an item spawns, but is NOT in the ProceduralDistribution, it must be in SuburbsDistributions, or some other list, right?
you said you had it working, but 'lost' the code snippet. where was the last place you saw it? ๐
events.OnGameStart. should i move this to OnInitGlobalModData ? ๐ฎ
the loot tables don't get read directly from lua, the java copies them in at a specific point and if you change them after that lootzed is wrong
it's actually even before OnInitGlobalModData
you can call a method to make java parse them again
Does anyone know any mods that use a tickbox ? Having trouble rendering one
actually u don't need any event
require("Items/ProceduralDistributions") -- or/and require("Items/SuburbsDistributions") and etc
-- do ur stuff here clearly without event
yeah, you only need to reparse it if you want sandbox options or something
the requires aren't necessary though
Thank you! ๐
u r welcome 
ah, yea, u right
well, it's a style choice, some people like it for organisation
but i like to make sure people know that it doesn't change anything about the execution of the code
I hate those who choose require "abc.lua" instead of require("abc.lua") 
one time i included require "abc.lua".func() in a mod just to annoy anyone who read it
Satan: please, take my place

<!-- comment in xml -->
-- comment in lua
--[[ long comment in lua --]]
how to comment in txt? will --this still work?
ok cool
long comment just --[[text]] 

๐
Im having an issue with getting Perks
This Seems to work
player:getPerkLevel(PerkFactory.getPerkFromName("Lockpicking"))
But when trying to use it in AddXP it return an error
local player = self.character;
player:getXp():AddXP(PerkFactory.getPerkFromName("Lockpicking"), 2);
Attached is the error
Thank you @jaunty marten , that link worked like a charm !
try to print PerkFactory.getPerkFromName("Lockpicking")
๐๐๐๐
yeah i just had a look at the source, it seems to imply there's something wrong with the perk list
not sure for 100% but player.getPerkLevel can accept any value and if it's invalid then it just retunrs 0
or your perk isn't real yeah
Hmm well my perk is Init'ed in perks.txt
as
perk Lockpicking
{
parent = Stealth,
name = Lockpicking,
translation = Lockpicking,
passive = false,
xp1 = 50,
xp2 = 100,
xp3 = 200,
xp4 = 500,
xp5 = 1000,
xp6 = 2500,
xp7 = 4000,
xp8 = 5000,
xp9 = 7000,
xp10 = 9000,
}
but not showing any errors on boot
why does AddXP check the entire perk list for the perk you already gave it?? seems very spaghetti
just print it

does your perks.txt open with the VERSION = 1, line?
yep
getPerkFromName uses the translated name 
Printed results
use Perks.Lockpicking instead of the method call, or your mod will break when played in different languages
yeah, getPerkFromName uses the translated name (!?!?) so if it changes it won't find the perk
yeah, tbh have no idea why this even exists
Ahh ok, That make no sense but thanks for that
nope, it make sense cos otherwise ur mod will errors for everyone but en lang players
instead PerkFactory.getPerkFromName("Lockpicking") use Perks.Lockpicking
Ok it works now, still a bit confused as to why it wasnt working earlier but it works
thanks you
i'm not even sure why that fixed it, it should've still worked in english
Gentlemen modmakers. I'm not sure how to ask this properly...
There are two situations:
One. ะกar, you are driving, the window is closed. Right mouse button doesn't work.
Second. Car, you are driving, window is open. The right mouse button is working - the camera is moving away in the direction.
Where do I dig this to make the second case work when the window is closed?
local zombies = resultSquare:getMovingObjects()
for j = 0, zombies:size() - 1 do
local zombie = zombies:get(j)
if instanceof(zombie, "IsoZombie") then
-- Knock down the zombie
zombie:setKnockedDown(true)
-- Play the sound "MetaDogBark"
resultSquare:playWorldSound("MetaDogBark", resultSquare, 0, 10, 1, true)
end
end```
 How come this throws an error saying non table is null 
which line
one sec lemme test one more time to see which line is highlighted
for j = 0, zombies:size() -1 do
more context if helpful
isogridsquare has no method playWorldSound
Oh
I thought it did,
looks like it's just play sound
derp
but that doesn't explain why its not knocking the zombies down
is setKnockedDown sufficient to knock down a zombie?
zombie:knockDown(b)
where b is fall on front
lets see this in action then!
๐
Time to knock down a zed with a corgi
I was inspired by the dog training section of World War Z
did you figure out the lookDirection ๐ฎ
No not yet ๐ฆ
look direction? Like how to turn the dog?
yeah, since its an item on the ground
You can get angle between two points
nice
yeah I've been trying to set the dog's rotation with setWorldZRotation but it hasn't been working
What is the math you're using?
Have you tried setting it's angle to the same angle as the player?
Bothers me the chop tree context menu doesn't check for items the same way that damage checks does
cleavers do 15 tree damage ๐ค
No I just can't set the world z rotation of the world inventory object
it keeps saying it's nil every which way
local function predicateChopTree(item)
return not item:isBroken() and item:hasTag("ChopTree")
end
pain, it's local
they also bust through garage doors effortlessly o.O
I think thumpable damage is calculated using treedamage
15 is pretty high for a cleaver
screwdriver is 1
๐
fireaxe/pickaxe is 35, woodaxe is 55
But the context menu for chopping trees looks for the choptree tag
not if they have treedamage > 0
and comparing 2 integers has gotta be more performant than parsing a string
I think you could probably break something giving an item the choptree tag and 0 treedamage lol
the overhead would be parsing through the inventory - which it has to do anyway
if predicates could be a loadable module that would be great ๐ฆ
The entire context menu is handled by a giant if tree - I guess I could slide in the context menu after the fact -- add one if chop tree isn't already there
how do I do damage to a zombie with code?
zombie:setHealth ?
or perhaps Hit function is less buggy, as per this discord history
hm, on second thought
Too OP
it's already too OP they trip everytime
then again you have to be real close for it to actually trip a zed
anyone know what determines Say("string") color above player's head? seems to be random each time i make a new character.
would be nice if it could be overloaded as an additional argument, but proooobably not?
edit: nvm, just found this, ill try it
Say(String line, float r, float g, float b, UIFont font, float baseRange, String customTag)
Gentlemen modmakers. I'm not sure how to ask this properly...
There are two situations:
One. ะกar, you are driving, the window is closed. Right mouse button doesn't work.
Second. Car, you are driving, window is open. The right mouse button is working - the camera is moving away in the direction.
Where do I dig this to make the second case work when the window is closed?
I don't understand your question.
i can look, by holding right mouse, while in a car, with window up OR down. if you can't do this, it might be a bug caused by a mod, or something?
Or, are you wanting to make a mod that restricts sight, so that the player must roll down their window first?
hmm... strange... not work for me...
okay. try it in vanilla, thanks
could be a feature of a car mod. might make sense, if you have metal plates on the window.
i'm have only SHARK mod pack
players choose their default colour iirc
there is a 'personal text color' variable, players can set, in the multiplayer game options.
I mean, the getPlayer():Say("hello") <-- that color
but that doesn't get affected by that?
nah. its default green. my Say() text was yellow yesterday, and is purple right now
yellow will look good for my mod screenshots, so i wanna change it, lol.
there is only 2 overloads, so i need to provide it with a UIFont. will try that now
the overloads skip around a bit for say
to change color you need to go up to the overload with like 5 booleans at the end (or was that for range ๐ค )
or I could be thinking of addChatLine
that's addChatLine. and it... might be multiplayer only?
addChatLine goes overhead and needs to be fired through a command to work in MP
kinda odd that one
if it works in SP ill use it, instead of Say()
assuming i can't get the big Say overload to work
i think my only problem is accessing a font.
getPlayer():Say("asdf", 50.0, 50.0, 50.0, UIFont.Dialogue, 10.0, "customTagHere")
I might need to do something else, such as
UIFont[5].values()
UIFont.valueOf("Dialogue")
UIFont.FromString("Dialogue")
You can just call UIFont.Dialogue
It's exposed
as for customTagHere - pretty sure that won't work
the only way I got colors to work was using radio there
"radio"
yeah sorry, it's been a minute since I messed with them for cnd speech
all those hours came flooding back
How hard do you think it would be to do a functioning piano roll in lua?

Is that like how starbound instruments are handled?
Always hoped someone would make a mod like that
Well the idea is like playable guitar, but instead of binding the keys to the keyboard and having to play in real time, we'd draw the notes in a piano roll and then you could select the tempo and save your arrangements and play it back.
That way there'd be no latency.
Additionally I was thinking there'd be a way to synch up to form bands so that the music always plays in time, (each arangement added in a band would be played at the same time on each client )
I'm trying to mock it up in python to get a feel for it
indeed, thats where I got most of my songs for starbound
I don't wanna rely on ABC files to play prewritten melodies, I want the users to be able to draw and make their own compositions
couldn't you do both?
and how will these compositions be stored?
space station 13 lets you use prewritten and writing your own
what do u think about fl studio in pz? 
yep, its just shorthand notes
it's just text
you're definitely going to have to do whatever you go with yourself anyway
oh so it's like a json for musical notes
sorry I'm way tired if I say something stupid it's probably stupid
I'm just sayin, I think a DAW like approach would be the best way to do actual compositions in zomboid
and to solve the issue of latency and allow for collaborative performance
If anyone is like, interested in collabing with me on this I can provide all the musical samples we'd need -- I own a very well known library.
We have a collab section in the pz modding community server
I thought you were already in there?
That section is for large projects one may be working on but could also use help
but not the modding one
I'd like to recruit peeps to work on a DAW like project for sure
i'd honestly be quite interested in helping out with that, but i really shouldn't take on more work with the crazy stuff i'm up to right now
It's a really good idea, but I'm not musically inclined enough to tackle it lol
i'm not ui inclined enough to tackle it 
I wouldn't mind handling the UI tbh
Those crazy guys made an online version
Kind of ruins half the fun irritating everyone on the station as you compose
Oh misread - it actually converts audio into the shorthand version - interesting still
I'm musically inclined
๐
I'll chat at ya'll some more about it in the other discord
I've been losing my mind over this so I've had to come here. Is there any way to conveniently check distribution lists, to see what is actually being added to containers and what's not being added?
When there's items with a low spawn chance it's difficult to see if they are in fact spawning or not
enable LootZed from the debug cheats menu
then right click the container icon in the inventory and a drop-down with 'Open LootZed' should appear
that lets you check spawn chances and reroll loot
... you see now I just feel like an idiot.
atleast I didn't smash my monitors like I felt like doing yesterday
Thank you truly!
if two separate mods add the same file, the last mod loaded in the load order will 'overwrite' the first.
buuuuuuuuut what about media\clothing\clothing.xml ?
I can see both brita's armor zombies and authenticZ zombies walking around. shouldnt one of their outfits be overwritten? hmmmm
I'd assume it "merges" them together only replacing things with the same exakt name within the file?
only lua can be overwritten.
kick me if I'm wrong.
assets can be overwritten
in txt recipes with the same name cause their duplication in the game, if they are in two mods, for example, even with the same file name.
As for items - only Module and item ID matters to overwrite the item (in script).
As for XML - identical headers overwrite each other, but not the file itself (for Clothing.xml it's should be Name or GUID)
LUA is more complicated - global fuctions with the same name overlap each other. Two files with the same name overlap each other.
txt files will overwrite each other
in script?
I don't think it should, as far as I remember from the tests....
it definitely does
Okay, I trust you more than myself xD
interesting. so in this case, in the clothing.xml
<m_MaleOutfits> <m_Name>Brita_Sheriff_4</m_Name> from birta's armor, clothing.xml
<m_MaleOutfits> <m_Name>AuthenticAbeLincoln</m_Name> from authenticZ, clothing.xml
so what would the "header" be, <m_name>, possibly? (both mod authors were careful not to make something generic, they all have prefixes)
or maybe <m_Guid> ? (not sure what these are. example, 1101721c-3d8f-4ccd-8344-b9cf13321475) <-- clearly unique, hash looking number and unlikely to ever be overwritten.
@ albion, they can't possibly overwrite, or how would i combine authenticZ and britas zombies - they both need their clothing.xml files
Most likely m_Guid is being overwritten
Name as far as I remember is often used when referring to Zombie Outfit (in case of searching a corpse).
That is, there can be several variations of a zombie under one name (different GUID)
And in case of zombie spawning - a random outfit should be taken (same name, different GUID)
don't know about xml, not my area
i was just commenting on txt
oh.
Most likely, if you want to overwrite some zombie, use the same name and GUID - 100% variant)
swag
in vanillas has two variant zombies on same name and guid - but different female and male
Reason: Bad word usage
Hello everyone,
Is there a function akin to processSayMessage that does it as a system message instead? I am trying to run in-game tips for players but unfortunately the say message does actually transmit to other players, so I'm looking for alternatives
His someone know how to remove every attachment on a weapon with an function ?
i assume i can add more lines to weight related grids aye? (tetris inventory)
im having a hard time making these into more realistic sizes
add more elseif for be sure
Hello there, from lua , how can I change the color of a clothing inventory item ? (e.g. from an instance of 'Base.Vest_WaistcoatTINT') I do not find the info in the load function of Clothing.java
I'll ask Transmog, they seem to do so.
getVisual():setTint(ImmutableColor color)
If I play a sound on press Q (idk the event) will it play a sound if they are typing ingame
yes. it will even play in the main menu. which is why you start the 'keypressed' function with 'if player not ready return end'
Damn
But it's gonna be a nod?
Mod
How will it play in menu if its a mkd
the Events.OnKeyPressed event works in the main menu. all mods are loaded when you launch PZ, as well as when you activate one or more in the mods menu, and press Accept
unless typing, in multiplayer, avoids this problem. not sure, never tried to use a keybind while in multiplayer while typing.
(or as you said, type a word that has a keybinded letter)
if you type in: mod_development into the discord search bar, you can search only this specific channel, and then i searched sound shout and it looks like people may have already worked on similar projects, which you might be able to look at or read about
Ty
The local Gas 2 Go nationalist suggested I ask here, so I'm copy-pasting my question here:
Is there a main Fallout-themed PZ project people are working on? I've seen a number of Fallout models posted here and on the Steam workshop, but the latter ones are sparse.
not sure. but, you can go to project zomboid's steam workshop, and at the top, under the Browse drop-down, instead of looking at items you can look at collections.
then you can search 'fallout' and sort by most popular / all time (or whatever) and there seems to be some 'project fallout' modpacks
alternatively, theres a separate modding discord for group projects. im not in it, but its possible theres a big fallout project over there?
I personally wouldn't spend time working on something that could get a cease and decist, though.
I think I'm in it
I just don't have the modder role
And I don't think I can
Cause I don't use ko fi
@silent mural Hey hello, I'd like to talk to you in private, can I DM you please?
Anyone know how to overwrite an outfit from a mod's clothing.xml?
for example, I want to remove the hat from AuthenticAbeLincoln.
I can simply add a line of text: <probability>0.0</probability> above the hat, and it is gone.
However, I need this in my own mod, which will be loaded after AuthenticZ, in this case.
If I create my own media\clothing\clothing.xml and create an <m_MaleOutfits> entry for AuthenticAbeLincoln, however, he just appears naked in-game.
Hi. Sure
thx
Did you duplicate the whole entry or just the line for the hat?
the whole entry
And the probability just for the hat's GUID not anything else?
I haven't worked with the XMLs before, but looking at it, I'd assume that's how it works.
yeah, everything else should be 100% by default,
Paste me your edited XML?
@cunning dome at the moment, its just the first 73 lines of AuthenticZ's clothing.xml.
but the relevant bits:
<outfitManager>
<m_MaleOutfits> <m_Name>AuthenticAbeLincoln</m_Name>
<m_Guid>a541548a-9933-4bbc-bff1-4931cb5d5c94</m_Guid>
<m_Top>false</m_Top>
<m_Pants>false</m_Pants>
<m_AllowTopTint>false</m_AllowTopTint>
<m_items> <!-- Suit Pants -->
<itemGUID>52acd769-424a-4cbb-b02a-441cb723b747</itemGUID>
</m_items>
<m_items> <!-- Stove Pipe Hat -->
<probability>0.0</probability>
<itemGUID>0601a52d-84c8-49f8-b216-d2b1fc54c3a9</itemGUID>
</m_items>
</m_MaleOutfits>
</outfitManager>
I would assume he should spawn with pants and no hat. instead, he spawns completely naked.
(i deleted the other lines, it also specifies socks, shoes, watch, shirt, jacket)
Your full XML includes the lines for his other clothing items right?
nah, i just deleted them, to match what i posted above. so just pants, really.
but this is AuthenticAbeLincoln in game:
If you haven't included them then I would assume he would spawn wearing nothing. You're effectively overwriting the entry for his outfit GUID, so you've got to include everything you want him to wear.
yeah that would make sense
So try...
<outfitManager>
<m_MaleOutfits> <m_Name>AuthenticAbeLincoln</m_Name>
<m_Guid>a541548a-9933-4bbc-bff1-4931cb5d5c94</m_Guid>
<m_Top>false</m_Top>
<m_Pants>false</m_Pants>
<m_AllowTopTint>false</m_AllowTopTint>
<m_items> <!-- White Zed Skin -->
<itemGUID>9c87b588-b784-4560-bada-fd4cf7e44d48</itemGUID>
</m_items>
<m_items> <!-- Suit Pants -->
<itemGUID>52acd769-424a-4cbb-b02a-441cb723b747</itemGUID>
</m_items>
<m_items> <!-- Socks -->
<itemGUID>ebea15c8-99b3-4e20-905b-d22cf82b8217</itemGUID>
</m_items>
<m_items> <!-- Shoes -->
<itemGUID>593bea3d-c127-4574-ac1e-2197dc56e486</itemGUID>
</m_items>
<m_items> <!-- Tie -->
<itemGUID>1be7cae9-82bd-473f-8de9-23a8d9ca3117</itemGUID>
</m_items>
<m_items> <!-- Formal White Shirt -->
<itemGUID>ac7976de-2c73-44ea-9392-5d24ac1fb649</itemGUID>
</m_items>
<m_items> <!-- Suit Jacket -->
<itemGUID>eecd5923-4944-4b33-9c4c-66045ea6984e</itemGUID>
</m_items>
<m_items> <!-- Watches -->
<probability>0.9</probability>
<itemGUID>4cbb081e-0e9a-4248-bec1-0aa226e082e1</itemGUID>
<subItems>
<itemGUID>e4b3135f-a541-4870-a7b9-2ba6f730bc5c</itemGUID>
</subItems>
</m_items>
</m_MaleOutfits>
</outfitManager>```
_Edited: Forgot a line_
ERrh
There, just with the Stove Pipe lines deleted, basically.
Or with probability 0 if that doesn't work I suppose.
If still not, then it's beyond me. ๐คฃ
What have you got against ole Abe's hat anyway!? ๐
its part of a larger mod where I remove any 10-years-later lore-unfriendly zed from brita's and authenticZ.
its mostly done, but there are some zeds that i want to keep, but remove an item
(football player is fine. carrying a football in his hand, is not) ๐
Aaah~ Neat!
wait, why does your code, above, work? huuuuuuuuh
ยฏ_(ใ)_/ยฏ
XML is finicky as hell.
Miss a single closing tag or improperly format and it throws a fit.
only difference i could see was you didn't have <m_items> <!-- Dismembered Bone_Arm_L -->, but i assume that's because its an additional 30 lines for discord
Hell it might even just be the XML Schema doesn't allow probability 0 as an entry.
true, i didnt think of that
Though you said it worked when you edited the original.
well, i think i tried 0.000000001, but that could also have descended into scientific notation and made xml mad
All I did was copy the lines straight out of AuthZ, erase the Stove Pipe Hat and spit it back out and close tags.
Well as long as it works, the console isn't throwing any weird errors and the game is happy, I'd say we've solved it. ๐คฃ
@cunning dome its broken now. I copy+pasted immediately, when you posted. but then as my game was loading, you edited it 2 or 3 times
can you un-do whatever you did? the original 'mistake' you posted is the only thing that works
Huh... All I did was I forgot the </m_MaleOutfits> line
Which I would have thought would break it, not being there.
um... if i copy+paste your snippet up there, Abe is naked.
If I DELETE the </m_MaleOutfits>, he spawns with full clothes + no hat.. bruh
how does that make sense looool
i figured you left them out to save 30 lines of discord space
I mean I guess. ๐คฃ
I'm curious if it cracks it with the </outfitManager> missing as well?
theres no way that'd 'compile', so to speak. the thing is, I need to edit multiple zeds, not just Abe.
but how can i edit them, if they arent allowed to have </m_MaleOutfits>? hmmmmmm.. very strange
Try adding a second outfit entry then and see if the first/Abe one starts working then?
ah, for sure
I even ran your original code through an XML Validator and it was happy with it.
All this said, I'm not sure if overwriting a GUID like we're doing is "supported" so ...
But I can't find any damn documentation on any of this anyway, so how am I meant to know what's even valid..? XD
i was thinking maybe the very very very first line of the document was it, (i never pasted it into discord)
<?xml version="1.0" encoding="utf-8"?> but removing it doesn't seem to do anything
Usually that's just boilerplate and non-strict interpreters will be fine with it missing.
Best I can find googling around is vague "This file is for this" instructions, nothing at all about the actual Schema or expected syntax.
So unless someone else can point me to a resource I haven't been able to locate, we're stuck looking at examples/pre-existing code and extrapolating.
Hang on... did you still have the probability edited to 0 in Authentic Z?
nah, i deleted the hat, and other things.
In the original mod's local workshop files?
oh, um...
it might be. i should probably unsub, delete my leftover files, and then re-sub, to undo anything i tweaked over there
If the edits are still there, I'm willing to bet the invalid XML just got ignored and it fell back on your changes to the original mod.
my 0% edit is still over there, in the authenticZ workshop files. oops,
Yyyyeeaaah ๐คฃ
Okay well that answers one question at least.
My code didn't work. ๐
Could try just copying the entire set of AuthenticZ XMLs and then making edits..?
If you were planning on making sweeping changes anyway, it's a bit heavy handed but might get past this hurdle?
Because I'm wondering if any GUIDs your own mod is referencing have to exist locally.
I don't know why that would be the case but I'm kinda clutching at straws here given the lack of info.
oh. so maybe i need authenticZ's media\fileGuidTable.xml then, if that is the case.
There's a good chance.
i didnt think i need it, because while an "outfit" has a GUID, it is never used, anywhere, ever (as far as i know)
Yeah; items referenced in the outfits still do however.
hence him being naked, i guess.
shrug?
Worth a shot.
I came from editing distribution tables which involves directly modifying the Lua tables, so it doesn't matter which mod does it. For all I know the XMLs are scoped per-mod rather than globally.
so, fresh install, full outfit copy, and fileGuidTable copied, hat is properly removed.
so I'll be able to slowly remove stuff until i get to what breaks, so its not so heavy handed
thanks for the help
No worries, good luck.
the the looking for someone help me finish fairly simple mod just need lil help with traits and random things character will say
if you can help
please dm me
il credit you in description
I still need a little help with this, looked in the events lists and didn't find anything related
What code should I put in render and what code should I put in prerender for ISUIElement daughter classes ?
for some reason putting "ReplaceOnUse" for using an item, crashes my game
so its a frankenstein of an item.
the item is treated as a food, that when consumed it should just replace it with itself, then also gives some stat effects on consumption
but replacing the item with itself is what is causing it to crash
create two similar items that replace on each other
You also need a eatsound for your item
Alright, sucks I can't just use the same item but if it makes the game happy
Ya I didn't get that far yet, but the eat sound isn't giving me any issues empty
New WIP mod, disable traits, and profession from the server sandbox options, compatible with all traits and profession mods!
This will make life so much easier for server owners and players like me who want to disable noob traps when playing with friends
Is there anyone here whoโd be willing to accept a commission for a mod? Iโd like some custom stuff for my server.
@ancient grail is probably the man for you
Is that so
not with his reputation
Of being a gigachad*
But ya from what I've seen, Glytch3r is great for submissions
He has a kofi page you order them through
Got a link?
Ayy, does anybody know where I can find a complete list of item variables? Like, I'm trying to add a clothing item and I'm unsure which variables I need. For example, Glasses have the attributes cosmetic and weight. So, is there a list of every available variable somewhere?
thanks!
oh damn, that's quite the list. many thanks 
Are variables false by default? 
i think it probably varies
Anyone know the ideal dimensions to use for the poster/preview images?
workshop preview must be a 256x256 png
i think in-game posters are a lot more lenient with resolution but most people just use the preview
Sweet thanks 
is there a green + icon in the game assets?
i looked through like 4 tilesets and found none
theres this in ui if it helps
Yess, thank you!
can you send me the file?
Thank youu
838x471 fits perfectly in the in-game poster on 1080p at least
incase anyone else searches for this
check console.txt
press f11
if an error happens during that loading sequence it doesn't open the debug menu, but it still pauses as if it had
so you need to press f11 to 'close' it
I had this issue when playing on brita armor pack, running the game without debug works
was actually lookin for a mod like this
while being in main menu you can disable the "Break on Error" and that should prevent it
@heady crystal I joking on your Icecream mod thread, If you find it offensive or just not funny, please tell me and feel free to remove my comments :drunk:
What happened? I didn't get any notifications lol
You're too fast, I wanted to post here just before invading your thread
Ahahah
I see it
Woah I can't believe you exposed my plans of microwaved ice cream domination
There is only one way to solve this
Hello
I'm back again! I've been doing some sculpting and stuff, but I haven't quite figured out how to implement my blender file and icon into a mod yet. The guide on the wiki that explains how to add clothing is apparently not available anymore, as the link takes me to a 404-not found site
Does anybody have a link to a guide?
How to make a pizza ๐
try putting the link into wayback machine
I'll tell the world of your misbehave ! https://steamcommunity.com/sharedfiles/filedetails/?id=3003939739
Steam Community: Project Zomboid. [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2982620850]Abuse of Icecream[/url] is bad for health !
is there a tutorial to make a True Music Addon
Wait, I have my blender file of my clothing item.. how the hell do I convert it into an .x File, so I can put it into the model_X dictionary?
Blender seemingly discontinued the export into .x files 
afayk you can use .fbx format https://theindiestone.com/forums/index.php?/topic/37647-the-one-stop-shop-for-3d-modeling-from-blender-to-zomboid/
Hello and Welcome! Here you will find a concise and comprehensive guide and tutorial of making 3D models for Project Zomboid. Currently, this will mainly pertain to custom Clothing creation but may include weapon creation in the future. This will present how to create models from scratch with Ble...
how hard is it to mod in actual video
and audio
for a tv
cause i had an Idea for a mod that loops an Emergency Alert System Message after the normal tv channels stop playing
this is the video i made and would like to use: https://www.youtube.com/watch?v=kUA4xV02dcA&t=1s
I made this in like 3 hours (learning experience) as a start to what I hope will become a Project Zomboid mod, feel free to use this for whatever purpose.
I'm sorry guys, it must be done...
project zomboid 100 days,
project zomboid 100 days multiplayer,
project zomboid 100 days rooftop,
project zomboid 100 days modded,
project zomboid 100 ...
i think you can just add an extra tv sprite for that
Thanks!
got home and tried this, the crashes still occure
so the problem may not be that it is the same item
Are there any ways to open x files in blender
Is there an error?
In the newest version you can use the plugins from google to import but the export option doesnt work
Im on 2.93
Not sure if it'll work for that version but I used https://github.com/oguna/Blender-XFileImporter
Alright
Thank you
Everytime i have to say x files, it just reminds me of the show
@sage eagle I don't know if it's a gif or a sequence of pngs, but @ riko prushka made cartoonTV and animeTV mods on workshop, you might look at, to see how it was done https://steamcommunity.com/sharedfiles/filedetails/?id=2850170557
i have no clue because the game just immedately closes
ive been digging through the console file, no errors or stacktrace
the only thing the console shows, is the error for missing translation, because I didnt make a translation file for the context menu yet. then like 5 ticks of my print messages, then nothingness
Wdym?
ah
thx
what inspired you to make this
and secondly, I wanna ask you about a mod idea
i see that you could benefit from it if you knew how to make something like this
I moved code for a IsPanel from :render() to :prerender(), because there was a noticable lag when I was trying to make the height of my panel dynamic (panel.SetHeight()) INSIDE the render() function
But now that I moved everything to prerender, there is no background/border at all ?
why do u even need to change heaight of panel each frame
just change it when list of items is changes
true ๐
Youd have to put the background into the prerender
Does anyone know how difficult it would be to make a positive trait that gives bonus happiness when eating a specific food item? I'm completely stuck with this rn
add the trait and hook into the eating action i think that would suffice
resolved!!
is there a way to add custom sentimental items for the more traits mod?
I just made a mod that removes jewelry from zeds (BellyButton x15, Bracelet x10, Earring x19, necklace x26, ring x20), by removing them from the outfits in clothing.xml. it works great.
Now I want to get rid of the underwear: boxers x5, bra strapless x4, bra straps x3, briefs x2, frillybra strapless x3, frillybra straps x3, frillyunderpants x3, smalltrunks x4, underpants x4 ... but underwear doesn't seem to be part of an outfit. it must be generated elsewhere?
googling "project zomboid remove underwear" isn't going to get me anywhere. anyone have any ideas?
perv!
If anyone can guess what this is for I'll give them a cookie
Im guessing it has to do with sound somehow
@nimble yarrow you might wanna check UnderwearDefinition.lua
-- used to spawn underwear automatically on zeds
media\lua\shared\Definitions\UnderwearDefinition.lua found it, i'll check it out!
the circle keeps getting bigger because of a keypress.
Have you corrected my BattleRoyal draw bug ? ๐ I4ll give you a Cookie !
yes, when drawing a circle on world, sometimes it is not visible. non-systematic
but, I am using UI function while you are using marker
my guess is that also checks what player sees?
It's related to sound
zombie sound detector?
Is this some kind of echolocation lol
Is it how far player made noises travel
i dont get why it keeps pumping once the player stops walking
unless this is just our first peek at how sound actually propogates in PZ engine
oh no
Is voice chat actually picked up by zombies?
are you saying i can fart in my mic to summon zombies?!
Yes x3
nice
Do you give the zombies the player in their aggro list?
And do you do that through the server?
It just catches microphone activity and uses addSound()
I thought it needed way smarter stuff for it
Can you get the micro activity through lua?
Yeah
I used the same stuff from the menu - the voice activity is picked up and displayed there
"Operates regardless of push-to-talk." good thing my computer fans sound like a rocket engine
Getting photoshop to produce AI-gen art that looked decent took longer than writing the mod
I will probably look into push to talk later
I think most people have push to talk
what AI generator do you use ?
https://www.imagine.art/dashboard + photoshop's generative fill
Took super long cause I'm picky as hell lol
How the hell did you get the right number of fingers with Imagine AI ? I always get 6 minimum
- having to get creative to get blood and gore. For example, this man is actually drooling red paint ๐
Oh the hands were from PS
drooling red paint, good grief
They were gnarly as hell, and the gloves were an accident but I liked them lol
gg
push to talk wil be required for streamers but it is a good ambiance realism directly from the mike
That mod can nicely elevate to a RP mod with walkie-talkies, headsets that actually work like a in game way of communication with others ofc. drawbacks such as not using anything -> widest radius, walkie talkie -> smaller radius, headset -> lowest radius
Things like that makes you wish you got a whole crew ready to take any kind of photographs
Is there a way to make a player not targetable by zombies ? (out of god mode invisibility that also makes invisible to players)
Sadly not really - in SP you can set zombies to useless
thanx
I'm having a severe skill issue trying to spawn in my own clothing item.
It appears in the item list, although with no item icon and when I try to spawn it, it just gives out an error
I believe I referenced it correctly in the .xml files
I'm helpless
Does anybody know where the problem could be?
Fixed it! Apparently I needed the "<m_AttachBone>" thingy in the xml file!

that thingy should be at hip height, so uh, now just gotta figure out the elevation
is that a piece of ginger?
chicken breast?
the missing icon of modded item in the list is a vanilla specific behavior. It will appear with TchernoLib mod. and you can have the tooltip with AutoLoot mod
It's supposed to be a stuffed lion paw
I had a much more detailed object before I smoothed it down to pz standards
Oh, thank you
Push to talk support added ๐
in a mod recipe, what does like "Pasta;20," mean in something like
recipe Prepare Yakisoba in Wok Pan
{
Pasta;20,
```?
the couple guides i read seem to say it should be like Pasta=20? is ;20 something different?
or possibly a bug?
i don't think bug, i see a ton of them like that with the ; instead of =. maybe just an old format?
looking at https://pzwiki.net/wiki/Scripts_guide/Recipe_Script_Guide i don't see an "item;<count number>" format mentioned anywhere
Hey guys, I'm trying to familirise myself with remote calls it's been something I've struggled with grasping for a while, say I have a bunch of playerobjects grabbed from within the server side code and I want to execute a function for just those players client side, could anyone help with a basic demonstration or point me in the right direction, I'd be very grateful as always ๐
Look into sendservercommand and receiveservercommand i believe they are called
Thats how you can communicate from server to player and vice versa
Yeah I had a look at these, I was hoping I could pass a function straight through
public static void sendServerCommand(IsoPlayer player,
String string,
String string2,
KahluaTable kahluaTable)
I guess I would need to create a table to contain the function I wish to run? or am I overthinking this cus #everythingsatable 
Oh I think I get it.. I can use the events for onservercommandreceived and check for the string the command sent
Thank you I think I can trial n error from here ๐
the number after the ; must not mean count required like = does. it doesn't make sense for most recipes that it would be. don't need 20 pasta to make 1 dish of that.
i think it must be the % of the item that is consumed
recipe Dip Nacho in Chili Bowl
{
TortillaChips=1,
BowlofChili;4,
uses 1 tortilla chip, and 4% of your bowl of chili?
seems reasonable
So for the item I made that keeps crashing my game, I made a new set of items and slowly added every line from the crashing item into the new one. No issues at all with the entire item remade. So I have literally 0 clue why the item was causing crashes
@tacit plover that sound right?
This is going to send me to the mental ward man
@autumn temple lol tell me about it. so much stuff in PZ is like that. undocumented or out of date documentation...
uhh, yeah, using "=" uses how much of that item you'll need
and ";" uses a set amount of that item hunger
ooooh. interesting. i could not find that little bit of information ANYWHERE haha
also, seems like my update broke some stuff with vanilla recipes, but you were being getting kicked before the update so i have two issues to fix now 
if you really want to know how the code works you can decompile the java code
it contains a lot of stuff you're not going to find in the lua code
@tacit plover don't worry too much about my kick issue. it may have been an issue for a very long time, but everyone just disables anticheat 21 so it got ignored
@sleek forum that's too much effort right now, maybe later haha. i saw someone in a "certain forum" already did that and posted it tho
testmod.addContextMenu = function(player, context, worldobjects)
for _, object in ipairs(worldobjects) do
print(object:getSpriteName())
print(object.name)
print(object:getName())
print(object:getType())
end
end
Events.OnFillWorldObjectContextMenu.Add(testmod.addContextMenu)```
I am trying to call this function when the player right clicks on an item placed/dropped in the world. I want to return the type of the item that the player is clicking on (or more specifically, find out which item the player right clicked on). It's behaving weird and I am not sure why. getType() is always returning "MAX". object.name and getSpriteName() always return "nil". object:getName() return "nil" unless I pick up the the item and re-place it, and is not reliable in case the item's name was changed
Any idea what's going on here?
don't know really, but it reads like it's not reading up to date data (because it's missing, and then not)
for reference, the item has an instance of IsoWorldInventoryObject
ty
alright solved had to do object:getItem():getType()
How does blood work? I'm currently modeling a facemask, and I want it to be all black.
And when you kill zombies, it gets painted red with their blood, but does the game do that itself, or do i need to like, show where the blood lands or something?
something else--
Frogshire.frogContextMenu = function(player, context, worldobjects)
local frog
for _, object in ipairs(worldobjects) do
if instanceof(object, 'IsoWorldInventoryObject') then
objectType = object:getItem():getType()
if objectType == "Frog" then
frog = object
end
end
end
if frog then
print(frog:getItem():getName())
end
end
Events.OnFillWorldObjectContextMenu.Add(Frogshire.frogContextMenu)```
Right now, "frog" is assigned to whichever is lucky enough to be the first object in the "worldobjects". That's not ideal for items clustered around closely together. Any way to make it only be assigned to the closest object to the click?
sorry i can't help, but this is pretty funny. very specific to PZ issue and how realistic parts of it are, but also funny how some people prioritize "the drip" over everything haha
dont you just love it when you're so invested in creating something you can't be bothered to eat or sleep
time flies by and its already midnight
watcha working on @sleek forum?
im working on a program that renders the zomboid maps in real time
i slept at midday because of my current project
what programming language dezuzel?
C/C++, and SDL2 library
good luck ๐
thanks man
isometric/overheader? or going to let us walk thru in 1st person? ๐
haha i'm going to start with an overheader
i'm curious how fast a framerate i'm going to get once i get it all working
so is it going to be like https://map.projectzomboid.com/ or https://pzfans.com/vanilla-full-map/, but not pre-rendered?
that's the idea yea
seeing it all 10-years-later'd would be pretty cool
reason being is that pre-rendering takes aweful long
for sure
once it's working then you can port it to browser ๐
LOL
like this ๐ they ported whole c++ game into browser, it runs great
newer fork of that https://sourga.me/
Sauerbraten for the web.
new fork doesn't work for me in firefox tho ๐ฆ
this is my entire screen
other times its like that
others its just black
or others its stuck on the main menu
oh it breaks that early?? i thought you meant it broke when starting a game
where is console.txt
zomboid folder
now its on the main menu screen
im confused on what this mena
i could move it to a new folder
backup is a crazy thing
in the game hit E key and there is in game editor that is really cool
i use to play the regular game and just spend ours in multiplayer on servers with friends co-op editing
it has a cool in game editor
How to make an item appear as a 2D icon when I drop it on the floor?
There's the attribute "WorldRender" which prohibits it from rendering as 3d, but it didnt use the icon instead
thats crazy
in 10/20 years we'll be running games that need 4090's to run now
in the browser
Finally. I think I'm done with assigning icons to everything in the vanilla world context menu. I've also made it so the highlighted texture renders in the center. Just a few more functions to add that I'm missing, then I think first release is ready.
@sleek forum too bad we went so far back technology when they went from flash to html5 ๐ข
now a game that ran fine in flash back in like 2005 will still barely be able to run on the latest average hardware if made in html5
Hello guys ^^ This is not a mod, but I made script for server owner want to control they PZ server with an discord bot ^^ With RCON, and start command ! ๐
what is the interface for other mods to adapt ?
Just add stuff to the conxtext menu like normal. That will add an entry without a texture, unless you're adding one for a string/function I check for. To add an icon and stuff, here is the basic example I was going to give:
local decor = (getActivatedMods():contains("SUI-RCM") and require("RadialContextMenu/Decorator")) or { overlays = {} }
local example = function(player, context, worldobjects, test)
-- Add a context cption just like normal
local option = context:addOption(getText("ContextMenu_Turn_On"))
-- Set the Icon for the Radial Slice
option.icon = getTexture("media/ui/Container_ClothingWasher.png")
-- The following can also be used for compatibility with the Context Menu:
--- option.iconTexture = getTexture("media/ui/Container_ClothingWasher.png")
-- There is also this function to pass a texture directly, ONLY works with this mod enabled:
--- local option = context:addRadialOption(name, texture, target, onSelect, params...)
-- To set an overlay icon (optional)
option.overlay = decor.overlays.poweron
-- To set a color:
--- option.color = decor:Color(0, 0, 1) -- returns: { r=0, g=0, b=1 } -- blue!
end
Events.OnFillWorldObjectContextMenu.Add(example)
Does anyone know how to get in touch with "Brita" or "Arsenal" I can't understand the english they used for their tooltips
Does an higher number give less ammo or more ammo?
Is it possible to add more challenge scenarios via mods?
I havent seen any on the workshop
yeah, i think there's a few
How can i get the zombie 3d models for creating custom textures?
@gilded hawk higher number gives more. use 0% to remove ammo completely
Oh god thank you
Wait, are you sure cause the options seems the opposite?
EnumCaliber12gShot = 8,
-- Type
-- - Reduce or Remove Weapons based on Type / Caliber Ammunition
-- - This will affect associated Items and Ammo
-- - Only when those are not used by another Category Default=10%
-- 1 = REMOVE
-- 2 = 10%
-- 3 = 20%
-- 4 = 30%
-- 5 = 40%
-- 6 = 50%
-- 7 = 60%
-- 8 = 70%
-- 9 = 80%
-- 10 = 90%
do they seem opposite? ๐ฎ how so?
Idk man the language used in the tooltip is confusing me
basically,
"reduce or remove weapons based on type/calibur ammunition" (by lowering this enum)
this will affect associated items and ammo
only when those are not used by another category (if you disable crossbow bolts, crossbows will not spawn, or visa versa.)
i always play Pre-1993 USA ONLY, so I disable 4g, 10g, 7.62x54mm R, 5.45x39mm, 7.62x39mm, .45-70 GOV, 5.7x28mm
(these are either post-1993 or outside the USA)
so yeah, lowering the enum should disable ammo types, right?
So, if I do 100% I'm reducing the spawns by 100%? ๐ค
no. you're doubling spawns
starts at 50%. can drop down to 10%, or even turn off completely at 0%. you're now increasing from 50% to 100%, double loot
Man, this is EXACTLY what I was looking for.
I spent some time yesterday testing if the VOIP system could agro zeds, but got frustrated as it did nothing :/
Great work 
Just to clarify, what is the max range it can trigger zombies? (Tiles) 
15 tiles. Volume goes up to 10, I multiply it by 1.5. If you're sneaking it's multiplied against 0.66.
I think shout has a range of 30.
It's very trippy to suck my teeth to call over zombies.
I'm a bit of a dingus, so bear with me - but shouldn't this output the key # to the log? Nothing's been happening
print(key);
end
Events.OnKeyPressed.Add(ShowKeyPressed)
it should, where is your file located?
is the mod structure working? you can select it from the mods list and everything?
oh, right
myfolder/media/lua/client/
yeah i have it active, a diff function i have in the same file is outputting
hmm
There's a small mod idea I had to get used to code modding in PZ. I've been looking through the javadocs, but I couldn't find anything there.
How would I go about calling a function when a specific gun is fired, or if a person/zombie is hit by a specific weapon?
i would've guessed it was a loading issue because i don't see why it shouldn't work
i'll try a restart or smthn
i hate having to troubleshoot outputting logs lol
but i have no idea what i'm doing so it's no biggie hehe
troubleshooting the troubleshooting 
I can imagine myself sneezing IRL and having a big problem in-game ๐
I'm managing a playthrough with my friends only using in-game VOIP and walkies. It's gonna be rough 
Thanks again for the mod and the info
yeah a restart and now the keys are outputting lol rip me
weird, were you resetting lua between tries?
Functions added through events wont reload if you edit them
ok thanks
you should still see the print since it'd add the new one on top of the old one
it was printing nil
You could look on the events of the game. For your case, I think OnHitZombie or OnWeaponSwing would work
In your function, you can filter if the weapon is the one you are looking for, and do what you want
Ahhh. So it'd be more of a generic function that would keep running, rather than something in the weapon that calls it?
You can look in the wiki for all the events the game have:
pzwiki.net/wiki/Lua_Events
Righto! That'll be helpful, PeteR. Thank you ๐
function Frogshire.getFrogFood(player)
local playerObj = getSpecificPlayer(player)
local invent = playerObj:getInventory()
local foodTypes = {
"Maggots", "Maggots2", "AmericanLadyCaterpillar", "BandedWoolyBearCaterpillar",
"MonarchCaterpillar", "SawflyLarva", "SilkMothCaterpillar", "SwallowtailCaterpillar",
"Centipede", "Centipede2", "Cockroach", "Cricket", "DeadRat", "DeadMouse",
"Grasshopper", "Millipede", "Millipede2", "Pillbug", "Slug", "Slug2", "Worm"
}
local combinedTable = {}
for _, foodType in ipairs(foodTypes) do
local items = invent:getItemsFromType(foodType)
for _, item in ipairs(items) do
print(item)
table.insert(combinedTable, item)
end
end
end```
Trying to return all items of specific types in a player's inventory and put them in one table. ``local items = invent:getItemsFromType(foodType)`` works correctly and prints "items" as it should for each type, however, when I loop over the ``items`` table in ``for _, item in ipairs(items) do``, nothing is printed or added to the combinedTable. Am I iterating over them incorrectly?
There is a swing event an OnHitCharacter and onhitzombir event
Not exactly, some things that happen on the game can trigger events, and you can add functions you make to trigger too
You're welcome ๐
I see! The part I was mostly curious about on how I was going to trigger it, but the event list you sent also helps ๐
Yep! I just found the OnWeaponHitCharacter ๐
getItemsFromType() probably returns a java list
Which you have to iterate over differently than the lua tables
