#mod_development

1 messages Β· Page 517 of 1

mint sphinx
#

it so easy to find them on steam o.o

opal wind
#

its doing great i got more than 100 outfits, dozens of weapons and such

mint sphinx
#

also the reason for the id name is that some mod might have the same name why it have an id

opal wind
#

it sucks man, no other plataform does that

#

curseforge is great; there is the mod, a download button, u do all manually

#

americans are so much lazy really... everything automatic and fast... in the end more glitch chances, mor confusion, more complains

#

i stick to good old manual settings, thank you

#

i want to download it, SEE where it goes, SEE the name, u know?

#

i want to put the mod there myself

mint sphinx
#

we have a saying at my work if you have to do a thing more then 3 times make a script or generator to do it for you.
so im use to do that kind of stuff as a software developer o.o
soo i do not really agree to it ^^

opal wind
#

thats totally different

#

no comparisson

mint sphinx
#

if i have to download and manuel install 30 mods or be able to sub to a mod so it download and install it automatic for me ?

opal wind
#

because you dont have control over it dude

#

God

royal stirrup
#

anyone know how to access the zombie models or textures?

zenith smelt
#

They are all in the workshop folder

drifting ore
#

Steam obviously has flaws but I'm all for the ease of use. What's the point of making a mod if only 50% of players know how to install it? You know what I mean

zenith smelt
opal wind
#

lol you guys cant be sirious... manually install a mod is just COPY & PASTE lol

zenith smelt
#

And then make a powershell script to convert them into correct folders and then use that for your server if yo uwant to avoid constant updates and restarts

opal wind
#

steam 'subscribe' system is a disgrace imo, idc if that makes me unpopular here

zenith smelt
#

Steam subscribe works

#

Your problem may be between the keyboard and the chair

opal wind
#

I DONT CARE, I DONT LIKE IT

drifting ore
#

Do you ever talk to people who don't know anything about computers? Find where the game is installed on steam is already complicated for them

#

I'm used to tedious complicated shit from learning COBOL

#

Quick and easy installs are a god send

#

Of course it's not complicated, but some people don't want to take the time

mint sphinx
drifting ore
opal wind
#

i dont understand this 'cattle' mentality of some people, its like when they find someone that dont agree with them, they HAVE to argue until the other agree with them queasy

#

like those Karens busting people balls over mask lol

drifting ore
#

So stop arguing and leave...

#

You do what you complain

opal wind
#

leave?? wtf u leave bruh

#

im not bother

drifting ore
#

Leave the argument...

opal wind
#

dont gert rude with me because i dont agree with u

#

its not bothering me at all

drifting ore
#

I'm rude ? Lol

opal wind
#

why should i leave?

#

yes u told me to fuck off

#

rude lol

olive zinc
#

i think its that your complaining and not giving any useful criticism that can be helpful

crisp fable
#

you're feeding a troll. block him and move on

opal wind
#

WOW

olive zinc
#

other than that who cares

opal wind
#

now im a troll? wtf ol

drifting ore
#

I told you to stop arguing if you don't like conversations...

opal wind
#

who said i dont like conversations?

#

did i curse u or something? wtf really

#

why i am a troll now??

#

i just cursed steam here

#

sounds like people get butt-hurt for Steam now... lmao

opal wind
frank elbow
#

Not even the modding channel is safe from arguments, huh

opal wind
#

i just told nothing can change my opinion

olive zinc
#

so i have the night sprinters mod in my server but i dont see any options for it. will it just work or do i also need it also enabled on my end too?

opal wind
drifting ore
frank elbow
opal wind
#

yes ok bounty, im not mad with u

olive zinc
#

oh there is a mod support thank you

zenith smelt
#

Oh my god

#

I was losing my mind

#

Jesus christ

#

Why is Events.OnClientCommand for events recieved from clients on the server

opal wind
#

this Kaldo person calls me a Troll then Block me so i cant even defend myself, what a coward snowflake little fruity

#

weakling

zenith smelt
#

That's so confusing

#

because server uses sendServerCommand to send events

frank elbow
#

Like I know you're upset but it's over, continuing it is doing no good

opal wind
#

ok im done now, sorry

zenith smelt
#

But it makes sense in another way, sendServerCommand sends from server to client and the client fires OnServerCommand because the server command fires

mint sphinx
olive zinc
#

also i asked yesterday but there are alot of people, any mod suggestions that make the game not just more challenging but more survival horror. i have danger zone fog horde, and scent of blood, with night sprinters, and pitch black nights that last 3 irl hours

#

any suggestions helps to scare the life out of my friends

drifting ore
#

Totally agree, the client/server name of functions/events is a mess xD

#

Client=server and server=client, wtf ?

zenith smelt
#

sendClientCommand CLIENT -> SERVER
sendServerCommand SERVER -> CLIENT(s)
OnClientCommand Runs on server when a command is received from a client
OnServerCommand Runs on client when a command is received from the server

quasi geode
#

its not really confusing, just slightly ambiguous. it should be read as
sendClientCommand = send command from client
OnClientCommand = on receiving command from client

#

lengthing it out to spell out the full thing becomes kinda excessive for naming schemes

zenith smelt
#

Anyone have a good idea what kind of perks, debufss and buffs to give players for taking a break after they die and giving them a boost after lets say 1 hour after they died

merry cedar
#

Hello everyone, I tried to make a test mod for clothes, threw everything into a folder, but the mod is not displayed when choosing mods. Someone knows how to fix this? Where can you read about it? Did according to the guide https://theindiestone.com/forums/index.php?/topic/37647-the-one-stop-shop-for-3d-modeling-from-blender-to-zomboid/ . And I even tried to throw the mod from the tutorial into the folder - the game does not see it either.

zenith smelt
#

And also folder name

merry cedar
zenith smelt
bitter frigate
#

i have no idea if that'll be the cause of your problem, but i was struggling trying to duplicate and move around stuff in the program files and it was just not showing up at all, which sounds exactly like what you're describing

merry cedar
opal wind
merry cedar
drifting ore
opal wind
#

you ever used blender before?

merry cedar
opal wind
#

you will start trying to do what; weapon, clothing? or something else

merry cedar
orchid notch
#

anyone know what "AcceptMediaType = 0," does?

merry cedar
opal wind
#

yeah im doing clothings atm πŸ™‚

merry cedar
opal wind
#

you could start by using just the PZ avatar

lyric jungle
#

any fun mods that'll randomize everything in the start?

#

sorry wrong mod chat

opal wind
#

like, copy the parts of the avatar you want to make, press Shift+D to duplicate, scale it a bit (press S then 105) then press P and separate the mesh

#

you can make all sorts of cloths like that

opal wind
merry cedar
opal wind
#

lots of stuff, its like 40Mb now lol

#

mostly outfits now

#

im doing robocop atm, its very random stuff

#

from old movies, cartoons, etc

#

that pic is old thou i changed some of those

#

but eveything on my mod you wont find spawning around the world; you need to buy them on the craft menu, with a simple trading system i did

bitter frigate
opal wind
#

haha thanks

long grove
#

can someone help me debug this?

#

not sure why it has a problem with DoZombieStats

#

its also in the Base game's VirtualZombieManager

bitter frigate
#

is there any immediately obvious reason why this recipe wouldn't show up in game?

    Syringe,
    keep InsulinVial,
    Result:InsulinSyringe,
    Category: General,
    NeedToBeLearn: false,
    }```
long grove
#

not sure if the last line should have a ,?

bitter frigate
#

if it's that simple im gonna flip my whole entire gord

#

let me check

long grove
#

prob not

orchid notch
# long grove

how do you even get to this screen lol (I am very new to modding PZ)

long grove
#

it is the debug menu

orchid notch
#

this is the only debug menu I am aware of just yet

long grove
#

oh yes well I am testing a mod and there was an error so this comes up. I think its F11?

azure rivet
#

Hello, I wonder if there is not a mod that applies the action of lying down on the ground apart from crouching?

bitter frigate
long grove
#

check the other recipes and try to spot the difference

#

probably add the comma back in then

bitter frigate
#

alright i'm having a much bigger problem. none of my new mod items & exactly 0 of my recipes are showing up

long grove
#

did u put the , back in that you removed?

drifting stump
#

The , should not matter

#

Can look into it in a bit

long grove
#

can someone tell me about DoZombieStats

bitter frigate
# drifting stump Can look into it in a bit

alright so i divided my recipes and items into two separate files like i saw some other modders do and i don't know HOW but most things are showing up now! one of my recipes still isn't showing up but im troubleshooting that

peak raven
#

Are your recipes under a custom module that imports base or is the file adding on to base? In my experience if somethings not working in a module move it to Base

delicate basin
# bitter frigate is there any immediately obvious reason why this recipe wouldn't show up in game...

Haven't done any modding in Project Zomboid as of yet. Only some pointers:

  1. I believe this is a JSON file. If so, you can always validate the syntax yourself by checking sources like https://jsonformatter.curiousconcept.com/#
  2. check if you can find any documentation about what properties are required
bitter frigate
peak raven
#

okay, this is going to sound stupid but try putting an extra blank line in between the recipe that isn't working and the ones that are working. put one on top and one on bottom.

bitter frigate
bitter frigate
mint sphinx
#

is there a original recipe xD

bitter frigate
#

    recipe Fill Sterile Syringe with Insulin    {
    EmptySyringe,
    keep InsulinVial,
    Result:InsulinSyringe,
    Category: General,
    Time: 50.0
    NeedToBeLearn: false
    }


    recipe Fill Used Syringe with Insulin    {
    UsedSyringe,
    keep InsulinVial,
    Result:USEDInsulinSyringe,
    Category: General,
    Time: 50.0
    NeedToBeLearn: false
    }
}``` 

