#mod_development

1 messages · Page 502 of 1

opal wind
#

nah i dont know how to create new body locations, i cant find a tutorial nor mod that did that

#

there is scrap armor but he made a hole dif stuff i think

winter bolt
#

make a BodyLocations.lua somewhere in media\lua\shared and then add this

#

but with the name you want

lapis stump
#

how hard is it to make mods for this game?

#

like i want a urination mod

civic galleon
#

depends what you're trying to do and your modding / coding experience

opal wind
winter bolt
#

body location doesnt set bodyparts

#

its just clothing slots

#

blood location is where you choose body parts

#

blood locations are seperate from body locations

opal wind
#

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

winter bolt
#

not having a blood location means it wont protect anything

#

i am confused

opal wind
#

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'

civic galleon
#

lower and upper arm

#

aka forearm and bicep, respectively

thin hornet
#

Did anyone get to set safehouse on non-residential area with code?

opal wind
#

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

civic galleon
opal wind
#

🙂

winter bolt
#

i dont think theres a list of all of them

opal wind
#

lol ic

#

thats strange that link ask me to re-log on discord

ruby urchin
#

Yeah, probably because I use discord canary

opal wind
#

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 😄

opal wind
#

thanks spongia and dislaik for the help!

gloomy mantle
#

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?

dark solar
gloomy mantle
#

Second question, we thought of trying to download the RavenCreek lootable map, but the map is unusable and is just an item instead

dark solar
#

lootable maps were also updated alongside the ingame map

#

is broken for the same reason

gloomy mantle
#

@dark solar do you know if Eris minimap has support or will it also be unupdated for Raven Creek

dark solar
#

no clue

#

my knowledge stops at mapping lol

gloomy mantle
#

dang, oh well, thanks anyways!

drifting ore
#

is there any tutorial on how to add item to the new foraging system

left compass
#

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?

thin hornet
civic galleon
#

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

weary matrix
civic galleon
#

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. 😵

civic galleon
#

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

opal wind
grave dust
#

is it possible to make a single chamber rifle? ie a rifle you need to reload after every shot?

weary matrix
grave dust
#

i have no clue

fair frost
mint hawk
#

It looks great!

#

But your pfp gives me ptsd.

fair frost
paper tartan
#

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

warm flame
#

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)

fair frost
# paper tartan which mod is this? looking hawt

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

pearl prism
fair frost
vivid flare
#

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.

late hound
vivid flare
#

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.

late hound
#

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.

vivid flare
#

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

late hound
#

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.

vivid flare
#

too much speculation :p nothing is certain right now i guess

late hound
#

Just you wait until this next thursdoid. A lot of things will be clarified once they post their scope roadmap for the next build.

vivid flare
late hound
#

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.

vivid flare
#

one can dream

pearl prism
#

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.

vivid flare
#

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

pearl prism
vivid flare
#

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

pearl prism
#

download the mods from the workshop that works and use them as an example

radiant ginkgo
vivid flare
#

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

radiant ginkgo
#

Do you understand what I said? Doors, trunk, hood can not have dents and other damage, logical in a collision

vivid flare
#

how does that relate to animated parts?

radiant ginkgo
#

It is logical that this cannot be on the engine

vivid flare
#

i was never talking about dents and stuff

pearl prism
radiant ginkgo
vivid flare
#

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

radiant ginkgo
#

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)

vivid flare
#

... i'm not even going to argue this, because it has nothing to do with what i asked about.

radiant ginkgo
#

I just answered your question

#

That's why no one wants to do these animations and details

vivid flare
#

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

radiant ginkgo
vivid flare
#

i tried to animate parts, as can be seen further above.

radiant ginkgo
#

Are the damages working on them?

#

The color works, I know without it

drifting ore
wooden quartz
#

eternal snow mod does not work in mp

#

its just foggy

west crystal
#

Does anyone know, what clothing slot this thing is?

winter bolt
wooden quartz
#

snow mod not workintg

west crystal
paper tartan
drifting ore
winter bolt
drifting ore
#

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

abstract wave
#

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?

drifting ore
civic galleon
#

