#mod_development

1 messages ยท Page 374 of 1

dull moss
#

then fuck knows, contact steam support shrugR

willow tulip
#

it was an LUA vunerability

dull moss
#

how do you know Susge

willow tulip
#

Because people posted the code on reddit

finite dune
#

Do you have a link by any chance?

bronze yoke
#

let's not get into the details of the exploit

dull moss
dull moss
willow tulip
#

Thanks for looking into it.

finite dune
#

right, will carry this on through Spiffo, 2 mins

dull moss
#

uh-oh

finite dune
#

no no, just this isn't the place for this conversation

#

go back to your mod development

dull moss
#

yea i know I'm just messing around

#

:D

#

more like "mod reviving after 42.13"

bronze yoke
#

i will say that there's not really such thing as a vulnerability for java mods -- java mods don't need them, inherently they can do any malicious stuff they want, which is why they're generally not recommended

dull moss
#

๐Ÿค

willow tulip
dull moss
#

When you gotta install java mods to bypass hardcap 50 capacity tired

willow tulip
#

Yes I have a mod for that -_-;

#

Lets you adjust player, floor, furniture, backpack and trunk capacity ๐Ÿ˜›

#

Because nothing will stop the power of hoarding!

mental bane
#

cant play this game without it highkey

willow tulip
#

k

mental bane
#

thanks man

dull moss
#

aka if u installed it before and havent unsubscribed

mental bane
#

I need to download it to dedicated server for b42.14 since our server got erased yesterday

dull moss
#

Bro I'm so happy nothing really changed here and i dont need to figure out clothes again KekW

ETW Logger | bloodlustKillETW(): distance=1.4560546875
ETW Logger | bloodiedClothesLevel(): Clothing = Hat_Fedora | blood clothing type = [Head] | blood level = 14.509804725646973
ETW Logger | bloodiedClothesLevel(): Clothing = Tshirt_WhiteLongSleeveTINT | blood clothing type = [ShirtLongSleeves] | blood level = 0
ETW Logger | bloodiedClothesLevel(): Clothing = Shirt_FormalTINT | blood clothing type = [ShirtLongSleeves] | blood level = 5.9943976402282715
ETW Logger | bloodiedClothesLevel(): Clothing = Socks_Ankle | blood clothing type = [Shoes] | blood level = 0
ETW Logger | bloodiedClothesLevel(): Clothing = Shoes_Strapped | blood clothing type = [Shoes] | blood level = 0
ETW Logger | bloodiedClothesLevel(): Clothing = Skirt_Normal | blood clothing type = [Trousers] | blood level = 4.392157077789307
ETW Logger | bloodiedClothesLevel(): avg = 0.04149393240610758
bright fog
dull moss
#

there's also return

bronze yoke
#

and @NODISCARD

dull moss
#

and @cast

#

surprised there's no @param

#

and @class

bright fog
#

What the hell adds that ???

dull moss
#

vscode

bronze yoke
#

i can't remember which extension does that, i've since removed it ๐Ÿ˜…

willow tulip
mental bane
dull moss
shy mantle
dull moss
#

classified information PepeLaugh

shy mantle
#

I ask because I had something like that happen, but it was more of a shadow ban than an outright removal lol

willow tulip
#

I assume either paranoia over the recent exploit, or people reported it beause PZ updated from B42.13 to B42.14 and they didn't realize to delete the zombie folder and reinstall all java mods, like they have to do every update.

#

(Once again.. I ask the developers to please delete zombie\ folder as a part of the update script.. or first launch after update)

#

since its about a 99% chance java mods will be out of date and require reinstall

bright fog
willow tulip
mellow frigate
#

about the Linux servers/case sensitivity problem, if there are any knowers around, can you comment on the following proposition ? If it is a good initiative, maybe they should make a guide of it that may survive longer than a soon to be burried discussion. here is the link, I just read it because it was posted on my workshop but I do not know if this is reliable or not. https://steamcommunity.com/workshop/discussions/18446744073709551615/806844795448264974/?appid=108600

bleak remnant
#

dude

#

i am having a hell of a time porting my mod to multiplayer

#

everything broke

#

and i barerly can make something work properly there

#

how does this even work?

#

is there a documentation i can read?

#

i am doing everything that i can to use triggers to infect the player

#

and the server is like... nah

#

the debug doesn't work, that makes the experience of developing a mod so much worse

#

how do you guys manage that?

paper ibex
#

Just read the pin; there is some useful info.

paper ibex
#

How about using JSON Schema to generate a .txt script on the fly?

paper ibex
willow tulip
bleak remnant
#

i mean, you cannot skip time or change player stats still

#

it put you on god mode

willow tulip
#

I was majorly pissed at trying to port stuff to MP (for the same reason as you) before I figured that out -_-

willow tulip
#

dunno about skip time

bleak remnant
#

like... do you port mods right?

#

what kind of mods

willow tulip
bleak remnant
#

i am having problems with player:bodydamage

willow tulip
#

Yea. so first off, are you sure your code is executing server side?

#

do note: the client runs every .lua file in \server\ too because... reasons

bleak remnant
#

i know, it is running on shared

willow tulip
#

K so your doing a timed action?

bleak remnant
#

it is weird, some stuff works and other don't

bleak remnant
willow tulip
bleak remnant
#

a lot of things actually

willow tulip
#

would some code to cut yourself help? lol

#
       local bodyPart = self.character:getBodyDamage():getBodyPart(BodyPartType.Hand_L)
        -- bodyPart:SetScratchedWeapon(true) -- Likely best for light wounds.
        -- bodyPart:setScratched(true, true)
        bodyPart:setCut(true)
        self.character:playerVoiceSound("PainFromGlassCut")
        -- bodyPart:generateDeepWound(); also an option. 
        syncBodyPart(bodyPart, BodyPartSyncPacket.BD_Health)
``` if you run that in a timed action *complete()* it will run server side and work
bleak remnant
#

wait

#

i will send one piece of it here

#

wait a second

willow tulip
#

"Plz be careful with cut yourself code to avoid cutting yourself on it"

bleak remnant
#

before i do it, i am aware that you need to put some special characters to deliver the code like you did right

willow tulip
#

yes three `

#

then lua, and three more ` when your done

bleak remnant
#

shit

#

wait

#

it always send a text file

#

wtf lol

#

yeah

#

i am too stupid for that

covert ermine
#

Atleast you can mof

#

Mod

bleak remnant
#

but, i guess you can get what i mean by that

bleak remnant
#

As i was saying, that is in shared

#

it makes the player infected when you drink tainted water

#

and my code is filled with that kind of stuff

covert ermine
#

I'm not asking a bitch ass clanker to do my work

willow tulip
#

so, setInfected(true) is where your having problems

willow tulip
#

also you can post just a function next time but yea.

bleak remnant
bleak remnant
#

but tell me more about that

willow tulip
#

I only find that code in 1 location in vanilla

hoary cove
#

Looking to hire a dev for my PZ dedicated server.. is this the place to ask?

bleak remnant
#

it works fine on the client side, i tought i was having problems because of player id

willow tulip
#

are you trying to set zombie infection or regular?

bleak remnant
#

zombie infection

#

my mod have all sort of stuff to infect you

willow tulip
#

WHY THE HELL CAN BANDAGES BE INFECTED WITH ZOMBIE INFECTION!?!?!

bleak remnant
#

so everything related is broke

willow tulip
#
 if self.doIt then
        local bandageLife = ZombRandFloat((self.doctorLevel + 1) * 0.5, (self.doctorLevel + 1) * 1.0) + self.item:getBandagePower();
        if string.match(self.item:getType(), "Dirty") then
            bandageLife = 0;
        end
        if self.bodyPart:isGetBandageXp() and bandageLife > 0 then
            addXp(self.character, Perks.Doctor, 5);
        end
        self.otherPlayer:getBodyDamage():SetBandaged(self.bodyPart:getIndex(), true, bandageLife, self.item:isAlcoholic(), self.item:getModule() .. "." .. self.item:getType());
        self.character:getInventory():Remove(self.item);
        if isServer() then
            sendRemoveItemFromContainer(self.character:getInventory(), self.item);
        end

        if self.item:isInfected() then
            self.bodyPart:SetInfected(true);
        end
    else
bleak remnant
#

what do you mean?

willow tulip
#

shakes head at code

#

        if self.item:isInfected() then
            self.bodyPart:SetInfected(true);
        end
#

anyway you sure SetInfected causes zombie infection?

#

PS, after calling SetInfected it calls:

#
-- This number is syncParam, flags are:
    -- BD_Bandaged + BD_bleeding + BD_IsInfected + BD_bitten + BD_cut + BD_alcoholicBandage + BD_stitched + BD_deepWounded
    -- BD_bandageType + BD_getBandageXp + BD_bandageLife + corresponding _Time flags
    syncBodyPart(self.bodyPart, 0xc001966b8e);
#

so your likely missing a syncBodyPart() call for MP

bleak remnant
#

that

#

exaclty that

willow tulip
#

I would also question if SetInfected() does what you want.

bleak remnant
#

it does

#

on sp

willow tulip
#

are you sure it gives you a zombie infection in SP?

bleak remnant
#

it does

willow tulip
#

Weird.

shy mantle
#

replace that silly number and letter combo with BodyPartSyncPacket.BD_Health

bleak remnant
#

this code is supossed to infect you by drinking water i guess

willow tulip
#

Wrappers.checkbox("Is Infected", player.getBodyDamage()::IsInfected, player.getBodyDamage()::setInfected);

#

@bronze yoke what kinda syntax is that?

#

Iv never seen :: before

shy mantle
bronze yoke
#

it's certainly not lua syntax ๐Ÿ˜…

willow tulip
#

I still don't understand it

bronze yoke
#

oh yeah you have to use :: to reference a method directly

willow tulip
#

ah k

bleak remnant
#

i gotta warn you first

willow tulip
#
        this.zombieInfected = infected;
    }
#

yep somehow zombie infected bandages exist

bleak remnant
#

this code is my attemp to make it work on mp. i was asking chat gpt to help with it but as you can see

willow tulip
#

@bronze yoke did you know of this? I think I just found a new way to troll people.

bleak remnant
#

it is filled with nonsense

shy mantle
willow tulip
bronze yoke
#

i had no clue

shy mantle
#

oh nvm then lol

willow tulip
#

bandages with isInfected() true will infect you with zombie virus if you apply them to yourself (seems to be skipped if other people apply them to you?0

bronze yoke
#

has that always been a thing that seems insane

bleak remnant
#

ok... can you explain to me what is going on?

bronze yoke
#

i don't think that's even in line with the lore

willow tulip
#

but there is totally a mechanism for zombie infecting people with zombie infection bandages

#

function ISApplyBandage:complete()

#
            self.bodyPart:SetInfected(true);
        end```