the first recipe shows up just fine, the second one is nowhere to be found
#

the first recipe is what i was referring to as the original

mint sphinx
#

how was the other one made?

#

also where your syringe comming from ?

mint sphinx
rain pumice
#

I was gonna ask this too

#

Why is it base if you're adding a new recipe

bitter frigate
# mint sphinx also where your syringe comming from ?

i figured out ONE of the problems - i'm getting the items from another txt file in the script folder of my mod. that txt file has two variations of used syringe - i don't know if that's the problem but i'm figuring it out now

rain pumice
#

Ohh

mint sphinx
bitter frigate
bitter frigate
mint sphinx
#

can i see your item script ?

bitter frigate
# mint sphinx can i see your item script ?


    item InsulinVial    {
        Type         = Drainable,
        DisplayName  = Vial of Insulin,
        Icon         = InsulinVial,
        Weight       = 0.1,
        UseDelta     = 0.02
    }


    item UsedSyringe    {
        Type         = Normal,
        DisplayName  = Used Syringe,
        Icon         = UsedSyringe,
        Weight       = 0.05
    }


    item EmptySyringe    {
        Type         = Normal,
        DisplayName  = Syringe,
        Icon         = EmptySyringe,
        Weight       = 0.05
    }


    item InsulinSyringe    {
        Type         = Normal,
        DisplayName  = Insulin-Filled Syringe,
        Icon         = InsulinSyringe,
        Weight       = 0.15,
    ReplaceOnUse = UsedSyringe
    }


    item USEDInsulinSyringe    {
        Type         = Normal,
        DisplayName  = Insulin-Filled Syringe,
        Icon         = InsulinSyringe,
        Weight       = 0.15,
    ReplaceOnUse = UsedSyringe
    }
}```
mint sphinx
#

that script work right now ?

bitter frigate
#

ive been able to get everything to show up except USEDInsulinSyringe

rain pumice
#

I think you can't use dashes

#

Because lua

#

Try underscore

#

I'm not sure though I am also a beginner πŸ˜…

peak raven
#

Can you not get the Recipe to work or the Item itself?

mint sphinx
#
module MYFirstMod    {
    imports    {
    Base
    }


    item InsulinVial    {
        Type         = Drainable,
        DisplayName  = Vial of Insulin,
        Icon         = InsulinVial,
        Weight       = 0.1,
    UseDelta     = 0.02
    }


    item UsedSyringe    {
        Type         = Normal,
        DisplayName  = Used Syringe,
        Icon         = UsedSyringe,
        Weight       = 0.05
    }


    item EmptySyringe    {
        Type         = Normal,
        DisplayName  = Syringe,
        Icon         = EmptySyringe,
        Weight       = 0.05
    }


    item InsulinSyringe    {
        Type         = Normal,
        DisplayName  = Insulin-Filled Syringe,
        Icon         = InsulinSyringe,
        Weight       = 0.15,
    ReplaceOnUse = UsedSyringe
    }


    item USEDInsulinSyringe    {
        Type         = Normal,
        DisplayName  = Insulin-Filled Syringe,
        Icon         = InsulinSyringe,
        Weight       = 0.15,
    ReplaceOnUse = UsedSyringe
    }
}

but you have the same name for insulinsring and usedinsulisyringe o.o

#

look how i "importet the base

bitter frigate
#

yea yea when i had the base importing it wasn't working! i'm scared to add it back in

rain pumice
#

I know the dash thing might sound stupid but it's worth a try

peak raven
#

So the Item is busted or the recipe? This looks like we're messing with items

bitter frigate
#

i mean i could just do a space

rain pumice
#

The used syringe works or

bitter frigate
rain pumice
#

Also I don't think you need imports base

#

Because you are not referring to any items from the base game

#

Like if you were to use Base.Needle for example you'd need the imports

mint sphinx
#

i found all the items with my script hmm

bitter frigate
#

okay all the items work!

#

the recipe does NOT show up

#

but a recipe from the same file does???

mint sphinx
#

now lets try your recipes do you have the full script ?

bitter frigate
peak raven
#

alrighty try to put the recipes below the items in the same script. I can post my Sleeping Bag script if that would help you

rain pumice
#

Is this for a diabetic trait mod

bitter frigate
# rain pumice Is this for a diabetic trait mod

yup! i'm a type 1 diabetic and i think it would be a real challenge to try and manage insulin-dependent diabetes in the apocalypse. AND with the tools available to me in zomboid (moodles, namely) it's possible to mimic both hypo and hyperglycemia AS WELL AS ketoacidosis!

rain pumice
#

Are you planning to release the full mod to the workshop?

bitter frigate
# rain pumice Are you planning to release the full mod to the workshop?

EVENTUALLY yes, but there's a whole lot i have to learn before i'm anywhere near a release. i still have to learn how to create a blood sugar variable - that's my biggest hurdle right now. ive looked a lot at the "waste management" mods in the workshop since they essentially add a new need to the game and thats roughly what i'm trying to do with blood sugar!

rain pumice
#

I think the urination mod or the pooping one will help too

bitter frigate
mint sphinx
#

cant see the problem it work on mine

rain pumice
#

Ohh

#

Could it be conflicting with other mods???

mint sphinx
rain pumice
#

Try disabling every mod except yours @bitter frigate

mint sphinx
#

and they working

rain pumice
#

Also make sure you start a new game

#

Not continue an old one

bitter frigate
bitter frigate
mint sphinx
#

did you replace what you had ?

mint sphinx
bitter frigate
mint sphinx
#

the recipe was in the tab called "Mymod"

bitter frigate
#

oooh!!! okay okay i found them i found them!!

mint sphinx
#

you should be able to change it back to general

#

i did it just to see if the tap would pop up ^^

#

but im off to bed so have fun with you modding anger πŸ™‚

bitter frigate
#

thank ALL of you for all your help i'd've given up without yall

drifting stump
#

might be worth looking into making a program to create items

#

something with drop downs and spaces to type that would automatically output the file

weary matrix
bitter frigate
#

how would i write a recipe that requires [x] units of a drainable? i know usually you'd just add it to the ingredients line, but i worry doing [drainable]=12 will require 12 full drainables

cold burrow
#

Sooo. Will try to ask again.
How i could query all items with specific Type and SubCategory? Probably all guns.

And also. Do i get it right, to add one more context button to item i need to create a function with args - player, context, items.
Then get player, query items and create context inside function and in the end just pass to Event (i forget it name) like OnCreateContextForItem (i will find right name somewhere in mods)?

opal wind
weary matrix
#

still not sure why the character is falling from the ladder sometime though

#

but I guess that can be a funny challenge

bitter frigate
cold burrow
weary matrix
orchid notch
#

was fun texturing these, pulled details from both the tile & item sprites for each ones new WorldItem texture. They all use the same new 3D model though

bitter frigate
# orchid notch

they're VERY pretty! are they just for aesthetics or will they function differently?

orchid notch
#

they're like the vanilla radios now

#

it's the same vanilla walkies, just with added ability to not only tile place them, but WorldItem place as well

#

but just like the vanilla radios, they only function as a tile or held

#

I may end up restoring them appearing in the hand when held down the road

#

which should also open them up to being seen on belts as well

#

but all in time, this is mainly just for fun atm. A break from regular Gamedev

bitter frigate
#

makes sense! they're really nice looking in the meanwhile

orchid notch
#

thx! I do take pride in my texture work πŸ˜… , these are a lot different than my usual style. I enjoyed being able to paint more simply and then scale it down versus my usual PSX model Technique (which takes up just way too much time tbh lol)

#

eventually I'd love to make some guns for PZ

#

since I already do lowpoly weapons anyhow, just need to practice this simpler painting style

#

like my last model, made a M2 Carbine

#

probably could already fit right in to PZ with a small texture tweak

devout orbit
#

would there be a way to disable fair loot with a Mod? me and my bf see completly diffrent loot in the same house in MP and its kinda annoying

bitter frigate
#

SO as it is each syringe costs 1 unit of insulin to make, and makes one unit. this is wonderful. HOWEVER. a typical dose of insulin (for me) is about 8 units. i know i can create an 8 unit syringe; do i have to make an individual recipe for every amount i'd want?

bronze light
#

Do anyone know how to make a mod that makes so you can sleep whenever? Calling the mechanic β€œpower nap”. It is very annoying needing to wait for buddies in MP to get tired.

drifting ore
drifting ore
# weary matrix what do you mean?

If you attach the ladder to a building with a closed window, can you try to open it from below? It would be interesting to add something like that I think

weary matrix
#

I'm not creating any animation, just using the one from the game

drifting ore
#

You don't need to, just use the animation when you open the windows, but from the ground

#

Like that

umbral grove
#

Hey guys

#

I'm trying to configure my Brita's weapons pack

#

But there's always far too much ammo

#

Anyone have a good config that they could share for a hardcore pve survival setting?

rain pumice
#

In which file I can find the event for when you smash a zombie's head?

#

found it!

drifting ore
#

A full syringe is 8 units or however many

#

Then when you craft an insulin syringe it just fills the syringe more

bitter frigate
long grove
#

zomb: means its calling a java function right? Since its also in the Base game's VirtualZombieManager. I don't know what the actual error is, help plz?

craggy isle
#

Is there a mod where I can admin build with more than the standard metal and wood stuff?

#

like using some vanilla tiles and such

cold burrow
craggy isle
#

awsome thank you

long grove
#

Does anyone know how to search https://projectzomboid.com/modding/ to see which class a particular function belongs to? For example a mod I'm looking at seems to be using zomb:DoZombieStats() but I don't know where its defined? 😒

sweet drum
#

Where can i learn more about attachments?

bitter frigate
long grove
#

Ok yes from that article I can see from the line "In the IsoZombie class there is a method called "DoZombieStats". It is called by both the constructor and the load method." that it belongs to the IsoZombie class. Did you just google DoZombieStats() or something?

bitter frigate
#

i specifically searched ":DoZombieStats()" - quotes are SUPER useful for this stuff. i'd be dead without them

long grove
#

I'm trying to work out why this is causing issues

function Horde:moveTo(x,y)
if x then self.posX = x end
if y then self.posY = y end
self.modData.posX = self.posX
self.modData.posY = self.posY
if self.isVirtual == true or self.leader == nil then return end

for _,zomb in ipairs(self.zombieList) do
    if zomb:getModData().offsetX then 
        zomb:changeSpeed(2)
        zomb:DoZombieStats()
        zomb:pathToLocation(self.posX+zomb:getModData().offsetX, self.posY+zomb:getModData().offsetY, 0)
    end
end

end

#

zomb should already be a non-virtual IsoZombie so I have no idea why the mod is crashing at zomb:DoZombieStats()

sweet drum
#

where can i see all the AttachedWeaponDefinitions?

weary matrix
#

but I don't really, I'm merly adding the proper flags to the square at the top of the ladder to make it work out of the box when you press E

neon lintel
#

anyone know how to change character hair color in debug?

long grove
long grove
#

ok no idea why the mod is having issues with it then

quasi geode
#

i'm not seeing a changeSpeed method for IsoZombie

willow estuary
# long grove

Good 'ole changeSpeed() got pulled, this is how I give zombies custom speeds; this is how I currently do custom speeds.

        local oldSpeed = getSandboxOptions():getOptionByName("ZombieLore.Speed")
        oldSpeed = oldSpeed:getValue()
        getSandboxOptions():set("ZombieLore.Speed", 1)        
        zombie:makeInactive(true)
        zombie:makeInactive(false)
        zombie:DoZombieStats()
        getSandboxOptions():set("ZombieLore.Speed",oldSpeed)

Not sure why the makeInactive business is needed, I had to copy someone's homework to get it work with the latest updates and that was in it and was the magic missing ingredient.

rain pumice
#

question.

I'm trying to get this sound to play randomly and not all the time when you smash a zombie's head.
I'm pretty new so I'm looking at the javadocs and it seems like SoundManager is the way to go?

willow estuary
#

The zombie handling functions have shifted a fair amount over the past year+, so it's made custom zombie stuff a fair bother.

rain pumice
#
[1] = "smash2",
[2] = "smash3",
[3] = "smash4",
[4] = "PZ_HeadSmash_01",
[5] = "PZ_HeadSmash_02",
}
local function SmashHead ( , hit)``` 

