#mod_development

1 messages Β· Page 154 of 1

mellow frigate
#

That's funny you're toalking about onload and ongameboot callbacks as I made the copy version of ItemTweaker (aka B41)

sour island
#

get him

vast palm
#

Oh it was this one

#

Oh hi Bill

mellow frigate
#

a spawned iterm is InventoryItem

#

base definitions are ScriptItem

#

doParam modifies ScriptItem

vast palm
#

doesn't that also then modify the spawned item?

mellow frigate
#

so the general rule is: only items spwned while the mod is active have the modification

sour island
#

Items don't save most params

#

It's reloaded from script

vast palm
#

because I remember changing the deltause and it actually changed it's capacity

#

on an item that was already existing

mellow frigate
#

BUT, for some parameters, when you look at an InventoryItem it instead forwards the get to the script item

viscid drum
#

So I was able to take the vanilla cooler and reskin it pretty easily, but this pen model is not wanting to cooperate :/

mellow frigate
bronze yoke
#

yeah, that's not been my experience either

sour island
#

Certain ones get saved

vast palm
#

really? when I was editing items almost everything updated on an item when I made changes, without having to generate a new one

#

that was the whole reason I made the mod, because I learned how well it was working, and wanted modders to stop completely redeclaring item defs

mellow frigate
vast palm
#

my mod was meant for new modders who didn't know the ins and outs of modding

fast galleon
#

which scripts are not allowed to be loaded later, like Items since WorldDictionary throws error in debug.

vast palm
#

which context is that regarding?

bronze yoke
#

i imagine it's just items, i can't think of any others that should cause issues

mellow frigate
vast palm
#

cause my code is loading during LUA reload

sour island
#

World dictionary errors are related to items on the ground and model scripts I believe

vast palm
#

oh I see

#

has my mod been causing world dictionary errors?

mellow frigate
#

sorry I'm off context

bronze yoke
viscid drum
#

I tried importing the vanilla pen model into blender, but it seems theres nothing there

sour island
#

Name, condition/delta are usually the only things saved

vast palm
#

that was my discovery as well

sour island
#

Things that change over time

bronze yoke
#

yeah, i'm looking over the save methods and they're pretty good at only saving things that need to be saved

vast palm
#

I changed things like attack speeds using it, and it would adjust accordingly

#

so I guess the real question is, is doing it clientside better, since it applies before someone tries to join, or when trying to join?

#

er, OnGameBoot vs OnLoad*

sour island
#

I'll try to figure out to the two issues I was having -- 1. Was anticheat, 2. Was that server or clients were not getting the changes and I couldn't complete functions

vast palm
#

hm

bronze yoke
#

i don't think there's very much difference really

sour island
#

OnLoad is only ran when players connect

vast palm
#

but does that mean it runs on the server side each time?

bronze yoke
#

i usually do my params in OnInitGlobalModData since it's the earliest event after sandbox options load, but if you don't need them i'm pretty sure you can do them at lua execute time and it'll work fine

sour island
#

For each client yes, but each client seems to have its own scriptManager it seems

vast palm
#

I don't think I've ever heard of that one. OnInitGlobalModData

bronze yoke
#

global moddata was added in b41, so if you've been away that one definitely wasn't around

vast palm
#

ah that makes sense

#

yea, I hadn't done any modding for 7 years after some nasty stuff happened.

#

not gonna get into that though

sour island
#

We've all been through it brother/sister

vast palm
#

so should some tests be done to find the optimal position to make changes before I update my mod's page to mention how to do things without using my mod?

sour island
#

Did the other mod mention why it moved it to onLoad?

vast palm
#

I posted why on here in quotes a little while ago

#

Here

#

I wonder if my mod only works for the first instance of gameplay, then resets to default somehow

#

IE, load the mods, play, disconnect, then reconnect/reload again? =/

#

but I'm not sure why it would do that if it's loaded into the actual database

#

so I could be overthinking things

bronze yoke
#

i'm not really sure i understand that, lua reloads and ongameboot is called every time you load a save anyway? but if i remember right that might not have always been the case

autumn temple
#

sorry I had to run to store. I couldnt find an emitter for the radio, but is it something like this?

bronze yoke
#

yeah, should be

vast palm
#

I think that's only if you don't already have it enabled

#

..not sure anymore

bronze yoke
#

i thought so too, but i've been seeing it reload every time regardless recently, but i'm reading the source and it doesn't seem like it should be doing that

vast palm
#

like, if the entire modlist to load a save is already on when you launched, would it still try to refresh the LUA/scripts?

bronze yoke
#

so it might be something weird about my setup

mellow frigate
#

if so I could answer

sour island
#

Not sure -- but sure

vast palm
#

yes

mellow frigate
#

mods modifications were not reloaded at B41.41 time when you have the same default mod list as the mod list of your current game. so for modders that change their mods based on ItemTweaker, it saved a crazy amount of time.

#

That was my motivation.

vast palm
#

ah okay, so something changed after build 37, and then again potentially after that

bronze yoke
#

i must've been mistaken when i thought it was happening to me

vast palm
#

I suppose that's what happens when code never gets tested regularly after 5+ years

sour island
#

That's what I probably experienced

vast palm
#

and I only ever tested a single save, then exited the game to make tweaks. I never tried reloading the save after exiting the save

#

hm..

mellow frigate
#

I make tons of errors every day, please do not take my lines for granted. I may have been wrong all along

vast palm
#

if you guys do figure out how to make changes work reliably and for MP, I'll update my mod page to explain to how do it accordingly

#

7 years out of practice, and have no way to reliably focus on researching this =(

sour island
#

For me onLoad and pnGameBoot if isServer works to fire each once

#

For SP or MP

#

And avoids changes on the mainMenu

#

Which are wasted in the case of scripts

bronze yoke
#

i'm not sure it actually needs any changes for mp, or we would've heard about more problems by now

vast palm
#

depends on if the client has the same mod list pre-loaded?

sour island
#

The issue I had was trying to compare scripts in MP

#

Specific to what I needed at the time

sour island
vast palm
#

I see

sour island
#

And servers runs GameBoot when they're loaded up

bronze yoke
#

when the client joins it should reload lua and immediately fire ongameboot anyway, regardless of whether they had the same mods or not

sour island
#

They do not afaik

#

Or maybe they do and that's why I added isServer πŸ€”

vast palm
#

so for clients instead of OnGameBoot -> OnLoad, and then the server has a version of it on OnGameBoot?

sour island
#

I put it in /shared/

vast palm
#

oh it'd do it for both wouldn't it

#

hm

#

is stuff like this still possible?

if getActivatedMods():contains("OtherMod") then 
    
end


if getActivatedMods():contains("OtherMod1") and getActivatedMods():contains("OtherMod2") then 
    
end```
sour island
#
Events.OnLoad.Add(shopsAndTradersRecipe.addDeedRecipe) 
 if isServer() then Events.OnGameBoot.Add(shopsAndTradersRecipe.addDeedRecipe) end```
#

On mobile, so I may take a while to respond

vast palm
#

no problem

sour island
#

For my uses and experiences, firing more than once caused anticheat issues

#

Then later I needed to compare scripts values in MP and it wasn't updated on one of the ends

#

I think it was server - but that may have been because I used onGameLoad now that I think about it

#

Weeks old trial and error πŸ˜…

vast palm
#

well you know more than I do at this point.. lol

sour island
#

But the current method I've tested and it only fires once regardless as per the logs printing

vast palm
#

I'm going off of build 34-37 memories

#

would you be willing to share the stripped down code that seems to work for testing purposes?

sour island
#

Once I'm home, sure

vast palm
#

for the sake of minimizing future problems?

#

thanks

#

if we can solidify that it works, I can tell people to stop modding with my mod, and do it a better way

bronze yoke
#

hmm, from my reading it should fire both on the server, i wonder what's going on there

vast palm
#

my mod's been the cause of too many problems for me to feel like it deserves to keep going

#

also it's more redundant than it's worth now

bronze yoke
#

i'm not really sure it's the cause of the issues as much as the derivatives are

vast palm
#

that's the problem

sour island
#

I was using doParam for named Literature where I 0 out literature items

vast palm
#

zero out literature items?

bronze yoke
#

the mod designed to stop people from hard overwriting things and causing random incompatibility issues was hard overwritten causing random incompatibility issues ded

vast palm
#

that is why it was designed yes, but there was no reliable way to stop people from doing it, because so many modders wouldn't read the proper documentation on how not to do it

#

so the mod was meant to get people to notice there was a different way, and make use of it.. now that there's an official discord and my mod is more well-known, I can use my mod to direct people here, and learn to do it properly

sour island
#

I made the stats for literature items all 0 - and stored their original values as a table

vast palm
#

ah

sour island
#

From tests it caused issues when I needed to do some math on server side I believe

#

But honestly, I'll have to do another test to confirm changes

#

I was more preoccupied with the mod working lol

mellow frigate
#

Unrelated question: what can I use as an example for Z spawning ?

vast palm
bronze yoke
vast palm
#

what if it loads when the server loads

#

initially?

sour island
#

If you are planning to rerelease the API as a new mod - could I suggest adding it to the community projects repo? The benefit of this is that it automatically uploads changes every Friday with no human interference. Given it's maintained. πŸ˜‡

bronze yoke
#

hmm yeah, maybe it's before lua loads

vast palm
#

no, I'm not gonna rerelease it

#

I'm depreciating it and telling people to use the code as intended

mellow frigate
sour island
#

I have it unlisted but available

#

There's only debug tools at the moment

#

But technically it's ready

vast palm
#

my mod is completely redundant and unnecessary now. I'd rather just have it gone and people learn how to use the actual existing functions of the game

#

but I'm not removing the mod so existing mods don't break

sour island
vast palm
#

wait, you're chuck the sheep?

sour island
#

And as we've seen when it's called it's important lol

sour island
vast palm
#

nice

#

I'm using the military grid system mod =)

sour island
#

Ah nice

vast palm
#

and a few more

sour island
#

I need to update that too, apparently it's not "military" enough πŸ˜…

vast palm
#

you ever figure out the EHE raid siren problem?

#

well if you want to cannibalize my mod and make it work better, I can just tell people to use your community framework instead

#

assuming that's better than trusting people to do things the right way

bronze yoke
#

i'm not really sure if there's a need for a 'better' itemtweaker

vast palm
#

more reliable

#

is the keyword

bronze yoke
#

my issue with it has always been that it just doesn't do very much, it's not really worth a dependency to me

vast palm
#

right, which is why I was trying to depreciate it

sour island
#

That's why adding it as a utility to the community may be helpful idk

#

I'd be curious to test firing doParam in different places

#

Also - as for the air raid sound we have a patch coming out soon.

vast palm
#

nice

#

I had to remove it from my server cause we got sick of having to restart just to stop the noise lol

sour island
#

Yeah, it was a case of like 6 very tiny oversights -- kept finding a few more each "aha we got it" patches

#

Hopefully this was it

#

The issue stems from the fact soundEmitters playing loops can't move and sync across MP - at the time. I haven't bothered testing if that was fixed.

vast palm
#

OH yea that makes sense

sour island
#

Sound types of emitters do play across MP I think - honestly sound stuff is really wonky to read through -- some of it disappears into FMOD

bronze yoke
#

there's a lot of redundancy too, i think because of the transition to fmod

sour island
#

The weird inheritances that don't look like any other way classes inherit?

vast palm
#

fmod?

bronze yoke
#

i meant stuff like how a lot of the methods just call another method

red tiger
#

(Quietly continues to sit in the dark corner in the room that supports a full rewrite of the API layer of PZ)

bronze yoke
#

iirc playSoundLooped just calls playSound and doesn't do anything whatsoever to make it loop

vast palm
#

lol jab

#

huh, that's kinda funny.

red tiger
#

I decided to write my own music engine in the Java code because this stuff is so winding.

#

Spent a few weeks on that.

#

It's because it's just that confusing.

#

Might as well make an API that makes sense, ya know?

shrewd violet
#

Heya guys

bronze yoke
shrewd violet
#

What im miss here?

red tiger
shrewd violet
#

Meh

#

Thanks

#

Wait

#

Thats my mod)

