#mod_development

1 messages · Page 107 of 1

naive crescent
#

You could always try to find a way to read the values on the bite wound and when they get to a thresh hold increase it back to the top

dark wedge
#

There are event functions that run periodically such as:
EveryDays
EveryHours
EveryTenMinutes
EveryOneMinute
You could add a function to one of these here, and just re-apply the bite. Personally, I would recommend EveryDays which runs at midnight; could make the description like the wound re-opens at that time

ancient grail
#

Could be same as the old one

naive crescent
#

Thats a way better idea

ancient grail
#

Or could be same

rancid panther
#

i dont want the bite to reapply in the case that they do get the cure

naive crescent
#

that little tick box in the health screen

#

When you get the cure turn infected off and get that slider down to 0

rancid panther
#

what about while the bandage is on, wouldnt that overwrite the bandage and make an open wound again

naive crescent
#

give me a sec

rancid panther
#

but i also dont mind the wound healing, i just think the bite healed too fast because it isnt bleeding

naive crescent
#

then if thats the case add a function that keeps the infected check box ticked

#

untill cure = true

fast galleon
#

@ancient grailshould work 👍

#

I need more coffee

dark wedge
fast galleon
#

a bit buggy but would do what you want

rancid panther
#

oh wow i was just about to paste what i had currently

#

player:getBodyDamage():getBodyPart(BodyPartType.ForeArm_L):SetBitten(true, true)

#

so would i add that after setbitten?

#

i'll probably try and test it tomorrow. i dont wanna keep myself up too late again

dark wedge
#

From what I understand, you apply the bite (or re-apply it if its gone missing in your case) with SetBitten(true, true)
I haven't tested it, but i think this re-opens the wound which afaik you don't want if its used again. So this is only to initially apply it.
If you just want to reset the time so the bite is always there or there longer use, setBiteTime(biteTime)

naive crescent
#

Maybe have have the infected check box ticked a function of the trait your using

#

And have the cure remove the trait when used

#

and turn off the infected check box

rancid panther
#

here is an example of what it looks like when the bite was applied during some tests before

#

could i set the bite time really high so it just takes a while to heal no matter what or is there a cap to the wound times?

naive crescent
#

Im sure you can, but someone else would have to weigh in,

#

Doesnt the trait give the bite?

rancid panther
#

yea

naive crescent
#

and you want it to heal over but stay infected?

rancid panther
#

i dont really care if it heals over but it healed too fast

#

and i think it is cuz bite time is automatically 0

dark wedge
#

ohhh, when you just spawn it with SetBitten(true, true) it does set it to 0

#

so yes, you will need to then use: player:getBodyDamage():getBodyPart(BodyPartType.ForeArm_L):setBiteTime(biteTime)
Directly after you apply it

rancid panther
#

in a separate line?

dark wedge
#

yes.

naive crescent
#

yea

#

below the first

rancid panther
#

and how about bleed time? setBleedTime?

#

what is the time measurement in this case?

ancient grail
#

coffee break guys

dark wedge
#

Continuing from the example before:

Bitten.apply = function(playerIndex, player) 
    if player:HasTrait("Bitten") and not player:getModData().bitten then
        player:getBodyDamage():getBodyPart(BodyPartType.ForeArm_L):SetBitten(true, true)
        player:getBodyDamage():getBodyPart(BodyPartType.ForeArm_L):setBiteTime(500) -- example time, pick your own
        player:getBodyDamage():getBodyPart(BodyPartType.ForeArm_L):setBleedTime(500) -- example time, pick your own
        player:getModData().bitten = true
        player:getInventory():AddItem("Base.Bandage")
    end
end
ancient grail
#

first time to avail nitro

#

used my own animatons for it 🙂

rancid panther
#

is it measured in ticks?

#

or seconds?

dark wedge
#

uhhhh, however the game does its healing. not sure. its weird, you'll have to just get bit a few times and get that value

rancid panther
#

actually nvm since first aid affects that too

#

ok thanks

#

i'll just go get bit and see what the default bite time is

dark wedge
ancient grail
#

getPlayer():getHumanVisual():getBeardModel()
getPlayer():getHumanVisual():getHairModel()
getPlayer():getHumanVisual():getHairColor()
getPlayer():getHumanVisual():getBeardColor()
getPlayer():getHumanVisual():getSkinTextureIndex()
getPlayer():getBodyDamage():getOverallBodyHealth()
getPlayer():isOnFire()
getPlayer():isGhostMode()
getPlayer():isGodMod()
getPlayer():isInvisible()
getPlayer():getDescriptor():isFemale()
getPlayer():getNutrition():getWeight()
getPlayer():getNutrition():getCalories()
getPlayer():getStats():getHunger()
getPlayer():getStats():getFatigue()
getPlayer():getStats():getBoredom()
getPlayer():getStats():getEndurance()
getPlayer():getStats():getMorale()
getPlayer():getStats():getSanity()
getPlayer():getStats():getAnger()
getPlayer():getStats():getSickness()
getPlayer():getStats():getThirst()
getPlayer():getStats():getFear()
getPlayer():getStats():getStress()
getPlayer():getStats():getDrunkenness()
getPlayer():getStats():getStressFromCigarettes()
getPlayer():getBodyDamage():getFoodSicknessLevel()
getPlayer():getBodyDamage():getPoisonLevel()
getPlayer():getBodyDamage():getUnhappynessLevel()
getPlayer():getBodyDamage():getBoredomLevel()
getPlayer():getBodyDamage():getInfectionMortalityDuration()
getPlayer():getBodyDamage():getInfectionTime()
getPlayer():getBodyDamage():getInfectionLevel()
getPlayer():getBodyDamage():getInfectionGrowthRate()
getPlayer():getBodyDamage():getFakeInfectionLevel()
getPlayer():getBodyDamage():IsInfected()
getPlayer():getBodyDamage():IsFakeInfected()
getPlayer():getBodyDamage():getCatchACold()
getPlayer():getBodyDamage():getWetness()
getPlayer():getBodyDamage():getColdStrength()
getPlayer():getStats():setHunger(0);
getPlayer():getStats():setFatigue(0);
getPlayer():getStats():setBoredom(0)

dark wedge
#

After you get bit. zombie

ancient grail
#

getPlayer():getStats():setSickness(0)
getPlayer():getStats():setThirst(0)
getPlayer():getStats():setFear(0)
getPlayer():getStats():setStress(0);
getPlayer():getStats():setDrunkenness(0)
getPlayer():getBodyDamage():setFoodSicknessLevel(0);
getPlayer():getBodyDamage():setPoisonLevel(0)
getPlayer():getBodyDamage():setUnhappynessLevel(0)
getPlayer():getBodyDamage():setStressFromCigarettes(0)
getPlayer():getBodyDamage():setInfected(false);
getPlayer():getBodyDamage():setHasACold(false);
getPlayer():getBodyDamage():setInfectionMortalityDuration(-1);
getPlayer():getBodyDamage():setInfectionTime(-1);
getPlayer():getBodyDamage():setInfectionLevel(0);
getPlayer():getBodyDamage():setInfectionGrowthRate(0);
getPlayer():getBodyDamage():setFakeInfectionLevel(0);
getPlayer():getStats();
getPlayer():getStats():getSickness()
getPlayer():getStats():setSickness()
getPlayer():getStats():getBoredom()
getPlayer():getStats():setBoredom()
getPlayer():getStats():getPanic()
getPlayer():getStats():setPanic()
getPlayer():getStats():getFear()
getPlayer():getStats():setFear()
getPlayer():getStats():getDrunkenness()
getPlayer():getStats():setDrunkenness()
getPlayer():getStats():getEndurance()
getPlayer():getStats():setEndurance();
getPlayer():getStats():getFatigue()
getPlayer():getStats():setFatigue();
getPlayer():getStats():getThirst()
getPlayer():getStats():setThirst()
getPlayer():getStats():getHunger();
getPlayer():getStats():setHunger();
getPlayer():getStats():getStress()
getPlayer():getStats():setStress();
getPlayer():getBodyDamage():getBoredomLevel()
getPlayer():getBodyDamage():setBoredomLevel()
getPlayer():getBodyDamage():getFoodSicknessLevel()
getPlayer():getBodyDamage():setFoodSicknessLevel();
getPlayer():getBodyDamage():getPoisonLevel()
getPlayer():getBodyDamage():setPoisonLevel()
getPlayer():getBodyDamage():getUnhappynessLevel()
getPlayer():getBodyDamage():setUnhappynessLevel()
getPlayer():getBodyDamage():getStressFromCigarettes()
getPlayer():getBodyDamage():setStressFromCigarettes()