shy mantle
bleak remnant
#

oh thanks

willow tulip
#

no wait.. when anyone applies a bandage?

bleak remnant
#

ok, i have one last thing about it to ask

#

and this one is very weird

#

so

willow tulip
#

lame you only get first aid XP from applying clean bandages

bleak remnant
#

lets just say that i have a menu that saves information in the game data

#

every time i leave the game and join it again it reads this data in sp

#

making every world have it's own information

willow tulip
shy mantle
bleak remnant
#

of course this doesn't work on mp

#

is the way the mp save data different from sp?

shy mantle
#

Do it on the server is usually the answer to most of these questions lol

bleak remnant
#

ok, let me try fix my problem with the solution you gave me, thanks btw

willow tulip
bleak remnant
#

also, that is a good idea

willow tulip
bleak remnant
#

in my code?

willow tulip
#

no

bleak remnant
#

ok

willow tulip
#

I mean you could make it triggerable in a mod, but its vanilla code.

bleak remnant
#

dam...

willow tulip
#

items with item:setInfected(true); called on them will give the player zombie infection if he uses them as a bandage

bleak remnant
#

yeah, i mean, probably the devs was trying to make something like, zombie blood

willow tulip
#

But there is no code in the game that calls item:setInfected(true)

bleak remnant
#

it seems very stupid to use a bandage from a zombie cloth tho

willow tulip
bleak remnant
#

yeah. That is the thing, probably they were cooking something with it

#

belive it or not

willow tulip
#

Turns out zombie virus was never airborn, people where just reallllyyyy stupid and kept using zombie brand bandages.

bleak remnant
#

but i have the same problem with my mod

#

in my mod, if you get yourself covered in blood

#

you get infected

#

but here is the thing

#

if you butcher an animal

#

you also get yourself covered in blood

#

and eventually gets infected as well

#

and there is nothing i can do

willow tulip
#

yea, you can reduce the amount by using the butcher hook and draining the blood first

#

you can also make it require a certain amount of time past <blood limit> to get infected, so they could wash themselves ASAP

bleak remnant
#

it does

willow tulip
#

Guess in your mod animals are carriers too ๐Ÿ˜›

bleak remnant
#

but still, a don't think it would take that long to infect you in real life if you have zombie blood on you

willow tulip
#

shrugs

bleak remnant
#

and when i tried to fix it

#

i figured out that it is in the java files

willow tulip
#

doh

bleak remnant
#

and you cannot just mod it

#

there is why there is no mod that makes the rain water clean

#

if you wanted to make that change you would have to make a custom java files that directly changes how the game work

#

because the lua file isn't enogh

shy mantle
#

Speaking of, has anyone seen how washing machines work?

bleak remnant
#

no, i haven't

bleak remnant
shy mantle
bleak remnant
#

Bro, it is 1 am. Can i add you to my friend and text you directly? I am about to go to sleep

#

But if you are curious

#

That is my mod

shy mantle
bleak remnant
#

Oh, ok. Then i will share how it work when i wake up. Thanks for your help.

dull moss
#

You hook onto butchering, and before you butcher you check how bloodied the character is. Then after butchering you check again. You save the delta and in your % to get infected calculations you subtract it.

#

This way you ignore blood from animals

willow tulip
#

I feel like they would end up at max blood and then immune to zombie blooding though

#

Honestly I kinda like the concept of butcher better wash himself after ๐Ÿ˜›

dull moss
#

Decay the delta over time

willow tulip
#

You could maybe give him extra time before infection if hes butchered an animal?

willow tulip
#

thats fine then

#

He still would have to clean himself, but he'd have a nice grace window

#

'animal blood is mildly infectious' (also butchery hopefully causes less chance of scratches and stuff than combat)

#

Honestly just kinda annoyed how cleaning yourself has no real purpose in PZ, we need more mods that make it a thing you gotta do for whatever reason

dull moss
#

I good bloodlust perk that actually makes you happier when you're covered in blood KekW

willow tulip
#

its a super cool feature how much graphical work went into it, scratches, bandages, etc and most players just get totally filthy and ignore it forever more ๐Ÿ™

dull moss
#

Honestly considering how easy it is to grab bloodiness and filthiness it ain't hard to make it affect wounds, mental, etc

bronze yoke
#

the main thing with it is you get bloody so easily i don't know how fun it is to punish it in a serious way

#

the hemophobic trait is awfullll

dull moss
#

Realism for the sake of realism ๐Ÿ’€

vast pier
#

is bloodiness tied to body locations ?

dull moss
#

I know clothes have it

#

Body parts probably too or whatever

#

Haven't looked into pz anatomy and how body parts and etc are coded

bronze yoke
#

no, blood locations

#

body locations don't really do anything except be equipment slots

#

pretty much everything else is handled by blood locations

dull moss
#

Don't remember how I did it since it didn't break with 42.13

#

So I just left it be

vast pier
#

Well if blood locations are reliable enough, why not just have it only infect you if you have an open wound in the same spot while also not having clothing coverage in that spot

dull moss
#

Why would clothes protect you

#

Zombie blood can soak through clothes

vast pier
#

could base it off the insulation stat

#

of the clothing

#

Because imma so fr, why would blood soak through my leather jacket

#

it's leather

dull moss
#

Sweater has high insulation, ain't that waterproof

vast pier
#

hmm, what clothing stats are there

dull moss
#

Material

vast pier
#

oh lmao there's literally a water resistance stat

#

ez

dull moss
#

Oh ye lol that

#

I wanted to say that but I haven't played PZ in like a year so wasn't sure if I'm just coming up with clothes stats

vast pier
#

but yeah could just cross examine blood location with waterproof stat of clothing covering that area

#

I would imagine even clothing that soaks easily would provide at least a lil bit of protection from it

#

It also is just your own fault if you have an open wound and get blood on it

dull moss
#

I wouldn't make it gradual, I'd make it 0/1

#

If your blood level % on a body part is less that water protection on that part you are fine

#

If above you get infected

vast pier
#

Only if there's an open wound, right ?

dull moss
#

Ye ofc

vast pier
#

I don't think blood can soak through skin

#

well, unless you count sweat lmao

willow tulip
vast pier
#

if you didn't know, sweat is just filtered blood

willow tulip
#

because then its like, you go out, get all bloody, come home, clean up, cook, do stuff, sleep, repeat.

vast pier
#

Ah, plan to make it so preparing food while bloody/dirty adds a chance for food poisoning ?

#

I like mechanics like that

vast pier
#

Realism mechanics that have gameplay purpose other than just making gameplay tedious

#

Food poisoning would help flesh out an otherwise very overlooked part of the game

willow tulip
vast pier
#

I can't remember the last time I actually cared what my character ate other than calorie count

#

It's such a non-issue in vanilla

dull moss
#

What stuff

willow tulip
#

Fear my UI skills! they are almost actually decent!

#

-_-

vast pier
#

I will admit, I don't want like,,,, having to track food pyramid stuff

#

I used to make minecraft modpack stuff with a focus of difficulty through mechanics, but having to spread your food focus just felt tedious

willow tulip
#

high carbo gives a small endurance regen boost, low carbo gives a small malus....

#

and fat being high/low changes body weight.. but needs a few tweaks still

vast pier
willow tulip
vast pier
#

Just like real food poisoning

#

it's only deadly if you're ill prepared

willow tulip
#

ie, pooping needs, lost of hydration, loss of calories (puking), endurance malus, etc.