#

there is no support)

dusty wigeon
#

hey jab quick question why am i not getting tips on the zedscript

red tiger
vast palm
#

sounds like the script is too undead to be helpful ;D

red tiger
#

I only support item atm and I think recipe isn't showing atm due to WIP stuff.

#

Been slamming my head into the keyboard these past weeks optimizing and getting formatting and diagnostics implemented.

vast palm
#

damn

dusty wigeon
#

im working on the items

red tiger
#

Huh...

dusty wigeon
red tiger
#

And you selected the language?

dusty wigeon
#

yea

red tiger
#

And latest version?

dusty wigeon
#

the color changes but no tooltips

red tiger
#

Throw me your file. I'll test it.

dusty wigeon
#

let me make sure its latest quick

red tiger
#

If you don't hear back from me in say.. 6 hours, please ping me.

#

First bug report. yey

dusty wigeon
#

yea its still not working let me get the file

#

sent

red tiger
#

Sent where?

dusty wigeon
#

dm

red tiger
#

nvm

#

I see

#

Okay. I'll have it for testing later.

dusty wigeon
#

mk

#

luckily i know somewhat what im doing lo

#

lol

red tiger
#

I manually typed & transcribed the PZWiki and improved some of it for the extension.

#

If the tooltips don't work, use this for the time being.

dusty wigeon
#

glad you stepped up to that lol that is a lot of work

red tiger
#

This is what I'm good at. Thanks.

sour island
#

Heh, my super old mod Vanilla Weapons Expanded just fires the script manager changes on Lua in shared to no detriment

#

I don't even use events

#

The savagery

bronze yoke
#

that's usually what i do

#

unless i need sandbox options

sour island
#

Oh yeah, that's something that requires OnLoad/onGameBoot afaik

#

Trying to make a recipe dynamically generated using a string sandbox option

#

Does not work if I use onGameBoot in SP if I don't have the mod loaded in main menu

#

Just uses the default value

#

Also having issues as the recipe isn't Base

#

The ingredients show up, but stay faded if they're not fullType

#

I have it import Base so I'm not sure why it's a problem

fast galleon
#

there's a function that resolves that in RecipeManager

#

maybe the one that prints "forgot to import Base"

sour island
#

Hmm I'll try that out

#

I was going to parse the bits myself

#

Since it has keep or destroy optionally

#

Otherwise asking they use fullType should be enough - as players will totally read the sandbox options tooltip drunk

sour island
#

Perhaps there's a pre-step

trim mist
#

Sorry to butt in on this convo. I'm trying to figure out if there's a way I can modify food on their use? I saw there was an event called onItemUse but it's deprecated.

#

So like, my use case for example is, if a food is being eaten, check if it's foodtype vegetable, if so, multiply hunger loss by 1.5

#

But as far as I can see, there's no event for that unless i did it tick-by-tick, and checked to see if there was a state-based var in the player called IsEating or something

bronze yoke
#

you should hook the eating timed action

viscid drum
#

:/ I'm not sure what I'm doing wrong. I'm using the same structure as zomboid has for this pen model. Still refusing to show up, everything else is working though

vast palm
#

what's your change to the item look like

viscid drum
#

i renamed the model and texture. Only thing I did was color the texture in black instead of the blue i think it had before?

vast palm
#

so what is happening exactly

#

is it textureless, or using the old texture

viscid drum
#

its textureless and modeless

#

still stabs, its just invisible, placing it on the ground just leaves the icon

bronze yoke
#

do you have a model script?

viscid drum
#

yeah, i copied the vanilla one and replaced it with the renamed model

#

the cooler i did earlier in the mod works, but this pen just isn't having it

red tiger
#

PZ might lose me for a while. I played RimWorld on Sunday. Big mistake.

vast palm
#

don't you need to do some lua to actually assign things?

#

unless that was Jab's old system -.-

red tiger
vast palm
#

lol

red tiger
#

You just went back to 2015.

vast palm
#

=P

#

let's see if I still have mine

viscid drum
#

so I didn't see any lua for weapons when i was digging around in the zomboid media folder

#

pertaining to the model that is

vast palm
red tiger
#

omg hahahahaha

#

I still have a picture of the first custom weapon model ever in PZ by a mod (ORGM)

vast palm
red tiger
vast palm
#

might not wanna keep cluttering this channel with pictures though

#

so if this was a bad move for us, sorry

red tiger
#

@fading horizon Did this for an entire day in here lol

vast palm
#

oh lol

bronze yoke
viscid drum
#

k, so i didnt miss that

vast palm
#

yea must of have been the old unofficial framework we worked on in 2015 lol

viscid drum
#

can i post my model script, or would that be too obnoxious?

clever turret
#

Would anyone be able to point me to a guide or give me a run down on how to cause zombies to spawn with specific clothing.

Developing something for a rp server of mine and when the players go to certain areas would like the zombies to spawn specifically with for example Hazmat Suits or Cultist robes or Scientists Coats

vast palm
#

authenticZ gives zombies costumes

#

you can check that out

#

I -think- it's authenticZ

clever turret
#

Yeah the cult robes from AuthenticZ are awesome i need to know how i can get for example a specific type of zombie or all zombies to spawn with that specific clothing item

vast palm
#

....what

#

AuthenticZ spawns some zombies with a full costume

#

try looking in there for how they did it

clever turret
#

I have been looking through it and tried some things myself but cant get the items to spawn specifically on certain or all zombies

vast palm
#

er

clever turret
#

For example if the rp event i bring the server up for could have all zombies spawn on that specific map for that day spawn with hazmat suits, then a special infected like from CDDA or Death Knell a mod that spawns a specific zombie type with a % chance spawn with the outfit of a scientist so lab coat, suit pants, shoes

sour island
#

Item scripts' OnUse is depreciated? @trim mist

clever turret
#

This could be for a specific server file i just use for that event, players make new characters on a new server with their other characters names and stats, then the servers only map is the rp place i want it to take place, then the zombies with the specific outfits only spawn

vast palm
#

yea okay, so authenticZ does it in a multi-step

#

I don't even know exactly how it works.. damn

clever turret
#

Its all good i appreciate you taking the time to read my message and any help or advice you could provide, no stress if its to complex

bronze yoke
#

using oneat would work, but would prevent compatibility with other mods that also use that approach

trim mist
trim mist
#

guh

#

does anybody know where in the java docs events are?

viscid drum
#

so im looking at the vanilla model script for the pen, and they capitalize the w for the weapons folder, but its not capitalized.....

bronze yoke
#

it's not an event, it's a script property

trim mist
red tiger
trim mist
#

πŸ‘€ i want THAT intellisense

#

is this what you're working on Jab?

red tiger
#

Yup.

vast palm
#

sounds like you have another fan

trim mist
#

nice. I like how the example is cigarettes

red tiger
sour island
#

Oh true onEat would break if multiple mods use it

sour island
#

You'd have to do an automatic overwrite somehow using something like itemTweaker :9

red tiger
#

AFAIK I'm the only person to write support the scripting format.

vast palm
#

stop mocking me ;P

viscid drum
#

well..........i've got the default pen model to show up now with the weapon :/

nimble spoke
trim mist
#

I'd rather not interfere with other mods if I can help it

#

I'm just... trying to figure out how to hook a new function into this

#

#mod_development message I'm looking at this message but i'm waist-deep in the java docs trying to find what the appropriate function to extend is

viscid drum
#

hrm........model appears now, but its not applying my custom texture to it

red tiger
#

My auto-complete template is a little bugged

#

lol

dusty wigeon
#