getPlayer():getNutrition():getWeight()
getPlayer():getNutrition():setWeight()
Calories

getPlayer():getBodyDamage():setInfected(false);
getPlayer():getBodyDamage():setHasACold(false);
getPlayer():getBodyDamage():setInfectionMortalityDuration(-1);
getPlayer():getBodyDamage():setInfectionTime(-1);
getPlayer():getBodyDamage():setInfectionLevel(0);
getPlayer():getBodyDamage():setInfectionGrowthRate(0);
getPlayer():getBodyDamage():setFakeInfectionLevel(0);

getPlayer():getBodyDamage():getBodyParts()

getPain()
setWoundInfectionLevel()
RestoreToFullHealth()
setInfectedWound()
SetBitten
bitten

setBleedingTime()
bodyPart:getBleedingTime()
bodyPart:haveBullet()
bodyPart:setHaveBullet()
bodyPart:isDeepWounded()
bodyPart:getD

#

you need that or not

rancid panther
#

well i think the health panel tells u automatically anyway in debug mode

#

but thank u

dark wedge
#

oh yea. sleepy brain here. drunk

ancient grail
#
local bodyParts = getPlayer():getBodyDamage():getBodyParts();
for i=bodyParts:size()-1, 0, -1  do
local bodyPart = bodyParts:get(i);
bodyPart:RestoreToFullHealth();
bodyPart:SetInfected(false);
bodyPart:setInfectedWound(false);
bodyPart:SetFakeInfected(false);
bodyPart:setWoundInfectionLevel(0);    

for i=BodyPartType.ToIndex(BodyPartType.Hand_L), BodyPartType.ToIndex(BodyPartType.ForeArm_R) do
local part = self.character:getBodyDamage():getBodyPart(BodyPartType.FromIndex(i));
maxTime = maxTime + part:getPain();
end

#

just posting it here if you need any of those

#

@rancid panther

rancid panther
#

thanks

#

im gonna try first by just setting bite time since it is already in the format i currently am using

#

could i also add IsBleeding(false) or something? so it can be like an old bite that is just there

#

not bleeding and permanently bitten as a reminder

#

how do i reopen the command console once closed?

#

got it nvm

naive crescent
#

Im not sure if bleeding is a boolean variable or a float but I dont see why not

naive crescent
rancid panther
#

i cant find it

#

even when bleed time is 0 or it doesnt say the wound is bleeding in health panel, i still bleed

#

so maybe it isnt

naive crescent
#

Maybe theres more to it.

rancid panther
#

it's okay. i think set bite time is more than enough for what i want to achieve

naive crescent
#

I really dont know, im still a rookie when it comes to coding PZ and have never messed with that system, I just understand coding fundamentals to be able to give you these suggestions

rancid panther
#

50-ish is the default and 500 and 5000 both work without causing errors

#

so i could probably set it high enough so that the wound never heals. not sure if it will re-infect tho if u take a cure

#

im gonna have to check that out too

naive crescent
#

im sure any value would work without causing problems

#

Well any value within a reasonable limit, id doubt exponents work xD

rancid panther
#

if im still bitten and i take a cure, i wonder if it will make me infected again. i cant uncheck IsInfected while i am bitten in debug menu at least

#

but when i remove the bite, i am able to uncheck it

naive crescent
#

No you would do that it could

#

It would be like

rancid panther
#

but maybe the cure mod already has something in place for that

#

it might already do that for me without me needing to do it myself

naive crescent
#

It honestly might

#

I dont have it installed so I cant test

rancid panther
#

i'll test rn

ancient grail
#

Glytch3r's List of PZ Stuff:
(you may edit this and improve on it add on it)
https://docs.google.com/spreadsheets/d/1Wf08bl7Cq2jRyKDJPsWI_Tm8Iiq4LgxvIyL4e2xSDmU/edit?usp=sharing

naive crescent
#

Or it might just remove the bite all togeher

ancient grail
#

thats even more resource

naive crescent
#

Holy fuck dude

#

You just gave me the rosetta stone right here.

ancient grail
#

and i trust everyone will add on it instead of troll it

rancid panther
#

LOL
this is my test subject i guess

ancient grail
naive crescent
#

@rancid panther Earlier today I told you there isnt a dictionary for all this shit. Apperently theres something close.

rancid panther
#

lmao

naive crescent
#

Ive been playing with PZ code on a off for a year now and I have no idea why I avoided this part of the discord until today.

#

Dumb move on my part

rancid panther
#

yep looks like They Knew already does remove infection while keeping the bite

#

however, bite time is still 0, i think i need to make it its own function like i did with everything else

naive crescent
#

and the only thing thank for me being here today is the Baloney sausage

#

In Baloney I trust

naive crescent
ancient grail
#

ye help me keep backups

#

i cant do this alone anyways

naive crescent
#

downloaded it.

#

Will probably through it on might off site backup as well

ancient grail
#

thnx

ancient grail
rancid panther
#

ah... im dumb. i was using the non-changed version instead of the one i edited

rancid panther
#

once i set bite time to 5000 i think i'll be pretty much set with this mod

naive crescent
#

Im a jack of all trades when it comes to my skills but I specialize in coding.

rancid panther
#

nice

#

i only am coding cuz i wanted an item kit trait mod that didnt give freebies for rare loot players (and ended up going overboard and making new occupations and now a bitten trait)

ancient grail
ancient grail
#

yeah alot of modder says i only wanted to do some minimal stuff ended up not having to play the game ever after that

#

cuz of modding

naive crescent
#

PZ is my favorite game, been playing for 11 years at this point. I gotta make some real fucked scenarios to get me there these days and now at this point this mods out there arent enough.

naive crescent
rancid panther
#

i have a group i play with and we have been camping outside of louisville for 2 weeks. we were supposed to go in but one player has not been available and wants us to wait

ancient grail
#

like minded individuals 🙂

naive crescent
#

I have a crew too that just started up again.

#

But they dont play hardcore like I do

rancid panther
#

i usually mod in the dead of the night when i dont have time to play with others

naive crescent
#

the 'No Phony Bologna' mod I made today was actually me being distracted from the hardcore mods im working on

rancid panther
#

lol

naive crescent
#

Which im glad because that very very hilarious (to me) distraction I had today is why im hear because it brought me away from lua scripting whicn I can figure out into the java hardcoded which I cant do alone.

rancid panther
#

seems like boots expanded causes a break on error in debug mode that forces you to force quit the game

naive crescent
#

Yea it does

#

It also causes some clothing to become invisible

#

like a certain fire fighter jacket

#

not all of them just a particular one

#

and actually just regular vanilla jacket it fucks with too.

rancid panther
#

yea but that's with a lot of clothing mods. some of them have masks that turn chunks of the body invisible

#

the better ones have less masking issues

naive crescent
#

Ive never seen an issue with anyone them besides that one and I roll with pretty much alll of them besides that one

rancid panther
#

awesome. bite time works too

#

i guess that means my bite trait is officially working as intended

naive crescent
#

What you got left?

rancid panther
#

nothing atm. i only add if i have an idea or notice some balance issue

#

i got the bite idea from when someone made an occupation that gives u +10 everything and asked how to balance it lmao

#

and i decided to try it myself

naive crescent
#

I gotta balance vehicle spawns tomorrow which aint going to super fun.

#

Gonna be super monotonous

rancid panther
#

found another thing

#

the bandage doesnt last that long

naive crescent
#

To become a dirty bandage?

rancid panther
#

the player also gets occasional pain but i think im fine with that. makes it a negative trait even when it is cured

#

yeah. but i think that's fine. just replace the bandage

naive crescent
#

Yea id be careful with that one.

#

If youre doing a public mod it could cause conflicts

rancid panther
#

i'll look into making the bite not damage you or bleed or something. ideally i want it to be a dormant bite like if you were ellie from the last of us

#

just a scar

naive crescent
#

Im sure its possible

#

But thats probably starting to tip into the soft/hardcoded area

