#mod_development
1 messages · Page 277 of 1
I'mma also try to find out how to make sound replacers for the zombies to make them sound more like people with a superinfection of tuberculosis like my mod is supposed to make the zombies into lol
This is exactly where my attatchment point for my muzzle is
how did you fix the rotation issue?
I had the X for the rotate on the attatchment muzzle at -92 for whatever reason
hm
like this:
(this is not my own attatchment data)
I took this from another mod's attatchment data for 42
hoping it would give insight on my own issue
so the muzzle flash rotates with the attachment
the bullet effect originates from the attachment
but the muzzle flash doesn't move with it
that's so goddamn weird
theres the mistake all along.
you used things from another mod. each gun mod,
should be from scratch with its own Zero'd out attachdata.
How do you zero it out then?
I'm having about the same issue, displaced and wonky muzzle flash
rotate = -0.0000 0.0000 0.0000, <---
you can zero all. while starting out yes
as you edit it in the attchment editor. it will adjust.
Good to know about slashes for the mod ID! Both points makes sense. Thanks 🙂
trying to update a mod with a author who doesn't seem to come back. Any thoughts on where to address issues in stack trace? Specifically opening car hood, and mechanic ui window
I would put a breakpoint in ISOpenMechanicsUIAction on line 34 and check the variable state of ui and self.vehicle
i would personally not steal someones mod as the default, reach out first.
Zeros in file, attachment editor in game, understood
i will be the sufferer
if this fixs it
I am going to scream
then cream
it will reset it to 0, and then you use the editor to re fi its new position
;[
i have attempted recently, but the 1+ year inactivity everywhere,
otherwise begging and pleading is first attempt
credit is not my goal, just working functionality for another mod i love that is waiting for this mod to be updated
is it possible to add additional clothing layers / allow the player to wear two of one item type
so two pairs of pants at the same time (one being some sort of accessory but still defined as pants)?
this is so fucking annoying
Why is it doing this..... augh..
The displacement of the actual muzzleflash and where the bullets are coming from is jarring
does anybody know where the new voice files are? and what scripts they use?
I would like to get to know the shaders like the drunkenness and shortsighted shaders, but I don't know where to find the code that triggers and controlls them. Does anyone know where they are and if they can be acccessed?
Anybody knows if sandbox vars are indeed better in b42? How soon can they be used reliably? I'll be looking to update the distributions for my mod later.
from looking at the code i don't think it has been moved much if at all
i see what they did
they didn't make sandbox options load earlier, they moved ItemPickerJava.Parse() to be after sandbox options load
but the thing is there's no events between them, so it doesn't actually change anything 
// 41.78.16
LuaEventManager.triggerEvent("OnPreDistributionMerge");
LuaEventManager.triggerEvent("OnDistributionMerge");
LuaEventManager.triggerEvent("OnPostDistributionMerge");
ItemPickerJava.Parse();
VehiclesDB2.instance.init();
LuaEventManager.triggerEvent("OnInitWorld");
if (!GameClient.bClient) {
SandboxOptions.instance.load();
}
// 42.0.0 rev25072
LuaEventManager.triggerEvent("OnPreDistributionMerge");
LuaEventManager.triggerEvent("OnDistributionMerge");
LuaEventManager.triggerEvent("OnPostDistributionMerge");
VehiclesDB2.instance.init();
LuaEventManager.triggerEvent("OnInitWorld");
if (!GameClient.bClient) {
SandboxOptions.instance.load();
}
ItemPickerJava.Parse();
it turns out i was always wrong about OnInitGlobalModData being the earliest event with sandbox options available, it's technically actually OnLoadedTileDefinitions, but it doesn't really change anything
is the mod related to cars at all?
I had the same error when one of the recipes(backpacks) was missing a coma
yep, tsars common library
mods, crush his skull
Hi, is there any way to open a https communication in lua mod?
Is there an event for when the player unequips something or more specifically takes off clothing
I am a beginner at coding. May I ask how to solve the clipping issue between backpacks and clothing?
OnClothingUpdated is the only one i think
Its b41 or b42? Also show XML file of your outfit if you can
Also i assume its happening with all backpacks, or only yours?
This is B42.
It seems that all backpacks have this issue.
This mod has been upgraded from B41 to B42.
I haven't made any changes to the XML part.
Can you try inserting this ine into that XML and see if it changed? It should work even when your game is running:
<m_MasksFolder>media/textures/Clothes/Hat/Masks</m_MasksFolder>
is there a thirst multiplier? I tried using getThirstMultiplier but it seems it doesnt exists
Hmm... it doesn’t seem to work.
You have this mod on local files only, or are both subbed and have local files?
It's only in the local files, not subscribed on the Workshop.
Working on making corpses be transportable again
So i think if you added that line to backpack itself, it should work... however that would require changing every single backpack. Might i ask for you to change your Body Location on that outfit to not use custom one and instead maybe "BodyLocation = FullSuitHead,"?
Does it not have any built in way to see what was unequipped / equipped?
Ok, I'll give it a try.
Hello! I am confused because the recipe script has changed drastically. Is there any information anywhere that summarizes the script specifications? I have no choice but to look at the vanilla implementation, but I am at a loss, for example, I can no longer specify Sound or StopOnWalk...
no i think the only way to tell would be to replace one of the functions in ISUnequipAction.lua
I'm not sure if this is the right approach, but now it can't be worn with the backpack at the same time.
Oh no no no... I meant in ItemScript
I meant that you can use vanila bodylocation for your fullbudy outfit that should also allow to wear backpack.
This is what i meant, Open your outfit clothing item script and put that bodylocation.
Like this?
tem wz1
{
Type = Clothing,
DisplayName = wz1,
ClothingItem = wz1,
BodyLocation = FullSuitHead,
BloodLocation = Head;Neck;Trousers;Jumper;Hands;Shoes,
NeckProtectionModifier = 1,
Icon = pr1,
CanHaveHoles = false,
BiteDefense = 0,
Insulation = 0,
WindResistance = 0,
}
Yes
Also revert change in that as it might cause issues
It still doesn't work.
Like the backpack model is mostly invisible, right?
No, now the backpack cannot be equipped with the outfit at the same time.
Okay i see the issue
if self.item:getFullType() == "Base.NutritionistMag" then
local traits = self.character:getTraits()
if not traits:contains("Nutritionist") then
traits:add("Nutritionist")
-- Remove the trait if sandbox option to remove is enabled
elseif sBvars.ReadRemove == true then
traits:remove("Nutritionist")
end
if sBvars.ReadDelete == true then
getPlayer():getInventory():RemoveOneOf("Base.NutritionistMag")
end
end
Hello! Tried searching for info on removing items but couldn't find much. This is my current code for removing a magazine after it is read. I've tried DoRemoveItem but it keeps returning nil, RemoveOneOf seems to work but it causes another mod that affects reading speed to throw errors. Is there a better way to do this?
Change it to "BodyLocation = BodyCostume,"
I just want to see if it will make backpack visible since custom bodyparts can act funny sometimes
It worked
Yay
Thing is, now if you wear certain clothes, those might show though...
Unless you would add more exclusive things to that body location, but then it can mess with vanilaclothes that use it too
So only using the vanilla BodyLocations for clothing positions will prevent this kind of issue?
You can try again creating your own and coppying everything from lua>shared>NPCs>Bodylocations and getting every "BodyCostume" and just make your own version with everything but back hidden?
I'll try
Thank you very much
Delete all group:setExclusive("BodyCostume", "xx") and create the corresponding group:setHideModel("BodyCostume", "xx") Is that correct?
You want to create another Body costume like location for example "BodyCostumeWZ1" and just copy all rules from original BodyCostume for your location too and then add some extra ones that you feel like could help. In no way edit vanilla locations as it will cause issues with vanilla clothes that use them
I understand, thank you!
Has anyone already increased their sneaking perk by moving around zombies ?
Idk if this is right channel for suggesting mods but it would be cool (funny) to be able to play guitar hero in project zomboid. Or just a guitar whihc can be used by guitar hero guitar with adjustable tunes so you can use it to play music.
I get that its/maybe impossible but would be funny
What are you guys using for decompiling java for your mod projectss?
Is this still the way? https://github.com/Konijima/PZ-Libraries
Does anyone know what the format is in there?
i tried using the possible format ,buy not all wokring
The DrainableComboItem class changed and now its not possible to access the delta of it for some reason...? How is one supposed to check if a item like a battery has charge now?
there is only some new getter called "GetEnergy" but thats not implemented, and "getUseDelta" just returns the amount that gets used from the delta of that item
like, usage per tick or something like that
following that "getEnergy" function, i see that there is a new class just called "Energy" which seems to define different types of possible energy storage, like thermic, mechanical, electrical and so on... so is it just best to assume that i have to wait until they finish implementing that?
Trying to figure out why this clay making mod isn't showing up in the workshop. The folder structure seems to be accurate, but it refuses to show up in the mod list. Any ideas?
are you 100% sure the structure is correct? i had to fiddle a ton around with it too
I had to create a common folder for mine to show up
I double checked - set it up exactly the same as I did with my whetstone crafting mod. But never hurts to have extra eyes look
wait is the common folder inside 42.0
I'm realizing I didn'tt go far enough up into the folder structure - but that's within the contents/mods/claycraft folder
I put poster and mod info into common and just use 42
(i hate folder trees)
Nah, it's alongside it
The new structure is rlly confusing
yeah, and the huge trees that show it off dont make it easy to understand
just a tiny thing - not sure if it fixes it, but i see everyone naming the "common" folder in lowercase, but yours starts with uppercase
dont know if its case-sensitive or not
im looking into my decompiled java files and see what you're talking about
yeah i am really confused about that right now
since... i cant access the delta from batteries or any drainable item really
which makes my rechargeable batteries mod, impossible on the current build
the class seems very unfinished
with the drainable and IUpdater interfaces just empty
well, the changes seem unfinished at the very least
Jfc it's case sensitive.
yeah and there are functions that just return null hardcoded
yeah the energy related stuff
gonna guess i just have to wait until they finish that - or remember to put the getDelta() function back in
I would ping the mod author but I don't know what his discord is. At least his mod works now (:
But hey I learned something new 😄 the file structure is super picky.
it sure is
i was so confused when i copied a workshop mod into my workshop folder just to see if it would be able to load
and of course it didnt
I'm having the same issue
Anyone know how I can get my mod to show an Icon?
that goes into workshop or mods in Zomboid/Mods
in mod.info do icon=icon.png
same as the poster image
oh right, doy
Yea add 'icon=CrudeWhetstoneIcon.png' in your mod.info (or whatever you want it to be) has to be 80x80
From what i understand DrainableComboItem has default 32 uses by default and each use subtracts 1
public float getCurrentUsesFloat() { return (float)this.uses * this.useDelta; }
so getCurrentUsesFloat calculates how much percentage there would be left
uses 32 * 0.032 would be 1
so 100% usage
i'll give that a try in a moment
if the item would have 16 uses
16 * 0.032 you would get 0.512 so around half percentage
Mine is 80x80
I think that's what the workshop UI said to use iirc.
Hello everyone,
I have a piece of code that allows following a specific angle. However, when I input values, my vehicle ends up stuck to the ground. I suspect this issue is related to getAngleY, but it seems I'm required to provide a value, and I don't fully understand why.
Does anyone know exactly why this happens or how to fix it?
Thank you in advance for your help!
idk, i used 32x32, looks nice
-- Function to adjust the vehicle's orientation
function restrictVehicleMovement()
local player = getPlayer()
if not player then
print("Error: No player found.")
return
end
local vehicle = player:getVehicle()
if not vehicle then
return -- No vehicle, nothing to do
end
-- Check if the vehicle is on a rail and retrieve the angle
local isOnRail, angles = isVehicleOnRailAndAngle(vehicle)
if isOnRail and angles then
-- Apply the angles only if necessary (small adjustment)
local currentAngles = {vehicle:getAngleX(), vehicle:getAngleY(), vehicle:getAngleZ()}
local tolerance = 5 -- Tolerance in degrees
local shouldAdjust = false
for i = 1, 3 do
if math.abs(currentAngles[i] - angles[i]) > tolerance then
shouldAdjust = true
break
end
end
if shouldAdjust then
vehicle:setAngles(unpack(angles))
print("The vehicle follows the rails with angles: ", table.concat(angles, ", "))
end
else
print("The vehicle is not on a rail.")
end
end
Wdym by required to provide a value
getAngleY does not take in any parameters, if thats what you are asking
Sorry for the confusion! Let me clarify:
In my code, I’m using getAngleY() to retrieve the Y-angle of the vehicle, but I noticed that when I apply the angles (via setAngles), the vehicle gets stuck to the ground.
I suspect the issue might be related to how I'm handling getAngleY() or the angles in general. Could it be that getAngleY() is returning unexpected values or that I’m misinterpreting how to use it in conjunction with setAngles?
local currentAngles = {vehicle:getAngleX(), vehicle:getAngleY(), vehicle:getAngleZ()} vehicle:setAngles(unpack(angles))
Why is my mods in my Zomboid/mods not showing up? it seems to work on Zomboid/workshop
what did you guys get info on the new mods changes?
okay yeah, that does work - but i wonder why that was even put in when... getDelta() did the exact same thing
delta was already a percentage after all
or well
a delta percentage, which you could easily use to calculate
Seems like theyre changing stuff, I havent worked with the old system
Glad i could help
It works well from this angle
["industry_railroad_01_1"] = {0, 0, 0}, -- Horizontal
But when I'm at this angle, it's against the ground, I can't move forward
["industry_railroad_01_4"] = {-43, -90, -43} -- Vertical
https://gyazo.com/725c6ced6f876b93fabe155168f76ce3
I don't understand anything about the coordinate system in the game, I have to put the 3 coordinates otherwise it's not in the right direction. I can't tell him to just do a 180 rotation.
Don't you know of a function that allows me to follow the position of a Tille on the map to be able to align my vehicles?
I'm trying to create better photo examples, am I able to use -debug to slowly dictate the moodles?
Nop
Edit images directly on software
I guess I need to do that
Paint.net works very well for a lot of stains
Yeah I used it to make my Mod's thumbnail
If you are looking for or find moodles textures, it's here ProjectZomboid\media\ui\Moodles
Mod publication is a pain these days. Can you thumb up if you also have frequent errors uploading to the workshop ? Can you thumb down if you don't ?
It's just a time of adaptation
Weird errors 🧐
Why didn't I start modding before, this shit is fun asf lmao
Does anyone know the colour values for each moodle background or where I can find it?
adaptation to what ? Nothing should have changed steam side.
My idea is to modify the snow climate to have a probability to kill the player, which increases with each hole in the equipped clothes. And if there are any body parts that are not covered, the probability is 100% of instant death. The "lore" is that each snowflake can kill you if it gets in contact with any part of your skin, based on the argentinian comic "El Eternauta"
I cannot build project by error bellow. 😦
Execution failed for task ':zomboidVersion'.
And do you have any guiding information on new recipe scripts? 😦
I just realized, is there seperate positive moodle translate file?
My old decompiling guide still works: https://steamcommunity.com/sharedfiles/filedetails/?id=2748451514
How can we make sure that the mod can have a b42 and b41 compability? It's its just by adding the b42 and common folder and leave the rest as it was?
goated thanks bro!
Also another build where they have not fixed BasedHandler class to just allows us to add custom actions..
override time
Hey there, I'm trying to figure out how to Override a vanlla script file with another script file.
If you wanted to do that in 41 you would just have to add Override:true but that doesn't seem to work.
Is there a specific area to read into when looking into how scripts work in the decompile?
Thanks
I'm trying to update my mod to build 42, but my mod menu is now completely blank after restarting the game
I really hope that someones working on a mod that removes breaking furniture while picking them up. It's ridiculous
I don't wanna risk losing the gun lockers bud but even with the recommended carpentry level i still have a 52.5% chance to destroy it.
Idk what y'all usually do in here cuz i have never talked in here but i desperately need someone to make this mod lol. I'd appreciate it a lot, and so would others. I don't have much modding experience but i think you just had to change some of the values for picking up furniture, then it should be fine right?
There's mods for easy picking up stuff already.
Oh is that so?
What's it called
I personally haven't found anything
Rebalanced prop moving I think
Well the mod is for B41, however the author has mentioned something about making a new mod for B42
i kind of got my mod to show but ehhhhh i still need to fix context menus and well
Damn
recipies too
Well idk anything lol, i just translated some items and actions for a friend who made a mod

theres a specific file structure for it now, so thats probably why
The issue was that the mod menu actually straight up crashed because i had an issue in my folder structure (I put too much into the common folder)|
thanks though
Regarding the mod i want to update. The game used to use these textures for the moodle background. They now seem to use different textures, which I can't seem to find, since my .pak file is no longer overwriting the moodle background. (Also they look different, so it's in fact likely in a different place)
This is the structure that seems to let me load the mod, but the moodle backgrounds are unaffected
Pretty sure that is not the one on the right (since the color is different), so it has to be somewhere else??
What is causing the pan to dupe, and using all the rice?
fluid PIOrangeStuff
{
Color = 255 : 253 : 135,
DisplayName = Fluid_Name_PIOrangeSportsDrink,
Is this the correct format for a custom color for fluids? It seems to be what Zomboid's fluids folder showcases, although I can't seem to get it to work
I want the rice to use the action that yeast would use on the right most image, any help would be awesome.
I know that yeast is set to be a drainable item and rice isn't. Looks like in the new recipe codes there's this snippet for rice:
item 1 tags[RiceRecipe],
God i love coders thank you, it's seems rice flour and pasta all have this line :/
Trying to update by mod to B42? help a bit ;_;
Why does it says that contents have unrecognized files?
Show us your contents folder and what's inside
first image
Oh sorry my bad
preview is outsides contents btw even if ti desnt look like it
Try removing the poster
no worries
I think only modinfo should be in there
I put my posters and such into the version subfolders
poster is inside the 42
King can you help me find the prepare bread recipe after you helped that gentleman
and the previow is inside the top folder, outside of contents
It's only there for the b41 compability
That's odd indeed, here's mine
craftRecipe MakeBreadDough
{
timedAction = MixingBowl,
Time = 50,
NeedToBeLearn = True,
category = Cooking,
Tags = AnySurfaceCraft;Cooking,
xpAward = Cooking:10,
AutoLearn = Cooking:7,
inputs
{
item 1 tags[MixingUtensil] mode:keep flags[MayDegradeLight],
item 1 [Base.Bowl] mode:keep,
item 1 [Base.RollingPin] mode:keep flags[MayDegrade],
item 1 tags[Flour],
item 2 [Base.Salt],
item 1 [Base.Yeast],
item 1 [*],
-fluid 1.0 [Water],
}
outputs
{
item 1 Base.BreadDough,
}
}
Here's the bread dough recipe
Hmmm the yeast is the same, but only drains
Yeast is a drainable item, so if you put 1 it'll only use one 'UseDelta' (so say if an item had 5 uses, it'd only use 1 of those 5), rice isn't set as a drainable so I believe if you put a 1 it'd default to using the whole thing
I'm still trying to figure out food recipes myself so I can update Pomp's Items, but it's a long ways away
I think it must believe theres something inside contents somehow
Ahh nice that you also working on it too
where can i see this code on vanilla? I mean what directory? i want to know if theres other attributes
its in the scripts folder
okay thanks
steamapps\common\ProjectZomboid\media\scripts\recipes
I found it in the recipes_baking file
/steamapps/common/ProjectZomboid/projectzomboid/media/scripts
yeah
up there lol, Im on linux and the folder is different
are they like not using ISFixAction for repairing anymore at all
I'm not getting any prints niehter when repairing cares or weapons
local original_ISFixAction_perform = ISFixAction.perform;
---Overwriting ISFixAction:perform() here to insert ETW logic catching player doing any kind of repairs
---@diagnostic disable-next-line: duplicate-set-field
function ISFixAction:perform()
if detailedDebug() then print("ETW Logger | ISFixAction:perform(): caught") end;
local conditionBefore = self.item:getCondition();
original_ISFixAction_perform(self);
end
like it never prints