this is what i have so far lol...
long grove
willow estuary
#

πŸ‘

willow estuary
# long grove Wow that is the ticket, good to know thank you.

So one thing to be aware of is that PZ cheats and "re uses" zombies? So when you make one zombie a sprinter, when that zombie gets "re used" you migt have a surprise sprinter pop up elsewhere, you follow?
PZ keeps tracks of individual zombie appearances/outfits, and individual zombie statistics, but the statistics are like a deck of cards that PZ will shuffle thru and re-use.
It shouldn't be a huge deal breaker issue, but like I said it can result in surprise sprinters, and doing stuff like teleporting in debug can have weird effects with custom zombies, you'll drag some of the zombie statistics with you to your new location when the zombie stats are reused.
Hope this makes some sense? πŸ˜„

quasi geode
willow estuary
quasi geode
#
   public void makeInactive(boolean var1) {
      if (var1 != this.inactive) {
         if (var1) {
            this.walkType = Integer.toString(Rand.Next(3) + 1);
            this.walkType = "slow" + this.walkType;
            this.bRunning = false;
            this.inactive = true;
            this.speedType = 3;
         } else {
            this.speedType = -1;
            this.inactive = false;
            this.DoZombieStats();
         }

      }
   }```
as you can see, when you call it with that `false` arg after calling it with `true` it automatically calls `DoZombieStats`
willow estuary
#

I mean. good to know, I'll test it, I'm just.... .....so exhausted with testing special zombie stuff every time a new update breaks how to make them work. 😬

long grove
#

how did you find that, for example, fenris?

quasi geode
#

looked in the decompiled java files

long grove
long grove
quasi geode
#

eh depends on your editor. its probably got a "find in files" function

willow estuary
long grove
#

if they get reused when loaded and unloaded though, then they are being shuffled around all the time anyway

willow estuary
#

But also the details of this shit can change with every update ahahahahahahahaah πŸ€ͺ πŸ€ͺ πŸ€ͺ

long grove
#

of course lol

willow estuary
#

The new optimization zombie handling stuff for MP already complicates all this and I'm not sure of how stuff even works as is with that πŸ€ͺ πŸ€ͺ πŸ€ͺ

#

But yeah, what I did one time is assigned individual "serial numbers" to zombies, and had that output to console and visible onscreen to evaluate the phenomenon, but that was also a year+ ago?

sweet drum
#

Where i should start to make my own melee custom weapon ?

long grove
#

I'm just trying to make a mod that I found work that I didn't even write because it already does 90% of what I wanted to do but I don't even know how to navigate to the functions I want to look at πŸ€ͺ πŸ€ͺ

willow estuary
#

For me... ....modding to me is like sudoku for my mom? It's just a series of mind puzzles to defeat, so bring on the πŸ€ͺ πŸ€ͺ πŸ€ͺ

#

But custom zombie stuff has been especially wiggly at times over the build 41 updates, and with how it intersects heavily with MP optimization etc, I'm sure that will continue?

rain pumice
#

how do u format code to have colors?

#

on discord

long grove
willow estuary
rain pumice
#
local SmashSounds ={
[1] = "smash2",
[2] = "smash3",
[3] = "smash4",
[4] = "PZ_HeadSmash_01",
[5] = "PZ_HeadSmash_02",
}

local function SmashedHead (Request, Type)
    if Request:isSmashed() == true then
        local randNum = ZombRand(5)+1
        getSoundManager():PlaySound(SmashSounds[randNum], false, 0):setVolume(1);
    end
end
#

omg ty

willow estuary
#

Jesus christ, fast reflexes there πŸ‘

rain pumice
#

Lol, two monitors

#

Will that work... ?

#

Sorry I'm not trying to be annoying, just really wanna mod things. I am being very ambitious right now lol...

willow estuary
#

I mean.... ....it's always a case of if you set everything up properly, it should work?
But I'm a gigantic fucking idiot and can't actually process code by eyeballing it, I just play with the lego pieces until something works and then share that here if it can help someone?

#

Okay, so, right off the bat, however, vanilla PZ already supports sound randomization

rain pumice
#

true that

willow estuary
#

If you want... ...okay, so you know about the sound scripts and all that jazz already?

long grove
rain pumice
#

so you're saying that by just having the script with the sounds it should randomly go through them?

rain pumice
willow estuary
long grove
#

' ' ' lua but I can do this and it doesnt do anything? ' ' '

rain pumice
#

those are not commas

long grove
#

oh

rain pumice
#

sorry i mean back tick

willow estuary
rain pumice
long grove
#

oh ok

willow estuary
#

It's part of the minigame with how insanely fussy formatting can be with modding πŸ˜›

long grove
#
function Horde:moveTo(x,y)
    if x then self.posX = x end
    if y then self.posY = y end
    self.modData.posX = self.posX
    self.modData.posY = self.posY
    if self.isVirtual == true or self.leader == nil then return end

    for _,zomb in ipairs(self.zombieList) do
        if zomb:getModData().offsetX then 
            zomb:changeSpeed(2)
            zomb:DoZombieStats()
            zomb:pathToLocation(self.posX+zomb:getModData().offsetX, self.posY+zomb:getModData().offsetY, 0)
        end
    end
end
abstract raptor
#

The Radial Menu is uh... breaking my brain

rain pumice
willow estuary
long grove
#

its not my code

rain pumice
long grove
#

im just trying to make it work lol

rain pumice
#

I was on that file like an hour ago lol, thanks a lot

willow estuary
long grove
#

I'm learning how to mod just to make this work. I do have some coding experience but modding is new to me

abstract raptor
#

I could just skip doing a radial menu and bind the vocalizer to the numpad keys.

rain pumice
willow estuary
# long grove https://steamcommunity.com/sharedfiles/filedetails/?id=2311468324

Okay, so, and I don't understand much about this as it's new, but the new build .65 zombie optimization for mp etc business shuffles around extra zombies when there;s too many in a player's vicinity? It takes them and puts them outside the player's reality bubble.
It's just to keep framerates from bombing etc. I haven't experimented with it, or looked at the code, or have a handle on it.
But I can see how that, if it works, could complicate a mod like Hordes Alpha and may make it unviable if vanilla is grabbing zombies and moving them out of the player's reality bubble?
Anyways, if you're getting bizarre/unworkable results that zombie optimization business might be responsible.

#
  • I'm not sure if that zombie optimization thing is even currently working as intended as well.
#

Mods that modify zombies and their behavior can be especially update fragile as I mentioned previously.

late hound
# long grove https://steamcommunity.com/sharedfiles/filedetails/?id=2311468324

The Hordes Alpha mod stopped working well over a year ago so it will be quite a challenge to pick it up and update it to .65's Singleplayer standards. Now on the other hand, if you want this to work with Multiplayer.... I wish of you the best of luck. I've had a lot of mixed results seeing how local or dedicated servers handle persistent zombies outfits are handled - which is a feature that this mod uses. It's not going to be a quick fix, long story short.

vivid flare
# weary matrix 😎

didn't you just a few days ago argued with me that it wasn't possible (even though i just asked a question for why).

novel obsidian
#

Guys, important question. What program do you use to make 3d models?

drifting ore
#

blender is free and has everything

#

Hey, for the translations. If encoding in UTF 16 BE for Russian, Korean, Chinese and Japanese is it good?

#

maya is paid and does the same thing

#

did english only idk

mint sphinx
#

any one know if i can write this bit on a better way ?

local function getZomRan(rand1,rand2)
    if rand1 and rand2 then
    return ZombRand(rand1,rand2)
    else 
    return ZombRand(50,55)
    end 
end
narrow pelican
#

how to make a simple craft (like dismantling) for item?

mint sphinx
#

dismantling for like item from inventory ?

mint sphinx
# narrow pelican how to make a simple craft (like dismantling) for item?

if it like the recipes for dismantling earmuf and cdplayer and so on and so on its like this


    recipe Dismantle Video Game
    {
       VideoGame,
       keep [Recipe.GetItemTypes.Screwdriver],

       Result:ElectronicsScrap,
       Time:30.0,
       OnGiveXP:Recipe.OnGiveXP.DismantleElectronics,
       Category:Electrical,
       AnimNode:Disassemble,
       Prop1:Screwdriver,
       Prop2:CDplayer,
    }
exotic ember
#

Question out of curiosity here if anyone has got an opinion to comment on it.

#

Noticed this mod recently

#

And I was wondering how feasible would it be to create an addon that plugged in your own music.

#

Not like an MP3 but perhaps a MIDI file that played out the notes.

#

The only reason I mention it is because this immediately made me think of the LuteBot mod for Mordhau

narrow pelican
#

and how to properly name file

mint sphinx
#
module mymod{
inports{
Base
}

recipe foo{
--code here for the recipe
}

}

narrow pelican
#

ok

mint sphinx
#

so know how it work now or ?

narrow pelican
#

i mess up with lua

mint sphinx
#

you can also add recipes with lua but is way harder and bugs sometimes out so save way is doing it in the txt file and the game will store them before it running

narrow pelican
#

so i tried to make filler item that fits to the timeline of the server but the only use of this thing is to be dismantled into electronic parts

#

and when i tried as you sayed game just crashes

#

mb im doin someting wrong

mint sphinx
#

did you get the crash repor t?

#

also can you come with an example scrip you trying to do right now ? ^^

narrow pelican
#

just a sec

#

mb because i have 2 script files it make game crush

mint sphinx
#

send both of them here

#

and i can see the scripts

narrow pelican
#

or i just forgot to add }

#

at the end

#

yes im dumb

mint sphinx
#

i done that few times before but when you not sending the scripts it hard to see

#

xD

narrow pelican
#

Ok next problem: item just disappeared

mint sphinx
#

cant still not see your full script πŸ™‚

#

so give me something to work with

narrow pelican
#

module SMART
{
imports
{
Base
}
item Smartphone
{
DisplayCategory = Electronics,
Weight = 0.3,
Type = Normal,
DisplayName = Smart phone,
Icon = Smartphone,
WorldStaticModel = CordlessPhone,
MetalValue = 3,
}
}
}

#

module SMART
{
imports
{
Base
}
recipe Dismantle Smart phone
{
Smartphone,
keep [Recipe.GetItemTypes.Screwdriver],

   Result:ElectronicsScrap,
   Time:30.0,
   OnGiveXP:Recipe.OnGiveXP.DismantleElectronics,
   Category:Electrical,
   AnimNode:Disassemble,
   Prop1:Screwdriver,
   Prop2:CDplayer,
}

}

mint sphinx
#

smart phones in 1993 interresting concept also why do you have } to much in your item ?

narrow pelican
#

i'm doing this mod for rp server

mint sphinx
#

count the } { on the first script module SMART { <---- 1 imports { <------2 Base } < ------- 1 item Smartphone { <------2 DisplayCategory = Electronics, Weight = 0.3, Type = Normal, DisplayName = Smart phone, Icon = Smartphone, WorldStaticModel = CordlessPhone, MetalValue = 3, } <------1 } <------0 } <------ -1

#

see if you remove the last one in this file if it works

#

also have to eat now

narrow pelican
#

it finally works!!

drifting ore
#

πŸ‘

narrow pelican
#

ok how to make it in several colors

mint sphinx
narrow pelican
#

now i need to make it in different colors

mint sphinx
#

the phone in different colors ? or

narrow pelican
#

i mean im making 2 more phones that are coloured red and blue

mint sphinx
#

i think you can do it as random ?

#

its just the texture you going to change rigth ? if so look how schoolbag do it

item Bag_Schoolbag
    {
        DisplayCategory = Bag,
        WeightReduction    =    60,
        Weight    =    1,
        Type    =    Container,
        Capacity    =    15,
        DisplayName    =    School Bag,
        IconsForTexture = Backpack_Black;Backpack_Blue;Backpack_Spiffo,                <------ that the place they have the 3 texture for the schoolbag
        CanBeEquipped = Back,
        OpenSound   =   OpenBag,
        CloseSound   =   CloseBag,
        PutInSound   =   PutItemInBag,
        ClothingItem = Bag_SchoolBag,
        BloodLocation = Bag,
        RunSpeedModifier = 0.97,
        AttachmentReplacement = Bag,
        ReplaceInSecondHand = Bag_Schoolbag_LHand holdingbagleft,
        ReplaceInPrimaryHand = Bag_Schoolbag_RHand holdingbagright,
        WorldStaticModel = SchoolBag_Ground,
    }
narrow pelican
#

thanks

#

it is very helpful

mint sphinx
#

i saly dont know anymore atm becuase havent work with multiple icon and model texture before.

undone heron
#

what does the numbers mean for evolve recipies ?

#

like stew:15?

narrow pelican
#

i mean what i tried to do is

#

module SMART
{
imports
{
Base
}
item Smartphone
{
DisplayCategory = Electronics,
Weight = 0.3,
Type = Normal,
DisplayName = Smart phone,
Icon = Smartphone,
WorldStaticModel = CordlessPhone,
MetalValue = 3,
}

item Smartphone1
{
DisplayCategory = Electronics,
Weight = 0.3,
Type = Normal,
DisplayName = Smart phone,
Icon = Smartphone,
WorldStaticModel = CordlessPhone,
MetalValue = 3,
}
item Smartphone2
{
DisplayCategory = Electronics,
Weight = 0.3,
Type = Normal,
DisplayName = Smart phone,
Icon = Smartphone,
WorldStaticModel = CordlessPhone,
MetalValue = 3,
}
}

mint sphinx
mint sphinx
#

that that way is the old way ZP also used in the past

mint sphinx
# undone heron ty

dont take it as 100% face value. is only what i think it does. but i think it like only food product there evolve

weary matrix
mint sphinx
#

just do it on your way for the moment the old ways cant really help to see how the other way work. i dont know if @weary matrix know how it work on top of his head

#

he is way better then me ^^

mint sphinx
narrow pelican
#

no

#

in works with no texture

#

i just did like this

#

module SMART
{
imports
{
Base
}
item Smartphone
{
DisplayCategory = Electronics,
Weight = 0.3,
Type = Normal,
DisplayName = Smart phone,
IconsForTexture =
Smartphone;Smartphone1;Smarphone2,
WorldStaticModel = CordlessPhone,
MetalValue = 3,
}
}

#

but textures are gone

narrow pelican
#

like white blue red

weary matrix
narrow pelican
#

from script

weary matrix
#

Don't think you can do it from script

#

Maybe i'm wrong though

narrow pelican
#

i mean i wanted to make like digital watches

mint sphinx
#

i was sending him the school bag how they do the multiple skins as random on the school bag but look like you might need some code in a xml file as well

mint sphinx
mint sphinx
narrow pelican
#

ok

weary matrix
#

Oh I had no clue

mint sphinx
# narrow pelican module SMART { imports { Base } item Smartphone { ...

does you script look like this. like on the same line module SMART { imports { Base } item Smartphone { DisplayCategory = Electronics, Weight = 0.3, Type = Normal, DisplayName = Smart phone, IconsForTexture = Smartphone;Smartphone1;Smarphone2, WorldStaticModel = CordlessPhone, MetalValue = 3, } } because i see the thing you copy pase is on another line

narrow pelican
#

no i did both ways

mint sphinx
#

the it might be because the cordlessphone dont have multiple chose somewhere in the files sry that i cant help more atm

narrow pelican
#

ok

#

mb name of files are wrong

mint sphinx
#

@bitter frigate everything work fine so far with you insulin mod ^^

mint sphinx
# narrow pelican ok

i dont have the modification on my working laptop to be able to look into the code sadly also i think the iconfortexture is fairly new aswell so dont know how many have used them before either

narrow pelican
#

i can send this mod to you

royal stirrup
#

anyone know how to get zombie textures or export them?

dusky goblet
royal stirrup
#

thanks

drifting stump
#

the emote radial menu code is a mess

#

makes me want to recode the whole thing but would probably not be as nice for compatibility with mods not using the api

mint sphinx
drifting stump
#

yes hold q

#

working on making it mod friendly with my api but debating if its beyond salvation

fleet adder
#

anybody know how lightblubs work/ where their scripts are

mint sphinx
# drifting stump yes hold q

you can always make a hook in over it or rewrite it just need atleast do the same think 100% for mod compatibility

drifting stump
#

hooking is working against the goal of the api

#

which is making it mod friendly and more performant

#

that chain of calling old ui elements and asking the game to render it each time is garbage

#

and breaks very easily by reloading a lua file in that chain

#

for example with the vehicle menu which ive done the api for already

mint sphinx
drifting stump
#

before each mod had to:
-save the previously loaded function
-replace with its own
-call the old
-resetup controller
-do your thing
-ask the game to render

#

i eliminated all that you simply do your thing and the game only ever does controller and render once

runic monolith
#

Does anyone know how to make brita's weapon pack guns a bit louder? The game becomes way too easy without drawing all zeds to you after a few shots.

mint sphinx
runic monolith
#

Oh okay, thanks for answering tho!

terse heron
#

Hey, is it possible to add new moodlets?

#

Or new stats to players

mint sphinx
#

New stats like in New skills? Like carpentry metal worker? I'd that the new stats then yes new mood might be able to do it?

nimble spoke
#

the icon is picked based on the textures set in the xml file

mint sphinx
mint sphinx
fleet adder
#

what methods are there for moving zombies around, is it just addsound

#

actually nevermind, alternatively can you cut an area out of a zombies pathfinding

glass ocean
#

Anyone know how to change area of the spawn of the vehicles and zombies

bitter frigate
# mint sphinx <@!208454709265039361> everything work fine so far with you insulin mod ^^

everything is still showing up and so are the recipes! i've moved on to trying to make syringes that have more than 1 unit of insulin in them. i posted this earlier, if you have any thoughts!

SO as it is each syringe costs 1 unit of insulin to make, and makes one unit. this is wonderful. HOWEVER. a typical dose of insulin (for me) is about 8 units. i know i can create an 8 unit syringe; do i have to make an individual recipe for every amount i'd want?

another user suggested making the syringes like water bottles - capable of holding up to x amount of units, but i don't know how i'd begin to steal the water bottle logic for insulin instead of water

raw tulip
#

welp. at least its finally showing up in game now. wonder if the game will allow me to remove/move joints πŸ€” πŸ€”

bitter frigate
#

does anyone know where i can find WaterSource-WaterBottleFull in the base game files? i've peeled through lots of folders and files but i can't find it

bitter frigate
#

STEVE MINECRAFT!!!!

raw tulip
#

soon. it will be a reality

tulip valve
#

Project Minecraft

raw tulip
mint sphinx
mint sphinx
bitter frigate
mossy herald
#

Hello, I new to zomboid modding but I know how to code. I wanted to make one mod that triggers a sound when you do damage your car while driving. Any recommendation of tutorials or demo mods to help me learn?

fleet adder
#

ive only started as of yesterday so im not the most well versed but these have been my holy grail

mossy herald
#

Thanks I found the event I want to edit

#

But haven't found how to play a sound yet, any exemple here?

fleet adder
#

ive been looking at light sources and pathfinding so im not totally sure but my guess would be something to do with the audiomanager

#

AudioManager.AudioInstance LoadAndPlayAudio(java.lang.String filename) ?

#

might be an easier way but idk

#

oh this might be more what you're after

mossy herald
fleet adder
#

yeah thats the bit im trying to figure atm

#

take a look at the stuff on the modding section of the wiki

#

theres most of the tutorials there

#

i just downloaded a few mods and have been looking at how they did it because loads of the tutorials seem to be out of date

crisp fable
drifting stump
#

if you dont have the player object already can just do GetPlayer()

#

@bitter frigate heres the code for water bottles

item WaterBottleFull
    {
        DisplayCategory = Water,
        IsWaterSource    =    TRUE,
        Weight    =    0.8,
        CanStoreWater    =    TRUE,
        Type    =    Drainable,
        UseWhileEquipped    =    FALSE,
        UseDelta    =    0.1,
        DisplayName    =    Water Bottle,
        ReplaceOnDeplete    =    WaterBottleEmpty,
        ReplaceOnUseOn    =    WaterSource-WaterBottleFull,
        Icon    =    WaterBottle_Full,
        StaticModel = WaterBottle,
        WorldStaticModel = WaterBottleFull,
        CustomEatSound = DrinkingFromBottlePlastic,
    }
gloomy marsh
#

Hey does anyone know how I can add the occasional the sprinter to Multiplayer without making it the dominant Zombie type

bitter frigate
drifting stump
#

theres a mod to customize zombies already

#

i think it subtracts

drifting ore
#

how to make items spawn on zeds

#

clothing for instance

west crane
#

Any idea when OnClientCommand is exatly triggered?

mint sphinx
drifting ore
quick maple
#

Got it. Sorry, got the wrong channel.

mossy herald
#

Isn't there a OnYell hook?

raw tulip
#

looking good fellas

cold burrow
gaunt tide
#

Hello, does anyone know if there is a mod that reduces the damage vehicles receive from hitting zombies? Thanks in advance, please @ me or "reply" if you respond!

raw tulip
drifting ore
#

pog

raw tulip
#

lets go fellas!

drifting ore
#

steveeeee

raw tulip
#

this is literally gonna become like unturned at this point

drifting ore
#

does this still work?

#

someone should make a mod called was just a dream when you die you spawn in the last bed you slept

#

with loot or no loot or with some loot

#

or just decide to end it there

raw tulip
#

"You may not rest now, there are monsters nearby"

fleet adder
#

12 minutes but you gotta not get mauled to death before you leave

drifting ore
#

F

#

i still need to know how to spawn items on zeds

mossy herald
#

My first time modding this game

#

Almost broke my headsets when it didn't had a limit to times playing and it was triggering a overlap every step I gave

#

The music clip is something I had at hand

#

Thanks for the help @drifting stump and @fleet adder... but it turned out to be a monster

fleet adder
#

ha, a true masterpiece

#

yw, hope you can get it working in the end

narrow pelican
#

inventoryfemale = {
rolls = 1,
items = {
"SMART.Smartphone", 50,
"SMART.Smartphone1", 50,
"SMART.Smartphone2", 50,
}
},
inventorymale = {
rolls = 1,
items = {
"SMART.Smartphone", 50,
"SMART.Smartphone1", 50,
"SMART.Smartphone2", 50,
}
},

#

guys how to prevent double or triple spawn of same item with different colour

unkempt kettle
#

Looking for modders/someone that is able to make a modpack for a server.
If you can make a quote/give your budget, msg me. yupp

raw tulip
novel obsidian
#

guys. how to see mod code you need to update it but there are no sources

exotic ember
#

can mods affect the vehicle_car_modern.txt file under media/scripts?

#

Friend cant join a server because this file is mismatching, and the server has no mods on it

drifting ore
exotic ember
# pearl prism yes

So even though Ive turned off the mods, its still affecting someones ability to join a server?

pearl prism
fleet adder
#

i cant find any of the games light sources such as lamps in the script files with the rest of the objects, anyone know where i can find them

glass ocean
#

Is possible make spawn vehicles in a certain area like if i want a military truck in the base in louisville?

topaz lion
#

How do I edit mods?

mint sphinx
topaz lion
#

what im just trying to edit the hore night mode

mint sphinx
#

horde night ?

topaz lion
#

yuh

mint sphinx
#

by default it only have one setting ?

#

but yea to make a mod there just overwrite what you want to change i guess ^^ or if it for singleplayer you can just edit the mod file and hope for not the mod to update.

topaz lion
#

Oh on the steam page it shows i can eddit the mod in the menu

#

for multiplayer

daring yacht
#

hello do you guys know which files do i need to create a language pack?

exotic ember
#

got it working by copying my .txt document to him and replacing it

#

The server had no mods on it

bitter frigate
# mint sphinx dont know ^^ but would you have it autoinjection system on it aswell ?

you mean like having it inject insulin every so often like the player drinks their water? that's a really interesting proposition! there's a device that can do that now called an insulin pump; the technology was really in its infancy until the late 90s. so it's POSSIBLE i could create a pump in game, but that would involve a whole new set of items (more syringes, needles, cartridges, insets, and linesets) and really manipulating the injury system to include inset sites to really have the depth i'd want

ember stream
#

i was wondering, is there any mod out there that lets you read while driving in cruise control? it'd be real nice for those long country drives but i couldn't find anything on steam workshop

ember stream
#

oh that's great, thanks!

plucky sluice
#

When playing multi without a dedicated server, does both the server and me share the mod in C:\Users\username\Zomboid\Workshop. Basically if I want to test a mod with another player can I put my mod in there and he does the same thing and were good. Or is it more complex than that.

weary matrix
#

what's a good example to learn how to make recipes that yield movable items?

nova egret
#

Huting mod very good

sinful vessel
#

Is there a way to force spawn magazines full in containers/bags?

uncut ocean
#

would it be technically possible to create a mod that allows you to set a default character before starting the game?

#

so you don't have to go into the saved characters menu and pick the same one everytime

#

if so i'll appreciate resources to help me get started creating this mod, i'm able to code decently in js

willow bramble
#

britas mod pack casue issues with loot respawn in DS?

tribal marsh
#

I hope someone can provide some insight here: I'm creating a mod that edits an already existing item, but upon loading the mod, it creates another instance of the item instead. What's the proper way to modify a base game item?

#

I don't want to edit newitems.txt as I think that would cause incompatibility issues with other mods, and generally editing the original file is frowned upon in modding communities

bitter frigate
#

i'm having a hard time debugging my code. i can't get a value to print to the console, no matter which key i bind it to. is it because i'm calling for a value that doesn't exist?

NewVariableFunctions = {}

-------------------------------------------------------------------------------------------------
-- debug ----------------------------------------------------------------------------------------
local function OnKeyPressed(KEY_COMMA)
    if key == KEY_COMMA then
        print(SugarValue)
    end
end
-- debug ----------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------


-------------------------------------------------------------------------------------------------
-- creates blood sugar???? ----------------------------------------------------------------------

local function OnCreateLivingCharacter(playerOrSurvivor)
local function setSugarValue(120)
end


-------------------------------------------------------------------------------------------------
-- raises blood sugar --------------------------------------------------------------------------

NewVariableFunctions.CalculateSugarValue = function(specificPlayer)
    local sugarIncrease = 0.5 + SugarValue

    if (SugarValue >= 400) then
        setBodyDamage(specificPlayer:getBodyDamage() + (0.05))
    end

    if (SugarValue < 40)
        setBodyDamage(specificPlayer:getBodyDamage() + (0.08))
    end
end


-------------------------------------------------------------------------------------------------
-- i don't actually know what these do but they seem important ----------------------------------

Events.OnKeyPressed.Add(OnKeyPressed)
Events.OnCreateLivingCharacter.Add(OnCreateLivingCharacter)
willow estuary
tribal marsh
#

Is there some documentation on how the game loads files? Maybe I can figure out my issue from that - it seems rather simple but maybe it's more complex than I believe?

bitter frigate
quasi geode
lavish citrus
#

I'm trying go get maps on my g portal dedicated. I've added the mod name and workshop iD to my g portal page and FTP the maps file from my c drive to the servers media/maps folder....what am I missing.....?

willow estuary
quasi geode
#

lol no, i probably should have phrased that differently

bitter frigate
quasi geode
#

when defining a function arguments need proper variable names

#

thats defining the function, not calling it. theres a huge difference. you set it to a variable when you define it, and a number when you call it

willow estuary
#
local SugarValue = 120

should be sufficient

quasi geode
#

its probably best to go find some basic lua tutorials if your going to dive into coding. you'll save yourself a crapload of headaches

tribal marsh
#

(Don't learn C#, its too wordy)

willow estuary
#

You're definitely getting there, it's just some of the details are jumbled with that code?

quasi geode
#
local function setSugarValue(value) -- defining a function
    --- do stuff with value
end

setSugarValue(120) -- calling the function
bitter frigate
#

that makes so much sense!!! i was trying to articulate exactly what u just did but i was getting hung up on god knows what.

quasi geode
bitter frigate
#

thank u guys i've done some tutorials and looked around a lot before trying to fish around in code

willow estuary
tribal marsh
#

I'll give you the example here: \Workshop\votex09.moneyispower\Contents\mods\votex09.moneyispower\media\scripts\moneyispower.txt >

{
    item Money
    {
        DisplayCategory = Junk,
        Weight    =    -0.001,
        Type    =    Normal,
        DisplayName    =    Money,
        Icon    =    Money,
        WorldStaticModel = Money,
    }
}
#

This creates another instance of "Money"

quasi geode
#

^^^

tribal marsh
#

Oh goodie, its case sensitive

#

Glad that's all that was.

willow estuary
# tribal marsh Oh goodie, its case sensitive

The scripts will be really fussy about formatting. Well, code stuff is in general, but script formatting specifically hangs up a lot of people.

Better way to do it, have this in a lua file in the shared or server lua directories and you don't have to mess around with script files + less concerns about conflicts with any other mods that modify the Base.Money object

local item = ScriptManager.instance:getItem("Base.Money")    
if item then 
    item:DoParam("Weight    =    -0.001")
end
#
  • won't "fall behind" if/when vanilla changes the item scripts, as has regularly happened with item modifying mods TBH.
quasi geode
#

ya its a much better way of making simple changes

willow estuary
#

Oh fuck, thank christ I got an A+ from old man Fenris that time.

quasi geode
#

lmao

tribal marsh
#

So, just to be clear, theoretically I can do all my modding ideas through lua instead of plugging the existing files.

willow estuary
#

I mean, with modifying existing items, it's really "best practices" and can avoid all sorts of headaches in the future with changes to vanilla + mod conflicts?
But yeah, aside from a few corner case instances, pretty much all changes to existing script items can be done via the above lua method?

#

Removing parameters instead of changing them is where it can get fussy, for example? But in 99%+ of cases some lua can handle all the script item modifications IMO?

#

There's been multiple instances where new properties were added to vanilla items, en masse, and a ton of mods, that used scripts to overwrite items instead of using lua to modify the items, caused all sorts of end user headaches?

tribal marsh
#

Does this edit items that have already spawned in the game or does that limitation carry over from the "old method"

#

aka, pre edited backpacks for example having the original carry weight

willow estuary
#

In most cases it should modify items that already exist, but there's a few parameters that are "persistent" with items, so it's case-by-case?

tribal marsh
#

Fair

#

Thanks for all the information

willow estuary
#

Ah, yeah, containers specificly, I don't think they change to the new weight

#

No problemo! Good luck πŸ™‚

undone crag
#

Your OnCreateLivingCharacter is lacking an end.

bitter frigate
undone crag
#

What are these sugarIncrease and NewVariableFunctionsSugarValue meant to be? It's hard for me to guess what the code is meant to do to say what's wrong :d

tribal marsh
#

@willow estuary Well I did some lua, and my server didn't start. Figured I did something wrong so I copied your code snippet and maybe there's something incorrect here.

Throws a WorldDictionaryException

merry osprey
#

I about to install a mod that removed VHS from the loot table. Later when the exploit is fixed, if i removed this mod will VHS begin to spawn in with the loot respawner?

willow estuary
faint jewel
#

QUESTION: is is possible to modify the max number of people a vehicle can hold?

bitter frigate
# undone crag What are these `sugarIncrease` and `NewVariableFunctionsSugarValue` meant to be?...

NewVariableFunction is uuuuuuh meant to hold the functionality of the blood sugar increase code? sugarIncrease is meant to take sugarvalue and add 0.5 to it every time it updates. so. it sould probably be sugarvalue instead since i'm not actually calling the function later. at least not yet. the idea is to eventually have sugarvalue interact with carbohydrates. i think i got in my own way with some Assumptions(tm) that i can't articulate now

undone crag
#

This is notepad++ with the Lua syntax highlighter plugin.

#

Oh nvm my qurestion about NewVariableFunctionsSugarValue, I somehow made a mistake after copying your code into notepad++ and had
local sugarIncrease = 0.5 + NewVariableFunctionsSugarValue
instead of
local sugarIncrease = 0.5 + SugarValue

#

Your functions can be defined like this

local function OnCreateLivingCharacter(playerOrSurvivor)

or like this

local function someFunction(playerOrSurvivor)

The name does not have to match anything like OnCreateLivingCharacter. The exact spelling of OnCreateLivingCharacter is just important when you do

Events.OnCreateLivingCharacter.Add(someFunction)
bitter frigate
undone crag
#

:o
(Farewell)

faint jewel
#

i wonder if a no pixel like server would be fun.

tribal marsh
#

@willow estuary Cannot override existing registry id, item: Base.Money
Disabling the mod nets the same thing obviously. Added back in base.Money still same thing

I hope i didn't brick my server somehow...

verbal ivy
merry osprey
#

I about to install a mod that removed VHS from the loot table. Later when the exploit is fixed, if i removed this mod will VHS begin to spawn in with the loot respawner?

cold burrow
#

How to query all items with specific Type and SubCategory? Probably all guns.

willow estuary
#

Probably a good opportunity for someone to make a mod that removes the skill gains from VHS tapes mechanic altogether, if it's feasible?

faint jewel
#

what exploit?

#

do i need to do something on my server?

vast fox
#

@craggy furnace make a friggin weekly update schedule day for you extended heli events. every night sucks. read your steam comments. ppl are getting tired of it.

drifting ore
#

anyone knows how to spawn items on zombies

#

day 2

#

still looking

weary matrix
uncut ocean
#

would it be technically possible to create a mod that allows you to set a default character before starting the game?

#

i just need to know its possible so that i can start working on it

opal wind
#

is there a animation on PZ to hold a pistol with 1 hand? i just cant remember, the last time i play was so long ago lol

tulip valve
#

Yes there is

dark solar
#

@drifting ore you know how to make custom clothing items spawn within a certain zombie type?

#

i could use some help

drifting ore
opal wind
opal wind
dark solar
#

ahhh ok!

#

thank you

opal wind
#

look his lua files you will find what u need there, there is also a file called clothing somewhere there, it have a list of each outfit on each zombie

opal wind
#

i mean u need the ones in lua folders to make them spawn too, but that file gives you the zombie outfits sets

dark solar
#

i see

#

i shall investigate then

uncut ocean
#

why is no one answering my question 😒

#

guess no one knows the answer

drifting ore
#

What encoding do I need to use for chinese, japanese or korean .txt ?

drifting ore
uncut ocean
#

mods already do what

#

i mean being able to pick one template character

#

@drifting ore so instead of having to click New > pick your saved character from the drop down > Start

#

you just click New > the character you had previously selected will be selected for all games til you change it > all you have to do is press start

#

after choosing the location

#

basically all im saying is it would autofill the saved character dropdown to the last one you used

#

super small QoL

drifting ore
#

So you just want to dodge choosing something from a drop-down menu one time ?

#

No it doesn't exist but it's quite easily doable I think. But no idea how

lavish pine
#

Hello, what articles / videos are worth reading in order to understand the pz modding bases, I myself did not find anything useful (sorry if it’s off topic of the channel)

willow estuary
#

Would be insanely OP for megabase construction/looting, as a brick has 1000 units πŸ˜„

lavish pine
vast fox
# craggy furnace nah, fuck off

^ Attitude of the kinda developer that if they were good enough to work at a game studio.... Would be pumping out more shit survival games like all the rest. 0 fucks given. Good response to the community that enjoys your mod and is getting frustrated with your inability to schedule your way outta a paper bag.

craggy furnace
#

we are going to continue updating to fix bugs and you are going to continue to vent rage

vast fox
#

Says the guy who responded with "fuck off" to the truth.

craggy furnace
#

you either get to receive updates (for free) or dont

#

i understand you may have grievances to getting disruptions and that must be pretty difficult that is not up to my control and neither will it stop us from continuing

#

if you cannot abide then i am sorry youll just need to remove it from MP

#

i do apologize for telling you to fuck off

vast fox
#

More piss poor attitude man. And you're not sorry for saying fuck off. So don't try to placate now. It's not difficult to create a update schedule. You just don't want to. Love the mod. But i don't support ppl who treat others opinions like garbage. So gl to yall.

stone tapir
#

But it's their decision on how they want to update their mod.

#

If they really didn't give a fuck, their mod would have never received any updates and would've just been left to be broken by a future build update or something

slow graniteBOT
#
Oona#1894 has been banned

Reason: being abusive to others

[unban]

drowsy seal
#

the sheer entitlement goddamn

sour island
#

He posted on steam with snippets of himself excluded - so, just a troll.

mint sphinx
#

.... i had a bug for i dont know how long and couldnt find out why i have this bug at all until i found out the lua the game use dont have string.format xD wish i got an error for it instead of they game says nothing ^^

#

is there a way to see which version of lua zomboid using ?

west crane
#

What is the type for float in sandbox options? is it float or double or something completely different?

crisp fable
#

is there a way to implement scrolling based on simply content height rather than going through the ISScrollingListBox addItem/doDrawItem nonsense?

mint sphinx
tacit bobcat
#

is there a mod which allows zombies to tear down non player made walls ?

drifting ore
#

Is there any way to force the player to equip an item if they are sitting in a specific seat of a vehicle?
Ive seen vehicles where when you aim out a window you enter the standing still and aiming animation (standing up and turning around)
If there is any way to add an item to the player and force them equip it then that could be a way to make an armored vehicle turret that can turn and shoot. Similar to the train in Fallout NV that is actually a hat that a NPC wears as they run along the track.

mint sphinx
#

also have been thinking about the same sydWad

drifting ore
#

@late hound

#

your the only person who knows how to spawn items on zeds drunk

nimble spoke
#

Is that so?

drifting ore
#

help me spawn clothing on zeds soul

nimble spoke
#

if you add new outfits then you need to give them spawn chances

drifting ore
#

clothing .xml is all i understand

small crest
#

Any recommendations for traits and jobs mods? It feels like almost all of them have something broken in them..

nimble spoke
drifting ore
#

better glasses

#

i have no idea how to do this tho πŸ™‚

rain pumice
#

(player:getBodyDamage():getBodyPart(BodyPartType.Torso_Upper) any way to get this to get the full body

#

instead of just one part

tribal marsh
#

Is there a way to detect player traits? for example:

if player:HasTrait("Lucky") then```
drifting ore
tribal marsh
#