rancid panther
#

yea. i wanna make this as beginner friendly as possible

#

unless there is a statement that lets me just turn off the bleeding i dont really wanna go deep into it

naive crescent
#

Fuck that crank everything to 11 in my books

rancid panther
#

true. if i had more time i'd really dedicate myself to perfecting this

#

but i'd actually learn how to code lua instead. i dont have too much interest in programming in all honestly

#

just in the spur moments when i wanna try something

naive crescent
#

Im sure you learned a whole hell of a lot tonight

rancid panther
#

yes. i learned where to put my indentations LOL

naive crescent
#

Yea that first script I read of yours was rough

rancid panther
#

but fr thanks for everything! i'll do my best to make this mod the best i can make it

naive crescent
#

gave me an aneurism

#

No problem dude

#

Its an interesting experience for myself because Ive known how to code for a good many years now but have never had to explain it to someone before

rancid panther
#

i basically just took ppl's examples from searching this channel or copying other mods and frankensteined things together until i had something worth asking a question with

naive crescent
#

Thats how I started

#

When I was making my own small games

#

Even now I do the same thing. Ill find something thats close to what im doing and study the code and write my own version

rancid panther
#

cuz i didnt wanna ask how to do something while having nothing of my own, and was embarrassed to show something completely dysfunctional when asking for advice

#

so after i got basically the first 3 lines of code i asked questions from there

naive crescent
#

I felt weird when I came in here to ask my question as well.

#

Didnt realize how friendly everyone was going to be here.

rancid panther
#

yes

naive crescent
#

I came to ask one question which I solved within the hour and that was like 12 hours ago and ive just been here chatting and talking about code

rancid panther
#

if bite time by default is 50... and im p sure it lasts like a month in vanilla... maybe i should make it around 600 so it lasts a year?

naive crescent
#

but then every bite you would get lasts a year though

#

and if your bitten on your arms and forearms especially your right one your fucked

#

You cant swing a weapon

rancid panther
#

im pretty sure it only affects the bite on spawn

#

i'll give myself an arbitrary bite rn to test

naive crescent
#

oh if thats the case go for it

rancid panther
#

yeah it is just initial bite

naive crescent
#

Oh thats cool

rancid panther
#

bite time is 64

naive crescent
#

Seems like your cooking up a pretty cool mod there

rancid panther
#

this is the only trait that dpes anything special

#

the rest are just skills and starting items

naive crescent
#

I dont know theres cool ones out there

#

Big fan of lead foot

rancid panther
#

i mean on my mod

naive crescent
#

oh okay

rancid panther
#

the rest of my mod is just an occupations and traits mod using profession framework

#

i balanced it based on play style. so the occupations are generalist, builder, mechanic, homemaker, explorer, and brute

naive crescent
#

What do you mean play style?

#

Like the play style that you are intending

rancid panther
#

based on what ppl like to do in the game rather than a lore-based occupation

naive crescent
#

Ah okay

rancid panther
#

some ppl build bases, fix up cars, cook and farm, or live in the wilderness

naive crescent
#

Thats interesting

rancid panther
#

generalist is gets fast learner, and brute is just supposed to piss off everyone else in the group with useful skills in the base

#

so i made the brute illiterate so they cant read books to make up for lost skills

naive crescent
#

Can you chose traits yourself or is it only based on the occupation you pick

rancid panther
#

the traits are ur starting weapon and their corresponding weapon skill, and there are some secondary skill traits that let you pick a secondary skill that isnt Carpentry, Mechanics, Cooking, or Fishing

#

and they also have profession exclusive traits so i can lock out certain traits from occuaptions

brute cant pick pacifist or weak, etc for example. nor can it pick the traits that are applied to each profession by default

#

here's an example from each category

#

i actually was able to do these without profession framework until i wanted to add starting clothes. then i had to switch over for simplicity

#

but i wasnt able to do things like put items inside a bag anymore, nor was i longer able to add an upgrade to a gun the player spawned with

naive crescent
#

Thats very interesting.

#

Now I see why you wanted it tied into the Profeesion Framework

rancid panther
#

so the bitten trait has nothing to do with the rest of the mod. i just wanted to do that for my own amusement

naive crescent
#

Honestly I had not been paying attention to why you were doing this or where it was going I was just paying attention to the questions as they came

rancid panther
#

no prob

naive crescent
#

I didnt have time I was working on my own thing 😛

rancid panther
#

if i didnt attempt to use prof framework from the beginning for that trait i probably couldve had the answers a lot sooner

#

but i learned a lot from this

naive crescent
#

Im sure you did.

#

Its quite the project to take on for your first time.

#

Code structure is looking way cleaner too.

rancid panther
#

do u wanna see how it looked before?

naive crescent
#

I did see but ill see it again xD

#

I tried cleaning it up for you at one point but it was taking to much time.

rancid panther
#

before using prof framework

#

wasnt comfortable keeping it tho cuz i was basically copying someone else's mod and changing the items

naive crescent
#

So are any of these yours currently?

rancid panther
#

those are all scrapped code in a DO NOT DELETE folder

#

i did it in profession framework cuz i couldnt figure out how to have some things with the framework and some things without

#

and for consistency

#

so that is actually all mine

naive crescent
#

That's cool man. Really good job you've done tonight.

rancid panther
#

thank you!

naive crescent
#

Impressed honestly.

rancid panther
#

my private discord is basically full of screenshots of other ppl's examples, and to-do lists of what to do with my mod or my mod list

#

"add bitten trait"
then later it becomes
"add bitten trait" try again another time

naive crescent
#

Lmao.

rancid panther
#

but now it can be
add bitten trait DONE

naive crescent
#

I'm starting a private discord for mods. Working on its structure atm.

rancid panther
#

all my stuff is in general

naive crescent
#

I'm a stickler for organization so I'm working on that at the moment.

rancid panther
#

all my manga recommendations, to-dos, modding advice, and memes

#

i also do like organization tho. i usually learn something to do one thing only

#

i learned how to use spreadsheets so i can make a spreadsheet that automatically sorts through pokemon names so i can cheat on pokemon crossword puzzles

naive crescent
#

Hold off on what your typing for a second.

rancid panther
#

and i learned how to use discord integrations to use IFTTT to post instagram announcements to a club discord

#

a

naive crescent
#

Let's take this to DMs

rancid panther
#

it seems the bite time is pretty variable. sometimes it goes down faster. so i dont wanna set it too high or too low

naive crescent
#

It's just me and you spamming at this point.

rancid panther
#

sure, dm me. but i think im gonna head to bed soon anyway. after i update the workshop mod

nova socket
#

Since we doing that

red tiger
#

@nova socket Good work.

#

Although you could store getSprite() and {} in the 2nd post.

ancient grail
red tiger
#
local props = getSprite(sprite):getProperties();
for i,p in ipairs(fields) do 
    if toggle then 
        props:Set(p, "", toggle);
    else 
        props:UnSet(p);
    end
end
naive crescent
#

Thanks everyone

#

I got a ton of really good resources tonight

nova socket
ancient grail
#

welp everything is there on the guide collection and tools coolelction

red tiger
#

I need coffee.

naive crescent
#

Its my first spending time here I havent looked at all the other stuff yet

ancient grail
#

double dose of coffee lol

naive crescent
#

Lmao im going to bed

#

See yall later, thanks for the good time tonight

ancient grail
#

anyone knows how to avoid this

#
local result = "" 
local what2 = "" 
local what = getScriptManager():getAllItems()
    for i = 0, #what:size() -1 do 
         what2 = what:get(i):getName()
        result = result .. tostring(what2) .. "\n"; 
        print(what2)
    end 
Clipboard.setClipboard(result); 
fast galleon
#

stdin:1: attempt to get length of a number value

red tiger
#

I have coffee.

#

2 hazelnut cold coffees from McDonalds.

fast galleon
#

coffee comes in, code comes out

red tiger
#

Wish I could continue working on my current projects but will need to put on hold for a few days.

red tiger
#

I found this very nice Electron app template that I can use to build utility software. Might get back to building a script-building helper for things like item scripts.

#

Might look for nice bootstrap themes if that's what happens.

#

Leaving this here in case this is useful for someone who might see it.

ancient grail
#

how do i insert entry on logs

#

i havent tried that

