#mod_development
1 messages · Page 293 of 1
you can do this if you have access to the character
Ah ! it's a new track, I'm going to go rummage around
thx
Where are the crafting recipes for the base game blacksmithing located?
Metalworking is blank
Oh shit
I found them
They managed to organize those files, somewhat
Ok, I found what my issue is.
My skill mods don't have entries in the the Vanilla Sandbox under XpMultipliers.
If users uncheck "Use Global Xp Modifier" then the game can't find "Driving" or "Scavenging" or "Archery" under the Xp multipliers.
Anyone have any thoughts on if I should hook into where its implemented and intercept for my skills, or should I attempt to inject settings into the vanilla SandboxVars
I am trying to add a horizontal Scrollbar to ISCollapsableWindow, and I can't?
Ok, nm it was easy.
Injecting it into the Sandbox Vars was as simple as adding it to my Sandbox-options.txt
{
type = double, min = 0.00, max = 1000.0, default = 1.0,
page = Character, translation = ScavengingSkill_MultiplierConfig,
}```
This will fix the XP error when global xp modifier is off.
Does anyone know if sandbox option entries have an option for enable disable based on the status of another option? I know the base vanilla ones do, but they are not done in the same way as custom sandbox-option files as I am seeing.
has anyone managed to create custom build recipes in the new building menu in B42 ? I'm failing to set custom entity style
Hey @red tiger THANK YOU for your hard work on Lua/Extra Commands! After playing with it a bit, I think I identified a small bug with Lua/Extra Commands?
After you fix windows using the Extra Command method, they can no longer be barricaded or have the curtains opened/closed through additional Extra Commands!
I also did this after running a command to destroy the windows too, so I am not entirely sure whether the issue is in the smash windows function or the fix windows function, but I wanted to report it nonetheless!
Again, thank you so much for this awesome tool! You rock dude!
I need help with smthin
item InstantCoffeePacket
{
DisplayName = Instant Coffee Packet,
DisplayCategory = Food,
EatType = candrink,
Type = Food,
Weight = 0.15,
Icon = InstantCoffeePacket,
EvolvedRecipe = HotDrink,
FoodType = Coffee,
Packaged = TRUE,
FatigueChange = -20,
HungerChange = -10,
ThirstChange = -20,
UnhappyChange = -10,
Calories = 100,
Carbohydrates = 10,
Lipids = 1,
Proteins = 1,
StaticModel = InstantCoffeePacket_Ground,
WorldStaticModel = InstantCoffeePacket_Ground,
}
EvolvedRecipe = HotDrink;5,
Apparently, adding that ;5 causes the mod to break and the game to crash before start-up
does anyone know why?
I'm trying to set up the item's ingredient quantity since it appears as 0 in-game and does not remove the object from the player's inventory
because that's not the semantic. EvolvedRecipe = HotDrink:5,
Hello everyone. does anybody have experience with Radio mods? (Specifically for Build 42).
I noticed that they added english translations to Radios on Build 42. How can I make that file?
That's not it.
Game crashed when loading into the world instead
plus usually across all scripts it uses a ; its my first time seeing a : used.
it uses both
Recipe1:5;Recipe2:10
; is conventionally used as a separator, the : is being used to set a value
if you only have one there will be no ;
aha
; separates ingredients, : separates ingredient type from number
why does it crash my game then?
it works completely normal without it but has a zero value like the image above
as soon as i put a : or ; , it crashes
Released TLOU Infected for B42
https://steamcommunity.com/sharedfiles/filedetails/?id=3409434765
Nice work
Zomboid Forge looks even mor eexciting!
I'm still annoyed that zombies can't be blind or deaf because sight/hearing are in the java and only accept the default sandbox options.
can't their perception/aggro be affected by outside sources like weather tho? Maybe can still have a workaround
Maybe, if you want to play always night/always raining
I know the whole "zombies are magical creatures and don't work when you apply science to them" thing but I think it would be nice to have their senses get worse as time goes on
I just think "blind, with good hearing" and "deaf, but super sight" would be interesting gameplay.
deaf & blind... not so much.
I mean realistally, unless the virus somehow prioritizes keeping the hearing and sight in tact, they would be the first things the zombies would lose from rotting
Although... deaf, blind, extra tough/extra strong might have some dodge-the-zombies gameplay.
i doubt they'll do this since it doesn't make sense to have the zombies get weaker while you get stronger
I was more so meaning having the option
eyes and eardrums do not like existing after death lol
Plenty of settings where zombies or equivalents can stay more human like by eating meat or avoiding damage or something, and gradually decay into mindless zombies.
zombies had an option to get weaker over time which was on by default but it was removed in b41 because it didn't actually do anything lol (potentially did something in a previous build)
the problem is that they decay at all.
Unless like I said before, the virus is intentionally targetting the eyes and ears to stay in tact, any rot no matter how slow would still mean the eyes and ears go first
would be boring gameplay if the game just got easier and then there was no zombie threat... should still be an option though even if I don't like it.
Imagine you survive so long the game becomes a colony sim, and then the danger is having some of your colonists die and cause mini outbreaks
Maybe it targets "essential" bits? with "essential" defined as "what the zombie needs to shamble around and find a new host for teh virus"
Odd comparison, but like spore creature stage vs tribal and space stages
But that is giving a lot of credit to a virus, which is something that verges on not being alive at all really
I mean it doesn't have to consciously do it, natural selection has no thought behind it
It's just sorta, if it works then it works.
i think it would make more gameplay sense for them to adapt and get stronger
i’m thinking having different types with different strengths and weaknesses would fix that issue
First week or two is zombies losing their hearing and eyesight, slowly getting replaced by zombies with far superior hearing and eyesight, possibly sprinters
like a survival of the fittest vibe?
Cuz natural selection dictates the ones better at infecting would be more likely to pass on their genetics (mutation of the virus)
It makes sense that after awhile the only zombies still causing infections are the ones that stayed in tact
don't think many people would be getting infected by the zombies that lost all their eyesight and hearing.
So that strain of the virus would stop spreading.
Or, every host in the transmission chain is improved. So the first zombies are terrible, by the time you're at the 50th transfer of infection they are supersprinters.
differences in environment should shape differences in abilities. that’s why i like raven creek because the behavior is different
i agree, zombie mutations would be really interesting
Also, in einter zombies should freeze solid.,
but it’s kentucky soooo???
because no blood flow?
maybe there should be fat zombies xdd
And then you get Project Zomboid 2: Road to Canada
another example would be zombies that know how to open doors would be way better at infecting survivors and spreading their genes
Brita's (I think) added them with "fat suit" clothes
It could be that like "survivor zombie" where they still have some brain power left and do some human-like things
i imagine that depending on how they were infected their behavior or how they work would change. airborne vs blood/saliva contact
Have enough hosts, enough time, and a low enough death to infection rate and you'll end the apocalypse with the prime condition zombie designed to infect survivors
ah like the first stage of TLOU
i never watched it/played it ;-;
the first stage infected still have some humanity (they mumble to themselves, etc)
And then afterward the zombie virus has two options.
A. Bridge the species barrier and start infecting other animals (possibly starting with other primates)
B. Die off entirely.
Can't have a virus targetting humans if all the humans are dead
i’m interested in how motor function would fail
Hmm brains are very expensive, I would assume majority of the brain would get autocannibalized by the body in favor of saving on nutrients.
No frontal cortex, possibly half the brain completely gone.
I could see the brains becoming more rodent sized
i would assume
but then there’s the trouble with muscles and tendons
maybe i’m just wondering how decomposition would affect pz zombies
Real issue I think would be ligaments
If we want this to fit to any sort of science, we have to assume the best case scenario. Meaning the body stays almost completely functional aside from brain power.
Brain power is already a lot of the body's calorie cost.
And assuming that the zombies biting you and then leaving your corpse to zombify instead of eating you is just a game mechanic, we be assured that the meat would almost certainly have enough nutrients and calories to sustain a low brain power body.
Especially if they eat your organs.
Now the actual issue with this, would be the fact that they infect less people, meaning less zombies overall.
If they're too flesh hungry then nobody gets infected, they just die.
If they're too focused on infection, they starve, and then run out of zombies to spread the infection.
This is generally why slow zombies are more dangerous for humanity than fast ones.
I think the math was something like, a zombie that is 40% the speed of a human has a much higher infection rate.
As the human would be significantly more likely to sustain a bite, and then get away, becoming an infected.
Have them too slow, and then nobody gets bit.
Too fast, nobody makes it away from the fight alive to become infected.
This is of course, going off of the scenario of slow infection. Like how in game it takes three days.
If it were near instant, then slow zombies would be worse for infection. (28 days later rage virus for example)
aaaaaaannnnnnddddd I'm autism yapping. Whoops
people who don’t think about the science of magical imaginary monsters are lame
Well then I guess Blair Algol, one of the game devs. Is lame
which honestly yeah, I don't agree with blair's statement above lol
There are definitely ways a zombie apocalypse could work, you just have to actually think about it.
Hell the explanation could be solar powered artifical nano machine virus and it would still work.
Zombies are usually SciFi not Magical Fantasy (Looking at you black ops zombies)
Thank you. The example mod might be outdated.
I might look at it at some point
Buried right now with commissions and additional anticheat implementation
The bigger secret is most zombie stories are not about zombies, they are about the survivors and the purpose of zombies is to prevent things from being able to return to the status-quo.
Night of the living dead probably has the most realistic zombie outbreak.
Cuz it lasts for literally a single night, and then is contained by the military.
makes no sense that one of the most deadly species in history (humans) which are only that deadly due to their intelligence, would lose to a dumb version of themselves.
Our bodies would be mediocre for survival without our brain power.
The only time zombies would be considerably dangerous would be 28 days later rage virus, or land of the dead zombies capable of learning and adapting due to their semi functional cognition
It would be like if you took away a dog's teeth and made it fight a normal dog
Humans are peak for a lot of things, like running other animals to death because our breathing rate is not tied to our movement like a lot of quadrapeds. But those ae not zombie things.
Zombies would definitely die of exhaustion trying to chase a human long distances. I doubt they could regulate their temperature the way a person could.
In a sprint though? maybe, but their leg muscles would wear out quickly and cripple them after chasing some people
Doing laundry (in game) and there needs to be a mod that makes you drop a sock on the floor every time you drag clothes from the washing machine to dryer.
Also, one pair of socks you wash becomes "single mismatched sock"
I mean your character seemingly moves every single piece of clothing one at a time
not normally how people do laundry, and would probably prevent drops
I highly recommend a combination washer-dryer. Then when you forget to move your washing for three days it's slightly crinkled instead of a stinking wet mess.
My washer plays a loud jingle when it's done. Would definitely get me killed in a zombie apocalypse, but is handy for not forgetting to move it to the dryer
So does mine. I can still forget, or not hear if I'm in the bedroom/other end of the house.
My microwave beeps every minute once done. For hours. so annoying.
i believe with b42's clothing changes it would now be possible to have separate left/right sock items
Might need extra body locations defined, but definitely possible.
there are one-handed gloves (chainmail glove)
And items that can swap between left & right (kneepads etc)
Finally getting back to trying to code for this game. Does anybody know any documentation I can refer to in regards to context menus?
I think so, I remember finding a left chainmail glove while working on a mod
Is there a way to make new additions to OnBreak.lua or do I just have to make a new lua with the functions copied?
you can just make new functions in the OnBreak table
function OnBreak.myFunction() ... end or OnBreak.myFunction = function() ... end
you also don't have to use the table at all, it should be able to reach any function as long as it's accessible through the global namespace
I tried that but it spat out an error when I did it without the functions. Would an import to the file be needed?
it should be fine, most likely your lua file didn't load or had an error
function OnBreak.VSOTest(item, player)
OnBreak.HandleHandler(item, player, "Base.SmashedBottle", false)
end```
Just had an ides for a mod, its a bit hard to implement but imagine this; zombie animals
that looks correct to me
I’d shit myself if I was being chased by an angry zombie dog (one that is faster than humans like irl)
Same
would this just go in its own lua file? Is there anything else that should be in the file?
it can be in its own lua file, and it shouldn't need anything else
it should be in the shared folder but until multiplayer comes out it probably doesn't matter
Does anybody have a source I can refer to for context menus?
every lua file that loads should be listed in console.txt if you want to be absolutely sure of that, if it is loading and there are no errors in your log i'm at a loss
yeah I usually copy the vanilla directory structure when doing stuff in case it's important.
media\lua\shared\items\OnBreak.lua
B42 API reference: https://demiurgequantified.github.io/ProjectZomboidJavaDocs/
package index
if you're naming it the same you are overriding the original file and therefore deleting everything in it which may be the cause of your error
I really need help with smthin
From my notes: add a new context menu option like this:
print("##### doDIYContextMenu()")
local primaryItem = items[1]
if not instanceof(primaryItem, "InventoryItem") then
primaryItem = primaryItem.items[1]
end
if primaryItem:hasTag("DIYSchematic") then
print("##### It's a DIY Scematic")
local playerObj = getSpecificPlayer(playerNum)
readOption = context:addOption(getText("ContextMenu_ReadDIY"), items, DIYonLiteratureItems, playerObj);
end
end
Events.OnFillInventoryObjectContextMenu.Add(doDIYContextMenu)```
There is a bug with a new welding mask im trying to add
wouldn't this make the other onbreak functions not work? It doesn't seem to override
tysm
yes, it would
It is not loading in-game, causing errors and there is no information when hovered over
Maybe it does, I renamed mine anyway
for this reason i recommend creating subfolders in each lua directory for your mod or at least prefixing filenames with your mod name since overrides (especially between different mods) are rarely desired and annoying to diagnose
adds salty to the name of every single txt/lua
i recommend the subfolder since it results in prettier filenames imo
I use "Nep", a habit from my World of Warcraft days when my character was called Nepenthe
In actuality I just add the mod name to files usually
And WoW UI mods were a huge mess of everything-global.
yeah, i usually go with the mod's name
Bro debugging anmod is like
“Dormamu, I’ve come to bargain.”
Fun Memory: getting made to bring along an undergeared warlock on a raid instead of my main, getting bitched at for doing low DPS, hacking the damage meter mod so my damage reported as 2% less than the highest damage dealer, getting complimented on my skillful warlock playstyle.
also athens I didn't mean to leave you on seen when asking for help about modding the other day.
I'm out of soda so I've been having trouble doing mod stuff. (Self medicated ADHD via caffeine)
coffee doesn't work as well
wanted you to know I'm not ignoring you on purpose, just struggling to dev even my own stuff
Its cool I found the error
nice
Even proper ADHD meds don't work very well, but a little bit of help is still a little bit of help.
Problem is, every single time I add something I spend five minutes adding it and two hours debugging it haha
That's how programming works.
caffiene has been my main medication for like my entire life.
Problem is soda is getting more and more expensive for various reasons.
I like Aldi energy drinks.
how much does it cost for u?
i think this usually means invalid body location...?
I buy a 2L pepsi bottle for 0.75$ haha
Well I usually buy a 24 pack, so like $12 or $14 but I share with another person so it only lasts a week or two at most
Why not buy a large bottle? Its usually much cheaper
fuckin hell dude I wish. 2ltr is anywhere between $1.60 and like $2.30 here
Does anybody have any reccoendations for introducing myself to coding? I already made a mod in the past but felt super lost in the process. Also yeah energy drinks are getting too expensive
Meanwhile in Australia:
Basically, copy the ancients

Find something close to what you want to add, see how they coded it in, copy them.
Find a mod that does teh thing you want, look at their code. Might not be the best way, but it is a way that works.
i had the fortune of getting to quit caffeine after releasing that (likely related to autism) i experienced no real positive effects from caffeine and quite a lot of negative ones lol
but that didn't stop me from drinking lots of it daily for years somehow 😅
But make sure its a B42 mod if u want to copy
Cuz B42 code is totally different from B41
eg: for adding a button to the car dashboard to toggle Speed Daemon I looked at Tire PRessure Monitor mod for adding the button and Become Desensatized for adding traits mid-game.
Nah I very noticably become sluggish and brain fog a day or two after losing access to caffeine.
I know it's the caffeine and not just compulsary drinking sugary carbonated beverages, cuz I've tried to switch to caffeine free sodas
@covert carbon my go to is checking PZ’s coding (media file) when wanting to implement most things
I wonder how many Zomboid players have ADHD. It's the sort of game that absolutely triggers hyperfixation for me.
Same issue I have when I stop drinking, brain fog
yeah no i'm definitely a special case here, i got a lot of headaches from it and i've never experienced highs or even alertness from drinking it
Actually there's reason to believe that people with adhd would be more likely to thrive in an apocalyptic environment
Honestly has been my method for a while but you gotta do what you gotta do 🤷♂️
Thx for the help
so probably a lot, we're drawn to the game play naturally
I don't get "alertness" or any of that jittery effects that neurotypical people experience from stimulants.
I just kinda feel, normal?
Definitely - some of the quirks would help, and no need to force yourself into a schedule that society likes to make everyone work to.
Might be caffeine does nothing for you, might be ADHD type thing where it actually calms your brain a bit, might be something else.
I mean there's evidence to suggest that adhd developed as a hunter survival trait, and autism being related to innovation and crafting
I used to be prescribed 25mg of adderall before losing my insurance. I think it's just my body needing stimulants to function
Overall, it's a really horrible negative trait I would happily get rid of.
But I'll settle for a world ending apocalypse instead.
doesn't help that I moved states, which had a maximum of 15mg for the age I was at.
It's not that bad of a trait in a general sense, it's just not a good one for an employee
i do use it sometimes when i haven't slept well and have to do something early, it can definitely benefit my awakeness, i just have an overall thing where i tend not to feel most things (especially emotions) and as that's not a regular occurrence it really didn't justify getting caffeine withdrawal regularly lol
like a lot of things, it's a problem with societal structure, and not yourself
I find it is - when it's acting up I can't even do hobbies or things I want to do.
Forget cleaning the house or other essential chores.
I think part of it might be diet as well
It's a self feeding cycle sometimes
death spiral if you will
diet and exercise can be a huge help, but it's so hard to do them correctly when you're struggling to convince yourself to get up and heat a pre-made meal because you're starving.
man I sure do love how it
i think this is a body location error, but post the error just in case
Military Welder Mask
[REDACTED]
i just can't figure it out.
yeah self feeding cycle. Wouldn't have that sort of issue in a hunting and survival environment, as you would naturally have better exercise and diet.
Without processed foods, it's a lot more difficult to eat unhealthily
Wait
Not sure where the error log is.
java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Cannot invoke "zombie.core.skinnedmodel.visual.ItemVisual.getHole(zombie.characterTextures.BloodBodyPartType)" because "<local12>" is null
Maybe it's this?
Do you have the mod "errormagnifier" installed?
oh, do you have any blood locations set?
would recommend
ohh wait no actually
My approach to not needing a welding mask was to implement Safety Squints, accurate to 1990s Kentucky attitudes to safety.
i think this means no itemvisual, which means either your clothing xml is messed up, not listed in the file guid table, or just referenced wrong in the script
I absolutely love this
BloodLoctions is extremely fussy in my experience.
A hour ago I tried adjusting a blood location for one item with DoParam and every item in the world vanished , leaving me standing there naked on load.
(this is why I backup my save...)
also Albion, have you noticed that Imported beer uses the normal beer model on the ground instead of its own model that it uses when being used in animations?
cuz I noticed earlier, and I'm thinking about uploading a mod that's just a single lua file to change the WorldStaticModel to the proper imported beer one
Know any other items that are like that? and just don't use their proper model for the ground?
It's very noticable, imported beer is a yellowish white bottle with a black n' gold label, while the normal beer is brown with a blue label
even has its own icon
asking so that maybe it can be more than a single change mod
i've never noticed anything like that, no
screwdrivers used to have a similar inconsistency until b42
(the sound of people hitting zombies with beer bottles after I finish "Think On Your Feet")
Trying to code but my cat is laying on me
how to know what mod responsible for the logs in console?
schizophrenia mod when?
make audio recordings of voices commenting on the apocalypse and player, then its realistic.
like “You are actually in hell. This is God punishing you.”
“We are here to torture you for all your sins.” you’d hear as you played haha
Maybe you’d hallucinate people or zombies or smthin too
Let me discuss about the context menu. I have published a new mod that adds menus as attached image, but I would like to make the menu order “Set Alarm -> Unset Alarm -> Wear” in Bluk Unset Menu for example, any implementation advice?
use insertOptionAfter(getText("SET ALARM TRANSLATION KEY GOES HERE"), ...) instead of addOption(...)
model MilitaryWelderMask_Ground
{
mesh = WorldItems/Clothing/MilitaryWelderMask_Ground,
texture = Clothes/Hat/MilitaryWelderMask,
scale = 0.5,
}
item MilitaryWelderMask_Ground
{
DisplayName = Military Welder Mask,
DisplayCategory = Clothing,
Type = Clothing,
Icon = MilitaryWelderMask,
BloodLocation = Head,
BodyLocation = Head,
Weight = 1,
CanHaveHoles = false,
ClothingItem = MilitaryWelderMask_Ground,
Insulation = 0.25,
ScratchDefense = 70,
WaterResistance = 1.0,
BiteDefense = 50,
WindResistance = 0.55,
VisionModifier = 0.5,
DiscomfortModifier = 0.2,
WorldStaticModel = MilitaryWelderMask_Ground,
Tags = Military;WeldingMask,
}
Can someone tell me where the glitch/bug is?
I didn't know such a useful method existed. Thank you so much!
there is no Head body location
it did fix that it couldn't be equipped
Are you using a custom module ?
finally fixed the bug jesus
apparently changing the name of the item and the clothingitem fixed it.
Is that any way to adjust the attachment xyz of the model easier
Now I need to keep edit the file and reload it to make the weapon model on the right place
Hi, I would like to know how I can get the value of a certain field from the IsoZombie class
In B41 it probably was
local Field = getClassField(zombie, 1) return ClassFieldVal(zombie, Field)
but in B42 it seems not working
Or, better, please tell me how I can figure it out myself
Community debug tools helps for that
Hey use Starlit library, it easily makes it accesible so you can just do zombie.fieldName
Could you elaborate on this? I am not sure what you are referring to.
Thank you!
ah not useful to me right now I suppose, im on B42. good resource anyway.
this is truly awesome
thanks a lot good sir
B42 works
The mod works for B42
And it has your print feature you wanted
heya folks, i heard murmurings that in b42 it is easier to make custom environmental events/stories in the vein of parties, maintenance cars on the road, etc. is that true?
If I wanted a new tool to the assemble list- let's say I added a new pickaxe to the game and I wanted it to be crafted through "craftRecipe AssembleBlade" It's a base game function with a bunch of recipe variants for different blade outputs. How would I go about doing this without adding a whole new recipe but just expanding on the existing?
Different person, but thanks for the info!
No, that was correct.
Indeed
But if you're modding, I highly suggest you use these tools
What is the best time and day of the week to update my mods?
Okay, I think the best time is 4:00 AM (ET), Sunday.
whatever time and day of the week that is convenient for you. You shouldn't worry about players or servers. Different arguments can be evaluated regarding managing mods in a community setting like PZ, but at the core of it, you own your own work.
Да все потерпят
People schedule their mod updates? I just post them whenever they're finished lol
I've included custom modules at the start of the build recipes yes but it is not founding EntityStyle that is set in the txt file
from my notes (someone posted this in this discord channel):
for i = 0,craftRecipes:size() - 1 do
local craftRecipe = craftRecipes:get(i)
if craftRecipe:getName() == "InsertBattery" or craftRecipe:getName() == "RemoveBattery" then
print("found recipe")
local inputs = craftRecipe:getInputs()
for i = 0,inputs:size() - 1 do
local input = inputs:get(i)
if input:hasFlag(InputFlag.IsEmpty) or input:hasFlag(InputFlag.NotEmpty) then
print(input:getPossibleInputItems())
if not input:canUseItem("TLOU.InfectionScanner") then
local possibleInputs = input:getPossibleInputItems()
possibleInputs:add(getScriptManager():FindItem("TLOU.InfectionScanner"))
end
end
end
end
end```
So you can try messing with the recipe programatically.
hmm
i dont think thats quite it
or
maybe it is?
i see its replicating the remove battery recipe
not that exact code, but that's an example of finding a recipe and modifiying it via LUA
i'll have to try it out
this is probably the best solution for not messing with the game too much
Once you have the correct CraftRecipe object, see if any of the available API calls will let you add to the output list: https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/scripting/entity/components/crafting/CraftRecipe.html
declaration: package: zombie.scripting.entity.components.crafting, class: CraftRecipe
Ok found solution thanks for pointing custom module !! For next people searching, entityStyle/uiSkin need to be set in base module while entity info inbase module
recipe:getOutputs():getOutputMapper() will probably give you the mapping table, which is an OutputMapper and has some functions for adding stuff: https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/entity/components/crafting/recipe/OutputMapper.html
declaration: package: zombie.entity.components.crafting.recipe, class: OutputMapper
Yup, that's what I wanted to say, you can't define entityStyles in other modules besides Base, it's a bug with the scripts
essentially im gonna have to get the OutputMapper of the assemble recipe so i can add my own from an individual script?
part of me wants to think there might be a simpler solution for this because the devs have gone pretty heavy with the mod support. let me try some things really quick and see what i can work with
ill post any findings here for future reference if anyone wants it
You simply need to make sure your mod is working before updating. Nobody like a mod that breaks their existing save.
Looks like there's a few solutions. One is to simply copy the recipe and add your new assembly items, which causes unnecessary clutter and is ugly. Other is copying the base assembly script and adding your things in there, which is probably gonna cause compability issues if it overwrites the base recipe file. The last solution is probably through getOutputMapper like you mentioned, but I seem to be too stupid at coding to figure out the last one
I might just dig around to see if I can find anyone who's written similar code already
If you copy the recipe and add your stuff, and another modder does the same, they will fight for which one gets applied.
Yeah, just a bad idea to do that all around. I just looked through a mod that adjusts the assembly list and it does exactly that 😬
I should prolly get rid of that
a lot of modders do that, same as replacing a whole item to change one parameter instead of using DoParam()
Ther'es no formal Zomboid modding school, so everyone learns by copying others which mean bad habits spread
I'm definitely not gonna go about doing the same mistake, I'll just leave the recipe alone for now and work on the other bits of my mod in the meantime until I can find someone who's smarter than me who's done the code already
I do partially wish it was easier to just implement new additions to existing recipes.. Which, it probably does tbh
Yall, how would I go about adding a "saw all" logs option? They removed it in b42... :/
It exists
Kinda
You can select how many logs you saw at once through the crafting menu. There's a slider
It's a little annoying to get to it
yeah, Ik. its just feels like more work
It is
I don't know if the function to "saw all" even exists anymore in the new crafting update
I know theres mods like "load all magazines", but idk if that kind of script could be reworked into this
I tried my hand at it but lua isnt my thing
Although im not sure if loading magazines counts as a crafting recipe
true
I havent played with guns in b42 yet
I wouldn't spend time on that when we know they are still working on the new crafting system & UI.
(unless you can see a way to do it quickly)
but who knows how long that could take
They are a lot fo fun once you stop using them like B41 guns.
It does not.
It's a timedAction
Yeah then its not gonna work for sawing logs
I did a lot of tracking of reload code to write the "infinite ammo with reloads" mod.
Are you nepenthe?
ah
Yeah sorry man
nw. ppl just keep asking me to fix that after I added quick log sawing recipes to the workshop
I feel like a lot of people ask for it because they dont know about the crafting menu recipe
Tbh I wasn't that bothered by it
Too many unmedicated adhders lol
Hey man it woulda bothered me too before I got my meds
I get it
No because I think one of the only things that bothers me about the new crafting is actually not being able to shred all clothing
since they count as different ingredients, you can only do the slider for ones of the same type
Oh yeah that one is not excusable lol
Do you think adding shortblunt to the handy trait would make it op?
Like I know carpentry and maintenance are good skills to have multipliers for, but the cost just seems like a lot
Also feels weird to me that the handyman type jobs have short blunt buffs, but the trait itself doesn't
Like, construction worker, carpenter, DIY expert, and mechanic all have short blunt, but the handy trait doesn't?
construction worker with 4 short blunt on start sounds funny tho lol
Would be op yeah
I mean you can get max strength/agil with low effort due to fireman, and lumberjack
I basically never have to deal with muscle strain cuz of it
I mean hey man, those who think handy deserves a short blunt should be able to have as an option
Seems weird that the mechanic that is supposed to nerf game vets just makes it harder for new players
Basically doesn't exist if you know how to set up your character at the start
Mechanic that nerfs vets?
Oh lmfao
I've seen a lot of people speculate that muscle strain was targetting power gamers, but in actual gameplay it did very little to those with experience
I think it was meant so that you can go clearing hordes as a day 1 survivor. Make the early game feel that much more impossible
And just add realism idk
Prolly a discussion for #pz_b42_chat ngl
Yeah but when you start with maxed strength and agil, you can still do it day one
I'm, like, 99.9% but confirming there's nothing elseto it, Prop1 and Prop2 mean the recipe will equip them to the respective hand, right?
./scripts/recipes/recipes_bone.txt: item 1 tags[SharpKnife] mode:keep flags[Prop1;IsNotDull;MayDegradeLight],
./scripts/recipes/recipes_bone.txt: item 1 [Base.SharpBoneFragment] flags[Prop2],
The people who would be doing day one clears, can still do day 1 clears.
It's just made it harder for those who were already struggling lol
Am I one of those people? Certainly not. Have I ever actually died due to muscle strain? No, not even close.
I forget it's a thing when actually playing
it actually paces out to about my clear-advance speed anyway, so it hasn't changed my gameplay much at all
though I use knives a lot less, now. 😦
Exactly though, I feel like it primarily is affecting new players, or starting builds that don't prioritize strength/athletics
and people who like to just go and murder 1000s on day one
I feel like if you get stout (which I feel you should be doing regardless) it has very little affect on fighting performance
and all of the folks complaining have sandbox settings to adjust to get what they want anyway, so whatever.
yeah but they still could without lifting a finger, campfires
the complaints about muscle strain aren't worth a lick to me
tbh I just worry about my friends when multiplayer comes to 42 😔
They are NOT good at the game
you' have to talk with them, but the few I had on my server idn't even like using guns. They wanted visceral bludgeoning
My friends did not listen to me when I told them multiple times that using guns would get them killed. They do not have critital thinking skills 💔
are we supposed to occasionally go to noob vc to help them or... ?
Honestly it's fun watching them fumble around too.
I alway push people to do the effing tutorial on this one. None of them listen, an then spend 10 deaths learning what they could have in the tutorial
Bro I watched my friend do the tutorial, he would skim the dialogue, reading like two words and then get the wrong idea on what his task was
To be fair, he found out he needed glasses like a week later
I think it's related
I like to force pvp on and watch them accidentally smack each other
They've gotten better at spacing out and letting each other handle their own zombies and helping when needed
Just like real life
I do personally feel like it's better to play with pvp enabled, forces a bit of critial thinking
I say this as someone who nearly died because their friend broke their leg with a hammer cuz he was trying to break the car window while I was in it.
I agree, but it wasn't feasible with the old aiming system. I accidentally shot teammates who were well outside the gun trajectory simply because thy were closer than what I was aiming at.
The new system should fix this
also I don't let them join me until I've watched them do the tutorial.
I do not need to be explaining how to eat the box of oats you found.
It doesn't help much, they immediately forget what they did in the tutorial.
Maybe the real problem is my friends don't think.
my server is invite only, so... all that's preselected. LOL
Do you know how sad it is to play a game for the first time and be doing fine, and then your friend joins and they die to a singular enemy?
Zawg, just walk away!!!
I had to yell at this man to just stand there and press spacebar
😭
This got really off topic, I was just talking about adding short blunt to the handy trait
Is that something I could reasonably do with lua? Or does it load out of sync with lua, needing an overwrite?
hrm... let me look
Also if whittler weren't such a cheap skill, I would definitely advocate for adding spear to it
Any sort of spear multiplier would probably make it op tho
spear's primary downside is how long it takes to train with no skill buffs
this is where it's defined.
spectrm@apocrypha:~/.steam/steam/steamapps/common/ProjectZomboid/projectzomboid$ vi ./media/lua/shared/NPCs/MainCreationMethods.lua
...
119 BaseGameCharacterDetails.DoTraits = function()
120 TraitFactory.addTrait("Axeman", getText("UI_trait_axeman"), 0, getText("UI_trait_axemandesc"), true);
121 local handy = TraitFactory.addTrait("Handy", getText("UI_trait_handy"), 8, getText("UI_trait_handydesc"), false);
122 handy:addXPBoost(Perks.Maintenance, 1)
123 handy:addXPBoost(Perks.Woodwork, 1)
...
ah right it's a lua, should be targettable then
I think? 😅
I'm not great with lua
or any coding language
How do you make it so containers or "loot" appear on trunks when they're not empty?
Support Corps [B42] has been released.
Download here: https://steamcommunity.com/sharedfiles/filedetails/?id=3409836763
You could do that really easily with Trait factory, adding teh XP boost to an existing skill.
That's the trait file from my custom Pile of Tweak Junk mod
whats with initNepLumberManTrait
Once upon a time it was one trait, that added axe skill
And I never bothered to rename the function.
I'm confused on how much of this is actually needed to just edit a trait 😅
very little.
Cuz it certainly seems to be a lot more than needed
Sure, but the point is to show you most of teh stuff TraitFactory does.
This looks like it adds traits, not modifies vanilla?
I already knew how to create new traits, I want to edit a vanilla one without overwriting it
If I have to overwrite then it's fine, just trying to see if I can avoid it
No need to overwrite.
Try this:
local function functionWithProperName()
local myTraitIWantToChange = TraitFactory.GetTrait("traitnamehere")
myTraitIWantToChange:addXPBoost(Perks.SmallBlunt, 1);
end
Events.OnGameBoot.Add(functionWithProperName);
local function ExampleName()
local allTraits = TraitFactory.GetTraits()
handy:addXPBoost(Perks.SmallBlunt, 1);
end
Events.OnGameBoot.Add(ExampleName);```
?
You wanted lua to add short blunt to a trait, right?
Sorry if I'm misunderstanding, self taught for this stuff cuz trouble reading documentation.
(also I edited the code after you copypasted it)
Good news, there is no documentation to read for the Zomboid API! 😂
local function ThisIsNotAVirusISwear()
local Cheese = TraitFactory.GetTrait("Handy")
Cheese:addXPBoost(Perks.SmallBlunt, 1);
end
Events.OnGameBoot.Add(ThisIsNotAVirusISwear);```
?
yup, give that a go
Fantastic!
So EVERYONE out here just raw dawgin the code
put it in 42\media\lua\client\sensibleFileName.lua in your mod
shouldn't it be in media/lua/shared/NPCs ?
Doesn't matter.
so long as it does not have the same path & filename as any vanilla file.
java.lang.RuntimeException: Object tried to call nil in ThisIsNotAVirusISwear
at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:82)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:954)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:173)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1963)
at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1790)
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:81)
at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:281)
at zombie.GameWindow.enter(GameWindow.java:896)
at zombie.GameWindow.mainThread(GameWindow.java:601)
at java.base/java.lang.Thread.run(Unknown Source)
Client & shared are pretty the same thing, server loads a bit later.
oh is it cuz no ; after?
yeah, my first thought is it's missing the semicolon
semicolon is optional in lua, because why woudl programmer ever want rules to make code consistent?
issue is Object tried to call nil in ThisIsNotAVirusISwear
the only thing we are calling is TraitFactory.GetTrait("Handy")
So either TraitFactory in nil or we're calling it wrong
This is the handy trait in vanilla
local handy = TraitFactory.addTrait("Handy", getText("UI_trait_handy"), 8, getText("UI_trait_handydesc"), false);
handy:addXPBoost(Perks.Maintenance, 1)
handy:addXPBoost(Perks.Woodwork, 1)```
Should it be calling the local and not the actual name?
so a captialization issue?
Also, there is a javadocs site with the B42 API that shows all the function you can call: https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/characters/traits/TraitFactory.html
declaration: package: zombie.characters.traits, class: TraitFactory
I will not understand that if I read it 🔥
yyeah, my bad - I wrote GetTrait, getTrait is (to a computer) completely different.
hint for reading it: we're using trait factory. Here is a list of what you can do with TraitFactory:
oh neat, reminds me of zenscript lol
getTrait() needs to be passed a string (which we know is "Handy")
And it will give us back a TraitFactory.Trait, which is teh object that has the addXPBoost() function we will call.
It worked, but not visually
tooltips are not automatic.
I thought the stat part of them was
you need to replace teh translationsting to change those.
That would make sense. But no.
I could've sworn the stat part is, because it generated them for the profession I was messing with?
Maybe my lua is just loading after the generation occurs, so it doesn't fire again
I thought it wasn't, but now I look you might be right
try Cheese:setDescription("Description goes here")
Found it - it does not get added automatically, it gets added by BaseGameCharacterDetails.SetTraitDescription(trait) in MainCreationMethods.lua
...which is kinda automatic.
It's not automatic, it's just automatic!
Cheese:setDescription("Description goes here\n Stat Bonus") ?
idk if \n works here or not
before that, try
BaseGameCharacterDetails.SetTraitDescription(Cheese)
though it will probably add the existing skills on again.
good odds that setDescription("Trait does this good thing") followed by BaseGameCharacterDetails.SetTraitDescription will get you the correct tooltip.
👍
👍
idk why I felt like doing that
The description shoudl really make use of the translation stuff, but it's 3:20am and it will work fine hardcoded in english for now.
would just changing it to the lang format work?
I think it's "UI_trait_handydesc"
hm, nope
I think it's the right lang name, I just don't think it worked is all
probably another instance of the lua being loaded after stuff like that
"UI_trait_handydesc" get passed to something and that looks up the string in the translation files
it's a really simple thing, just not simple at 3:30am 😂
Cheese:setDescription(SomethingThatTranslates:getTranslation("UI_trait_handydesc")) or somesuch
Ehhh the actual description isn't that important tbh, what's important is that the skill stats are auto generated 👍
Hello, I have decompiled the vanilla Java source. There is no problem to check the source, but some of the sources are not passing the build. Is there any reference to the procedure to successfully build the decompiled source?
- even the best decompilers won't decompile every file into a compilable state, some will just need manual fixes
- make sure every file actually decompiled, some files will just fail with certain decompilers (e.g. i use vineflower which can decompile the entire game, except the modelmanager class)
- make sure you have every dependency you need to build - that's everything java in the ProjectZomboid/ folder, and also a testing library that isn't bundled with the game (the code that needs it isn't normally triggered)
Thank you, I'll try it.
Hey guys! If you dont know am building game server panel for Project Zomboid, and was just wondering it's true there's no API? This true?
Wdym by no API ?
To access the game from outside commands you mean ?
I was just wondering if there was API? To fetch player information to the player manager easier but figured it out anyway.
In build 42 is the ability to replace java files added? If not, do they plan to add this in the future?
no and no
I assume you mean replacing Java files automatically, without the need for manually overwriting files. If so, the answers are no and no (but who knows what'll happen in the far future)
I saw that you ninja'd, albion, but I'd already put too much effort into figuring out how to phrase that
your answer was worth the wait
And you don't know what it's connected to? I mean, adding such a possibility? I think it will greatly expand modding possibilities
Is this difficult to implement or do developers just not have time for it now?
they don't want to because it's impossible to do in a secure way
it'd be extremely easy to make a java mod that is straight up malware
rcon only
but u can build a mod to output data
I got it, now everything has become much clearer, thanks! @bronze yoke @frank elbow
This is a bit off-topic, but I have to ask. What do you think about C# mods (for other games that allow you to include mods as dlls)?
they have the same security risks so i don't necessarily like them
that said, barotrauma has c# modding and i wrote a few c# mods for it
Yeah already got that setup using the terminal was just dive little better with API, but yeah that's what I'll probably do later on tbh
to be honest their lua api just seems really bad and limited, i think c# modding existing means they don't need to improve it 😭
u can write more rcon command actually
I believe there must be a way to make dlls secure. It may be a kind of static analysis...
EFT has C# for client mods too
Yo, got a question. when I add traits to player midgame and they have recipies I have to manually add recipes to player
local playerRecipes = player:getKnownRecipes();
if not playerRecipes:contains(recipe) then
playerRecipes:add(recipe);
end
Currently I have hardcoded the recipes to add but that's klinda trash cuz then between updates things can change and I have to doublecheck things which is bad design, like
player:getTraits():add("Hunter");
ETWCommonFunctions.applyXPBoost(player, Perks.Aiming, 1);
ETWCommonFunctions.applyXPBoost(player, Perks.Trapping, 1);
ETWCommonFunctions.applyXPBoost(player, Perks.Sneak, 1);
ETWCommonFunctions.applyXPBoost(player, Perks.SmallBlade, 1);
ETWCommonFunctions.addRecipe(player, "Make Stick Trap");
ETWCommonFunctions.addRecipe(player, "Make Snare Trap");
ETWCommonFunctions.addRecipe(player, "Make Wooden Box Trap");
ETWCommonFunctions.addRecipe(player, "Make Trap Box");
ETWCommonFunctions.addRecipe(player, "Make Cage Trap");
So far I go few things figured, I know I can get list of free recipes List<String> getFreeRecipes() and then just add them, but it needs to be ran on Trait (https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/characters/traits/TraitFactory.Trait.html#getFreeRecipes()) , so my question is how can I get a Trait by name? I know I can get TraitCollection by executing getTraits() on player but I don't see a way to get Trait from it
Any ideas?
Nevermind, I think I can get it from TraitFactory https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/characters/traits/TraitFactory.html#getTrait(java.lang.String)
may be TraitFactory.getTrait(string)?
Yep
From the game files:
function SpawnItems.GenerateSpecialKeyRing(playerObj, keyRings)
for i=0, playerObj:getTraits():size() - 1 do
local trait = TraitFactory.getTrait(playerObj:getTraits():get(i));
if trait and trait:getType() then
local traitType = trait:getType()
if SpawnItems.TraitKeyRings[traitType] then
local entry = SpawnItems.TraitKeyRings[traitType]
for j=0, #entry - 1 do
if entry[j] then
table.insert(keyRings, entry[j])
end
end
end
end
end
TraitKeyRings, not KeyRings
whats that
I guess
it's cute
Can someone make a .tilez and .pack file for me if I give you all the textures?
Im struggling with the modding tool TileZ
And I want to add in a new stove.
If someone can help with that then that’d be great
Cops start with a badge, but no ability to wave it around 😔
Kinda unplayable ngl
This is probably an elementary question: if I want to replace a single vanilla LUA function with my modded function, do I need to provide the entire base game file in my mod (with my changes), or can I simply provide a file that defines a function of the same name? In my case, I want to change ISForageAction:forage() and ISForageAction:complete() to grant XP on both pick up and discard by moving the forageSystem.giveItemXP() call into the first of those two functions (which is always called whether you add the item to inventory or discard it).
you can have a file that just has a function of the same name
if they call any local functions you'll have to copy those into your file though
Does the Bare Hands and the stomp count in the same way?
Wdym ?
When stomping, it will give weapon bare hands yes
But you can easily verify if it's a stomp or not
-- checks if player is handpushing zombie or barefoot attack
-- this is done by checking the weapon are hands and if damage is close to 0
local handPush = false
local footStomp = false
if attacker:isDoShove() then
-- hand push
if attacker:isAimAtFloor() then
footStomp = true
-- foot stomp
else
handPush = true
end
end
Does every item in the game have its own individual number/ID? Where can I find this?
Check out scripts
This might interest you in finding stuff
I didn't know that by pushing you could also do damage.
Sort of
The game doesn't actually damage tho
That event is flawed
The damage value is wrong
Do you think this is an ok format to work with?
Also preview/update:
Added programable buttons with color coding and logos for well known sites.
Looks nice—I'm guessing the ### without text are acting as end delimiters?
hence the config section
Yes, and adds a line break visually on the MD
Considering making it ### title ### instead, so it's possibly easier for regex purposes
Markdown parsers have a tendency to kind of do what they want within reason anyway (assuming they aren't based on CommonMark), since the original spec was not very specific at all
So I don't think anyone would be too mad, although those may show up in other places which would be less than ideal
I've only used md on github
hmm on github the footer line doesn't add an extra line lol
Probably because github likes to eat empty lines
I just checked and the original md document does specify that you can optionally have trailing #—never knew that
I imagine the ### are just being read as blank heading elements, which is the newline you were seeing
So I would be able to register if a push was successful?
Mod idea: Sound lures.
Noise makers home made, using an alarm clock or such. Maybe you need electrical but perhaps you are like, attaching a better battery or maybe just attaching multiple of them together with duct tape lmao
Something that'd be nice to have for forest bases to get zombies to be lured to specific areas, allowing for safer travel or easier clearing. Often issue is Noisemakers are too short in Radius (which confused me when I learned it.)
https://steamcommunity.com/sharedfiles/filedetails/?id=3410100954 I made a mod to separate out resting/sit on ground as a dedicated hotkey for the zero-to-hero players out there
Anyone mind testing it real quick?
Alright i've been fighting at getting this working for B42 for an hour now but keep getting this Error and a crash at startup
'java.lang.Exception: Item not found: Bag_EliteCombatMaxLaguna. line: item 1 [Bag_EliteCombatMaxLaguna]'
yet it seems to be properly defined in both items and Recipe's script file
People are out there working hard to produce high effort, high quality mods and here I am working on things like:
unrolling the lithium and chewing on it like gum, yummy
It's the 1990s, we're chewing on alkaline batteries for that tingly potassium hydroxide flavor.
Please make biteable batteries
If your battery is about to run out, you can bite it to restore 5% stored power
You were fast with this, saw this suggestion on reddit.
Got all the code written, just need to make it actually work now laughs
Good enough to go get breakfast.
Is there a way to specify how many charges of thread or twine should be used within a crafting recipe itself? b42
tru
works as intended 
---Add recipes from a trait to player
---@param traitName string
function ETWCommonFunctions.addRecipes(traitName)
local player = getPlayer();
local trait = TraitFactory.getTrait(traitName);
local freeRecipes = trait:getFreeRecipes();
local playerRecipes = player:getKnownRecipes();
if detailedDebug then print("ETW Logger | ETWCommonFunctions.addRecipes(): adding recipes for trait " .. traitName) end
for i = 0, freeRecipes:size() - 1 do
local recipe = freeRecipes:get(i);
if not playerRecipes:contains(recipe) then
if detailedDebug then print("ETW Logger | ETWCommonFunctions.addRecipes(): player doesn't have " .. recipe .. ", adding it to known recipes") end
playerRecipes:add(recipe);
end
end
end
---Removes recipes from a trait from a player
---@param traitName string
function ETWCommonFunctions.removeRecipes(traitName)
local player = getPlayer();
local trait = TraitFactory.getTrait(traitName);
local freeRecipes = trait:getFreeRecipes();
local playerRecipes = player:getKnownRecipes();
if detailedDebug then print("ETW Logger | ETWCommonFunctions.removeRecipes(): removing recipies for trait " .. traitName) end
for i = 0, freeRecipes:size() - 1 do
local recipe = freeRecipes:get(i);
if playerRecipes:contains(recipe) then
if detailedDebug then print("ETW Logger | ETWCommonFunctions.removeRecipes(): player has " .. recipe .. ", removing it from known recipes") end
playerRecipes:remove(recipe);
end
end
end
; 
misinput hold on
I know but Im used to it and I'm gonna keep using it
how can you not end line with ;
smh
I'm using it in C#, C, C++, Java, TS
Cuz its mandatory (well except ts)
So I'd rather add extra symbol in lua than not add anything 
IT WAS A MISINPUT
DOWNLOAD: https://uptona.com/UVP1Pk3G
hi so,
trying out project zomboid modding due to a mixture of boredom, sleep deprival and annoyance at holsters (starting with just a simple mod that adds one recipe for a double holster from two single holsters + thread w/ scissors and needle) but can't seem to get it to show up in the mod manager, this file is in my steamapps/common/ProjectZomboid/Workshop folder so, any clue how to get it to show up? Am i missing a file or have i wrote something wrong or? Im so sorry if im being annoying i'm just a moron lmao
all the shit i've tried from my shitty memory:
reloading the lua by toggling a mod because the fuckin force lua reload button mod isn't on 42
reloading the whole game
copying files from a github thing
copying files from another mod then removing those because plagarism
every modding resource I can find just tells me to ask you guys so, should have done it earlier before spending probably like an hour or some shit but idfk i suck socially so
(no experience with project zomboid modding but I do have some experience with rimworld modding and they feel quite similar so)
where did u add it
yeah mine looks like that so i have no idea
if folder struct is correct then it's mod.info fault
crossed out is extra stuff but you get the idea
you can just copy and send it as text dont really have to send the file
name=[B42] Ferret's Double Holster Recipe
id=FerretsDoubleHolsterRecipe
poster=poster.png
authors=FerretWithACatHat
modversion=1.0.0
description=Simply adds a recipe for Double Holsters
tags=Build 42
versionMin=42.0
yea im confused idk whats wrong with it
i mean im not sure if this has an impact but i have project zomboid downloaded in a D: drive and not a C: drive?
it's becuase i upgraded SSD so
i doubt that would matter but maybe it does
doesnt matter
gn im giving up
the wiki told me to do that too so
i don't really know the difference, all I know in Workshop it works
put it in user/zomboid/workshop
Then it should show up in the mod menu. If you can't see it, you can check if the game sees it at all. From the menu go to 'workshop' then 'upload, create item' (you're not actually going to upload), select your mod, then if something is wrong the game will tell you like sometimes there's no preview image or wrong folder found.
If you have trouble finding this Users/[userprofile]/zomboid folder, you can search %appdata% on your windows search bar and then you will have to go back a few directories
<user>/Zombioid/mods lets you add local mods. <user>/Zombioid/workshop is for preparing mods to upload to steam,
For some reason, my Zomboid/mods folder does not show up in my mod list but it shows up in workshop. It used to work like that before b42
So under mods you just make MyMod with 42 and common in it. Under workshop you make a workshop folder with a workship file, then Content/mods/ then you can bundle multipel mods in one workshop item
I develop mods under <user>/Zombioid/mods and move them to workshop once they are ready to upload, but you can develop directly under workshop too. Just don't have the same mod in both or you will never know which is loading.
also can't implement this becuase i am in bed at 3:17 because i gave up and its 3 am
goood niight
I know that feeling, it's 4am and you want to finish a mod but the real-life fatigue noodle gives you -90% Programming skill
i mean I have my mod in workshop folder and they are local and load into the game so idk
https://steamcommunity.com/sharedfiles/filedetails/?id=3077900375
Remastered the Mod Update and Alert system to be more streamlined based on feedback:
- No longer separate mod-alert and drop message.
- The first alert will remain a message about supporting modding, the rest will be customizable alerts per mod.
- The alert symbol will be marked red when new alerts are found, to be cleared as they are read-through.
- Subsequent reloads will mark all alerts as old.
- Added more UI to allow for scrolling forward/back along the alerts list.
The system has been remastered into a true API - so that any mod-author can make use of it:
- As before only requires mod-author to include a ChangeLog.txt (Now expected in /common/ for B42+, as before /media/ for B41-)
- Also supports the use of a changelog.md file if a changelog.txt file is not present, see `ChangeLog.md` for that format. (Suggestion: Omar)
- Alerts support programmable buttons by the mod's respective author.
- Well known sites are color-coded and override a provided title with a logo.
- Sites that do not start with: `https://steamcommunity.com`, `https://projectzomboid.com`, `https://theindiestone.com`, require Steam's link filter: `https://steamcommunity.com/linkfilter/?u=`.
See: `ChangeLog.txt` and `ChangeLog.md` entry: ALERT_CONFIG for an example.
Fixes: Anchored UI to handle screen size changes.
Is it possible to load changelog from location defined by mod?
Like I want to keep my changelog in root folder and not 3 subfolders inside the mod
how bad is this method for adding items?
table.insert(ProceduralDistributions["list"]["BookstoreBooks"].items, "ExtraBooks.EBFirearm1");
table.insert(ProceduralDistributions["list"]["BookstoreBooks"].items, 1);
should I use a true function?
That's how the vanilla loot tables are done. <-- ignore that
The reader was changed so probably not
You're fine to use table.insert to insert items, wrap it in a function if it gets unmanagable doing it that way
this is fine, but it gets harder and harder to spot typos when you have large amounts of these
okay, ty both, I'm making a mod that adds items from dungeons and dragons btw, in principle for decoration only, to give more life to the world
Let me check something to do with the reader actually
I keep all my commonly accessed stuff inside root 
you wouldn't be able to get a reader out to there
The outermost file it could go to is probably mods/ it seems like