#

yea, if you can sit at home in your base you'll be 100% fine

vast pier
#

I'mma be so real, I don't think zomboid needs bathroom mechanics

willow tulip
#

no matter how bad it is.

bronze yoke
willow tulip
vast pier
#

Unless you plan to like, make the game time 1:1 irl time I can't imagine it would be anything but tedium

willow tulip
#

But yea iv honestly never cared for those mods

#

It only made any sense to me once it could become something linked to food poisoning

vast pier
#

it's primarily triggered from drinking beer, so it's a non issue and never annoyed me

willow tulip
#

and even then, I feel its less about the act of the pooping (other then maybe leaving you vunerable?), and more about the loss of fluids that could become deadly

dull moss
#

Can't wait to shit myself in zomboid cuz I forgot to interact with a toilet for 3 days

willow tulip
vast pier
willow tulip
#

kABOOM. "This is how you died. forgot to poop"

vast pier
dull moss
#

Took me few sec to realize you didn't mean law enforcement

willow tulip
#

but at least nobody complains about it either so thats OK

vast pier
#

I may get back into making my minecraft modpacks at some point

#

I have this concept pack where a lot of stuff revolves around undead and demons.
This is important because it also uses a breath mechanic, going too high or too low in the world requires a rebreather or air tank.
Or going to the nether.
Which meant I had to go through every single undead/demon mob in the pack and mark them as not needing oxygen

willow tulip
#

I also think the whole ailment/poison system could be expanded with a few more counters.

vast pier
#

otherwise you have demons suffocating in hell

willow tulip
#

Like, a poison that limits your max HP like being overencumbered does.

vast pier
willow tulip
#

poison that causes hydration loss, poison that causes calorie loss (With maybe double whammy of slow hunger loss meaning your not likely to eat enough calories unless you remember and force yourself to)

vast pier
#

I too eat burnt hamburger and die of food poisoning while my friend sits naked outside in -43F weather and doesn't freeze to death.

willow tulip
#

Poison that causes endurance regen loss or caps endurance level or something.

vast pier
#

It's as nature intended

vast pier
willow tulip
#

and as one does, I made a few mistakes here and there.

#

turns out that sitting in a -200c or +200c car does not kill you very fast at all, who knew.

vast pier
#

No because genuinely why is freezing to death not a thing, but death by burnt cabbage is

willow tulip
#

I mean it IS a thing IIRC, it just takes like... 20 hours?

vast pier
#

unless they changed it, hypothermia leaves you at 1hp :)

willow tulip
vast pier
willow tulip
#

rofl.

#

gotcha

#

Soooo.... Yeaaaaa....

vast pier
#

Also, even actual food poisoning isn't inherently deadly

#

so idk why zomboid food poisoning is guaranteed death

willow tulip
#

by show of hands, who here has eaten burnt things?

vast pier
#

I've had food poisoning like 3 times from worse things than a burnt bowl of macaroni

willow tulip
#

cause iv left 20 minute pizza in the oven for over a goddamn hour before and had to scrape the edible semi-carbonized cheese off the top to eat off the fully carbonized crust before.

#

mmmm semi-carbonized cheese...

vast pier
#

My grandma used to intentionally char her fried chicken because she liked the carbon taste

#

not like burn burn, just lightly carbonized

willow tulip
#

"This is how you died: a slight increase in your cancer risk killed you in 2 days"

vast pier
#

no literally

vast pier
#

she did happen to die to pancreatic cancer though

#

which is linked to burnt food consumption...

#

oops

#

granted this was over the course of like, 70ish years of eating burnt chicken

#

so definitely not as dangerous as zomboid makes it out to be

willow tulip
#

Gotcha, 953 burnt chickens = death

vast pier
#

I don't think the chickens would need to be burnt at that point

#

๐Ÿ˜ญ

willow tulip
#

Death.. by cholesterol!

#

imagine getting heart attacks in PZ and having to raid the pharmacy for drugs... and a book on what the hell the drugs do

#

imports creatures 3 organ/biochemical simulation into PZ

vast pier
willow tulip
#

"This is how you died.. you mixed up a diuretic with your high blood pressure medication"

vast pier
#

I remember someone making an overdose mod, which for some reason added suicide dialogue involving the character crying and stuff ?
I asked them about it and they hadn't considered the idea of someone being apathetic toward their own overdose, or simply being unaware of it

#

I don't know if they kept the dialogue or not, but I told them that my personal opinion is heavily in favor of not adding dialogue to the player ever if possible

#

I don't like it when I'm playing a sandbox survival game, and my character says something contradicting my own actions and thoughts

#

feels out of place

#

No hate to the creator ofc, I'm just very picky in my mod choices

willow tulip
vast pier
#

also it's a zombie apocalypse, why the hell are you speaking out loud to yourself

willow tulip
#

(plus the phrases where pretty lame and repeative lol)

vast pier
#

you're gonna get bit like that

willow tulip
#

it was just a cheapo way to give the player feedback without altering the item tooltips

vast pier
#

I feel like a moodle would've made more sense

willow tulip
#

you need to use a moodle framework because vanilla moodles are.. meh

vast pier
willow tulip
#

I guess.

#

Basically, it just caused boredom if you had eaten food with the same ingredient over and over

#

to prevent mono-cropping or just eating 1000 sunflower seeds or whatever.

#