anyone know a good site to look at a list of distribution containers

red tiger
#

At least I actually auto-complete.

#

xD

nimble spoke
trim mist
# trim mist https://discord.com/channels/136501320340209664/232196827577974784/1095441190234...

anyone have an idea of where I could look? I see this https://projectzomboid.com/modding/zombie/characters/CharacterTimedActions/package-summary.html
but there's nothing specific to eating. I'm guessing that's initialized using this format but idk where i'd find the actual eating timed action to extend

#

for now I just have this. of course I don't know what the actual TimedActionEat function is lol

nimble spoke
minor pumice
#

hey guys! I'm trying to add another "module" to my already existing mod, for user to choose between both.
Can't find info over the net but I see a lot of mods have different modules. It is just upload an existing mod from inside the game?

dusty wigeon
#

how do i target certain zombies to spawn certain loot

fast galleon
viscid drum
dusty wigeon
#

ill check it out see if i can figure something out

fast galleon
trim mist
#

i mean, there's this in that same file

#

so i dunno if there's an eat function attached to the character that fills based on the amount of time spent eating, vs. is applied at the end of the action

#

but i'm pretty sure if the former is true, i want to modify that one

worldly olive
#

Hello! does something knows if there's something like getClothLayer or something like that to know if a worn item is in an inner or outer layer?

nimble spoke
bronze yoke
#

you can hook the IsoGameCharacter.Eat but it'd basically be the same thing either way

#

i don't think you can eat any way other than the timed action

minor pumice
nimble spoke
viscid drum
#

adding texture to the model script should make the weapon use it right?

mossy steeple
#

where are the icons of vanilla items stored in the folders?

viscid drum
#

in packs, probably easier to pull them off the wiki though

mossy steeple
#

ah, gotcha, yeah i'll do that then

trim mist
#

Jeez, i've been staring at this for an hour lmao

#

My best guess is that the timed action restores hunger as it's performed, but... I have no way of confirming that. plus, in game I see moodle updates after eating is completed so

bronze yoke
#

that's what the eat method is doing

trim mist
#

in isoGameCharacter?

bronze yoke
#

yeah

trim mist
#

let me see if I can find that

bronze yoke
#

you can't really modify how much hunger it gives, but you can just hook it and give extra independently of it

trim mist
#

for sure, that's what I wanted to do--I wanted to tack a percentage on top when it applies

fading horizon
trim mist
fading horizon
#

I need to come up with a good item to include in my goth bags recipes so the user isn't bombarded with 20 crafting options every time they right click a leather strip

#

Any ideas?

#

Maybe black paint? I think that's in vanilla

trim mist
#

You could straight up create a leather strip used only by your mod, and give the option to convert between the two

fading horizon
#

Hmmm

#

I worry that would confuse players tbh

viscid drum
#

people right click on leather strips normally?

#

you could have it just make a base color like brown, then let there be a recipe that uses the bag + paint color

fading horizon
#

I'm not going to retexture 25 bags to brown just for that honestly

#

I think I'll make a recipe to turn leather strips into black leather strips

#

And use that for the backpacks

viscid drum
#

ah, sorry didnt know what colors you had

fading horizon
#

Yeah it's a lot

#

I'm going with crafting recipes because I'm scared of flooding the loot tables with all the items

viscid drum
#

haha, that'd be funny. "why is there so many goth bags in these school and policeman lockers"

red tiger
#

containers in schools like desks and lockers used to contain copious amounts of cigarettes.

fast galleon
clever turret
#

What file / code line sets the size a zombie appears on your screen, if you were looking to make like a huge L4D tank like zombie that was actually bigger than normal zombies?

abstract pine
#
forageSystem = forageSystem or {};

function RemoveForagingDefs()
        local PeanutsDef = forageSystem.itemDefs["Base.Peanuts"];
        forageSystem.removeItemDef(PeanutsDef);
        local SunflowerSeedsDef = forageSystem.itemDefs["Base.SunflowerSeeds"];
        forageSystem.removeItemDef(SunflowerSeedsDef);
end

Events.OnGameStart.Add(RemoveForagingDefs);

Why does this code cause the foraging system to spit out tons of errors? It looks like the example code for the function in forageSystem.lua.

#
attempted index: altWorldTexture of non-table: null
STACK TRACE
function: new -- file: ISForageIcon.lua line # 180 | Vanilla
function: loadIcons -- file: ISSearchManager.lua line # 1013 | Vanilla
function: update -- file: ISSearchManager.lua line # 1240 | Vanilla
function: onToggleVisible -- file: ISSearchManager.lua line # 125 | Vanilla
function: setVisible -- file: ISUIElement.lua line # 579 | Vanilla
function: toggleSearchMode -- file: ISSearchManager.lua line # 1456 | Vanilla
function: onMouseUp -- file: ISButton.lua line # 56 | Vanilla

ERROR: General     , 1682458217242> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: altWorldTexture of non-table: null at KahluaThread.tableget line:1689.
ERROR: General     , 1682458217242> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: altWorldTexture of non-table: null
    at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
    at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:492)
    at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
    at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
    at se.krka.kahlua.vm.KahluaThread.pcallBoolean(KahluaThread.java:1924)
    at se.krka.kahlua.integration.LuaCaller.protectedCallBoolean(LuaCaller.java:104)
    at zombie.ui.UIElement.onMouseUp(UIElement.java:1228)
    at zombie.ui.UIElement.onMouseUp(UIElement.java:1183)
    at zombie.ui.UIManager.update(UIManager.java:816)
    at zombie.GameWindow.logic(GameWindow.java:262)
    at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
    at zombie.GameWindow.frameStep(GameWindow.java:765)
    at zombie.GameWindow.run_ez(GameWindow.java:681)
    at zombie.GameWindow.mainThread(GameWindow.java:495)
    at java.base/java.lang.Thread.run(Unknown Source)``

This is the error that gets spammed due to removing foraging itemDefs.

trim mist
fast galleon
#

to see the java code, you need to decompile it.

ancient grail
#

what is OnObjectCollide for anyways? vehicle?

#

or throwables?

#

or movingobjects ?

bronze yoke
#

moving objects

ancient grail
#

so its used for the trait that knocks down zed when come in contact with player... right?have you used it?

bronze yoke
#

i've never used that mod

#

or that event

#

i think for zombies it would be OnCharacterCollide

ancient grail
#

steam is down

bronze yoke
#

it's maintenance day

trim mist
#

lmfao

mellow frigate
timber river
#

So question for someone not in software development and does this stuff as a hobby… if you decompile the game code… is there some other program you can idk β€œopen” those files and be able to access all the custom classes, functions, etc? Am I making sense?

bronze yoke
#

that's what decompiling is for

#

you can just open them in whatever you're using to code, preferably a real ide though

mellow frigate
#

Decompiling allows you to read the code. not to change it. Does that answer your question ?

timber river
bronze yoke
#

stressed notepad++ at least...?

timber river
#

Yes, apparently at the very least drunk

What should I be using fr?

#

I feel like I’m about to have my mind blown and realize I’ve been living in the stone age this whole time

bronze yoke
#

my preference is intellij idea, but vscode is free, popular in the pz community and pretty great for lua

mellow frigate
#

Unless we're recompiling java like oneline8 does with their SSR mods, Notepad++ seems great enough for lua (to me). What am I missing Albion ?

timber river
#

Ohhhh is that what visual studio is? I might have to figure that out I guess… I tried installing it once and got overwhelmed by all the settings so I quit… is there certain things I need to install with it to mod zomboid?

bronze yoke
#

visual studio and visual studio code are pretty different programs

timber river
bronze yoke
red tiger
#

You can always use the PipeWrench typings...

#

: unhappy:

#

I'ma get all of you to use vscode muhahaha

timber river
frank elbow
#

I don't know what the proper answer is for PipeWrench, but for Lua modding the lua-language-server plugin should suffice. If you want intellisense for PZ stuff, pz-zdoc works with some modifications to the .bat/.sh file

red tiger
#

For scripting get my extension ZedScript

red tiger
#

Lol

#

It's not for everyone

#

If you like Typescript then ohhh boy

timber river
whole oasis
#

Heyo quick question for any clothingitem makers in here, what decides the body part coverage for clothing items is it the BloodLocations or the Bodylocations?

bronze yoke
#

for like temperature and stuff? that'd be blood location

red tiger
whole oasis
ancient grail
#

Idk where you should ask this this is just something that players should know?
I mean its not tech problem
Doesnt belong to mod support or mod dev

I guess its just a general chat concern?

Anyways to answer... if youre playing so you can only do it once
So if you installed a mod with sandbox
And you refuse to create new game
Then you are stuck with the defaults

If you play mp
Then admins can modify it anytime

Same with local hosted
You can modify it anytime. Too

#

@drifting ore

timber river
#

I’m pretty sure there’s a sandbox option for always locked cars… not sure about the alarm though

#

Ah

bronze yoke
#

you're in the right place

ancient grail
#

Ahh

sour island
#

I think people were discussing/debating if vehicles kept modData - but you could apply a function and flag to not apply the function again as you come across cars

ancient grail
#

Yes you are
Sorry bout that

bronze yoke
#

they do, but previously didn't

sour island
#

That seems to always be the case for stuff people disagree with lol

bronze yoke
#

i'd heard from someone that moddata could only store numbers and strings, but i found the patchnote from when they changed that... in 2013 ded

fading horizon
#

If I'm trying to make a zombie outfit with a mix of vanilla and my modded items, do I just include the guid of the vanilla item, or do I need to redefine the vanilla item in my fileguidtable?

timber river
#

Blair approachith

sour island
fading horizon
#

Perfect

willow estuary
#

You probably can have all vehicles alarmed and locked at spawn by tying into the Create function for a car part that all cars have, such as the engine, and setting the vehicle to be locked and alarmed there.

ancient grail
#

