#mod_development
1 messages · Page 107 of 1
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
Could be same as the old one
Thats a way better idea
Or could be same
i dont want the bite to reapply in the case that they do get the cure
Then have it when infected = true reapply
that little tick box in the health screen
When you get the cure turn infected off and get that slider down to 0
what about while the bandage is on, wouldnt that overwrite the bandage and make an open wound again
give me a sec
but i also dont mind the wound healing, i just think the bite healed too fast because it isnt bleeding
then if thats the case add a function that keeps the infected check box ticked
untill cure = true
ah, actually there is: player:getBodyDamage():getBodyPart(BodyPartType.ForeArm_L):setBiteTime(biteTime)
Should be able to just reset the wound
a bit buggy but would do what you want
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
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)
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
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?
Im sure you can, but someone else would have to weigh in,
Doesnt the trait give the bite?
yea
and you want it to heal over but stay infected?
i dont really care if it heals over but it healed too fast
and i think it is cuz bite time is automatically 0
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
in a separate line?
yes.
and how about bleed time? setBleedTime?
what is the time measurement in this case?
coffee break guys
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
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
actually nvm since first aid affects that too
ok thanks
i'll just go get bit and see what the default bite time is
You can get this in the console with:
print(getPlayer():getBodyDamage():getBodyPart(BodyPartType.ForeArm_L):getBiteTime())
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)
After you get bit. 
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
well i think the health panel tells u automatically anyway in debug mode
but thank u
oh yea. sleepy brain here. 
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
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
Im not sure if bleeding is a boolean variable or a float but I dont see why not
Thats quite the resource to keep on hand thanks
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
Maybe theres more to it.
it's okay. i think set bite time is more than enough for what i want to achieve
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
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
im sure any value would work without causing problems
Well any value within a reasonable limit, id doubt exponents work xD
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
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
i'll test rn
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
tables
_G,vanilla traits,lua events,ISWorldObjectContextMenu,ISInventoryPaneContextMenu,luautils,ISBaseTimedAction,AttachedWeaponDefinitions,ProceduralDistributions.list,BodyPartType,DamageModelDefinitions,ClothingSelectionDefinitions.default,ClothingSelectionDefinitions,public enum EventType,Es...
Or it might just remove the bite all togeher
here
thats even more resource
and i trust everyone will add on it instead of troll it
LOL
this is my test subject i guess
😅 youre welcome
thanks for all your help!
@rancid panther Earlier today I told you there isnt a dictionary for all this shit. Apperently theres something close.
lmao
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
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
and the only thing thank for me being here today is the Baloney sausage
In Baloney I trust
Ya no worried man, trolling this would just be hurting one's self.
thnx
ah so you new to modding ? or was modding but never was socially active?
ah... im dumb. i was using the non-changed version instead of the one i edited
happens to all of us
once i set bite time to 5000 i think i'll be pretty much set with this mod
Was modding here and there, worked with a crew this time last year that was developing there own animation framework but stopped after the winter unitl this winter again. But I have a degree in Game design & Development so im new to this scene but not to coding and game development
Im a jack of all trades when it comes to my skills but I specialize in coding.
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)
awsome intro glad to have you with us 🙂
hows it going with that?
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
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.
Glad to be aboard, I cant believe how much fun ive had just interacting with this discord channel tonight.
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
like minded individuals 🙂
I have a crew too that just started up again.
But they dont play hardcore like I do
i usually mod in the dead of the night when i dont have time to play with others
the 'No Phony Bologna' mod I made today was actually me being distracted from the hardcore mods im working on
lol
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.
seems like boots expanded causes a break on error in debug mode that forces you to force quit the game
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.
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
Ive never seen an issue with anyone them besides that one and I roll with pretty much alll of them besides that one
awesome. bite time works too
i guess that means my bite trait is officially working as intended
What you got left?
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
I gotta balance vehicle spawns tomorrow which aint going to super fun.
Gonna be super monotonous
To become a dirty bandage?
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
Yea id be careful with that one.
If youre doing a public mod it could cause conflicts
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
Im sure its possible
But thats probably starting to tip into the soft/hardcoded area
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
Fuck that crank everything to 11 in my books
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
Im sure you learned a whole hell of a lot tonight
yes. i learned where to put my indentations LOL
Yea that first script I read of yours was rough
but fr thanks for everything! i'll do my best to make this mod the best i can make it
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
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
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
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
I felt weird when I came in here to ask my question as well.
Didnt realize how friendly everyone was going to be here.
yes
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
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?
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
im pretty sure it only affects the bite on spawn
i'll give myself an arbitrary bite rn to test
oh if thats the case go for it
yeah it is just initial bite
Oh thats cool
bite time is 64
Seems like your cooking up a pretty cool mod there
this is the only trait that dpes anything special
the rest are just skills and starting items
i mean on my mod
oh okay
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
based on what ppl like to do in the game rather than a lore-based occupation
Ah okay
some ppl build bases, fix up cars, cook and farm, or live in the wilderness
Thats interesting
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
Can you chose traits yourself or is it only based on the occupation you pick
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
Thats very interesting.
Now I see why you wanted it tied into the Profeesion Framework
so the bitten trait has nothing to do with the rest of the mod. i just wanted to do that for my own amusement
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
no prob
I didnt have time I was working on my own thing 😛
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
Im sure you did.
Its quite the project to take on for your first time.
Code structure is looking way cleaner too.
do u wanna see how it looked before?
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.
before using prof framework
wasnt comfortable keeping it tho cuz i was basically copying someone else's mod and changing the items
So are any of these yours currently?
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
That's cool man. Really good job you've done tonight.
thank you!
Impressed honestly.
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
Lmao.
but now it can be
add bitten trait DONE
I'm starting a private discord for mods. Working on its structure atm.
all my stuff is in general
I'm a stickler for organization so I'm working on that at the moment.
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
Hold off on what your typing for a second.
and i learned how to use discord integrations to use IFTTT to post instagram announcements to a club discord
a
Let's take this to DMs
it seems the bite time is pretty variable. sometimes it goes down faster. so i dont wanna set it too high or too low
It's just me and you spamming at this point.
sure, dm me. but i think im gonna head to bed soon anyway. after i update the workshop mod
Since we doing that
check out my FunctionalATMv2 you can take the no sledge thing if you want
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
Sure, but this thread is mainly for sharing any useful scripts, so if you want to share it - dew it
welp everything is there on the guide collection and tools coolelction
imean yeah
lol
point taken
I need coffee.
Its my first spending time here I havent looked at all the other stuff yet
double dose of coffee lol
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);
stdin:1: attempt to get length of a number value
coffee comes in, code comes out
Wish I could continue working on my current projects but will need to put on hold for a few days.
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.
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
You need a xml data for that aswell
wait... I do?
Hi, does anyone know if its possible to replace shader files with a mod automatically, or do the files have to be manually replaced?
yep
thats from my mod you need to create a bodylocation definition and a .xml file where you describe what it as far as i know
mine is just a blank texture and doesnt show anything
Check out clothing guides on the links
What do you mean by shader
links? The Forums?
Thread
@ancient grail this message was for you
Ow right
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
Hi polt. So how do you suppose i make it work i want to clipboard all the items
For the reference on the guide i posted
It will work if you copy the folder and create own nod
Mod
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
Dont mess with the vanilla files u will encounter error eventually
Look at where you get lengths in that snippet
Idk what it means tho
U mean the :size() ?
That's one way to do it
Ok
What other things for getting length did you use above?
There is another
Look carefully
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!
I need help w mod, saw it on yt and don't know name of it
Look at line 5 in your snippet @ancient grail
Think length
seems the list of guides doesn't help me with this issue. Looked at AuthenticZ, they use vanilla animations.... So defining the animation won't help. The custom bodyLocations work fine for AuthenticZ too.
It's just like the blasted thing doesn't wanna work :/
Tostring is not for length