oh wait it might have been moved from client to shared

Does that mean that I have to overwrite it now in shared folder?
No ?
Just move the file with the decoration in shared
It will be the exact same thing
ye that's what i meant
true
You connect a function to another function or intercept a function
Just for the future so you have the word for it

how come when I do the same for ISRepairEngine:perform() in client folder it works 
even thought that's also shared

Actually yeah it does work in client that's normal
Bcs client folder loads after shared
Is there a mod for B41 or B42 that randomizes your look and inventory load out for later date runs, like 1 year after the apocalypse?
Doesn't make much sense to be a year late into the apocalypse and somehow appear as if it's the first day.
been busy irl
i havent read much of dev chat so im replying to a random code block
this i believe is related brush tool
dont have much info other than that but i believe this also has the ability to set certain tile properties when executed properly ( just a theory)
Does anyone know if gendered texture choices is possible? I want to make a male and female version of a piece of clothing but their models are completely different, causing the UV maps to be different
on the clothing xml there are models for male and female thats how you do it
but this is b41 knowledge
is possible to reduce garbage bags weight reduction without dependencies in build 42?
in b41 i needed to use itemtweakerapi
since you have 2 models for 1 clothing item its safe to say you can have 2 models with different uv setup tho they use same texture
Any idea how i would od that?
like use two different uv maps but same texture
have you done any clothing mod?
yes, this will be my first custom model one though
pretty sure if you learn how to then you will see what i ment
then you must have seen the clothing xmls
Yes, the pic i sent was the clothing xml
It references one texture, but I would need 2 for both genders because their uv maps are madly different
<m_MaleModel>skinned\clothes\hoodiedown_m</m_MaleModel>
<m_FemaleModel>skinned\clothes\hoodiedown_f</m_FemaleModel>
hoodiedown_m
and _f should point to 2 different models yes?
they do
I got permission to use a different B42 compatible reskin mod as a base, so maybe my mod will actually function now lol
I'm probably gonna redo these textures but this is the general idea for my reskin, based on tuberculosis
Idk why 2 of them are spoilers
choice 1 (bad choice but quick success)
you make 2 items 1 for male 1 for female using 1 model per item with texture that matches the thing (since you already have all the asset setup)
option 2
you sync the models UV
also this topic is better discussed #modeling
its welcomed here but there you will get better feedback
Any idea how i can sync UV maps? Im thinking of placing the maps in the exact areas where the important stuff are, like the chest design
i dont
that a modeller question im afraid
Ok thanks, ill go to modeling channel to see. The first option is a no imo, I want the one itme to be found and be used on both genders
if thats the case then you just need to indicate 1 model for both
male and female
a clothing item doesnt have to have 2 models
purpose of that is just variations based on the male and female characters difference when it comes shape/contour
Ofcourse, I'd like to put custom models for both genders due to their anatomy
then thats what you should do bud
I cant do that, I need two models!!
no
just remodel the first one
pick one
then reshape a new model based from the first working one
Oh you give me an idea though...
I'd have to redo the female model, but just move the vertices around so it keeps the same faces
So i take the male and move things to be more female
goodluck
theres no way to have gendered textures afaik
:(
Which is really sad...
Unless youre willing to go with clothingExtraoption just for that
seen some mixed implementations, is it better to name the build 42 folder "42" or "42.0"?
is there even a difference?
i just do 42.0 because i know some people have had issues using 42
alr i'll update my stuff to that then
has anyone have had this issue?
It adds a question mark to my mod name
what does the mod.info look like
Hi if you need new template format i publish here :
https://github.com/Parrish-FR/Project-zomboid-Mod-Template-B42
poster=poster.png
id=ReplaceBandage01
pzversion=42
i have no idea then 💀
just a wild guess, but if you have a text editor other than notepad (VSCode, Notepad++) check the file encoding. should be UTF-8 I believe, not 100% sure and can't check rn
Also do you guys work directly of Zomboid/mods or Zomboid/workshop?
mods, iirc workshop folder is for generated content after you publish through the menu.
i work entirely out of workshop, idk about others
BEcause I got github set up and IDE specific shit in mods. but I wanted to just build to workshop for updates
I work out of workshop too to my knowledge.
You need to add it to workshop to publish it though right?
imo that's the most stable way to handle it, yeah. or at least a good pattern to uphold.
how do you deal with the .gitignore files and .git files and IDE files then when you publish it?

I'm probably a bad coder for this, but I don't really use that stuff at the moment, I kinda wing it.
It works out well enough, though I would definitely recommend your route. I think .git files are just kinda left there though
workshop folder is like a final staging point for the mod, so imo the setup Sioyth has is preferable. winging it is fine for smaller projects with not a lot of need for updates though
I could be wrong but I'm like 2% sure you can just leave them sitting there
That makes sense, also it was at some weird UTF-8 with bom? or something that was the issue
I use IntelJ Idea and Vscode so thats strange
I just do a stupid amount of testing before release so I don't need to fall back to previous versions.
And most of my projects are smaller anyhow
Thats pretty good practice, I test the minimal amount
you can, but they could increase the size of your mod potentially exponentially lol. it stores versions of each file (unless you aren't tracking them) so if you have a bunch of assets and a ton of branches/commits, those will ALL go into the workshop upload.
Ah I see
Yeah it can get pretty huge
specially with like 3dmodels and bigger files
Yeah that makes sense, .git files are version control..
generally I wouldn't want people seeing the wild shit I name my commits sometimes either LMAO

this is so fucking true
Are you really programming if you don't have some aggressive file names / comments somewhere?
this the realist shit ever
real af
reaaaaal
The new recipe system is killing me
trying to update my mods has not gone well lol
Mood
tbf
I forgot what some of my better comments were, some were typically me complaining about some insanity going on
project zomboid code is pretty shit
this guys were wilding
we gotta do pretty fucked up hacks sometimes
It's getting better, though do keep in mind that I believe the game was made by college students at the start(?)
i still refuse to comprehend they have a manually set arbitrary list of what classes are exposed to lua
+++
like surely there's a better way of doing that
I get severely disappointed about using Kahlua sometimes because I'm so used to Luau (so many nice features are missing,,,)
Also the whole reason BaseHandler class always needs to be overrided is because they have one variable set to false 😦 which is the list to add new actions lmao
no way lmfao
Sometimes I feel like I have imposter syndrome but y'all have made me feel a little more comfortable, thank y'all.
I just get embarrassed when I'm around some of these legendary programmers that seem to know everything and I'm just kinda.. here.
No good coder has not have written bad code hahaha
True
I think most coders have imposter syndrome even those legendary coders
unless their ego is off the charts
Ah.. I still remember my first Roblox scripts being literally stitched together pieces of code that I ripped from other scripts.
but then they write bad code anyway, because they write code to show how smart they are and ends up being complicated af
How would I edit infection symptoms? I want to make a companion mod for my reskin once it comes out that changes how the infection works
It was like weird Legos for a while before I started learning what the Legos actually meant.
one thing i've just had to learn when making computer-related shit is you'll never fully know what you're doing
I mainly want my character to cough, wheeze and scream in pain, get exhausted easily and have severe chest pain
Are infection symptoms Java side..?
It'd make stealth and combat more difficult, but especially stealth because the coughing and screaming would attract zombies
Anybody had these yet?
I suppose you could always check if the user is infected and do your own symptoms.
yeah you'd have to check and do them yourself
I haven't looked at PZ's code yet, so I honestly have no clue
but it's defo possible
true that!
I've heard it's spaghetti code personified lol
It's both better and worse in B42 so far
Like, a lot of my code is cleaner thanks to new exposed methods
I need to decompile the libs ;_;
But there's also some methods that just aren't exposed that really need to be
Goated! What did you use to decompile for b42?
It seems most methods are outdated
Maybe they have fixed this BaseHandler issue
I followed a tutorial over in the modding discord.
Lemme see if I can find it..
was it this one by any chance? https://github.com/Konijima/PZ-Libraries
Nono, that's outdated to my knowledge.
I figured so ;/
@rustic garnet
Link is there
I can't copy it rn for some reason
There's a whole tutorial over in their discord that worked for me
Lots of neat people there too
you'd want to get a reference to your isoPlayer and run playerVoiceSound("Cough") for the sound
idk how to do the text above the head tho
theres an image in the contents folder
yes, preview should be in folder above contents, not in contents
should be in same dir as workshop.txt
currently not possible in b42, it is expected to be readded later
yeast as a drainable can do it, but food items can't use a portion of their hunger like they used to be able to
Oh really so they are just one shot items now, better off eater rice raw then for the calories, man what a shame
if you open the ide to your Workshop/MyMod folder, the ide and git files will be in the Workshop/MyMod folder, which isn't uploaded
this is why i recommend always working out of workshop, if you start in mods and move there later it'll mess up your git repo
hey everyone, i've just started to get into the modding and wanted to create a simple mod for the game, i've followed some instructions but when i put my mod into Zomboid/mods file, i can't see it on the mod list in-game, i've properly made mod.info files and other stuff
for b42
Did you make the 42 folder and common?
42 one i created but i think i didn't create the common file
Common is required iirc but doesn't need to have anything in it(?)
yeah it just needs to exist
But then if you have a few mods you would jus have all them open, not a big issue though.
I think with some easy command you could just do a run build script and copy the files over.
common is required
otherwise it wont even appear
i don't mean to open the entire workshop folder, just the Workshop/ModName folder
does anyone know where the textures for occupation icons are located? I might be blind but i genuinely cannot find them
have you looked inside the texture packs?
Ah gotcha! I missunderstood, that does make sense!
Thank you everyone now i can see my mod on the list 
oh shit they're totally in .pack files aren't they
They changed how the food system works?
Well how they are coded with the new system, i thought i could fix it locally, So all the food items that are broke:- Can of oats, Flour, Rice, Pasta, Cereal.
Hey everyone, couple of questions, if someone knows:
- How to add tag which allows mod to be is visible after filtering in ingame mods menu (the dropdown map,features,modpack,...)?
- I can't seem to get working mod id/workshop id:
id=966221273/SmartStack results in screenshot
Just eat them as they are which sucks ass
workshop id isnt implemented right now so you just need the SmartStack part
Dang, that means saphs cooking or whatever it’s called is gonna need a complete rework/rewrite from the sounds of it, unless it’s all a bug
Cooking mods are all going to be broke, probs why we have not seen any.
surely that's not true, since if you make a pot roast it deducts the "amount" from the ingredient (e.g. ground beef gets split as if you ate a portion of it)
unless it's hard coded per-item in Java, but I doubt they'd do that at this point?
I think the bug comes from the new crafting menu, the old right click context menu works fine
Won't be fixed for atleast 2 weekss as the indie stone are on hoilday
ah okay, that would make sense. the pot roast situation would follow that, yeah, I think it's implemented as an action on the pan itself.
Thats why you dupe pots bowls and it's using that new menu
yeah, it's just not implemented in the new crafting system yet
For now at least, as time goes on we’ll get them for B42 or new ones
I’ve got so many mods, 100+, gonna be awhile for me before I play b42, my current plan is to wait for b42 stable or just keep playing b41
Don’t normally play new versions of overhaul mods or games when they come out bc bugs and restarting every 5 days or less
cooking has used a separate system from regular crafting since b41 which doesn't seem to have been touched in this update but you still need to go through regular crafting to create the 'base' item for use in that (in this case the pot of rice)
what exactly are the difference between new build 42 and 41
clothing wise
nothing that really needs updating
they just added some new stuff for the kneepads and armour
what do y'all think of these textures?
does anybody know where these sounds are at?
they look great :)
They're inspired by advanced tuberculosis since it can manifest in the skin and cause huge sores that are prone to infection
fmod banks
media/sound/banks/Desktop/
Thanks!
That's scary Freddie the clown type skins you got there
yep, got a few headaches already 
great, how do i open/modify them do u know?
The blood around their mouth is just cuz one of the biggest visible symptoms of tuberculosis is coughing up blood
arthur morgan mod
I'm thinking of making it so not only does the infection cause the character to cough and wheeze randomly, but also antibiotics can slow it down but not cure it because the infection is a resistant form of TB on crack that also drives you crazy basically
Haven't seen another modder faced with this issue. I have an fbx which attach itself to the bone Bip01_Head to get placed on the head like described in the picture. Instead it gets flipped backwards for some reason. Anyone has insight on this?
@sonic needle does hats this way. I myself suggest just weightpainting them to head bone and do not use static method.
looks cool they'll be freaky ingame
oh thats very useful thank you! i can use this tutorial for voicelines and eating sounds and such no?
i would only need to make a media folder in a mod with the correct folders and .bank file name for the game to read it first?
the mod loader doesnt load bank files so you have to replace them in your install folder manually
In any case, found a way to make it work 🙂
oooh is that the only way? modifying the sounds directly? there is no way to do it with modding?
(B41) Any tips on going from IsoSprite to ScriptItem or vice versa?
yeah
you can probably just redefine the sound scripts
as long as they're actually being triggered that way anyway
Im trying to update my mod were the player dies after crafting somthing but B42 changed somthing and im not sure what
my old code was function EatNailsAndGlass() getPlayer():getBodyDamage():getBodyPart(BodyPartType.Head):AddDamage(100); getPlayer():getBodyDamage():getBodyPart(BodyPartType.Neck):AddDamage(100); getPlayer():getBodyDamage():getBodyPart(BodyPartType.Groin):AddDamage(100); end
anyone know what i need to change for it to work?
Seems like my mod still isn't appearing even though I'm using a reskin mod that's been updated to B42 as a template (with permission ofc)
thanks! i'll look into it, u dont know if there are any guides to do that?
don't know if this is the right place to ask, but is anyone able to help me with making some personal edits of a mod? its the reupload of shark's military and police uniform improvements and i personally really don't like the ALICE pack replacements and am wanting to remove them, but have absolutely 0 clue how. any help would be super appreciated!
quick question, does anyone else also have issues with using TimedActions?
for some reason, the one i created and ported to 42 now causes issues with the car dashboard... even though i dont touch any of that?
like, i am erroring on the "setVehicle()" function of the vanilla game, even though i dont do anything with vehicles
traits are 18x18???
that's the most random resolution ever 😭
why not just use 16x16
(B41) Since getSpriteName does not work for ScriptItems:
https://www.projectzomboid.com/modding/zombie/scripting/objects/Item.html#getSpriteName()
Is there a way to access the worldObjectSprite field? There is no getter for it that I am aware of?
declaration: package: zombie.scripting.objects, class: Item
you could access it with my library https://steamcommunity.com/sharedfiles/filedetails/?id=3378285185 , it exposes all fields to lua
Does your mod contain any script .txt files or recipes of any kind?
yes
Have you updated your recipes for b42s new format?
Try removing them and see if the error still occurs. If it does; you’ve found your problem. 😉
Don’t ask me why a crafting recipe causes an error with vehicles. I could not tell you.
lol i just added it to my mod list before i read your message. Found this as well getClassFieldVal(Object o, Field field)
I see yours exposes inaccessible stuff as well.
yeah, those functions are what it relies on internally, the library just caches some stuff to do that as performantly as possible + it messes with the metatables so you can access it without doing a bunch of weird crap
you'd just do item.worldObjectSprite instead of a bunch of loops and function calls
Which is what I tried todo in the first place. Of course, I was mistaken.
Is it okay if I run everything under shared? Or do I need to run things individually on server and client. Im asking in general terms. If not, then what type of functions should I put under which?
yeah, the goal is to just make it work how any normal person would expect it to work 😅
in build 42, given that there is no multiplayer yet, technically yes, except when you need to put something in a later folder for load order reasons
what is the load hierarchy? client first?
shared -> client -> server
thanks
for the future ui stuff should go in client, most other things are kind of up in the air until we actually get multiplayer since it seems like a lot of things are moving around from where they were in b41
is there any way to access "self" when overwriting a part of a timed action?
local old_ISGrabCorpseAction_waitToStart = ISGrabCorpseAction.waitToStart
function ISGrabCorpseAction:waitToStart()
local ret = old_ISGrabCorpseAction_waitToStart(self)
local stillDropping = ret.character:getVariableBoolean("grappleanim")
ret.character:faceThisObject(ret.corpseBody)
return ret.character:shouldBeTurning() and not stillDropping
end
any function that starts with ISGrabCorpseAction: will have access to self i think?
lua's oop is a lot less abstracted than in some other languages, self is literally just an argument that is passed to each function - if you define a function with : instead of . that adds an invisible self argument
I thought so, maybe I'm bungling it somewhere else
it looks like ret.character:shouldBeTurning() is wrong?
I've done this a almost million times with other actions
ret.character is trying to access "character" from the original ISGrabCorpseAction:waitToStart() it looks like?
you should be doing self.character instead of ret.character
ret would be whatever the original waitToStart returned (which i think is supposed to be a bool)
Im going insane with this new Fluid code. It was so easy to block drinks back in b41. I've been working on this damn thing for more than 12 hours and nothing seems to work!!!

saving me from myself again
my tunnel vision is something to behold. thanks so much!
if isAlcoholic(self.item) but i don't see isAlcoholic defined anywhere?
where do i find the recipe for "break large stones into small ones" would like to try and addthe metalworking chisel. its some sort of masonry
isAlcoholicFluid itself looks like it should work, but i might nitpick its optimisation 😅
ive rewritten this in so many ways that some extra junk might still be there
if you put the primary fluid name into a lookup table of alcoholic drinks it would be O(1) instead of O(n)
but the function looks like it should work either way
it's probably just that you call the non-existent isAlcoholic so it errors out before it ever gets to do its thing
This is the best version of the code so far. It detects the fluid type as alcohol and disables the drink option. But i can still drink by choosing 1/4 1/2 or All
will an item still show up in the new crafting menu even without this:
category and tags, or is it required?
no categ goes to general?
it needs a tag to tell it where it can be crafted, otherwise it won't show up
either AnySurfaceCraft or InHandCraft (iirc)
can you tell me the difference of this?
I even added this debug option to see if I could intercept those sub menus under drink but it appears they are dynamically created and I cant block them
AnySurfaceCraft means you need a surface (table, counter, big rock, whatever) to craft it on, InHandCraft means you can craft it anywhere
for any surface you need a table or crate or something to craft ontop of, in hands you donr need anything
okay thanks
@bronze yoke would you be able to take a look at this one? https://discordapp.com/channels/136501320340209664/232196827577974784/1320498958245560321
Umm... I use isAlcoholic() in my mod: ie if self.item and self.item:isAlcoholic() then isAlcoholic() is a vanilla method on InventoryItem
but it's called by isAlcoholic(self.item) which isn't the same
good point and maybe the point? 🙂 which just shows one should not stop by the computer on the way to get the first cup of coffee in the morning
I don't know if anyone has messed with this recently, but my clothes don't have properties that improve vision like glasses.
Any way to add a tag to an item type without overwriting the full file
yeah, that was just leftover from my rewrites trying to get this think working. I find it near-impossible to just block isAlcoholic because you can put alcoholic fluid on ANY fluid container and drink from it.
imagine carrying a petrol jerrycan full of vodka and just sipping every now and then lol
hahaha omg it is possible to do
i guess that disguise system for multiplayer that they mentioned in a blog a while ago is gonna be in b42
So thats what this tag is about. I've been wondering whats the use for it.
how do I check if the player needs atleast one of the following? what's the correct way to implement 'or'? is this the correct way to do it?
inputs
{
item 1 [Base.PaintGreen,Base.PaintRed, Base.PainBlue],
}
item 1 [Base.PaintGreen;Base.PaintRed; Base.PainBlue],
Also its in your best intrest to not have spaces between*
thanks
It might cause issues
Sorry for replying to this 8 months later lmao, but do you know if it's possible to add a tag like that to vanilla items without overwriting the script entirely? Could it just be forced through lua or something?
local item = ScriptManager.instance:getItem("Module.Item")
if item then
item:DoParam("Tags = MyNewTag")
end
Thank you 
Also it might be worth knowing that if you do it in other way than do param it might add multiple instances of same tag. For example i used to add tag each time player equiped certain item and it meet conditions for it and if it didnt, it was supposed to remove it. Turns out each equip literally added it so i could have plenty of same tags. (It was gun that when added attachment was supposed to add tag and be removed when there is no attachment on it).
Who are we to stand between IndieStone and a player who likes to REALLY mix drinks?
Is there any way to use a modded (old school) Timed Action as a craftRecipe timedAction ?
yeah, if you wanted to be safe you could do:```lua
local item = ScriptManager.instance:getItem("Module.Item")
if item then
local tags = item:getTags()
if not tags:contains("MyNewTag") then
tags:add("MyNewTag")
end
end
Does anyone know how or even if it is possible to trigger/activate a shader from Lua code? I have a mod that gives the player concussion, and I would really love to use the new drunkenness effect in the screen.frag shader.
that sounds interesting
anyone tinkered with repairing yet? I was decorating ISFixAction:perform() in b41 but it doesn't seem to be doing same thing it was in b41 as my code just doesn't fire on events it was firing before (aka any kind of repairs)
Thank you - it is quite imaginatively called "Rick's MLC Concussion". It also adds drunk effects (stagger and fall, and say random things) depending on the drunkenness moodle. Oh, and if you fall down while holding a firearm there is a chance to shoot yourself (or a nearby zombie if you are Lucky)
hahaha that reminds me of the scientist in world war z... Slipping and offing himself
unless big things have changed, it is not possible
CDC RAPID RESPONSE 2 has been released for B42!
https://steamcommunity.com/sharedfiles/filedetails/?id=3389707527
Thanks for your help everyone!
hey all, I think I have a B42 bug. I have a static item for hat head, but it seems to be randomly switching between backwards and forwards. Like you can see the backwards heads here
I want these to remain statically in the right direction, and they were correct in B41
even on the pause screen you can see them shift
lol thats creepy
it kinda fits the creepy factor lol
Anyone know what argument is wanted for InstanceItem?
--item is a Script Item
local inventoryItem = item:InstanceItem(nil) --What argument? This seems to work, but wtf
declaration: package: zombie.scripting.objects, class: Item
is there a way to reload mod lua from in game now? I could reload the file from the error debugger but not sure how to do it with the debug menus. i have --debug on (b42)
if you're trying to create an item in b41, InventoryItemFactory.CreateItem("Module.ItemType") is prefered
if you're in b42 the lua global instanceItem("Module.ItemType") is used instead
Interesting thanks you sir
f11 and on the right there's list of files, just type the name of your lua file and press reload
Im trying to write a quick and dirty mod to increase the storage capacity of furniture, (with the help of Chatgpt). did the API change at all for the use of getcontainers), getCell ), or change at all?
ChatGPT sucks at Zomboid Kahlua
I am doing something similar but it requires you changing sprite properties since most containers are moveables such as lockers. You can run DoParam on ScriptItems such as backpacks.
imperfection is perfect
considering they walk around a lot, they messed up their mascot😅
yall how do i decompile .pack files?
Hi everyone! Did they change something about the items of the "drainbale" type? It seems to be the case that the command "item:getRemainingUses()" is not usable anymore (at least for me - I also cannot find the command anywhere in the vanilla lua code). Is there an equivalent of "getRemainingUses()" now?
Use TileZed?
ah, thanks
np
haven't had to mess with that side of modding much yet
got yuh, yah its a tool provided by TIS
I dont see an option for decompiling though
it's pack viewer
don't think you can fully decomp
but you can look at em at least
yup
you can decompile them but i don't remember how
i haven't done it since around the time b41 last updated
it was in one of those tools though
you can export them as pngs
yeah
thanks!
Can anyone help me understand how the zombrand function works?
if ZombRand(5) == 0 then
local item = instanceItem("Base.Worm")
self.character:getInventory():AddItem(item);
sendAddItemToContainer(self.character:getInventory(), item);
so if the zombrand (5) == 1 instead of 0 is that somehow less likely?
from what I read it returns basically as 0 or 1
and I assumed that meant it was either 50/50 or maybe like 1 in 5?
ZombRand(5) returns one of the numbers 0-4 with a roughly equal chance each
so ZombRand(5) == 0 means a 1 in 5 chance
saw albion typing
so i cancelled my reply lol
you can do things like ZombRand(4) == 0 to make it a 1 in 4 or ZombRand(5) <= 1 to make it a 2 in 5, etc
better?
so a few people keep asking about my mod saying they're not getting enough clay when they dig, but the function is ZombRand(5) == 1
its easier to remember at least lol
and I just don't know if I should have the value also at 0 because its an elseif after the getworm
it doesn't really matter what number you check it against, it has a (roughly) equal chance of each
I would think so! could be just people getting unlucky, but I wanted to make sure because even in my own testing it seemed kind of spotty
then try this
ZombRand(1,101) >= percent
but it maybe because if the worm rolls the clay doesn't roll
since its elseif right?
yeah, that's right
so the actual effective chance is multiplied by the chance of not getting a worm
yeah
its not anything but my modding experience is less than amateur so im kinda proud i got a set up to show an icon and steam thumbnail
local item = instanceItem("Base.Worm")
self.character:getInventory():AddItem(item);
sendAddItemToContainer(self.character:getInventory(), item);
elseif ZombRand(5) == 1 then
local item = instanceItem("Base.Clay")
self.character:getInventory():AddItem(item);
sendAddItemToContainer(self.character:getInventory(), item); ```
and it's not a problem that there are two ifs?
i mentioned this to provide more control over the chance
but i fail to mention the elseif
my bad
you can instead have multiple if statements instead of long one
if roll() then
--item code
end
if roll() then
--item code
end
but its better to use tables
I knew nothing about lua until a few nights ago and did this in one night
thats cool as hell
it was still preferable to foraging but
I see that some people are having worse luck
and want to fix that
the hardest part was learning how to upload haha
Trying to F11 and reload lua for ReducedWoodWeight75p41 but it's missing in the list despite working in the server.. How strange. Just wanted to change the values.
hello im trying to modify pz sound files, i got the .bank file decompiled but i dont know where the script is getting the sounds from, because this looks like folders and the sounds are all .wav files
you could also just do
local toSpawn = {"item", "item2}
local item=[toSpawn[ZombRand(2)]
At some point i'm going to figure out how to just call the original function with the edit so it doesn't interfere, currently i just have it patching the og code which from what I read can break other mods
but again my literacy is approximately 0 with regards to programming
local tab={'te','est'}
print(tab[1]) --prints te
print(tab[2]) --prints est
cuz if you have multiple items
you will have a long lua file filled with if
when you can do it without one
god lua being 1-indexed is still so weird to me
it feels icky
also adds flexibility since you can just add as many items as you want
you just need to set the
ZombRand(1, #toSpawn+1)
spawn
for this usage though i think it's overkill
yeah I think I broke it by removing the elseif
can anyone help me with this?
ye i guess just suggesting stuff for flexibility incase they decide to add more items
i'd be perfectly happy with it if we didn't still have to interact with 0 indexed api 90% of the time
where is the script getting these folders? the bank file only has wav files
it just feels off to me bc unsigned ints start at 0 so like why would we waste 1 possibility
theyre events for fmod which is the sound engine the game uses
we aren't using unsigned ints though, all lua numbers are doubles
W H A T
and how do i modify these events?
beeg shock 😄
i dont think its possible?
the .class files in fmod folder are unreadable
lua 5.3 (or 5.4 maybe) introduces a sort-of-distinct integer type which i think is a signed long but we're on 5.1
ive not messed with sound stuff outside of replacing some sound banks
Eh, pushed the update, i'll try to update the alcohol blocking later
https://steamcommunity.com/sharedfiles/filedetails/?id=3387563172
but why do we need double-precision floating points for a value that we can 100% know will only ever be a positive integer??????
i am absolutely baffled
i am distraught
well, if we assume we're only going to have one numeric type, i guess a double makes sense
i need to write a strongly worded email to whatever organization is making the lua standards
LUA is not the language to use if you care about the exact type of your variables.
yeah i've been like majorly c-pilled
i love c++, but nobody can get between me and lua
I suggest C for nightmarish brilliance like this: taking a float, using the bits as an integer, shifting bits and throwing in a magic number for good measure before trating it like a float again.
inverse square root function my beloved
I prefer C++/C#, because strict typing will find a lot of my mistakes at compile time.
i just use c cuz i like being able to mess around with shit at low-level while still like being able to look at what's going on
like wtf is this shit
i have no idea how chris sawyer made rollercoaster tycoon in assembly
most impressive thing ever
Get into C# modding and start doing ILCode patches.
Like aseembly, but easier.
Speaking of which, is there any LUA equivalent for changing one line in the middle of a big function?
I just went ahead and plut clay first and the worm as the elseif because I figure people don't give a shit about getting worms as much as they do clay. also made the zombrand (2) so I think it's now 33% chance for clay?
create a c wrapper for lua that reads the code you wrote in c and make mods using c lmao
I'm working on a mod to allow you to store stuff in your underpants and it needs to either change the item type to container (which deletes all underpants from the world every time you enable/disable the mod) or I think I found the line I need to change to make underpants show up on the container list... but it's one line in the middle of a huge function.
no
what's the reduction factor on those going to be
there are a lot of fun hacks you can sometimes do but no straight up ways to do this
if it calls another function you can hook the function to mess with that function, call the original, and put it back afterwards
oh wait you're the person who made this mod?
I thought so, but was hoping I was wrong... I'm going to stare at the function really really hard and see if I am magically inspired with a way to do a pre/postfix patch.
yeah
i'm definitely not like actively stealing your mod's file structure 🤫
i swear
I'm happy that although Zomboid runs in java, Modding is done in Lua. I HATE java XD
Be my guest! 😄
But if I can't, which do you think is more acceptable: "this mod will delete all underware (and contained items) from the world if you ever load a game after the mod is enabled/disabled (including any bugs that cause it to not work on load)" or "this mod may conflict with other mods that affect the inventory system"?
agreed lol, i'm not a huge lua fan, but it's at least better than java
yippee
fuck java!!
everything in lua being made out of tables is simultaneously really cool and really mind breaking
I think the function I'll edit is only used to change what items get shown as bags in the inventory window, so it probably won't conflict with much
that sounds too game breaking 😩
$%@#!%ing java. "Write once, run anywhere" HAHAHAHAHAHHAHAHAHHAHAHAA
I deal with that rubbish at work, at least all I need to do is keep our over complicated tomcat cluister going and point to the devs when java is a problem
I tried modding for Minecraft. Only managed to make some improvements to a japanese mod and abandon it after 1.6.4
Odd request, but is anyone able to check my generator range mod and see if frames are tanking horrendously or if this one person is just having an odd issue in B42?
"there's an error in teh new build and because it is java it logs 37MB of stack trace every time it happens and now the hard drive is full" AAAAAAAAAAAAAAAAAAARGH
I didn't have any issue with it.
does anyone knows something about the new structures about the TimedActions? I have a custom action allowing to shave beard stubble using a razor. Everything works so far but when the action is completed, the razor is still marked as green in the inventory. Instead it should only be green while the action is taking place. This worked for my code in B41 out of the box somehow and this is also the way it works for a lot of vanilla items. Anyone an idea what part in the code manages this green markings of items?
You're using the new version, not the legacy "circle" version, right?
It made the ground red
I just wanna make sure, because this is literally the only report I've received in like a week.
Instead of the circle I remember
you need to set the item's delta to 0 when stopping the action
you needed to do this in b41 too though
Perfect then, not.. entirely sure why it's lagging them when it should be caching the data though?
I only used it briefly (too much time with modding, power is still on in my "real" playthrough)
item:setJobDelta(0)
But I didn't see any performance drop.
Im trying to get a hold of Monkey because I updated their nomad scenario and wanted to ask them if I could share it but hasnt responded on discord
usually, they installed 600 mods at once and chose yours out of a hat to blame
My Better Batteries mod seems to have partially made its way into vanilla which makes me happy
The main purpose of it was to allow you to remove dead batteries from stuff like flashlights without it just deleting it
Then you could recharge it with a hand crank
Does the recharge still work? I'm fidning a lot of dead batteries.
I just picked up a box of 12 shiny new batteries, but once teh poiwer goes out and I need a torch for all exploration...
I haven't ported it to B42 but someone else beat me to it anyways lol
No point in updating it at this point
pwr your grow medicinal plants made it to the game too 😄
Technically it was more of a patch for an existing mod, just with code cleanup and compatibility in mind.
I like to think I had a small part in the new B42 - In the ISEatAction there is a comment saying eating with a spoon or fork will improve happiness and boredom, which is mosly what my Cutlery mod does... Mind you, I could not find any code that actually implements said improvement...

I might go with my old plan of making a battery charger you can put batteries in to charge, which you woudl then use in your generator powered base.
I wish magnet fishing or generator range was vnailla tho
this is already in my code:
ISBaseTimedAction.stop(self)
self.item:setJobDelta(0.0)
end```
and in perform?
not having lag or framerate issues but theres some zfighting/glitching
XD
so what needs updating so mods can be B42 compatible?
dunno what to change with my mod since its just a small VHS mod
depends on the mod, some work right out of the box by just adding the 42 and common folders
Appreciate it, the z-fighting is the least of my issues lol
just try it then see what the console throws at you
that solved it! many thanks, as always 😉 !
I have a few mods that havent updated working just by moving the folder. Woodcutting skill mod and Explorer trait being 2 of them
https://www.reddit.com/r/projectzomboid/comments/1hgwccl/if_there_is_a_mod_you_absolutely_cant_live/
also the OSRS xp bar mod. Im too impatient to wait
That is my Reddit post on how to try a super easy B42 conversion, no code changes.
tyty
one I have to wait for Is fluffy hair sadly. It loads but has error with missing textures
Fluffy hair has an "fluffy hair aPI" doesn't it?
I have Spongies Hair and it works in B42 (without fluffy's hair API, which is not needed for the B42 version)
spongies hair works great (waiting on them open jackets ;)) but I think Yakis hairs need fluffy
cant wait to see new tailoring with yakis clothes
I use C:\Users\<username>\Zomboid\console.txt
Because I'm a terrible programmer who debugs by throwing print statements into the problem area 😂
(B41)
Anyone know why ContainerType doesn't show up in properties:getPropertyNames() for an item?
Nor does it pull a value although the sprite has a tiledef for ContainerType.
properties:Val("ContainerType")
anyone know how to use my own mods in b42? files in zomboid/mods dont show up in b42 mod menu
you need to change the folder structure
theres a pinned comment with the structure
i dont mean updating a mod, i mean testing a mod
like putting it in the mods folder and it showing up in mods from the menu
yeah, you still need to create some folders for 42 to load them
scroll up slightly 🙂
oh right, Dr shared a reddit link with how to do it
yes, but when i put any mod in the local mods folder, in zomboid/mods they dont show up
And the pinned comment has more detail
its not updating, but 42 cannot read the files from the current folder structure
Are they formatted for B42?
yes
i literally took the files i uploaded to workshop and put it in mods folder and it doesnt show up
So C:\Users\User\Zomboid\mods\modename\42\ (or common) has the mod.info file and associated stuff?
And in 42 or common, you have those same mod.info etc?
Because B42 won't read any files in the top directory, to allow for back compatibility with B41.
😛
its weird because i already had 42 folder and stuff with another mod
but it just didnt wanna load
took the example mod and made the folders
and it showed up
It's a slightly confusing system due to legacy decisions (like not including any "for version X" in mod.info)
And the whole Workshop folder structure makes it more confusing because each workshop mod can have multiple zomboid mods
So you get lovely paths like this:
haha yeah its crazy
im new to modding and its a little confusing, but fun
Zomboid is pretty unique when it comes to modding - you don't have the advantage of "it's a unity game, so I'll use my unity skills" or "it's an unreal engine game, so I'll use my unreal engine skills"
oh man i was hopping to be able to translate the skills im gaining for game making hahaha
it'll help with something tho im sure
reading lua or something
General skills will help
Definitely
But for things like the way to structure files in your mod, you'll learn the zomboid way... it's not hard, except for me never remembering when lua is meant to be in client vs. server.
Good part is the vanilla game has easily accessible files just like a mod, so you can see where original scripts/lua/etc are placed
haha right
yeaaah its really helpful
now i know where to go look for specific files and such
If I knew how to code I would code the climb ladder b42 mod myself
I sure think they will add this to the game, I have seen like 6 different places where ladder leads to some attic or roof
it must be a matter of time right? the hard thing would be balancing it
like zombies should be able to tear them down or something
or god forbid climb them
it feels weird for them to add climbing ladders right after a massive sheet rope nerf
What happened to sheet ropes?
I've not needed to make an emergency escape in B42 yet
Any luck in your exploration of this by the way? I was hoping to make some custom screen shader effects.
hey man thanks for your help, wanted to share some progress, i learn to edit sound files https://steamusercontent-a.akamaihd.net/ugc/62585168917119626/7F6B2235FC9F96A79DF8734D2F990A84716B1B19/
they said it couldnt be done!
Try adjusting the mod to the B42 folder structure and seeing if it works - a lot of mods do. Scroll up a bit for basic instruction in a reddit post, or look at the pinned commenst for details
they cause a lot of exhaustion and muscle strain, and with certain negative moodles/longer ropes you can actually fall off of them
Good to know. And also accurate to my very limited experience trying to climb a rope.
try it! I have no coding background myself and I just pushed my first official mod for zomboid a couple of days ago and right now it has
2,338 Unique Visitors
1,108 Current Subscribers
38 Current Favorites
everything I know i have gained by looking at the code of other mods
thats awesome! which mod is it
Exciting isn't it!
very cool, i recently mad my first mod too
There's a lot of scope for mods that don't need complicated lua.
Where do I even start?
humble 1,748 Unique Visitors
654 Current Subscribers
(Public number)
42 Current Favorites
(Public number)
Come up with an easy idea, then do it.
Something simple like "I want this weapon to have more durability and damage" is a good start
one idea I wanted to do was some basic ui scaling, making it smaller or bigger
I hate dealing with UI stuff in code, that's a good idea but probably overly ambitions for a first mod.
how do you cheat in specfic vhs tapes with the debug menu?
little by little i'm adding unique traits for each of the professions. One of the coolest things I did was add a trait to the Priest profession named In God's Hands
Grants a new Pray action via the context menu.
Gradually reduces stress (0.002 per tick) and unhappiness (0.05 per tick).
Increases morale (0.001 per tick) and sanity (if applicable).
why not do a rich guy trait, more luck to find loot in high end stores or something like that
Start with a gold bar and lots of money
thats a great Idea! try to implement it to start messing with modding.
How about rich is a cheap negative trait, you get stressed if you don't have enough money/jewlery
Greedy?
Former Millionaire?
I think you are looking for the word 'Gaudy'
So tempting to post "B42 update when?" on a brand new mod. 😂
hahahaha
gonna try that trait idea later. right now im training chatgpt to help me convert b41 recipes to b42
nvm you have to right click on it in your inventory then go thru and find the one you want
Mod is now updated!
hey guys just so you know in the local mods folder you can only have one mod active at a time
at least thats my case
like b42 only loads one from the folder, no more
even if there are 2 perfectly fine mods in there
I have lots of local mods
you need to move those 2 mods out and treat them as individual mods
Oh, you mean like how under workshop you can put multiple mods together? Yeah, seperate them if they are in mods.
do poster and mod.info go in both 42 and the primary?
mine's been working fine with it just in 42
yeah i have my folders like that but only one loads at a time
I do it just in case, dont like it without it lmao
fair enuf
i put it into common even
all 3
maybe it has to be there for b41 compatability or sum
cuz i saw some people saying to do it
but i haven't had issues
yeah, 41 does need those files there
ic
b41 doesnt know anything of the new folders so needs the files in the old locations
B41 will only read modinfo (and other files) from the top level of the mod, B42 will only read from common and 42
gotcha
so b41 can't read files from common then?
And 42.0, and 42.0.1.... so you can have different code for different patch versions if you want
Common then 42
B42 will use the more speciic file
So when it's build 42.8 the game will look in common, then 42, then 42.8 and if a file is in more than one of those use the one that best matches
Right now if you put the same file in common and 42 the 42 version will get used.
how do I make a recipe in b42? i presume the process is different to b41.
Look at the vanilla recipes
I don't know what changed, but copying one of those will give you the correct structure
Easy to forget the starting points when it's been years since you had to do things that way!
would I be correct in assuming that the OnCreate term is for an event that gets called on item creation?
sounds like it
yeah
Hello! Is there a way to get access to full list of "flags" that you can use for items in craftRecipe?
build 42 javadocs
https://demiurgequantified.github.io/ProjectZomboidJavaDocs/
package index
real ugly way to get flags:
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
that's every line with flags from vanilla recipes, sorted and exact dupes removed (still lots of dupes from other differences on the line)
Oh, thats great, thank you a lot!
Bought food and snacks. ready for another long night coding
And thank you too @bronze yoke . I actually found it in javadocs too, if anyone else would need it: https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/entity/components/crafting/InputFlag.html
(there is also OutputFlag)
declaration: package: zombie.entity.components.crafting, enum: InputFlag
i was just posting it unrelatedly because i got it done, i didn't think it would even be in there 😅
vibe
with the addition of animals I assume modders could theoretically make their own custom creatures from it now?
Should be possible.
gimme da special infecteded
imagine this mf dragging you towards a horde or tanks that can break walls like a sledgehammer, the spitter would be neat too, making a surrounding floor damage you
hey, my vhs isnt showing up ingame. i dont know if theres an error i should show or what im doing wrong specifically. i got it formatted the way it should.
I wish it told me what script failed
java.lang.RuntimeException: java.io.IOException: Script load errors. at GameWindow.mainThreadInit(GameWindow.java:705). Message: Unhandled java.lang.RuntimeException thrown by thread MainThread.
Stack trace:
zombie.GameWindow.mainThreadInit(GameWindow.java:705)
zombie.GameWindow.mainThread(GameWindow.java:599)
java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Script load errors.
zombie.scripting.ScriptManager.Load(ScriptManager.java:1566)
zombie.GameWindow.initShared(GameWindow.java:156)
zombie.GameWindow.init(GameWindow.java:1442)
zombie.GameWindow.mainThreadInit(GameWindow.java:701)
... 2 more
LOG : General f:0, t:1734925900723> GameThread exited.
If you just added a script it's probably that one.
Script load errors.
well. yeah lol meant to say what part of the script failed. Is there a way to validate them?
Stack trace:
There was a problem.
not really, we had an extension for it but obviously it doesn't work anymore
sadly I don't think so...
IOException is weird because that usually has to do with actual file reading/writing and not parsing - i noticed all of the new script parsing code i saw threw plain Exception when it didn't like something
Exception in "mainThread" is the java equivilent of a "check engine" light that gives no hint as to which part of the engine you should check.
A code reader is your console in that case 🤓
does the appearance of corpse dragging mechanics mean that it is now possible to make rig for items, and animate them in your hands? As an example, animated weapons, tools, etc 🤔
Shopping carts are what I want.
Zombie Ballroom Dance Competition Mod.
So when all the cars are dead I can be a hobo wth a shotgun walking down the street with my shopping cart of looted supplies, hoping the noisy wheels do not attract zombies.
I want a zombie sleigh and I want it now!
If a normal human is 60% water than I am 700% water.
hahahaha