What are some “essential” mods people always use in their play through?

leaden bobcat
#

Why haven’t there been any total overhaul mods for PZ?

hexed arrow
#

how do I make the worlditem appear, only the icon appears as of now

vapid bolt
#

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?

winter bolt
#

WorldStaticModel should refer to the model name in this model script

hexed arrow
#

thank you it worked !

stiff urchin
#

Anyone know of any mods that are currently working/optimized for the current release that add in new crops?

hexed arrow
#

so much stuff to remember when adding an item, well I learned a lot today 😄

stiff urchin
#

Awesome, thank you! Seemed to be a pretty popular one but was just trying to confirm 41/MP compatibility/stability.

abstract wave
# nimble spoke My Farming Time

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?

lapis stump
#

how do I enable workshop to auto update ?

#

getting kind of annoying with the server mismatches

hexed arrow
#

Any guides on loottables? Like how a tile or room is defined and for me to spawn certain items in

wispy sequoia
#

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?

wispy sequoia
#

Mmm interesting

vapid bolt
#

download a mod and check its files

placid pine
# hexed arrow Any guides on loottables? Like how a tile or room is defined and for me to spawn...
wispy sequoia
west crystal
#

I am unsatisfiedstressed

dark solar
#

rip

obsidian rapids
#

Hello cleverest guys, do you have any idea about the path for loot distribution files ?

vapid bolt
#

wrong chat

pulsar rock
#

Woops

obsidian rapids
vapid bolt
winter bolt
#

and just replace the stuff with what you want

cold plover
#

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

merry osprey
#

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.

opal wind
#

never seen that MCbeer and i tbh i dont want to lol

ashen lance
#

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

teal slate
#

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.

winter bolt
ashen lance
winter bolt
#

the "OpenJacket" part is what you would set for the ClothingItemExtraOption

drifting ore
#

oh shit

weary matrix
#

Any clue if it's doable to have mutually exclusive options in sandbox settings?

ashen lance
#

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

winter bolt
#

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"

ashen lance
#

Alright big thanks

winter bolt
#

to avoid an error you'll also wanna make sure that your new item scripts are under the Base module

#

or it'll break

ashen lance
#

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

winter bolt
opal wind
#

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?

winter bolt
opal wind
#

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

winter bolt
#

you don't need to set it back

#

it uses the rest position when you export i think

sour island
#

I'm a big ole nerd

#

Anyone know why the base XPMap lists default Strength and Fitness as 3 each and not 5?

opal wind
thin hornet
#

anyone know if we can hide these admin info

drifting ore
#

How do I make a player make noise?

sour island
#

iirc

drifting ore
drifting ore
sour island
#

yes

civic galleon
#

in terms of Stats in lua, morale is "sadness" correct?

sour island
#

playSound plays sounds

#

addSound adds an attraction event

civic galleon
#

as in getPlayer():getStats():getMorale() would be sadness correct?

flint bolt
#

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.

civic galleon
#

or is sadness not listed on the index?

#

haha jk about the boredom bit

teal slate
#
   static void receiveStartPause(ByteBuffer var0, short var1) {
      isPaused = true;
      LuaEventManager.triggerEvent("OnServerStartSaving");
   }

In GameClient.java.

flint bolt
teal slate
#

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

flint bolt
#

Yeah, the @ applies only to the one below it

teal slate
#

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)

flint bolt
#

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.

teal slate
#

The event is only sent when an admin manually saves the server, not when autosaves happen.

flint bolt
#

Ooh, I see, damn.

teal slate
#

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!)

agile swallow
#

Does anyone know how to include an object you can pick up like a table, or lamp in a crafting recipe?

flint bolt
teal slate
#

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?

flint bolt
#

Oh, did not know about that one, since I'm using the wiki. I only know about OnServerFinishSaving, which also did not work.

teal slate
#

Er, that one.

#

I didn't remember the actual name

flint bolt
#

Ah ok

teal slate
#

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.)

drifting ore
#

Hey guys, new to modding PZ

#

Do you recommend Nexus or Steam workshop?

teal slate
#