if I leave the first argument as null
you have me to blame for that i'm afraid
For B42? There are already a bunch of not-Dungeons-and-Dragosn books and dice added, are you adding even more tabletop RPG stuff?
how come
Would be fun to setup a whole table for roleplaying in the safehouse.
there was a method, but i reported it as an exploit
Yeah no leaving the first argument as nil doesn't seem to work
yes, my idea is to add the rule books, to be able to roll the dice (the character will say what he/she got as with the cards) and that the character sheet can be editable and write on it (like the maps), so you could get to play in the real game, simulation inside a simulation xD
So /common/ it is
What are these mod alerts?
these
thats cool, it will be part of base game? Like does this show for people who dont have this installed?
This is a mod/api for alerts - it would be cool if they added something like this to the base game, but whos to say.
And no, if you don't have this enabled it won't show up
Does convertibles work properly in 42?
how works the spawn rate? 100 it's 100%?
it's based on a lot of factors that are hard to predict
it's better to base it off of vanilla values and check lootzed to be sure
okay, ty
Nooooooooooooooooooooooooooooooooooooooo!
starlit has an event that lets you add to the tooltips if you need
I need to remove, not add.
good luck, brave soldier...
the starlit event *may* be helpful for that too but i never tried it so i don't really know
two plans: 1, I use a postfix on the lua that... wait that's no good, there is no return from DoToolTip. OK, a postfix that finds the tooltip object and looks for any line starting with Translator.getText("IGUI_invpanel_Remaining") and removes that.
Plan B: I create a fake battery object that looks like a battery but isn't drainable, swap that in to ISToolTipInv.item, go through tooltip generation, put back the original object.
I'll have a look at Starlight, if it doesn't have a removeFromTooltip it will at least have code to do stuff to the tooltip
Thanks for teh pointer.
Sure, I'll just casually knock out a rewrite of RV interiors for B42. Should only take an hour or two right?
hey guys im trying to make a custom bat mod and it spawns in but massive im new and can not figure out what could be wrong
set model scale to be smaller
you gotta export it to 0.01
from blender?
yes
how do i do that
export to 0.01 scale when you export to .fbx
@bronze yoke good start, I've added Battery Farms to the Zomboid lore.
LOL
It'd be funny if it comes from those manufacturing facilities, like the lectromax factory
testing now im just trying to do a simple bat i matched it in blender with an existing bat is there anything extra i need to do
other then the cfg
I wouldnt know much past that. I have not done a weapons mod.
well that worked but it is not im my hands as it should be
any ideas
Thats good, wish I could give you any more advice.
Maybe rotate your model to match the hand placement
the .x bat?
yeah
did you make sure to apply the transforms of the bats?
it looks like from fresh import of the bat, it has 90 degree rotation on the x axis
is that how its suppose to be
ill be honest, idk
if anyone figures this out lmk im really trying to get in to making melee weapons
They should be brought in the game
You can create a local link so your readme shows up as a link in the root folder if you mean to have something show up on github
Does he have in-game buttons? It's like when you press the ESC, the bottom right corner will appear
I might be tempted to use it inside the server
The UI appears in ESC yes
I'm sad I haven't heard anything from the folks making the entire stalker 1 map in pz
wdym?
In your root readMe - if you want it there for the purposes of GitHub showing it on the repos main page --- you can put a link to the actual readme deeper inside.
[Text](local-relative-path)
But instead of the actual change log it will be a link
But you can also put a description of the mod, and other useful links there too, so it's not just "click here for change log"
If your issue with it being deeper inside is related to something else Idk lol
@bronze yoke where can I get umbrella archive for 42? if i wanna toss it into intellij
releases dont have it
yeah i don't really bother with releases anymore and i'm not sure i've updated the main umbrella repository at all