I guessed that.

#

Wasnt sure it was correct

drifting ore
#

Well, that exist

tribal marsh
#

Neat I guess! lol

charred knoll
#

Is there a way to check if my item distribution works ? Faster then exploring the map πŸ˜‚

weary matrix
#

is it possible to have a recipe that requires more than one tool?

#

guess it would require making the recipe with Lua

mossy herald
#
local random = 0;

local function OnVehicleDamageTexture(player)
    random = math.random(1,5)```
#

function: OnVehicleDamageTexture -- file: BreakingTheCar.lua line # 5

#

ERROR: General , 1643731396852> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in OnVehicleDamageTexture at KahluaUtil.fail line:82.

#

line 5 is random = math.random(1,5)

#

Why is it calling nil?

faint jewel
#

cause there is no such thing as random numbers.

quasi geode
mossy herald
#

I tought math was default in Lua

drifting stump
#
ZombRand(min, max)
quasi geode
#

pz's lua isnt pure lua, its kahlua. a lua interpreter written in java. not all functions & modules work

#

theres no math.random, math.randomseed, os.* and io.* modules

mossy herald
#

Like this?

drifting stump
#

yes

#

or

random = ZombRand(4) + 1
mossy herald
#

where do I find this function ZombRand?

drifting stump
#

java function exposed to lua

mossy herald
#

And didnt found

quasi geode
#

zombie\Lua\LuaManager.class

drifting stump
quasi geode
drifting stump
#

alternatively decompile LuaManager$GlobalObject.class

mossy herald
#

Still need to figure how to navigate this javadoc still hard to find functions

opaque ocean
#

I know Override:true can work for writing over vanilla recipes... does it work for modded recipes?

weary matrix
opaque ocean
#

or is there a better way to over write recipes from other mods with a separate mod? Really trying not to have to reupload Hydrocraft

tribal marsh
#

Is there a documented way of creating player speech bubbles and displaying them?

drifting stump
#

for everyone to see or only the player?

mossy herald
#

random = ZombRand(1,5); this will not include 5

tribal marsh
#

Only the player

drifting stump
#

player:Say("text")

weary matrix
tribal marsh
#

I... didnt even think of that lol

drifting stump
#

but its used by the game to notify things

weary matrix
#

rather use setHaloNote()

#

unless it should make noise of course

mossy herald
weary matrix
tribal marsh
#

No noise is perfect - looting wallets with notifications. Dont need the player to scream "I FOUND 100 DOLLARS GUYS"

drifting stump
weary matrix
drifting stump
#

decompiling the code to check

#

it does not

#
private void ProcessSay(String filterString, final float n, final float n2, final float n3, final float n4, final String s) {
        if (!this.AllowConversation) {
            return;
        }
        if (TutorialManager.instance.ProfanityFilter) {
            filterString = ProfanityFilter.getInstance().filterString(filterString);
        }
        if (s.equals("default")) {
            ChatManager.getInstance().showInfoMessage(((IsoPlayer)this).getUsername(), filterString);
            this.lastSpokenLine = filterString;
        }
        else if (s.equals("whisper")) {
            this.lastSpokenLine = filterString;
        }
        else if (s.equals("shout")) {
            ChatManager.getInstance().sendMessageToChat(((IsoPlayer)this).getUsername(), ChatType.shout, filterString);
            this.lastSpokenLine = filterString;
        }
        else if (s.equals("radio")) {
            this.chatElement.addChatLine(filterString, n, n2, n3, UIFont.Medium, n4, s, true, true, true, false, false, true);
            if (ZomboidRadio.isStaticSound(filterString)) {
                ChatManager.getInstance().showStaticRadioSound(filterString);
            }
            else {
                ChatManager.getInstance().showRadioMessage(filterString);
            }
        }
    }
#

and when you use :Say

#
public void Say(final String s) {
        if (this.isZombie()) {
            return;
        }
        this.ProcessSay(s, this.SpeakColour.r, this.SpeakColour.g, this.SpeakColour.b, 30.0f, "default");
    }
weary matrix
#

ah interesting

#

I always believed when pressing Q it was simply calling IsoPlayer.Say(), but obviously it's doing something else

mossy herald
#

player:Say(random) how do I do being random a var?

mossy herald
drifting stump
#

does it not convert to string automatically? never tried

weary matrix
mossy herald
#

in the mod.info what should I add to the id and url section?

#

Assuming I want to add my mod to the steam workshop

drifting ore
#

any idea what's wrong

mossy herald
#

Can you show code line 47 and 70?

drifting ore
#

trying to make

#

a cropped ver of the hoodie

#

but it does that when i wear it with the hoodie up

#

some does the same but when i wear the hoodie down

#

but when i change the hoodie while equipped it doesn't happen

mossy herald
#

in line 69 do you need the InventoryItemFactory.?

#

CreateItem already returns a InventoryItem

drifting ore
#

its there buy default

tribal marsh
#

I wonder if recipes can have a null result... I want to handle all output with lua since I want the output to vary.

quasi geode
drifting stump
#

ah yes the very useful double assign

deft jacinth
#

Is there a mod that improves inertia?

#

Driving a truck and getting slowed to a full stop after hitting 3 zombies in a row gets on my nerves

tribal marsh
quasi geode
#

not really, its done with a number of vanilla recipes. stuff like ripping clothes etc

#
    recipe Rip Clothing
    {
        [Recipe.GetItemTypes.RipClothing_Cotton],

        Result:RippedSheets,
        RemoveResultItem:true,
        Sound:ClothesRipping,
        Time:100.0,
        AnimNode:RipSheets,
        OnCreate:Recipe.OnCreate.RipClothing,
    }
#

removes the result, and adds items via lua

tribal marsh
deft jacinth
#

I would hope so

#

It kind of bothers me that I can drive an 8 ton vehicle but hitting three zombies in a row brings me from 60 MPH to like 5

tribal marsh
#

Me too actually, maybe I'll make this mod for you as my next project

#

I have to learn how to add user configs though

#

Might have some detrimental effect to your engine health though... I believe that speed matters on contact for damage

weary matrix
#

any clue how to know if a timed action was interrupted?
I want to run code only when the action is entirely finished, but not when it was interrupted

deft jacinth
bitter frigate
#

oh man it feels TERRIFIC when your code starts to work!!! 2/3 of what i've been trying to do is working! that said, the final third is borked. i'm copy/pasting it here. help would very much be appreciated

-------------------------------------------------------------------------------------------------
-- raises blood sugar --------------------------------------------------------------------------

function Diabetes.CalculateSugarValue(specificPlayer)
    SugarValue = 0.5 + SugarValue

    if (SugarValue >= 400) then
        setBodyDamage(specificPlayer:getBodyDamage() + (0.05))
    end

    if (SugarValue < 40)
        setBodyDamage(specificPlayer:getBodyDamage() + (0.08))
    end
end


Events.EveryTenMinutes.Add(Diabetes.CalculateSugarValue)
mossy herald
#

Everyone thanks for the help in creating my firt mod

winged lotus
#

Evening all, I was wondering, is there a way to have conditional LootDistribution and Recipes txt files depending on game options, other mods being installed or even game mod chosen?

weary matrix
weary matrix
#

SugarValue not set?

#

also why do you need the parenthesis around the value for the damage you add?

bitter frigate
weary matrix
#

oh

#

but EveryTenMinutes does NOT take a player as parameter

bitter frigate
#

that would definitely be part of the problem then wjkehroiwereworh

weary matrix
#

remove the parameter and replace your specificPlayer with getPlayer()

#

also not sure how is declared your SugarValue but it's not initialized anywhere I can see

#

I would just do something like this:
Diabetes.SugarValue = 0 after declaring your Diabetes namespace, and use that value everywhere

bitter frigate
#

alright so i tried replacing the specificPlayer with getPlayer() - do i need to do it everywhere or just when the function is being defined?

#
Diabetes = {}

-------------------------------------------------------------------------------------------------
-- debug ----------------------------------------------------------------------------------------
function Diabetes.PRESSED(key)
   print("Key Pressed " .. tostring(key))
    if key == Keyboard.KEY_COMMA then
        print("Comma Pressed")
        print(SugarValue)
    end
end

Events.OnKeyPressed.Add(Diabetes.PRESSED)
-- debug ----------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------


-------------------------------------------------------------------------------------------------
-- creates blood sugar --------------------------------------------------------------------------

function Diabetes.EXIST(playerOrSurvivor)
    print("Yee the fuck haw.", PlayerOrsurvivor)
end

Events.OnCreateLivingCharacter.Add(Diabetes.EXIST)



function Diabetes.setSugarValue(value)
    SugarValue = 120   
end

Events.OnCreateLivingCharacter.Add(Diabetes.setSugarValue)


-------------------------------------------------------------------------------------------------
-- raises blood sugar --------------------------------------------------------------------------

function Diabetes.CalculateSugarValue(getPlayer())
    SugarValue = 0.5 + SugarValue

    if (SugarValue >= 400) then
        setBodyDamage(getPlayer():getBodyDamage() + (0.05))
    end

    if (SugarValue < 40)
        setBodyDamage(getPlayer():getBodyDamage() + (0.08))
    end
end

Events.EveryTenMinutes.Add(Diabetes.CalculateSugarValue)```
weary matrix
#