fiery pecan
#

hoo boyo. So I was fiddling with some things, and uhh...
this seems to do literally nothing :/
Also can't figure out how to make a hotbar slot always available, like the back slot

#

anybody know what I'm doing wrong?

#

I can also provide more info if needed

neon bronze
#

You need a xml data for that aswell

fiery pecan
#

wait... I do?

modern dirge
#

Hi, does anyone know if its possible to replace shader files with a mod automatically, or do the files have to be manually replaced?

neon bronze
#

mine is just a blank texture and doesnt show anything

fiery pecan
#

alr

#

thankies

ancient grail
fiery pecan
ancient grail
#

Thread

fiery pecan
#

ah

#

found it

ancient grail
#

Ok

#

Goodluck

thick karma
ancient grail
#

Ow right

modern dirge
#

i edited the fog.frag file in media/shaders and was wondering if this file can be replaced when the game is loaded so can be removed without diving into the files

ancient grail
ancient grail
#

Mod

thick karma
#

Polt was trying to help you see what the error is saying... You're trying to get the length of something that doesn't have a length

ancient grail
#

Dont mess with the vanilla files u will encounter error eventually

thick karma
#

Look at where you get lengths in that snippet

ancient grail
thick karma
#

That's one way to do it

ancient grail
#

Ok

thick karma
#

What other things for getting length did you use above?

#

There is another

#

Look carefully

ancient grail
#
local result = "" 
local what2 = "" 
local what = getScriptManager():getAllItems()
    for i = 0, #what:size() -1 do 
         what2 = what:get(i):getName()
        result = result .. tostring(what2) .. "\n"; 
        print(what2)
    end 
Clipboard.setClipboard(result); 

The clipboard

#

The result

#

And the print

#

The print!

thick karma
#

No those don't get lengths

#

No

left nest
#

I need help w mod, saw it on yt and don't know name of it

thick karma
#

Look at line 5 in your snippet @ancient grail

ancient grail
#

Ok? So what2?

#

Should i tostring first?

thick karma
#

Think length

fiery pecan
thick karma
#

Tostring is not for length

ancient grail
thick karma
#

Print is not for length

ancient grail
thick karma
#

Look at your 5th line very carefully

ancient grail
#

get(i)??

thick karma
#

I'm sorry it's your 4th line

#

It looks like 5th on my phone

ancient grail
#

Ahhh i know now

thick karma
#

Ayyyyy

ancient grail
#

Lol # and size

thick karma
#

Yeeees

ancient grail
#

Hahaha

#

Dumdum

thick karma
#

You took length of a thing that was already a length

#

Good job

ancient grail
#

😅

thick karma
#

(good job spotting it, not doing that, lol)

#

(lol actual good job not sarcastic good job)

ancient grail
#

Thank you senpai

fiery pecan
#

I have the XMLs in place. FileGuidTable setup

#

if I set the bodyLocation to "back" it works fine

#

but then you won't be able to wear a bag with it :/

thick karma
#

When I was playing on 0-1 minute infection time, my bite time showed up as literally 1/60th.

#

On the dot

#

@dark wedge

ancient grail
#

just pick anymod

fiery pecan
#

I did

ancient grail
#

maybe the model

#

what is the rror

#

error

fiery pecan
#

I looked at how AuthenticZ did it

#

well

fiery pecan
#

literally this

#

it's technically a bag, not a belt

ancient grail
#

ah then define the body location

fiery pecan
#

I did

ancient grail
#

maybe you have to define it as such then

fiery pecan
thick karma
ancient grail
#

imean as inventory container idk what its called tnh

fiery pecan
ancient grail
#

why are you hiding it

fiery pecan
fiery pecan
thick karma
fiery pecan
#

on it

thick karma
#

@fiery pecan i mean the item script as well

#

From the txt

#

In scripts

fiery pecan
#

ah

thick karma
#

My instinct at a glance says CanBeEquipped looks wrong.

fiery pecan
thick karma
#

Oh no BodyLocation

#

You wrote DutyBelt but I have no idea such a location exists

fiery pecan
#

It's custom

thick karma
#

I think the body location is named Belt

#

Ohhh

fiery pecan
#

because "Belt" does the same thing

cosmic condor
#

the color scheme hurts my eyes

#

better post the text file

fiery pecan
#

here's the fanny pack script

thick karma
#

I didn't know you could make custom body locations by just declaring them in the item script

fiery pecan
#

nono

#

you need lua too

#

I think?

#

here's how I defined it

#

but then again I probably did something wrong...

fiery pecan
thick karma
#

I wouldn't expect it to be able to know where to equip anything from that alone

#

How would the game know where the DutyBelt goes?

fiery pecan
#

hmm

#

then again

#

if I just use "Belt"

#

same thing. No option to wear

thick karma
#

Looks like the fanny pack script has ClothingItemExtraOption

sour island
#

There's a few mods that mess with body locations - should use Soul Filcher's method/API approach

thick karma
#

Does yours?

#

Oh no hold on I see

#

Fanny packs have extra equipment options nvm

#

Where does the game define FannyBackPack body location?

fiery pecan
sour island
#

I don't know if he released it as an stand alone API but if I recall it should be in his dressing time mod

fiery pecan
#

k

sour island
#

It's something on the Todo for the community patch as well

#

As I understand it - when modifying body locations they have to be added in order -- so most mods overwrite the entire list

fiery pecan
#

k

sour island
#

I could be mistaken, but I recall someone mentioning he wrote a wrapper for it to handle multiple mods

thick karma
#

But he suggests he literally overwrites something in likely to be incompatible way, so you may wanna consider that when doing your own locations.

sour island
#

Oh?

thick karma
#

"WARNING: This mod may not be compatible with other major clothing mods that try to override body location definitions."

sour island
#

I'll have to look into decorating the java function on the Lua side sooner

#

Idk if that's the best approach, but that's what I'm thinking -- load the locations into a table at first

#

Allow for extra arguments for priority or "add after X"

thick karma
#

I have never messed with body defs sorry... Was hoping something familiar would pop out at me but I may not be able to help much on this one.

fiery pecan
#

I just don't get it

neon bronze
# fiery pecan
item Leather_Wallet{
        DisplayCategory = Container,
        WeightReduction = 10,
        Capacity = 5,
        Weight = 0.1,
        Type = Container,
        ClothingItem = WalletMod,
        ClothingItemExtra = Leather_Wallet,
        ClothingItemExtraOption = Wallet_WearPocket,
        DisplayName = Leather - Wallet,
        Icon = Wallet_01,
        WorldStaticModel = Wallet,
        PutInSound = PutItemInBag,
        BodyLocation = wallet,
        CanBeEquipped = wallet,
    }

this is my def for my custom wallet, you might need the ClothingItemExtra and ClothingItemExtraOption(this one is the translation of how the option should be called in the context menu, without it wont give you an option)

fiery pecan
#

but won't that show up even when worn?

neon bronze
#

you mean the option to wear it? No

fiery pecan
#

and what is this? "Wallet_WearPocket"

neon bronze
#

its the option you need to define it in the translation files

#

ContextMenu_Wallet_WearPocket = "Put in Pocket",

#

it will show up as "Put in Pocket" when you right click the wallet

#

without there wont be an option

fiery pecan
#

ah

glass basalt
#

Hello 👋 I am having an issue trying to find the method that allows me to remove vehicle parts. Would it be simply damage() or setCondition()?

ancient grail
#

try this... look for the part and then nill

#

idk if it will work

glass basalt
#

just set it to nil?

ancient grail
#

try it yeah

#

idk worth a shot

#

like

#

getPlayer():setPrimaryHandItem(nil)

#

this works

#

well its not deleted but lets see how vehicles react

#

unless someone gives you the right answer your best choice right now is to try my suggestion

glass basalt
#

seems then that vehicle:getPartById('id'):setCondition(nil) might work then. idk, i'll see

ancient grail
#

ahh

#

yeah youcan set the part itself

#

to 0

#

getPart():getId()

#

something like that

glass basalt
#

would that actually remove the part or have the part damaged and broken?

ancient grail
#

if its 0 its broken

#

oh yeah

eternal garnet
#

@cosmic condor I am at "ProjectZomboid\zombie\iso\objects"
and I have found "IsoCompost".