Steam workshop.

livid flare
#

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!)

drifting ore
#

an entirely medieval version of PZ through mods and maps would be incredible

civic galleon
#

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.

flint bolt
#

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.

opal wind
#

really cool bruh

lean pulsar
#

Looks like "Chef's Immunity" got removed from the Workshop, which is a huge shame.

west crystal
opal wind
weary matrix
#

I'm getting a lot of those on my workshop pages :/
this mod update broke joining my mates server.

livid flare
opal wind
#

my mod will have suport for it

#

also to authenticZ and Brita´s weapons

west crystal
opal wind
#

well you cant censor people

#

nothing can be done

weary matrix
opal wind
#

on curseforge you can delete coments from your mod page

#

what is going on with your mod Dude7ox?

west crystal
#

I wish i knew

late hound
#

You can delete comments on your mods, or you can disable the whole comment section, which other modders have done in the past.

weary matrix
opal wind
#

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

weary matrix
late hound
#

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.

weary matrix
west crystal
#

Why disable comments

#

If you can disable commenters...

weary matrix
west crystal
#

If you have 100k subs i don't think you even care about comments

weary matrix
#

why not?

west crystal
#

Dunno

opal wind
#

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

west crystal
terse matrix
#

How long is the "This is how you died" loading screen music?

west crystal
#

C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\music\theme2.ogg

#

there is also tunedeath.ogg which i actually never heard

gleaming garnet
#

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)

west crystal
#

I didn't have to do shit, he fixed it himself

#

Although other skin changing mods did work on existing worlds for me...

abstract wave
#

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?

west crystal
#

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

obsidian rapids
abstract wave
#

I got it working yay

west crystal
#

How?

abstract wave
#

Changed the rotation in the above.

kind fossil
#

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.

winter bolt
# west crystal Cool

i think they dont know that you can change the mods that are enabled on the save lmao

sour island
west crystal
#

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

sour island
#

I mean in case of errors - most people don't know how a console log works

west crystal
#

Most people don't know how their pc works

sour island
#

Fair

civic galleon
#

"Is Broke"
"Whats your mod list and are you sure mods are updating right?"
no response

civic galleon
weary matrix
#

@sour island @civic galleon so in the end I replied this 😂

sour island
#

Yeah, my skill journals were bugged for new journals cause I didn't test them thoroughly enough

#

"stop updating"

kind fossil
#

Thanks for the info !

winter bolt
#

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

sonic atlas
#

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();
west crystal
#

I hate those people..

lusty lynx
#

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

upper moat
#

Is it possible to add recipes for working lightswitches and/or garagedoors ?

glass rampart
#

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

west crystal
#

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

glass rampart
#

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?....

west crystal
#

From august i believe?

#

Somewhere in that period

glass rampart
#

at least it was frying pan before dammit, and how do you get ranks?

west crystal
#

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

drifting ore
#

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 ?

undone crag
#
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.

sick yew
#

How do I make a custom spawn location? I wish to spawn in the pharmacy of Riverside

undone crag
#

What is the difference between defining a function like Something.Something and Something:Something?

hollow shadow
west crystal
#

or mine?

hollow shadow
#

the name xd

undone crag
#

Maybe function Something.Something(self) is the same as function Something:Something().

hollow shadow
#

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

frosty stirrup
#

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

wide oar
#

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

twilit lodge
#

Is there up to date .x file importer to blender? Or working converter to .fbx or such?

winter bolt
twilit lodge
sick yew
#

Alright then, I need some help.

#

How do I g et the coordinates for the Riverside pharmacy

pearl prism
sick yew
#

Alright ,figured it out

west crystal
#

Aw, i already prepared my answer

sick yew
west crystal
#

For your question

sick yew
#

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

west crystal
#

Doesn't he automatically spawn with one?

#

If not i can't help with that unfortunately

sick yew
#

Does anyone how to make a key spawn on your character?

late pebble
#

how do you add mods to ur own severe to play with ur buddys??

twilit lodge
#

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

buoyant merlin
#

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?

civic galleon
#

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

kind fossil
civic galleon
#

