#mod_development
1 messages · Page 502 of 1
make a BodyLocations.lua somewhere in media\lua\shared and then add this
but with the name you want
depends what you're trying to do and your modding / coding experience
yeah but where do i set the body parts that belong to the new BodyLocation? that i could not find anywhere
body location doesnt set bodyparts
its just clothing slots
blood location is where you choose body parts
blood locations are seperate from body locations
in any case i need to set it up, for example, bloodlacations=hand means it protect the hand, but no bloodlocation protect only forearms
i wish there could be a way we could just set this with the vanilla parameters, i mean the parts do exist already
hum i think i did it here lol
1 sec
ok here is something i did not understand, where did you get the 'LowerArms' from? on the wiki it says 'Forearms'
Did anyone get to set safehouse on non-residential area with code?
lol i know, i mean where did he find it on the code
anyway it worked like this:
item Wiz_SheraBracer
{
DisplayCategory = Accessory,
Type = Clothing,
DisplayName = She-ra Bracer,
ClothingItem = Wiz_SheraBracer,
BodyLocation = Hands,
Icon = Wiz_SheraBracer,
BloodLocation = LowerArms,
Insulation = 0.1,
WindResistance = 0.5,
ScratchDefense = 100,
BiteDefense = 100,
Weight = 1.0,
WorldStaticModel = GlovesLong_Ground,
}
it still use the hand bodylocation so this means you cant use gloves and bracers at the same time
so the next step is making a new bodylocation i guess, the way u guys told me
ah my bad
🙂
i found out that LowerArms was a blood location because i saw another mod use it lol
i dont think theres a list of all of them
Yeah, probably because I use discord canary
i manage to make the new BodyLocation, its working now with the gloves 🙂
now i can make all sorts of gaunlets, bracers and stuff like that
made some gloves with mesh there, welding gloves 😄
thanks spongia and dislaik for the help!
Hey everyone, me and my friends just got Raven Creek working for our dedicated multiplayer server, but the issue is, even though we are playing in Raven Creek, nothing shows up on our maps.
I am smack dab in the middle of the city, but the ingame map is blank
Vanilla regions still show up though
Anyone know how to fix?
map creators need to manually create the ingame maps, and ravencreek has yet to get compatibility with it
Thanks for the headsup!
Second question, we thought of trying to download the RavenCreek lootable map, but the map is unusable and is just an item instead
lootable maps were also updated alongside the ingame map
is broken for the same reason
@dark solar do you know if Eris minimap has support or will it also be unupdated for Raven Creek
dang, oh well, thanks anyways!
is there any tutorial on how to add item to the new foraging system
hey guys, what does it mean when a mod has multiple steam id's for example with Shark's law enforcement overhaul it has this Workshop ID: 2616752828
Mod ID: SLEO
Mod ID: SLEOBlack do I add both mod id's or just one?
Have 2 mods
Ask the mod author in his mod page for more explanation when you don't understand. This way he/she will explain and make it clear for others that have the same question. And like dislaik said, this is two mod in one workshop item. For exemple, Computer on the workshop, contains the main mod and 3 other mod. They are optional and adds to the main mod. It allows people to pick what they want.
Correct me if im wrong, but pulling the value that is the server's day length (1-26) would just be SandboxVars.DayLength correct?
Not SandboxVars.xxxxxx.DayLength
Or some other configuration
SandboxVars.DayLength is correct
Hmmm
Something must be going awry elsewhere
Script affects both fatigue and endur, only while sleeping, but fatigue is reading as 2.456e-6 in game, obv bugged. But endurance is not acting differently, and it runs literally the line after. 😵
can you show the code?
Actually, the first test version is on the workshop as friends only
So you should be able to see it
Im away from the PC for the night
But i understand its a hassle
I will upload this test branch to the github in the morning
lmao
is it possible to make a single chamber rifle? ie a rifle you need to reload after every shot?
scripts for weapon items have a field MaxAmmo so I don't see why not
never done any modding outside paradoz games so
i have no clue
thanks and lol
which mod is this? looking hawt
also, we still don't have a be all building mod with all the assets from the 3 most popular tile packs right? like buildable crates from dylans junk crates. Or even wooden planters? or plastering & painting walls with a selection menu of wall plasters from these tiles?
is dylan on here?
@drifting ore the right one?
i wish I knew how to code
Sooo, whats with bags that are full of different stuff being stacked? Can some legend make a mod to fix this? Its a little frustrating is all lol. It would be amazing if they didnt stack and each one gained a suffix based on what category of stuff its most full of. So if a bag had mostly tools itd be: Garbage Bag (Tools)
its a Raccoon City Emergency Service Pack
my very first addon for pz so its pretty outdated right now hence i'm updating it to 41.6 aswell as add some more stuff and fix bugs of the original
How did you make the textures?
Paint.net ?
I'm assuming you ask where i made them
is there a reason why no modder has attempted to make hood/trunk, etc. animations work with current vanilla cars? i lurked around some and found all files in .fbx format, which can be easily edited in blender and co.
i did some experiments myself, but i have too little experience with blender and lua to get anywhere right now
well, at least not further than this
the way i see it, almost all vanilla cars already have interior, trunk, and hood details. it's a mystery to me why this isn't used yet.
There are so few people here that have the knowledge of getting these vehicle animations to work, I can probably count them on my hand. Those that do know have chosen to work on their own custom vehicles.
sux. after seeing ki5 vehicle stuff with the animations, or stuff like that ata mustang, etc... i really want this in vanilla vehicles as well. even if it's just the hood and trunk and not interior.
Its tougher to fix other people's broken stuff (in this case the devs) and get them to work as intended than just making your own vehicles that just use the system. Plus, TIS Martin will revisit his work, I imagine, so all that time and investment that the modder would do will go to waste.
well, i wouldnt call it a waste if that revisition happens in 10 years from now :p
might as well call superb survivors a waste then :p
Build 41 multiplayer was a huge roadblock in terms of their projects. They shelved many things in the pursuit to develop it fully. I imagine that they will revisit their cars a lot sooner than you think when we get into Build 42.
too much speculation :p nothing is certain right now i guess
Just you wait until this next thursdoid. A lot of things will be clarified once they post their scope roadmap for the next build.
is that announced for that blog post?
No, but I expect it to come soon, since its the next logical step to release, granted that Build 41 is the main stable build.
one can dream
Editing vanila cars is a lot of work, to be honest the most pleasant part is modeling the rest is very boring to do
I had a project to implement deformation in vehicles, but it's a lot of work.
i'd rather do the configs than the 3d models, considering i have less than noob knowledge when it comes to modern 3d modelling tools
i would keep working on this if i could figure out why my hood and trunk aren't showing up. but the way it is now it's just too bleh
download the mods from the workshop that works and use them as an example
Because these details don't yet have the textures of blood, damage, etc.
that can't be a major blocker
also that can't be true
trunk and hood are obviously already there and working.
there is no need to have blood and stuff shown on the engine block
Do you understand what I said? Doors, trunk, hood can not have dents and other damage, logical in a collision
how does that relate to animated parts?
It is logical that this cannot be on the engine
i was never talking about dents and stuff
this is the simplest thing to do, just use the same hood mask on the engine
What's the difference between regular parts and animated ones? Both don't have these textures
bro, that is completely not what i was talking about. there is no need for such details.
also if it's just in texture it matters even less
textures are like the easiest things to edit in all of this
Okay, you don't want to have these textures, but what will Filibuster tell you? He has more than 50+ cars and each one needs to be animated (and some will have to be redone)
... i'm not even going to argue this, because it has nothing to do with what i asked about.
I just answered your question
That's why no one wants to do these animations and details
animated door shares the same texture as normal car has. if damage decals are added in textures, it would automatically apply to the door mesh as well
Well, try to do it, I'll even thank you
i tried to animate parts, as can be seen further above.
??
Does anyone know, what clothing slot this thing is?
its in UnderwearExtra2 I think
snow mod not workintg
is there a list of all clothing slots in game?
Are you the tile creator?
I've made a tile pack in the past yeah
ProjectZomboid\media\lua\shared\NPCs\BodyLocations.lua has all of them
How did you define the location for resistance and defense?
What, @ruby urchin replied, it's with bloodlocation
But now I wonder if I can put a blood location only on the left hand for example and not on both? I don't think so but I ask
I saw that some VHS / TV shows can teach recipes through 'codes'
e.g.
{ text = "RM_6f6e503c-51df-4e42-9742-ac7191295778", r = 1, g = 1, b = 1, codes = "RCP=Make Metal Roof" },
Anyone know if I can add any recipes in here, or if these are just special cases they've made support for in some file?
Maybe by making a new line, but you will need to do a new text too
What are some “essential” mods people always use in their play through?
Why haven’t there been any total overhaul mods for PZ?
how do I make the worlditem appear, only the icon appears as of now
sorry to barge in here but i'm trying to get started and i want to check a placed structure's health, how can i do that with the debugger?
in the item script you need to add a "WorldStaticModel = MyModel," variable.
then you'd make a new text file in the scripts folder for your models which should contain something like this ```module Base
{
model MyModel
{
mesh = MyMesh,
texture = WorldItems/MyModelTexture,
}
}
WorldStaticModel should refer to the model name in this model script
thank you it worked !
Anyone know of any mods that are currently working/optimized for the current release that add in new crops?
so much stuff to remember when adding an item, well I learned a lot today 😄
My Farming Time
Awesome, thank you! Seemed to be a pretty popular one but was just trying to confirm 41/MP compatibility/stability.
I looked at that mod of yours earlier, because i wanted to add farming to one of my mods. But couldn't figure out the crop textures in the .pack, is this something you'd be willing to explain a bit?
how do I enable workshop to auto update ?
getting kind of annoying with the server mismatches
Any guides on loottables? Like how a tile or room is defined and for me to spawn certain items in
Guys, im a total noob as you can imagine from the question you are gonna read. What language do PZ mod use? Is there a little tutorial?
It uses Lua
Mmm interesting
download a mod and check its files
This is a visual guide for mappers and modders who need to add or modify PZ's loot entries using the new ProceduralDistributions.lua approach. Whilst the ProceduralDistributions.lua file has been in the game for quite a while (i.e. the Gigamart shelves having distinct loot types), TIS will be eve...
Thanks
I am unsatisfied
rip
Hello cleverest guys, do you have any idea about the path for loot distribution files ?
wrong chat
Woops
Am i really ?
your message didn't even reach me, sorry. I was talking to the lad asking for mods
"media\lua\server\Items" and if you're trying to add your own items make a new lua file and have it contain this
require 'Items/ProceduralDistributions'
table.insert(ProceduralDistributions.list["ClothingStorageWinter"].items, "YourModule.YourItem");
table.insert(ProceduralDistributions.list["ClothingStorageWinter"].items, 3);```
and just replace the stuff with what you want
Hi was wondering if any one has a issue when making a car mod where your character will not get into a car despite making the areas from entering a car much larger. There is no animations at all and the console does not show the command was run for entering the car. Want to know how to fix this and find out if it is a coding bug or a debug vehicle editor setting issue. I can interacted with the trunk and boot but not the car doors. The area for each seat does show (see first picture). I made a police and taxi version and do not have any issues its just the one pictured. Pretty much each car has the same code
Hi, does anyone if there is a mod that allows you to play as a zombie, or control the Zombies? Running a server and I thought it'd be cool to be able to chase people down as a 'smart' zombie or be that one sprinter and really mess with em. Or be invisible as an admin and sorta respect control Zombies during like a wave based attack on player bases.
never seen that MCbeer and i tbh i dont want to lol
Heya, are these ClothingItemExtraOption and ClothingExtraSubmenu in a separate xml?
I plan to make one for the headphones where it can be worn on head and resting at neck
Working on a modding framework to make adding chat commands a lot easier.
Here's an example of a LOOC command for a roleplaying server:
require "Commandeer_CommandHandler"
Commandeer_CommandHandler.commands["/looc"] = function(param)
if not param or param == "" then
return "Usage: /looc [message]";
end
processSayMessage(string.format("*%s*%s: ((%s))", "teal", Commandeer_RPName.getRPName(), param))
end
Commandeer_CommandHandler.commands["/l"] = Commandeer_CommandHandler.commands["/looc"]
That's it. That's the entire code for the command.
yeah you just make two clothing item scripts and two clothing .xml files and then use the ClothingItemExtraOption stuff to point at the new item
Ah aight, what about the part where you can set the text that displays on the option
for example "Hood Up" "Hood Down"
in "media\lua\shared\Translate\EN" make a new file called "ContextMenu_EN.txt" which should look something like this ContextMenu_EN = { ContextMenu_OpenJacket = "Open Jacket", }
the "OpenJacket" part is what you would set for the ClothingItemExtraOption
Alright, thanks
oh shit
Any clue if it's doable to have mutually exclusive options in sandbox settings?
is it possible to replace / overwrite a vanilla clothing item xml
lets say the Military Headset
I just want to add the option where it can be both worn on head or resting on the neck
like a jacket hood up and down
you can do that using the item tweaker api mod, i just did something like that
in "media\lua\server" make a new lua file and then something like this ```if getActivatedMods():contains("ItemTweakerAPI") then
require("ItemTweaker_Core");
else return end
TweakItem("Base.ITEM","ClothingItemExtra", "thing");
TweakItem("Base.ITEM","ClothingItemExtraOption", "thingtext");```
then in your mod.info file you'll wanna add "require=ItemTweakerAPI"
Alright big thanks
to avoid an error you'll also wanna make sure that your new item scripts are under the Base module
or it'll break
Base module? like in the vanilla files?
Wait actually nevermind
Forget all this, military headsets are apparently not vanilla and was from Brita's armor pack
sorry about that
Guess I'll model a headphone now, don't wanna use someone else's work
in the item script you make a module that has all the items in it
guys the .fbx of the female model (Female_Body_03_redo) on the pinned messages changes position from Edit/Object mode, while the male body mesh dont, this makes modelling really hard, is there a way to set it like the male one or is there another reference mesh i could use?
select the skeleton and set it to rest position
ah cool i forgot about that thanks, but then when i finish my model i need to set this back to pose right?
i mean before exporting/save it
I'm a big ole nerd
Anyone know why the base XPMap lists default Strength and Fitness as 3 each and not 5?
cool
How do I make a player make noise?
whats the name of the mod
I mean an ingame noise, to attract zombies
yes
in terms of Stats in lua, morale is "sadness" correct?
as in getPlayer():getStats():getMorale() would be sadness correct?
Did anyone have success using the OnServerStartSaving event? I'm trying to use it on the server side to call a function to save a txt file, but the event is not being called.
Hilariously enough it's clientside only, I think.
static void receiveStartPause(ByteBuffer var0, short var1) {
isPaused = true;
LuaEventManager.triggerEvent("OnServerStartSaving");
}
In GameClient.java.
Absolutely incredible. I think most events that I expect to be on serverside are clientside only. Thanks for checking it out!
I can try to come up with an alternative, though
Looks like the event is deprecated as well.
Oh, wait, no.
I thought all the functions below a certain line were deprecated, but it was just the one directly below
Yeah, the @ applies only to the one below it
Let me see if GameServer is an exposed class. I'd guess not, though.
... Looks like StartPause is only ever sent by the admin save command, regardless?
Yeah. That's the only time that event will be sent, I think.
And I don't see a function on an exposed class that you could hook.
The only thing I can think of is, uhhh.
A dummy object somewhere that calls a function when saved?
But that seems... like a bad solution.
For one, it could become unloaded or get deleted somehow.
(also no guarantees that there'd even be a function to hook on it)
Well, there is a very suspicious solution that is to check for the event on the clientside and send a command to the Server. But that command would be called from every connected player.
The event is only sent when an admin manually saves the server, not when autosaves happen.
Ooh, I see, damn.
I could be wrong, but the only result I could find was that.
Let me check the Lua, maybe it's sent there.
Nope.
That said, I mostly don't use events; where they exist, they're pretty useful, but they can't do things like modify control flow or override stuff.
Some of my code is truly cursed.
(And despite that, isn't very likely to break with updates!)
Does anyone know how to include an object you can pick up like a table, or lamp in a crafting recipe?
Any alternative you can think of to call a function on server saves or server shutdown?
You could try the onServerSaveFinished event? Maybe that's called more reliably.
I figure as long as it's before the server actually closes, it should be fine?
Oh, did not know about that one, since I'm using the wiki. I only know about OnServerFinishSaving, which also did not work.
Ah ok
oh, there's also AddEvent("OnSave");
lemme see when it's called
Mm. GameWindow.
Probably not applicable either.
An example of some of the horrible code I use:
Commandeer_CommandHandler.oldCreateChildren = ISChat.createChildren;
function ISChat.createChildren(self)
Commandeer_CommandHandler.oldCreateChildren(self)
self.textEntry.onCommandEntered = ISChat.onCommandEntered;
end
Hooking onto Lua functions—this is a pretty standard thing in Computercraft, sure, so it's to be expected that it'd have its uses here
the issue is when you bring Kahlua into it
Commandeer_RPName.oldGetTextWithPrefix = Commandeer_RPName.oldGetTextWithPrefix or __classmetatables[ChatMessage.class]["__index"].getTextWithPrefix;
__classmetatables[ChatMessage.class]["__index"].getTextWithPrefix = function(message) return Commandeer_RPName.oldGetTextWithPrefix(message):gsub(">%[.-%]:", ">", 1); end
This will intercept all calls of getTextWithPrefix from within Lua code.
Also, subclasses that aren't exposed won't have their metatables.
ISChat.addLineInChat = function(message, tabID)
-- once again "casting" SayChat to ChatBase
if __classmetatables[ChatBase.class]["__index"].getTitleID(message:getChat()) == "UI_chat_local_chat_title_id" then
message:setAuthor(Commandeer_RPName.getRPName());
end
Commandeer_RPName.oldAddLineInChat(message, tabID);
end
message:getChat() returns SayChat, ShoutChat, etc., rather than ChatBase, which means we have to manually call the parent function on ChatBase; otherwise, things like getTitleID will fail, since SayChat etc. have no metatable set.
(A lot of these are workarounds for not being able to change chat channel settings from within Lua, like isShowAuthor.)
Steam workshop.
This is less of making mods and more of ideas anyone can have
Medieval stuff in PZ
Wild West stuff in PZ
(wild west stuff as in their guns, lever-action and old revolvers. Almost entirely for style points)
(Medieval stuff as in like buildable castle walls and swords and freaking armor!)
an entirely medieval version of PZ through mods and maps would be incredible
Sleep With Friends v1.2 now out.
Has you choose average real time minutes now and applies appropriately for all day length settings (half hour and 15 min days not supported yet). Also lets you set the endurance recovery rate relative to your sleep time.
Any idea on how to get the forname and surname of a player on serverside? player:getForname() and player:getSurname() returns Bob and Smith, which are the init values for the IsoPlayer.
really cool bruh
Looks like "Chef's Immunity" got removed from the Workshop, which is a huge shame.

im doing some medieval/fantasy replica weapons, but you should check ancient armory mod, lots of medieval weapons there
I'm getting a lot of those on my workshop pages :/
this mod update broke joining my mates server.
Ye I will check it out thanks
It's painful because dudes see the comments and "Well i won't download it then". And my ratio is already dogshit
yeah it is painful. I wish TIS was fixing the problem for good
on curseforge you can delete coments from your mod page
what is going on with your mod Dude7ox?
I wish i knew
You can delete comments on your mods, or you can disable the whole comment section, which other modders have done in the past.
you can delete comments on steam workshop too
there you go
nice i did not know it, i did not upload my mod properly yet, its under construction, so i did even seen that yet hehe
true, but I don't want to disable the comments, I just wish TIS was fixing their game for good
Yeah, its out of principle for me not to disable the comments, but I totally understand other creators to do so since I know how genuinely meanspirited and unhelpful people can be. Not everyone wants to do tech support. Some people just want to create, not deal with hundreds of people who can't fire two neurons together.
of course, I'm not judging modders who disable the comments
well if you have like 100K subscribers or more, that could be a lot of work 😅
If you have 100k subs i don't think you even care about comments
why not?
Dunno
you should allways care for your subscribers
no matter if you have 1 or 1 million
not saying you need to read/respond to all thou lol

How long is the "This is how you died" loading screen music?
1:33
C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\music\theme2.ogg
there is also tunedeath.ogg which i actually never heard
I don't know if there is any but there should be a mod that allows you to check other players for weapons. High sneaking players can hide some weapons and prevent others from knowing (when checking)
Cool
I didn't have to do shit, he fixed it himself
Although other skin changing mods did work on existing worlds for me...
What determines how the world model of e.g. a weapon is positioned? Here's a modded bat next to the vanilla one, how do I get mine to be positioned not-upright?
I believe there are 2 separate models
One is the worldmodel that you hold in hands and on your back (for the bat in this case) and the other is static one that you place on the ground
Thank you, it helped a lot 👌
Is it not either of these two i gotta fiddle with?
I got it working 
How?
Changed the rotation in the above.
Hey guys ! Do you know any mod about adding voip to radios ? There was a great mod (apcom) but it is discontinued.
You could talk with ppl via radio on same frequency and even hide radios somewhere to spy on someone.
i think they dont know that you can change the mods that are enabled on the save lmao
@west crystal - Comments are honestly as much work as you make them. I try not to curate shitty ones. The gray area is the "is broke" comments with no useful information. Fortunately, having instructions on how to debug on the mod's description helps.
Well i wrote in the description so they should make a new world with the mod enabled. That's honestly all that i can possibly do due to how simple the mod structure is, there is nothing to debug
I mean in case of errors - most people don't know how a console log works
Most people don't know how their pc works
Fair
Yea I learned my lesson this holiday and had to put up a "I CANNOT GAURENTEE I CAN HELP YOU ON XMAS" like damn bruh I want to help but I got family lmao
"Is Broke"
"Whats your mod list and are you sure mods are updating right?"
no response

Voip works on radios. I tested it with a friend once we found some. Sadly, you cannot transmit from a 2 way radio to other kinds of radios, at least it didnt work for me
@sour island @civic galleon so in the end I replied this 😂
Yeah, my skill journals were bugged for new journals cause I didn't test them thoroughly enough
"stop updating"
I don’t understand the difference between speaking voip with radio, and 2 way radio
Thanks for the info !
some dude demanded that i update my mod and then i checked another mod and it turns out they did the same thing to them 3 times in a row lmao
what is the proper issuance to reset character model after inventory change? None of these are refreshing against the new inventory:
player:update()
player:resetModel();
player:resetEquippedHandsModels();
Has anyone made a mod that makes it so while you hold a flashlight in your off hand and use a pistol you in the main hand, you stabilize it on your wrist? Kinda like how Leon from Resident Evil 2 handles it
Is it possible to add recipes for working lightswitches and/or garagedoors ?
agree, ppl are too stingy to "like" but when they find some mod not to their liking they are more then ready to sh*t post and press "dislike"
like cmon if you don't like some thing than why not just skip it and go away? and don't spend your "precious" time on negative ratings
Fucking hell he's still here
The mod is simple, you either interested or you're not even gonna open the page
Dislikes come from this kind of people that can't figure out how to activate a fucking mod and it's somehow MY fault
yes it is, bcz when they install a mod, they think that now they made you a favor, and now you must make then happy no meter what
and since when do we have toilet plungers as icon?....
at least it was frying pan before dammit, and how do you get ranks?
Dunno, just by talking in the chat?
I would be happy to be wrong, to see my mod not working properly or at all
But once fucking again, i launch it from clean, and it just works
I made a that to add to to timedactions
local ISEquipWeaponAction_perfom = ISEquipWeaponAction.perform
ISEquipWeaponAction.perform = function(self)
ISEquipWeaponAction_perform(self)
--Equip to hand not cut
end
Do I need to use a Events.OnSommething to use it ?
function(self)
```I do not understand this bit
Hmm it's like I know that if you make an airport out of wood, cargo aeroplanes will land there, but I do not know why.
How do I make a custom spawn location? I wish to spawn in the pharmacy of Riverside
What is the difference between defining a function like Something.Something and Something:Something?
which mod
the name xd
Maybe function Something.Something(self) is the same as function Something:Something().
Also does anyone know how to give a custom amount of metalworking XP? i tried to make my own OnGiveXP functions but they dont work
Anyone?
Hey guys, I've found a problem with MADAX rager bat mod and wanted to fix it, but I am stuck.
There's:
- Base "rager bat"
- Heavy mod "rager bat"
- Nail/Axe/Barbed mod "rager bat"
At first I've noticed that standard Rager Bat cannot be attached to the back, despite of AttachmentType=Shovel. Same problem with Heave mod rager bat. NO PROBLEM with Nail/Axe/Barbed variant.
Later I realized that upon loading the game, the weapons "rager bat" and "heavy rager bat" simply disappear!
Nail/axe/barbed stay in inventory.
So I believe the problems have the common reason.
The definition in /mods/name/media/scripts/ for working/non-working weapons seems the same.
Has anyone seen anything like this and knows how to fix it?
Oh hey I think I found it
LOG : General , 1640626516646> java.security.InvalidParameterException: Error: TreeDamage = 1.5 is not a valid parameter in item: ragerbaseballbatheavymod```
I think this error makes the game remove the item, I will go tell the author
Does some1 have experience with modding a Zomboid Server? Im trying to install a few on gportal. There is a field that says that i just have to set the mod id in there for example CraftableAxes;Katana;MREMea.... but i doesnt work
Is there up to date .x file importer to blender? Or working converter to .fbx or such?
fragmotion and export to fbx
https://3d-convert.com/en/
you can convert to .dae and import in blender
Convert any 3D files easily and quickly with our free online converter. Whether it's STL files for 3D printing, OBJ files for computer animation or CAD: we can easily convert them all. Give it a try.
amen
Alright then, I need some help.
How do I g et the coordinates for the Riverside pharmacy
Alright ,figured it out
Aw, i already prepared my answer
For what?
For your question
I've actually got one more
How do I give my character the building key on spawn/
Via debug I can give myself the key, but I wish to give it on spawn
Doesn't he automatically spawn with one?
If not i can't help with that unfortunately
Does anyone how to make a key spawn on your character?
how do you add mods to ur own severe to play with ur buddys??
alright... welp. Imma trying to import .x animations to Blender, tried various Fragmotion (since it can load .x properly) exports, and import scripts for Blender, cant seem to make it work. What format and importing script should i use? :p
to piggyback on the importing to Blender question, once that's sorted out let's say I want to make a change to the base male model--would I need to export this to .x, or would the game recognize an .fbx with the same filename as overwriting the base model when placed in a mod folder?
Transmitter Radios transmit to other transmitter radios. I do not say that as an in-game item. Just that voip does transmit over walkie talkies and such, only you need another one to hear them. You cannot, say, tune into a walkie talkie station in the car and hear people
That is just my experience
But when we turned walkie talkes on and had bith of then set to the same frequency, we definitely heard each other
Okay i get it if you don't have a 2way you can only hear but not speak
For real you could speak between radios ?
You must have a radio that allows you to speak into it, to hear other players speaking into the same
I'm trying to do this on my future server
Yes
Okay i get it
I have done it on my Dedi already
Omggg so happy to read this
Be sure to lower your VOIP range cause goddamn even 75 is way too far imo
Btw im pretty sure the default is 130 
But I let people on my dedi vote server changes and they said no to lowering further than 75
Jerks
Lmao
75 is what in term of range ?
75 tiles
In meters approximately ?
Couldnt tell ya tbh
It looks pretty far
I pretty much just work in raw units, disregarding specifics
Okk
Like, its 10 tiles away. It takes 45 in-game minutes
I have 3.5 weight
I play dumb a lot lol
10tiles ? Are you sure ?
But to answer your question, you do not need a mod to talk to other players over a radio
Thankss
Im not talking about anything i was just giving examples of how my brain works
Personally, I think the VOIP needs to be redone entirely. Why the hell can I SUPER CLEARLY hear other people in a completely different house down the road
I want to feel this walking dead moment when your only way to speak with someone is with radio
As in, I wish walls and object played a big role in VOIP distance
Yeah but they said they are going to fix it
Well... I can surely say that you sometimes can hear everything in Voip while loading into the server
lol voice chat has a bigger radius than any gun
Hahaha
Lets hope and in the meantime play either shouting insanely loudly or manually turning down the setting ourselves
For now it's okay and i'm sure that this will be one of the next features since they just have added mp
Oh, I could probably fix this.
Well, "fix."
Forcing all radios to operate on the same wave bands?
If you can help getting a great voip, for real i'm supporting you
Or just.. you know, don't use it since it causes black chunks
I have never had that happen
But I only play on my private dedi lmao
Where it has never had more than 6 people on at one time
shrug
We had a few, and i saw on pz forum devs mentioned it
Frequency should be the only thing that matters, it's not like they simulate CW/USB/LSB/AM or anything.
You would think right!? I assume there is a variable somewhere that tells the game which radios can communicate
Yeah, I think it's checking whether it can send
Yeah, i guess the less people the less desync you have, we have like 50 dudes on the server
Co found me the variables for furniture sleep quality, so I feel like there is a variable for damn near EVERYTHING
I'm working on a very ambitious rp server in the walking dead vibe and i want radio to be a predominant way to communicate in the server.
There was the apcom mod that was awesome.
You could use radio to spy on someone, hear communication of ppl etccc
For real this would be marvelous
Yeah, I solved the issue with text over radios by looking at decompiled source.
Excited to include options in SWF that will affect your sleep cause of furniture, including allowing the user to set how much better or worse good and bad furniture is
The issue you mean when it can transfer only screams?
Like, allow every server to set how much slower "bad" furniture recovers you and how much faster good recovers you
Love you modder ppl you are bringing so much to the community 
Tbh
I made Sleep With Friends out of anger there wasnt a good way to incorporate sleeping and fatigue in MP
That somehow NO ONE had done it yet
It is you ??
Yep! Turns out it was because the helper function used in ISChat.lua didn't set a certain var.
Cause tbh, I was so bored being an endless tank
The radio relies heavily on IsoGamePlayer.lastSpokenLine to pick up messages. However, ISChat.lua uses processSayMessage and other various helpers defined in LuaManager.java, which circumvents it. By either adding setLastSpokenLine(text) in ISChat.lua or in the actual source code for processSayMessage, you can get the radio to work.
Have found the mod yesterday and was like omg thank you random ppl to have thought about this
Oh no, im exhausted, better run for 15 seconds and sit. Ahhh now I can fight another 5 hours straight
Like gtfo dude thats so whack
Si
Dude where can i buy you a coffee ?
Dont worry about it
Huge thanks!
Again, my anger drove me to be productive
It was an award of itself
Learned a bunch about LUA coding
More plans for more mods
Feels just as good as playing the damn game to be honest
Lua is pretty okay when you get into it, discovered it when i was a teenager on garry's mod
Totally get it mate
Before SWF, my modding abilities only recently ventured out of textures
Currently working on a command framework along with a bunch of RP server oriented commands.
Though even then I hadnt done anything like that in years

An example of some of them in testing.
Love it
It's mainly oriented towards servers that don't use VOIP, but once I add permissions checking, it should be easy enough to use it for stuff like admin commands.
I can see others extending it for action only messages for RP
Oh I have that.
So you can speak when close to someone without alerting Z or players
Or lure one zombie silently
Or a player
Like being able to quickly type "Lights cig"
It's actually mostly a port of a friend's mod to my command framework
since it irked me that she just
Very stellar work my friend
copied and overwrote parts of ISChat.lua
Oops, but in private
Lmao
This Madeleine has serious problems i think
Also, since radios are working, we're probably going to be disabling safehouse/faction chats in favor of radios.
Extra extra rare loot
YES THANK YOU
Cause ill be honest, extreme rare isnt rare enough these days
Radios work
Oh i misread
As arent working
My bad
I want radio for everything hehe
I feel that radio should be the most important tool to survive
I cant wait for 64 player limit servers
Kinda waiting to play on publics or whitelists until then
If you could see the server we are renting you would love it
I cant wait to dismantle someones radio in front of them
However it's a french server unfortunately
Hahaha
</offtopic>
Anyway thanks for the hints and hope that we will speak about modding again 
Hey! Anybody knows any cool mods that are multiplayer friendly that make the game harder? I would go with expanded helicopter events but MP patch is in works, so yeah im looking for fun stuff like that, thanks in advance!
Is there a metric system mod?
<m_MaleModel>media\models_X\Skinned\Clothes\bob_trousers.fbx</m_MaleModel>
<m_FemaleModel>media\models_X\Skinned\Clothes\bob_trousers.fbx</m_FemaleModel>
Try this path instead, might work.
Do you have this line in your xml? <m_UnderlayMasksFolder>media/textures/clothes/jacket/masks</m_UnderlayMasksFolder>
Hello , I don't know if it's right section to ask , but i have problem regarding multi. So is anybody familiar with server commands in there?
I want to increase or decrease someone weight
As mod can I do that?
Mind if I DM you?
love when someone sends a friend request right after commenting saying my mod doesnt work lmao
Anyone know of a mod that has a cure for devils fungus?
#mod_support for questions like that, this channel is for mod development (unless you're asking to check before starting one of your own)
I've never heard of Devil's fungus
Devil's water fungus is a plant disease that requires the tile to be dug up to eradicate it before it spreads and has no spray or cure in vanilla gameplay. Was seeing if anyones done it yet and I'd happily just use their code/mod but if not I'd be trying to mod it myself.
But thanks I'll ask there.
I literally just want a mod that lets you start as a clown
Saw this less than an hour ago and I just went "Man, I wanna be a clown."
Some people start their life as a clowns...

Authentic Z, Fashion montage and enable all unlocked clothing in the sandbox and you can,
Hey guys, question. How does loot spawning work? Does it all initialize on server creation or a different method?
There is a lucky perk that as wiki says increases your chances of finding loot
So my guess is that loot generates at the moment you open a container
Good evening all! I am searching for a way to fix one of my mod for multiplayer. I am calling an event at Events.OnNewGame.Add to adjust traits but this is not called in multiplayer, what would be the equivalent called after any character creation. I already tried OnCreateLivingCharacter but it's not working either 🤔
What mods are there that enable you to not lose skills on death?
is there a way to tell which mod is giving me problems in single player or i have to enable/disable each one and test ?
if you press f11 you can get the log of errors and the functions triggering errors, this can lead you to the falty mod
I wonder if Size Labels is MP friendly
But that mod blurs the line between difficulty and inconvenience
Love it though cause I hate my vidya self
Do you know how to look at the console.txt?
Framework's released!
https://steamcommunity.com/sharedfiles/filedetails/?id=2697245018 And the roleplay commands mod.
Any mods that allow you to make use of items in a bag? For example a sewing kit holds scissors and needle, but I can only use them if taken out and put back again after
What does it mean if a profession from a mod shows up as 'Unknown' in the character creation section?
where would i find the textures in the game files? im trying to create custom wall textures but i need a sprite to work off of
check TileZed
found what i needed to do
Looking for a mod or get a mod done where areas can be sectioned off and flagged as pve or pvp, and add other features if you know hmu ☺️
if someone would mod in Macaroni and Cheese as a cooked food item I would die complete
Hey guys, is player cap past 32 players a mod? Or anyone here know how to do it?
@winged lotus Have you looked into the 'OnGameStart' event? That will trigger every time the player loads in, whether it's a new character or not, but you can add a modData variable that will set 'traitsAdded' or something to true for that player. It does not provide the player, but if it's in the client folder and ran clientside, you can just do getSpecificPlayer(0):
if (specificPlayer:getModData()["TraitsMod"] == nil) then --create mod data if it doesn't exist
--add traits
specificPlayer:getModData()["TraitsMod"] = {}
specificPlayer:getModData()["TraitsMod"].traitsAdded = true
end
What's the difference between getPlayer and getSpecificPlayer?
Is there a mod that allows you to fully disassemble non-wreck cars?
Hey guys
I've been using the Autotsar Tuning Atelier - Jeep Wrangler from the workshop and noticed that depending of what you put in different " chest " you've got some cosmetics adaptations, does anyone is using it too and figured out what items should be used to get this result ( Like ont the rear trunk on the black car on the left, and on the red one, with the top trunk. ) ? :
you can see inside the mod for that
It's a shame that a number of mods were broken by the map changes. Aza's notes, Save Our Station, just to name a few.
I wish there was an easier way to view things like custom pictures in game.
An API that allowed you to do that would be nice too. 😛
If you can point me out ?
..\Steam\steamapps\workshop\content\108600 and search his workshop id (you can find it on workshop's description)
example:
Yeah, I get that, but what do you mean by " inside the mod "?
see the code, models, etc
basically, discover the trigger of what you are looking for
@grand carbon Well, gonna try, but absolutely no idea of what I do look for lol ^^
Itemtweakeritems what mod is this file from
Hello guys, which mod that provide other skill books? ex: maintenance books
Hi there brand new to modding with project zomboind and i was wondering is there any way for me to check if a world object is nearby?
Say i wanted someone to have a "clean plate" recipe but it would only work if they are near a sink world object is that available? I see the NearItem and OnCanPerform function's being called in the base game but im a bit stuck on how to get a nearby world object.
I essentially want instead of selecting the tile like e.g the water dispenser mod (right clicking) i want to have it as a recipe and check nearby tiles for the object
@warm bough The dispenser mod get the squares when they are loaded nearby the player.
What you want is not the same, you want to check the surrounding squares in the recipe event OnCanPerform.
function MyRecipeOnCanPerform(recipe, playerObj)
local canPerform = false;
local playerSquare = playerObj:getSquare();
-- From that square get the surrounding squares
local x = playerSquare:getX();
local y = playerSquare:getY();
local z = playerSquare:getZ();
return canPerform;
end
Then in the recipe script:
recipe MyRecipe
{
WineEmpty/WineEmpty2/WhiskeyEmpty,
Result:SmashedBottle,
Time:20,
OnCanPerform:MyRecipeOnCanPerform,
}
Yea i got that it isnt the same was just using it as an example. for the getSquare func that returns the tile the player is on?
im not sure i fully understand the xyz getters. What info would they contain?
I get the position but why the xyz thats only returning the same tile in each case
what im trying to ask is how the payload differs
you can do a loop from -1 to +1 to check beside
yeah
local thesquare = getCell():getGridSquare(x,y,z)
it get performed when trying to execute the recipe
ah so e.g clicking on the recipe
if it return false then the recipe is canceled
you can test first, and manually return false and true to see what happen
then add the logic if it does what you want
right i see well thank you so much. I appreciate the help! Ill figure the rest of this out tomorrow. Just got to finish off these sandbox options haha
Cool and I wish you success with your mod.
oh haha just saw your the creator of the water dispenser mod 😂😂
Ahah I just saw your comment, and i went to check my commenting in the mod and i barely commented anything xD
But if it helped then great
yea honestly its nicely laid out and what needs to be commented is commented 🙂
I'm having trouble finding the vanilla item icons, I assumed they'd be in the textures folder but that appears to only contain the worlditem textures, am I missing something?
@signal coyote They would be into a texturepack if im not mistaking
Steam\steamapps\common\ProjectZomboid\media\texturepacks
Ah gotcha, I'll figure out how to open those then, thanks
guys im trying to add a new bag i did (using the fanny pack as model, a batman belt), but no matter what i do the option to 'wear' it wont appear... do i need to create 2 objects (front/back) like the regular fanny bag even if i dont want to equip on the back too?
this is my item script, not sure if im missing something
item Wiz_BatgirlBelt
{
DisplayCategory = Bag,
ClothingItem = Wiz_BatgirlBelt,
clothingExtraSubmenu = UtilityBelt_Wear,
WeightReduction = 70,
Weight = 0.3,
Type = Container,
Capacity = 3,
DisplayName = Batgirl Utility Belt,
Icon = Wiz_BatgirlBelt,
OpenSound = OpenBag,
CloseSound = CloseBag,
PutInSound = PutItemInBag,
BodyLocation = FannyPackFront,
CanBeEquipped = FannyPackFront,
RunSpeedModifier = 1,
WorldStaticModel = FannyPack_Ground,
}
i create a entry on Translate_>EN-> contextMenu for that 'UtilityBetl_Wear' there
even so there is no option to wear it
thank you, you've helped make something beautiful
Hello there 
Does anybody know how to use Tiles from another mod in my own?
Does anybody know how to make custom roof snowable at winter?
i manage to figger it out looking at USCM armory mod; if you want a custom bag to be equiped as the fanny bag, you need to create 2 item scripts like that vanilla fanny, even if its 1 side only; also on body location you need to set to 'Tail' for some reason or the model wont appear too
i made the batgirl belt as a container 🙂
its all meshed too
on that pic you guys can also see several parts of the wonder woman outfit with meshes
Wonder woman cosplay
Any mods that allow you to make use of items in a bag? For example a sewing kit holds scissors and needle, but I can only use them if taken out and put back again after
Yay
О, русский
Net
Hey guys, looking for a mod if anybody can help me out? My friends and I are playing but we're having trouble finding each other all the time. Is their a mod where we can see eachother all the time? I saw this one but not sure if it will do that https://steamcommunity.com/sharedfiles/filedetails/?id=1619603097&searchtext=map
Has anybody got a modpack that works for coop
How do I add code to a timedActions that already exists?
I tried:
local ISBaseTimedAction_new = ISBaseTimedAction.new
ISBaseTimedAction.new = function(self)
ISBaseTimedAction_new(self)
--Code here
end
The problem is that I can't access self in the function I add. local modData = self.character:getModData() give me a error
If I remember correclty it needs to be : and not . for your new version?
Can any one tell me how container types are defined ie "Shelves" and when ISBlacksmithMenu creates one from ISBlacksmithMenu.onMetalShelves() how it's defined. I'm attempting to make "Large Metal Shelves" buildable by metalworkers using the appropriate metal bars/metal sheets/welding rods etc.
You mean ISBaseTimedAction:new = function(self)? That give me a error
In recipe scripts, can you have a keep command within the alternate options for an item in a recipe? I.e
Bowl,
ToiletPaper/keep Notebook/PaperNapkins,```
So if it's made with toiletpaper or napkins, they'll get consumed, but if it's made with a notebook the notebook won't get consumed?
no, you need 2 recipe
ah damn, alright, one for all the ones that get consumed and one for all the ones that don't i guess?
I think in 2 recipes, one with stuff that will be consumed and another with one that will not be consumed
Cool, thanks!
keep item1/item2
vs
item1/item2
wait i also use this mod but what is the dark blue text?
The purple is emotes and the teal is out of character chat.
I think @weary matrix , you already answer that but I can' t find it
I was cursed by a strange fascination that prompted me to make this, it is done, I only pray I will never be tempted to return to it.
https://steamcommunity.com/sharedfiles/filedetails/?id=2698208631&searchtext=
so what crossbow mod do you guys use? I really want to use it in my current SP run but kitsune's is reposted like a dozen times with different fixes. which is considered the "best"?
Why.....
Sometimes you just have to make the world a little worse
would this individual happen to be in here? i posted a reply explaining what the mod actually does, but i'm not sure if they subscribed to the thread
(also genuinely thanks for pointing out that i forgot to remove a print())
oldProcessSayMessage = processSayMessage;
processSayMessage = function(spokenMessage)
if not spokenMessage then return end
trimmedMessage = luautils.trim(spokenMessage);
if not trimmedMessage or #trimmedMessage == 0 then return end
getPlayer():setLastSpokenLine(trimmedMessage);
print(getPlayer():getLastSpokenLine());
oldProcessSayMessage(trimmedMessage);
end
The radio relies heavily on IsoGamePlayer.lastSpokenLine to pick up messages. However, ISChat.lua uses processSayMessage and other various helpers defined in LuaManager.java, which don't set lastSpokenLine. By either adding setLastSpokenLine(text) in ISChat.lua or in the actual source code for processSayMessage, you can get the radio to work. Note how I added setLastSpokenLine? Yeah, that's what fixes it.
the trimmedMessage bit is what's in the actual java code for Say() that i'm having to reimplement lua-side for processSayMessage
Good evening all! I am wondering, can we create custom moodles. I remember we could not do it back in 2018 (something about it being too close to the java), is it still the case or can we create custom moodles nowadays?
@drifting ore c'est pas le new qu'il faut intercepter, mais le perform
sinon le code me semble OK
mmm a non faut le faire juste sur l'action que tu veux intercepter, sinon ca va le faire pour toutes les timed actions
I know you can, but no idea how
a broken mod probably
Where can i find Rhymes Car's codes so i can spawn them?
Hi guys, dont know if this is the right place, but having a mod with new professions/traits would be amazing. Just a suggestion!
bump
in your steam workshop folder where you can find all the mods you subscribed to
do you have a lambda or something to select items?
'Easy Modding API' used to spoof their own, they were faked pretty well and blended with vanilla's but it still wasn't just vanilla code. They also have removed their mod for now so take that as you will...that's the exact reason I didn't want to rely on it.
Is the fastest way to test booting the game every time we make a change? Or is there a faster way to make changes on the fly and see the results?
something like this for example:
local corpses = inventory:getAllEvalRecurse(function(item, player)
return item:getType() == 'CorpseMale' or item:getType() == 'CorspeFemale'
end, ArrayList.new())
but should be on a container probably considering the error message you have
Sooo... None of these work when i try /addvehicle Base.X
check the scripts folder
I use a custom mod with only a mod.info in there. When I need to make some change, I quit current game, go to "Mods" section and toggle the mod. When you get back to main menu it will reload all Lua. Also in debug mode you can reload Lua files, but it does not work reliably for me
@karmic tree you don't have to paste the content of everything you find here you know 😅
try in #old_techsupport or #mod_support, here it's only about developing mods
Nah it's fine, i just figured out myself lol
I just like beeing specific since when i deal with tickets in my server that's kinda a pain in the *ss when ppl do the oposite lol
@weary matrix and @brittle jewel thanks for the updated info, will look into it!
no worries
Also, do you know if there is any event that is called when an item is dropped on hit? Like when the hat drops when a zombies hit the player?
Oh nevermind I missed it in the list! 😅 This one should do the trick https://pzwiki.net/wiki/Modding:Lua_Events/onItemFall
can you confirm if the event is triggered when a hat falls from a zombie?
I'm wondering if it's just about items being dropped by players or not
@winged lotus Unfortunately, it looks like that's only the primary/secondary items that get dropped by the player. Here's the primary bit from the java code decompiled:
if (primaryHandItem != null) {
this.setPrimaryHandItem(null);
this.getInventory().DoRemoveItem(primaryHandItem);
solidFloor.AddWorldInventoryItem(primaryHandItem, next, next2, n);
LuaEventManager.triggerEvent("OnContainerUpdate");
LuaEventManager.triggerEvent("onItemFall", (Object)primaryHandItem);
}
Have not seen your messages, I can confirm it does not work when hat falls
I am heartbroken
I will look into this OnClothingUpdated event 🤔
you could still do it with OnPlayerUpdate, something like this:
function OnPlayerUpdate(player)
local modData = player:getModData():getOrCreate('YourMod')
if player has a hat then
modData.hasHat = true
else if modData.hasHat then
modData.hasHat = false
print('Player lost his hat')
end
end```
hmm but that wouldn't account for when the player unequipped the hat
I'm not sure but I think this one is just about updating the cloth when they get dirty, bloody or spoiled etc
That is my main issue yeah, how do I know the player has dropped it unwillingly
hmm I guess you could check if he's got the hat in his inventory?
you'd have to save the reference of the hat in the player modData
@winged lotus wait, are you making a mod so you can retrieve the lost items? 😄
Indeed because if I drag and drop the hat to the floor, it will unequip it before dropping it! Great idea thanks!
Not exactly actually, I am reusing code from my "Blind trait mod" and "Instant transfert items with consequences" to create a "Vision Impairment & Functional Glasses" mod. Basically implementing working glasses for Myopic and Hyperopic
And I want those glasses to have a chance to break when falling!
Je veux que ce soit sur toute les TimesActions
ah ok alors
(tous français en train de parler anglais à ce que je vois 😅)
😄
Mais je veux changer le new car je veux augmenter timemax en fonction de quelques choses
Ok so what if you will just drag'n'drop them in some container? Bag? It will be basically the same as you dropping it on the ground
Yep and I dont want the glasses to break when moved between containers like that
Only when the glasses fall after a zombie hit or running into trees
just don't break the glass if in a container
I feel like the players might find it a bit annoying if everytime they transfer their glasses to the ground those might break but it is a trade-off yep I might do just that!
well if someone is putting glass on the ground IRL he should expect them to break? 😅
Well, I used to place mine near my bed on the floor when going to sleep... Until I stepped on it 😬
see?? 😂
I did not back then, small room!
Student version of myself was not that smart, he learned from his mistakes at least 😅
modData is not save? Variables seem lost when I quit and restart the game
no, you have to call transmitModData() on the object
When ?
when you update the data
local modData = isoObject:getModData()
modData.someData = 1
isoObject:transmitModData()
Work perfectly, thx
you shouldn't write directly to modData, use a namespace
Is it possible to add multiple items with replaceOnDeplete? I'm working away from my game setup at the moment and can't tinker.
What file can I find corpse loot distribution in?
Not sure but you souldn't be using ReplaceOnDeplete:
DebugLog.Script.warn("%s ReplaceOnUse instead of ReplaceOnDeplete", item.getFullName());```
IsoZombie.java
You cant change corpse loot without using java? Its not possible like other loot with lua?
are there mods that increase furniture's max carrying load?
Any leads on how to recover the item equipped at a specific slot using the player? Currently to recover the equiped glasses I do :
carriedGlasses = player:getInventory():FindAndReturn("Base.Glasses_Normal")
wornGlasses = player:isEquippedClothing(carriedGlasses)
But I don't realy like relying on FindAndReturn to return the equipped one as the first all the time 🤔
You can look at all the equipped object then if one need to be equipped at the place you are looking for
Cheers mate
Interesting, and what would be the best way to iterate on all equipped items? I have found the "attached" ones but no list of equipped yet
Does anybody have any references on modifying corpse/zombie loot? I've managed to get procedural distribution working with items and containers in the world, but am having trouble on adding items to zombies/corpse loot tables.
I may be using the wrong terms but I'm having trouble finding anything on the discord or forums that is up to date.
I know that a mod add loot when you kill a zombie, don't remember the name. You sould look at it
Check OnZombieDead event
it's triggered after the corpse inventory spawn
I'm sorry I understand what an event is but I don't understand how I'd manipulate it without a reference/example/resource to read/learn about it. :/ Do you know of any mods that use this I could look into?
don't know any mod doing that specifically
Sorry for such a noobish answer to that, but is that function one used in the vanilla code and I would need to overwrite it to add in loot?
I may be confusing myself.
My old CoxisShop is using the Zombie death Event. I don't know if this works with 41 though.
Nope, I use the event to add a fictional Money value to the Player who killed the Zombie. Here is the GitHub repo: https://github.com/DrCox1911/coxisshop
Ah, that's super useful to know about. Thanks!
Anyone know why fort crosstown got deleted?
@stiff urchin I've been messing with zombie loot, I can get things to spawn on them with a chance of other junk like lighters etc
Can explain after work, busy atm
Thank you, @blissful meteor. Would appreciate that, feel free to PM when free!
Hello, I'm having trouble getting a mesh to work in the game. It is showing but im not sure if it is gigantic or some sort of shader artifact
using scale = 0.001 didnt seem to make it appear any smaller
you should ask the author
Anyone know how to get the skin color of a player? To change the texture of a clothing accordingly
I assume this would work: https://zomboid-javadoc.com/41.65/zombie/core/skinnedmodel/visual/HumanVisual.html#getSkinColor()
With player:getHumanVisual() that should work thx
Is there a way to prevent/disable the helicopter event?
You can turn it off in the sandbox settings
in the "Sadistic AI Director" category
Are there any mods that increase the amount of items a container can hold?
Because you can only put 50 nails in one container
50 items in one container is shit
im not talkign about weight either
Hey guys. We got a Server for Zomboid and modded it with a few mods. Then we set some changes like loot respawn will note be able if a house has structure like a barricade. But after a restart from our server the stuff always despawns. Even usual structurs that are placed outside. Everything is gone. Just the player inventory and the cars are left
I can't get my item remove of the inventory of a player, I tried that
self.character:getInventory():remove(self.character:getInventory():FindAndReturn("TOC.WoodenHook_hand"))
self.character is a isoPlayer
try Remove("TOC.WoodenHook_hand")
It gives me no more error but it does not seem to work
I would make sure your self.character/item name/etc are all correct. No errors means syntax is correct. self.character:getInventory():Remove("TOC.WoodenHook_hand") will remove that item from your inventory.
Are you in debug mode? You can easily see the name by opening the 'Items List'. You will see your items under a new tab beside 'base'.
On item list, it write WoodenHook_hand in type
So I asume that self.character:getInventory():Remove("TOC.WoodenHook_hand") is correct
Aaand finished the 1.0 version!
Thanks again @weary matrix & @drifting ore for the helping hand 🙏
Neat
Thanks! ☺️
Heya, anyone know of any mods that let me modify loot pools for containers? E.g. guns can spawn in fridges and shit like that
Can someone help me out what 1-11 means in TYPE WEAPON?
https://cdn.discordapp.com/attachments/919609757168468028/925577954187149312/unknown.png
Can anyone tell me how in ISBlacksmithMenu.lua in ISBlackSmithMenu:onMetalShelves defines the creation of shelves to be small shelves, I'm trying to add the ability to build large metal shelves to metal workers.
I know it calls ISSimpleFurniture:new with the sprite etc but how does the game then know that those are small shelves with small shelves capacity etc. If igured it might be fence.containerType = "shelves";
But that seems more like a generic categoory because it's also used by ISBuildMenu.onBookcase
Hello rad, may I know what's you progress on this?
Does anyone know when we'll get an object to WordZed? I assume there is an updated version the devs used to create VHS Tapes and CDs
depend what is being done
are there any pvp related mods? i couldnt find anything really
@thin hornet I don't see any good reason to do so, unless you want to modify stuff from vanilla or from another mod, which was not the case for the example you showed earlier
Cool cool
its an unfinished one in debug mode i think? i've seen a few people posting about it
does anyone know
how can I use the paw low loot mod
cuz like
its says that it is for 4.50
but does 4.56 works aswell?
anyone know how get the inherited class?
how to open console?
Hello, can someone help me how value works?
We need a 'pack my server' utility that just auto bundles mods for that server and its players. The updating is annoying
Does anyone know if custom map mods show up on the new minimap?
Has anybody in here looked at custom annotated maps? And are the markings from an annotated map transfered to the ingame-Map?
@tardy bear I believe what you're looking for is called a mod pack, or mod collections
but that's not a relevant discussion for this channel, better ask in #mod_support
not sure, but I think they're not transferred
what do you mean
I'm trying get the class InventoryItem of a item, but source files redirect it according to its this.Type, in this case to Clothing, and the way the code was made, it will always redirect to the item type, so I was wondering if anyone had any way to get the inherited classes
Clothing is a subclass of InventoryItem, so if you have a Clothing instance, you can call the methods from InventoryItem on it
but what are you trying to achieve exactly?
Try to get a var with getClassField, that's why I need that specific class
I was poking around for a little bit, and apparently there is nothing related with main class
@ruby urchin why do you need the class? You just have to supply the instance as parameter and the field index
@ruby urchin check this, it's the code I was using before they added the getEatType() method
https://github.com/quarantin/zomboid-quick-item-action/commit/1359b8412fbc57295d3db4c9512e1c03ccea8277
Oh yeah, I know that, but the real problem is that you will never get the class InventoryItem, only its derivatives (Obviosly these object are instances, but I mean his classes so we all understand)
By derivatives I mean AlarmClock, Clothing, Normal bla bla bla
@ruby urchin but all the fields from InventoryItem are inherited in the subclasses
all the non-private fields I mean
I don't think so, I already tested it and only gets his own fields
can you share your code cause I'm pretty sure you have access (according to Java specifications), unless you're trying to get access to a private field from InventoryItem
function onKeyPressed(key)
if not getPlayer() then return end
local source = getPlayer()
local sourceInventory = source:getInventory()
if key == Keyboard.KEY_NUMPAD2 then
local item = sourceInventory:getItemFromType("Base.Tshirt_DefaultTEXTURE_TINT")
for i = 0, getNumClassFields(item) - 1 do
local field = getClassField(item, i)
print(field)
end
end
end
Events.OnKeyPressed.Add(onKeyPressed);
can you show what's printed in console.txt?
@ruby urchin mmm I can see this: Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 29 out of bounds for length 29
but your loop looks correct so I'm not sure
what field do you need?
Oh, you have to cast it
since those subtypes aren't exposed
Java is the recent language I'm learning, so i'm not very experienced, you can give a example about that?
I'm using it! xD
@ruby urchin mmm curious, now I have to test it by myself 😂
@ruby urchin something fishy going on, for example I see the following fields:
LOG : General , 1640777246247> private float zombie.inventory.types.Clothing.temperature
LOG : General , 1640777246248> 1
LOG : General , 1640777246248> private float zombie.inventory.types.Clothing.insulation
LOG : General , 1640777246248> 2
LOG : General , 1640777246249> private float zombie.inventory.types.Clothing.windresistance
LOG : General , 1640777246249> 3
LOG : General , 1640777246250> private float zombie.inventory.types.Clothing.waterResistance
``` but the Clothing class does not have those fields
ah nevermind it has them, but why can't I see them on the javadoc 😮
oohh I don't add the private fields, that's why, damn
mm indeed it really looks like it only showing you fields from the subclass, but that's not how java is supposed to work, so I guess we're facing some Kahlua trickery :/
so, you say this is a big F
not yet 😅
if you need to call a method defined on an exposed parent type on an instance of a non-exposed type, you can do __classmetatables[ChatMessage.class]["__index"].getTextWithPrefix(instance) or something like that
but i'm not sure if that's applicable here
Can someone please help me how do I know where to find current scripts to modify in general? Specifically, zombie grouping, movement, and spawning?
Item scripts are in media/scripts
Lua co deis in media/lua
no not items
He are asking for source files
@weary matrix have a java docs, you can check on pinned messages
?
also has a decompiler that you can use
sorry where are the pinned messages?
I dont see the files you mentioned in this channel
I dont see anything about co' or where to find the source files?
from co' rather*
oh it is there my bad
@ruby urchin mmm so I'm trying stuff like this:
local item = items:get(k)
local class = item:getClass()
local superclass = class:getSuperclass()
local test = superclass:cast(item)
but I'm not sure why lua says getSuperclass() does not exist, but it's not true 😂
mmm I checked for Java8, maybe I should check java15 though
mmm same, it's there too: https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/lang/Class.html#getSuperclass()
They use a old version of lua, so probably java is too
ok I see a bunch of methods but where to find them in the actual game files?
idk, just speculating, but I'm really sure that asset or loadstring are outdated on new versions
how do I know which files to decompile?
co seems busy, try looking at older messages on this channel, you will surely find him
@long grove https://github.com/quarantin/beautiful-java
@ruby urchin oh I know why my stuff is not working, the class Class is not exposed unfortunately 😦
ok thank you co
@teal slate do you know if your trick would work to perform a cast? Could you show some more elaborated code samples?
@ruby urchin if we can't get this to work, I guess we could still ask TIS to expose the methods Class.getSuperclass() and Class.cast(), it shouldn't have any security impact
sounds good!
It works to cast to an exposed parent class—I'm not sure how it works with overrides on child classes, since the only time I had to use it was because getChat() returned SayChat, ShoutChat, etc. instead of ChatBase.
Those didn't have any specific overrides on the function I needed to call—getTitleID, I think?
@teal slate well we need access to the super class of Clothing, which is InventoryItem, both are exposed
@teal slate basically we need this, except without using the Class class hehe
local item = items:get(k)
local class = item:getClass()
local superclass = class:getSuperclass()
local test = superclass:cast(item)```
why not?
You can give this example?
The only one I have is, uhhh.
__classmetatables[ChatBase.class]["__index"].getTitleID(message:getChat()) == "UI_chat_local_chat_title_id"
The issue was that getChat() returned SayChat which isn't exposed in Kahlua and thus didn't have a metatable set.
But the issue is that you have to know the superclass in advance, for it
but we do know it
because getClassField(clothItem) only returns the fields from Clothing, the fields from the superclass are missing
@teal slate how do you get access to __classmetatables?
It's a global variable.
oh
I had a script somewhere to print all global variables, it's really useful
local seen = {}
function inspect(u, name, i)
if not u then return end
if not i then i = 4 end
if seen[u] then return end
seen[u] = 1
if type(u) ~= "table" then return end
if name == "(global)/__classmetatables" then return end
for k, v in pairs(u) do
print(name.."/"..tostring(k) .. ": '" .. tostring(v) .. "' ("..tostring(type(v))..")")
vmetatable = getmetatable(v)
if type(v) == "userdata" and vmetatable and type(rawget(vmetatable, "__index")) == "table" then
inspect(rawget(vmetatable, "__index"), name.."/"..tostring(k))
elseif type(v) == "table" then
inspect(v, name.."/"..tostring(k))
end
end
end
inspect(_G, "(global)")
think this is the most up-to-date one
nice, I'll keep it for reference I guess 😅
(it explicitly avoids crawling inside __classmetatables since it's redundant)
might be useful for the #pzwiki_editing folks if they wanna document stuff
@teal slate so any clue if this trick can be used to access fields instead of methods?
I don't think it would work, looking at getClassField.
Whoops, wrong reply.
@LuaMethod(
name = "getClassField",
global = true
)
public static Field getClassField(Object var0, int var1) {
Field var2 = var0.getClass().getDeclaredFields()[var1];
var2.setAccessible(true);
return var2;
}
Note the use of getClass().
well if we could access the field directly we wouldn't need to call getClassField
@teal slate in your example I don't understand how you specify the instance on which to call the method
As an example: __classmetatables[InventoryItem.class]["__index"].doSomething(clothItem)
(though getClassField isn't an instance method)
@teal slate this one: https://zomboid-javadoc.com/41.65/zombie/inventory/InventoryItem.html#worldZRotation
mmm
gg clothing dont have method that returns InventoryItem
so doSomething would be a method from InventoryItem?
anyway, if so, the problem is that it will always redirect you to a subclass
though, wait
hold on
try uhhh
oh, darn
getClassField has to take an object, not a class
forget about getClassField 😂
unless you have a way to really cast the object of course
i was thinking that you could do getClassFieldVal(clothItem, getClassField(InventoryItem.class, index)), but you can't
since getClassField has to take an object and not a class
ah damn, only methods available in __classmetatables[InventoryItem.class]["__index"]
it is how java is supposed to work; getClassField specifically gets you the fields declared on that type, for some reason
yeah
indeed I was mistaken
I wish we could at least access the public fields directly from Lua :/
not sure why it's not allowed
I agree
worldZRotation
With memory address?
I read that lua is not most optimum to read/write memory address, but it's possible
Not memory addresses.
This will only work with debug mode enabled, but at least it's progress:
local Class = {}
for i=0, getNumClassFunctions(InventoryItem.class) - 1 do -- any class would work
local func = getClassFunction(InventoryItem.class, i)
Class[func:getName()] = func
end
I think this might expose all the functions on Class.
hmm:
setWorldZRotation function 0x27661484 I'm wondering if we can do something with the 0x27661484 to know the offset of the field it's setting or something
Then you could try local superclass = Class.getSuperclass(InventoryItem.class)
mmm but getClassFunction(InventoryItem.class) would only returns methods from the InventoryItem class?
then local test = Class.cast(superclass, item)
Nope!
It'd return methods from the class of the InventoryItem class.
Which is Class.
Since getClassFunction takes an Object and does getClass on it.
but it would only returns the methods from the Class of InventoryItem, not from the Class class
or well rather that one but same thing: https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html#getDeclaredMethods--
Nnnnnnno, because we're passing a Class object.
public static Method getClassFunction(Object var0, int var1) {
Method var2 = var0.getClass().getDeclaredMethods()[var1];
return var2;
}
Once it does getClass(), it's just the Class class, no?
no
The class of a class is Class.
I don't think you get what I'm saying
I do, but I'm pretty sure you're mistaken
InventoryItem.class is the class of InventoryItem, which is a Class object
When we pass that to getClassFunction, it does getClass(), which will give us Class.
a subclass of class
Iiii don't think so.