@bitter frigate try to read again what I said πŸ˜‚

bitter frigate
weary matrix
bitter frigate
#

like that?

weary matrix
#

also the replacing is incomplete

#

and you should also try to read what I said earlier, cause that global SugarValue will probably not work as is

bitter frigate
bitter frigate
bitter frigate
bitter frigate
vale plank
#

oh god no not a diabetic mod

#

now i can play myself in zomboid and instantly die lmao

bitter frigate
vale plank
mint sphinx
#

final i think im done with my v2 of my farming framework lol even i dont think im going it my self ^^

#

going to be fun for trying to make a readme on git

weary matrix
mint sphinx
drifting ore
#

I need a mod that will add something like zone from PUBG
It will go from sides of the map, and centre of the circle would be random each time
Is it hard to make something like this?

weary matrix
undone crag
#

:d

wild bone
#

I'm new to modding and have an idea of something I'd wanna implement but not sure how to do it, how easy is it to code custom zombie behavior?

undone crag
#

There must be something the game uses to tell if it has finished though...

weary matrix
undone crag
mint sphinx
#

i think its an auto get called when you move

weary matrix
undone crag
#

What does foo mean though?

weary matrix
undone crag
#

:|

mint sphinx
#

^^

weary matrix
#

foo/bar are just dummy variable names when you're not talking about a specific software implementation