No like

#

You cannot hear or speak

kind fossil
#

For real you could speak between radios ?

civic galleon
#

You must have a radio that allows you to speak into it, to hear other players speaking into the same

kind fossil
#

I'm trying to do this on my future server

civic galleon
#

Yes

kind fossil
#

Okay i get it

civic galleon
#

I have done it on my Dedi already

kind fossil
#

Omggg so happy to read this

civic galleon
#

Be sure to lower your VOIP range cause goddamn even 75 is way too far imo

kind fossil
#

Yes you're right

#

Should be realistic range

civic galleon
#

Btw im pretty sure the default is 130 pain

#

But I let people on my dedi vote server changes and they said no to lowering further than 75

#

Jerks

#

Lmao

kind fossil
#

75 is what in term of range ?

civic galleon
#

75 tiles

kind fossil
#

In meters approximately ?

civic galleon
#

Couldnt tell ya tbh

kind fossil
#

It looks pretty far

civic galleon
#

I pretty much just work in raw units, disregarding specifics

kind fossil
#

Okk

civic galleon
#

Like, its 10 tiles away. It takes 45 in-game minutes

#

I have 3.5 weight

#

I play dumb a lot lol

kind fossil
#

10tiles ? Are you sure ?

civic galleon
#

But to answer your question, you do not need a mod to talk to other players over a radio

kind fossil
#

Thankss

civic galleon
kind fossil
#

Oh okay mb

#

It's so cool

civic galleon
#

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

kind fossil
#

I want to feel this walking dead moment when your only way to speak with someone is with radio

civic galleon
#

As in, I wish walls and object played a big role in VOIP distance

kind fossil
west crystal
winter bolt
#

lol voice chat has a bigger radius than any gun

kind fossil
#

Hahaha

civic galleon
kind fossil
#

For now it's okay and i'm sure that this will be one of the next features since they just have added mp

teal slate
#

Well, "fix."

civic galleon
#

Forcing all radios to operate on the same wave bands?

kind fossil
west crystal
civic galleon
#

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

west crystal
#

We had a few, and i saw on pz forum devs mentioned it

teal slate
civic galleon
teal slate
#

Yeah, I think it's checking whether it can send

west crystal
civic galleon
#

Co found me the variables for furniture sleep quality, so I feel like there is a variable for damn near EVERYTHING

kind fossil
# teal slate Oh, I could probably fix this.

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

teal slate
#

Yeah, I solved the issue with text over radios by looking at decompiled source.

civic galleon
#

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

west crystal
civic galleon
#

Like, allow every server to set how much slower "bad" furniture recovers you and how much faster good recovers you

kind fossil
#

Love you modder ppl you are bringing so much to the community FoxHeart

civic galleon
#

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

teal slate
civic galleon
#

Cause tbh, I was so bored being an endless tank

teal slate
#

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.

kind fossil
#

Have found the mod yesterday and was like omg thank you random ppl to have thought about this

civic galleon
#

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

civic galleon
kind fossil
#

Dude where can i buy you a coffee ?

civic galleon
#

Dont worry about it

civic galleon
#

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

kind fossil
#

Lua is pretty okay when you get into it, discovered it when i was a teenager on garry's mod

kind fossil
civic galleon
#

Before SWF, my modding abilities only recently ventured out of textures

teal slate
#

Currently working on a command framework along with a bunch of RP server oriented commands.

civic galleon
#

Though even then I hadnt done anything like that in years

teal slate
#

An example of some of them in testing.

civic galleon
teal slate
#

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.

kind fossil
#

Voip could be enhanced a lot

#

Like the ability to whisper something

civic galleon
#

I can see others extending it for action only messages for RP

teal slate
#

Oh I have that.

kind fossil
#

So you can speak when close to someone without alerting Z or players
Or lure one zombie silently
Or a player

civic galleon
#

Like being able to quickly type "Lights cig"

teal slate
civic galleon
#

Hell yea

#

Ugh yes

teal slate
#

It's actually mostly a port of a friend's mod to my command framework

#

since it irked me that she just

civic galleon
#