it also had a quip (I forget if I had a bonus) upon eating something for the first time in like 2 weeks (if you haden't gotten sick of it at least)

vast pier
#

To an extent I understand that, but I have little issue with repetitive meals irl

willow tulip
#

but of course at the start of the game.. and a typical persons rando-diet before farming... everything is new. lol

willow tulip
vast pier
#

I also know that I would not care about this sort of thing personally.
When I was homeless for a few months, I was consistently eating the same things and did not care because of the mentality of taking what I have

#

I have no doubt I would have the same mentality in an apocalypse

willow tulip
#

some people liked it... but I felt boredom was such a mehh malus

#

unhappyness would have been better but never got around to adding that.

vast pier
#

Maybe nausea and unhappiness instead if you eat the same thing too many times in a row

#

I know a lot of people's bodies will start to reject food if their diet is too restricted

willow tulip
vast pier
#

Stuff like this is probably too complex irl to translate well into gameplay

willow tulip
#

Like, care a TINY bit about changing your food around

ivory plume
vast pier
willow tulip
#

not enough to really.. matter, but just enough so min/maxer goes "ok I'll use some of this and that and this" instead of just "day 432, still eating straight watermelon"

vast pier
#

However that's because they give you buffs for having food diversity instead of debuffs for a restricted diet

#

positive reinforcement

ivory plume
willow tulip
vast pier
ivory plume
vast pier
#

not health specifically

willow tulip
#

bake it into my nutrition mod where you get some bonuses to <something> for eating some varied foods

#

you can have other stuff, like strength/fitness XP bonuses, melee damage, health/endurance regen

vast pier
ivory plume
#

How will that work with the calorie system tho

vast pier
#

Well I would assume it wouldn't be directly tied to calories

#

as you can eat tons of calories but still get fatigued easily because of poor diet and vice versa

#

intermittent fasting is a good example of quality > quantity

willow tulip
#

where it uses carbo/protein/lipids instead of calories, and calories is basically hard set to 4x carbo

ivory plume
#

Also I feel Cooking would have to be overhauled for this

vast pier
#

that's

#

their mod

#

that's the point

#

raaaahhhh

ivory plume
#

Ah oki

willow tulip
vast pier
#

eats u

vast pier
#

chomp

willow tulip
#

Hes got the forbidden version, GET HIM!

#

/s

willow tulip
ivory plume
#

I dun wanna deal with having to troubleshoot mods if I update my save

willow tulip
ivory plume
ivory plume
#

Seems like it wouldnโ€™t be able to be added mid save tho

willow tulip
#

... why not?

ivory plume
#

Idk Iโ€™m new from vintage story. combat overhaul and a buncha overhaul mods there donโ€™t like saves

willow tulip
#

PZ is very good for adding mods mid-save

ivory plume
#

thanks

willow tulip
#

the biggest gotcha is mods that change items, anywhere you have been will have 'old' stats for items

#

the 'new' stat items only are found in unexplored areas

#

Also, if mods add an item, don't remove the mod without items all placed into containers or deleted. removed items on the ground turn into ? tiles and delete the whole tile -_-

#

that said, Realistic Cooking should be fine to add/remove mid game

#

'Refresh' can even be used to respawn items to the latest modset if your using mods that change items

#

PS: realistic butchery is still very beta so thats only for testing right now.

#

Please give feedback if you try realistic cooking ๐Ÿ˜‰

bright fog
bright fog
paper ibex
paper ibex
# bright fog Does it verify the folder names ?

No, the unifier template accepts any folder name (but the project and mod_id directory names are sanitized on creation by pzstudio).
Even if Build 51 changes the mod structure, PZ Studio still worksโ€”you just need to adjust the build process to match. (WIP)

bright fog
bright fog
#

I think it should verify the lower / uppercase

#

This is very unlikely to move across versions

#

It's a common source of problem

#

Be it the folders in media or the mod.info file being improperly cased

paper ibex
paper ibex
paper ibex
#

You can even use a JSON schema to manage ZedScript versions and ensure they remain backward compatible.

bright fog
#

ZedScripts handles the .txt files syntax itself

paper ibex
#

I think this idea will help, since you're already working on the ZedScripts extension.

paper ibex
bright fog
#

Something I'd like to do is make ZedScripts able to parse scripts and export in a json/yaml format the scripts

#

Same would be nice to import

dull moss
#

I know the performance impact on this is negligible but say I have this

local function OnZombieDeadETW(zombie)
    local player = getPlayer()
    traitsGainsBySkill(player, "kill")
end

where traitsGainsBySkill is a lot of if (one top-to-bottom run can easily get into 50+ ifs, it's a long func)
but the thing is as you probably can guess is that it fires on every zombie kill, right? And I'm kinda interested only in kills made by current player. So off the top of my head I was thinking I can check if zombie that died was attacked by player but dunno how reliable that is. Alternitively I was thinking maybe grabbing a distance between player and zombie ThinkNitro

or do I just ignore this? KekW thoughts?

#

yes i know that it's still lightweight considering no big calculations but yknow

solid quartz
#

Is there anyone I might be able to commission to make this Functional Great Kilt mod?

tight elm
#

You can post request on modding community discord

solid quartz
#

Thank you! And I have just done so, I appreciate ya tellin me ^^

modest arch
dull moss
#

i remember somewhere at the beginning b42 there was some info that mod ids now require to have workshopid/modid structure and it will be enforced later. did it get implemented? or am i giving my mod id id=2914075159/EvolvingTraitsWorld for no real reason, while everyone else are giving normal ids?

slow wind
#

I changed the settings of a sprite in my mod, how do I make the game read them and not the game's own settings?

tranquil kindle
tawdry light
#

Good afternoon, everyone. Well, I'm developing a mod to add some attachments and combinations for the VFE on b42.14. Specifically, I want to make the M4a1 and M16 the legendary SOPMOD version. However, when I try to create the items, I can equip them on the weapon, but their 3D models don't appear in the game. I've already checked the address in the script, etc. I have no idea what could be happening. If anyone could take a look at the mod and give me a diagnosis, I would be very happy. I haven't been able to solve this issue for a week now.

tranquil kindle
#

examples

solid quartz
#

I understand what you mean, at first this list was just meant for me as I was going to make the mod myself as I know exactly what I want, but after making this list I suddenly lost all motivation and it's been sitting in my files for almost a year. Only recently did someone point out I can pay someone to make it

dull moss
#

makes 2k word essay with mod specifics
loses motivation

#

classic

solid quartz
#

Yeah :)

paper ibex
#

Just make it simple; this is hard for me to read with that font

vast pier
#

Having it like this allows for the player to choose between longblunt/spear skill and have access to both tool's abilities
bayonet mode allows for spear fishing, spade mode allows for digging and removing ash

I will be adding in a quick-action method that quickly swaps to a melee mode for panic situations, while keeping the manual selection as seen in this photo

#

The quick-action will have a priority queue and will attempt them in this order:
ReadyBayonet > ReadyChopper > ReadySpade

vast pier
oak python
#

why does this still create a ghost item in mp (the code runs from server)

local item = instanceItem("myitem")
player:getInventory():AddItem(item)
sendAddItemToContainer(player:getInventory(), item)
#

it's executed by Events.OnCreatePlayer.Add(giveStartingItem)

bronze yoke
#

that's not a server event

willow tulip
#

Iv still no idea why...

willow tulip
#

Protip: isServer() = true if server, false in SP
isClient() true if client, false in SP

#

so generally you put something like:
if isClient() then return end at the top of your 'sp/server only' files

oak python
willow tulip
#

Not seeing anything for 'when client is done loading' server side

snow path
#

Couple of questions since Iโ€™m planning to create a mod for B41.

  • Are the animations for loading a rifle magazine and racking its bolt one or separate?
  • And can you increase the amount of ammo loaded in a gun with loose ammo (like shotguns and revolvers) instead of just one at a time?

Kind of want to do a semi-automatic shotgun mod for the JS2000. Not making an entire weapon, just a texture.

Increase MaxAmmo to like 9, set the script for rack after shot to False, and that probably leaves me with just making a new reload animation and a texture.

silent zealot
#

Don't change the JS2000, just make a new weapon that uses the same model.

#

Loading and racking are seperate animations. Some things are controlled by flags in the animation XML becing detected by lua stuff in the Action, so when you make a new weapon they may not trigger... but I don;t think that will apply here, the "rack after each shot" is controlled by RackAfterShoot = true,

tranquil kindle
#

Even without magazine

silent zealot
#

And yes you can increase the number of rounds loaded but you'll have to override a bunch of lua functions related to reloading and handle cases only having one round to load, handle not needing to load two rounds, etc

snow path
#

Alright, canโ€™t have everything. The loading 2 rounds part. Thatโ€™s alright with me.

And how do you make like the โ€œrequired itemโ€ in the workshop thing?

Bit ambitious for a first mod, but kind of want to do one animation for reloading the JS and the modded shotgun while standing up and another while in sneak mode with the True Crouch mod.

silent zealot
#

Also, why would you need a new reload animation? There are animations for loading round-by-round, and animations for reloading a magazine... Onless you're going for an accurate street sweeper I don;t know what else you'd need for a semi-auto shotgun

silent zealot
silent zealot
#

How would the animation differ from the normal reload?

#

I definitely suggest starting without the animation, because animations in zomboid are not very straightforward to deal with.

snow path
#

Actually, I could only have like one animation for standing up and in sneak.

Place shotgun stock on right shoulder, gun tilted on its side, loading port facing outward.

Left hand holds the pump, right hand loads rounds one by one.

snow path
stuck tapir
#

Well, I've asked a few times in the mapping area, but it's a little more quiet over there and seemingly no one has the answer, so I will appeal to this side once again for help. How can you get custom tiles to show up in the tile picker? I am able to force the sprite into existence through a hokey script (I get a 'invalid spriteconfig object' error every time), but it does not appear in the tile picker itself. Any ideas?

bronze yoke
#

if your tile is set up correctly it should just be there, it's not something you're meant to have to do something special for

#

i assume you have a tiledef

stuck tapir
#

I do.

stuck tapir
#

I can't imagine it's important, but one thing I've noticed when working with the tilesheet in TileZed is that the gid of the sprites are 1000 and on. Other packs I have examined for clues all seem to have much higher, less consistent gids. Are the gids an important aspect of how the game references the tiles or should I not be concerned with this?

buoyant violet
#

but blendering and animation for me its not my best friend lol

#

I got the perfect shotgun models to make that anim

#

if I only had the skills drunk

upbeat harness
#

How do I display a character's name in more than one word? This code takes the player's full first and last name, but outputs it as one word.
local m3 = getPlayer():getUsername()
print(m3)
result - AgentSmith
need - Agent Smith

paper ibex
#

doesn't getUsername() return the account username and not the character name?

silent zealot
#

You can use gatPlayer():getDisplayNAme()

#

But... only if your character is called Bob.

#

OK, got it. Short version: p=getPlayer();print(p:getDescriptor():getForename().." "..p:getDescriptor():getSurname())

Long Version: since we know the characters full name is displayed in the character info screen, I looked in ISCharacterScreen.lua to see how they did it.

vast pier
#

If you saw my message.
No you didnโ€™t.

slow wind
#

If anyone can help, I'd appreciate it.

Where are the sprites for the buildings located?

Like the wooden boxes and things like that.

silent zealot
#

I think "tilesheet" is the term you want to search for, but I've never actually tried to track them down

silent zealot
#

This is what I will one day force myself to learn animations to make: a "Mares Leg" cutdown rifle that fits into a holster instead of using a long weapon attachment slot.

#

I try to only make weapons that are offering something different from the many existing guns.

#

But I need the lever action racking animation, and I don't want to just steal that from someone else's mod.

covert ermine
#

as a placeholder though

silent zealot
#

I know, but I still need to make the animation/find one I can use without stealing before I can complete the mod.

covert ermine
#

I could try and cook something up in blender but i suck at animating + i can't promise anything

#

i also dont know how to mod.. so it'd just be a .blend file

silent zealot
#

Thanks, but I'll get around to it one day.. in theory it's a very simple animation, the hard part will be learning how to actually make a zomboid animation.

#

I should also message the author of the modpack I saw teh lever reload animation in to ask if I can use theirs.

#

(Not Rain, one of the other modpacks with lever reload... I don't want to be crediting Rain on my mod after recent events lol)

covert ermine
#

what'd rain do?? i'm not filled in on the mod dev lore </3

willow tulip
covert ermine
#

...ok

slow wind
willow tulip
#

the tile definition.txt file?

#

media\newtiledefinitions.tiles.txt

#
    // carpentry_01_16
    tile
    {
        xy = 0,2
        BlocksPlacement = 
        CanScrap = 
        ContainerCapacity = 60
        ContainerPosition = Low
        CustomName = Crate
        IsLow = 
        IsMoveAble = 
        IsPaintable = 
        IsStackable = 
        IsTable = 
        Material = Wood
        Material2 = Nails
        PaintingType = crates
        PickUpWeight = 75
        SnowTile = object_snow_overlay_01_184
        Surface = 32
        container = crate
        solidtrans = 
    }
#

this code in particular.

#

theres 4 files that reference carpentry_01_16

vast pier
#

Also just wanna say, I was worried that the shovel head would look weirdly big on the gun

#

and then

#

I remembered what the vanilla spade looks like

silent zealot
#

Thanks!

tranquil kindle
#

The last of guns remastered has lever action

silent zealot
#

Was just looking though your mods to find it.. I gured the G11 probably wasn't what I was after ๐Ÿ˜›

#

Very much appreciated... now I just need to make the Everything Else. ๐Ÿ˜›

tranquil kindle
#

But... I made it for Rainmaker before her tantrum

silent zealot
#

And what a tantrum it was!

#

I like that the Zomboid Modding community is mostly drama free.

#

Compared to what I remember from playing modded minecraft, this is utopia.

tranquil kindle
#

I think I might be able to recover them

#

The one with flipping

silent zealot
#

Nice if you can, if not the proper level action racking is the important bit.

#

OK, I'm set up for a weekend with Blender to work on Both Mare's Leg and my latest stupid Idea: Vanilla Crowbars Expanded.

#

Crowbar with Rake. Crowbar with spike. Crowbar with Sawblade. Crowbar with Nails.

tranquil kindle
#

It's just racking

#

I have the anim file for it

#

Send it to you in DM. The default lever action anima you have to take from my older mod though

silent zealot
#

Thank you so much for that!

#

I can pull the lever action anim from that.

#

Now I can once again put off learning to animate in blender. Which is good, because just learning to make models that work in Zomboid was hard enough.

vast pier
tranquil kindle
#

The moment people would simply take all my assets without even asking and i'd notice it i wouldn't really be happy about it

vast pier
#

makes sense

#

what anims does the mod have anyway

#

I've never used it

tranquil kindle
#

Not many. I tried to work around vanila anims, but i really wanted lever action rifle so i made it. I didn't realy wanted to take it from someones mods so i decided to make my own

#

It has probably only Lever action anims and M4 like charging/racking where you pull the thingy

steady lagoon
#

Sorry folks, I'm reopening an old mod of mine, I forgot how to mod this game and I was doing some cleanup.
DO you know if my mods ClothingSelectionDefinitions.lua should contain a copy of all the original professions if I'm simply adding a new one?
Or can I remove all of them and simply have my new profession?

#

I'm now focusing on version 41 to keep it simple, as I need to get back the hang of it.

silent zealot
#

Your mods should never contain copies of vanilla stuff, they should just contain the new things that they add. If you modifiy a vanilla thing, modify it; don't duplicate it and change it, or you will conflict with other mods that change it/break when vanilla updates

#

Unless you're planning on playing B41 I'd suggest just going to B42, otherwise you'll re-learn how to mod and then have to re-learn again with all teh B42 changes.

steady lagoon
#

so I simply specify my new profession with
ClothingSelectionDefinitions.newprofession {}
without adding anything else?

#

obviously I add the custom equipment in the list

silent zealot
#

Sorry, I'm too deep in B42... completely different system for professions.

#

Also, don't have a file named Definitions\ClothingSelectionDefinitions.lua or it replaces the vanilla one - always use unique filenames unless it's one of the few things that need to use specific filenames.

sonic needle
#

i assume its this one

clear aurora
#

hey, im working on a challenge mod and after hours watching in the game archives and trying in VS i still have troubles to make it appear in the challenges list, i have a .lua which i want to get started with the challenge, thats all, but it seems so difficult for me, idk if someone can help me with maybe structure of the archive of maybe if i missing something

#

this is what i was able to make

snow path
sonic needle
snow path
#

Really like when shotguns in games have their barrel with the same length as the tube magazine.

tawdry light
#

Good morning, guys. I created a mod that adds 2 items to the game, however, they are invisible. If anyone could take a look at the structure to see if I made any mistakes, I would be grateful.

slow wind
#

Where can I open these .pack files?

buoyant violet
#

Having too much fun with different magazines for weapons.

You can recreate the patriot now from mgs3 heh

jagged fulcrum
dull moss
#

How can one grab a translation string from CharacterTrait?
neither getName() or toString() return translation string

#

Which is quite crippling if you have a table of CharacterTrait objects that you work with and you need to put them into UI

dull moss
#

oh right, ofc

#

trait is no longer a real CharacterTrait when you read it back from modData.

That error says exactly that:

expected argument of type CharacterTrait, got KahluaTableImpl

So this part assumes traitEntry[1] is a CharacterTrait, but what actually came out of modData is just a Lua table representation, not the original Java-backed object.

chatgpt waaaa

#

Wait but how come it works in other parts

#

im so confused

#

no wait but thats not true

#

because this works as intended

    modData.DelayedStartingTraitsFilled = modData.DelayedStartingTraitsFilled or false
    modData.DelayedTraits = modData.DelayedTraits or {}
    for i = #modData.DelayedTraits, 1, -1 do
        local entry = modData.DelayedTraits[i]
        if not instanceof(modData.DelayedTraits[i][1], "CharacterTrait") then
            print("ETW Logger | System: trait in modData.DelayedTraits at index " .. i .. " is not a CharacterTrait type, deleting it ...")
            table.remove(modData.DelayedTraits, i)
        end
    end
#

yea fuck knows im confused

bronze yoke
#

it will stay a charactertrait until the object has actually reloaded once

dull moss
#

so if i have a table in moddata with CharacterTrait objects it works until the character is reloaded or what?

bronze yoke
#

yeah

dull moss
#

fuck me

bronze yoke
#

but if you're not using it persistently there's not much reason to use mod data in the first place

dull moss
#

I have to redo so much shit rn

#

I do use it persistently, it's a system that gives player traits with delay after they earn them

#

fuck these registries, I used to use strings like a normal person, but no, now we got registries and I was like "oh cool, i'mma store objects"

#

jebaited by OOP

#

I need to rethink whole thing now how to make it work

#

can you add a trait to player based on its string?

#

or like how can one get from trait name to CharacterTrait object? ThinkNitro
Like if I registered a trait AV_CLUB = CharacterTrait.register("ETW:AVClub"), as example, is there a way to get CharacterTrait object from "ETW:AVClub"?

#

I don't see any fitting methods in any of these classes

bronze yoke
#

CharacterTrait.get(ResourceLocation.of("ETW:AVClub"))

#

be sure to nil check the result if using unknown strings

dull moss
#

ah I see, I tried CharacterTrait.get(ResourceLocation("ETW:AVClub")) xdd

#

Should've dig a bit deeper

dull moss
#

I really dont wanna do getText("UI_trait_" .. trait:getName())

#

because those are not consistent in base game

#

i guess another option is to build a map

bronze yoke
#

probably CharacterTraitDefinition.getCharacterTraitDefinition(characterTrait):getUIName()

dull moss
#

hmmm

#

I'll have to build a map either way since those are not gonna change at runtime anyway and it's a UI render so dont wanna do stuff there

#

ok, well at least now I know what I gotta fix. As always, you're the best pat big thanks

dull moss
#

hm

bronze yoke
#

i wouldn't stop you from optimising it that way because it probably will turn out slightly faster, but it is massively unnecessary in my opinion

dull moss
#

well it essentially becomes

CharacterTraitDefinition.getCharacterTraitDefinition(CharacterTrait.get(ResourceLocation.of(traitName))):getUIName())
#

that looks like a lotta calls

#

in ui render() function

#

is it still fine?

#

and I expect anywhere between 0-20 traits to require it (aka call that whole thing up to 15-20 times)

oak python
#

does my mod have to be public on steam workshop to be downloaded when my friends join my server or does unlisted/friendly only work

oak python
zealous summit
#

how hard it is to make mods in this game? I'd like a mod where I can feed zombie corpses to pigs (and after they eat it, their meat can't be consumed anymore)