This is not the file that I am looking for as I am attempting to edit the parameters of the Composter so as to allow for it to be placed inside of a building/ indoors.

Do you have happen to know where the text file for the object is located?

Many thanks

ancient grail
#

just try it

#

lol

glass basalt
#

yep, brb

fiery pecan
eternal garnet
cosmic condor
#

VS Code

eternal garnet
#

Thanks

eternal garnet
#

I imagine you configured yours?

glass basalt
#

have you worked with Java in VSCode before?

cosmic condor
eternal garnet
#

If we are opening the same file, I don't have that option to extend it

ancient grail
#

one of the guide links on the thread look for decompiling java

glass basalt
#

switch to the second tab like Riko's showing you. idr its name, I don't have VSCode on this machine lol

eternal garnet
neon bronze
# fiery pecan

how did you define your item? did you name the files correctly and put them in the right folders?

ancient grail
thick karma
#

Does it work?

glass basalt
#

setCondition() doesn't work but I should've known better

ancient grail
#

so its still there but its broken\

#

loook at the mechanics timedaction

#

or the admin functions

#

admins can naturally remove the parts right

#

with mechanics cheat on

#

i would look there

drifting ore
#
ISTimedActionQueue.add(ISUninstallVehiclePart:new(playerObj, part, time))
``` that probably get you there
#

ISUninstallvehiclepart

ancient grail
#

Yes just set time to 0

#

Probably not gona work if server sided tho not sure

drifting ore
#

nah i just meant follow it lol

ancient grail
#

Bye

#

Goodluck with pz tho stress_shake2

#

The syntax is changed

glass basalt
#

Funnily enough, I found a workaround, by simply not "repairing" KI5's vehicle with the armor parts, and by setting the skin index to one that has the vehicle part layout I want
I no longer need to remove parts using timed actions 🤷‍♂️
Time to update my mod

ancient grail
#

whats your mod

ancient grail
#

nice

#

so it actualy animates the airdorop?

glass basalt
#

unfortunately not. the best that Insurgent can do is add parachute sounds, but i haven't added any of my own

sullen jay
#

hey, i see that the modding wiki is pretty barebones, where do i find more documentation?

glass basalt
#

at the moment the vehicle spawns using the debug menu

sullen jay
glass basalt
#

its java and lua. the Lua is actually Kahlua, which is a Java interpreter of Lua, or whatever the proper terminology is

#

The game is built off of Java (which you cannot modify, only access), and everything is added through Lua (which you can modify)

sullen jay
glass basalt
#

java, dude... stressed

thick karma
#

Also, you can decompile the Java and read it, and sometimes you can spot sneaky ways to use Lua to interrupt Java

ancient grail
#

mod resources

thick karma
#

Example: middle of a Java function decides whether to draw an XP halo note. It requires the player to be alive for more than 1 minute. I hid these notes by temporarily setting the player's time survived to 0.

#

So while Java code cannot be modified, you can sometimes influence how it behaves.

sullen jay
sullen jay
fiery pecan
#

but basically I'm trying to convert a clothing item into a wearable container

#

so yes. It all checks out. Minus the wearing option

hot patrol
#

maybe even add a trait or make it so if you choose bald or receading hair styles they don't grow past that point

glass basalt
#

you would need to overwrite the "timed events" that dictate your hair & beard after a certain point, I think

#

the trait could be a head version of "Short-sighted" (need to always have a hat to avoid mood debuff)

hot patrol
ancient grail
hot patrol
#

bald trait makes you more visible to zombies during the day

#

the shine

ancient grail
#

just ook on the game time or count the days by using day events

#

then just swap the hair

glass basalt
ancient grail
#

yes

#

correct

sour island
#

The way hair growth works does need work but it's also alot of work too

#

For not much gain tbh

ancient grail
#

if you need the names of the hair

#

and beard

sour island
#

Every hair style would need two models to parse if the person is balding or not

ancient grail
hot patrol
ancient grail
#

you probably need to disable the vanilla hair growth

sour island
#

Hair growth goes down the list if I recall

#

The issue is specifically for bald or balding/bald spots

zinc pilot
#

asking to more experience modders: has anyone ever managed to swap between different animations for stock actions like moving\attacking?

#

I mean, like, switching between the vanilla ones and modded ones in real time

#

not just switching them out for modded ones

ancient grail
#

i dont underrstand pao sounded like the same..

zinc pilot
#

yeah sorry

ancient grail
#

what exactly do you mean

#

did you ment lioke not replace but another parallel

zinc pilot
#

exactly

#

that's it

ancient grail
#

ok so you have to create a server and client command

solar turtle
#

Hi. I'm looking for someone who has knowledge of photoshop and modeling to create a tile pack, a logo and design some in-game tiles for me, for possible paid work. If you might be interested, give me a dm.

ancient grail
#

i can share you the resource i got from dislaik he said it can be used for public but dont remove his signiture or atleast mention him

#

ill send it to you via dm

glass basalt
#

having a weird problem. If I get the player's current IsoGridSquare, assign it to a variable, modify the variable's X and Y coordinates, and assign it to a spawned vehicle, it somehow "deletes" the square the player is on, and traps them within it 🤣

#

how do I fix this, I am trying to make a vehicle spawn a certain amount of squares away from the player

sour island
#

If you're trying to spawn a vehicle in an unloaded square you'll have to either forcibly load it or keep the spawning in a list and spawn it when the square loads.

glass basalt
#

The square is next right to the player in the same cell

sour island
#

Vehicles also need a bit of room to spawn

glass basalt
#

with AddVehicleDebug you can spawn vehicles directly onto the player

sour island
#

You can dictate a xyz

glass basalt
#

I think my issue is that the variable is inheriting the player's square and modifying it, causing it to move and the player to disconnect from the map

sour island
#

Just do players xyz + what ever

glass basalt
#

It needs an IsoGridSquare object 😔

sour island
#

Are you sure there's no overload?

#

If not use getSquare(x,y,z)

glass basalt
#

I will change the variable to use GetGridSquare instead of GetCurrentSquare

#

apparently you can't subtract from the coordinate integers 🤦‍♂️
how do I write strings to the logger? (or comment, idk)

sour island
#

I'm not sure what you mean about subtracting coords

glass basalt
#

I would like the vehicle to spawn two squares up and four squares left of the player

#

If I do x + 4 and y + 2, it works as intended the other way

#

If I do x - 4 and y - 2 it throws an error

sour island
#

What is the error

glass basalt
#

one min, ill redo my changes

#

strange, now it doesn't work for any changes
function: SpawnLUVAndItems -- file: AirdroppedLUVTrait.lua line # 17 | MOD: Insurgent Profession - Airdropped LUV Add-on function: OnNewGame -- file: AirdroppedLUVTrait.lua line # 45 | MOD: Insurgent Profession - Airdropped LUV Add-on java.lang.RuntimeException: Object tried to call nil in SpawnLUVAndItems at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:82) at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:971) at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163) at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980) at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1812) at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66) at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139) at zombie.Lua.Event.trigger(Event.java:64) at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:134) at zombie.iso.IsoWorld.init(IsoWorld.java:2846) at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:268) at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:225) at java.base/java.lang.Thread.run(Unknown Source) Error says the square doesn't exist. Haven't had this issue before

#

ah, I am passing a nil parameter into my function. gonna fix that

sour island
#
local vehicle = addVehicleDebug(vehicleType, IsoDirections.getRandom(), nil, square)
#

Square can be getSquare(x,y,z)

#

Where x is getPlayer():getX()-n etc

#

I would also recommend rather than copy paste what I did 3 times for xyz, to store the player as a local and call getX() from that

glass basalt
#

here is what I have
`local currentSquare = player:getCurrentSquare();
-- local vehicleX = currentSquare:getX() + 2;
-- local vehicleY = currentSquare:getY() + 1;
-- local vehicleSquare = getGridSquare(vehicleX, vehicleY, currentSquare:getZ());
local vehicleSquare = getGridSquare(currentSquare:getX(), currentSquare:getY(), currentSquare:getZ());