If youre making all cars lock by default then you dont need the sandbox setting. In fact you will bypass it
I guess

I dont know where exactly it is tho
Im mean what tells the car if jts lock or not
But i think its easier to look for the function where you try and entwr the vehicle
Check if lock
If true trigger the alarm (doesnt need to set it if you can force it to trigger)
Apply moddata so next time it wont trigger again

fading horizon
#

And if I include a probability for several backpacks, will there be a case where two of them spawn?

#

Or multiple

#

Or is there a way to force a table of items to only get one?

sour island
#

uh

#

if outfits already don't have a means to random select from a pool - the hacky way I can think of would be to create a dummy item that replaces itself

ancient grail
#

I dont think so but you can probably remove one when a player discovers the loot and see if there are 2 bags?

bronze yoke
#

i'm sure they must not allow multiple clothing items from the same slot

willow estuary
#

It would be simpler than any other solution proposed or that I can think of.

fading horizon
#

hmmm

#

both good ideas

#

i think dummy item is the easier approach

#

since i'm not sure how to do the discover loot thing

#

but ive done a dummy item in my vape mod

#

or at least tried to lol

sour island
#

Unless they add an onCreate or onLoad event for cars, you'll have to rely on the parts as Blair says

fading horizon
#

Or I could just create multiple outfits

#

That might be the easiest way

willow estuary
#

What can be simple to one person can be practically impossible to another person.
Such is the nature of modding.

fading horizon
#

Only have a few spawn able the rest craft able

ancient grail
#

I think theres an event when it does the roll? Not sure tho

sour island
#

You could also tap into the 'attempt to unlock door' event - and set a value in the car's modData to 'true' and apply a locking function - bypass repeated calls to that function if the value is already there.

ancient grail
#

I thought your problem was having 2 of the same kind spawnning

timber river
#

Anything you do Jake is gonna take a bit o learning and trial and error…. Might take a few days

ancient grail
#

And just when you thought youre almost done
Bam roadblock

#

Kidding not ment to discourage

#

Just reality
And it takes another level of effort to overcome but that depends on the mod

#

But as you can see the community is willing to help
So you wont be alone doing what you do

sour island
#

Would anyone know if there's something that has a list of all loaded script modules? I don't see one in scriptManager

#

There's a list but it's private

ancient grail
#

Just curious

sour island
#

shops

#

since the dynamic recipe doesn't seem to play well with modules I was going to write my own parser to add Base. if not present and if getItem() returns something

bronze yoke
#

you could make a list by looping through all items and checking their modules, but queasy

sour island
#

Speaking of Base, I should see how it behaves with Base as the recipe's module

bronze yoke
#

i think the debug item spawner has a list of modules formed basically that way, but i don't know if that code runs outside of debug?

ancient grail
#

If you have a mod.apple
And base.apple
And you Additem('apple')
What would you get?

bronze yoke
#

base.apple

sour island
#

it grabs base first yeah

#

if my Base recipe has a modded item as a result - do I need to import the modded module?

ancient grail
#

Sure enough

But what jf you have

Mod1.7437item
Mod2.7437item

Hehe

#

I guess mod1 ?

bronze yoke
sour island
#

I do have it

#

the recipe didn't appear if I made the module Base

#

heh

#

I imported the modded module

#

but sure enough the recipe can't be activated if the sandbox option doesn't include Base.

#

This feels like a very specific vanilla bug

echo fiber
#
function InjectPropital(Items, result, player)
    local timePassed = 0
    local delayInSeconds = 1
    local iterations = 20
    local function update()
        if iterations > 0 then
            iterations = iterations - 1
            local player = getSpecificPlayer(0) -- Get the first player
            player:AddGeneralHealth(5) -- Increase the player's health by 5
            print("Iteration:", 20 - iterations)
        end
        if iterations > 0 then
            -- Reschedule the update function to run again after delayInSeconds
            Events.OnTick.Add(update, math.floor(delayInSeconds * 1000))
        else
            -- Remove the event when iterations are complete
            Events.OnTick.Remove(update)
        end
    end
    -- Schedule the update function to run after delayInSeconds
    Events.OnTick.Add(update, math.floor(delayInSeconds * 1000))
end

so this code alone creates a delay in the function applying an iteration that will repeat till its done but so Events.OnTick.Add/Events.OnTick.Remove is not a project zomboid modifier, what would i use instead?

sour island
#

You don't necessarily have to remove it

echo fiber
#

well no but what is the modifier that i can use for an OnTick

sour island
#

Not sure what you mean by modifier

echo fiber
#

so Events.OnTick.Add is not an actual call in the lua code for zomboid

bronze yoke
#

well... no, it is

echo fiber
#

i need something to replace it that zomboid would recognize

echo fiber
#

so this function should work then?

sour island
#

Well, you aren't defining an argument in update(), but other than that sure

echo fiber
#

it would be update(player) id assume

bronze yoke
#

yeah, giving Add two arguments doesn't make sense

sour island
#

actually yeah true

modern hamlet
#

I'm trying to teleport the player when the player's health is too low. Everything works fine when the player dies from bleeding or when zombies kill the player. But in pvp situation, if the dying character teleports and the other player hits again, all functions work except teleport. To prevent this, I tried making the dying character ghost, but it didn't work.
Any ideas?

I reviewed this for teleportation: https://steamcommunity.com/sharedfiles/filedetails/?id=2892401130&searchtext=FastTravelMod

require "lua_timers"
function OnPlayerDead()
    
    if isTeleporting then return end
    
    local player = getPlayer()

    local playerBody = player:getBodyDamage()
    if playerBody:getHealth() > 10 then return end

    player:setGhostMode(true)
    player:setInvisible(true) 
    player:setNoDamage(true) 
    isTeleporting = true
    
    player:dropHandItems()
    
    --player:playEmote("salutecasual") -- ??
    
        -- drop items here
    local gridSquare = player:getCurrentSquare()

    -- heal player
    playerBody:RestoreToFullHealth()
       
        player:playEmote("salutecasual") 
        player:setX(8594)
        player:setY(10916)
        player:setZ(0)
        player:setLx(8594)
        player:setLy(10916)
        player:setLz(0)
        
         timer:Simple(5, function() 
            player:playEmote("moveout") 
            player:setGhostMode(false)
            player:setInvisible(false) 
            player:setNoDamage(false) 
        
            isTeleporting = false
            end) 

        -- Other functions like drop items, add pain, add bills etc....
end

Events.OnPlayerUpdate.Add(OnPlayerDead)
echo fiber
bronze yoke
#

i'm sort of confused about how this is supposed to work

echo fiber
sour island
#
local propitalIterations = 0
function PropitalEffects(player)
    if propitalIterations > 0 then
        propitalIterations = propitalIterations - 1
        player:AddGeneralHealth(5) -- Increase the player's health by 5
        print("Iterations:", propitalIterations)
    end
end
Events.OnPlayerUpdate.Add(PropitalEffects)
#

This is basically all you need to do to handle effects over time -- but note this is horrid for scalability and adding more effects

#

Also you'd need to check if the player is dead

echo fiber
sour island
#

Someone recently released a drug mod - perhaps it would help to look at that?

#

player:isDead() I believe

echo fiber
sour island
#

How did you handle added effects if any?

echo fiber
#

thats what im tring to add now XD

#

atm we just have laced drugs where when taken has a random chance to kill the player

sour island
#

. _ .

echo fiber
#

this is the first time im working with a function that would be a spanded period of time

sour island
#

Well the above example would work - but if you're adding more than 1 type of drug you'd need to make it more of a table you can scan through and also learn how to mess with player's modData

echo fiber
#

well each drug has there own function as they all apply there own stats

#

so that strip of code would go in each of the drugs functions

sour island
#

My suggestion for the sake of your time to maintain the code would be to overlap as much as you can

#

Would be alot easier if you use a general function that calls on a table of effects

echo fiber
fading horizon
#

wait

#

if i create a new outfit and only include my new backpack, the rest of the clothes will just be vanilla?

#

i'm looking at how another mod does it and it only adds their item

#

but ive seen that zombie in game and it wears clothes

sour island
# echo fiber would have to look into this
---Contain all code within a local table to be returned later
local drugs = {}

drugs.Effects = {}
function drugs.Effects.Propital(player)
    player:AddGeneralHealth(5)
end

function drugs.Effects.Crack(player)
    player:Say("this crack is good")
end

---@param player IsoGameCharacter
function drugs.onUpdate(player)
    ---check if player is dead, if so return/stop
    if player:isDead() then return end
    
    ---grab the player's modData -- free table given to all objects to add values to
    local pMD = player:getModData()
    --define this sub-table to modData as itself or an empty table as a means to initiate it
    --we use a sub-table as to not clog up the main table
    pMD.krakInsDrugMod = pMD.krakInsDrugMod or {}

    --define a sub-sub-table as itself or a new table
    --we use a sub-sub-table so that we can add other sub-sub-tables if needed in the future
    pMD.krakInsDrugMod.iterations = pMD.krakInsDrugMod.iterations or {}
    
    --define a local variable with a shorter name
    local drugIterations = pMD.krakInsDrugMod.iterations

    --for loop through a set of keys/values with in drugIterations
    for drug,iteration in pairs(drugIterations) do
        if iteration > 0 then
            drugIterations[drug] = iteration-1
            local func = drugs.Effects[drug]
            if func then
                func(player)
            end
        else
            drugIterations[drug] = nil
        end
    end
end
Events.OnPlayerUpdate.Add(drugs.onUpdate)

---Return the table so it can be called on using `require "<this file>"`
return drugs
#

This should help you get started

#

When you "use" the drug you just need to add to this modData's iterations

#

You can change drugs.Effects and drugIterations key's to match item types

#

anyway, I gotta go

#

The onUse functions have to be in a separate file and global