pastel wolf
#

Has anyone else implemented the fluffy hair mod into their own mod? I have no idea how to change your hair type when equipping a helmet

pastel wolf
#

thank you

bright fog
#

I completely forgot that wiki page is a thing too

dull moss
#

@bronze yoke hey, sorry for direct ping but you were the one that said I don't need to do any wierd shenanigans when trying to hook onto consumeNicotine even though there are 2 methods with same name but different signature
https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/scripting/logic/RecipeCodeOnEat.html#consumeNicotine(zombie.inventory.types.DrainableComboItem,zombie.characters.IsoGameCharacter)
ThinkNitro

So I tried

local original_RecipeCodeOnEat_consumeNicotine = RecipeCodeOnEat.consumeNicotine
function RecipeCodeOnEat.consumeNicotine(item, character, percent, ...)
    ETWExportedFunctions.smokingAddictionMath(character)
    return original_RecipeCodeOnEat_consumeNicotine(item, character, percent, ...)
end

and

local original_RecipeCodeOnEat_consumeNicotine = RecipeCodeOnEat.consumeNicotine
function RecipeCodeOnEat.consumeNicotine(item, character)
    ETWExportedFunctions.smokingAddictionMath(character)
    original_RecipeCodeOnEat_consumeNicotine(item, character)