local vehicle = addVehicleDebug("Base.74amgeneralM151A2", IsoDirections.S, nil, vehicleSquare);`

#

top three lines currently commented

sour island
#

What is player

#

What is getGridSquare() ?

glass basalt
#

player is the IsoObject for the player character, I think

#

getGridSquare() is what returns the IsoGridSquare object that I need

sour island
#

I mean where is player being defined

#

I'm not familiar with getGridSquare as the function name - are you sure that is a global?

glass basalt
#

it is a parameter being brought outside of the code, I need to dig around to find the exact object that it is

#

i frankly don't know what IsoGridSquare is. If I could see what the X and Y integers are, I would have an idea

#

it is likely the squares of a cell

sour island
#

IsoGridSquares are the tiles, yes

#

The issue I think you have is the global function is getSquare()

glass basalt
#

unless its the wrong class

#

the other methods use IsoGridSquare.getSquare, is that what I want? Or is this outdated in some form

sour island
#

The class for global functions is Lua Manager

drifting ore
#

if i use onCanPerform for a recipe. will that overwrite the entire recipe script? or will it only execute what's in the function and not overwrite something unless it's specifically affected?

sour island
#

onCanPerform can be used to hide a recipe

drifting ore
#

ishidden can also right?

#

my goal is to use sandbox var to set amount needed for recipe

sour island
#

If you're trying to remove recipes from the game there's a method you have to use. It was mentioned a few times here

#

Oh

drifting ore
#

i seen that. not doing that here

sour island
#

You can use scriptManager to mess with recipes

drifting ore
#

i looked into recipecode.lua but it's just not clear on how to adjust the amount needed

#

unless im blind

sour island
#

Not home at the moment but you can check out recipe stuff in expanded Helis github

drifting ore
#

perfecfgt

#

that will work TY

quasi kernel
#

Me when it's been so long since I last touched my farming patch that I forgor how it worked

drifting ore
#

love that you responded. because your previous posts almost got me there pwr

#

haha so close

#

every example of my successful scripts and codes will be released public after im done here this week

quasi kernel
#

Very nice

drifting ore
#

hopefully others can write nicer and better stuff with it lol

#

i'm even doing silly stuff like random context menu options with each right click lol.. .useless but fun

quasi kernel
#

Oooo!

#

Okay yeah I have literally no idea what I did in my own mod

#

The sponk

drifting ore
#

i did change it a little since then so the subcontext always says i should tinker with electronics and the main says silly stuff

#

a little more straightforward with direction 😄

ancient grail
#

is there a way for the /save

#

to be less intrusive

drifting ore
#

like how

drifting ore
#

nice title upgrade also 🙂

ancient grail
#

nice

ancient grail
glass basalt
#

AHA I got it working now. Thank you for the help, I didn't consider that I was calling a function that is out of scope

naive crescent
#

Good day everyone, I once again am asking for your assistance but not about scripting question its about workflow optimization. I feel like im loosing a ton on time during iterating and testing. I know you can reload lua files at runtime in debug but when im testing things like spawn rate I'm constantly quitting out and starting a new game so I can see how changes im making behave. So im curious if theres anything that could speed this process up. Something I have done to make the workflow less monotonous is I've created some macros; one that that from the main menu when activated will go from that menu all the way through the process of starting the new game in a custom sandbox options.

bronze yoke
#

you can mess with spawn rates in the debug console and then call ItemPickerJava.Parse()

naive crescent
#

What would that do exactly?

#

Also how you mess with spawn rates in the debug console

bronze yoke
#

if you're testing spawn rate, it lets you live update the spawn rates so you won't have to restart the game every time

naive crescent
#

I havent played with the console at all yet

bronze yoke
#

it's just a lua terminal

naive crescent
#

Would I be able to just call a method name alone in it?

bronze yoke
#

yeah

#

you just write lua code in there as normal

naive crescent
#

I mean if I had a script with a method like

Example()
do X

would I be able to only write Example() in the console and have it execute its logic

bronze yoke
#

yeah, if the function is global

#

something to keep in mind if you write full code into it is that every console 'message' is its own scope - locals won't be shared or anything

naive crescent
#

Alright, thanks for the tip. In my case I'm actually doing vehicle spawn rates. Is restarting a new world the best way about doing it or is there a way I can reset chunks from the console?

bronze yoke
#

ohhh that might be different

naive crescent
#

I had a feeling.

bronze yoke
#

there's probably a similar method, but ItemPickerJava won't be relevant, of course

naive crescent
#

I knew when you mentioned it it wasn't going to help me but I wanted to see where you were going with that incase I needed that information in the future.

ancient grail
#

@zinc pilot

zinc pilot
#

goddamn, you're amazing with animations

naive crescent
#

Oh sweet another preview, I sent the one you posted last night to my friends a little bit ago

flat berry
#

dayum, kinda sick. hope u work more on the sheet animation tho

naive crescent
#

Really cant wait for you to finish that

ancient grail
naive crescent
#

You talking about the one on the right where all the scripts that are loaded into the game?

ancient grail
#

Yes

naive crescent
#

Yea I knew about that

#

Super useful

ancient grail
#

Theres a search bar ow ok

#

Cool

naive crescent
#

Oh what

#

Theres a search bar

ancient grail
#

Hehe ye

#

No one noticed hehe

naive crescent
#

K i need to see that live. Ive wasted lots of time scrolling and hoping I land around where I want to

ancient grail
#

Haaha true i used to scroll till i hit thay by accident

#

Mindblown

dark wedge
#

Thanks y'all. Will be a bit longer now since I'm messing with the unarmed stuff too a bit.

naive crescent
#

Thats why I asked this workflow question was to get game changers like that

dark wedge
naive crescent
#

If I were to start a new game and then edit the vehicle spawn rates at run time they would apply to any unloaded chunk correct?

flat berry
#

putting knife away

#

not shit animatiuon

#

XD

#

like

#

hiding knife

naive crescent
#

Sheath

flat berry
#

in your pocket or wahteer

#

ye

#

sheath

#

i mean

#

mb

naive crescent
#

Its okay

flat berry
#

i was pooping

#

so typing on my phone

#

fat fingered

#

probs

naive crescent
#

Thats the tell tale sign that im using my phone as well.

ancient grail
#

We dont need to hear that

#

Lol

dark wedge
#

ohhhhhhh. I wasn't planning on touching those animations at the moment.

naive crescent
#

a community that poops together stays together

flat berry
#

at least on the vid he puts knife away with left hand in his left pocket twisting his arm doing it then the knife appears on right side

#

xd

stone garden
#

day 100 waiting for mod idea happen

true vault
#

Any idea how to bulk remove everything, including clothing, from a characters inventory?

tame mulch
thick karma
#

@rancid panther Just learned something about adding traits that you will want to know

true vault
drifting ore
thick karma
#

@rancid panther If you add your traits in lua/client they will not show up correctly during certain client-server interactions. Specifically the Check Stats page will not show traits that a client has if the traits were only added in clientside code, and the traits may even later disappear from characters who have them as a result of the mismatch.

#

They need to be in lua/shared.

tame mulch
sour island
naive crescent
#

Im looking forward to messing around with that if they make it public

ancient grail
#

whatsup with world dictionary error

nova socket
#

day 10 (or something) im still doing an API mod for my actual mod

thick karma
#

What kind of mod?

#

@nova socket

nova socket
thick karma
#

You mean like NPC traders?

nova socket
#

Visually yeah, not AI based thou

thick karma
#

Makes sense, so you plan to have pseudo-NPCs that set up shops and such? Have you looked at Shops & Traders or Noir's Shops?

#

Btw is this gonna be multiplayer compat?

nova socket
nova socket
#

I'm going for currency as physical (item-based) concept you can acquire roaming the world most unexpected places to loot.

thick karma
#

Word. So are you going to have player shops as well as NPC shops?

nova socket
#

Nah, not players shops, might be later on as extension but I think there is plenty of such already.

thick karma
#

Word. How do you plan for the loot they sell to be determined?

#

I know player shops are generally designed by the player obv... I don't know how Noir does NPC shops tbh.

nova socket
#

I wanna look into writing/reading some JSON-like content from mod itself, so not to tie it to sandbox options or something

#

I seen people being doing that successfully

#

As for shop distribution its pretty much gonna be up to admin settings

thick karma
#

So would that be managable by the server admin? Or determined by you?

true vault
#

My next question
What's the function to return if player is male/female character?

nova socket
#

Random of N, full sets, etc.

nova socket
nova socket
#

I'll throw some deets as soon as I'm sure myself about them @thick karma KEK

#

Currency mod is around the corner thou. Just cleaning up

thick karma
#

Sounds intriguing. I am curious because I am planning to do gamepad support for at least one trading mod. I was mostly looking at Player Shops and Trading because I know Chuck is around a lot and Noir disabled comments on the workshop page iirc.

#

If you and Chuck are covering entirely different niches I might want to look into what you're doing when you make more progress, because if it's lit enough I will probably consider doing support for that, too.

nova socket
#

Sure

thick karma
#

I did gamepad support for the vanilla trade menu just recently. You can see the implementation in Wookiee Gamepad Support. May want to consider the options available before you design rather than after.

#

Linear connections and minimalism in the shortcut buttons will be ideal, to put it simply. Inventory panel based context options are good for making sure everyone can access the necessary functions.

nova socket
#

where do you get all the sprites for world objects?

ancient grail
true vault
thick karma
ancient grail
#

Perhaps

#

Add him on steam

#

Try

thick karma
#

Pretty sure he does not want that

ancient grail
#

Ok

thick karma
#

If he wanted to be randomly contacted by users of his mods, he would not disable comments.

ancient grail
#

Incoming red named person's msg

ancient grail
#

🫡

#

On it

thick karma
ancient grail
#

Text editor idea intelij

thick karma
ancient grail
tame mulch
thick karma
#

I see I see

naive crescent
ancient grail
#

Installing mod is irrelevant for modder so im skipping that

tame mulch
ancient grail
#

Can you link a zip of all folders vanilla on the mod_structure

naive crescent
#

Ive notice a few pages like that

ancient grail
#

Just folders nothing else
Cuz the modtemplate sucks

#

Of all the things to give as example

#

Someone decided map

#

Perhaps a recipe and item script with a custom module

bronze yoke
#

on the mod structure page you say lua files in server folder only execute on the server, server folder executes on any

ancient grail
#

Yes tried and tested for me too

#

Server execute client stuff too

bronze yoke
#

server doesn't execute the client folder

ancient grail
#

Mod_problems solution

Verify files

naive crescent
#

I dont know if its been said but 'Mod problems solutions' I dont see any talking about checking load orders

ancient grail
#

Guide them how to do so

naive crescent
#

Some mods require them

ancient grail
#

Warning should be disclaimer instead

#

Warning quotes danger

#

Disclaimer is just you should know that

naive crescent
tame mulch
ancient grail
#

They can

tame mulch
#

Only in Host

ancient grail
#

On the ini file

#

Yes but prett much the guide should speak to all server owners too right

#

Anyways thank you for your hard work sir aiteron

ancient grail
#

We appreciate it just so u know

naive crescent
#

Really nice to see the guide being fleshed out.

sour island
#

I have a test suite printing stuff from host and connections in respect to server-code and client-code -- these are the terms I've been using to help keep what's being discussed clear. Hosts run only server code, but connections run both. You can even juggle stuff in such a way that even in MP clients are running the server code. I've only been able to do this when shared is involved.

#

If there isn't a reason for connections to be running server-code then it was maybe an oversight or related to how SP works

#

This is something modders should be aware of if they use Events.x.Add() in shared

#

adding Events.OnTick.Add() in shared will run both

#

These tests were conducted through the main menu hosting - so I don't know how it is different to other connections joining in.

faint jewel
#

anyone seen @umbral echo lately?

sour island
fast galleon
#

Check logs for errors

You need to go the zomboid folder: usually on Windows it's
%UserProfile%\Zomboid

There you will find the console.txt file which has your most recent logs. For server / host there's also coop-console.txt. Most errors can be found by searching for "Stack Trace or "Severe". Older logs can be found in the Logs folder, DebugLog.txt with date and time.

Usually you can see which mod causes the issue when you find the top error, you should test if this happens when only that mod is enabled (no mods for vanilla) to see if it's a compatibility issue. Report the issue with all relevant info and the uncropped stack trace.

*If the game gets stuck loading, starting host is interrupted or stuck, then check the last lines of the logs.


Check pins in #mod_support

#selfpins error logs

sour island
#

I feel like there was a pin with that info on it - but I guess it got scrubbed

true vault
# tame mulch ```lua local inv = playerObj:getInventory():getItems() for i=1, inv:size() do ...