#

often for pseudo code etc

undone crag
#

The code would also work if you did this:

Diabetes = {}

--some code

function Diabetes.setSugarValue()
    Diabetes.SugarValue = 120   
end

--Maybe somewhere actually calling Diabetes.setSugarValue too.

This will not work in multiplayer though because you are using a single SugarValue for everyone. You could instead store SugarValue in the player's modData like this

function Diabetes.EXIST(playerOrSurvivor)
  playerOrSurvivor:getModData().Diabetes = {SugarValue = 120}
end
Events.OnCreateLivingCharacter.Add(Diabetes.EXIST)
#

And then later like this

local ModData = player:getModData().Diabetes
modData.SugarValue = 0.5 + modData.SugarValue
weary matrix
#

only problem is if you need to access the SugarValue of another player

undone crag
#

Oh yeah if it's using getPlayer() then it may be fine.

mint sphinx
weary matrix
#

ah in that case yeah that won't work as is

undone crag
#

Does someone know if ByteBuffer can be used in kahlua? When I try Texture:getData() which returns ByteBuffer the game crashes so maybe not.

weary matrix
undone crag
#

T_T

mint sphinx
little vessel
undone crag
#

I wanted to get the texture data and set it to procedurally generate a lot of icons. This was for a mod idea that I later found out would not work because weapons don't show their attachments on the ground. :/