the library folder in here should always have the most up to date version https://github.com/demiurgeQuantified/UmbrellaAddon-Unstable
let me see if i have anything left to push
oh well nothing i can push anyway, that's the up to date version
it's actually a fair bit newer than the version on the lua addon manager with a lot of improvements to the generation so you get an exclusive sneak peak

I'm a special little boy 
Exclusive access 
idk why and how but for some reason I already have unstable umbrella fetched in intellij?

oh wait its cuz I pointed luarc file to my vscode addons location

Hi, I wanted to get one similar item from my inventory when I open the context menu on an item. This is my current code
local magazine = player:getInventory():getBestTypeEvalRecurse(item:getType(), function(item1, item2)
return item1:getID() ~= item2:getID()
end)
It's not working currently because it still returns the selected item
Looks impossible to edit/remove bits of a tooltip, because ObjectTooltip.Layout only has an addItem() and all my attempt to look at the field ArrayList<ObjectTooltip.LayoutItem> of a Layout have not worked.
Then digging into decompiled java: Layouts pop and push off Tooltip's private static Stack<Layout> freeLayouts; you grab one with BeginLayout(), add stuff, render it, then send it back with EndLayout(tooltip) for recycling all within Java's DoToolTip(). This means there is never a time when lua can edit/remove things from tooltop, it can only add more stuff by grabbinga new Layout and putting stuff in it.
i'm not sure why this wouldn't work, but you don't need to compare ids, you can compare the objects directly, it is simpler code and runs much faster (item1 ~= item2)
oh you have to see how i did it for starlit it's so stupid
"I love tables, I love tables so much I'm making a new thing I will call metatables!"
local layout = self.tooltip--[[@as ObjectTooltip]]:beginLayout()
self.tooltip.freeLayouts:push(layout)
i just get a layout and then put it back on the stack manually so i can keep a reference to the one it actually uses lol
I can't see anyway to retroactively edit layouts that have already been done, since they get rendered in DoToolTip() before being thrown back to the stack to reuse. (I assume that's a performnce thing to avoid making a new gui Tooltip object every single frame)
so I'll go with the "swap in fake item before rendering tooltop" idea
yeah, now that i'm thinking about it, i'm pretty sure my code just renders again, it wouldn't be able to un-render
Vanilla Zomboid would never have a reason to edit/delete bits of a populated tooltip, they would just not put it there in the first place.
yeah, i took a look and i can't see how you'd do it either
Like this:
Just need to make a fakebattery item that has a tooltip like a battery with no drainable stat
But first I shall actually play some Zomboid instead of failing to write mods 😂
How to add the right click menu script
example: ```local doDIYContextMenu = function(playerNum, context, items)
print("##### doDIYContextMenu()")
local primaryItem = items[1]
if not instanceof(primaryItem, "InventoryItem") then
primaryItem = primaryItem.items[1]
end
if primaryItem:hasTag("DIYSchematic") then
print("##### It's a DIY Scematic")
local playerObj = getSpecificPlayer(playerNum)
readOption = context:addOption(getText("ContextMenu_ReadDIY"), items, DIYonLiteratureItems, playerObj);
end
end
Events.OnFillInventoryObjectContextMenu.Add(doDIYContextMenu)
To clarify, are you asking about making it possible to make more sound lures, or to buff the existing one?
Or do you mean "a recipe exists, but does not show up in the context menu automatically like some recipes do, how do I make it show?"
yes
Because in that case I have no idea how recipies are comsidered special enough to add to the context menu.
try \media\lua\client\ISUI\ISInventoryPaneContextMenu.lua for clues
tis also seem to have no clue judging by all the puzzling exclusions
ISInventoryPaneContextMenu.addNewCraftingDynamicalContextMenu
there's logic involved.
if logic then
kill
end
thanks,i try to figure it out
tests.recipe = CraftRecipeManager.getUniqueRecipeItems(itemsCraft[1], playerObj, containerList);
Where getUniqueRecipeItems is java
that list gets passed to addNewCraftingDynamicalContextMenu in lua
Which I think adds everything to the context menu, meaning the decision process on which recipies go in the context menu happens in java.
anyonw have info how to setup a inventory icon for my custom items
thank again,i try to copy the battery code for flash light to other item
UseDelta = <some number> in the item definition is what makes an item "drainable", i.e.: it has a charge between 0.0 and 1.0 like flashlight or radio with battery installed.
If I recall correctly In B41 "empty flashlight" and "flashlight with battery" were different objects, but in B42 there are incomplete changes to making items able to just have 0.0 charge
i seems hard to make a weapon to be drainable
add usedelta in the item definition and a recipe " add battery to weapon" the game get stuck
It may not be possible. Depending on the parameters the item will get assigned a java class, with wepaon being I think HandWeapon. If the parser can't make sense of UseDelta for a HAndWeapon, it will throw a bit fit.
What is the weapon idea, and can you use ammo count instead (with modified loading functions)
So you have a lighting gun and when you hit reload you remove a drained battery and put a new one in.
my idea is make some electric melee weapon,the first part is insert battery and be powerful when it have battery power
I think you could do that by using the weapon's ModData to store charge info, updating it after each attack, and changing minDamage/maxDamage when it hits zero or when a new battery is put in.
Shame they never bother to implement chainsaw beyong defining a weapon type.
The method of using moddata is work,i try it before, but it will encounter many problems. The battery's state of charge is not recorded in the condition, but in delta
anyway, if i want this work good,still need to make the weapon to be drainable
I don't think you'll be able to, HandWeapon Extends InventoryItem while the drainable stuff is in other extensions like DrainableComboItem
Hi everyone, i heard about some api/mod helping to manage custom events (for example based on server time, it would trigger some Z horde, or a radio broadcast, smth like that) but i can't recall the name. Can anyone enlighten me please?
Bottle -> broken bottle -> glass?
Does it have a chance to cut your hand up on that last stage?
Uh no idea, the broken bottle is a vanilla weapon
Normally you would just use the context menu option to smash the bottle into a weapon, but this eliminates the need for that and adds on some usability
obviously it doesn't remove the option, it would just make sense to use it until it breaks instead
Horrendous, they need to fix this shit lol
Hello folks, I just started playing with patch 42 and I noticed that a mod I made, more specifically the Lua scripts, aren't working properly. Did something change in the API used? I added the "42" folder but even if I can see the mod, the Lua code isn't picked up. Has anyone encountered this issue before?
Errors or it just doesn't seem to work?
A lot of API things changed
I just ask to see if there is a problem with a directory structure I'm not aware, or there is something else I need to investigate first.
Errors mostly
Well, a lot of mods were the same, it's not anything horribly overwhelming
Can you look at the errors in debug mode? What mod is it?
It's custom made, not ever released. But if you said the API has been updated, I suppose I just need to go back to the documentation and update my code. Hopefully the documentation has been updated.
Depending on how complicated it is it might be a lot. For some of my mods all I had to do was change a single function
The one thing I know for sure has changed is creating items on the ground
Well, mine essentially creates a new job and adds a custom perk, plus adding custom inventory items to the character. One thing I remember is that errors were thrown everywhere when I selected the job and the perk, so I need to start there.
Imported souls of the damned at that!
Fancy
Guys, how would you update your car mods for last build? Is it a different folder structure, because 90% of my installed car mods stopped working + my own.
Mostly the folder structure. You can't enable a mod if it doesn't have the new structure. The vehicle scripting didn't change as far as I know
Anyone know how to address enum with a dot like NetworkTeleport.Type in lua? Can't figure out the correct way to refer to it (it is NetworkTeleport$Type in pipewrench)
The good news is the official API documentation for B42 is just as good as the official API documentation for B41...
I wouldn't be suprised if something minor changed when they went from "all jobs have a cost based on what they give you" to "all jobs are the same cost"
Imagine you want to build an object orientated programming language, but all you have is tables. That' lua.
Whre/how are you trying to use the enum?
I'm trying to teleport the player using setTeleport, and need the teleport type for creating a new NetworkTeleport
Yeah... It seems there are too many ways to emulate enum behaviour in lua, but not sure what approach kahlua is using
oddly, I can't find "NetworkTeleport" anywhere in the vanilla lua code
Same. At least pipewrench (for B41) claims it should be exposed
B42 removed the SetLx etc from IsoMovingObject, so I'm not sure how to teleport the player outside the loaded area
DebugMode does it (and much faster than B41 did! - no huge stutter on load in) so.. ISTeleportDebugUI.lua or a simialr file should hold the answers.
Anyone got thoughts on how feasible this would be to do?
Use rope to drag corpses, similar to roping animals.
Thanks. Could not figure out how that does the teleporting yet, but it seems they renamed setLx to setLastX. And they seem to work as before
Animal roping seems to use LineDrawer, and I think that is not exposed to lua, so drawing a custom rope might be difficult
Getting the corpses to "follow" you should be reasonable, but might not be pretty
they're corpses, they are not meant to be pretty. 😛
The player is a fucking body builder or what lmao ?
Crossfit.
12 rounds, 300m corpse drag/chop down two trees/sprint back.
is it possible to use the 3d models provided with the game itself by referencing them directly or do I copy and paste them into my mod?
you can just reference them
mesh = Base.RPGManual, like this?
for example
just the file path like this i think
I am trying to create a clothing with an attached item to it. I want to change its position when a bag is equipped but I don't fully understand the replacements section. I've been looking from other mods like the rifle sling mod where he used it like this.
What I don't get is he used RifleSling as the key and when I tried to search RifleSling there is no other places where it is used. I thought the key should be the attachment type and the value should be the body location you defined
lua```player:setX(x)
player:setY(y)
player:setLx(x)
player:setLy(y)
I feel like the hardest part about dragging a body would be the grip. Having the weight attached around your waist would be easier I feel
Though it really just depends on where your strength is located
hello, where can i learn to update someone else mod?
Arms vs legs
Do you have the authorization to do so ?
Yesn't-
But not to take ownership of it.. there's some dead mod out there i'd like to revive , that i'd delete if they were to ask me to one day..
im thinking of a 2023 mod
where can i learn mod necromancy?
Either or.
I want to try and make a mod or request a mod for it so I can have something for my forest base to draw out the zombies to specific areas to clear em out.
that's not a thing, your best bet is just to update the folder structure
i'll take a look thank you
Is the normal craftable noise maker too short ranged?
AFAIK it's only like, 20 tiles?
For how LOUD it is you'd think it was way larger.
30, my bad.
How many tiles is a shotgun shot
Hmm yeah sounds like it could get a buff
20: Memory
30: Reading the page wrong 
From the wiki itself:
A noise maker is an effective tool at luring zombies to a particular location. It functions similar to an alarm clock in that it generates noise for 30 in-game minutes, except with a larger noise radius of 17 tiles (2 more). A noise maker can be either thrown or placed, and will be triggered as soon as it touches the ground. Unlike the alarm clock, the trigger cannot be delayed unless upgraded.
"effective"
Isn't the sound generator like, ONLY craftable with the engineer profession? I don't think there's a magazine for it (there definitely should be, or just base it off a skill level)
YEP.
Yeah having something be class specific but less effective than a single gun bullet is rather silly
Engineer just feels like electrician but worse
Tis why my idea is multiple alarm clocks ductaped together basically. 
Wouldn't duct taping them together make it quieter? Cuz it suppresses vibration?
More mass to vibrate without changing the input energy = less vibration/sound
Cuz the alarm clocks in game are analog, they have bell alarms not electrical
Maybe you need electrical components to make the motor that causes the hammer hitting the bells to go faster???
I think we could definitely buff the vanilla sound maker tho, it's electrical and uses a speaker