.> having an error with this lolz..

function makeNewCharacter()
    local playerObj = getSpecificPlayer(0)
    playerObj:clearWornItems()
    local inv = playerObj:getInventory():getItems()
    for i=1, inv:size() do
        local item = inv:get(i-1)
        ISRemoveItemTool.removeItem(item, playerObj)
    end
end
Events.OnCreatePlayer.Add(makeNewCharacter)

The error being:

STACK TRACE
-----------------------------------------
Callframe at: get
function: makeNewCharacter -- file: custom_functions.lua line # 41 | MOD: Medievaloid

ERROR: General     , 1675721442424> ExceptionLogger.logException> Exception thrown java.lang.reflect.InvocationTargetException at GeneratedMethodAccessor48.invoke.
ERROR: General     , 1675721442424> DebugLogStream.printException> Stack trace:
java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at se.krka.kahlua.integration.expose.caller.MethodCaller.call(MethodCaller.java:62)
    at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:198)
    at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:188)
    at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:182)
    at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:1007)
    at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
    at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
    at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1812)
    at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
    at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
    at zombie.Lua.Event.trigger(Event.java:64)
    at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:134)
    at zombie.gameStates.GameLoadingState.exit(GameLoadingState.java:405)
    at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:105)
    at zombie.GameWindow.logic(GameWindow.java:298)
    at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
    at zombie.GameWindow.frameStep(GameWindow.java:765)
    at zombie.GameWindow.run_ez(GameWindow.java:681)
    at zombie.GameWindow.mainThread(GameWindow.java:495)
    at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException: Index 7 out of bounds for length 4
    at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
    at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source)
    at java.base/jdk.internal.util.Preconditions.checkIndex(Unknown Source)
    at java.base/java.util.Objects.checkIndex(Unknown Source)
    at java.base/java.util.ArrayList.get(Unknown Source)
    ... 23 more
true vault
#

It has an issue with "get" for some reason. Only on 4 items though; it removes all the others, but not the belt, shoes, socks, and water bottle... removes backpack, key ring, etc... lolz

fast galleon
#

I think it's good info for the wiki

sour island
#

it is

fast galleon
#

for inv:size(), 1, - 1 do

true vault
#

hmm, alright I'll try that then and see, thanks :3

sour island
#

What's ISRemoveItemTool ? 😮

fast galleon
#

I think it's the debug tool for removing items.

sour island
#

I wrote something to deal with syncing issues and MP

#

I'm curious if it's similar

#

Oh it's a window

true vault
#

Thank you! ❤️

sour island
#

probably has to do with the list changing size as you remove stuff

naive crescent
#

or just for performance

sour island
#

For my shop code to prevent duplications

naive crescent
#

Oh okay

sour island
#

ISRemoveItemTool.removeItem has some extra stuff - I might switch to it

true vault
sour island
#

that's a java array to be clear

#

Lua tables maintain size but collapse up-to the last non nil entry

fast galleon
#

@ albion#0123 ? , literacy mods. Please don't block rereading recipe books...

buoyant violet
bronze yoke
austere forum
#

hello, im really, really new into lua and scripts, and i wanted to know if there is a guide or a quick explanation on how to make weapon mods, like, i wanna know what are the script lines to determine which Aim skill is good to be able to use the weapon comfortably, like if i have 1 aim skill i wont hit nothing but if i have 2 aim skill i will, if anyone helps it would be awesome!

fast galleon
stone garden
#

can anyone make an mod for me ? im an long time waiting i got an cool idea

sour island
stone garden
#

i cant bruh

weak sierra
#

ur not gonna find someone to pay for a mod then

#

takes hours and frustration to make one

#

if ur idea is good nuff maybe someone will like it enough to do it 🤷‍♀️

fast galleon
#

Learn to make mods, maybe find better job with that knowledge.

sour island
ancient grail
faint jewel
#

an old school homie.

ancient grail
ancient grail
sour island
#

Yes, modders don't work unless they're verbally abused

#

You're being too considerate of other's time

ancient grail
#

He joined various mod server in search of luck
But non thus far
Guy has no shame whatsover