end

function RecipeCodeOnEat.consumeNicotine(item, character, percent)
    ETWExportedFunctions.smokingAddictionMath(character)
    original_RecipeCodeOnEat_consumeNicotine(item, character, percent)
end

and it works if I run a 2-arg method (aka smoke a singular cigarette, for example)
but if i run a 3-ard func (for example, smoking a cigarette from a pack of cigarettes without taking it out first) it crashes

ERROR: General      f:1387, t:1772845696366> ExceptionLogger.logException> Exception thrown
    java.lang.RuntimeException: No implementation found for function: consumeNicotine(class zombie.inventory.types.DrainableComboItem Base.CigarettePack:zombie.inventory.types.DrainableComboItem@770812c3, class zombie.characters.IsoPlayer IsoPlayer{  Name:null,  ID:134 }, null null)) at MultiLuaJavaInvoker.call(MultiLuaJavaInvoker.java:113).

Any ideas? flushge

#

2nd doesnt even make sense cuz i overwrite first def

#

but hey I tried

bronze yoke
#

basically, when you call RecipeCodeOnEat.consumeNicotine(item, character, nil), there is no implementation that can accept nil as the last argument -- it's not like lua where nil is the same as not passing anything

dull moss
#

but they are named the same DESPAIR

bronze yoke
#

if you don't need the percent it is better to do this instead:```lua
local original_RecipeCodeOnEat_consumeNicotine = RecipeCodeOnEat.consumeNicotine
function RecipeCodeOnEat.consumeNicotine(item, character, ...)
ETWExportedFunctions.smokingAddictionMath(character)
return original_RecipeCodeOnEat_consumeNicotine(item, character, ...)
end

dull moss
bronze yoke
#

to lua, a java method with multiple implementation is really a magic box that decides which implementation to call based on the arguments it received

#

to it, nil is not the same as nothing, you need to pass nothing to get an implementation with less arguments

#