#
local pMD = player:getModData()
pMD.krakInsDrugMod = pMD.krakInsDrugMod or {}
pMD.krakInsDrugMod.iterations = pMD.krakInsDrugMod.iterations or {}
pMD.krakInsDrugMod.iterations[DRUG] = 20
#

Where DRUG is a string based on the item used - should also match the entry in effects

trim mist
#

@fast galleon wait. When the perform function of a timed action is called, does that mean it's finished?

#

referencing this image

#

I was looking at a different mod that modifies the eat food action and they did this

bronze yoke
#

yeah, perform means successfully completed

dusty wigeon
#

I learned a lesson to not rush through things. Forgot to watch my syntax and felt dumb afterwards trying to see what i did wrong

bright hamlet
#

Hey guys wanna learn PZ Modding anyone have a suggested video or guide?

timber river
red tiger
#

Taking the plunge. I'm learning x86 assembly.

red tiger
# trim mist

Where the fuck did this come from??? I assumed no one did UML in PZ modding except me..

#

lol

trim mist
red tiger
#

Haha.

trim mist
#

i found it on steam under "food heals you" mod

red tiger
#

The more UMLs out there the better.

lyric turtle
#

... As if food didn't already heal you

#

lol

trim mist
#

Okay. Here's my idea for making food of a certain type do more hunger restoration. Tell my why this wont work lmao

#

I have to go to bed

nocturne canyon
#

Made my first mod, simple reskin of one of the sledgehammers, however when I load into PZ the sledgehammer itself is invisible and I get a warning for 'MeshAssetManager.load'. Double checked the mod folder, the scripts, the textures and FBX file. Dunno what is breaking it haha.

#

hmm after reading through here wondering if my offset value is off even though i pulled the value from the vanilla sledgehammer

ancient grail
# modern hamlet I'm trying to teleport the player when the player's health is too low. Everythin...

i wouldnt recommend referencing that mod.. its messy .. i mean the way i wrote it..
here wrote this for you


local function teleport(player, destX, destY, destZ)  
    player:setX(destX)
    player:setLx(destX)    
    player:setY(destY)
    player:setLy(destY)    
    player:setZ(destZ)
    player:setLz(destZ)
end

---@param player IsoPlayer
---@param source STRING
---@param damage FLOAT
---@param x, y, z  coordinates

local function ouch(player, source, damage)  
    local x, y, z = 12304, 6757, 0
    local threshold = 20 --20%
    if player:getBodyDamage():getHealth() <= threshold then
        teleport(player, x, y, z) 
    end
end

Events.OnPlayerGetDamage.Add(bounce)

--Glytch3r
--Team Orbit
nocturne canyon
fading horizon
#

goth backpacks mod is done

#

i just gotta make the workshop page and images

fast galleon
#

The guide by chernobill also works, but it will not decompile everything because last version of Intellij breaks in some classes.

fast galleon
elder stream
#

Hey guys would there be any source of documentation or a module on using a database for PZ?

timber river
#

Is there a way to disable spawnpoints in a mod if a soft mod dependency isn't in the mod list?

For my MoreLZ mod I was wondering if there was a way to add Raven Creek spawnpoints that only show up if the Raven Creek mod is loaded.

Failing that I'll just release a different mod for with the spawnpoints

ancient grail
timber river
#

You might be right

nocturne canyon
sour island
nocturne canyon
#

Would that fix the MeshAssetManager.load warning I get? It doesn't throw a code, just a warning

sour island
#

You might find more knowledgeable people in #modeling tbh

#

I would presume there's a model script that's not right

#

Specifically the mesh param

nocturne canyon
#

Okay will try there ty

red tiger
#

Good morning.

#

Formatting ZedScript.. injured

drifting ore
#

woooo

autumn garnet
red tiger
#

lol

autumn garnet
#

ctrl+c / ctrl+v team

red tiger
#

When my formatter is working you'll have zero excuses.

open drum
#

Heya guys

#

is there any simple way to add foraging item in the forage definition ??

#

or do I have to copy the vanilla forage definition .lua and edit it then overwrite it ?

#

i know when i insert item distribution, i can use table.insert

#

is there any way to do the same for foraging definition?

fast galleon
#

I'm not sure I've seen a guide that focuses on forage definitions. Maybe you can make one. πŸ‘

open drum
#

i mean it looks like this

#

looks way diff. than item distribution list

#

which is

#
table.insert(SuburbsDistributions.all.inventorymale.items, "WURO_items.Valentine")
table.insert(SuburbsDistributions.all.inventorymale.items, 20.0);
#

if I do that

#

i know ill be adding "wuro_items.Valentine", 20.0,

#

but how would I add the " = " sign??

#

since in foraging def. it has minCount = 1,

#

or can I just do ```table.insert(forageDefs, type = "Base.Avocado")
table.insert(forageDefs, minCount = 1)

#

actually table.insert(forageDefs.Avocado, type = "Base.Avocado") table.insert(forageDefs.Avocado, minCount = 1) ???

sour island
#

If it's a Lua table editing it is possible

#

Just require the original file

#

Insert only applies to unkeyed tables

#

Otherwise you'll have to use existing keys or define new ones

#

forageDefs.Cherry = totally new table if you wanted.

#

forageDefs.Cherry.minCount = 2

#

Would change that one value

open drum
#

hmm i see

#

so if i want to create a new type within Cherry = { } table

#

i can do table.insert(forgeDefs.Cherry.type = "Vege")?

timber river
fast galleon
#

how about this API idea:

  • read document in a language like russian
  • translate to data format that can be viewed with programs like excel
  • normalise values based on similar items
  • generate ZedScript
fast galleon
timber river
#

For decompiling the zomboid code, we're up to java 20 now but the guide says 17, my time with minecraft tells me to ask and double check lol (presetup, Setup the new project step)

timber river
#

bueno

sour island
red tiger
sour island
#

forgeDefs.Cherry.type = "Vege" that's it

red tiger
#

Maybe I can do Lang support for ZedScript extension

#

Also hi

sour island
#

table.insert(t, thing) is the same thing as t[#t+1] = thing.

#

You can control position with a second argument -- but I don't think you'd use insert for keyed tables as keyed tables don't have an order.

red tiger
#

Table is array and dictionary and object and and and

sour island
#

It's all tables all the way down

red tiger
#

Yup.

#

Sounds like my personal hell.

fast galleon
#

hey

sour island
#

I've used copytable to make Lua tables more like objects

#

It's very handy for modData structures

#

Too bad I wrote my own copy table before being told PZ has one already drunk

red tiger
low basin
#

To make a buildable storage container (Like the base game crate) do you need lua? I did some digging around in the base game files but couldn't find a section with the crates.

fast galleon
#

yes, buildings include 2 things. Lua part for building and a tile part for adding tile to game.

low basin
#

Tile part should be completed, But I believe I am missing code to allow you to actually build the object and have yet to find anything to help me create it.

fast galleon
#

the carpentry menu for building must be an old system, it's rather hardcoded from what I remember. You could check how other mods do it, I think there's some that add a lot of building options.

fast galleon
low basin
#

So I can make it as a recipe and then place the item? I have done this with 3d model items but not from a Tilesheet.

fast galleon
low basin
#

I can work with this I believe, thank you.

primal pier
#

Hello! I made a mod but have some issues with it, I managed to upload it to the steam workshop just fine but when I try to enable it ingame the mod disables itself and there's no "reloading lua" notice in the top right corner of my screen, is there something I forgot to do when creating it? I hope this doesnt sound dumb, but when making the mod I didnt create a "lua" folder since I didn't know if I'd need it (all the mod does is add three new food items and recipes), is that why I can't enable it?

sturdy salmon
#

The truth is that the autocomplete helps.
But I don't know if they are still working on it, or if I extracted the information wrong.

bronze yoke
#

it usually fails on some files

#

i've never noticed anything specific on the java going missing, but i have noticed it fails on the vehicle commands lua file

sturdy salmon
#

Is there any other autocomplete method?
I was looking at a project in typescript I think.

#

If I remember correctly, it was that one.
But I have not tested it.

nimble spoke
primal pier
red tiger
#

You should paste it using back-ticks

primal pier
#

alrighty

#

name= Salt's Milanesa mod poster= poster.png id= MilanesaMod description= Adds milanesas to PZ

#

this is it

sturdy salmon
#

Yummy, milanesas, can it be with pureed?

abstract pine
#

What determines the blood overlay used on a tile? Is there anything simple I can change (especially in tile properties) to change or remove the blood overlay for a specific tile?

red tiger
#

Having to throw away around 600 lines of code which was ~10 hours of work.

#

Oh well. Onto the next line.

#

Got to get a working linter for ZedScript. >=/

ancient grail
#

anyone knows how to remove equipped ZedDmg without clearing the inventory]

tranquil kindle
#

It might be stupid question but is there a official "name" for Two hands as a slot? by that i mean that Primary hand is called firstHand, Secondary hand is called secondHand (at least in mod im trying to learn from). Im trying to learn by looking at one of the mods that allows you to change one weapon into other while keeping it in primary hand, and after change the weapon remains in that hand, however the code for it uses firstHand and secondHand names for it and i wondered if there is name for when i'd like to make it work but for Two handed weapons to remain in both hands after change?

bronze yoke
#

two handed weapons are just in both

lyric turtle
#

You better have sanguches de mila put into it πŸ‘€

ancient grail
#

brutal handwork

ancient grail
tranquil kindle
#

There is mod Undead Survivor, and it has a knife in it that allows you to use it in diffrent ways (Swing or stab, it simply replaces one item with another), however this mod includes lua script that makes it if you have weapon in your right hand and you "change(swap item)" it replaces it with other item but its still in right hand

#

i managed to reproduce it with my item, however item im using is crowbar and its two handed and im not sure how to make it work to put in two hands, so i thought im missing name of slot for both hands

echo fiber
#
function InjectHemostatica(items, result, player)
    local bodyDamage = player:getBodyDamage();

    bodyDamage:setBleedingTime(math.max(((bodyDamage:getBleedingTime()) +(10)),0));
end

so on its own this strip of code should work but its not, is setBleedingTime not a bodyDamage? iv tried stats as well and it wont work

bronze yoke
#

it's BodyPart

echo fiber
#

so player:getBodyPart?

bronze yoke
#

BodyDamage:getBodyPart(BodyPartType type)

echo fiber
# bronze yoke it's BodyPart

just replaced it to local bodyDamage = player:getBodyPart(); and it didnt work where you have Bodypart Type how would you cover the whole body?

bronze yoke
#

loop through BodyDamage:getBodyParts()

#

add bleeding to each one

echo fiber
bronze yoke
#
local bodyParts = bodyDamage:getBodyParts()
for i = 0, bodyParts:size()-1 do
    local bodyPart = bodyParts:get(i)
    bodyPart:setBleedingTime(bodyPart:getBleedingTime() + 10)
end
#

you might need a lower value than 10 though, i think this is the same as a max severity scratch on every limb

echo fiber
bronze yoke
#

you get the bodyDamage from the player

#

i didn't include that part since it would be specific to how your variables are named

echo fiber
#

or what is that defining

bronze yoke
#

that's a for loop, it loops adding 1 to i each time until i is greater than bodyParts:size()-1

echo fiber
#

so its like an over time effect?

bronze yoke
#

no, it happens in one frame

echo fiber
#

ah okay cool

bronze yoke
#

getBodyParts() is a list of all the player's body parts, so when we loop i from zero to the size of the list (minus one) and use :get(i) it does the code to every part

#

normally you loop from 1 in lua, but getBodyParts() returns a java array so it starts from zero instead

echo fiber
#

okay so there is an existing table already that we are just calling too

bronze yoke
#

yeah, pretty much

#

doing array:get(i) is the java array equivalent of doing table[i] to a lua table

echo fiber
#

what im trying to get it to do is when you use a said item, it slows the bleeding down

bronze yoke
#

oh, the way it is now it'll actually increase bleeding
bodyPart:setBleedingTime(math.max(bodyPart:getBleedingTime() - 1, 0)) would probably be closer to what you want

#

but i don't think that's related to it erroring

echo fiber
# bronze yoke but i don't think that's related to it erroring
function InjectHemostatica(items, result, player)
    local bodyParts = bodyDamage:getBodyParts()
    for i = 0, bodyParts:size()-1 do
        local bodyPart = bodyParts:get(i)
        bodyPart:setBleedingTime(bodyPart:getBleedingTime() - 10)
    end
end

this is what i have so far not sure if i missed something or im calling the wrong things in the function

bronze yoke
#

add to the start
local bodyDamage = player:getBodyDamage()

echo fiber
#
function InjectHemostatica(items, result, player)
    local bodyDamage:getBodyDamage()
    local bodyParts = bodyDamage:getBodyParts()
    for i = 0, bodyParts:size()-1 do
        local bodyPart = bodyParts:get(i)
        bodyPart:setBleedingTime(bodyPart:getBleedingTime() + 10)
    end
end

so like that?

#

that worked thank you @bronze yoke you are the best ❀️ and you explain things very nicely ❀️

fading horizon
#

can y'all think of anything to add to my mod preview image

#

i feel like its too plain

bronze yoke
#

it looks great to me

open drum
dusty wigeon
#

I have this code that im trying to get to add health to the player. I can take the item but it doesnt add the health. Am i missing something? ```lua
function InjectPropital(items, result, player)
local stats = player:getStats();
local bodyDamage = player:getBodyDamage();
local char = player;
player:setHealth(math.max(((player:getHealth()) + (10)), 0));
end