Print is not for length

Look at your 5th line very carefully
get(i)??
Ahhh i know now
Ayyyyy
Lol # and size
Yeeees
😅
(good job spotting it, not doing that, lol)
(lol actual good job not sarcastic good job)
basically my issue is there's no option to wear the belt.
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 :/
I think it's measure in fractions of in-game hours
When I was playing on 0-1 minute infection time, my bite time showed up as literally 1/60th.
On the dot
@dark wedge
if the guides failed u you need to look at reference
just pick anymod
I did
this
literally this
it's technically a bag, not a belt
ah then define the body location
I did
maybe you have to define it as such then
Can you post your xml and a vanilla belt for comparison?
imean as inventory container idk what its called tnh
one sec
why are you hiding it
hiding what?
And a vanilla belt item script?
ah
My instinct at a glance says CanBeEquipped looks wrong.
It's custom
because "Belt" does the same thing
here's the fanny pack script
I didn't know you could make custom body locations by just declaring them in the item script
nono
you need lua too
I think?
here's how I defined it
but then again I probably did something wrong...
which ones you need?
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?
Looks like the fanny pack script has ClothingItemExtraOption
There's a few mods that mess with body locations - should use Soul Filcher's method/API approach
Does yours?
Oh no hold on I see
Fanny packs have extra equipment options nvm
Where does the game define FannyBackPack body location?
you got any links or names to the API in question?
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
k
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
Looks like here https://steamcommunity.com/sharedfiles/filedetails/?id=2296517419 @fiery pecan
k
I could be mistaken, but I recall someone mentioning he wrote a wrapper for it to handle multiple mods
But he suggests he literally overwrites something in likely to be incompatible way, so you may wanna consider that when doing your own locations.
Oh?
"WARNING: This mod may not be compatible with other major clothing mods that try to override body location definitions."
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"
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.
I just don't get it
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)
but won't that show up even when worn?
you mean the option to wear it? No
and what is this? "Wallet_WearPocket"
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
ah
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()?
just set it to nil?
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
seems then that vehicle:getPartById('id'):setCondition(nil) might work then. idk, i'll see
ahh
yeah youcan set the part itself
to 0
getPart():getId()
something like that
would that actually remove the part or have the part damaged and broken?
@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
yep, brb
does this happen to change the color or "reset" the wallet?
you have to look further
What program is that
VS Code
Thanks
have you worked with Java in VSCode before?
If we are opening the same file, I don't have that option to extend it
you need the decompiled version
one of the guide links on the thread look for decompiling java
switch to the second tab like Riko's showing you. idr its name, I don't have VSCode on this machine lol
That would be why then
how did you define your item? did you name the files correctly and put them in the right folders?
mod Resources thread
setCondition() doesn't work but I should've known better
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
ISTimedActionQueue.add(ISUninstallVehiclePart:new(playerObj, part, time))
``` that probably get you there
ISUninstallvehiclepart
nah i just meant follow it lol
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
whats your mod
unfortunately not. the best that Insurgent can do is add parachute sounds, but i haven't added any of my own
hey, i see that the modding wiki is pretty barebones, where do i find more documentation?
at the moment the vehicle spawns using the debug menu
You have to explore this treacherous place
https://projectzomboid.com/modding/index.html
package index
ah, thanks
also is modding only lua or java and lua, as i've seen the game is made in java?
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)
ah, okay thanks for the clarification!
java, dude... 
(There are however modifier functions accessible through Java... Just to be clear, you cannot modify the code, but you can sometimes modify Java objects via the functions that are exposed to Lua.)
Also, you can decompile the Java and read it, and sometimes you can spot sneaky ways to use Lua to interrupt Java
check the threads
mod resources
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.
okay, thanks for that wow!
interesting..., I always liked to break stuff as im working on something lol, that's how you learn
sorry I'm late.
but basically I'm trying to convert a clothing item into a wearable container
so yes. It all checks out. Minus the wearing option
I saw this reddit post and it got me wondering. Has anyone ever thought about making a better hair growth mod? This progression looks much nicer imo. https://www.reddit.com/r/projectzomboid/comments/10uliq7/i_made_a_realistic_hairbeard_growth_time_lapse/
105 votes and 12 comments so far on Reddit
maybe even add a trait or make it so if you choose bald or receading hair styles they don't grow past that point
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)

i dont think time action is the right way for this
just ook on the game time or count the days by using day events
then just swap the hair
timed events i mean
The way hair growth works does need work but it's also alot of work too
For not much gain tbh
Every hair style would need two models to parse if the person is balding or not
#1070852229654917180 message its all here
ah, that's a shame. It's funny how many times it's the little details that require the most work.
you probably need to disable the vanilla hair growth
Hair growth goes down the list if I recall
The issue is specifically for bald or balding/bald spots
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
i dont underrstand pao sounded like the same..
yeah sorry
ok so you have to create a server and client command
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.
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
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
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.
The square is next right to the player in the same cell
Vehicles also need a bit of room to spawn
with AddVehicleDebug you can spawn vehicles directly onto the player
You can dictate a xyz
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
Just do players xyz + what ever
It needs an IsoGridSquare object 😔
I am using this function
https://projectzomboid.com/modding/zombie/Lua/LuaManager.GlobalObject.html#addVehicleDebug(java.lang.String,zombie.iso.IsoDirections,java.lang.Integer,zombie.iso.IsoGridSquare)
declaration: package: zombie.Lua, class: LuaManager, class: GlobalObject
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)
I'm not sure what you mean about subtracting coords
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
What is the error
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
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
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
player is the IsoObject for the player character, I think
getGridSquare() is what returns the IsoGridSquare object that I need
I mean where is player being defined
I'm not familiar with getGridSquare as the function name - are you sure that is a global?
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
IsoGridSquares are the tiles, yes
The issue I think you have is the global function is getSquare()
I don't see it in the java classes
https://projectzomboid.com/modding/zombie/iso/IsoGridSquare.html
declaration: package: zombie.iso, class: IsoGridSquare
unless its the wrong class
the other methods use IsoGridSquare.getSquare, is that what I want? Or is this outdated in some form
The class for global functions is Lua Manager
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?
onCanPerform can be used to hide a recipe
ishidden can also right?
my goal is to use sandbox var to set amount needed for recipe
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
i seen that. not doing that here
You can use scriptManager to mess with recipes
i looked into recipecode.lua but it's just not clear on how to adjust the amount needed
unless im blind
Not home at the moment but you can check out recipe stuff in expanded Helis github
Me when it's been so long since I last touched my farming patch that I forgor how it worked

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
Very nice
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
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 😄
like how
what the haha
nice title upgrade also 🙂
nice
ow you not at home yet ok sorry to disturb you with dm
ah okay, I see the global function now. uses doubles though, strange
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
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.
you can mess with spawn rates in the debug console and then call ItemPickerJava.Parse()
What would that do exactly?
Also how you mess with spawn rates in the debug console
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
I havent played with the console at all yet
it's just a lua terminal
Would I be able to just call a method name alone in it?
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
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
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?
ohhh that might be different
I had a feeling.
there's probably a similar method, but ItemPickerJava won't be relevant, of course
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.
@zinc pilot
goddamn, you're amazing with animations
Oh sweet another preview, I sent the one you posted last night to my friends a little bit ago
dayum, kinda sick. hope u work more on the sheet animation tho
Really cant wait for you to finish that
Did you know the debug has a search bar for reloading stuff? Some veterwn modere didnt knew that when i showed them its kinda surprising but then again its not really obvious
You talking about the one on the right where all the scripts that are loaded into the game?
Yes
K i need to see that live. Ive wasted lots of time scrolling and hoping I land around where I want to
Thanks y'all. Will be a bit longer now since I'm messing with the unarmed stuff too a bit.
Thats why I asked this workflow question was to get game changers like that
Not sure what you mean by "sheet animation"?
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?
like
putting knife away
not shit animatiuon
XD
like
hiding knife
Sheath
Its okay
Thats the tell tale sign that im using my phone as well.
ohhhhhhh. I wasn't planning on touching those animations at the moment.
a community that poops together stays together
ye i mean
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
day 100 waiting for mod idea happen
Any idea how to bulk remove everything, including clothing, from a characters inventory?
local inv = playerObj:getInventory():getItems()
for i=1, inv:size() do
local item = inv:get(i-1)
ISRemoveItemTool.removeItem(item, playerObj)
end
@rancid panther Just learned something about adding traits that you will want to know
O_O that's so totally different than I was thinking, thank you!! ❤️
i know i sound like a broken record at this point... but honestly man i love that you don't rush to drop your stuff. sign of good quality control, and is appreciated....
@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.
It's almost 100 days into the school year too, so have this ⭐
We were all helping them last night but I really wasnt paying attention to what the mod actually was until way later and what they got going on is super cool
Im looking forward to messing around with that if they make it public
ok. thanks!
whatsup with world dictionary error
day 10 (or something) im still doing an API mod for my actual mod
A proper traders with lore and shite
You mean like NPC traders?
Visually yeah, not AI based thou
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?
First one is not NPC-based no lore, just admin/player setup. Its more like a trading post I seen somewhere around
Noir's shops has a nice UI and idea, but different from how I want to achieve currency rotation.
Yeah, no sense otherwise
I'm going for currency as physical (item-based) concept you can acquire roaming the world most unexpected places to loot.
Word. So are you going to have player shops as well as NPC shops?
Nah, not players shops, might be later on as extension but I think there is plenty of such already.
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.
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
So would that be managable by the server admin? Or determined by you?
My next question
What's the function to return if player is male/female character?
Random of N, full sets, etc.
My plan is to make it 100% configurable
player:isFemale()
I'll throw some deets as soon as I'm sure myself about them @thick karma 
Currency mod is around the corner thou. Just cleaning up
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.
Sure
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.
where do you get all the sprites for world objects?
If you try to search noir with @
It will generate multiple results
Thank you! ❤️
I am aware. It's a very popular word. It's entirely possible none of them is the right Noir.
Pretty sure he does not want that
Ok
If he wanted to be randomly contacted by users of his mods, he would not disable comments.
Incoming red named person's msg
Working on pz modding guides. A little tired 
Can someone check this pages?
Check them how? What should they look like?
Text editor idea intelij
?
Maybe you find some mistakes or will have ideas what need to add
I see I see
Once we finally get the NPC builds I cant wait to see what the mods come up with.
Installing mod is irrelevant for modder so im skipping that
Work in progress 🙂
Can you link a zip of all folders vanilla on the mod_structure
Ive notice a few pages like that
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
on the mod structure page you say lua files in server folder only execute on the server, server folder executes on any
Hmmmm
server doesn't execute the client folder
Mod_problems solution
Verify files
I dont know if its been said but 'Mod problems solutions' I dont see any talking about checking load orders
Guide them how to do so
Some mods require them
You mean map load order?
Warning should be disclaimer instead
Warning quotes danger
Disclaimer is just you should know that
Theres a few mods ive seen that are not maps that mention they need to be loaded last
But player can't change load order
They can
Only in Host
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
We appreciate it just so u know
Really nice to see the guide being fleshed out.
maybe this is v42 spoiler?
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.
anyone seen @umbral echo lately?
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
I feel like there was a pin with that info on it - but I guess it got scrubbed
.> 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
yes, #mod_support message
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
I think it's good info for the wiki
it is
you need reverse iteration maybe
for inv:size(), 1, - 1 do
hmm, alright I'll try that then and see, thanks :3
What's ISRemoveItemTool ? 😮
I think it's the debug tool for removing items.
I wrote something to deal with syncing issues and MP
I'm curious if it's similar
Oh it's a window
For whatever reason, that seems to have done it lmao
Thank you! ❤️
probably has to do with the list changing size as you remove stuff
What was it used for anything I particular?
or just for performance
For my shop code to prevent duplications
Oh okay
ISRemoveItemTool.removeItem has some extra stuff - I might switch to it
Oh, that's fair; I guess that makes sense, though if it's pulling an instance of a list, the variable shouldn't change in value after the list is stored, should it?
Or am I think too much about how lists and arrays work in every other language, versus Lua just... doesn't work the same? lolz
that's a java array to be clear
Lua tables maintain size but collapse up-to the last non nil entry
@ albion#0123 ? , literacy mods. Please don't block rereading recipe books...
Question lads, I am trying to make a small mod that changes the gun sounds of GWP to the Vanilla ones.
I am trying to make a doParam but so far no luck
I hate the file in media/lua/shared
and its this
https://steamcommunity.com/sharedfiles/filedetails/?id=2873405334
i don't think my mod does this?
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!
that's why I didn't ping you. I know the other mod did it. Sometimes players are not able to get new recipes and this was the cause with the last person who had the issue.
can anyone make an mod for me ? im an long time waiting i got an cool idea
My starting rate is $25, +$50 for each "system". Idk if that's steep or cheap.
where i live that is like 50$ is the entire salary
i cant bruh
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 🤷♀️
Learn to make mods, maybe find better job with that knowledge.
whos that
an old school homie.
this is making me dizzy
its not
wait another 100days
and youre not doing it effectivly you have to spam like every 10mins
Yes, modders don't work unless they're verbally abused
You're being too considerate of other's time
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
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 :/
if isClient() then --and not instanceof(item:getOutermostContainer():getParent(), "IsoPlayer") and item:getContainer():getType()~="floor" then
toSell:getContainer():removeItemOnServer(toSell);
end
toSell:getContainer():DoRemoveItem(toSell);
getPlayerLoot(0):refreshBackpacks()
ISInventoryPage.renderDirty = true
heres what i did
without the toSell:getContainer():removeItemOnServer(toSell);
it respawn when login back in
well, the only items that respawn are the items that were "lost" when the inventory didn't refresh

it'd be almost better if we could just force a refresh of the inventory UI elements
same thing that im dealing
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
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
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
I make them right click on it
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
@rancid panther
- Remove your workshop item from your testing server.
- Unsubscribe from your mod.
- Restart Zomboid.
- Add your workshop item to your Mods section of your testing server (not via Workshop Items).
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
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
Check the pinned comment regarding this - might help you
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
see instruction # 2 from them 🙂
Not necessary.
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
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.
atm im just not subscribed to my mod so i have no issues
Yes but if you want to play your in progress mods will cause problems
hence setting up a development cache folder
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!
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
Is there a way to find errors or conflictions? (Sorry I'm new to modding PZ)
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.
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
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
So I should be working backwards? Maps at the end and quality of life at the start?
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
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
Well, let me know if you make any headway on this, I’m going to be poking at it a bit, and may have to do goofy things with the inventory.
askin in the right area will get you better results also. since you are mod user and not developer. #mod_support is better option since you will be more likely to find users that encountered your same experience
Does anyone knows how to make a gun shoot faster than "RecoilDelay = 0"?
try reducing ReloadTime and AimingTime in debug mode
It didn't work, do you know zomboid's tick rate?
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
how?
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
checked it's RecoilDelay and AimingTime
are you using a custom animation?
weapon timings are heavily tied to their animations
oh, I think it was that, I was testing with the vanilla weapons... with a custom firearm without animations it was shooting faster, thanks
I don't recall, can you require server files from shared?
ah that would explain that
konijima to the rescue lol.
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
item Tshirt_DefaultDECAL_TINT this is shirt that has the color picker right?
Im sure it is but I want to clarify.
Is there a nice list for which encoding to use for each language's translation files?
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.
I've gotten comments before saying UTF-8 doesn't display Cyrillic and Latin languages correctly.
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?
Will do.
there was a guide to them on the wiki
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
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
if doing nosteam then it would be user\zomboid\mods
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
So which sounds are transmitted over network, there are few kinda.
So who hears IsoPlayer:playSound() and getSoundManager():PlayWorldSound() ?
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.
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
They are saying its fixed
Modify thee xml
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?
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
Spawn the audio on the square
im goin to bed, gl
Goodnight
gn glytch
Ihavent left looked into freezing stuff but you might need want to start on something easier than to hop in some complex idea for your first mod
with that RemoveItemFromServer line?
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
So only square is transmitted over network or?
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
Hello! Has anyone messed with setBumpType/getBumpType? I am trying to find all the possible strings that could go with it