Very stellar work my friend

teal slate
#

copied and overwrote parts of ISChat.lua

west crystal
#

Oops, but in private

civic galleon
#

Lmao

kind fossil
#

This Madeleine has serious problems i think

civic galleon
#

Ok hear me out

#

DayZ rarity Loot

teal slate
#

Also, since radios are working, we're probably going to be disabling safehouse/faction chats in favor of radios.

civic galleon
#

Extra extra rare loot

civic galleon
#

Cause ill be honest, extreme rare isnt rare enough these days

#

Radios work

#

Oh i misread

#

As arent working

#

My bad

kind fossil
#

I want radio for everything hehe

civic galleon
#

I love radio, but radio is not easiest to find

#

Which I am also in love wi

#

With*

kind fossil
#

I feel that radio should be the most important tool to survive

civic galleon
#

I cant wait for 64 player limit servers

#

Kinda waiting to play on publics or whitelists until then

kind fossil
civic galleon
#

I cant wait to dismantle someones radio in front of them

kind fossil
#

However it's a french server unfortunately

civic galleon
#

And leave them stranded in the kentucky wilderness

#

Then save them last minute

kind fossil
#

Hahaha

civic galleon
#

</offtopic>

kind fossil
#

Anyway thanks for the hints and hope that we will speak about modding again FoxHeart

teal slate
#

(Hence the mod.)

twin root
#

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!

fresh geyser
#

Is there a metric system mod?

frail violet
#

<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>

compact mauve
#

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?

frail violet
#

Mind if I DM you?

winter bolt
#

love when someone sends a friend request right after commenting saying my mod doesnt work lmao

lost yoke
#

+mods

#

!mods

stiff urchin
#

Anyone know of a mod that has a cure for devils fungus?

slate laurel
stiff urchin
#

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.

magic peak
#

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."

west crystal
warped night
steel python
#

Hey guys, question. How does loot spawning work? Does it all initialize on server creation or a different method?

west crystal
#

So my guess is that loot generates at the moment you open a container

winged lotus
#

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 🤔

golden blade
#

What mods are there that enable you to not lose skills on death?

icy mauve
#

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 ?

winged lotus
#

if you press f11 you can get the log of errors and the functions triggering errors, this can lead you to the falty mod

civic galleon
#

But that mod blurs the line between difficulty and inconvenience

#

Love it though cause I hate my vidya self

civic galleon
jovial solar
#

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

wary sinew
#

What does it mean if a profession from a mod shows up as 'Unknown' in the character creation section?

sinful veldt
#

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

sinful veldt
#

found what i needed to do

rugged vessel
#

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 ☺️

viscid canyon
#

if someone would mod in Macaroni and Cheese as a cooked food item I would die complete

zinc laurel
#

Hey guys, is player cap past 32 players a mod? Or anyone here know how to do it?

brittle jewel
#

@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
teal slate
#

What's the difference between getPlayer and getSpecificPlayer?

steep sable
#

Is there a mod that allows you to fully disassemble non-wreck cars?

turbid crown
#

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. ) ? :

https://steamuserimages-a.akamaihd.net/ugc/1736693871396824243/54E1EC7911E4471E26C736F42A5AE0E86429657E/?imw=5000&imh=5000&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false

ruby urchin
#

you can see inside the mod for that

turbid crown
#

Really ? 😮

#

How ?

zealous wing
#

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. 😛

turbid crown
ruby urchin
#

example:

turbid crown
ruby urchin
#

see the code, models, etc

#

basically, discover the trigger of what you are looking for

turbid crown
#

@grand carbon Well, gonna try, but absolutely no idea of what I do look for lol ^^

mellow oyster
#

Itemtweakeritems what mod is this file from

ancient wren
#

Hello guys, which mod that provide other skill books? ex: maintenance books

warm bough
#

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.

warm bough
#

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

thin hornet
#

@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,
}
warm bough
#

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?

thin hornet
#

the position of the current player

#

from that you can get nearby squares

warm bough
#

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

thin hornet
#

you can do a loop from -1 to +1 to check beside