undone crag
mint sphinx
#

but a bit more complicated i guess

undone crag
#

If there are 5 attachment slots and 5 possible attachments for each then that's a lot of combination of attachments. Maybe it's something like 5^5.

opaque ocean
#

Can the "Override:true," tag for recipes work on modded recipes? if not, is there a way to do something similar to other mod's recipes without outright editing and reuploading them?

tribal marsh
#

Do I have to edit items/newitems.txt as Base or can I insert an item by importing Base? When I do the latter it "works" but shows the module name in front of the item's name.

opaque ocean
stray kestrel
#

hmmm. does anyone know what happened to that modder Zeno?
all of his mods are off the workshop today

weary matrix
#

I need testing and feedback please! πŸ˜„

mint sphinx
#

i know that feeling xD

cold burrow
weary matrix
#

will be created automatically as soon as I add it, then the link will become valid

#

thanks for noticing πŸ˜„

weary matrix
near scarab
#

Are there any mods that turn lightbulb fuel consumption to 0?

drifting stump
#

adding that option to the audio menu was something else

bitter frigate
tribal marsh
#

Although, that thumbnail .... I'm sorry

bitter frigate
tribal marsh
#

Yeah, its pretty good isn't it haha

undone crag
winged lotus
weary matrix
vapid lotus
#