" Been waiting 100 days " like someone entitled him

Modders work hard dude dont treat us like your magic wand or something

humble oriole
#

So, I'm removing items from a container from the server side, and I call

sendObjectChange("containers") after then do
ISInventoryPage.renderDirty = true on the client side

But, if I don't reload the inventory window in the game, manually, the next items I place in the inventory just get deleted. I'm not sure what I'm doing wrong with this :/

ancient grail
#

heres what i did

#

without the toSell:getContainer():removeItemOnServer(toSell);

#

it respawn when login back in

humble oriole
#

well, the only items that respawn are the items that were "lost" when the inventory didn't refresh

ancient grail
humble oriole
#

it'd be almost better if we could just force a refresh of the inventory UI elements

ancient grail
#

same thing that im dealing

humble oriole
#

biowastecontainer:Remove(item)

#

this works for me, but, I'm forcing them to do an action

#

and all the backend stuff is happening via a servercommand

ancient grail
#

i integrated atmv2 with chucks shops and traders mod.. but when we did that part where it exchange directly to wallet data money it doesnt push thrue chuck said its there but not refreshin

humble oriole
#

I thought .renderDirty was supposed to do it, but it doesn't seem to actually refresh the UI just call for the UI to need to be refreshed or something

ancient grail
#

whats the force action?\

#

yeah

#

idk

humble oriole
#

I make them right click on it

rancid panther
#

do you keep a copy of your mod in your workshop folder, or only put them in there when you want to update the workshop mod? cuz if im subscribed to my own mod with the same mod id it seems to pull from two places at once and cause errors

#

or load incorrectly

#

at least when i update a mod and during the time period it hasnt updated on workshop yet

drifting ore
#

just create another folder

#

not sure what others do

thick karma
#

@rancid panther

  1. Remove your workshop item from your testing server.
  2. Unsubscribe from your mod.
  3. Restart Zomboid.
  4. Add your workshop item to your Mods section of your testing server (not via Workshop Items).
drifting ore
#

that issue was the bane of my existence for a week lolol

#

i have a "pre-workshop" folder

#

yea burryaga give exact advice of what to do

rancid panther
#

i have my mod in my mod folder, and a version for when im testing changes, and another copy in my workshop folder

#

all with different mod ids

sour island
thick karma
#

And, yes, I keep all of my in-development mods in Workshop once v1 is live. Sometimes I do early testing in Zomboid/mods, but anything serious is in Zomboid/Workshop.

#

@rancid panther

drifting ore
#

see instruction # 2 from them 🙂

sour island
#

I've still not figured out a way to deal with returning to development after playing though - right now I just make it a point to unsub my own mods

thick karma
#

I have 1 copy of my mods in Workshop. When I need to make updates, I unsub. If you need a backup, make a backup.

rancid panther
#

atm im just not subscribed to my mod so i have no issues

sour island
#

Yes but if you want to play your in progress mods will cause problems

#

hence setting up a development cache folder

rancid panther
#

but last night when i was updating it willy nilly, it did have issues until i unsubscribed

#

anyways, was just wondering how other ppl dealt with it. thanks!

sour island
#

np - as mod lists are a thing I'm hoping it would be possible to separate which directory they're in

#

would help deal with not having to unsub

copper sleet
#

Is there a way to find errors or conflictions? (Sorry I'm new to modding PZ)

humble oriole
#

I just change the modid of the testing mods and only copy over the media folder to the workshop mod with the correct id for prod.

copper sleet
#

I've got this SIXIS black market trader mod that refuses to let me place the vending machines but the machines work when they're in my inventory. So was looking to see if it could be a load order issue and how to find the load order error

humble oriole
#

The later the mod is in the modid list the higher the priority.

#

Which is only to say if two mods have the same file in the same folder the later mod overwrites the earlier mod

copper sleet
#

And should the Mod ID and workshop ID be in that same order?

#

Again I apologise for the questions, this is new territory for me

humble oriole
#

We do tiles and maps first then QOL, but mods SHOULD be written in a way that order DOESN’T matter, with the exceptions of requirements which is different

humble oriole
drifting ore
sick umbra
#

Does anyone knows how to make a gun shoot faster than "RecoilDelay = 0"?

cosmic condor
sick umbra
cosmic condor
#

hmm

#

edit item value in debug mode and test if it's fast enough for you

#

I used to modify a revolver so that it shoots like a machine gun

sick umbra
#

its because I wanna make the weapons I'm modding to shoot faster than the highest firerate available and I don't know if it's possible to do that in a simple way. Because what I'm thinking now is I'd need to get the zombies in the line of fire and make a pseudo-shooting multiple bullets

cosmic condor
#

checked it's RecoilDelay and AimingTime

bronze yoke
#

are you using a custom animation?

#

weapon timings are heavily tied to their animations

sick umbra
sour island
#

I don't recall, can you require server files from shared?

drifting ore
sour island
#

ah that would explain that

drifting ore
#

konijima to the rescue lol.

sour island
#

I moved my flare system to server as part of my 'true serverside' update

#

but recipe stuff seems to be done in shared as per vanilla

#

Guess I can't module it :<

#

I guess I could load it in onboot instead

naive crescent
#

item Tshirt_DefaultDECAL_TINT this is shirt that has the color picker right?

#

Im sure it is but I want to clarify.

vast nacelle
#

Is there a nice list for which encoding to use for each language's translation files?

drifting ore
#

am i crazy or isn't there a universal one? UTF-8 or something like that. unless there is some very specific languages or something i'm missing.

vast nacelle
#

I've gotten comments before saying UTF-8 doesn't display Cyrillic and Latin languages correctly.

drifting ore
#

i'm interested to hear on this because that would mean some of my schooling was wrong. (which i don't doubt) LOL

#

but i was under the impression it absolutely cover Cyrillic and Latin

#

if you find out, outside of here, can you report back please?

vast nacelle
#

Will do.

bronze yoke
#

there was a guide to them on the wiki

cosmic condor
#

for some languages not listed on the wiki, you can check the encoding in the language.txt file
steamapps\common\ProjectZomboid\media\lua\shared\Translate\XX\language.txt

cunning canyon
#

Trying to test out my mod in multiplayer using the "Host" option on the main menu. Where is that option pulling mods from? I keep getting "File does not exist on server" errors

drifting ore
#

if doing nosteam then it would be user\zomboid\mods

cunning canyon
#

I should have mentioned I'm doing this on MacOS. Believe I figured it out though, you have to go into the Project Zomboid.app which is funny to me but whatever

nova socket
#

So which sounds are transmitted over network, there are few kinda.
So who hears IsoPlayer:playSound() and getSoundManager():PlayWorldSound() ?

drifting ore
#

thinking of building a mod, i want to change the multiplier rate at which frozzen foods rot. (normal 25X) ive never touched zomboid moding before. does this sound like a thing that is doable with the modding system? or is stuff like that hardcoded into the game in such a way that it cant be alterd via the mods.

weak sierra
#

you can make an autopatcher for that

#

but it's not the simplest thing to start with

#

you could also make it manually item by item, with either DoParam or overrides

#

a heuristic for what spawns frozen though im not sure how doable that is

#

i guess anything that spawns in a freezer rather than a fridge would work

#

so u'd wanna crawl the distribution tables

#

and anything that spawns in a freezer and is rottable

#

modify the lifespan of it with DoParam

drifting ore
#

is there no way to directly change the way in which freezing itself works?

or is freezing's effect on rot time dictated by stats assigned to individual items?

weak sierra
#

it works by time elapsed being applied when a player accesses the item

#

and it uses a value on each individual item

#

i am not sure if the freezing system is in lua or java, if it's in lua then maybe you could patch it at a higher level

ancient grail
weak sierra
#

im goin to bed, gl

ancient grail
weak sierra
#

gn glytch

ancient grail
humble oriole
ancient grail
#

Without that the stuff you delete comes back when you relogin

#

You can try it without then logout login

#

Then add that line before you actually delete the stuff

nova socket
ancient grail
#

Ammm idk but thats what i use

#

Probably something else
Like if the player is the emiter

#

Only time i used player as emitter was for chainsaw. The rest i use square

stiff furnace
#

Hello! Has anyone messed with setBumpType/getBumpType? I am trying to find all the possible strings that could go with it