warm bough
#

Ahhh

#

i see

#

so i could do a 3x3 i see

thin hornet
#

yeah

warm bough
#

that makes sense

#

How often does the canPerform get called though?

thin hornet
#

local thesquare = getCell():getGridSquare(x,y,z)

#

it get performed when trying to execute the recipe

warm bough
#

ah so e.g clicking on the recipe

thin hornet
#

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

warm bough
#

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

thin hornet
#

Cool and I wish you success with your mod.

warm bough
#

oh haha just saw your the creator of the water dispenser mod 😂😂

thin hornet
#

But if it helped then great

warm bough
#

yea honestly its nicely laid out and what needs to be commented is commented 🙂

signal coyote
#

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?

thin hornet
#

@signal coyote They would be into a texturepack if im not mistaking
Steam\steamapps\common\ProjectZomboid\media\texturepacks

signal coyote
#

Ah gotcha, I'll figure out how to open those then, thanks

opal wind
#

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

signal coyote
grim kite
#

Hello there spiffo
Does anybody know how to use Tiles from another mod in my own?
Does anybody know how to make custom roof snowable at winter?

opal wind
#

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

tulip valve
#

Wonder woman cosplaykekw

opal wind
#

yea lol

#

im adding tons of cosplays to my mod 🙂

jovial solar
#

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

west crystal
autumn ether
#

О, русский

west crystal
#

Netstressed

jaunty ice
raw moon
#

Has anybody got a modpack that works for coop

drifting ore
#

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

nimble spoke
#

If I remember correclty it needs to be : and not . for your new version?

slim quest
#

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.

drifting ore
signal coyote
#

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?
signal coyote
#

ah damn, alright, one for all the ones that get consumed and one for all the ones that don't i guess?

drifting ore
signal coyote
#

Cool, thanks!

drifting ore
#
keep item1/item2
vs
item1/item2
signal coyote
#

Right that makes sense

#

Appreciated

hollow shadow
# teal slate

wait i also use this mod but what is the dark blue text?

teal slate
#

The purple is emotes and the teal is out of character chat.

drifting ore
signal coyote
hot patrol
#

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"?

signal coyote
#

Sometimes you just have to make the world a little worse

teal slate
#

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

winged lotus
#

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?

weary matrix
#

@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

weary matrix
#

a broken mod probably

karmic tree
#

Where can i find Rhymes Car's codes so i can spawn them?

ashen salmon
#

Hi guys, dont know if this is the right place, but having a mod with new professions/traits would be amazing. Just a suggestion!

weary matrix
#

do you have a lambda or something to select items?

brittle jewel
serene mulch
#

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?

weary matrix
#

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

karmic tree
weary matrix
weary matrix
karmic tree
karmic tree
weary matrix
#

@karmic tree you don't have to paste the content of everything you find here you know 😅

karmic tree
karmic tree
winged lotus
#

@weary matrix and @brittle jewel thanks for the updated info, will look into it!

winged lotus
#

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?

weary matrix
#

I'm wondering if it's just about items being dropped by players or not

brittle jewel
#

@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);
}
winged lotus
#

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 🤔

weary matrix
#

hmm but that wouldn't account for when the player unequipped the hat

weary matrix
winged lotus
weary matrix
#

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? 😄

winged lotus
#

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!

drifting ore
weary matrix
winged lotus
#

(tous français en train de parler anglais à ce que je vois 😅)

weary matrix
#

😄

drifting ore
west crystal
winged lotus
#

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

weary matrix
#

just don't break the glass if in a container

winged lotus
#

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!

west crystal
#

Well i mean why the fuck are you doing that, they can scratch

#

So your fault

weary matrix
winged lotus
#

Well, I used to place mine near my bed on the floor when going to sleep... Until I stepped on it 😬

weary matrix
#

see?? 😂

west crystal
#

Like... why

#

Don't you have a table

winged lotus
#

I did not back then, small room!

#

Student version of myself was not that smart, he learned from his mistakes at least 😅

drifting ore
#

modData is not save? Variables seem lost when I quit and restart the game

weary matrix
weary matrix
#

