#mod_development
1 messages ยท Page 371 of 1
Black Moon can send his code, if I remember right he retrieves the current list of items, and reloads a part of script
But he needs to format that script from Lua
i do a lot of crazy shit but ive been doing my best to stress test and have decent results
While the one I documented on the wiki, you just directly add the items to the correct ArrayList of inputs
Mine works on all recipes not just mappers
Who told you the one on the wiki isn't about non mappers ?
infact if anything, mine isn't really for mappers at all.
Neither is the one on the wiki ๐ง
the non mapper code seems to have disappeared?
yea the 2nd method only does mappers via lua
and the first method can only add things
you can't override lines
But if you want to override ... just override ? ๐
what, the entire file with 200 recipes?
im pretty sure you can cherry pick
if you override an 'entire recipe' via .txt, all PZ does is merge the two recipes together into some unholy abomination
Nah nvm I forgot "overriding" a specific block doesn't override the block
nope.
yea it just merges them like the brendlefly
pull request
Ah jeez I really hope they use fucking json in the future
that sounds like an annoying problem
thats why my code scans the inputs/outputs for the correct line to delete
so it can override instead of just.. add
is that behavior able to be changed via lua?
yes
im happy to dig in and try to figure something out
Tbf you should just document on your method on the wiki anyway
Heres the code I use for replacing inputs/outputs
Can't be assed to make an account and edit it. Also don't feel like argueing with people over wiki stuff.
What's the problem with making an account ?
Also "argueing", your method is still a valid one
do I have to put this Oncreate thing in? im not trying to start messing with lua. the recipe now works but it does not give me the output, which is listed
There's shit that's worth argueing and imo adding yours is completely fine too, considering how fucked it is to edit recipes
that I don't feel like doing it, just to argue with people over stuff on the wiki not being 'clear enough' or whatever.
Good thing I'm here to smooth things out
Just go straight to the point, show code used, show example, explain what it does, done
Nope!
Oncreate is optional extra code to execute to mess with the item
then it not giving the output is weird, it takes the inputs and even has the timer and animation. then it just.. gives nothing and takes the inputs
Yea but again, why don't you add that in ?
recipe is a table here, right?: local recipe = getScriptManager():getCraftRecipe(recipeName)
or is it ArrayList?
that gets 1 recipe
gotcha - so you find the recipe in memory or wherever then replace each line?
Adding new inputs really needs an overhaul, reflection isn't needed at all
then
Mine works on all recipes not just mappers
I'm sorry but if you're going to that extend to tell me about these and brag about it, but not even willing to put any effort in adding your methods to the doc, why do you even say these to me ?
Because I assumed you did want to edit the wiki and work on all that. Im not going to bother adding stuff myself because iv already tried that on wikipedia only to get into arguments with people who immediately reverted my corrections and I just don't care for that drama.
and honestly iv seen you arguing with someone today over their contribution so Im just like meh.
that arguing excites me
for the sake of proving why your approach is better
or learning otherwise
Yea honestly just wanted to talk more about the different approaches then care about the wiki getting updated. The mapper approch prob works better for multiple mods adding things to the same mapper.
I saw some code.. somewhere? where they used reflection though, seems to be gone now? dunno.
it was crazy lol.
passing items to test functions just to confirm if it was the right line or not or something like that.
Because I assumed you did want to edit the wiki and work on all that.
I have expressed many times now that as time passes and the further I get through my thesis, the less time I'll have to work on any of these
I've set up a pretty good base for anyone to expand things without me having to be full present. And now I don't have that much time to do any documentation these days, i'm too occupied and I still try to find time for things but I don't have time, and I'm fucking tired
And then I get this kind of attitude from you, of course you had to be THE GUY to be annoying about such a new system. Of course there had to be someone complaining. You brag about your stuff, I confronted you about it because I thought it was just about editing inputs, now you've easily convinced me that this wasn't just about that (also because I remembered a bit more what it was about). And now you're basically going crying that I argued your method ?
like im doing my own thing based on frameworks ive used in other langauges:
local collection = MerlinCollection:new({
{ id = 1, type = "Base.Axe", tier = "High" },
{ id = 2, type = "Base.Hammer", tier = "Mid" },
{ id = 3, type = "Base.Nails", tier = "Low" },
{ id = 4, type = "Base.Screwdriver", tier = "Mid" }
})
-- Scenario 1: Standard Table Exclusion
local forbiddenTypes = {"Base.Axe", "Base.Hammer"}
local filtered = collection:whereNotIn("type", forbiddenTypes)
Now about Tcherno, I argued with him, and at the end I was also convinced about the arguments that were brought up, but the way it is written is arguably bad, it confuses people and makes them think activating mods in the main menu is the bane of humanity. Go more in depth about it, like they did when arguing with me
Now the ball is on your side to understand that in fact arguing with others about X Y Z methods is the best way to handle this, and that's why the Wiki works like that, because arguing brings up debates about what is best in general, how things should be brought up to the reader and it will at the end makes things better
No arguing = everyone's right and we get fucking idiots posting random ass shit like that bitch about animal mods who doesn't know jackshit about it, and this pisses me off
Then they talk about ethics and brag about knowledge they don't have or don't understand
man, you're gonna love where im heading lol
please keep this energy with me when i actually release properly
Anyway stop being like that Black Moon seriously, you already pissed of a dev in the modding Discord constantly complaining about butchering, when you just had a fucking convo with him about it and he told you they are aware of it
The guy even made the effort of contacting QA during week-end outside of work, got a response, and yet you still pissed him off
And this is why I have no interest in touching the wiki, because it would inevitably mean more hostile arguments with you.
albion - just so you know i decided i was going to use starlit* as a refactor target with what im doing
im gonna put in a pull request (without any expectation of adoption) so you can see what im trying to do
Like you're not being hostile half the time seriously
Go read that again please if you haven't yet
alright ive been messing around and i still cant get this to actually give me the thing
when i put the comma in outputs it breaks the game
and pops up the unexpected error screen
Also this can help in detecting problems (tho it's still being actively expanded)
https://pzwiki.net/wiki/ZedScripts
Missing module
When referencing items you need to use the full type
so thats when I put PBC.?
Yup
aaaa i see
If the item is in the PBC module of course
they all are, ill try this out
you are talking about in the output section cause the output could be any type - right?
Wdym by "could be any type" ?
sorry - when i say type i mean module
type usually refers to the ID, full type is module + type
yeah, namespace.class or namespace.item
It's a bit of a fucked up way to call it which is used by the game so we use it ๐
Yea needs full type
that might be an intereting aside in the wiki
sort of cross-referencing terms to common terms
Yea, that'll be handled when I rework the item script page
But it's a bit of a monster to edit ....
interested to see what you cook up! because of its age starlit's code practices are pretty varied
to help people understand scoping and expectation - especially those with some experience
theres no way you wont have a problem with what im doing - for example - i take over __index and __newindex, but im doing it unapologetically knowing that could be a response
those are triple underscores and dont feel like fighting discord markdown atm
Code blocks
fair
Also I'm curious about what your stuff is about
double not triple
let me make it actually PZ structured and ill write appropriate docs
and, like i said, starlit is gonna be a target i use for seeing if it actually makes coding life better
thats my goal, but i dont want to create too much overhead obviously
these days i'm more concerned about style than performance
for sure - this is some of the newer stuff im working on:
local data = {
{ id = 1, type = "Weapon", weight = 5, broken = false },
{ id = 2, type = "Food", weight = 1, broken = false },
{ id = 3, type = "Weapon", weight = 10, broken = true },
{ id = 4, type = "Food", weight = 2, broken = false },
}
local collection = MerlinCollection:new(data)
print("Lazy chain")
local results = collection:query()
:where("type", "Weapon")
:where("broken", false)
:get()
expessive and efficient because the query builder turns this into a single loop
so when you read it later it makes sense
nothing actually happens until :get
and also - as the modder - what the hell is a for loop
Hmm
Why ?
the reason i dont like indents in python
no good reason - it just doesnt sit well with me

i dont like it
also, why not abstract it and reduce the things you actually need to know to code
from my view this has NO REASON to not be working, its got commas, modules, everything. inputs and outputs, modes, names even
i also dislike indentation as syntax
thanks
i was talking to a young programmer the other night (a son of a close friend) and he was complaining about something and i just said "if you can do it better - then do it"
Wrong syntax for inputs
It uses an array like listing
I heavily suggest you use my extension ZedScripts
i also have ZedScripts installed
alright
even if i havent dug into that yet
You need to activate it if it doesn't show up automatically
It should activate automatically for script files
im not in that area of modding so im not using it yet, but its there when i decide to move over
i spend all my time cursing Emmy and thanking her too
yeah, im a chatty cathy tonight
yeah, im not sure which stage of sick i am - i was "call out sick" tuesday and felt worse friday
but i have (young) kids in school so there is no telling
that actually worked so bloody well, no more errors it says so im about to test again
Tho do note like I said before that it's still in development, so some stuff won't have proper diagnostics yet
yeah its not saying anythings wrong but this still wont work
got cool colors though so thats a bonus
UnPackSack, is that a vanilla timed action ?
yeah one sec
Your item does appear in-game right ?
yes I can spawn all 3
AHA! I got it
however pots have 30 uses so I have to edit the amount...
everything is working.. aside from it actually being able to be used on plants
alright so new major issue, I even copied and pasted the base game fertilizer and compost and just edited it to fit mine but it wont work, in game the item also has no weight for some reason
if i can fix these the mod is done and unloadable
for some reason items are weightless if they don't have a translation
ah great..
time to reread that part of the wiki
where am I supposed to put that line? it says nothing about where
or is this a completely different file
such a fun bug/side effect
says nothing about modules it seems
Your question was about translations ?
You need to read stuff we're sending you dude
I literally can't see anything in your last screenshot
What's the problem then ?
The Zedscript is freaking out about it not being a thing though
That's normal
Like I said it's in active dev, that's something I'm working on, rn it doesn't support translation files
so do I need to add the module PBC or does it just want that and nothing else and itll be happy?
translations aren't scripts, they don't have concepts like modules
okay so that goes for the recipe translations too right?
Yea, don't worry about it ๐ญ
I just wanted to make a silly bone to bonemeal mod and its spiraled so fast

welp adding the files didnt do anything other than change the display names
they are still weightless and dont actually add the things to the crops or get used
You'll have to spawn new ones for changes to take effect
(for certain values, like weight)
you have GOT to be kidding me
nope, though I do have a refresh mod that lets you update items to the latest spawn version of them
but for debugging its easy enough just to use the item spawner :0
i just wanted a use for bones why has the mod gods forsaken me
Hope you add support for .gitignore|zignore soon because the new version checks every .txt file.
okay weight exists but it throws me errors when I actually try to use it
I cant see anything wrong anywhere
did you copy what fertilizer or something does or?
(or compost?)
literally copied this
and tweaked values
Zedscripts also isnt saying anythings wrong
I know its still being developed but I fixed what it wanted earlier (a comma)
so what error are you getting?
Id love to figure it out, the game pops up the red error box and throws about 100 each time
no fert is used from the item and nothing is given to the plant
side note I think my spacebar is dying
zero clue how to see what it actually is though
c:\users\username\zomboid\console.txt
search for 'trace' and it will bring you to the errors soon enough
this what im looking for?
yep.
i have no idea what any of this means but im gonna look at line 22
which is just a bracket?
function ISFertilizeAction:start()
self.item:setJobType(getText("ContextMenu_Fertilize"));
line 22 of ISFertilizeAction.lua
yes it means vanilla code sucks
ISFarmingMenu.onFertilize = function(worldobjects, handItem, plant, sq, playerObj)
-- close the farming info window to avoid concurrent gorwing phase problem
if not ISFarmingMenu.walkToPlant(playerObj, sq) then
return;
end
if not isJoypadCharacter(playerObj) then
if playerObj:getInventory():containsTypeRecurse("Fertilizer") then
handItem = ISWorldObjectContextMenu.equip(playerObj, handItem, "Fertilizer", true);
end
ISTimedActionQueue.add(ISFertilizeAction:new(playerObj, handItem, plant, 100));
end
ISFarmingMenu.cursor = ISFarmingCursorMouse:new(playerObj, ISFarmingMenu.onFertilizeSquareSelected, ISFarmingMenu.isFertilizeValid)
getCell():setDrag(ISFarmingMenu.cursor, playerObj:getPlayerNum())
end
this is the function that calls the function that is dying
Im pretty sure its failing at handItem = ISWorldObjectContextMenu.equip(playerObj, handItem, "Fertilizer", true);, its trying to equip an item called Fertilizer instead of being a good boy and looking at tags and stuff.
greattttttt
Yea, you'll need to make your own fertilization code
wait
no
its cause the vanilla code was never designed to handle other fertilizers except ones explicitly named base.fertilizer
(and base.compost or whatever)
you could prob hook/replace ISFarmingMenu.onFertilize to fix it.
Ive never coded before so I have zero clue as to how to do that, and then make it overwrite the game if people subscribe on the workshop
can I like just copy paste the existing lua and alter it in the mod lua? that will overwrite the vanilla one right?
Yes actually.
you can also make a backup variable of the old LUA and call but, but for such a short function I would just overwrite it all for now.
I would recommend starting with something like:
function ISFarmingMenu:onFertilizeSquareSelected()
local cursor = ISFarmingMenu.cursor
local playerObj = cursor.character
if not ISFarmingMenu.walkToPlant(playerObj, cursor.sq) then
return
end
local plant = CFarmingSystem.instance:getLuaObjectOnSquare(cursor.sq)
local handItem = playerObj:getPrimaryHandItem()
if playerObj:getInventory():containsTypeRecurse("Fertilizer") then
handItem = ISWorldObjectContextMenu.equip(playerObj, handItem, "Fertilizer", true);
print("Handitem was ",handItem)
if handItem == nil then
handItem = ISWorldObjectContextMenu.equip(playerObj, handItem, "PBC.BoneSlop", true);
print("Handitem became ",handItem)
end
end
ISTimedActionQueue.add(ISFertilizeAction:new(playerObj, handItem, plant, 100))
end
I dunno if thats correct or the best idea, but its an idea to try.
make sure to place it in \lua\shared\
in a file with a .lua extension
the 'prints' will leave some text in your console/console.txt file about whats going on
do I have to copy paste the whole fertilizer section or just that one and it will overwrite that one vanilla section?
just the one function
can I just copy paste this and test it?
the above function should do something like "Handitem was nil" "handitem became isozomboidblahblahblah pbc.boneslop" (or maybe nil again)
yes
note im not 100% sure how ISWorldObjectContextMenu.equip works, or if it will accept that itemname with module (TIS, why are you using items without modules?!?)
they have modules!
Yea but they should be doing handItem = ISWorldObjectContextMenu.equip(playerObj, handItem, "Base.Fertilizer", true); not handItem = ISWorldObjectContextMenu.equip(playerObj, handItem, "Fertilizer", true);
see this is why modules don't work well for mods: TIS doesn't use them, so the code that works with non default modules doesn't get tested -_-
so many things are just hardcoded to assume Base
silly bone to bonemeal mod has become an entire overwrite of the games code
okay uh that seems to broke it more
back to the console I go
it decided it didnt like any code instead
which technically means it was overwritten
so that works...
well that means it failed on a line of :new something
so thats. something...
did any of the prints execute above that error?
@manic swift
Hmmm
Dunno whats going on if none of the prints occured
looking at the base game file
its only got like..
91 lines for that file
so where on earth is line 1182
Oh, did you name your lua the same as a vanilla file?
don't do that unless your replacing the entire files code (And even then, in LUA there are generally better ways to do that)
I did..uh
yea, when you name a file the same as vanilla, the game goes "oh, ignore the vanilla file.. COMPLETELY, and use the mods'
so its whining about you not copying ALL the code over
instead, give it a unique name
and when it sees function ISFarmingMenu:onFertilizeSquareSelected() ... it goes "ok, we're assigning the variable ISFarmingMenu.onFertilizeSquareSelected to the function that is the following code
and LUA is kinda special in that function names.. are just variables
so assigning them a 'new value' 'just works'
so I can namethe file anything and it will look at the start of your code and go "oh just do this"
yep
mod code is always run after vanilla code, so it will always run after vanilla code and 'reassign' this function to your code
mkay im gonna test this out again
try to name the filename 'unique' however.. because you can also conflict with other mods by accident!
and just randomly override one of their files if your filename matches -_-
I wish -_-, you'd THINK you could only do that if mod X is dependent on mod Y but nope...
just allowed to do it all willy nilly
yea when completely unrelated mods blow up each other depending on load order, that can be the cause
uhhhh
..one sec
okayyyyyy so bad news and good news
good news is the red box wont pop up
bad news is the game closes on the loading lua screen
lol. check the console.txt
console.txt here I come
uhhhh
messing with lua has made this turn from a spiral to a rapid decline
damn you lua!
i feel like messing with a fertilizer thing should not be setting everything else on fire
what did you rename your file?!?
yฬตออฬฬฎoฬธอฬฬฝฬuฬดฬฬออaฬทอฬฬฬrฬดฬอฬฬeฬตฬฝอ ฬฬผdoomฬอeฬตฬพอฬฬdฬถอ ฬอฬ.ฬตฬอออlฬทอออ อua?
I was close.
that shouldnt be causing issues right??
no thats looks fine
I mean, maybe? But more likely its something like: your gpu leaked memory or something.
Or, you added one too many... ,'s somewhere and exploded the lua compiler
Id first rename your .lua to .bak, justincase...
.bak? what is even that
you didn't edit any .txt files recently? because small errors in those can blow up unrelated systems
.backup
ah
aka file that PZ will ignore
renamed.. ill try a reboot
nope
it blew up
"I have no idea whats going on, so try turning it off and on again"
I mean it usually fixes it dont it
Often yes, especially if the error makes no sense whatsoever.
so are you crashing before main menu or?
im crashing loading the game itself
yea.. so look at your .txt files next
lol... what texture name? in your mod or?
the texture png I made for the boneslop
it uh
it aint happy
console.txt save me..
same exact errors
changed that entire item to be a copy of seed paste, so bone meal will be the only fertilizer
gonna see if that fixes it
it didnt..
you know what im gonna verify the integrity of the steam files in case I deleted something
O H
that uh... that would do it
it didnt actually
it crashed again after fixes and fried 11 files again
im at a loss
I got scripts and everything but lua is broken and any changes set it on fire

the huh?
like your using the mods dir right? or workshop dir?
not saving things to projectzomboid\media right?
everything is saved to MY mod
which is here
annd that didnt censor personal info
one sec
myuser\zomboid\workshop
k, dunno why validating would keep coming up with files
you don't have other files open in your text editor or something?
nope
im gonna verify again real fast
all the files are good
but it implodes at scripts still
im gonna remove the lua stuff from the mod entirley and see if it can boot
silly bone mod went from simple to very not real fast
I have a newfound respect for modders who do the insane stuff
..I may have to wait for them to make a mod like this instead at this rate good god
reinstalled the game and its alive
im going to insert the mod again, it has no files that mess with lua and is just scripts
gonna take this slow.
where is recipes_blacksmithing
so I have an update for you if you can do anything with it....
without the lua file in my mod everything works fine, if you equip my bonemeal bag in your primary hand it uses some of its capacity, though you cant see if a plant is fertilized or not which is dumb
however if its in your inventory it wont put it in your hand,it throws errors, uses no capacity and since you cant see if it adds anything to the plant i dont know if it works
this is what console says about it
so what if instead I just.... get rid of the bonemeal item and make that crafting recipe just make actual base fertilizer
itll take from my ideas for the mod a bit but would guarantee compatibility which is mainly what I want
yea making base fertilizer is a good idea for now
you SHOULD be able to override the LUA to take other items, but that'll take some more research
bone slop can be composted now as well so boom both fertilizer and compost can be made
nice
where's the blacksmithing recipes
in the forge.
ill update on how this goes
K, good luck to you.
changed recipes and translations
just tested...
ladies and gentlemen...
we got em
lol
i mean the recipe file
i dont see it here in the recipes folder
use a text search for the recipe your looking for
I've uploaded Version 3 of the community human rig that focuses on GLB exporting, alongside other improvements. If anyone could give it a shot I'd be greatly appreciative!
https://github.com/Paddlefruit/ProjectZomboid_CommunityRig
where am I supposed to put this preview.png file it wants
im using the zomboid inagame uploader
your modinfo describes an icon and preview, I think preview is the big pic used when you click and icon is the small one
alright
poster=poster.png icon=icon.png
oh, workshop\modname\preview.png
mines 256x256, I think its what appears on steam
so mine is in C:\Users\Black Moons\Zomboid\Workshop\Bug Zapper 9000 with workshop.txt
hm
it still wont see it
maybe you encoded it wrong somehow?
Heres a 'working' preview.png
on mac/unix it may also be case sensative.
Yay
I started this yesterday and said "oh im sure this will be quick, two hours max"
it has been 13 total.
am i allowed to post a link to it anywhere?...
im quite proud of it
pretty much anywhere, just not with annoying frequency ๐
Protos? My life for Aiur!
Congrats! I saw the reddit post, nice to see itt as a mod now.
This was so much more than I expected
That's true of absolutely every form of programming ๐
Did you end up with 500 other mod ideas while working on it?
โฆโฆyes
Ive had this great idea for a cart like thing specifically for corpses so you dont use as much endurance when moving mass amounts of them. Would be faster to.. but im nowhere NEAR making that
It's worth keeping track of those ideas... I've got a OneNote full of mod ideas and random bits of code that may come in useful
I know how to make scripts but no idea what any of the lua means, so ill be making more Qol mods if I do make more
It's an easy way to get started, and you can gradually do some minor stuff with lua as you need to
If you've doen any programming or scripting before you'll pick up the basic of lua easily... then you just have to deal with Zomboid jank.
I have absolutely never touched a line of code. This was the first time I did anything
It shouldn't, it only checks for files which respect the following regex: /\/media\/scripts\/[\/\w\s]*\.txt/
So it should only detect actual script files
Has isRanged changed? I'm getting an error with my Mod Handlebar's Preppers everytime it is called.
I'm throwing an error everytime I hit this line
-- For every weapon attached, get the ammo and magazine
for i=0, weaponsNum - 1 do
local item = attachedWeapons:getItemByIndex(i)
if item:isRanged() then
local bullet = item:getAmmoType()
local box = item:getAmmoBox()
local mag = item:getMagazineType()
table.insert(bulletList, bullet)
table.insert(ammoBoxList, box)
table.insert(magazineList, mag)
end
end
```
For example if zombie has a shotgun, it is pulling base:shotgun_shells
However from what I can gather it is now base:shotgunshells
If an M14, it is will call for base:bullets_308 when the item is now called Base.308Bullets
My error seems be with it calling incorrect item names on ammunition. This is my B42 I've been working on to move everything over. (what a mess)
Also, it is counting WalkieTalkies as ranged items!?
So I've narrowed it down to when the getAmmoType is running it is just pulling the wrong information. I don't know where it is pulling it from as none of these match up to the official wiki and I can't find changelogs where the name of the ammo type was changed in the wiki either.
base:bullets_308 is the AmmoType, not the item key
call item:getAmmoType():getItemKey() to get the actual item key
Is this something new with B42 the way that works?
My apologizes as I info dump here. I just loaded up B41 and getAmmoType() pulls the item key, I'm not sure why it is handled differently but I will try what you have said and report back.
Bloody brilliant. That worked. Thank you so so much.
yes, it was changed in 42.13
Where can I find the backpack stuff in the B41 files
Like duffel bags and stuff
Nvm just found it
๐คฆโโ๏ธ
I'm struggling to make a clothing item spawn with something in its attachment slot, I thought I would reference the weapons but I'm not sure it works the same way-- not sure if it's possible to do with clothes? I thought I could do an OnEquip and have it spawn in the slot, and disappear if unequipped, but I think I'm lost.
Essentially I'm trying to make a clothing item that glows, I thought the easiest way to do that would be to mimic the mining helmet from Better Flashlights, but the hat/light are totally separate objects that you find and put together to work
that's not really how attachment slots work
clothing gives an attachment slot to the player, but it doesn't really have an attachment independent of that
for example you can't have a holster with a gun in it unequipped
Ahh, yikes fair enough
Is there a way to directly attribute light to a clothing? I was basically repurposing the vest code that holds a flashlight but I want it to just be holding the light, or tying the two totally together
I'm pretty sure only heldheld items and attached items can emit light.
IsoPlayer.java:
There are other places with similar code, like LightingJNI.java calling IsoGameCharacter:getActiveLightItems()
I poked through the lighting stuff a lot when working on better headlights, there is so much hardcoded in java.
What about an item of clothing that adds an attachment slot, and some lua magic so when you put on the clothing a "clothingLight" gets spawned in your inventory and equipped in that slot? Then you have to disable removing/dropping it, and make it vanish when the clothing is unequipped... which might be possible if you use the "hidden cosmetic item" trick but that was never intended for attached items so it might go weird.
Does anyone know by heart the Z elevation size of the mouse cursor ?
z*3 if I understood your question right
I expected a Z constant.
afaik the mouse cursor represents the z elevation between the tile (z=0) and the head of a typical humanoid.
I haven't been able to get an OnEquip function to work- is onequip for like tool items? Is there a lua function for wearing clothes?
there's an OnClothingUpdated event
You could also add code to the timed actions for putting clothes on/off
Oh do you mean the aiming cursor thingy ? Like the circle with the vertical bar ?
I probably have that constant in one of my previous projects wait
Hello, modders! Does anyone know if objects/items have IDs in latest release?
Why wouldn't they ?
idk, but my understanding is that the only ID-like prop is, maybe, a memory address. I'm asking more about a stable ID
Another piece to my question is how to retrieve objects/items by ID
You'll have to make your question a bit clearer, do you mean an ID to identify unique objects after reloads ?
Bcs items use what is called a full type (shitty name, ik), which is the module.ID of the item
If you're talking about identifiers of unique objects, it depends
identifiers of unique objects and items that exist between reloads, like a specific vehicle ID or weapon ID. An analogy is car VIN as an identifier (not make+model+trim)
items have a mostly unique id, objects don't
is there a wiki in regard to the item id?
Nop
I suggest looking through the JavaDocs
For InventoryItem
There is an item id value used for networking purposes, I dunno how persistent it is
You also need to know what container the object is in, to get the object again, IIRC
You are however free to add modData to any item
Good news: they fixed the inventory bug
public int getCapacity() {
int capacity = this.capacity;
if (this.isOccupiedVehicleSeat()) {
capacity /= 4;
}
if (this.parent instanceof BaseVehicle) {
return Math.min(capacity, 1000);
} else {
return this.containingItem != null && this.containingItem instanceof InventoryItem ? Math.min(capacity, 50) : Math.min(capacity, 100);
}
}
Bad news, they left in all the stupid limits like 50 for inventory containers, 100 for furniture and 1000 for vehicles.
public int getCapacity() {
int capacity = this.capacity;
if (this.isOccupiedVehicleSeat()) {
capacity /= 4;
}
return capacity;
}
}
Sometimes less is more TIS!
And setCapacity's warnings are still uhh....
public void setCapacity(int capacity) {
if (this.parent instanceof BaseVehicle && this.capacity > 1000) {
DebugLog.General.warn("Attempting to set capacity of " + this + "over maximum capacity of 1000");
} else if (this.containingItem != null && this.containingItem instanceof InventoryItem && this.capacity > 50) {
DebugLog.General.warn("Attempting to set capacity of " + this.containingItem + "over maximum capacity of 50");
} else if (capacity > 100) {
DebugLog.General.warn("Attempting to set capacity of " + this + "over maximum capacity of 100");
}
this.capacity = capacity;
}
.. dependant on the previous value before you call setCapacity :p
100 for furniture? You can get more than 100 in a single tile space with 2 crates (not to mention 3)?
Someone could make a single large container with 300, guess not
yea I have a mod for that :p
2, technically.
copy pastes function, changes 2 function call.. names
impulseFromHitZombie->impulsesFromHitObjects
impulseFromSquishedZombie->impulsesFromSquishedBodies
boring stuff like that.
(TBF, I agree with the above two variable name changes, as they make the true usage of those variables a lot less confusing)
I wonder if they actually fixed deer/cows flipping your car when you drive over them slowly.
Or changed any of the values my mod depends on to seperate plant impacts vs zombie impacts -_-
They said they fixed the damage, nothing about physics, but they usually don't tell us everything so
.corpseSize is still insanely high for cows and stuff (7 vs a zombies 1) so I doubt it.
(Realistic car physics already fixes running over cows/etc flipping your vehicle)
Lets test.
Random mod idea: Sort KI5 last. A mod that just puts your 100 KI5 mods that all start with 2 digits <name of car> to the end of your mod selection page instead of at the top so you don't have to constantly scroll past them to enable/disable any mod
I think the running over zombie ragdoll physics got some changes lol
they now go flying instead of falling ontop of the car so often
or maybe its just the vehicle im using today
Cool game, a zombie fell ontop of car, over my tire, and now that tire is hovering in the air :p
yea they did not fix driving over cow corpses flipping your vehicle even at low speed -_-
its not a bug, its a feature... 
its a bug iv given them a LUA fix for that they still haven't used ๐ Its even on their frequently reported bugs list.
someone had just set cows/deer/etc corpsesize far too high and never tested it.
improved the headlights of the w900, i think thats fine and more realistic
Oh hey I noticed a W900 Realistic car physics patch now
Also I need to add better headlights to project summer car -_-;
yea you could do that
Did you wanna see what my W900 patch looked like?
sure, i just tweaked a bit the horsepower weight and capacity
this allows it to only be active when the beta overhauls are enabled in realistic car physics
ah ok
just remembered i have to get rid of the payload lua for the submod, i forgot that
Mainly was just trying to make an example of how the overhaul values work
did new update broke your mod @willow tulip ? ๐
yep shared.
I jad to delete the zombie folder ๐
Yep.
Every PZ update, delete the zombie folder and await java mod updating
ever tried pulling one of those containers from.ki5 ?
seems.you csnt pull them.with your horsepower addon on
No, the problem is anything without wheels will have chassie friction with the ground
and thats crazy high
ow yeah I haven't tried without your mod tbh
yea, in vanilla they don't tow with anything in them
so we need a flatbed mod to laod em?
no to think of it I think in b41 you could load them on with other mod that also let's you load cars
but I think that's not on b42 yet right
Maybe, that or just don't tow them when full, IMO W900 semi trailer mod is far superiour ๐
And yea, it will let you overhaul the weight/cargo/engine sounds, when the realistic car physics overhauls are enabled
I think it was a empty gasoline one
also, even when they are off, realistic car phyiscs will let trunks of over 1000 capacity still work
(B42.14 allows trunks up to 1000 again)
-time was def not full
just the trunks?
W900 has gasoline tanker trailers to
true
Yea
it was my fix also to just get the trailer hehe
but I like the bee skin ๐
fkn devs I need all capacity unlocked ๐
yea realistic car physics just deletes all the capacity limits because they are dumb
Total Capacity Override too (also needs update)
too bad that other dude never implanted your maybe fix
yeah that one
he rewrote ALL the transaction code -_-
cant u fix it? ๐
All he needed to do was some reflection to getCapacity() without using getCapacity()
I mean it would save everyone a headache that mod
Iv given up being a tryhard and now just edit ItemContainer.java directly.
maybe we should make a petition to scrap that cap lock
๐
ic happy the cars got fixed tho
Iv already told a dev its dumb to have a capacity limit in a game with 9000 other sandbox variables, where every item/car already has its OWN capacity limit
atleast something we can use to hoard hehe
they shrugged and just fixed the 100 trunk bug.
true
well in the end capacity lock got hacked anyway so what's the point right
BTW I also.loved your car sounds hahaa
inwas speeding with a semi and empty cattle trailers and I went full on the turn and the trailer drifted 90ยฐ haha
was awesome
as it did the trick in the turn hahaha
the sounds in the wheels went bananas
but only modded vehicles seem to be affected somehow. https://streamable.com/koo9wb
haha that looked funny tho
best strategy to kill zeds with a car ^^
lol
hen again the container is also heavy right
true that
mustang and taxi are about the same weight
or a 100k round minigun ๐
ะัะต ัะฐะท ะผัะฐะทั ะทะฐ 5 ะผะธะฝัั ะพะฑะฝะพะฒะธัั ัะฒะพะน ะผะพะด ะผัะฐะทั ััะพ ะฑั ะผั ัะตัะฒะฐะบ ะฟะตัะตะทะฐะฟััะบะฐะปะธ, ัะพ ั ะฟัะธะตะดั ะฒ ัะฒะพั ัััะฐะฝั ะธ ะฟััะฝั ัะตะฑั ะพะฑะดัะพัะตะฝะฝะพะน ะฑัััะปะบะพะน Such comments are really sweet ๐ maybe i just just delete the mod๐คช
Nah, take it as encouragement to put out more updates ๐
"Remember to mash that upload and update button"
yea i reported to steam
Realistic Car Physics updated now.
@willow tulip i tried messing around with the sounds, but they dont seem to loop? and when the custom crank sound is done playing you still hear the last part of the standard sound
exhaustSound = "IdleEngine", exhaustSoundBias = 0.2, exhaustSoundMultipler = 0.8,
crankSound = "vehicle_start", startSound = "RCP_Engine2Start",}```
i used the vanilla sound files, they have new car sounds that sound rly good
check out how they are defined in realistic car physics
Mainly the Loop = true for some, false for others (like startup sounds)
yea mine are based off vanilla sound files to
I kinda recommend using a sound script and extracting the sounds from the .bank file, I have no idea how it works if you use the files directly.
Oh crap I forgot to update the sound names in that file.
oh well.
awesome
the other Java dude is also busy ๐
So yea, renaming a lot of the sounds soon.. lol
other java dude?
ah ๐
its all good I still have my trusty Java dudes ๐
yeah but does your also work for items
my mod is a non physical.item like a bag
yes
it now just limits you to 100,000 because I thought that'd be good enough to store most of the game in one item and crash it
so your mod fixes everything that has a container type
Yes
TCO also then lets you override everything with a container, from the player, to the floor, to furniture and cars (No backpacks yet..)
10k
yes but what is the point of rasing the limit to sane amounts?
we tested oit mod on 41 way back and lagged the fk oit with 8k worth of items in it
lol.
100k logs would work maybe
depends on the size of item, but yea
cause either just 1 item
but we dumped everything in it haha
and hydrocrsft also had a shit ton
havent tested it on b42 tho
cause you also lagged with item cheat menu and now you don't
Is there a mod that adds a perk and works in B42 I can take example on ?
learn to read? but perks are broken in mp
@willow tulip https://streamable.com/m31byc
sounds very different to the file ๐ง
yea its pitchbent, the EngineSoundRPM is what the sound files RPM should be
for science i added the same sound to all steps and it only sounds right when starting
startup isn't pitch bent

its 3000 in the vid
yea that file sounds more like a 1500 idle lol
6k sound kinda good lol
But yea, it has to be pitch bent based on RPM
vanilla cross fades(?) between multiple sounds.. and hence why it sounds like a dozen indistict sewing machines playing at once
@knotty stone Just updated all the LUA and readded the RPM files properly for vanilla vehicles -_-
also fixed startup sound being too loud
the exhaust sound is just a super short stutter, does it have any purpose?
Exhaust sound is supposed to be a recording from the back of the car (ie exhaust noises) while engine is the front
they both get pitchbent
but at low throttle settings, Engine sound is loudest
at high throttle, exhaust sound becomes loudest
thats what engineSoundBias = 0.4, engineSoundMultipler = 0.5, does
Bias = starts at 0.4 volume, multiplier = increases by throttle * 0.5
vs:
exhaustSoundBias = 0.2, exhaustSoundMultipler = 0.8,
also, mod just updated, try some of the vanilla vehicle sounds now that iv overhauled their names and stuff -_-;
k
["Engine1"] = {engineSound = "RCP_Engine_1_Engine", engineSoundRPM = 3000, engineSoundBias = 0.4, engineSoundMultipler = 0.5,
exhaustSound = "RCP_Engine_1_Exhaust", exhaustSoundBias = 0.2, exhaustSoundMultipler = 0.8,
crankSound = "RCP_Engine_1_Crank", startSound = "RCP_Engine_1_Start",},
Basically though that is how my mod makes the engine sound different when you apply throttle, instead of just getting louder
IRL at idle, the exhaust tends to be rather quiet while you get a lot of 'engine' noise of all the moving parts
but when you floor it, the exhaust gets a LOT louder while the moving part noise tends to be somewhat similar (aside from increased intake noise)
Also with just 2 sounds instead of... 10+ required, it might be possible for people to record vehicles without a studio+dyno
thx
(plus there is just no way to add extra engine sounds in vanilla due to how fmod and bank files are set up)
@knotty stone example of exhaust vs engine sound
engine 1 is maybe a better example
so its like idle vs 3000 rpm like
no
its basically like a recording from under the hood vs behind the vehicle, same RPM
Engine noise = Cams, lifters, valves, fanbelts, alternators, power steering pump and intake
Exhaust noise = Exhaust
or ELI5: Engine noise = high pitched noises, Exhaust noise = low pitched noises
not bad, ignore retanaru in background xD
https://streamable.com/dbt5nv
had to set horsePower = 150, it was a bit to fast xD
Hehe, yea if it has a horsepower 'overhaul', the horsepower -> 4x vanilla horsepower
I gave it like 400HP in my overhaul because it was also like 8000kg
cause thats what google say its specs would be abut lol
400 was a bit extreme (1600hp vanilla), though didn't feel too bad with a trailer
also, would be basically untowable by anything else lol
especially offroad
but would also tow and shove other vehicles like they where nothing
But yea, sounds good :0
Add a Cheap Trim = annoying rattling at high speed ๐คฃ
haha
Probably far more effort than it is worth, but damage based sounds? A THUMP-THUMP-THUMP-THUMP scaling with speed when a tire is damaged, etc.
There actually is a damage track played when your engine is very low condition (vanilla even)
I'm going to pretend this is because they loved my Foldable Survival Rifle mod that could load both .223 and 5.56, and it made them realize that the two calibers were redundant. ๐
Would you know how to print the value of an object to console instead of the memory address? I am trying to print the values of character:getWornItems() into console, it gives me wordscramble rather than the clothing items
Hey all! Just starting to dip my toe into the modding PZ world - basically I'm trying to take a 3D asset and add a context menu option to "add to map" that then places the object onto that tile. I tried creating both a B41 and B42 mod the other day with the help of AI [before reading the modding wiki/resources and then seeing the note on AI and feeling like an idiot after it not working after hours lol] so want to now dive into how to actually build/develop the mod. I'm finding that alot of the guides for importing assets (either vehicles or clothing or stuff) are out of date - where would be a starting place to, well, start figuring this out lol? Thanks!
Why the hell is vehicle:getId() and vehicle:getID() valid and return different values -_-. I hate this ever so much.
in vehicle, its getId() you want, while in inventoryItem its getID(), cool -_-
It's probably an ArrayList of something, so iterate through the ArrayList and print each piece
Remember java ArrayLists start at 0, not 1 like Lua. Because Lua is an abomination.
Thanks for the quick response๐
Actually its worse, Wornitems is its own fancypants class:
declaration: package: zombie.characters.WornItems, class: WornItems
(At least, thats what most getWornItems() return)
I guess I'm trying to find my custom item in WornItems, but I get errors for basically anything I print
yea, so something like
local wornitems = character:getWornItems()
for x = 0, wornitems:size()-1
local item = wornitems:get(x)
-- do thing with item
end
also looks like it might be of some use
depending on what you want exactly.
use : in lua
... Damnit! Sorry. Fixed now.
Keep swapping between java and Lua and I keep mixing those two up
Thanks for the help, I'll have to try working on this tomorrow, I've been struggling to get anything to print that indicates it's working, but that's probably my coding
panik
yea see my changes, I made a mistake or two ;P also feel free to post your errors here if your having problems decoding them
Hu, vanilla headlights seem brighter in B42.14
lol they fixed havingf a flashlight on in the car
flashlight is still wayyyyy brighter then vanilla though
flashlight is nearly obnoxiously HDR bright lol
heavy duty flashlight
at least they have more distance then the flashlight now in B42.14 lol
though thats also at 100% condition, they drop to half intensity/distance/focus at 0%
thats better.
... Ok maybe too much.
There.. thats not too bad.
Next need to add code to make rear lights turn white/brighter when backing up
i keep ending up in rabbit holes as i build something that hope will make people's lives easier while modding - but i do have a decent testing system now:
that testing output and coverage was one of the rabbit holes
or one of many
EDIT: (i committed to near zero outside dependences) which i normally hate, but i think the PZ community needs to agree on a package manager.
You can still do it, forgot how though (yes I know I forgot in the same day that I figured out how to do it again)
Changelog: 26/02/16
added support for Harvest Zs cannibalism. Human teeth may be used in crafting Pot Of Bone Slop, just like base game Herbivore teeth.
No bugs found after todayโs Zomboid update.
Question did build 42.14 ruin guns again
And how do I transfer my hosted server to the newest update if it's not ruined
They did remove .223 caliber and all the bullets/boxes/conatainers with it
So it might be that if you have gun that uses that round, it might cause issues
I don't think any of my guns are running that so I'm fine I didnt even know that ammo existed
Hi everyone, I'm updating a mod for B42, and I need to know when a player has dealt damage to another player.
Old events like OnPlayerHitPVP / OnWeaponHitCharacter seem to be no longer used. Is there a new event or API method in B42 to get the attacking player's object when a player takes damage?
suggests (Client) OnWeaponHitCharacter: Triggered when a non-zombie character is hit by an attack from a local player.
PS: Thank you whoever added (Client) and (Server) to the events page!
@restive sinew You might also want the 'hook' WeaponHitCharacter
https://demiurgequantified.github.io/ProjectZomboidLuaDocs/md_Hooks.html Gives you attacker, target weapon and damage number
(though likely gets called for zombies and players vs zombies and players)
Do note: Not all events/etc are called on both client and server.
(most only one or the other)
a package manager? isn't that what the steam workshop is for? I doubt there's any benefit to using something like luarocks or whatever when steam workshop has dependency stuff baked in
Hey this looks amazing. Are you modding the car lights? Is there any chance I can help you with that mod? I have an idea to improve some light sources but I have no idea how to modify them with code
yea just was throwing a car light patch into project summer car... kinda already done lol it was just overriding how they are created
Also kinda tempted to make another patch to turn down flashlights though -_-;
I never found realistic how "flashlight" has more bright than the lights from a car
Like the car lights should be better than a normal flashlight and equal to a heavy duty flashlight
its like, DAYTIME bright, and even those 'heavy duty' flashlights are like 10W bulbs
Headlights in 1993 where 2x 50W bulbs
Id like to improve the flood lights ilumination distance
Heavy duty flashlights where 1x 10W bulbs, I know because I had one as a kid I repurposed to run off a 18v drill battery with a 12v regulator that maxed out at 1.5A at best
Do you remember that mansion on 28 days later? The one the soldiers were using as safehouse
IMO this is what flashlights should look like:
that would have been nice and moody for flashlights
basically just need to swap flashlight and headlight brightness LOL
can't say I do
Do you have any file example on how to modify the illumination from the flashlights?
uh, just use doparam or load and change
LightDistance = 15,
LightStrength = 1.5,
TorchCone = true,
TorchDot = 0.53,
All right it looks "easy"
anything we should know about lua and mods in the new version? my simple one stopped working and cant get a damned error unless i force one.
Whats your mod about
Nothing new iv seen
You know what would be cool as well, making a motion sensor floodlight
its not really anything - took the Simple Stats and updated it for 42.13 cause it wasnt working then went on a tangent doing other things - either way it completely stopped working. i cant even get print statements to drop in the damned console.txt
check for compilation errors
ie: search for 'trace' in your console.txt and see if any stack traces exist
@willow tulip So I found the flood lights on the game files but im not able to find the lighting values
{
DisplayCategory = Furniture,
ItemType = base:moveable,
Icon = default,
Weight = 0.5,
WorldObjectSprite = lighting_outdoor_01_49,
}```
I wonder if its possible to modify those values since this is not an item but a tile or "moveable object"
Here it is! The movable class has lighting classes I can use https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/inventory/types/Moveable.html
declaration: package: zombie.inventory.types, class: Moveable
Also some methods for modifying the lighting
thats the movable item I believe, not the world item.
check 'newtiledefinitions.txt'
// lighting_outdoor_01_49
tile
{
xy = 1,6
BlocksPlacement =
CustomName = Lights
Facing = S
GroupName = Flood
HasLightOnSprite =
IsMoveAble =
LightRadius = 24
PickUpWeight = 150
lightB = 200
lightG = 255
lightR = 255
lightswitch =
}
Hi, I'm working on my first mod which is supposed to be a simple retexture for the vertical american flag to a different flag texture but am having issues. I used TileZed to find the sprite in the correct Tiles1x.pack file and exported it as a png, edited it, then put it in a mod folder with the path FlagMod/media/texturepacks/Tiles1x/Tiles1x32. I'm not even sure that that's the correct way to do it but that's what I understood from online. Unfortunately after enabling the mod and testing it the model has not changed in game and I'm not sure what I'm doing wrong. Any help is appreciated and I apologize if the way I described it is unhelpful I'm new to this
whats a good event for when a player loads into the game fully? OnGameStart doesnt seem to be firing for me
or something else is going wrong
use OnTick.Add OnTick.Remove when you didnt know what is the right one to pick
Iโm just having a weird issue where my mod is loaded within the main menu Lua Debugger but not in the game
normally OnGameBoot for server. OnGameStart for client
Also - note for others - in the Lua Debugger change Lua to noise if you have debug prints
Thanks eScape
Thatโs certainly going to come in handy
Is a tick a frame?
btw OnTick will not trigger when server have no client joined because of world pause sandbox config
Right and no it wouldnโt be a frame
in the generic 'tick' sense yes
some systems have their own tickrates that are separate from that
'tick' ticks are just frames, entity ticks are 100/s, iirc climate ticks are one per 10 in-game minutes
Hey there, can somebody please tell me, Is there any way to grant 0x food and water consumation need by applying clothes?
Or constant food/water regeneration, idk
better not call /frame/ because we have OnRenderTick for game render , confuse
they're the same tickrate so it doesn't matter
render frames and game ticks are the same thing in pz
is that from same thread or diff? i tot two different thread
yeah, thats what i was thinking too eScape
rendering is in a separate thread but it's still synchronised to the main tick rate
right, which is why naughty mods doing too much kills frames - right?
basically at the start of every tick the game tells the render thread to render one frame, and the game thread to simulate one tick, and the tick is done when both are finished
at risk of being a know-it-all you can make things italic by surrounding it with *
Like when fast-forwarding in-game, right? I think more about server ticks and client render ticks. But yeah, the game client should be like that; something can cause heavy CPU spikes from both foreground and background tasks. X_X
Sorry, sometimes i have communication problems in English just by typing short words. : )
No apology needed - the other discord I frequent is a lot of ESL people
โEnglish second languageโ
is TreeDamage a multiplier of the weapons damage applied to trees, or is it a flat number applied to trees?
alright im trying to update my mod but even with all mods disabled whenever i even select a mod the game crashes with zero exception in the console
Same happens here. Game has been crashing all day on MP. This would be the 10th time it crashes
Sometimes it goes black, sometimes the game just closes and boom straight into desktop
im gonna try verifying the integrity of the game files
ill see what modding changes ill need to make based on stuff i find around and my own findings
And timed action ticks are 30/s IIRC (the maxtime thingy)
i think they're 48/s
Hmmm, Might be right I recall there being some weird stuff with 48 and the time system
Physics runs at 100/s too
(even if server somehow lags, it will tick away for lost time)
another cursed concept in ticks: Not all ticks always occur.
Or in lockstep with other ticks -_-
Hey i was wondering what do y'all use to mod ? I'm used to intelij idea for minecraft but what about pz?
VI
hello there ! if you wish to help me please ping me or send a DM ! i'm willing to make my first mod to experience the whole thing, more over willing to make a vehicule that will suit me ! i went through a lot of mods and didn't find the type of heavy duty vehicle i'm looking for, but i absolutely know nothing about how to make it, can anyone help me please ?
Id suggest you to check the files from other vehicle mods to help you understand how they were made
I was checking the files of the M998 HWMVV from KI5 and I was surprised by how many details this game has when creating a vehicle
i was thinking the same about the same modder, i'm effraid thoses files may be a little thick for me to navigate thorugh them, does it need to be an experienced LUA coder ?
to read them and to make a mod
thank you for your help though !
Ay anybody know what the item โBase.โ Of an empty bottle of cleaning liquid is?
have you checked the list of items ?
an empty bottle isn't a different item
found this: Base.CleaningLiquid2
but doesn't seems empty, is there any other info input that specifies empty or not ? are you supposed to use/find an empty one for your mod ?
Im making a mod to allow you to make cleaning liquid, I want an empty cleaning liquid bottle as part of a crafting recipe
maybe use any empty bottle ? like the fuel works with "any" empty plastic bottle besides jerrycans ?
Well I dont want to be converting anybodies plastic bottle into a different kind
I suppose i can put a warning in the mod description
i think i spotted some items when being emptied changes back to some other random plastic bottle, for exemples when you pour cleaning liquid into random plastic bottles taking the shape of the proper cleaning liquid bottle, then changes back to some soda plastioc bottle, maybe i'm not helping, i'm sorry
i was thinking of a making a mod to craft soap using 3 items, charcoal and any fire consummable (to make ashes rich in sodium or even using the sodium hydroxide) and fat either from vegetal oil or animal fat
Im just making cleaning liquid
Soap bar mods all yours
is there already some ?
Uhhhhhh maybe?
oh you're suggesting me to make it ? i don't know how to make a mod, i'm trying to though..
you do ! at least you know where to begin
how to input a crafting recipe and combine items
Kinda ish
I went to test this mod and it blew up zomboid so
May not be the best inspiration here
you've crafted napalm instead of cleaning liquid ๐คฃ
you burned you pc ?
Just refuses to open zomboid
have you checked files ?
Im going to le console
Is it just me, or does overriding basegame outfits in clothing.xml no longer work in B42.14?
If you add the outfit with a different name and different GUID it still shows up
But if you try to add the same name/GUID as a basegame outfit (i.e. to make a new item spawn on a basegame outfit) it no longer seems to work
It worked in B42.14
Iโm not gonna lie Iโm about to pitchfork this release but I still have some hours of testing and troubleshooting first but Im soaking my torches
I hope this isn't a super silly question but I can't find much info about it. I have the sandbox options for my mod setup and working, but I want to put them under their own headings rather than just having one big list.
For example, something like the bellow
Headingname
option 1
option 2
Headingname
option 3
option 4
What would be the best way to go about doing distributions of an item ?
There seems to be multiple files for distributions, but I'm not sure what ones are most up to date
It actually differs depending on the hardware. A server can run at 100โ150 FPS, which means 150 ticks per second. A low-end PC can be locked to 30 FPS (FPS lock).
This is based on my experience and research.
Physics runs at 100/s, based on my having to recode the source of WorldSimulation.java
and this:
int int0 = 0;
this.localTime = this.localTime + GameTime.instance.getRealworldSecondsSinceLastUpdate();
if (this.localTime >= 0.01F) {
int0 = (int)(this.localTime / 0.01F);
this.localTime -= int0 * 0.01F;
for (int int1 = 0; int1 < int0; int1++) {
(do physics things with cars)
...
What is the best way to remove a vanilla recipe and replace it with a modded one? I am trying to to remove it but the other craft recipe shows up still
You would just overwrite it, using the same structure and names as the vanilla lua for it.
do you mind just changing its inputs/outputs?
Yes, I am trying to return 5.56 ammo to 50 rounds when open/boxed. But even using the same structure and names seems to just added a second requirement to either open it or craft it
you mean its capped at 100/s ?
Nope, it does fixed timesteps of 0.01 second to be deterministic(ish)
Bullet.stepSimulation(0.01F, 0, 0.0F);
this.time = GameTime.getServerTimeMills();
} else {
this.time += (long)(10.0F * int0);
}```
Hmm, I guess that might actually introduce an instability
oh, if over 10 physics frames occur it will drop... the remainder? lol
but yea, it basically will try and run 100 updates per second reguardless of how anything else is going
and will try to catch up even if a lag spike occurs
at least, for car physics
The best tool you can use is to download an IDE (VSC or any other) and open the folder as a project, then you can use the searching tool from the IDE
Alright so, I've got my item made, textured, and rigged now, whats the most up to date guide for making a clothing mod?
You can type CTRL + SHIFT + O and search any file by name, or you can click the search icon and search for any item
because I have no earthly idea where to go from here
This guide looks well explained
would be nice if it went over basic mod file structure stuff as well, oh well
It does!
Hold on theres another well explained guide here..
I would also recommend you seeing other mods structure to get a reference
Check this channel it has the best project zomboid modding tutorial I have ever seen https://www.youtube.com/@SimKDT/videos
that's what i stumbled across checking in the pz wiki about modding
lol I saw that ๐
i realized I was wrong
I mean your free to put everything into common if you like to.. live dangerously ๐
But most of us just put the translation keys and media in there.
Well I know about procedural distributions, but I was more so wondering if that was the best way to go about it or not
that is the best way ๐
by the best way maybe you mean just matching your workflow, so I can use that link as a ref
now for the fun fun joy of me troubleshooting my mod and figuring out what the hell is broken in it as i go along... The first issue, the item exists! it has its icon, but mousing over it causes errors and its tooltip box is completely blank
And it oddly is using a tinted version of the icon despite me specifying it shouldnt be tintable in the clothing.xml
problem two, I didn't have a file guid table, fixed that! lets see if that was an issue
Issue one is definitely the tooltip issue
okay! progress has been made
the tooltip is showing up... but its giving constant errors now and not rendering on my character
attempted index: list of non-table: null
function: Distributions_ImpRifle.lua -- file: Distributions_ImpRifle.lua line # 40 | MOD: Salty's Modular Weaponry
java.lang.RuntimeException: attempted index: list of non-table: null
-- Drug Lab Guns
table.insert(ProceduralDistributions["list"]["DrugLabGuns"].items, Schematic_PipeRifle);
table.insert(ProceduralDistributions["list"]["DrugLabGuns"].items, 1);```
I see zero reason why this should be returning null?
DrugLabGuns is in the procedural distributions, and I have ```require 'Items/ProceduralDistributions'``` at the top of the file ?
Weirdly it has no encumberance despite me specifying it in the scripts... unless I messed something up of course
I'll come back around in the morning when more folks are around to help me out here!
Mod structure wiki page
yeah I got that one figured out by just studying how workshop mods do it
I still suggest reading it
There's quirks studying workshop mods won't teach you
Will do!
I've been attempting to look it up to no avail, but I've been wanting to make a custom model of my own for my character after having a mod of the such while playing with friends
is there any documentation on how I could do that here?