#

the original idea was to do health over time but i cant figure it out

open drum
#

is player health range from 0 - 100?

dusty wigeon
#

I was thinking it was

red tiger
#

Might be in a better situation since I started rewriting my linter.

#

Took a different approach with my recursion and it seems to be holding up with nested scopes. The problem will be identifying false positives for scopes that are actually properties.

#

I might use something like scope;root.module.foo.bar to add as an extra step to ensure if the property is a valid scope based on where it's placed.

sour island
sour island
#

I'm trying to list the community projects as public but cannot :\

open drum
red tiger
#

My blabbering on about linting is boring but the result will be really cool.

open drum
sour island
#

Not sure what is going on

red tiger
#

linting will be the reason why my VSCode extension will have diagnostics and error-detection.

sour island
#

I even threw $5 on the wallet as the PZ was gifted to the account

#

I hope I don't have to enable 2FA

dusty wigeon
#

?

sour island
red tiger
#
module Base
{
    animation Runtime1
    {
        CopyFrame
        {
            frame = 1,
            source = Bob_IdleDrinkPopCan,
            sourceFrame = 1,
        }
        CopyFrame
        {
            frame = 21,
            source = Bob_IdleDrinkPopCan,
            sourceFrame = 21,
        }
    }

    animation Runtime2
    {
        CopyFrames
        {
            frame = 1,
            source = Bob_IdleDrinkPopCan,
            sourceFrame1 = 1,
            sourceFrame2 = 21,
        }
    }


[
    {
        "type": "error",
        "location": {
            "start": {
                "row": 30,
                "col": 1
            },
            "stop": {
                "row": 30,
                "col": 2
            }
        },
        "message": "Missing '}'."
    }
]
#

Again, boring stuff.

#

Won't be so boring when people are told their errors instead of wasting silly amounts of time looking for something as simple as a missing bracket.

dusty wigeon
#

lol

sour island
red tiger
#

In order to format ZedScript, it needs to pass the linter. In order to lint ZedScript, it needs to tokenize without issues.

#

so 2 passes.

dusty wigeon
#

fuck doing all that i barely understand coding lol

red tiger
#

"message": "The scope 'root.module' is missing a '}'."

#

Looks better.

ocean sphinx
#

is there a library of the color values mostly used in project zomboid?

sour island
#

Seems like you do need to enable steam guard to make content public :/

#

That's unfortunate

low basin
#

Is it possible to pass the 100 capacity limit on containers? The TileDef stops at 100 and increasing it in the generated def file has no effect, is this just a hardcoded limiter? My goal was to create a buildable container that has has the storage capacity of the three stacked crates so that I would not have as many inventories to scroll through in my item storage.

dusty wigeon
#

so i changed the number but it still is not adding health. ```lua
function InjectPropital(items, result, player)
local stats = player:getStats();
local bodyDamage = player:getBodyDamage();
local char = player;
player:setHealth(math.max(((player:getHealth()) + (0.25)), 0));
end

viscid drum
#

anyone familiar with Noir's Attachments? I was trying to make a mod to allow a cooler from my mod to be attached to the container slot, and its not quite working :/

calm depot
#

@dusty wigeon how are you examining whether or not it's adding health?

#

I would suggest the best way is to print the result of getHealth before and after you change it

dusty wigeon
#

im in debug mode looking at the health bar on the character panel

calm depot
#

umm, print the value out, looking at the meter isn't very scientific

#

it's possible that you are adding something, but 0.25 is too small of a step to be visually tangible

dusty wigeon
#

i was just going off something i heard earlier that the health is somewhere between 0-1 so idk whats going on

#

ive tried raising the number to see if i could see it move the bar to no avail

calm depot
#

that might be the case, still print the value. This will give you a proper number to read and also act as a form of verification that your code is actually running

dusty wigeon
#

ok how would i write the print function and where should i place it

calm depot
#

print(player:getHealth())

#

do it before and after you set the health

#

the in-game lua console will display the value

dusty wigeon
#

ok

#

this is after three uses

calm depot
#

so health is indeed incrementing by 10

dusty wigeon
#

but why does this remain like this

calm depot
#

body parts have their own individual health

#

(as you can see from your screenshot)

dusty wigeon
#

i was just looking to give overall health

#

the original plan was to try to increase the regeneration of health but that was being a pain

calm depot
#

yeah, I don't quite remember how the game utilises the overall health value, I suspect it's used for stuff like poisoning or dying from infection

#

if you drink bleach, does the health of your body parts decrease or just the main meter?

#

there's definitely some sort of composite relationship between overall health and individual body parts - stuff like hands can drop to zero but you'll survive. neck dropping to zero on the other hand is lethal

deft peak
#

Is this the chat to learn about making mods aswell as chatting about them?

#

Or do you go to other places for that

calm depot
#

if you have absolutely no programming experience, YouTube and googling for tutorials is probably the best place to start

deft peak
#

What about just general questions about modding?

calm depot
#

well either way, nobody's going to be offended, ask and see if someone has the answer

dusty wigeon
#

yea i just tested bleach and every body part drops as well as the main meter

calm depot
#

my suggestion would be to iterate over the body parts then and distribute the health addition across them

#

you can either take the blunt approach and just increment each part by a fixed value, or you can inspect its current health and calculate the difference between how many points it needs to be full and how many you have available to distribute

dusty wigeon
#

ooo this is gonna be a lot harder than i imagined. would increasing the health regen rate be faster?

#

thats the way i originally wanted to go

calm depot
#

are you able to control health regen rate from lua?

#

I have the vague feeling that increased regen is internal to java and only triggered by being well fed

dusty wigeon
#

ill have to do more research i suppose

calm depot
#

hm, actually

#

player:getBodyDamage():setHealthFromFood

#

it takes a float argument

#

play around with it, I suspect the argument is meant to be the amount you want to increase body health by

#

there's also setHealthFromFoodTimer which presumably does the same thing, but not instantly

dusty wigeon
#

ok

calm depot
#

in fact, I would wager the latter function is basically what does the "increased health regen"

dusty wigeon
#

i wish they actually showed some examples of how its used

calm depot
#

decompile the java code

dusty wigeon
#

i have no idea how to even do that

deft peak
#

Well i do have a question rn then

#

How hard is it to learn animation in java? Which is the game engine zomboid runs on

calm depot
#

Java isn't a game engine

#

it's a general purpose programming language

#

a lot of the anims are in the DirectX format, but I believe the game supports them embedded in FBX files too

#

I haven't had cause to do any animation yet, but exporting my models from Blender as FBX has turned out just peachy

bronze yoke
#

@dusty wigeon you can just use BodyDamage:AddGeneralHealth(amount)

mellow frigate
#

Hi everyone, in a multiplayer mod, I wanna spread an information from the server to all clients.

#

Is there a better solution than sending a sendServerCommand to each clients (looping on getOnlineUsers array) ?

deft peak
#

or if that is the most difficult thing about modding

calm depot
#

the only real challenge is familiarising yourself with a 3D modelling tool like blender. After that, you're just exporting files

dusty wigeon
deft peak
#

Could you learn about a program here? Or is it strictly just for zomboid modding

bronze yoke
#

if it's related to zomboid modding, sure, but dedicated places for those programs would probably be more helpful than here

timber river
#

Plenty of videos on YouTube for learning blender

fast galleon
mellow frigate
deft peak
#

But im also very annoying, so theres that and lazy xD

knotty sun
#

But IMO your best getting stuck into it and playing with the tools. Don't know how this works? Youtube will tell you. If your still stuck just pop on the discord for the software and you'll find someone to answer your question

deft peak
#

tru tru

primal remnant
#

Does anyone understand how HealthFromFood, and related functions like SetHealthFromFood/SetHealthFromFoodTimer work?

buoyant merlin
#

In the general chat channel someone suggested a mod that would trip a player walking backwards. I love the general idea of it but I'm a beginner with lua. I've been able to make a mod that has a low chance of "bumping" a player when they move at high panic but it's not the best implementation of the idea -- Is there a way to specify the direction the player is moving in lua, like getplayermovedir ("forward") or something?

mellow frigate
#

character:getAnimAngleRadians();--player orientation (To be verified: this is angle 0 = East, 90 = South, -90=North, 180=West)

#

character:getForwardDirection():getDirection();--player direction in radian (to be verified what 0 refers to)

buoyant merlin
#

hm, thanks! I'll see what I can make of it

honest pier
calm depot
mellow frigate
#

it is radians, not degree, the values of my comment are wrong

red tiger
#

Happy.

#

Very happy.

#

linter properly seeing properties and nested scopes.

#
module Base
{
    animation Runtime1
    {
        CopyFrame
        {
            frame = 1,
            source = Bob_IdleDrinkPopCan,
            sourceFrame = 1,
        }
        CopyFrame
        {
            frame = 21,
            source = Bob_IdleDrinkPopCan,
            sourceFrame = 21,
        }
    }

    animation Runtime2
    {
        CopyFrames
        {
            frame = 1,
            source = Bob_IdleDrinkPopCan,
            sourceFrame1 = 1,
            sourceFrame2 = 21,
        }
    }
}

// intoScope(module)
// intoScope(animation)
// intoScope(copyframe)
// Property Detected: key=frame value=1
// Property Detected: key=source value=Bob_IdleDrinkPopCan
// Property Detected: key=sourceFrame value=1
// outOfScope(copyframe)
// intoScope(copyframe)
// Property Detected: key=frame value=21
// Property Detected: key=source value=Bob_IdleDrinkPopCan
// Property Detected: key=sourceFrame value=21
// outOfScope(copyframe)
// outOfScope(animation)
// intoScope(animation)
upper lynx
#

So I'm having an issue with mod I've made, it is turning as a burnt vehicle instead of normal, and then when spawn in it is there as mesh but invisible too πŸ€”

primal remnant
#

Easy question. I've been seeing a lot of code using the ":" operator. e.g. getCharacter():getBodyDamage()

That said, does lua, and more importantly, PZ allow for the use of the "." operators? Could I use getCharacter.BodyDamage?

neon bronze
#

I think the . operator is used for the table members in that sense you can use the operator from function modules to directly use a function instead of declaring a whole new member to use it

#

Kinda like the ItemFactory

mellow frigate
#

getCharacter.BodyDamage is invalid

#

getCharacter().BodyDamage is valid

primal remnant
#

Awesome, thank you both. @neon bronze I'm unfamiliar with table members. Are these all the terms that require BodyDamage? Like OverallBodyHealth, hunger, etc?
I'm a C#/C++ guy so I'm still learning the lingo.

neon bronze
#

Nah lua can and will make almost everything a table

#

Think of it as like a function that you would declare in a struct

#

But you can kinda access it from the outside without actually making a whole new variable for that function

primal remnant
#

I see. So if I have a table, I can just use something from within it like

MyTableName().tableMember

#

Again, without needing to create a new variable for it.

neon bronze
#

MyTableName.tableMember

#

Thats how you would access it if you have a table filled

#

But again it works for functions not for tables

primal remnant
#

So would BodyDamage be a table and getOverallBodyHealth be a method within that table?

neon bronze
#

so far im aware you cant access BodyDamage like that since it needs the character to check for

#

hence you use character:getBodyDamage()

primal remnant
#

OHHH, that might be why I'm having issues. I can't just get into BodyDamage without the character.

neon bronze
#

the ":" uses the variable before as self for the function to check for it

#

so character:getbodydamage() would use character to check

primal remnant
#

Are character/player interchangeable?

#

I know stats/bodydamage are different.

neon bronze
#

variable names but not internal, i call them character someone else calls them players but i think you need IsoPlayer for that

primal remnant
#

I ask for the (items, result, player) arguments I see all the time.

neon bronze
#

actually you need IsoGameCharacter

neon bronze
primal remnant
#

yes, it is.

#

I'm basically bugtesting a function that OnCreate adds some stuff to my inventory (which works) and also increases my health by 5.0f (doesnt work)

fast galleon
#
local t = {}
function t:test()
  print(self==t)
end
t:test()
t.test(t)

it's same thing

neon bronze
#

exactly but t:test() is simpler and better syntax than t.test(t)

fast galleon
#
local t = {}
function t.test(self)
  print(self==t)
end
--or
t.test = function(self)
  print(self==t)
end
primal remnant
#
lua
function Divide_LC_Salt(items, result, player)

    local bodyDamage = getPlayer().BodyDamage
    local currentHealth = 0.0f
    currentHealth = bodyDamage.getOverallBodyHealth

    if currentHealth == nil then
        print("currentHealth did not initialize properly.")
    else
        print("currentHealth initialized correctly. Value = " .. tostring(currentHealth))
    end

end```
neon bronze
#

why not just char:getBodyDamage()?

primal remnant
#

Essentially I'm just trying to make it print the health of the player, but it's... well not doing that.

neon bronze
#

also why the getPlayer()? you already got the player

#

its char

primal remnant
#

That top bit is the working code for the addition of items to inventory.

#

I was just leaving it separate and trying to get the rest to work on it's own.

#

different variable names and all that. Let me polish it up.

#

There we go. Edited for clarity on what isn't behaving itself like a good little code block.

#

Removing all the fluff and sticking with just what is above, the game throws an exception for "if currentHealth == nil then"
It says "Object tried to call nil", so maybe I wrote that incorrectly.

neon bronze
#
function Divide_LC_Salt(items, result, player)
  local bodyDamage = player:getBodyDamage()
  local currentHealth = bodyDamage.OverallBodyHealth
  if not currentHealth then
    print("Currenthealth did not init properly")
  else
    print("Currenthealth initialized correctly with health = " .. tostring(currentHealth))
  end
end
#

try that maybe

bronze yoke
#

use getOverallBodyHealth()

#

only static fields can be accessed without a getter iirc

neon bronze
#

Ah there is one

primal remnant
#

Ok so that corrected the game breaking bug, but it does in fact generate the "did not init properly" text. I'm going to swap the OverallBodyHealth for getOverallBodyHealth() and give that a shot.We're making progress

bronze yoke
#

(you can do some weird reflection stuff to get fields anyway but it's ugly and sucks)

primal remnant
#

Haha @bronze yoke great minds

neon bronze
#

I mean kudos to indie stone atleast some getters are good and make sense

primal remnant
#

We're back to "Object tried to call nil" again. Hmmmmmm

#
lua
function Divide_LC_Salt(items, result, player)

    local bodyDamage = player:getBodyDamage()
    local currentHealth = bodyDamage.getOverallBodyHealth()
    if not currentHealth then
      print("Currenthealth did not init properly")
    else
      print("Currenthealth initialized correctly with health = " .. tostring(currentHealth))
    end

end```
bronze yoke
#

use **:**getOverallBodyHealth()

neon bronze
#

no he mean to call it on the player

#

is it player?

bronze yoke
#

it is part of bodydamage

neon bronze
#

ah yeah the bodydamage

#

im really bad at that field

bronze yoke
#

unless it's static you should always use colon for java methods

#

(or if you're caching them)

primal remnant
#

so getPlayer():getBodyDamage(). player:getBodyDamage() or player:BodyDamage() ?

#

@bronze yoke I will, but what is the reason for this?

#

Just a best practice?

bronze yoke
#

colon in lua passes the object before it as the first parameter

neon bronze
#

player:getBodyDamage():getOverallBodyHealth()

bronze yoke
#

it's part of the way it fakes oop

#

if you don't use it, kahlua doesn't know which object you're calling the method on

primal remnant
#
lua
    local currentHealth = player:getBodyDamage():getOverallBodyHealth()
    if not currentHealth then
      print("Currenthealth did not init properly")
    else
      print("Currenthealth initialized correctly with health = " .. tostring(currentHealth))
    end

WE HAVE SUCCESS!

#

Gave me the proper float value for my injured character.

neon bronze
#

well done

primal remnant
#

Many thanks to you @neon bronze @fast galleon @bronze yoke

#
lua
    local char = player:getBodyDamage()
    local currentHealth = char:getOverallBodyHealth()
    if not currentHealth then
      print("Currenthealth did not init properly")
    else
      print("Currenthealth initialized correctly with health = " .. tostring(currentHealth))
    end

    char:setOverallBodyHealth(currentHealth + 5.0f)
    currentHealth = char:getOverallBodyHealth()
    if not currentHealth then
        print("UpdatedHealth did not init properly")
      else
        print("UpdatedHealth initialized correctly with health = " .. tostring(currentHealth))
      end

And now this code tells me what my current OverallBodyHealth is before adding 5.0f to that value and then telling me what my new OverallBodyHealth is. Worked like a charm. BOOYAH!

Quick edit: This code does not do what I need it to do. Going to update below here with the fix and WHY it wasn't working before.

#

Now I just need to figure out how to look the addition of 5.0f with a small delay to simulate a regeneration effect.

calm depot
#

Isn't there a Timed method

viscid drum
#

anyone familiar with Noir's Attachments? I'm trying to get a container from my mod to be attached to the container slot. I can get everything working except for displaying the correct model :/

fading horizon
primal remnant
#

@calm depot Is there? I'll have a look around.

solid dawn
#

A crafting tree for an upcoming recycling/crafting mod I am working on rn. It will make use of the crafting benches from "Crafting Core Enhanced" (+ some I've made myself) and will also include all of the "The Workshop" mods recipes, "bushcraft gear tools", "Yaki's makeshift clothing" and "That's It I'm Weaving" as well as a few items from smaller mods.

primal remnant
# primal remnant ``` lua local char = player:getBodyDamage() local currentHealth = char:g...

This code did not work as intended because I was using the setOverallBodyHealth, which as far as I can tell is not allowed. OverallBodyHealth is determined by the aggregate condition of all the body parts of the player. The AddGeneralHealth() function is what I needed and it behaves like so:

java
    public void AddGeneralHealth(float var1) {
        int var2 = 0;

        for(int var3 = 0; var3 < BodyPartType.ToIndex(BodyPartType.MAX); ++var3) {
            if (((BodyPart)this.getBodyParts().get(var3)).getHealth() < 100.0F) {
                ++var2;
            }
        }

        if (var2 > 0) {
            float var5 = var1 / (float)var2;

            for(int var4 = 0; var4 < BodyPartType.ToIndex(BodyPartType.MAX); ++var4) {
                if (((BodyPart)this.getBodyParts().get(var4)).getHealth() < 100.0F) {
                    ((BodyPart)this.getBodyParts().get(var4)).AddHealth(var5);
                }
            }
        }

    }

First, the code uses a for loop to determine how many injured body parts a player has.
Second, it divides the health we wish to add to the player by how many injured body parts there are.
Finally, it adds the divided total health between the body parts. I would assume equally, but there' some behind the scenes stuff that increased my less injured parts by a smaller value than my more injured body parts.

In my previous code, I used "char:setOverallBodyHealth(currentHealth + 5.0f)", which would print to console correctly, but my debug view and medical tab both showed no change at all.
By changing this line to "char:AddGeneralHealth(30.0f)" it increased the health of my character by ~9.5f in total, and each limb was healed by ~2.0f.

Hope this is helpful to someone trying to heal their character with items.

#

@solid dawn We will gladly use this on our server if you get it up and running. I'd be happy to playtest it for you. I've grown increasingly frustrated with some blacksmithing mods that don't allow for melting of metal tools. especially considering most metal things in the base game already have a "metal value" that could be used to calculate how much metal they give.

Some things to watch out for:

  1. Do not use equipped or favorited items from the players inventory. Lost too many essential tools in a recipe because it searched across all recipes instead of the item I was right-clicking on.
  2. Allow for the melting of "broken" items. Just because my screwdriver is unusable doesn't make it any less metal.
  3. If you intend to integrate this with other smithing mods, please do not create new smithing tools or fuel. We currently have three versions of "smithing tongs" from Blacksmith, Real Metalworking, and The_Cure mods.
  4. If you intend to make forges work like ovens, ensure "progress" updates with the server. Blacksmith mod will not update an items status in MP until you leave the area and return. Real Metalworking only requires the player to be nearby the forge and have the items. Simplicity is key here, I believe. It's cool if the forge behaves like an oven, but if it causes issues then having simple recipes that ONLY require nearby items would be the better option.
  5. Try to avoid requiring stacks of items. It's honestly annoying to need x6 of an item when I could easily break one of them down into a smaller bit of metal. A drainable "workable iron" could be created with 0.1 useDelta(), and then combined with another to make a whole one.
  6. Please make components combinable. Having 17 0.01 useDelta workable iron that can't be hammered together is irritating.

Those are just my immediate thoughts. If you want help with this mod, I'd be happy to learn with you and playtest.

red tiger
#

Came back to a wall of text lol

#
    {
        "scope": "root.module[Base].animation[Runtime2].copyframes",
        "type": "warning",
        "location": {
            "start": {
                "row": 26,
                "col": 13
            },
            "stop": {
                "row": 26,
                "col": 25
            }
        },
        "message": "Unknown property: sourceFrame2"
    }
#

Example of progress on the linter.

#

The boring side of modding. =)

knotty abyss
#

Hello modders! How can I test my mod before publish it on steam ?
I did a update on mine and I would like to test before ... what folder I need to put ?

mellow frigate
#

Zomboid/mods

#

πŸ™‚

knotty abyss
#

but have 3 folders of this and not show in game Mod option

mellow frigate
knotty abyss
#
  1. C:\Users\romar\Zomboid\mods ... 2. C:\Zomboid\mods ... 3. C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\mods
mellow frigate
#

2 is not related to the game

#

1 is where you should put your own mods

#

3 is where go the mods when you hit subscribe on steam

#

C:\Users\romar\Zomboid\Workshop is where you should put your mods to update steam

knotty abyss
#

thank you ! And why has appear this folder on 2 ? kkkk

#

Can I delete that ?

mellow frigate
#

I do no know, how do you write the mod ? using an IDE ?

#

be sure to NOT subscribe to your own mods when you edit them

knotty abyss
#

An IDE what is that? Idk kkkk I just wrote and publish and voilΓ‘... but now I dont remember how to add some news updates. I will try to use this folder like u said

mellow frigate
#

Anyone could help me understand why, when I start my local server ("servertest") with mods, it overrides its SandboxVar.lua without any mod subnode ?

#

@setlocal enableextensions
@cd /d "%~dp0"

SET PZ_CLASSPATH=istack-commons-runtime.jar;jassimp.jar;javacord-2.0.17-shaded.jar;javax.activation-api.jar;jaxb-api.jar;jaxb-runtime.jar;lwjgl.jar;lwjgl-natives-windows.jar;lwjgl-glfw.jar;lwjgl-glfw-natives-windows.jar;lwjgl-jemalloc.jar;lwjgl-jemalloc-natives-windows.jar;lwjgl-opengl.jar;lwjgl-opengl-natives-windows.jar;lwjgl_util.jar;commons-compress-1.18.jar;sqlite-jdbc-3.27.2.1.jar;trove-3.0.3.jar;uncommons-maths-1.2.3.jar;./
".\jre64\bin\java.exe" -Djava.awt.headless=true -Dzomboid.steam=0 -Dzomboid.znetlog=1 -XX:+UseZGC -XX:-CreateCoredumpOnCrash -XX:-OmitStackTraceInFastThrow -Xmx3072m -Djava.library.path=./natives/;./natives/win64/;./ -cp %PZ_CLASSPATH% zombie.network.GameServer
PAUSE

#

above is my server start script. I use the same steam folder for my server and my clients.

primal remnant
#

@fading horizon We are busy WORKING!

fading horizon
#

So I'm not allowed to post one message in between?

primal remnant
#

Ol' boy is streaming. Your message popped up XD

#

I'm just teasing ya

fading horizon
#

Ooooh I was so confused I thought you were upset haha

primal remnant
#

Lol nah, I'm just being a goober. You can ignore me

#

Good work on your mod, btw. Looks great.

dusty wigeon
#

can someone explain why some stuff is indented more than others or does that matter for profession

bronze yoke
#

no reason

#

the stuff that is randomly indented more or less in the same scope anyway

dusty wigeon
#

ok

fading horizon
rancid panther
#

i wonder if there is a way to make it so you can flip a light switch even if the power is out

#

i mean it is definitely possible, but i wonder how to do that

ashen adder
#

Does anyone know of any good modding resources for an almost total beginner?

rancid panther
#

start with the pins

ancient grail
viscid drum
fading horizon
#

if that ran at me i'm immediately using the suicide mod

ancient grail
#

If we manage to implement the drag down animation as hit reaction
Then this will always instant kill

viscid drum
#

I always wondered, if you get dragged down is it an auto kill in multiplayer? or can somebody else kill them before you die?

fading horizon
#

just found out theres an incompatibility with one of my mods

#

i have no idea where

#

theres no errors

#

||I have over 400 mods to go through to check for the issue||

cobalt mauve
#

sorry if this is a common question, but is there any information on how to create animations for pz? like what tools are available, the method for making new or replacing existing ones (i mostly wanna replace combat animations of 2h melee weapons, like bat n stuff, so idle, movement and attack)

dusty wigeon
#

anyone know anything about creating professions? I created this it pops up but doesnt give the perks. ```lua
ProfessionFramework.addProfession('CDC Scientist', {
name = "CDC Scientist",
icon = "profession_CDCScientist",
cost = -5,
xp = {
[Perks.Chemist] = 3, --rename with custom Perks
[Perks.SmallBlade] = 1,
[Perks.FirstAid] = 2,
},
traits = {"FastReader2", "FastLearner2", "Organized2", "ThinSkinned2",}, --rename quoted items to custom trait name
})

fast galleon
fading horizon
#

custom context menu

#

the rectangle draws and shows