when you update the data

thin hornet
#
local modData = isoObject:getModData()
modData.someData = 1
isoObject:transmitModData()
drifting ore
weary matrix
junior flame
#

Is it possible to add multiple items with replaceOnDeplete? I'm working away from my game setup at the moment and can't tinker.

stiff urchin
#

What file can I find corpse loot distribution in?

weary matrix
weary matrix
stiff urchin
#

You cant change corpse loot without using java? Its not possible like other loot with lua?

worthy snow
#

are there mods that increase furniture's max carrying load?

winged lotus
#

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 🤔

drifting ore
winged lotus
stiff urchin
#

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.

drifting ore
weary matrix
#

it's triggered after the corpse inventory spawn

stiff urchin
#

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?

stiff urchin
#

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.

river plinth
stiff urchin
#

Using it for modifying/adding to zombie loot?

#

Thanks, Ill check it out!

river plinth
stiff urchin
#

Ah, that's super useful to know about. Thanks!

pearl path
#

Anyone know why fort crosstown got deleted?

blissful meteor
#

@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

stiff urchin
#

Thank you, @blissful meteor. Would appreciate that, feel free to PM when free!

tribal rune
#

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

winged lotus
#

Thanks @weary matrix @drifting ore got it working!

weary matrix
drifting ore
#

Anyone know how to get the skin color of a player? To change the texture of a clothing accordingly

drifting ore
simple ocean
#

Is there a way to prevent/disable the helicopter event?

glass narwhal
#

in the "Sadistic AI Director" category

golden blade
#

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

wide oar
#

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

drifting ore
#

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

ruby urchin
#

try Remove("TOC.WoodenHook_hand")

drifting ore
brittle jewel
#

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'.

drifting ore
#

On item list, it write WoodenHook_hand in type

#

So I asume that self.character:getInventory():Remove("TOC.WoodenHook_hand") is correct

winged lotus
#

Aaand finished the 1.0 version!
Thanks again @weary matrix & @drifting ore for the helping hand 🙏

sour island
#

Neat

winged lotus
#

Thanks! ☺️

tawny flicker
#

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

sacred cradle
slim quest
#

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

sacred cradle
#

Hello rad, may I know what's you progress on this?

sonic helm
#

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

thin hornet
drifting ore
#

are there any pvp related mods? i couldnt find anything really

weary matrix
#

@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

thin hornet
#

anyone encounter a car like that before?

winter bolt
#

its an unfinished one in debug mode i think? i've seen a few people posting about it

drifting ore
#

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?

ruby urchin
#

anyone know how get the inherited class?

drifting ore
#

how to open console?

sacred cradle
#

Hello, can someone help me how value works?

tardy bear
#

We need a 'pack my server' utility that just auto bundles mods for that server and its players. The updating is annoying

peak dust
#

Does anyone know if custom map mods show up on the new minimap?

river plinth
#

Has anybody in here looked at custom annotated maps? And are the markings from an annotated map transfered to the ingame-Map?

weary matrix
#

@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

weary matrix
weary matrix
ruby urchin
# weary matrix 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

weary matrix
#

but what are you trying to achieve exactly?

ruby urchin
#

I was poking around for a little bit, and apparently there is nothing related with main class

weary matrix
#

@ruby urchin why do you need the class? You just have to supply the instance as parameter and the field index

ruby urchin
#

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

weary matrix
#

@ruby urchin but all the fields from InventoryItem are inherited in the subclasses

#

all the non-private fields I mean

ruby urchin
#

I don't think so, I already tested it and only gets his own fields

weary matrix
ruby urchin
#
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);
weary matrix
ruby urchin
weary matrix
#

@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?

ruby urchin
#

Yeah, I working on other things, unrelated errors

#

public int worldZRotation

teal slate
#

since those subtypes aren't exposed

ruby urchin
#

Java is the recent language I'm learning, so i'm not very experienced, you can give a example about that?

teal slate
#

ah

#

okay

#

I thought you were using Lua.

ruby urchin
#

I'm using it! xD

weary matrix
#