I think it's pretty easy to make sound with electricity
Very true.
I just find the idea of like, 2 or 3 alarm clocks taped together pretty funny

"Noisemaker at home"
No genuinely why is it so bad. You get 1 electrical and 1 carpentry, and some mediocre recipes. For the same starting point cost as electricians
outdated
An engineer would do great in an apocalypse, no?
Indeed.
He should get like, more electrical components or maybe makes things faster, iunno
I feel like they should get maintenance
I'll figure it out and add it to one of mods I'm making. Currently it just adds 1 level of short blunt to the handy trait
Later today I'll look at the noise makers and how to buff them + buff engineer
I do think it's fine that engineer starts with it, but I feel like a magazine should have it too
Like generator mag
Hey guys, is there any Lua or Java interface that can control the vehicle? It seems that
function BaseVehicle:getController() end
cannot control the movement and steering of the vehicle
wow I just tested the pipe and aerosol bombs in debug mode and they genuinely suck so bad 🔥 🔥🔥🔥
Like why did I set off multiple pipe bombs and not a single zombie died 🤨
multiple pipe bombs, right next to the zombies
hitting a zombie with a sauce pan does more damage, and consistently
Hi! I am trying to make the borders of each icon (which are buttons) share the same border, fitting the total width of the panel. I can't get it
https://imgur.com/eCnRByF
how to add a timed action, i have write a script,like atttach a falshlight to a bat,but how to make this action have a timedaction
Hi, in case someone is interested in using a craft recipe from Lua, here's a function that works for both B41 and B42:
local function useRecipe(item, player)
local containers = ISInventoryPaneContextMenu.getContainers(player)
if getCore():getGameVersion():getMajor() < 42 then
local recipes = RecipeManager.getUniqueRecipeItems(item, player, containers)
if recipes and recipes:size() > 0 then
local recipe = recipes:get(0)
local howMany = RecipeManager.getNumberOfTimesRecipeCanBeDone(recipe, player, containers, item)
if howMany < 1 then
return
end
local action = ISCraftAction:new(player, item, recipe:getTimeToMake(), recipe, player:getInventory(), containers)
ISTimedActionQueue.add(action)
end
else
local recipes = CraftRecipeManager.getUniqueRecipeItems(item, player, containers)
if recipes and recipes:size() > 0 then
local recipe = recipes:get(0)
ISInventoryPaneContextMenu.OnNewCraft(item, recipe, player:getNumPlayer(), false)
end
end
end
I know people talked about this being difficult earlier, but is there any mod examples of items having custom item tooltips
I don't have an example, but you can link to the tooltips yea
Yup
any performance issues?
Not when adding some static text.
If you want to add something that takes a lot of effort to calculate then you'd have an issue and need to figure out some optimisation, but most tooltip stuff would be simple
Like "if item:hastag("smeltable") add a line saying smeltable"
Doing a single math equation when a function is called and then updating the tooltip with that number shouldn't be an issue though, unless it's horribly unoptimized
The Water/food trough tooltip is probably the most customised vanilla one,
So I should be good
"math equation" has quite a bit of scope 😂
Lol yeah, but that's the math's optimization, not the tooltip's
Calculating the meaning of the universe is a different problem
Adding a static "42" is easy.
Hello !
I’m about to finish my first mod which is intended to smooth the navigation between inventory on a controller.
It works, I just have to find the name of a control to use it.
Like, to use L1, I write: JoyPad.Lbumper and JoyPad.Start for Start but for L2 and R2 I can’t find anything
I understand that it is not buttons but axes, but there must be a way to use them?
I tried LTrigger, TriggerLeft in vain, anyone have any idea ??
is there any way to write on something like this without being a map?
ty!!
Can I somehow have both version 41 and 42 at the same time?
I want to play / mod 42 but play mp with a friend on 41, I know it's probably a question for techsupport but thought there is a higher chance that a dev knows it 😄
Yea
I believe you can
although now that I read it properly, that doesn't really answer my question, what I want is to be able to write/draw like when you do it on a map
Involves copying the game files for a version into another folder
Ah your question was how you write such a document
Sadly I don't think we can write on it for now ? But there's probably ways to do so tbf
step 1: buy two computers, step 2: buy two copies of zomboid
No lol
I mean the only thing I can think of is to use a “map” and put the background image I want, but I don't know if there is a more elegant solution
I wouldn't suggest using maps now that we have this system ? It's definitely possible to write on these papers, everything is possible, the question is how
Weird that it's not extremely straight forward