in a worst case scenario you might need an if tree like this:```lua
if percent then
original_RecipeCodeOnEat_consumeNicotine(item, character, percent)
else
original_RecipeCodeOnEat_consumeNicotine(item, character)
end

dull moss
bright fog
silent zealot
#

If you ever feel useless, just remember that someone was given the task of creating the sound of a crowbar breaking

willow tulip
#

"How... how do I even record that?"

#

proceeds to spend 2 years trying to break a crowbar

willow tulip
silent zealot
#

I'm looking forward to the release of your cooking mod.

#

BTW> loving realistic driving physics & project summer car combo.

pastel wolf
#

I love making cursed meals in zomboid so anything adding new ways to traumatize my buddies with my cooking makes me happy

silent zealot
#

Along with With No More Wiggly Vehicles to fix being slightly misaligned with the road, driving is much more fun.

willow tulip
willow tulip
pastel wolf
#

They still speak in hushed horrified tones about the six cheese stew....

silent zealot
willow tulip
silent zealot
silent zealot
# willow tulip yep

I'll check it out, I assume each mod in that pack can be activated seperately?

pastel wolf
#

Oh sure! It probably works great on a pizza! A stew is a different story

willow tulip
#

its just cause A: im too lazy to make proper release pages for em and B: mods do so much better when they are working properly on release

silent zealot
willow tulip
#

lol

#

yea, but thumbnails are hard -_-

silent zealot
#

I just go with a distinctive font (thanks Rimworld!) and whatever background image I think of (which will be AI generated occasionally)

#

Animated thumbnails are more work.

willow tulip
#

lickable batteries lol

silent zealot
#

"Authentic 1990s Battery Charge Detection"

willow tulip
#

A+ at dismantle any car btw.

silent zealot
#

F- at only being able to dismantle "wrecks" and not any other sort of car that may be in your way.

willow tulip
#

Yea

silent zealot
#

...I think my best mods all come from something in a game that annoyed me

willow tulip
#

lol yea

#

headlights are so dim, summer car added some brighter headlights/taillights for B42.14

#

kinda wanted to make the brightness dynamic with battery voltage and maybe flicker at low condition or something but couldn't be bothered lol

silent zealot
#

I like to take credit for TIS finally making it possible to adjust headlight brightness in LUA with my "High Beams" java mod. ๐Ÿ™‚

willow tulip
#

lol

silent zealot
#

Sometimes it feels like they look at popular mods and incorporate them into the game.

willow tulip
#

I hope so.

silent zealot
#

(they stole my "colored battery charge light" mod too!)

willow tulip
#

Glad some of the right click context menu of common sense got vanilla'ed.

#

(stuff like open and drink)

#

I hope some of realistic car physics gets vanilla'ed too.

silent zealot
#

yeah, we seem to have a decent balance of usability & spamming the context menu & performance now

#

God yes, the vanilla car physics is horrible and better car physics has been a thing for years because of that

willow tulip
#

we have a couple right click crafting recipes that seem common enough to make sense though

lost jay
#

can someone tell me how to import vehicle wheels? I would greatly appreciate it ๐Ÿ˜„ im new to blender so bare with me

knotty stone
#

file->import->fbx -> ProjectZomboid\media\models_X\WorldItems\Wheel.fbx

or what do you mean? ๐Ÿ˜„

silent zealot
#

Rough placeholders for Vanilla Crowbars Expanded.

buoyant violet
#

the Axe-16

buoyant violet
#

and underbarrels

tranquil kindle
#

Bro melee attacking zombies in next house

silent zealot
#

Can it mount an under-barrel toilet plunger?

buoyant violet
#

will be a framework. so you can mount anything

#

(if you want to do that in your mod lol)

buoyant violet
normal moth
#

Does it work for pistols?

buoyant violet
#

yeah it works with any item type for both bayonets and underbarrels

#

there will be instructions on how users to set up to properly register weapons with the system

silent zealot
#

Is it recursive? So I can have a 5.56mm rifle with a 12g shotgun with a 9m pistol with a bayonet?

buoyant violet
#

bruh

#

that would drive me insane haha

#

no its not possible that

#

while you can attach anything, is a system meant for underbarrel attachments

vast pier
#

You can attach stuff onto attachments

#

You would need to have the parent gun and attached gun be on different slots

#

And store all the relevant data on each attachment

#

This would be absolutely absurd to code though

#

I sorta want to just as proof of concept, but for my own mental health I really shouldnโ€™t

#

You would need to store so many values

#

And would definitely be a nightmare for debugging

vast pier
strong plover
#

Hello, how can I define a jerrycan as empty or full; With the B42, liquid containers are no longer managed with a condition.

buoyant violet
normal moth
buoyant violet
#

if I say Hello Spiffo bot reacts?

#

Hello

#

LETS GO

knotty zenith
#

hi

#

who can send me brita weapons zip please

bright fog
bright fog
#

When you download a mod, it downloads it locally

knotty zenith
#

wth man

knotty zenith
#

not on steam

bright fog
#

Why ?

#

You can already retrieve the files from the version you downloaded on Steam dude

bronze yoke
#

there's like a billion websites that mass upload steam workshop items for pirates, just go on one of those

bright fog
knotty zenith
#

GOG?

#

what s does mean

bright fog
#

Why do you not have Steam ?

knotty zenith
#

LOL

knotty zenith
bright fog
#

You cracked the game did you ? drunk

past radish
#

Hahahah

knotty zenith
#

LOLL

#

xD

bright fog
#

Why is my question so hard to answer then ?

#

If you don't have Steam and don't know what GOG is ?

knotty zenith
#

idk whats does mean GOG

bright fog
#

GOG is a plateform for games

#

Like Steam

knotty zenith
#

ohh

bright fog
#

Why don't you have Steam, why do need the mod files ?

past radish
#

Where did you get the game from is what he is asking

knotty zenith
#

uhh

#

i want the file

bright fog
#

My dude

#

If you cracked the game we don't give a shit

#

But stop being so dishonest here

knotty zenith
knotty zenith
knotty zenith
bright fog
#

Why do you not retrieve the files from Steam then ?

knotty zenith
#

ฤฐ js want only file zip

frank elbow
#

No one here is going to give you a .zip file of a mod

bright fog
#

Get it from the Workshop then

past radish
#

Just download the workshop item then

knotty zenith
#

yo yo wait

frank elbow
#

Because it's an odd request that no one is going to go out of their way to fulfill when that sort of thing, like albion said, exists anyway online. You pirated, no one cares, but that isn't everyone else's problem

knotty zenith
frank elbow
#

They're just files

knotty zenith
#

Oh

bright fog
knotty zenith
bright fog
#

if you transfer to a device that has the game, that device has Steam then

#

Same as your other device

knotty zenith
#

alr

#

thc

#

thx

tranquil kindle
#

Why does he have wiki editor role?

bronze yoke
#

i mean it's opt in, anyone can have it

willow tulip
#

lol at pirate trying to get mod authors to send mod zips.

sturdy silo
#

Hi, I've got a weird issue, so when editing stats in multiplayer with my mod it changes them to the amount and then immediately gets resets to what it used to be. It works just fine in singleplayer. It ends up just pulling the number around. It weirdly it works with some stats like stress, fatigue but other like endurance, panic it just freaks out. All code editing the stats resides in the server folder.

bronze yoke
#

your code is probably running on the client instead of the server

sturdy silo
#

Even if it runs in the server folder? I turn on the code (client side) with playerdata.TBFuryBuffs = true and then in the server side I use if playerdata.TBFuryBuffs then to decide if it should run the stat changes.

bronze yoke
#

the folder doesn't matter

#

the client runs every file in the server folder

sturdy silo
#

oh, I had a horrible misunderstanding then. Thank you

willow tulip
willow tulip
#

(Whatever playerdata might be)

#

(Basically no changes made to anything client side will ever replicate to the server, and changes made on the server almost always need a corresponding 'sendchangedthingy' call afterwards

sturdy silo
#

I see, I'll give that a try here tomorrow. Thank you very much. I was going crazy trying to fix it.

rotund bobcat
#

anyone have any collections for b42 mp?

karmic knoll
#

Hey guys, I recently wanted to practice modding in this wonderful game. And I thought adding skis would be a very easy task. However, I ran into the problem that in order to implement sliding and animations, I need a new State for StateMachines. I tried for a long time to consult with chatgpt, but in the end, they gave me all sorts of crap advice. It all came down to me realizing that Lua doesn't have access to StateMachines, and I need to write a new State in Java, compile it into a class, and then I don't know what to do, because as I understand it, you can't just shove a new Java class into the game as a mod. Could you tell me if I'm going too far and should be going in a completely different direction?

silent zealot
#

Sometimes you come up with a cool idea, look at what is needed to implement it, and put that cool idea away on the this-will-never-happen pile.

#

Do not make a java mod unless you are really keen on the mod idea and OK with the ongoing commitment of keeping it updated with every patch.

karmic knoll
silent zealot
#

Or you come up with a very different way of doing things; can skis work the way the skateboard mod does?

#

(You don't need to modify projectzomboid.jar, you can put compiled java files into the zombie folder and they will take preceidence over the ones in the jar.)

karmic knoll
silent zealot
#

Good luck!

#

Anyone got any ideas on what is happening here: I made 6 weapons. Every model definition has the exact same attachment world and attachment Bip01_Prop2 values. Every model is oriented the same way in blender. Every model has the same transformations applied/set in blender. They all work correctly when on the players back or equipped in hands.

But when placed on the ground, the Railspikebar (bottom in image) always defaults to pointing up, while the other five default to proper lay-on-sided orientation.

I can probably fix this by messing with the world attachment rotations, but... why would this one behave differently to others, and only when placed on the ground?

#

Solved: something about model attachments/orientation get stored in the save file, so if I start a new game instead of loading the testing save the weapons all behave consistently.

vast pier
silent zealot
#

Hahaha

#

Time for a break, I sat down to do a quick 15 minutes edit to a file and that was 8 hours ago.

#

Also; any other suggestions for new crowbar based improvised weaponry? Right now I have: with bolts, with hammerhead, with rake, with saw blade, with railspike, and sawnoff crowbar (that fits on your belt)

dull moss
#

Is it possible to wait few ticks somehow?

I have a func that manages setMaxWeightBase and setMaxWeightDelta and I wanna see whats player getMaxWeight after changing setMaxWeightBase so I know which delta I need to apply to reach desired weight. But problem is that while my func runs the engine will not update getMaxWeight. So I either need to queue a func that works with getMaxWeightDelta after I update base max weight or force engine to recalc max weight somehow

#

chatgpt player:getBodyDamage():Update()
actual W

steady lagoon
#

sorry folks, is there a documentation regarding porting b41 mods to b42?
Like a list of deprecated java functions and main differences, so to know how much I can keep and how much should I change.

dull moss
#

check pins

dull moss
#

Is there a way to force hijack function? I know it's not a good idea to do it and we shouldnt as it'd break compatibility with any other mod that tries to hook onto it, but I need it.

For example, I want to hijack setMaxWeightBase() so no other mod fires it (and if it fires I instead run my code), but I don't really see a way to do it? ThinkNitro because I still need base game func to run eventually, so if I do something like

original_func = IsoGameCharacter.setMaxWeightBase
local myfunc()
    --- something
    original_func(x)
end

function IsoGameCharacter.setMaxWeightBase(maxWeightBase)
    myfunc()
end

i got no way of guaranteeing that other mod is not running setMaxWeightBase before me, no? Which would mean that other mod changes are already saved in original_func

paper ibex
#

so your mod should load and hook it before others

dull moss
#

ye but i cant rely on users manually adjusting load order, also i havnt messed with load order in a while, i dont really rememebr how it works in pz. Is there a way to force my lua file run before others?

paper ibex
#

copy your mod into vanilla dir ProjectZomboid\media\lua

#

i have no idea how to prevent or restrict users from adjusting the load order

south karma
#

is there anything else i need to do to get custom ammo to work properly in b42, ive done all the stuff like registries.lua and adding the ammotypes to the weapons and mags but neither of them will recognize that i have the ammo in my inventory, even if i make the weapon load each bullet individually like a revolver

#

ive also looked at other mods and how they added their own custom ammo but i cant get mine to work

jolly thorn
# dull moss ye but i cant rely on users manually adjusting load order, also i havnt messed w...

it's hacky, but you can overwrite a vanilla file in your mod, like this:

-- contents\mods\test1\42.14\media\lua\client\ISUI\ISMouseDrag.lua

local earlier = print
print = function(...)
    earlier("[evil hijack]", ...)
end

-- override ^

ISMouseDrag = {}

ISMouseDrag.dragView = nil;

then another mod overrides the same function:

-- contents\mods\test2\42.14\media\lua\client\main.lua

local later = print
print = function(...)
    later("[random hijack]", ...)
end
print("hello")

an you get:

[evil hijack]    [random hijack]    hello

while the second mod loads first, overwritten vanilla file would be executed before mod files are

dull moss
#

oh ye i forgot about this

#

really dont wanna do this though tbh

#

cuz then i overwrite whole file yknow

jolly thorn
#

yeah, sure. But that's about all you can do afaik. The file I chose for the example contains only 2 lines of code, so if you use that or something similar, then chances are you won't need to worry about maintaining it. You only need an entry point, after all

gray rose
#

Sup guys

#

Where should start if i want to make my own mods?

honest ginkgo
#

Maps, models, additional features

gray rose
#

Like i can do some shi in blender but if its goes to coding im like little kitty on Metallica concert

gray rose
gray rose
honest ginkgo
#

afaik all zomboid mods with scripts are programmed in Lua

#

I learned Lua from years of development on Roblox, so you could try that as a base

gray rose
#

okay thanks, i heard lua is't too hard

honest ginkgo
vast pier
sterile spoke
#

How do i shorten animation so character can get up more quickly?

bright fog
#

Also that's really cool hahalol

sterile spoke
#

is there any updated guide how to convert .x files to fbx or some other format, edit animation and then convert back to .x ?

dull moss
sterile spoke
dull moss
#

to a modder

#

damn char limit sadeg

#
--- Example of how to register modifiers for the Unified Carry Weight Framework.
--- 1. Code is expected to be ran pn the client so your lua file gotta be in client folder as well.
--- 2. require the main framework lua file
require("UnifiedCarryWeightFramework")

--- You register your modifiers by calling the registration functions and passing in a definition table. The definition table must have an id field and a resolve function. The resolve function will be called with a context table that contains the player object and any other relevant information you may need to determine the modifier's effect. The resolve function should return a table with add and/or mult fields to indicate how much to add or multiply the carry weight by, or return nil if the modifier should not apply.

--- Example of a base modifier that adds to the base carry weight based on a sandbox setting
UnifiedCarryWeightFramework.registerBaseModifier({
    id = "SomeMod.SandboxSettingForBaseWeight", -- id is required. Try making it unique, for example YourMod.ModifierName, to avoid conflicts with other mods.

    resolve = function(ctx)
        --- 8 is default game base weight
        if SandboxVars.SomeMod.SandboxSettingForBaseWeight ~= 8 then
            return {
                add = SandboxVars.SomeMod.SandboxSettingForBaseWeight - 8,
            }
        end

        return nil
    end,
})

UnifiedCarryWeightFramework.registerMaxModifier({
    id = "SomeMod.AthleticGivesCarryWeight",

    resolve = function(ctx)
        local player = ctx.player -- context will always have getPlayer() object so you should access it from there.

        if player:HasTrait(CharacterTrait.ATHLETIC) then
            return {
                mult = 1.5,
            }
        end
        return nil
    end,
})
#
-- Framework by default calculates carry weight on character load and every hour afterwards. But what happens if you need to recalculate carry weight from your side? You can just call the recomputeAll function and pass in the player object, and it will recalculate carry weight applying all modifiers in the correct order.
-- For example, for sandbox setting you dont need to do anything, since adding modifier that depends on sandbox setting and calling recomputeAll on character load is enough
-- But lets say you want to give player extra 0.25 base weight per level of strength. So you want to hook onto LevelPerk for example. You gotta register recalculations on levelup.

UnifiedCarryWeightFramework.registerBaseModifier({
    id = "SomeMod.ExtraCarryWeightPerPointOfStrength",

    resolve = function(ctx)
        local player = ctx.player
        local strengthLevel = player:getPerkLevel(Perks.Strength)
        return {
            add = strengthLevel * 0.25,
        }
    end,
})

local function recomputeCarryWeight_LevelPerk(character, perk, level, increased)
    -- DO NOT put your logic here, all you have to do is call recomputeAll in here. The logic deciding how much to add or multiply should be in the resolve function of the modifier, and the framework will take care of calling it and applying the modifiers in the correct order.
    if character then
        UnifiedCarryWeightFramework.recomputeAll(character)
    end
end

Events.LevelPerk.Remove(recomputeCarryWeight_LevelPerk)
Events.LevelPerk.Add(recomputeCarryWeight_LevelPerk)
#
-- That's all you have to do.
-- !!!!!!!! VERY IMPORTANT !!!!!!!!!
-- You NEED to follow the convention of calling the function that fires on event recomputeCarryWeight_EVENTNAME. So if you want to recalculate carry weight for example on clothes change, it'd be called recomputeCarryWeight_OnClothingUpdated
-- Why? Because if some other mod also wants to do it, we don't want to run framework code twice, so thats why you also have to do this:
-- Events.LevelPerk.Remove(recomputeCarryWeight_LevelPerk)
-- Events.LevelPerk.Add(recomputeCarryWeight_LevelPerk)
-- First you unregister the event that might or might not be there. If it is there, you remove it so the framework code is not ran twice, and then you add your own function that calls recomputeAll, which will run the framework code once and apply all modifiers in the correct order. If you don't follow this convention, you might end up with carry weight being recalculated multiple times on the same event, which is inefficient. This is also why you don't put your logic for calculating how much to add or multiply in the event function, but rather in the resolve function of the modifier. Because it's meant to be unregistered by other mod and registered again.
#
-- Last example: say you have a mod that has a trait that gives player extra carry weight and they can get the trait midgame. Waiting 1h is not great, and increasing the frequency of recalculations is not needed. In this case you can just add modifier and call recomputeAll when the trait is added to the player.
UnifiedCarryWeightFramework.registerMaxModifier({
    id = "SomeMod.YourTraitModifier",

    resolve = function(ctx)
        local player = ctx.player -- context will always have getPlayer() object so you should access it from there.

        if player:HasTrait(YourRegistry.YourTrait) then
            return {
                add = 1,
                mult = 1.5,
            }
        end
        return nil
    end,
})

local function yourFunctionThatAddsTrait(player)
    if some_condition then
        player:getCharacterTraits():add(YourRegistry.YourTrait)
        UnifiedCarryWeightFramework.recomputeAll(player)
    end
end
#

is this file understandable to a modder?

#

or should I add some details?

#

on how to use a framework

silent zealot
#

(With a bit more work being needed if this is something that can happen twice overlapping )

dull moss
#

Ye I thought about it but really didnt wanna do that

#

Turns out I can just call Update on player

dull moss
#

I try to avoid onTick events like a plague

#

regardless if my logic is light or not

#

Just dont like the idea of running code every tick when It's not crucial

#

this is my only OnTick function and I still feel bad about it KekW

local function painTolerance()
    local player = getPlayer()
    local PainTolerance = player:hasTrait(ETWTraitsRegistry.PAIN_TOLERANCE)
    local stats = player:getStats()
    local pain = stats:get(CharacterStat.PAIN)
    if PainTolerance and pain > SBvars.PainToleranceThreshold then
        stats:set(CharacterStat.PAIN, SBvars.PainToleranceThreshold)
    end
end
silent zealot
# vast pier

I think some animations are still set to "hold a shovel prop in right hand" from B41 when there was only one item for each type. Other animations were updated to "when you find an item that satisfies hasTag(base:digahole) make a note of that and use that item as a prop"

silent zealot
dull moss
#

True

silent zealot
#

But it's good to hesitate and think before using it, because I've seen some mods really abuse it.

silent zealot
#

If so, that makes sense to me. I will suggest you have the API (well, more of a library, but the terms are rather smooshed together in LUA modding) end with return UnifiedCarryWeightFramework so it can either be called like your example as a global or use the better isolating syntax:

local weightAPI = require("UnifiedCarryWeightFramework")

weightAPI.registerBaseModifier(...
silent zealot
# dull moss this is my only OnTick function and I still feel bad about it <:KekW:71592110908...

Does that need to do the logic every tick, or can it just check every X ticks with a simple counter? You could also store the results of player:hasTrait in a lua variable and skip that API call, and just recheck on game start/character load. And finally, it can return as soon as you know the character does not have PainTolerance and skip the getstats and get(pain) calls when you know they won't be needed.

#

I'd also suggest making it trigger on PlayerUpdate rather than OnTick; that way you will know the player without looking it up (and if the player is not updated in a tick the function is skipped)

bleak remnant
#

dude, i am developing a mod, the thing is, o made it's code to multiplayer, ok... but it only runs the cliend side and not the server side

#

meaning i cannot do the conextion between client/server

dull moss
silent zealot
#

Multiplayer is a bit messy.... first question is what does the mod do and what triggers it doing something?

#

You might need to move the code and add some conditionals, or you might need to make an event system for communication.

silent zealot
dull moss
#

Ah

bleak remnant
#

i separated the code for the menu

#

so, it basically bring only the menu for the game... ok

#

so, i tried save the menu information like i do in single player, but ported for the multiplayer

#

separated what needed to be in client and server

#

OK

#

when i am in single player

#

the conextion between server and client happens as expected

#

in multiplayer in the other hand

#

no

#

only the client, i added prints to the log

#

cliend and server

#

to check

#

the server never answer back in multiplayer

#

only the client

#

i checked the server log

#

there is a weird error and the server never loads the mod, only the client

#

i checked everything i should

#

not even a fucking print from the server works

#

is there anything i am missing?

#

i wasted a week i could be working to fix stuff on my mod to make the multiplayer, and yet i am stuck with a simple error that doesn't allow the client/server connection

#

this is driving me crazy

silent zealot
#

First of all, I don;t know what the "Necroa Virus" is so I don't know what this mod does... but for this specific issue:

What menu is this? Are you talking about part of the settings (options -> mods, sandbox, etc) or an in-game menu that does stuff?

bleak remnant
#

no, it is a menu that i made up that saves information in the world data. let me send a picture

#

see that menu right there, those are icons that can be turn on and off. in the single player, i made a sistem that saves them when i left the world and go back, ok. in multiplayer i made a code that is correct when you campare with other mods that have multiplayer. ok, but the server never really reads it so it basically never saves, and yes, it is in server, not in client

silent zealot
#

If you have added an in-game menu then it will be running on the client, so how are you telling the server what it needs to know? In single player everything is smooshed together, but in multiplayer (including locally hosted) you need to actually send information to the server. isClient() is true only if the game is a client in multiplayer (it's false for single player) so expect code like:

if not isClient() then
  <whatever you do in single player>
else then
  local args = {}
  <fill args with the changed menu settings using on lua primatives, no fancy objects>
  sendClientCommand("Necroa", "menuUpdated", args)
end

Then on the server, you handle that client command:

Necroa_OnClientCommand = function(module, command, player, args)
  if module == "Necroa" then
    if command == "menuUpdated"
       <do the needful>
    end
end

Events.OnClientCommand.Add(Necroa_OnClientCommand)  
#

But the menu has to run on the client so the player can see it and interact with it. Then the results need to go to the server to get saved to the world.

#

(Note that the client/shared/server folders are misleading and don't actually control where code runs.)

bleak remnant
#

that is right, but the issue beggins when i cannot make the server do something as simple as print something

#

see this cute "print("[NecroaMod] SERVER SCRIPT LOADED")
if print then
print("[NecroaMod] ========== NecroaMod_Server.lua CARREGOU (servidor) ==========")
end"

#

i never see it in game

#

i do see it in single player

#

NEVER in multiplayer

silent zealot
#

Where are you looking for the output?

bleak remnant
#

console

silent zealot
#

in game console is for the client. console.txt is for the client. Look in coop-console.txt

bleak remnant
#

coop console?

#

the blue one?

silent zealot
#

It's a text file, it doesn;t have a color ๐Ÿ™‚

#

c:\users\<you>\Zomboid\coop-console.txt

#

console.txt is all you need for single player, but for multiplayer testing using "Host game" you want to look at coop-console.txt as well

#

If you're using a dedicated server for testing, I'm not sure where the equivilent output goes.

bleak remnant
#

yes, i host my game... so wait, the server never answer on that console? the one that you uses ' to open?

#

no fucking way

#

that explains so dam much

silent zealot
#

Yeah, the in-game lua console is client only when using hosted.

bleak remnant
#

now i see my prints... fuck of

#

off

silent zealot
#

For single player it's everything, because the game does not have proper client/server seperation.

#

hahaha

#

well, that's progress!

#

And my comment on SendClientCommand will help you get infor from client -> server