@ruby urchin mmm curious, now I have to test it by myself 😂

weary matrix
#

@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 :/

ruby urchin
#

so, you say this is a big F

weary matrix
#

not yet 😅

teal slate
#

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

long grove
#

Can someone please help me how do I know where to find current scripts to modify in general? Specifically, zombie grouping, movement, and spawning?

weary matrix
#

Lua co deis in media/lua

long grove
#

no not items

ruby urchin
#

He are asking for source files

#

@weary matrix have a java docs, you can check on pinned messages

long grove
#

?

ruby urchin
#

also has a decompiler that you can use

long grove
#

sorry where are the pinned messages?

ruby urchin
long grove
#

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

weary matrix
#

@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

ruby urchin
#

They use a old version of lua, so probably java is too

long grove
#

ok I see a bunch of methods but where to find them in the actual game files?

ruby urchin
#

idk, just speculating, but I'm really sure that asset or loadstring are outdated on new versions

long grove
#

how do I know which files to decompile?

ruby urchin
weary matrix
#

@ruby urchin oh I know why my stuff is not working, the class Class is not exposed unfortunately 😦

long grove
#

ok thank you co

weary matrix
#

@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

teal slate
#

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?

weary matrix
#

@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)```
teal slate
#

Hmm.

#

I don't think this would work for that, sadly

weary matrix
#

why not?

teal slate
#

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

weary matrix
#

but we do know it

teal slate
#

hence the explicit use of ChatBase.class

#

Hm

#

What are you casting it for?

weary matrix
#

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?

teal slate
#

It's a global variable.

weary matrix
#

oh

teal slate
#

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

weary matrix
#

nice, I'll keep it for reference I guess 😅

teal slate
#

(it explicitly avoids crawling inside __classmetatables since it's redundant)

weary matrix
#

@teal slate so any clue if this trick can be used to access fields instead of methods?

teal slate
#

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().

weary matrix
#

well if we could access the field directly we wouldn't need to call getClassField

teal slate
#

Hmm

#

What field are you trying to access, then?

weary matrix
#

@teal slate in your example I don't understand how you specify the instance on which to call the method

teal slate
#

As an example: __classmetatables[InventoryItem.class]["__index"].doSomething(clothItem)

#

(though getClassField isn't an instance method)

weary matrix
#

mmm

ruby urchin
#

gg clothing dont have method that returns InventoryItem

weary matrix
#

so doSomething would be a method from InventoryItem?

teal slate
#

Yeah.

#

Sadly there's no getWorldZRotation, even though there's a setter.

ruby urchin
#

anyway, if so, the problem is that it will always redirect you to a subclass

teal slate
#

though, wait

#

hold on

#

try uhhh

#

oh, darn

#

getClassField has to take an object, not a class

weary matrix
#

forget about getClassField 😂

#

unless you have a way to really cast the object of course

teal slate
#

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

weary matrix
#

ah damn, only methods available in __classmetatables[InventoryItem.class]["__index"]

teal slate
#

yeah

weary matrix
#

indeed I was mistaken

#

I wish we could at least access the public fields directly from Lua :/

#

not sure why it's not allowed

teal slate
#

is there a way to get the name of a field?

#

i'm trying to work on a hack

ruby urchin
weary matrix
teal slate
#

no, no

#

an arbitrary field

#

i'm working on a hack to do casting

ruby urchin
#

With memory address?

#

I read that lua is not most optimum to read/write memory address, but it's possible

teal slate
#

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.

weary matrix
#

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

teal slate
#

Then you could try local superclass = Class.getSuperclass(InventoryItem.class)

weary matrix
teal slate
#

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.

weary matrix
#

but it would only returns the methods from the Class of InventoryItem, not from the Class class

teal slate
#

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?

weary matrix
#

no

teal slate
#

The class of a class is Class.

weary matrix
#

it's the class of the object

#

not the class of Class

teal slate
#

I don't think you get what I'm saying

weary matrix
#

I do, but I'm pretty sure you're mistaken

teal slate
#

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.

weary matrix
#

a subclass of class

teal slate
#

Iiii don't think so.