#mod_development
1 messages ยท Page 22 of 1
how do you check that on console?
local key_data_NarakaStance = {
name = "NarakaStance", --just id (user won't see this name)
key = Keyboard.KEY_APOSTROPHE,
}
if ModOptions and ModOptions.AddKeyBinding then
local category = "[Combat]";
ModOptions:AddKeyBinding(category, key_data_NarakaStance);
end
local function NarakaStance(keynum)
if keynum == key_data_NarakaStance.key then
print("Hello! You've pressed 2 on the numpad!")
end
end
Events.OnKeyPressed.Add(NarakaStance)```
I managed to get the keybinding to show up in the mod options and all but I can't get it to do anything in the game itself
what am i doing wrong
i needed to fully restart my game
Fellas, how do I do an If statement check for a custom weapon property
Something like:
if (NarakaWeapon:IsSupported()) then
cause i tried that and it broke
Yes, I think
item:getModData().isSupported
(i am not good at lua, i am literally getting by from referencing existing mods)
Something like that would probably work
Let me try, thank you
I havent personalyl dabbled with weapons yet but that's my best guess
(keep in mind you've have to set the mod data first otherwise it'll return an empty table, and isSupported will be nil)
Oh awesome, yeah that didn't break
gaming!!
maybe using a tag would be easier? that way you don't need to set the modData for each individual inventoryitem object.
because the tag you can attach to the item script, and then it will be on all instances of that item
when i have a function called by recipe create
and it doesnt consume any items it will create a subcontext saying one or all
how do i remove this?
i figured i can destroy the item and result the same item
but it will change position on the ground
this is not ideal since im doing doing this for my wormhole mod
Hmm, how do I create a custom tag? Do I just list it under the Tags =?
yeah you can just write them into that list
In that case, how do I phrase the If statement for tags? (again, completely new to Zomboid lua)
Call the modData again?
does anyone know how to control the player's vision cone?
i found the ViewDistance variable that seems to match the size of the cone in half degrees. but setting it does nothing because it updates its own value before using it.
anyone have any ideas? im pretty sure i need a PreRender event to make this work which as far as i know doesnt exist.
annoyingly, the Ambient light value can be changed during player updates or OnTick() and it works just fine
should be item:hasTag("customtag")
there is also a getTags, which should give you a list of them too
probably will need to dig into the decompiled code yourself to check. there are some things that can't be implemented due to them being done java side. for example a while ago someone wanted to make blind zombies, but it couldn't be done because the zombie target was set after any relevant lua event hooks so it couldn't be done easily..
If I make it work via tags, will other people be able to make their own mods work using my lua code if they use the same tag and have my mod enabled?
yeah
i think thats what is happening here.
the annoying thing is that the ClimateManager seems to be what handles the player vision. but no matter when or where you call setViewDistance() it always seems to self update the number before it uses it. you can see it by calling ClimateManager:update() and then checking the value.
i've burnt like 3 hours poking around so im calling it a night.
however. since i've never seen this used anywhere else. and it has usefulness. the ClimateManager's Ambient value determines how dark the game is. you can also pull the ambient color and a few other things from there.
I see ๐ค
I still don't understand how a tag would be easier btw, genuine question
But I like the whole "your variant will work too if you tag it like mine" thing
well, so the issue with moddata, is that it belongs to that one item. so if you make one spear, and set in the moddata give it a flag "isvalid" for whatever check you are trying to do, it will persist on that item. however if you make another spear, that spear has it's own moddata table. so it won't have the flag in it, until you set it.
so unless the flag you want to set is going to vary for different instances of the same item or vary during playtime, i.e maybe it isn't compatible for the first 2 months, but then after researching some tech, it becomes suitable. Those instances it might be better to use modData. but if the item is forever going to be either compatible or incompatible, tags work nicer.
just to be clear, by making another spear do you mean crafting/obtaining another one ingame or listing another one via a script?
if you make another of the same item. so if you make two vanilla wooden spears, they each have their own moddata
๐ค
interesting
So if im getting this right,
Custom variables/flags in weapon moddata (from the scripts txt) don't actually "stay" on each individual weapon, they're only manually called. While tags are always attached?
This is pretty confusing mb
๐คฃ
Like, aren't tags also part of moddata?
Or have i misunderstood what a moddata even is
Hi, does anyone know how to create a custom outfit in project zomboid?๐ค๐ค
i just did some testing and getUrlInputStream works perfectly ๐
Hello, I have been trying to make my first mod with just a custom bag. I wanted to use some custom audio for the bag closing and putting items in the bag.
While the audio works for the "CloseSound = " bit it does not work for the "PutInSound = " portion. I have tried swapping the sounds between them and they both work when attached to the CloseSound but not with PutInSound.
I have looked through a lot of different mods so see how other people do it but I have only run across people using the default PutInSound "PutInSound = PutItemInBag," Any ideas what I am doing wrong? I have tried copying the entire bag definitions from other places just incase it was some silly formatting thing but no luck
have you tried looking for the sound definition? not sure if i remember it correctly though
adding new sound file might not be enough if they require sound definition? ๐ค
i have vague impression that player sound emitter require those definition
Would that be like a sounds.txt or something under the scripts? Like this?
sound TestsoundPutInBag
{
category = Item,
clip
{
file = media/sound/CustomPutInBag.ogg,
volume = 1.0,
}
}
if so I have already tried that sadly. Both sounds do work for the record when attached to the "CloseSound" but not the "PutInSound" If you mean something else by sound definition then I don't know. Where would that be located?
PutinSound? sus.
have you tried looking for the vanilla putiteminbag definition and see the difference?
sound CloseBag
{
category = Item,
clip
{
event = Character/Foley/Bag/Close,
}
}
sound PutItemInBag
{
category = Item,
clip
{
event = Character/Foley/Bag/StoreItem,
}
}
That is from the sounds_item.txt from the game files
i have no idea what does that event means, someone might be able to help you understand that part
Mhmm, I don't think it is an issue with the sound definition at this point since
"CloseSound = TestsoundPutInBag" plays the custom sound but "PutInSound = TestsoundPutInBag" plays the default sound. I am honestly starting to wonder if "PutInSound = " even works
eh? it plays the default sound?
Mhmm. It plays the default put in bag sound regardless of what I put in "PutInSound = "
I have even tried putting in random other sounds defined in the base game
i'm not coming back home for few days so i can't look into it or help you any further. so, you might want to wait for someone with better experience
Mhmm. Thank you for trying to help regardless
@sand citrus
looks like an old bug.
https://theindiestone.com/forums/index.php?/topic/24318-putinsound/&tab=comments#comment-273529
The Indie Stone Forums
Hello, first post on the forum and brand new to PZ modding. Making some containers as my first mod, using custom sounds. Open and close sounds work fine, but PutInSound won't work no matter what I try, and is overridden by the default bag zipping sound. I've even remade the wav file to be sure th...
Uuuuugh. Thank you. I need to get better at googling issues.
Okay I have another unrelated question. Does anyone know what script/lua file/class adds the delete functionality to trashcans? I want to see how that is implemented and I have been unable to track it down.
Is using font size option to change the size of modded ui something that makes sense?
Or would people not understand ๐
Are you asking if it would make it clear that the ui is modded by having your modded ui be a different font size?
Would people assume that the custom ui size is based on font size?
Doesn't the game already use a few different font sizes for different parts of the ui?
Yeah, I think it's annoying if I relate it from that because...
It needs a custom size
I'll just add a button to change size or sth
lul ๐คฃ
i ended up using getZonesIntersecting and setting it to the size of the cell at the cell origin
not sure what the zone stack is
haven't read the source for that, might be faster if it does the same in the end
but new thing, trying to get gridsquare 0,0,0 for a cell to shove some moddata into
and it comes up nil
so i made a little function to ensure it exists (as i understand) and it throws an exception from the createGridSquare call with no details
local function getOrCreateGridSquare(cell, x, y, z)
local square = cell:getGridSquare(x, y, z)
if square == nil then
square = cell:createNewGridSquare(x, y, z)
end
return square
end```
currently operating under the assumption that i have the wrong coordinates so ima test with a print statement to validate
is it expecting world coords..?
Anybody here know if it's currently possible to define multiple "texturelights" fields in a vehicle script, based on the skinIndex???
well looks like createNewGridSquare already returns retrieved one so my method is redundant
but not sure why it's failing
How to walk to a point between tiles (squares)?
not sure if this is the right place to ask but is there a mod that lets me pan my camera while driving
without rolling the window down?
not right place, but that's a good idea for a mod
lol
If people want to ask if a mod exists, this channel is just as good of a place for it as the others? ๐คท
If people need help using mods, #mod_support , if people need help making mods, #mod_development , but modding also serves as the general "talking about mods" channel.
i guess ill just stick to rolling the window down for now...boo
oh, didn't think that was desired here, apologies
Well, as an example, some of the popular mods on the workshop exist because some random not-modder popped in here with an idea and asked if it existed or if anyone thought it was a good idea for a mod, and someone thought it was a good idea and made the mod?
Yeah it's cool that so many people only have 1 mod, that means that it's probably easy to mod
what is the item id name of the empty propane torch?
want to add recipe but keeps crafting a propane full one
@willow estuary based on that, in the off chance someone sees this and makes it a mod, simple weather shelter
hell even just being able to build above you would solve this
What other factor am I missing in getting a melee weapons total distance?
local totalWepRange = _weapon:getMaxRange(_player) * _weapon:getRangeMod(_player);
This used to calculate distance where a given melee weapon hits reveals the range to be slightly longer. (On the same z-plane)
local dist = IsoUtils.DistanceTo2D(_player:getX(), _player:getY(), anObject:getX(), anObject:getY());
i want to get a complete list of vehicles in a cell, but it seems cell:getVehicles() only yields loaded vehicles, and so is not a complete list unless someone runs around the whole cell first, causing them to all load in.
how can i either get a more complete list, or trigger all vehicles in the cell to be loaded in
ISPathFindAction:pathToNearest(playerObj, locations)
probably other useful bits in that class
It happens only at the beginning of a new created world/character. If I press one of the hotbar keys ( let's say I press the number 2 key on my keyboard ) my character switch to a surrender position ( hands raised ). Any idea why this happens or how to possibly fix it?
Good evening. I'm new to modding PZ and could do with a pointer if anyone could help. I've got my mod file loading but I have no idea how to access the Java object underlying the (player) parameter passed in. If I print (player) I get a zombie.character.IsoPlayer#(OBJECTID) type message, but I cannot concatenate it to anything and/or access any properties. Where am I going wrong?
Hey guys i messed up big here with a city mod.. change my spawnregion.lua file.. anyone has the deafault text that comes inside of it?
Javadoc Project Zomboid Modding API declaration: package: zombie.characters, class: IsoPlayer
use the methods on this sight for this object type like isoplayer is player
Thank you, will try that now
Yes, it worked, thank you!
Should I generally be calling methods on objects rather than trying to access properties then?
(For the benefit of other readers: code that worked)
properties? like the Field Summary on that website?
I'm just struggling a little with the java/LUA mashup. I've written a lot of Java, but very little LUA, although have worked on projects across C, C++, C#.NET, PHP, Java, etc... but I just couldn't intuitively grasp how to access the username from the (apparently available, according to the debugger) field "username" on the object "player"
Yes you should be calling methods generally.
You can however get that data too, by using getClassFieldVal
Also if you open the game in a text edtior like vscode or notepad ++ to look for examples of the code
\steamapps\common\ProjectZomboid\media\lua\
Thank you. I'll look through more of the LUA files but this was a really useful insight, appreciate it
Can someone tell me why the workshop version of my mod fails to load? (mod.info has the same name)
I thought they needed to be the same?
name=You are infected Trait
poster=poster.png
id=YouAreInfected
description=Giving you a more challenging start by having the Nox infection.
description=Intended to be used allongside another mod that provides a cure for Zombification
icon=logo.png
this is my steam game.
this is my -nosteam game
the steam version clearly doesn't have 2 copies of the same mod (from local mod folder and steamworkshop)
So it only displays 1 of them
%USERPROFILE%\Zomboid\Workshop\ModTemplate
This is where your custom workshop mods should be
I do remember clearing out my local files after i uploaded, it could just be me. Im going to ask a friend to try it out
Nope no luck on their end. Need to see why being on the workshop makes it not work (even though it follows the same file structure as other mods)
I removed the local versions so i know for sure that the workshop one just hates me
I think you need to create the media folder
Funny thing that...
I just found that out ๐ฆ
I was about to message that
Nice, works now?
Brain does not work but the mod does (ok cut of Media on the bottom of the image but you get the gist)
Thanks for looking into it
nice, I'm glad it works!
Is there a mod that adds something to stave off zombifacation for awhile?
Is there some way to control or mod that control the zombie population of individual cities or areas on a MP server. Like to increase the population and spawn of Westview but decrease on riverside??
is there a mod to allow dual wielding? I wanna dual wield night sticks, because if one bonk stick good, two bonk stick better!
I'm making a map. It loads into game without issue. It's not showing up on the in game map though, just looks like the vegetation that I put there. Anyone got advice for this?
(the vegetation that was replaced I mean)
Any idea how disable vanilla zombie respawn? and also spawn it using script? if possible, how to get zombie list. It's for my custom meta event.
Zombie list like zombies outfit?
nah, just like player list, im looking for zombie list to mess around like setting their targets, position and stuffs
Does anyone here mess with discord bots for pz? Ive been re-doing one of the bots from github to work with pzservertools and never really messed with the help menus much but its ugly af... didnt know if anyone knew where to start or what to look into. Thought about switching it over to hikari but was just asking first... right now the menu is ugly af https://imgur.com/ytDQhwL
Does anyone remember the name of a mod that automatically takes things out of your bags while doing a recipe and puts them back in after its done? My monke brane can't remember its name.
Never mind, it was Tidy Up Meister. ๐
hello there, do I need to add anything else besides my script for crafting recipe of existing items to function on dedicated server?
it's just a simple increased uses script for stuff like cement,gravel, etc
and crafting stuff
Do we have a mod that tells us the condition of a wound? Like, how many percentages it has healed?
I dunno about percentage but I use this mod https://steamcommunity.com/sharedfiles/filedetails/?id=2398253681
It says a message based off your moodles but only your character can see it in mp
Fun! Added!
So I'd assume they let me know when they have healed completely?
You can look at the Lua file itself. In the translations English folder. Should be in like steam/workshop/10800/2398253681. Folder (this probably isn't 100% correct cause I can't look. On my phone)
After you subscribe of course
I know it tells you when your full and stuffed etc it tells you as your wounds get worse dunno about healing for sure. You'd have to look
Speaking of mods.. anyone know of one that let's you shoot yourself? For rp purposes
Saw it 1-3d ago. try searching wit shoot or suicide
Congrats dude, ill be installing onto my server later. Looks amazing
Hello! I found an event when a player press the button to reload a firearm, but that event is not fired when the player do the same action using context menus. Do you know what can I use to also catch that case?
Or even better , something like a onBeforeShoot to prevent to fire a weapon based on a condition
does anyone know what's up with the vehicles.db file? it has an sqlite3 header but it's not valid
oh
turns out the db browser was sandboxed
Minor Theory:
Would it be possible to make Clothing that also has pockets (basically: containers that doubles as clothing) ?
bah, i got no patience, i'll just go and give it a try ๐
If possible, i just need to figure out how to make "patches" for other items, so i can make all clothing have pockets (unless someone already beat me to it lol)
Okay i find no mods which have converted clothing into "Clothing - Bag" items yet... The extra pockets would be nice for sorting purposes.
I'm the author of conditional speech -- it's mostly tied to Moodle changes - increases in Moodle severity plays a message thats procedurally generated. I did not think of wound healing but that is actually not a bad idea.
The only messages outside of Moodle changes rn are for sunrise/sunset and ammo.
Also I can make it work in MP but honestly got swamped.
I use the vanilla say() function I was honestly surprised it wasn't natively handling MP.
Has anyone got a good tutorial on the Zomboid coding language?
Easy to be done playing with attachments. The part that requires more time and efforts is finding the right usable body locations ๐
I'm currently looking into it, i'm a total noob, no idea what world of hurt i'm getting into. Would love to make several clothing items into clothing with pockets...
At the moment, i first need to find the clothing i wish to dupe, then work my way from there... i doubt success, but might be fun to at least mess around with.
{
DisplayCategory = Clothing,
Type = Clothing,
DisplayName = Padded Jacket,
ClothingItem = Jacket_Padded,
BodyLocation = JacketHat, ------ Seems like it already has it's location set, i just need to add the data for a container (i assume)
Icon = JacketPadded_White,
BloodLocation = Jumper;FullHelmet,
RunSpeedModifier = 0.89,
CombatSpeedModifier = 0.96,
ClothingItemExtra = Jacket_PaddedDOWN,
ClothingItemExtraOption = DownHoodie,
clothingExtraSubmenu = UpHoodie,
BiteDefense = 10,
ScratchDefense = 20,
Insulation = 0.95,
WindResistance = 0.95,
WaterResistance = 0.60,
Weight = 3,
WorldStaticModel = Hoodie_Ground,
}```
or are you talking about CanBeEquipped = Back, @lusty nebula ?
Okay i got no idea what i'm doing, lol
i run a small listen server with known friends. Language of the server is german. Do you have some nice recommendations for mods that I could add tothe server? Everything that makes the game more interesting, w/o breaking the vanilla game. I also wanted to avoid a language mesh-up. I thought about nice map additions, more loot possibilities, but I dont know what else is possible. Maybe more starting jobs ๐
is this the right channel for the question? ๐
ฤฑ cannot find HD moodles ฤฑmage anywhere somebody can help me
Can anyone else confirm whether range for melee weapons only comes into play when attacking players or zeds? Attacking objects seems to consider all weapons to be the same range.
Does anyone have a guide or a mod I could use as reference to add a use for a tile that is just decorative? I want to right click it, do something with it
So does anyone know anything about discord bots. Modifying my help menu that is that I asked earlier
I haven't tried for players, but it definitely works for zeds. You can set the range really high, and hit zombies from really far away. I would assume it affects both the same.
my lived experience says that even for a gun you have to be in melee range to hit a door
u can tell u hit when it plays a sound
if all objects follow the rules of doors, then i think you're right on that, @random finch
that said i have not read the code that governs it, so take with a grain of salt
Is there any way to copy a set of tiles in a servder live?
Or can someone help me with a script / admin tool for this?
Like for example I just want to copy an 8x8 tile selfmade house to another 8x8 tile location without having to copy each tile... Any possible way for this? โฅ๏ธ
In the vanilla VHS file it mentions that it was generated, is there a way to use a tool to make VHS tape mods easier to make or does it 100% have to be done manually
seen a streamer playing with a mod where he could upgrade his vehicles was wondering if anyone knew the name of it
maybe one of these
yeah thats similar that will def work for now thanks
Hey, what property can I use to know if a weapon is charged?
I tried isRoundChambered but always get true
Helloo, I decided to venture out to make a mod but I didn't imagine it would be so difficult... hahah I think my problem is lua file, someone could help me ?
I want the item to work like a vitamin, but instead of reducing drowsiness it will increase endurance.
{
imports
{
Base
}
item PillsGinseng
{
DisplayCategory = FirstAid,
EnduranceChange = 20,
Weight = 0.2,
UseDelta = 0.1,
Type = Drainable,
UseWhileEquipped = FALSE,
DisplayName = Ginseng Pills,
Icon = PillsGinseng,
Tooltip = Tooltip_PillsGinseng,
StaticModel = PillBottle,
WorldStaticModel = PillsGinseng_Ground,
Medical = TRUE,
}
}```
What I need to do in lua file to this item work like a vitamin works ? How can I import context menu for that ?
dont think you need lua for just creating an item
what I need to do ?
if you just create the item like that in the txt it should load into your game just use the debug mode to spawn it in and see if it works
for context menu
name the file whats at the top of this v ContextMenu_EN = { ContextMenu_ExampleMenuItem = "Example Menu Item", }
I did, the problem is context menu. When a take a pill, the char use that and show ERROR 1 because context menu not works properly
I will try thanks!
also i'd try and put this in instead of tooltipCustomContextMenu = ExampleMenuItem,
ISUI folder or not ?
media/lua/shared/translate/en is where the ContextMenu_EN.txt should go if english
my context menu was like that ContextMenu_EN = { ContextMenu_Take_Pills_Ginseng = "Take Ginseng Pill", }
Take_Pills_Ginseng should match what the CustomContextMenu = in the item file
Ok, if works I tell u here
Something is wrong .. ๐
post both here
ContextMenu_TakeGinsengPill = "Take Ginseng Pill",
}```
and the items txt
you cut off the folder names but im just gonna assume you made them lowercase already
and post the txt where you make the item
ohh sorry hahahaha
{
imports
{
Base
}
item PillsGinseng
{
DisplayCategory = FirstAid,
EnduranceChange = 20,
Weight = 0.2,
UseDelta = 0.1,
Type = Drainable,
UseWhileEquipped = FALSE,
DisplayName = Ginseng Pills,
Icon = PillsGinseng,
Tooltip = Tooltip_PillsGinseng,
StaticModel = PillBottle,
WorldStaticModel = PillsGinseng_Ground,
Medical = TRUE,
CustomContextMenu = Take Ginseng Pill,
}
}```
in scripts folder
should make the CustomContextMenu have no spaces so it matches the one in your en folder
where exactly ?
CustomContextMenu = Take Ginseng Pill,
here >> CustomContextMenu = TakeGinsengPill,
But how this item will work like vitamins works ? I didnt nothing to do that
i'm only using base for my reference so just test if it needs the GodigodMod. part in the en folder files
is EnduranceChange and actual thing?
ye
But vitamins have a rule that is "take a pill" and idk if will works properly if I dont tell to the PZ that .. lol
hmm not sure, you could turn its Type = Food, as a workaround if that's okay for your mod. I haven't made pills so not 100% on that
but i guess just test it
i think i've seen some ginsing mods on the workshop you may be able to use as a reference for yours as well
No have mods for ginsing ๐ .. I will try a little bit more
Lets do it work ! hahaha
noice!
weird i swear i saw a ginseng mod last night but i was just looking at random ones for like an hour lol
Man i really wish there was an up to date landmine mod. Only one ive found was in a huge mod and therefor wont work right with other mods.
Playing on a S.T.A.L.K.E.R. server and it would be nice to have just an independent landmine mod to keep players out.
What difference between "newitems" and "items" inside scripts folder ? Im trying to figure out ..
Wanna make qol fixes for Hydrocraft, like holding magazines in hands or books, or similar with food or drinks.
Can it affect current walkthrough or i need to start new game even for such things?
Any mods about more logs in discord?
The only discord log that is vanilla is /all chat
events system is unreliable and when I reload the script with debug, it does not re-add the event
Any good alternatives yet?
I haven't tried it fully, but seems like because i used
Events.OnTickEvenPaused.Remove
It won't work, so this might even have a conflict without debug?
Seems like it won't be able to re-add the same function to same event, even though I used the remove command
Reason: Bad word usage
we need a mod that allows you to gut zombies to get guts and then have an option to put it on worn clothing to walk amongst large hordes without a problem (the only down side is a gas mask has to be worn to avoid corpse sickness)
when you're doing stuff like that restart the game or reload the save/rejoin server depending on context
it's not always enough to reload one file,
brand new to modding pz but have a lot of experience in lua, how hard would it be to implement new character animations such as weapon swinging
Hello, anyone know if there's a way to know if a firearm is already loaded with ammo?
or an event before the player shoot a firearm?
it is displaying the icon for this item instead of the model
and any others assigned either of those models
any idea?
Try to rephrase your question, I can help but I'm not english native speaker
check console.txt to see if the game is not finding the models
nope, this is all that shows in that section
WARN : Script , 1662578771241> ModelScript.check> no such model "???.DisposableRazor" for Base.Razor
WARN : Script , 1662578771244> ModelScript.check> no such model "???.Nettles_Ground" for Base.Nettles
WARN : Script , 1662578771247> ModelScript.checkTexture> no such texture "WorldItems/Crayfish" for Base.Crayfish_Ground
WARN : Script , 1662578771247> ModelScript.check> no such model "Chainsaw" for Base.Chainsaw```
none of that is related
oh wait
nevermind
there's a second section
it is having trouble locating the meshes for some reason
..why though
does it need some special folder structure?
haha well, you got it
it's always something tiny and dumb when i break something in pz
one symbol, misnamed thing, etc
every time ๐
can't be mad at anyone for this one tho that was my fault
waits for game to load
yeah, btw, did you create your icons? they look really good
yeah i made those out of renders of the models
the ammo can ones
the others i did as pixel art
the pixel art ones are nice
:)
thanks
i did a bunch of magazines in another one of my mods too
drew all the guns pretty quick, i was surprised it turned out that nice
oh, I wish I can do that for my mods
nice
the lighting is a bit weird, the textures are flat so im not sure why it's got such soft shading with gradients going on
probably should ask about that in the modeling channel tho
is the model set to shade smooth?
Hi - I'm attempting to keep my mod's data and methods cleanly in a single table, and organized into separate components. When attempting to do so, I am hitting an issue accessing the "self" variable when nesting. I've illustrated this in the attached example - Example 1 works and self is a table, but Example 2 does not work in Zomboid, where it otherwise does work if I try in other LUA environment's (i.e. https://www.tutorialspoint.com/execute_lua_online.php). Is there any known issue here or am I doing something wrong?
i.. didn't know that was a thing
i think it is, but i thought that was just a preview thing in my modeling program
nah it changes how lighting affects the mesh
(Ignore me for now, somehow I now can get both examples working!)
is there a lower bound on ProceduralDistribution item chances?
or can i just decimal it up as hard as i want
e.g, .0001, .0003
the java decompile doesn't indicate any limitation
at least in the parsing..
looks like they're doubles
guess no limits
tiny tiny chances at ammo can spawns it is 
anyone know how i would replace music or sounds in game
take a look at any sound or music mod on workshop, and you can find it from there
alr ty
Man I wanted to add audio to the urination mod like how defecation does.. but the sounds I came up with.. didn't sound like someone needing to pee
tried it but they replace others
nvm
Does anyone know where the translation file is for GM, Overseer etc
To make the ranks of staff called different?
I'm digging but I'm unable to find the right one
I've worked out that this was because self. doesn't play nice with events. code runs fine called directly, but will not reference self as expected when called via an event handler. I can work around it by calling my library directly, but something about that doesn't seem quite "correct". If anyone knows how to make self and event handlers play nice, would be good to know.
oh fk i've just noticed i made a fking big mistake after proper resting.
whoever is using my radar mod please get ready to update the utility mod 'simplify' in 10 mins.
i introduced a god forsaken security issue with the latest update last week. oh my god
hey! Brand new to this, any tutorials on how to start making custom occupations?
fix uploaded. the mistake i made is that players can replace matching files with modified files from cache/lua and root mod dir. i've restricted it to server feature only. feels like bashing my head against the wall now.. was wondering where the hell is the mistake i made.
And does anyone know where the death logs are for people in a MP server
Hey, do you know where I can find updated methods and props for the classes of PZ?
I'm trying to detect if a firearm is charged, but roundChambered I get false even if weapon is charged. I tried getting weapon.ActualWeight or weapon.Weight and then do the math, but those props return nil ๐ฆ
Anyone know if there is a mod that makes zombies sprinters in darkness and normal shamblers in light? Like during the day is everything fine, and at night you wanna have your flashlight on you to slow down zombies
Ok, isRoundChambered does return the correct value, but there's something I didn't know about firearms. Can someone explain me this, please? I'm creating a weapon with only 1 round, but in the weapon info I can see something like this: Ammo name: 1+1/1 or Ammo name: 0+1/1
what is that +1?
chambered round?
Hello, someone knows why the character is using the item but "UseDelta" and "EnduranChance" not working ?
{
imports
{
Base
}
item PillsGinseng
{
DisplayCategory = FirstAid,
EnduranceChange = 20,
Weight = 0.2,
UseDelta = 0.1,
Type = Drainable,
UseWhileEquipped = FALSE,
DisplayName = Ginseng Pills,
Icon = PillsGinseng,
Tooltip = Tooltip_PillsGinseng,
StaticModel = PillBottle,
WorldStaticModel = PillsGinseng_Ground,
Medical = TRUE,
}
}```
Do you get any errors?
nope
weird, the same props as the vitamins, only EnduranceChange is diff
just a question while you guys solving the issue. what's the difference between staticmodel and worldstaticmodel?
world is the one when the item is placed
the other one, is when is being held by the charcter
that's how I see it, after playing with mods for a while
thanks, i didn't know that ๐
๐
yep ... very weird !
did you restart the game after adding the item? just in case. ๐
question where can i find all these methods? or variables? ex: player:getBodyDamage():setFoodSicknessLevel
is there a website i can check em out at
I have the same question. I've been getting info from this place: https://projectzomboid.com/modding/
but version is outdated
i've been looking in there just wasn't sure if there was another place, thanks for input
You can use the website, or alternatively decompile your Zomboid.
This can help. Remember to not redistribute your decompile or anything.
thanks fam, congrats on popular page btw
@knotty abyss you'll probably have to decompile and search for how setEndurance works following this guide ^ and create the lua for it
maybe only works for Food
Yes of course bro. All time I restart.
Dont make sense. It should be work with drainable too
What guide ? Idk how decompile. Maybe I will abandon that. I thought that would be more easy haha
pwr posted a link to a guide on how to decompile
you could, alternatively create a single pill in which they eat as a type = food, that will change the endurance and remove the drainable from the item.txt
I already tried it. It didn't work either.
wym i just got it to work
using the code you gave me
What u did ? To me dont change the endurance.
well i set the endurance to -100 so i could see if it works and then i can just reverse it back to = 20 once i know it works
i didnt have your models so its a placeholder icon but it works for all purposes
The way that drainables work =/= the way that food works.
The current system for how pills work is based on java hardcoding for the most part as far as I understand?
For modders, yes, this isn't the ideal state of affairs.
But the two options would be:
- make your pills food items instead
- code an override for the take pills? timed action to affect the character's endurance state directly
Yes, I would like to make drainables/pills work more smoothly for modding in these circumstances, but that, if it happens, would be build 42 or later unfortunately.
is this take pills in the context menu in pic above popping up because it's still labeled as DisplayCategory = FirstAid
I think having "Pills" in the script name is what triggers it?
item GinsengPill
{
DisplayCategory = FirstAid,
EnduranceChange = 20,
Weight = 0.2,
Type = Food,
Count = 20,
UseWhileEquipped = FALSE,
DisplayName = GinsengPills,
Icon = PillBottle,
StaticModel = PillBottle,
WorldStaticModel = PillsGinseng_Ground,
CustomContextMenu = TakeGinsengPill,
CantBeFrozen = TRUE,
}
}
``` this is basically what i reworked his code to as a food
okay good to know i'll check it out
Humm ok ok. I was trying to use the vitamins code to do the same thing.
As I say, I think, I haven't tangled with the pills stuff in a while, but I know it just doesn't work like food?
But now I understand that is more complex ๐ฌ
The substance of how vanilla pills work is all java side off the top of my head, but there may be an exception or two.
The game is nowheres near close to being alpha, so yes, these things happen?
okay yes i believe you are right, it's because it had pills in the item name
Rodrigo you can use the reworked code i made if you want
And can I mix some properties ? Like "OnEatSound" with Drainable and other things ?
No, generally item type specific stuff only works with that type.
Thanks bro, I will try later and come back to tell u
Item types can be remarkably inflexible vs modder expectations all told?
alr it works on my end just got to change endurance back to =20
And have same place that I can found ?
That's all between you and the distro code you make for them, but if they spawned before they should still spawn?
you'd prolly still have to make the distribution lua if you want it to be found in the world while playing though
Gotcha! Thanks all of u for the explanation ๐
๐๐ผ
How to make your mod objects spawn.
Caveat: it's very profane and grouchy because I am profane and grouchy
#mod_development message
๐๐ผ
This is probably more up to date
https://steamcommunity.com/sharedfiles/filedetails/?id=2609939329
Very delicate in the explanations over there AhAHUAHua
ah it is you who makes those cool mods but leave the comments off lol i never know if they still work or not on newer builds but i'm going to assume they do now
How does one add a right click function to a tile that doesn't have any?
take a look at client/ISUI/ISWorldObjectContextMenu
as for adding it yourself, I believe there is an event hook now for when that menu gets populated
Hello, sooo i have a problem. For a solid 3 days i was trying to find a way to import x files that pz using for models into Blender. First ive found out about some kind of code that you should use to do that. But at the end i wasnt able to do a thing bcs im too stupid at coding. Than i found out about some 3-rd party program which was also a failure. Then some kind of blender addon that stuck at 2.79 version. And thaaan im here, asking how in the living hell i can import those damn x files into blender. I was trying to find some messages about that here but im too tired after all of that so please. Help me. Also thx beforehand. (im not native at english so yeah)
Google for an X to FBX converter
Also, your own model can just be FBX. So just use the latest version of blender
can you make recipe that resulted in 2 items?
recipe Example
{
scrappedItem=1,
keep thisItem,
keep gotThis=50,
Result:resultedIntoThis=1,
Result:resultedIntoThisAswell=1,
Time:10.0,
Category:Test,
}
it will override the above
or it can interpret arrays?
Result:[a=1,b=2]
Converters that i used didnt seem to work. fbx file that they produced didnt add a thing in blender
Also i need those x files that already exist in game
Can you please give a link to properly working converter?
are you sure it didn't? did you check the objects list on the right? it could simply be tiny
Yeah nothing
Also i tried another two and one of them did this
Ok thank you
any lead on this :(...
@lime hedge I don't think the recipe script syntax directly supports it; you can however have one item created via Result and the second one via code by defining an OnCreate function
im coming from typescript so lua pretty new to me...
script syntax looks like lua, but it isn't lua
ah i see..
don't confuse game scripts with lua scripts
Hello everyone! How hard would it be to change multihit so that it only affects push, not melee attacks? I've searched the workshop but couldn't find anything of that sorts, for me that would be the perfect balance, being able to push multiple zombies, but hit only one. I've never really done any mod work or learnt any code for that matter, so I thought if this is maybe possible in a simple way or I would need to learn something new, or, maybe someone would just like to make it for me and the community? ;D
The best thing would be to push a Zombie and have this Zombie fall on the other Zombies to create a jostling effect.
true, i did find a mod that makes zombies trip if they bump into other zombies, but it didn't seem to work in multiplayer
Is there a way to make a custom clothing slot? Just need a little of advise to where i can find file that controls that
hello , is mod able to send servermsg?
i wonder abt this too
you would have to turn on multihit
and then reduce all of the weapons multihit to 1
alright! do you know where to look for the weapon multihit variable?
Hi, does anyone know how to put custom loot in a zombie's backpack?
I have an old script that partly works, but some help would be wonderful;
It's a recipe to create a schatel that then is filled with a ton of materials, however, it does not appear to add everything for several reasons:
- it will only add ONE of any item, even if i set to to make 40 it will only ever make 1 and put said one item in the shatchel,
- the script is very old, and was given to me 2 years ago, and more then likely needs an update.
Anyone willing to help fix the code correctly?
function onCreate_AGCMDupeDeluxe(items, resultItem, player)
-- Misc
resultItem:getInventory():AddItem("AGCMCheatItems.AGCMOddThingy", 10);
resultItem:getInventory():AddItem("TinOpener");
resultItem:getInventory():AddItem("Battery");
end``` (This is just a snippet of the start, the rest of the code is just repeated until the "end" it hit.
i was thinking, would a mod that adds napalm be a cool idea? like i had a general idea of adding more features to engineer to make him suck less
Is there no search box on the Java documentation site?(https://projectzomboid.com/modding/)
I'm in vacation and I'm missing modding, miss you guys 
use this instead.https://zomboid-javadoc.com/41.65/. still outdated in that it is missing some stuff, but it is more up to date than https://projectzomboid.com/modding/ tmk and it has the search functionality. Not sure exactly which version the projectzomboid.com/modding is but it is older than 41.65. one example is the tag stuff is missing. obviously having a decompile would be the most up to date, but its convenient to be able to use the web browser
Javadoc Project Zomboid Modding API package index
... wot?
Hello, is the official integrated dc bot able to be edited?
the number in Additem doesn't add multiple of an item to my knowledge. the second number is just a float for the UsedDelta when adding a drainable. if you want to add multiple of an item, you need to use a loop to do so tmk
from the java
public boolean AddItem(String var1, float var2) {
this.drawDirty = true;
if (this.parent != null && !(this.parent instanceof IsoGameCharacter)) {
this.dirty = true;
}
InventoryItem var3 = InventoryItemFactory.CreateItem(var1);
if (var3 == null) {
return false;
} else {
if (var3 instanceof Drainable) {
((Drainable)var3).setUsedDelta(var2);
}
var3.container = this;
this.Items.add(var3);
return true;
}
}
i honestly don't understand what i'm reading there
Guess i'll just repeat the item another 2 times
like:
-- Misc
resultItem:getInventory():AddItem("AGCMCheatItems.AGCMOddThingy");
resultItem:getInventory():AddItem("AGCMCheatItems.AGCMOddThingy");
resultItem:getInventory():AddItem("AGCMCheatItems.AGCMOddThingy");
resultItem:getInventory():AddItem("TinOpener");
resultItem:getInventory():AddItem("Battery");
resultItem:getInventory():AddItem("ToiletPaper");
End``` Which will be MORE then enough for what i need
10 times is overkill
the second parameter you are using in Additem is var2 in the javacode. and you can see that var2 is only used in setUsedDelta inside the java function
heck, if adding it 3 times like that, gives me 3 Odd Thingies, then i'm happy enough
also, don't call getInventory so many times. you can just do
local invent = resultItem:getInventory()
invent:AddItem()etc...
I didn't write the script... i don't know how to script, this is a 2 year old script that sorta works still... so telling me what to do and what not to do is not awefully helpful since i don't know what to do...
i mean, i literally put in example code there
i was told, when i was given the script that i just need to repeat the lines resultItem:getInventory():AddItem("AGCMCheatItems.AGCMOddThingy"); replacing the Item Id of the item with what i want to add to the inventory of the container.
Thank you! Much better and I finally found isBarricaded() method ๐
I am trying to access a Constant Value from zombie.iso.objects.IsoBarricade (METAL_HEALTH & PLANK_HEALTH) but I get stuck.
https://zomboid-javadoc.com/41.65/zombie/iso/objects/IsoBarricade.html
local barricade = object:getBarricadeForCharacter(player)
local numPlanks = barricade:getNumPlanks()
print(numPlanks)
I can access the methods without problems, for example to count the number of planks on a barricade, but how can I access the static fields?
if they aren't public, you can't access them. you need a getter function
what field are you trying to access?
actually I think all the fields are "private" with respect to lua. I don't think you can access anything outside of a getter method, but I might be confusing this with something else
I'm trying to catch PLANK_HEALTH of each planks on a barricaded window
from what I can tell, PLANK_HEALTH is a constant. and if you want the health, you need to look at the plankHealth array, as that contains the health of the planks. unfortunately it is private and I don't see any getters for it.
Is it possible to make it so one specific zombie always knows the location of the player? Iโm working on a mod where thereโs one specific zombie that is unkillable and constantly following the player, but I donโt know how to make sure the player canโt simply outrun or outmaneuver it or simply drive away and the zombie loses interest. Only thing I can think of is have the player make a sound that covered effectively the entire map but I donโt know how to make only the one zombie hear that sound.
you could try setting the target of the zombie to be the player in OnZombieUpdate. I know before that it wouldn't work when trying to set the target to noone, because the zombie would set the player as a target if they were visible, but maybe that won't be an issue as in this case, the zombie does have a valid target. although that would be an issue with vitual zombies. I don't know if you can manipulate the movements of a virtual zombie
Quick sample using the SMUI Mod items and attachments:
item Jacket_ArmyCamoGreen { DisplayCategory = Clothing, Type = Container, DisplayName = Woodland Pattern Jacket, BodyLocation = Jacket, Icon = ShirtCamoGreen, BloodLocation = Jacket, RunSpeedModifier = 0.94, CombatSpeedModifier = 0.97, Capacity = 5, ClothingItem = Jacket_ArmyCamoGreen, ClothingItemExtra = SMUIClothing.Jacket_ArmyCamoGreenRolled, ClothingItemExtraOption = WearIt, CanBeEquipped = Jacket, BiteDefense = 20, ScratchDefense = 30, Insulation = 0.4, WindResistance = 0.3, WaterResistance = 0.4, Weight = 1.0, FabricType = Cotton, Tags = Military, WorldStaticModel = JacketCoat_Ground, AttachmentsProvided = SMUIWebbingLeft;SMUIWebbingRight, }
You will notice that in the hotbar now you have two slots available when you select the Woodland Pattern Jacket ( Webbing Left and Right ). The Webbing Left and Right can be changed editing the file " SMUI_HotbarAttachDefinition " ( String: Name = ; Line 10 using Notepad++ ). Sample: Name = Pocket Left. The part that you have to check carefully is the string " Body Location " because any other item using the same one ( Jacket in this sample ) will be equipped only one a time. For example if you select the Jacket but then you equip too the Jacket_TPattern ( Just as sample ) that share the same body location ( Jacket ) only the one equipped as last will be worn and the other will be uneqipped and put in the inventory.
Here you can find a list of body locations as reference and what they affect: https://mega.nz/file/DkpmmI5Z#IIFKIYgOFarMQNbwHz6hqSaEgv3hT1ZNuitdX6DnY48
Thats kinda strange question but... Would it be safe for my life account to post mod with nazi and other countries uniforms? Like ww2 ones. Kinda love that concept so i really dont want to poure too much life-time into something that will end up be banned
My suggestion is to avoid the words " Nazi, Hitler, etc ". You can use something that let unnderstand what the mod is about but without using the words listed above.
Samples: WW2 Uniforms mod, WW2 German uniform mod, WW2 German Pattern Uniforms, etc
Obviously no swastika, SS or nazy symbols on the uniforms in any case ( Take in mind that in some countries they are banned! )
Just my 2 cents, I hope it could help ๐
*Note: If you check the workshop there's a mod about the Tiger II tank LOOL ๐ ( REF LINK: https://steamcommunity.com/sharedfiles/filedetails/?id=2791076769&searchtext=tiger+tank )
Thank you!
Hey! I didn't play the game since January and there have been a bunch of updates since. Is it still recommended to copy the workshop directory to .../steamapps/common/ProjectZomboid/steamapps in order to lock the mod versions on the server?
Also is there currently a way (external program or otherwise) to set up the mods on the server without having to manually insert all WorkshopIDs and ModIDs into the ini file by hand?
Because if there is none, I might make one. This was so tedious for my ~50 mods that I wrote a script to just parse the singleplayer modlist and cross reference it with the workshop directory to get all needed IDs
Just realized that #mod_support is probably better suited for these questions, sorry about that
Do you think there's a way to have books really readable page per page instead of the process of reading just simulated?
Does anyone, please, have a script to copy multiple tileS??
it's not an integrated bot it's a hook FOR a bot
so the question isn't really answerable
if u mean can u edit the hook to provide different data, then.. i don't think so? but im not sure. i think that part is in java.
if it is editable it's likely in ISChat.lua somewhere but i don't recall seeing it there.
lmk if u find something tho
you can just copy paste it from the ini from a singleplayer save
So, I'm trying to make a simple mod that adds a flag that can be crafted, and I'm looking at some mods on the workshop that do that to know how to do it, I tried to replicate it but I don't know what program use to open a .pack file, is it any specific program for zomboid modding? if so is there any useful video or guide that I can follow? It's my first time trying anything like this (the mod is for personal use, for a co-op server with my friends)
Having a problem with the steam work shop and mods
a few hours ago i turn off the game it was working fine i log back in and the workshop is removing workshop items from my pc
but keeping me subscribed to each item
at the same time if i go to subscribed item tab its removing mods from that tab
ive lost well over 200 mods i was using on a save (the mods and sub mods)
now if i try and click on subscribed or Favorited the tabs dont open
and opening the game and clicking on mods saids the mods are all missing
same
You missunderstand what i was looking for; i wanted to create a container like the backpacks, not another hotbar. I wanted to be able to sort my inventory into more containers that my character wears having only 4 inventories when such a thing as pockets exists yet apparently not usable seems.. weird to me, so that is what i was trying to do.
What i currently are doing is putting Food int front Fannypack, medical supplies in the back, and mostly everything else in my backpack. Would love to have an extra worn container without taking up the hands slot, such as pockets for jackets or the like where i can put my tools.
My own mod comes with an "odd Thingy" which has -100 weight, so i could just plop that into the jacket's pockets and suddenly i have plenty of room for a ton of tools there.
Would love some pants with pockets, a vest, maybe some other "invisible" items that can be worn to give more inventory slots.
ok, so. I've got this concept in my head, right? But no proper know-how to implement it. The Trimble power station mod's power lines don't connect to the vanilla map, so that's off the table....
The idea:
- Either connect Trimble power station's powerline tiles to the main map somehow, or make a standalone version that does.
- place a special tile within the station that works as a control board, allowing electricity to be routed throughout the vanilla region, using general areas/towns as a starting point for the grid.
- Add a tile for fuel input, allowing the plant to run on... Some combustible (I'm not sure what type of plant Trimble is?).
- Add a substation for each sector in the grid.
- Add code for the control tile to send data to substations through the powerlines. (The powerlines would transfer modData through eachother maybe?).
- Add code/invis-tiles to simulate generators in a powered-up area. Also make the substations control these invisi-tiles/code.
- When a substation control board tile receives the modData, it needs a player input to toggle the on/off state, when it's not getting the data, it is forced to an off state.
I could probs figure this out myself, if I knew mapping....
Exactly what I wrote above..In the sample you have both the 2 pockets slots ( Left-Right ), plus the pocket as container available in the inventory ๐
then isn't it missing Capacity = 10, ??
Yep sorry I wrote it quickly added a 5 capacity in the sample
That extra file you linked, i'm confused as to what it does
By itself it does nothing, it only indicates as reference all the body location and how to use them/what they affect. I've also modified the sample using " ClothingItemExtraOption = WearIt, " that should fit more for a jacket with pockets purpose
Note that some body locations use 2 slots ๐ ( Like jumpsuits and coveralls for example )
To guess how to use body locations think about how you dress in real life. For example, in PZ, you can't wear 2 shirts at the same time, the tank top is always worn below the shirt and so on ( Just to give you a rough idea about how the system works ). The exceptions are particular clothes/items that uses 2 slots instead of one or ones that hide items in the second location when an item is in the first location ( Check well the additional file and you'll see what I mean )
i'll try again in a bit, my mind is in multiple places at once...
find myself re-reading you messages several times right now...
so, i think i'll take a break until tomorrow. Thanks a lot, however. Very nice of you to try and help me out ^_^
No problem mate when needed just ask ๐
in steam you get software from buying PZ called pz modding tools. you use those programs
is it possible to make the players animation same as the zeds?
try this https://github.com/cdaragorn/ProjectZomboidPackManager/releases its from 2015 but still seems to work
you could probably use the ukraine flag in workshop as the ref for it. Looks to be the simplest on there to follow
thank you
Any mod suggestions to clear floor tiles of dropped items from zombie destroying doors, to me dropping things?
My external hard drive died and that meant my custom maps and buildings are on life support as I send the affected hard drive to data recovery labs. ๐ฆ
does anyone know how I could make it so my backpacks I created in my mod are compatible with authentic-z's attachment system? just not sure where to start
Nvm found it
just add it to the sandbox of item removal list
itll be fine
did you mean "it'll be fine?"
wooops sorry
so this is the load order on an SP test save of the relevant mods im working on
ponchos first, base mod, then my mod, then a new tweaked submod
somehow ponchos is overriding my mods for the ones it adds out of the box
is this list in reverse order..?
says top to bottom in mod manager
maybe it's lying
also says the nerf mod is introducing the items, and that its not overriding anything
which is odd too
shud be like.. ponchos -> expanded -> nerf
order irrelevant it seems
wth
maybe the item script name is coming before the base mod's
really wish load order took precedence over naming sometimes
we will seeeee
Anyone have any idea how to use "IsoGameCharacter:Say()"? I get an exception when doing that. I checked a few mods that use it and can't seem to figure out how they're specifying the character (it seems like that's what it's talking about - although from the documentation it doesn't look like it needs to specify the character). I get this exception when calling it:
Object tried to call nil in EDN_Display at KahluaUtil.fail
You want the character to have a text bubble on top of his head?
Correct, testing some things in my mod and want a visual indicator it's working.
I use this function:
getSpecificPlayer(0):addLineChatElement(text)
end```
I found it in a mod, don't remember which one
Hmm, let me give that a shot, makes sense though.
call it from player
getPlayer():Say("Hello") on the client will do what you'd expect
IsoPlayer inherits from IsoGameCharacter
anyone help on my issue? it's the kind of thing that should have a ton of people who know how this works
:|
Thanks that worked nicely. Can I ask where GetPlayer() is from? I don't see it in the documentation under IsoPlayer or the parent classes. Sorry though, I'm still relatively new to modding so I don't have much of any answer for you problem ๐ฆ
i think it's in the "global object"
yeh
this stuff is essentially always in scope
How can i find script that works with variety of furniture textures? White old fridge as example have some "notes" on the door but when you reinstalling it all this just disappeared.
I want to make mod that adds more variety in textures depends on stuff or category of items inside. Is it a cool idea for Qol mod? Im really struggling to do it :]
Is it possible do use the DoParam command to change stats of an item while in-game? For example something like item:DoParam("Weight = 0.5"). When I try this, I get the "Object-tried-to-call-nil" error.
you can do it during loading by putting it in shared, you can technically use it in-game but it will not be good
it edits the item script in memory
not an individual item
and once the item is instantiated
it is not possible to do it anymore
ah ok! thanks! if it will change all items of that type, then it is not what I am looking for.
yeah
look at the code that works in the admin/debug ui to edit a particular item
probably some hint there
many thanks! I already found what I need by checking the vanilla code.
As I know, mods anyway loads by alphabetical order
even on a dedicated server with an explicit load order
?
so require=XXX,YYY lines don't even change load order
they just make sure it's enabled
hmm
is that by mod id? or name?
cuz by mod ID they're already in the correct order
MilPoncho
MilitaryPonchosExpanded
MilitaryPonchosExpandedNerf
unless it's case insensitive maybe..
realizes load order only matters for overrided *files*
I think people have cargo cult esque expectations re mod load order from other games.
But in PZ the files load alphabetically by filename, aside from cases where file names conflict/dependencies.
Now the mp server stuff is a precious little hothouse flower in that you need the mod order list set up properly re dependencies, which isn't the ideal circumstances to say the least.
Mod load order is a big deal when people use skyrim to run 200 mods, or rimworld, I guess from what people say?
But if you look at the console itself you'll see exactly what order files load in?
except when it doesn't tell ya for item scripts, yeah?
i think it only logs overrides
but yeah i definitely was under some assumptions from the way things work other places
knowing it's by filename is the key to all this, thank you a lot for that
By modID (in singleplayer). If it's dedicated server, then I think it's order that you set in server config (you can check order in console.txt after game loaded)
i knew it worked that way for lua
but for scripts i was unsure if it was the same
places online kept saying how it didn't matter the filename
๐
i had tried matching their filename, but my mod was loading after theirs due to alphabetical mod IDs then
hehe
lot of potholes to fall into
hm
I am not sure, but maybe for script files if file with same name loaded already, it will not load script file with same name in same directory
well it should be working now but it isn't
Try just change name of script file with your items
their script starts with "A", mine starts with "M"
so mine should load after theirs
i changed my mod IDs so that they come after theirs too
I have some time. Can you send me this 3 mods in PM (I will check how it loads)?
that's the original save i was testing with, i guess the removal of the old mod id left it "unknown".. on a fresh one:
two are in one mod (mine, unreleased version) and sure
my only guess now is that it's alphabetical by mod name not ID
since P comes after M
tries
other possibility is alphabetical by folder name of mod
ill try that next :D
that would make sense if by "filename" we mean "full path"
the mod name did not matter, so here's hoping this last attempt does it
otherwise that aiteron figures something out
still does it, wow
well i got it to override by overriding the file with the same name on the same path, but i'd prefer to not have to fall back to overriding the whole file..
but perhaps that means the load order is correct now, too, so i don't need to
hm.. only overriding the file seems to work
perhaps the fact that it is in a folder.. gives it precedence over a file that is not in a folder..?
media/scripts/X
media/scripts/clothing/X
that alphabetizes that way
so
maybe that's the key for filepath
Order:
๐
it would be nice if there was a way to see that info as a modder
like there is for lua loading
makes it real easy then!
xD
is there anywhere that we have access to that?
or is that just 'cuz u can inspect data w/ a debugger attached
well, i know that's what im looking at, but i mean is there a way we can get at it
also, while i have you: what determines whether the game shows the overrides in the item info popup?
like this is working now after putting my scripts in a folder
but it just says
when it was the other way around it talked about overriding things

This info from java code ๐ Files sorts by alphabet and then loads. First loads scripts (Alphabetically by path), then lua-shared, then lua-client, then lua-server (first vanilla files, then mod files in alphabetically order by modID)
any idea on the other question? any time i override anything the game just acts like i put the item in and didn't override anything in that display xD
doesn't say "This item overrides: Ponchos"
but when it was overriding me it did
is that a bug? or is that something im doing
thank you that's very clear, i will save this for reference
so in my case i had to rename the folders for my mods to alphabetically come after theirs as well as add the "clothing" folder their script was in since "/" seems to come alphabetically after all the letters, and thus anything in a folder is loaded after anything in the root
wish it would say "This item overrides: Ponchos" but at least it works lol
Hmmm
huh
im on linux if that makes a difference, perhaps
but
im using wine to run the client
so it's the windows version
hm
wonder why that works for you, odd
@weak sierra I am on unstable
Strange ๐
You turned on default mod Ponchos?
even if we figured it out around the same time
hehe
default mod?
ponchos is on tho yeah
mine won't work without it since i don't repackage the models or icon
and i made them require in the mod.info
i changed the mod IDs and names back and loaded only the non-nerf version and it shows it
tries loading the nerf version on top
huh so now it shows that
but it doesn't show it overriding the other expanded one
maybe cuz it's in the same mod
anyway that.. somehow sorted itself out
have run into that before, will try to figure it out (if i run into it again in the future)
so question, i'm trying to make a mod that adds more improvised explosives and maybe some new additions to engineer, i just want to make sure on one thing which is, Firepower = x means the damage the fire doesor what does this line refer to?
Firepower is just the amount of tiles that will be on fire when the item goes off, nothing to do with damage applied
Hi, does anyone know how to add parts to a certain gun like modified their own gun parts?
you mean like an attachement or changing the actual gun model?
What I mean is you are just gonna add the parts not reconstruct all the codes just to put a single modified parts
elaborate?
pardon my grammar.
I'm modifying the brita's suppressor pistol and it actually works, but my problem is the modified suppressor is not showing in the attached pistol like it's an invisible, so I digged arsenal26 and find out you need to put the modified base name of the suppressor.
so where lies the issue? also dw man grammar isn't needed in the online world
The issue is I will copy paste the whole arsenal26 code and insert a single piece of modified suppressor
why would that be needed? all you'd need to do is copy the code of the single item you want to change and make it insert itself into the arsenal 26 fileso it replaces the item(in this example the pistol supressor)
Here's is the original
atleast that's how i understand how this works
I see i see, thanks for the help man much appreciated
Always ready to help. Just not sure if that's how it will work but it's the only thing i can come up with rn
It worked, but I want to separate it from different .txt :c
Hi, I would like to ask if is there a way to detect game's debug mode is enabled or not in lua script?
nvm, i found it
getCore():isInDebug()
is there and specific reason why? that would be much more inconvenient to implement as a seperate .txt
Does anyone have an experience with Storm project for lua-to-java event translation?
The reason for separating it on different .txt files is to quickly identify which line has an error and of course to minimize the structure.
I just wanted to see what parts I just modified. That's all, I'm not going to publish it on workshop. It's for my own sp gameplay, since other guns in brita like ak47 aim is sucks, you can waste up to 15+ bullets and still can't kill it even though you have maxed aiming.
Also, what I mean earlier is like inserting items in a loot table, I just want to insert a modified part and not copy and paste the entire structure of guns
hmm i understand but don't know how to help with this, if there is anything else i could do to help i'd be happy to try tho!
Any chance anyone knows who created the waifu zombie mod or if they are in here? I'm curious as to what happened to it since it is no longer on the workshop.
No worries, at least you are trying to help me in anyway, much appreciated ๐ซก
you'd have to edit the distribution table in your mod
ofcourse brother
No, not literally insert a certain item in distribution
if it was distribution i could easily help xd
ah my mistake
Yeah, I already did that. I expanded the loot table and goods and items can now spawn in backpacks
It's okay, I know you are trying to help, it's still appreciated
oh shit backpack spawns? give me that knowledge right now xd
i have a diffrent project that's gonna add those military water canteens but never found a way to add them to military backpacks
Sure, but it's still not incomplete i'm gonna add items in authentic z backacks
not incomplete?
Already did that, I also added MRE in their backpacks
Yeah, only vanilla backpacks
ah alright
I'm still having errors in some backpacks like in Undead Survivor, the nomadbackpack
Items in there aren't spawning at all
huh weird
Yeah, and I also think they have different rolls when spawned in other outfits
how even
Compare to ArmyCamoGreen and PrivateMilitia, more like PrivateMilitia have more spawnrate items in their backpacks even though they are wearing the same backpacks, the "Bag_ALICEpack_Army"
??????? but why?
i mean wouldn't turning the weight of the item down accordingly help?
or do you mean it spawns in the backpack yet the zombie itself has a higher amount of rolls
I dunno, I'm still searching for it looks like it's gonna do with the other backack like nomadbackack that Items aren't spawning
Yeah
that's cursed
I already tried the mysterioussatchel in TheyKnew and items were spawning on it
but hey i'm convinced pz's code changes every 15 minutes just to fuck with modders anyways so i was already under the conception that it's cursed
i will still never understand why they made the zombicivir spawn on the zombie and not in the bag
I dunno, that must be the creator wants. To put it in the inventory not in the backpack
Hopefully someone knows and can answer me what the following data points in weapons mean:
SplatNumber = 3,
PushBackMod = 0.3,
KnockdownMod = 2,
ToHitModifier = 1.5,
RecoilDelay = 17,
MinAngle = 0.95,
StopPower = 9,
and
HitChance = 75, This one seems to be a flat value? (1 to 100 ???)
I'm making an OP gun for an insane zombie count world for the heck of it, stress relief if you like...
Because sometimes, instead of being nervous, you just wish to turn a town muddy red and make river crimson.
can you not call item:getConditionLowerChance()??
just having the line in the script causes an error
"java.lang.ArrayIndexOutOfBoundsException: Index 7946 out of bounds for length 31"
update:
i have no idea what was causing the parse error. the text was copy pasted from here
https://zomboid-javadoc.com/41.65/zombie/scripting/objects/Item.html#getConditionLowerChance()
and that was causing the issue i think. after retyping the command manually the parse stopped failing.

Javadoc Project Zomboid Modding API declaration: package: zombie.scripting.objects, class: Item
before it even runs. its a parse error
Hey friends, Iโm brand new to PZ and havenโt tried a single mod yet. I was wondering if thereโs a simple mod that keeps the time alive on screen and maybe amount of kills? ๐
both of those exist in vanilla in the character info pannel
its the heart icon on the top left
Yea I saw those, but is there a mod to have them on screen somewhere thatโs not in a menu?
you can just leave the menu open..?
will shit despawn if you place items around in modded multiplayer?
open it in a more primitive tool like notepad, or one that shows invisible characters like scite, there's probably some invisible char..
mm im not seeing one
odd
i came to the same conclusion which is why i retyped it.
left the issue there in case someone else has the same issue in the future
i did not mean to reply to my own message lmao
thanks though 
mhm
it depends on the server setting
what in the.. it started doing it again.
i restared the game and now its fine. can java have a bad boot?
41.76?
ERROR: General , 1662743187429> GameWindow.uncaughtException> Unhandled java.lang.OutOfMemoryError thrown by thread MainThread.
ERROR: General , 1662743187432> ExceptionLogger.logException> Exception thrown java.lang.OutOfMemoryError: Java heap space at Arrays.copyOf. Message: Unhandled java.lang.OutOfMemoryError thrown by thread MainThread.
ERROR: General , 1662743187433> DebugLogStream.printException> Stack trace:
java.lang.OutOfMemoryError: Java heap space
i only added my mod and somehow this happened- how even
Is there a tool that can unpack Tile1 / Tile2 rpacks??
Existing one ends the process with errors. Its just blank zero weight file as output.
anybody here who can call me who i sync IsoFlagType.taintedWater to all clients?
What i do:
local spirte = tileIsoObject:getSprite()
local properties = spirte:getProperties()
properties:Set(IsoFlagType.taintedWater)
tileIsoObject:transmitCompleteItemToClients();
set modData with transmitModData works to modify the waterlevel but the tainted water is not on a sink.
The script is executed serversided only
These are the methods i tried already
tileIsoObject:transmitModData()
tileIsoObject:transmitUpdatedSpriteToClients() tileIsoObject:transmitCompleteItemToClients()
i try to change the water of sinks to tainted water for a Hard mode challenge
changing the waterlevel is working
Did you check the 2 mods that do that on steam workshop yet?
Ohh I like that, I always found it weird that everything has water in it ๐
you mean "Dont drink Tap Water" this is where i got the idea from but its not working in MP cause of missing the tainted water
anyone got experience with "SuburbsDistributions" list, i've managed to add a mod item to the list, and it drops, but i'd like to understand how i can manipulate the drop chance and drop amount
The other mods like this are not setting water levels tho.
I think it would be better to have lowered water levels as the time passes and actually no water in certain places
Like you can always get some water from toilets
The upper tank holds a bunch
But normal sinks, they would depending on how plumbing is setup, usually just drop a small squirt of water and that's it
plus lose that over time as well
Perhaps someone knows how to override method in ancestor class?
For instance - bringToTop() but only for ISHealthPanel
It seems, whatever I do - it doesn't affect base class method.
maybe i will create a combination mod, cause changing the waterlevel is what i got working
Yeah, I would really like that too ๐
Literally been in my ideas list for weeks ๐
works the same for any list
you enter two entries to the table
one is the name of the item
one is the rarity
higher number more likely to spawn
most items have "1"
many have small decimal chances
many have higher
you can manipulate chance of more spawning by either changing "count" on your item (do not recommend, makes recipes messy) or adding it to the list multiple times
how much does 1 stand equal to in terms of drop chance? and is it affected by any of the settings rarity?
it depends on how many items are in that loot table
so it's dynamic and depends on number of mods, etc
it's relative rarity, like a weight
and yes
rarity settings come into play with it
my understanding comes from using it and playing, though, i must say
i haven't read the loot table code (yet)
i was told every item in the list gets rolled on, so i'd think the amount in the list shouldn't matter, or was i told wrong?
yeah
every item gets rolled on but there's a limit per container
so the more items in the list
the easier it is for the total items to roll for gets full
if i put toiletpaper with a chance of 1000 and put it in the list 30 times
all the non-toiletpaper items will almost never show up
:p
alright, thanks for ur answer, looks like it will be trial and error ๐
generally u shud balance it around the vanilla loot
and let a user/server owner worry about the loot balance on their particular server imo
if everyone does that then it will work out to be roughly as everyone intends
cool, this will be used for one server only that doesn't have other mods, just would be nice if i had a formula to get a fairly accurate % drop chance
IsInfected from getBodyDamage from isoPlayer
yo i remember you
I was trying to experiment with a thing...Do you think there's a way to display only UI/Inventory panels on a second monitor? ( I mean...Main monitor = Game displayed, Second monitor = All UI panel displayed )
Maybe feasible using the the AggPas (Anti-Grain Geometry for Object Pascal) library ( http://www.crossgl.com/aggpas/ ) What do you think?
parp, the server?
ah yeah
im bad with names, who were u on there
i do remember someone named Penny, had a camo lada iirc
but my memory is a bit wonky heh
that was in fact me
Its sadly been dead recently, took a long break though
modding now i guess, what are u making? :o
Nothing atm, thinking about making and importing models
ive done a bit of that
if u do importing make sure the models are low enough poly to be appropriate for pz
May be interesting for Hydrocraft users. Lots of updates for magazines, books and recipes, as well as almost all drinks.
Hello, does anyone know the name of the player push animation file?
any good qol mods to add mid game?
too many how about that
I am returning to zomboid after 8 or so years away and I cannot seem to figure out how modded load order is determined, or if it matters. I have figured it out for single player, or at least I think I have with the mod menu mod. My brother and I have been workshopping a modpack just for the two of us to play. But I assume there to be a bunch of incompatibilities that make it so we load into the world but cannot even pick thing up from dead zombies or take items out of cabinets.
Does anyone know where I could find the Tooltip script? Tooltip = Tooltip_item_RainFromGround,
Oh nvm I found it in the translate folders
load order is based on the order that mods are enabled and then based on required mods I think
how to check if the save/game is a multiplayer or singleplayer
i love how for the mod i want to make i have to research which is definetly getting me on to some sort of list
hmm, is there a way to change the damage types of explosives- like determining what kinds of wounds they make?
Don't worry, there are multiple people who have made "Killable Children" mods for different games XD
i more mean the research of "hey is there bombs i can make with household items that exist in zomboid"
hi
that looks so cool
how many people can fit in the car?
6 total
next vehicle you should make is a 20 seater
Cursed Halo Warthog
hi, do you know if there's a way to dynamically change the actions associated with items? For example what if I want to execute some code whenever a player eats something?
You'd have to edit the eating function and add your code to it
I accidentally addSound with 20000 range
thanks, but what if I want to do it for all the food items though?
have fun writting long code
You edit the eating function and you add your code to it
You can check in the eating function what item is being eaten
hey hamster do you now anything about damage type adding?
Or you can just not check so it will do it every time you eat
oh ok sorry. I thought you meant all the OnEat functions defined in the items info
more just i'm trying to make a bomb that gives glass shard wounds but how would i give the item that function?
basically an improvised fragmentation grenade
I don't know, can you havea script that executes when it explodes?
media\lua\client\XpSystem\ISUI\ISHealthPanel.lua
The debug options for health panel have generateDeepShardWound which creates glass in wond
item glassshardbomb
{
DisplayCategory = Explosives,
OtherHandUse = TRUE,
MaxRange = 7,
WeaponSprite = glassbomb,
Type = Weapon,
MinimumSwingTime = 1.5,
SwingAnim = Throw,
UseSelf = TRUE,
DisplayName = Glass shard bomb,
SwingTime = 1,
SwingAmountBeforeImpact = 0.1,
PhysicsObject = ,
MinDamage = 15,
Weight = 1.5,
MaxDamage = 20
MaxHitCount = 3,
Icon = GlassShardBomb,
EquipSound = MolotovCocktailEquip,
ExplosionSound = MolotovCocktailExplode,
SwingSound = MolotovCocktailThrow,
OnExplode = generateDeeoSHardWound
}
think this would work?
no idea if OnExplode is a thing i'm just guessing
I don't think that's a thing
god i wish it was
i don't have the coding skill necessary for my ideas and it sucks
okay but like- there has to be a way since the game doesn't just assume the damage type, they literally have to have a file somewhere tedermining damage types
damnit
well it's suppost to be a grenade which is why i "borrowed" the molotov code as a base
all i need is to somehow figure out the glass shard part
Maybe you can find that object that's flying?
Maybe it's an object or something and you can search for objects on a IsoGridSquare or something
hmm might be an idea but i'd have to look more into how it works then
i'll see what i can figure out
Yeah, could just look at the JAVA and see how the throwing works
or just throw a bunch of things and try some scripts in lua while the game is paused to see if yu can detect them
Anyone have experience with editing Britta's config files directly? I have no idea what half of these numbers mean, but I assume that they're all somehow spawn chances
why edit them directly?
I'm trying to remove the spawn chances of some guns so that they never show up in the loot pool
hmm alright, best bet is to make a backup of the brita files and then remove the guns from the code entirely
I don't want the guns gone from the code, I just don't want them naturally spawning
why would they still be needed in the code if you don't want them to naturally spawn?
For events and the like
ah i see, hmm that would be a bit more difficult but i could look into the code some time to see if i can help
just don't feel like reading code rn xd
If you could figure out what Britta's is using these numbers for, that'd be great. If I can set them to 0 for what I don't want and leave it as that, that's really all I need to know
I'd like to decrease ammo spawn chances as well, but that's a whole other ballgame in of itself
okay so i can say rn those are probably the "weights" of the weapons if that says anything to you
not in game weight but coding weight
Ah, so 2 is weighted higher than 1?
And those spawn chances are independent of the overall spawn chance?
So a 25% loot spawn would have an 870 Breaching 2x more likely to spawn in it if it spawns loot?
in coding if you say weight in a loot table it would mean the % chance out of 100
but yes it could very much also mean what you said since im not too sure on this since brita does a lot diffrent especially with distribution
best bet is to set it to zero and just test it
Gotcha
run into a bug that seems to hit my Dupe script for my mod: OnFillInventoryObjectContextMenu
Konijima who was the original creator of my dupe script has been awol for a while, and haven't been able to fix this "bug"/conflict.
It seems the default/vanilla script for loading bullets into mag/gun somehow causes a conflict... weird.
Anyone willing to look into the code of the script and maybe find some way to fix this?
The error i get:
attempted index: getDisplayName of non-table: null
LOG : General , 1662824889904> -----------------------------------------
STACK TRACE
-----------------------------------------
function: doReloadMenuForBullets -- file: ISInventoryPaneContextMenu.lua line # 1312 | Vanilla
function: createMenu -- file: ISInventoryPaneContextMenu.lua line # 604 | Vanilla
function: createMenu -- file: ess.merger.main.lua line # 99 | MOD: ExtraSauce Instant Consolidate
function: onRightMouseUp -- file: ISInventoryPane.lua line # 1444 | Vanilla
ERROR: General , 1662824889905> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: getDisplayName of non-table: null at KahluaThread.tableget line:1689.
ERROR: General , 1662824889905> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: getDisplayName of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:641)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcallBoolean(KahluaThread.java:1924)
at se.krka.kahlua.integration.LuaCaller.protectedCallBoolean(LuaCaller.java:104)
at zombie.ui.UIElement.onRightMouseUp(UIElement.java:1458)
at zombie.ui.UIElement.onRightMouseUp(UIElement.java:1416)
at zombie.ui.UIManager.update(UIManager.java:903)
at zombie.GameWindow.logic(GameWindow.java:261)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.GameWindow.frameStep(GameWindow.java:764)
at zombie.GameWindow.run_ez(GameWindow.java:680)
at zombie.GameWindow.mainThread(GameWindow.java:494)
at java.base/java.lang.Thread.run(Unknown Source)
LOG : General , 1662824889907> -----------------------------------------
STACK TRACE
-----------------------------------------
function: doReloadMenuForBullets -- file: ISInventoryPaneContextMenu.lua line # 1312 | Vanilla
function: createMenu -- file: ISInventoryPaneContextMenu.lua line # 604 | Vanilla
function: createMenu -- file: ess.merger.main.lua line # 99 | MOD: ExtraSauce Instant Consolidate
function: onRightMouseUp -- file: ISInventoryPane.lua line # 1444 | Vanilla
LOG : General , 1662824895661> null```
how in the-
well i don't know what you did but it definetly broke something
is this done over java or lua?
lua
the script works fine for everything, except bullets.
Bullets throws this error
what is the script suppost to do, just so i can make sure i'm understanding this correctly
this is the script.
it creates a context menu that allows the item to be duped in various amounts.
But for bullets, the script goes bananas
hmm that is odd
Konijima - AWOL at the moment, is the creator of this script.
this does seem a little beyond me sadly so best bet is probably waiting for konijima to return, his codes never make sense to me but normally always work
I just use it... but apparently the "ISInventoryPaneContextMenu" seems to be the culprit somehow? I don't know enough of lua to figure out what the hoot i can do to fix
weird
looking at the code, i'm none the wiser, tried to add "Dupe" at the end of ISInventoryPaneContextMenu just to see what that would do... somehow the script still worked... but again, not for bullets...
The alternate thing i can do is make some recipes until a fix for this bug is made...
at least i will only need to make recipes for 1 kind of ammo, not all of 'em ๐
Quote " if not getSpecificPlayer(player):getInventory():contains("AGCMDupeListRecipes.AGCMDuplarino2Half") then return; end "
Shouldn't be ?
end```
if your talking about the "end" thing, i don't think the lua script language cares THAT much where the "end" is located.
i only guess
Not sure about that....never saw an " end " in that position so far...
i moved it down unto it's own line, will test, but i HIGLY doubt that has anything to do with it.
what's the error you get in the console .txt file?
scroll up in chat, look for the large block of text
can't miss it..
moving the "end" did nothing...
ExtraSauce Instant Consolidate is the name of your mod or of one in the workshop? If is another mod did you try running the script with it disabled?
where do you get the error? When the game is started in the main menu or when a new world is launched?
I'll try disable Extra Source mod, could be the issue.
I get the error only when in-game and right'clicking Bullets for the sake of duplicating them.
TRy disabling the above mentioned mod then run the game but before doing it delete the console file ( a new one will be created when you'll launch the game ) so we can check easily if something changed
-----------------------------------------
function: doReloadMenuForBullets -- file: ISInventoryPaneContextMenu.lua line # 1312 | Vanilla
function: createMenu -- file: ISInventoryPaneContextMenu.lua line # 604 | Vanilla
function: onRightMouseUp -- file: ISInventoryPane.lua line # 1444 | Vanilla
ERROR: General , 1662828696293> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: getDisplayName of non-table: null at KahluaThread.tableget line:1689.
ERROR: General , 1662828696293> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: getDisplayName of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:641)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcallBoolean(KahluaThread.java:1924)
at se.krka.kahlua.integration.LuaCaller.protectedCallBoolean(LuaCaller.java:104)
at zombie.ui.UIElement.onRightMouseUp(UIElement.java:1458)
at zombie.ui.UIElement.onRightMouseUp(UIElement.java:1416)
at zombie.ui.UIManager.update(UIManager.java:903)
at zombie.GameWindow.logic(GameWindow.java:261)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.GameWindow.frameStep(GameWindow.java:764)
at zombie.GameWindow.run_ez(GameWindow.java:680)
at zombie.GameWindow.mainThread(GameWindow.java:494)
at java.base/java.lang.Thread.run(Unknown Source)
LOG : General , 1662828696295> -----------------------------------------
STACK TRACE
-----------------------------------------
function: doReloadMenuForBullets -- file: ISInventoryPaneContextMenu.lua line # 1312 | Vanilla
function: createMenu -- file: ISInventoryPaneContextMenu.lua line # 604 | Vanilla
function: onRightMouseUp -- file: ISInventoryPane.lua line # 1444 | Vanilla```
yeah, that didn't work
it seems to me, that the reload script and the dupe menu somehow conflicts.
give me a sec checking your script for a thing...