someone should make a working tazer and handcuffs

cold burrow
undone crag
#

I think lassoing a zombie and putting a sack over it and having it pull your trailer would be good.

winged lotus
cold burrow
bitter frigate
# undone crag Which did you try though? The ModData one or the Lua variable one?

the first time i tried them i tried them both, because my reading comprehension has not improved in the last 5 hours. i tried the lua variable and it's returning nil. i also tried just the first part of the ModData version and it's ALSO returning nil. i cannot get the third part of my code to work at all, so i don't know if it's because i'm misformatting the code you offered or because it's not working in the first place

undone crag
#

gib code plz

bitter frigate
#

i'm fairly sure this is pretty badly bungled but it's what i have now. i have it backed up to when it was printing 120 for blood sugar if you'd like that

Diabetes = {}

-------------------------------------------------------------------------------------------------
-- debug ----------------------------------------------------------------------------------------
function Diabetes.PRESSED(key)
   print("Key Pressed " .. tostring(key))
    if key == Keyboard.KEY_COMMA then
        print("Comma Pressed")
        print(SugarValue)
    end
end

Events.OnKeyPressed.Add(Diabetes.PRESSED)
-- debug ----------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------


-------------------------------------------------------------------------------------------------
-- creates blood sugar --------------------------------------------------------------------------

function Diabetes.EXIST(playerOrSurvivor)
  playerOrSurvivor:getModData().Diabetes = {SugarValue = 120}
end

Events.OnCreateLivingCharacter.Add(Diabetes.EXIST)


-------------------------------------------------------------------------------------------------
-- raises blood sugar --------------------------------------------------------------------------

local ModData = player:getModData().Diabetes
modData.SugarValue = 0.5 + modData.SugarValue

    if (SugarValue >= 400) then
        setBodyDamage(getPlayer():getBodyDamage() + (0.05))
    end

    if (SugarValue < 40)
        setBodyDamage(getPlayer():getBodyDamage() + (0.08))
    end
end

Events.EveryTenMinutes.Add(Diabetes.CalculateSugarValue)```
bitter frigate
undone crag
#

You deleted the start of the last function?

#

Also you can reload Lua with restarting the game, in case you did not know.

undone crag
#

What software are you writing the code in?

#

If you are putting SugarValue in mod data then your Diabetes.PRESSED function is going to need to be different.

#
getPlayer():getModData().Diabetes.SugarValue
bitter frigate
undone crag
#

:/

#

If you overcome your fear grasshopper then you will have convenience overcoming the price.

mint sphinx
#

next mod @undone crag doing is bloodpacks and hemoglobin count πŸ˜›

undone crag
#

orly o_O

#

I do not get it and I demand an explanation.

mint sphinx
#

i think it will be so close to each other that you could see if the player needed more blood for healing or if it just wounds his heath is base on