#mod_development
1 messages Β· Page 294 of 1
Ah, I've been awake for like 15 hours so my reading comprehension is ass
Thought you two were talking about making custom flyers
Not drawing on them
Yea I thought that's what he wanted
His original question definitely meant that, tho that's not what we wanted to know himself
I explained myself a little bit wrong I guess
My guess is what writing on the flyer would be significantly harder than it's worth
it does not necessarily have to be a flyer, writing in general on an image
The draw on the map mod only works because it basically takes the default game's symbol system and just makes it happen when you free draw. That's the only mod I've seen that has ever gotten close to custom drawing
Then a map would probably be the best bet
for now I guess using the tools in the game that allow me to write / put symbols will be enough for me
Hey guys if i just wanted to do a simple retexture of something would I just put the retextured png in the appropriate texture directory with the same name
yeah
I tried but I don't know how to do it, I'll try another time I guess or hopefully someone else will do it with the flyers
Hey does anyone know why my model is changing color when blood gets on it?
this is B42, possibly a B42 issue
Did you set a blood texture?
Looks banded like a UV map
You may need to ask in #modeling
I didn't change anything related to blood textures. I only added a texture that corresponds to the model
I'l ask in the mdoelling channel thanks!
Hello, I have a problem. I can't find FBX model for beer can. I assume that same model is used for diet cola, beer can and etc.
Why did bro become skinward
not seeing anything about
SetTraitDescription
What would the equiv be for professions?
nvm it's
SetProfessionDescription
taken from MainCreationMethods.lua
local profList = ProfessionFactory.getProfessions()
for i=1,profList:size() do
local prof = profList:get(i-1)
BaseGameCharacterDetails.SetProfessionDescription(prof)
end```
Yay, B42 compatibility! π₯³
https://steamcommunity.com/sharedfiles/filedetails/?id=2642486124
nice.
Still have to find a proper name and poster for this mod by the way π
I agree with TIS the context menu approach has become a huge mess, but right now the UI is still... quirky
yeah well, the whole game is a huge mess π
Anyone know where parcel loot table is set? π
Or mailbox loot table for that matter?
I can find mailbags and postbox but not the houses mailboxs.
Does anyone know how guns are coded in B42? Because in the media/scripts/items/items_weapons_firearms.txt, guns seem to have a Hit Chance just like in Build 41. I do notice that the closer the zombie, the easier it seems to be to hit the zombie, is there any file in the game that dictates how far is considered "point blank range" where I have a significantly higher chance to hit?
Also, by how much does the point blank range increase the chance to hit the zombie?
All rifles and pistols seem to have a base hit chance of 50%, but those odds seem to increase when the zombie is close enough
This also makes me wonder, don't firearms function practically the same way they did in B41?
There is a approximately 100% chance that there are legacy values still in the firearm definition.
And they are very different to B41 - in B41 you point in a direction, the game pretends you have a really really really long melee weapon and highlights the zombie(s) you will hit.
Now you fire a projectile in 3d that hits the 3d zombie model. Or doesn't.
Tip: when using a shotgun make sure you car is not behind your target.
This is really odd though because the hit chances were different back in B41
Certain guns had a higher default hit chance than the others back in B41
that may still be the case, but more like guns in an FPS
i.e.: how close to they hit to where you aim?
instead of being like a taletop RPG when you have a X% change to hit, for percentile dice and decide if you hit.
So where is the code for guns and how they aim and fire now? π€
I mean, this is probably a worthless question now since the whole gun hit chance thing is getting replaced with a damage chance next patch
So soon enough guns will always hit, but whether or not they damage the zombie is a different story
the rework is that aiming is actually physically simulated so 'hit chance' isn't really a concept anymore, it's not a dice roll it's based on spread and stuff
i would guess that hit chance either doesn't do anything or is just reused to affect spread or something
Are b42 mod dependencies working? In a test sub-mod, the mod names have a backslash in front of them, so the dependencies don't line up.
There's still some level of it most definitely. Even when the aim reticle is really small, I can still miss
And the reticle can get small enough to where all of it is on the target
yeah, just add the backslash
Never mind - the format updated and you need a \
@silent zealot soooooo how would I make the description use the language translation files so it's not hard coded english
Assuming it's not 3am for you again
getText("IGUI_StatsAndBody_Hunger")
that's it
so simple
it will return the string you give it OR the version of that string defined in the translation files.
Translation files are special - they're not really lua even though they are in lua\shared\Translate
make the folder media\lua\shared\Translate\EN
create a file with the same name as the equivilent vanilla file, which is normally something you want to avoid. In there you put your translation strings
Ah I know how to do that, I just thought there might be a way without copying all the translations myself π
You only need to put the new stuff in your file
they get automagically merged
Like for this mod, I will have only one translation string in teh translation file:
I know but it's an existing translation. It just doesn't get translated due to when it gets loaded I'm pretty sure
Remember? It was the description for the handy trait, it wouldn't translate due to it being injected with lua, so I hard coded it to be English.
It may just be cursed to be in english
all translations are loaded before lua
if you can't get a string to translate i'm sorry to say it is user error
It would load the translation under normal circumstances, but it has to do with traits displaying text.
I believe it to be a special case, as we have to reload the trait display for it to generate the stat display properly
It would add the stat properly, but would not display the text for it
I'm sure if I overwrote the trait it would translate fine without changing anything
Trying to avoid overwriting anything for compatibility
You do it for English only
If people want they can either send you translations for another language that you add, or make a mod that adds a translation
So for my mod, playing in EN will see "Lick Battery" but playing in FR will see "ContextMenu_LickBattery" because there is no translation entry.
If a french player says "the french translation file is ContextMenu_FR = { ContextMenu_LickBattery = "Lick Le Battery", } then I can add that to the mod.
And if I don;t respond, they could release Battery Licker: French Translation
This is why I don' t add French translations myself π
back to the original question - it was a string that is already in the translation files?
In that case just find out what it gets called, and replace "My English Words" with getText("IGUI_Trait_Handyman") or whatever the proper translation identifier is
if it's a vanilla entry you shouldn't need to duplicate it
yeah, I misremembered - I thought we added a new string
How do you re-open the command console in debug mode
Surprisingly this is the thing that stumps me
I think it says the keybind in the options menu
Yeah I was using the vanilla translation string and you said this but I didn't understand it
So I just hard coded it to be English since the vanilla translation string wasn't working
can i replace .png textures with textures in a .PACK format?
Cheese:setDescription(getText("UI_trait_handydesc"))
SomethingThatTranslates:getTranslation was my 3am way of saying "put the translation function here"
I believe if you name a texture the same way as the one inside the .pack files, it can override the existing textures
alr, good to know
except for item icons i think
since the name should have Item_
but when its used via code it should have the suffix
for some weird reason
i dont have enough IQ to understand why
How do you know when a custom context option you've added has been selected?
Item icons are the same
Just that weird part about scripts
But that has nothing to do with it
A context menu option links to a function to be clickable
So when you click, it triggers the function, and sends the arguments you set in addOption
It's a specific writting, I need to make a guide for it
Time to start digging lol
Oh also, I don't get if I am doing this right, but every time I change my code I have to restart my game in order to reload it. I've tried reloading the lua file in the debug menu, but it only works once before not being usable. Is there a way to reload lua without this issue?
Reloading a specific lua file requires you to write it in a specific way
You can however reload all the lua files in the main menu
You can't have problems with that
But yeah reloading specific files, you need to be aware of stuff that might break in the caching of stuff for example
Yeah I don't have issues with doing that part
Also
I had a feeling that was the reason so I hadn't asked for a while but it kept bugging me to quit and rejoin my worlds.
Check the community debug tools
Where can I find it?
Yup
Is it possible to get/setStats from server side with lua?
Nah
It's client side
Should be at least
SO question -
If you send a server chat message, that is read by a client side mod and then do something on a local client...
Is there some sort of server sync that would then overwrite that change?
Like if I have a mod that changes my xp to max in Fitness, won't the server see that change and be like - ummm no chance dude. Nice try!
I'm not familiar enough with it, but could be locked behind one of the anti cheat
Which can be deactivated by servers
There's different AC rules which are on/off options
Gotcha
Not trying to make cheats here - trying to understand just what all is possible to change/affect from serverside
It just so happens that the one thing I can think of as a workaround would likely be seen as a "cheat"
no, there is very little security in b41 mp
be aware you should expect most things to move to the server in b42 mp - very few mods designed for b41 mp will still work
local function SaltyTraitChanges()
local Hondy = TraitFactory.getTrait("Handy")
Hondy:addXPBoost(Perks.SmallBlunt, 1);
Hondy:setDescription(getText("UI_trait_handydesc"))
BaseGameCharacterDetails.SetTraitDescription(Hondy)
local Engiheer = ProfessionFactory.getProfession("engineer")
Engiheer:addXPBoost(Perks.Maintenance, 1);
Engiheer:setDescription(getText("UI_profdesc_engineer"))
BaseGameCharacterDetails.SetProfessionDescription(Engiheer)
end
Events.OnGameBoot.Add(SaltyTraitChanges);```
Translates properly ππ
I don't expect a lot of security in B42 multiplayer either - it's a big piece of work to make a secure multiplayer game, and means loading more onto the server instead of trusting the clients.
For anyone using the search feature in the future looking for a way to modify traits or skills with lua.
This script modifies a trait and a profession without overwriting anything π
Limited anti-cheat to catch some blatent abuses is likely the best Zomboid will ever get.... and a bunch of that will need to get turned off for various mods anyway.
Best moderation is self moderation!
Don't be a cheating loser outside of singleplayer or friend groups :)
But even really basic stuff like you can't stop the client spawning items because the client spawns items every time you take a battery out of a torch or reload a pistol.
from what i can speculate from reading the b42 code, much of which has been restructued for multiplayer but of course the multiplayer code itself is removed, a huge amount of stuff has been moved to the server
Yeah, self moderation is the best for an indie game.
all items will be handled on the server
this is something we know for a fact
Also, I think the learning curve keeps a lot of griefers away.
nice, that's a good change
Makes the experienced ones even worse. Cuz it acts like a filter
I asked before but well it's been quite a few hours and maybe there are other people. I would like to use the map functions to write/put symbols in a flayer/png/custom image, do you know if there is a way? Either make a map and actually the map is a custom png or do it by adding to a flyer the overlays of the map. I tried before with both ways and I couldn't, but I'm very novice so idk
this however is absolutely true
whitelisting and moderation is the only viable way to keep a pz server genuinely secure
Even then, be aware what's in the mods you download. Could be a backdoor lurking.
That's a bit much to ask from the average player, but server owners should be more thoughtful about it
lol battery licker!
i reported the most insane possible security exploit a couple months back so i genuinely would not be surprised if there is other scary shit mods can do
Chuckleberry Finn may have an answer
https://steamcommunity.com/sharedfiles/filedetails/?id=3155647614
Prank your friends by licking their flashlight batteries when they aren't looking
I should re-record with out music playing so I can add that to the mod's morkshop page.
wow, ty
Hey guys, any idea why engineer can't craft aerosol bombs or pipe bombs even though they're in the listed recipes they're supposed to know?
yeah there's a lot of instances of this currently
Gotta love it
blacksmiths had a typo in every single recipe they have iirc
it's in the upcoming patch notes so you'll just have to wait for them to fix it
Does anybody know how custom context options are supposed to be connected to a function?
I mean I can just patch it for now, no?
when is the new patch supposed to drop?
who knows
so 2026, gotcha
I've finally updated my guitar mods for b42... those changes were a pain, but inspired me to do better π
Please check out... and thanks for the help along the way... this community rocks!
https://steamcommunity.com/sharedfiles/filedetails/?id=3410972667
https://steamcommunity.com/sharedfiles/filedetails/?id=3410974338
try putting mod.info outside of the 42/common folders
doesnt work still
for me I had to keep the mod.info at the root of the mod, and also add it to common folder (I'm targeting compatibility for B41 and B42)
here's an example: ```local doDIYContextMenu = function(playerNum, context, items)
print("##### doDIYContextMenu()")
local primaryItem = items[1]
if not instanceof(primaryItem, "InventoryItem") then
primaryItem = primaryItem.items[1]
end
if primaryItem:hasTag("DIYSchematic") then
print("##### It's a DIY Scematic")
local playerObj = getSpecificPlayer(playerNum)
readOption = context:addOption(getText("ContextMenu_ReadDIY"), items, DIYonLiteratureItems, playerObj);
end
end
Events.OnFillInventoryObjectContextMenu.Add(doDIYContextMenu)```
You add your function to the OnFillInventoryObjectContextMenu event, it checks if the item is the one you care about, if it is then it calls context:addOption() to add an option.
dear god is that ai generated "pixel" "art"
that's so cursed
it has like inconsistent pixel size
some areas are just completely smooth
utterly cursed.
It matches the quality of the mod's code.
Everytime I see an update on the battery-licker mod it makes me giggle
The workaround for geting rid of the charge from the battery tooltip is so stupid.... but it works.
Like a magician doing slight of hand... I swap the real batter for a fake one, let java make the tooltip, then swap them back.
The accessor function is so I can create one fake battery and re-use it over and over, since I suspect making and destroying items every frame would be bad for performnce.
little weird question here, is there any way to update my workshop mod but not thru zomboid?
like via web or something..? I can't use steam at my work but i want to update.. :/
You can edit the description on the Steam website
I'm sure there are API calls that will technically allow you to update without using the game, but in practical terms I don't think you can.

you can upload through steamcmd but the structure is different
I mean you can just wait few hours until back home? xd
I just found a single typo, made me like: 
I found the solution at the same time you sent me this and I realized I forgot a singular parameter
1 hour of search for a missing parameter
@white briar re. #1318920979581501502 message: That thread isn't for requesting mods; it's for modders to request stuff from the developers for modding purposes. There's a community modding discord where people accept commissions (and maybe ideas?), though
Can someone help me with smthin?
Sorry about that.
No worries
Im trying to add new furniture into the game, but i donβt know how to work with TileZ to make it. Does anyone know how to use it? I have the textures and code so all youβll do is implement them as new tiles thro the program.
or whatever the name of the PZ modding tool used for that purpose
add your tilesheets to the tileset (toos>tileset), make sure they are in the correct folder (2x and also a folder outside of that). then go to Tools>packfile>create pack, and create the pack file directory in the top bar, and then the + to give the directory for the tilesets (point it to the folder outside of the 2x folder, put your tilesheet png in there), then create the packfile.
You will also need to add tileDefinitions, so go to Tools>tileset>tile properties and create a file, then add your tilesets from the list that should show. this will show all your tiles, you just need to pair them up and set their properties.
there's a youtube tutorial (by daddydirk i think) that goes through this
Today I created and uploaded my first mod to the workshop, I subscribed to it but it doesn't appear in my list of mods in the zomboid project, does anyone know if because I am the creator I can't use it that way and I have to use it directly in the mods folder of my game?
Just checking, because its always the first thing to check. Are YOU on build 41?
Yeah the build 41
Np. First checkbox checked π
Hmmm
Nothing is downloading.
It MIGHT be an issue with steam at this moment.
I use this mod donwolader to see if theres files and downloaded all correctly
well i wait tomorrow to see if works, thank u so much for ur time
It won't let me download other mods either. I don't think its your mod lol.
That's good, for me at least
Ok, I'm working on a mod to add special ammo types (HP, AP, HEI, Breaching Rounds, etc.). So far everything is going well, other than one little issue.
Anyone have any idea how to force the tooltip for a weapon to update? The type on the weapon HAS CHANGED. Reloading uses the changed types, debugging on firing and on hit verify that the weapon is using the new ammo type, but the tooltip doesn't reflect that. Is the tooltip based on the script item and not the item instance?
I tried the following with no results:
- syncHandWeaponFields(character, weapon)
- and I tried update() as inherited from inventoryItem
Just got my mod on server for testing, I'm getting this error at line 99, thoughts?
ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: 1.0 of non-table: null at KahluaThread.tableget line:1689.
PlayerToAdd doesn't come from anywhere, you probably meant PlayerArray
also for arraylists make sure to loop from 0 to size() - 1, not 1 to size()
does anyone know if findandreturn works on fluids other than water?
lmAO ty
and you should index them with :get(i) not [i]
but if I have it go from 1 to 1 (IE there is one person online) then it should only fire once for that player no?
the issue is these count from zero, so it should be zero to zero
like arrayList:get(0) returns the first element in the array list, :get(1) would be the second element
that's true but that array isn't a lua object
PlayerArray:get(i) ?
yeah
ty T_T mfw I realize I was using a made up variable for literally 90% of this because i coded this at 4 am lmao
not that it was the only issue but smh would be nice if i didnt do that
love the ears, Albion
try syncHandWeaponFields(character, gun)
Not sure if it will help, but I saw that a in a few places in reload code after changes were made to a weapon
that's for networking, it shouldn't actually do anything in singleplayer (one of the reasons i mention occasionally that i believe b41 mods will not work at all in b42 mp)
does this look inherently wrong? the :get is making me second guess it, table.remove should return the instance (I'm trying to transfer it from one table to another, I know that there are more optimized ways of doing it with better algorithms but I'm just trying to get it working first lol)
Yeah, when I looked into the decompiled Java for syncHandWeaponFields it was all packet data transfers.
i'm mostly guessing what you're trying to do here but you may want table.insert(PlayersToAdd, PlayerArray:get(PlayerTempNumber))
you can remove from the arraylist but i wouldn't recommend doing that as i'm not sure if it's a copy or not, and if it's not you're messing up some internals
i am intending to remove it from that array, then move it to the other one
as I do not want to repeat players in the playerstoadd
and since you said this I'm assuming that the first instance would be 0 (IE playertempnumber = 0 would mean the first person in the array)
Since I have the decompiled code for tooltips handy - (from B41 but probably didn't change) - DoToolTip is using getAmmoType() on the live item.
ty albion the goat π
yeah, i'm looking in b42 and they do the same kind of caching there
what does print(getPlayer():getPrimaryHandItem():getAmmoType()) show?
i can't see any way to reset this
it seems like it should be impossible for that text to change after the tooltip has rendered once
Ok, it might just be easier for me to make several dummy guns to swap back and forth.
Copy the durability etc.
Does the whole tooltip get cached, or just that specific line? Because you might be able to force an update with something like gun:setCondition(gun:getCondition())
the problem here is this.bulletName
the first time it draws the tooltip it'll assign that and then never change it because it's already assigned
You'll likely hate that when you want to make a change/recipe/attachment/etc and there are 5 types of every gun
Or you add somthing else that can be changed and need 25 of every weapon to cover both choices.
And then one day...
And I've already discovered there is no way to get "MountOn" from attachments, so I can't dynamically add the new wepons to the attachments.
Omg, wow.
setCondition totally worked.
Isn't there getMountOn and setMountOn?
I remember I tried this once
print(part:getMountOn())
and it returned like
[Base.Shotgun, Base.Pistol, Base.AssualtRifle, Base.AssualtRifle2]
as arraylist
I can test here real quick lol
local MountOn_ArrayList = part:getMountOn()
print("First: " .. MountOn_ArrayList)
MountOn_ArrayList:add("Base.NailGun")
print("Second: " .. MountOn_ArrayList)
First: [Base.Pistol, Base.Shotgun]
Second: [Base.Pistol, Base.Shotgun, Base.NailGun]
I didn't go further than that because I wanted to see only if i can add something in arrayrist
and it worked, maybe 1weeks ago?
the script doesn't have this but you can get it with field access and add to it
this is in my lua shared NPCs folder... I don't think my trait is being initialized cause I'm getting null errors when trying to determine if a player has a trait [by this ID]
what am I missing ?_?
(I also have trait_PreyTrait.png in the ui Traits folder)
I'm probably smoothbraining why I stopped trying to change MountOn that way, aside from that @silent zealot idea totally worked.
this is what I've used in my other mod im working on to init the traits (and it has worked in that mod...)
Now time to go hunt through mods and search the post history to figure out how to save item data lol.
Okay but I find it hard to believe that just because it's illegal would automatically mean a professional farmer wouldn't know what season it grows in.
Hotwiring cars ain't exactly legal either. lol
yeah I also take issue with that.
An electrician, engineer, and mechanic have no concept of hotwiring a car's ignition
but a random burglar does?
π€¨
I mean, its a vocational skill for nocturnal vehicle aquisition technicians.
I feel like at minimum the mechanic would understand how to do that
Can rebuild an entire car, ship of theseus style. Can't connect the ingition to the power.
Need an engineer for that, clearly
π
But it's things where they maybe haven't done it before.
Growing hemp, and hotwiring a car
but surely though they would understand it??
Like maybe the mechanic knows how, but needs to gain a level in electrical first to utilize it?
I think I'm right. HitChance in build 42 still matters, effectively making the aiming system similar to build 41 with extra steps. I checked with a mod that increased the chance to hit a zombie, and by the looks of it, the HitChance field still plays a role in whether or not you actually hit the zombie that you're shooting at
Like I know the basics of making a gun, but I'm sure if I tried to wing it the thing would blow up in my hand due to an oversight
Again, this is likely going to be changed to something else in the near future (like the whole damage chance where a hit is guaranteed but whether or not you do damage is still RNG), but its still an interesting find
A mechanic with no experience in electrical should know it's possible.
whereas the average person with no car knowledge might not even know it's an option to begin with.
idk man this is the same game that makes pipe bombs deal like no damage at point blank and sets stuff on fire..
I heard all Hit-Chance will be changed into Damage-Chance
That's correct as well
In the end, it's still mainly RNG-based
and in my opinion, I like it that way
I love shoving the barrel of my gun into the mouth of a zombie and the zombie channels their ultra instinct to dodge it.
yeah and it's acceptable since head shot will give more damage while hand shot will give less damage.
That's 100% a bug
I installed this mod called Point Blank that instakills a zombie if you shoot it when its incredibly close to you (like 1 tile away I think)
I know, just funny cuz it's cause by the rng I'm pretty sure.
At least partially
So it "fixes" this bug (and to prevent aiming skill abuse, it lowers the amount of XP you get significantly)
I don't like that our characters are so inherently bad at aiming
Humans are ranged hunters naturally, we evolved to kill things with projectiles
Our anatomy is literally designed for it
A lot of people won't be great at it at first, but they would not miss as much as we do in game.
Don't forget that this is aiming with a firearm
We shoot like toddlers
Yes but the concept of lining up your arm with your target still crosses over at least partially
Aiming level 0 is the equivalent of never picking up a gun, nor knowing anything about how a gun should be handled in the slightest
Although the next patch will fix this
I think most people picking up a gun would hit a human sized target 2 arm lengths away
Hell, even down a hallway
Every time you shoot at a zombie, it will hit, except whether or not you actually do damage to it is up to RNG
So you'll still stun the zombie and make it stagger for a bit
So I think the next patch will make it more "realistic"
as in
you can actually hit a target
Also are there any plans to make projectiles like molotovs and various grenades not so damn slow?
Like half the time it just hovers in the air
whether or not the bullet i shot actually connects with a vital part of their system is a different story
because, again, level 0 aiming means i've never held nor handled a gun in my life
If you aim straight at the ground outside, the grenade will just hover in place for a bit
yeah they're well aware the throwing system is hilarious
You aim at the ground in a room, explodes almost immediately
Although I 100% recommend this mod
This will save your ass
Many many times
Yep! That mod
I wish your poor aiming skill was better displayed with your animations, or possibly having the crosshair itself shake to make it harder for you to aim it yourself
leaving it up to a number generator just feels unfair
Optionally, you can configure the mod to simply increase the damage of the shot rather than just instakill the zombie (if that's what you'd prefer)
I think the crosshair shaking but being more accurate than the current rng based system would be nice, and could reward player skill
Like the player skill would almost be like your character's inherent talent, being able to overcome a lack of skill with intuition
Just seems silly to aim directly at something, and then roll low on a die and so it just shoots into the sun or something
This is a fair flaw with the system, yes
Although I think the next patch solves it
I hope so, I hate it when player action becomes heavily disjointed due to your character's skill
Stuff like that works fine for text based or tabletop where you're roleplaying
but when you're actively denying a player's action, that they are literally watching themself do. It just feels frustrating
Having the character's bad aim be displayed in a game mechanic would feel less cheaty
This would also be able to be used for other things that affect player aim.
Like panic/anxiety
Imagine a straight shooter gun build who forgot to smoke, aiming dead on their target. The bullet just evaporates because they're too anxious.
how would I get the traits of the player to remove it?
[this is on the client] [the self reference does not work, but im pretty sure the getplayer returns the isoplayer... so maybe the isoplayer.character?]
I'm repeating myself a lot, idk if I need more caffeine or less
have you played abiotic factor? they use aim shake to represent skill instead of inaccuracy and i find it turns out kind of annoying
No I haven't, but that seems to be an fps. I feel like the mechanic would translate differently due to it being isometric third person
I could easily be wrong of course.
I'm not a game dev, so it's not unlikely that a shake mechanic wouldn't work well.
I would still prefer a mechanic that represents the inaccuracy in some way that isn't just a dice roll, and has some player involvement
what is self here
getPlayer():getTraits():remove(TraitType) will work
ty ty (I'm trying that rn actually lol re-checked the isoplayer docs)
Any way to remove the ability to craft with an item without swapping it out with a duplicate custom item?
Someone also needs to find a way to change item textures in-game lol
Being able to just change the texture of a weapon when painting it vs. having one copy pasted weapon per color
Edit every recipe that uses it?
Most normal Zomboid player character
Hello,
Is there anyone that can explain to me how to merge multiple mods ID on the same Workshop ID? I see some modders doing that like AuthenticZ
Edit. I created a hotfix for a older mod and I'd like to make other versions with different balances for different tastes, but I'd like to merge all under the same Workshop ID instead of creating many different mods on workshop
Do you mean this?
Whythe translate didn't work
Say(getText("UI_ElectricWeapon_Mode_On"))
Yes!! exactly
thanks
mods/myMod_Core/media/...
mods/myMod_Fix/media/...
mods/myMod_Misc/media/...
all you need is different MOD IDs in mod.info files for each folders.
I tried this and the mods are exactly the same but some tweaks for easier or harder, I create 2 folders with different names on mods/mod1
mods/mod2
Then both mod.info inside respective mods have different IDs and the game is crashing once I load the second mod
Does your mod list show both mod1 and mod2 but you can't load your mod2?
Yes, it shows both, and the mod2 is crashing the game, I am trying to reinstall the game again just to be sure
Honestly is just a mod for my server, we downloaded a mod that had a bug and we fixed the bug, so I wanted to upload so the server can download directly from the workshop, and then we thought about of nerfing the mod, but I want to keep both version and if possible under the same workshop number
then i guess it's different problem? idk if i was you, i'd test with only mod2 and see if it's okay
(remove mod1 completely)
The game crashes when I open the game in debug mode
So I figured out, my game had a API requirement for the mod to run but I accidently disabled and the game was crashing with both mods, it's verry silly I know, I am not a modder tho, thanks a lot for your help
Anyone done posters? I have recently learned Melee weapons and helmets but now I would like to learn posters as well if anyone could get in touch and help plz lmk
By posters you mean fliers ?
i was told that there shouldn't be any spaces in crafting recipe names in b42, how do i separate words then?
_
Underscore
Always
Spaces are usually defined with underscores
oh ok thanks!
one more thing, would it be overly complicated to have corresponding icons in the crafting menu in b42? like i have an item with 2 texture choices, 2 recipes with getTexture lua, but they both have the same icon in the crafting window
if you mean the ingame items
https://pzwiki.net/wiki/How_to_make_a_flier_mod
Wdym by corresponding icons ?
Now like posters you put on the wall
@winter bolt
Do they have the same icon when in your inventory?
nah i mean in the crafting icon, both red black and white versions are using the same icon
only after you craft them they are using the proper one
you might have to check some poster mods to see how they did it. i dont think i've seen many people talk about poster mods like that here
Do you know how can I add a description for the item of my mod, so people can know how it works when hovering over?
To the tooltip?
Yes
Easiest way is the Starlit API, it has an easy-to-use function to add stuff to tooltips.
You can also just put what people need to know in the mod description.
"use a turbo encarbulator by right clicking it and select "embiggen" from the context menu"
I see, because I see some mods like snake's modpack where they have some sort of instruction when you hover over, didnt think would be that complex for a dummy like me
I thought would be just an extra line on the item code using item tweaker API
The Starlit library is easy - the second link I posted has an example of adding to a tooltip
You just copypaste that into your mod, change the item name and change what you want to add.
I see, interesting seems like an option
then make Starlit a dpendency. If you want to avoid that... tooltips are not fun to work with. You can see how Albion to them in Starlit with horrible (but perfectly functional) hack, and for Authentic 1990s Battery Charge Detection to remove the charge meter on batteries I ended up making a whole new FakeBattery object that doesn't hold a charge and I quickly swap that in when a tooltip is being made then put back the original item after.
Awesome, I will see if it's viable to do, because it's many items
Lucky for you computers are good at repetative work.
set up a table with the item names and text to add, then the tooltip function just looks at the item type and pulls out the needed text.
I wonder how this works to have small description like on the snakes mod
seems even more complex than using starlit
isnt this just a tooltip
Not sure, but how could I add something simple like this on a item mod
Do you guys know if there is a way to remove occupations entirely, or organize ones you add instead of the modded occupations being at the bottom?
ToolTip = Tooltip_YourToolTipTranslationHere,
Is there mod for B41 where you can change weapon damage ?.
lol it worked perfectly, thanks a lot
Yea there is one I believe, it allows you to change stats of a weapon. I might be getting it confused with debug mode though. Ive just returned from a long PZ absence
hi! do you know which person that was, or where i can find this program?
i have no idea who it was, i dont think they ever released it
bruh moment π
allright thanks for the response
@sour island how long did you ban me from pz modding discord? π π
b41: is there an easy way to hide a recipe from the context menu without hiding it from the crafting menu?
So I looked at my mods and you might be able to do it in Necro Forge 2.9b (717015179)
Big thanks !
Is it easy to add a funcion like a trait into a item, for example, adding the trait dextrous to a backpack when equipped?
is it possible to read the world environment from lua? i want to scan a x by x area to check if it contains some specific piece of furniture
This part of the UI is it scalable or is this a TBD feature?
Look like they are all created in lua\client\ISUI\ISEquippedItem.lua
At a guess that was made for the top two icons and they just added everything else to it.
There' s no neat "scale" parameter though.
A tile basically
Thanks, It was mostly for my sanity I couldve sworn they were bigger before and Ive spent way to long in the options looking for something.
I had asked in another channel to no avail, its my first day back to playing/tinkering with PZ and I had forgotten that any place besides this channel could be a cess pool sometimes
whats zomboid tps
allright thanks
if i print() in lua, where does it show? (where can i find the printed text)
For ERPing elder abuse with our AI-Granny-Spiffo? Forever??
i got carried away trying to mess around breaking the bot and it was not my intention to make it erp and i understand why i got banned but uh could you shorten it to like a week or 2
ill never interact with the bots again i promise i will be a very upstanding citizen π π
You could have stopped a few messages in, this is also not the place to ask.
where should i ask? i stopped the moment i saw it actually went along with my suggestive vegetable consuming requests
Let's not forget you tried to feed it some racist crap too
What discord are you guys talking about?
There's another PZ modding discord? What a way to find out.
Straight up
lol
You were warned several times, it was off-putting
i remember getting a verbal "dont do it please" like twice
but i got carried away and thats 100% my fault lol
im asking for humble forgiveness here and idm if you guys say no
Thanks, I wasnt sure if it was like an invite only kinda thing
It is
I mean
It's open
If that's what you meant
It's a public modding Discord for PZ where we share much more resources and have better categories for modding
you can come back but you won't be able to use the bot for now
i appreciate it a lot, i wasnt planning on using the bot again anyways after all this π«‘
Naw I ment like private society kind of thing. I wasnt aware of this exsisting but looking at the date of when it was that link was posted it was right after I stopped tinkering and playing PZ like a full time job
It's linked on the wiki too
Tho the wiki has been updated only recently
So people don't automatically go to it
And a lot of people think this channel is basically the main place for modding
But when you get to technical stuff I find the non-official Discord way better, which is why I'm more active there now
I havent been around in a hot minute back when this was the main spot, im still refamilarizing myself with whats new with the game/community
Here tends to be recurring questions about the same stuff over and over imo
I only tended to be active here because of shared interests and I find this channel conversations to be a little more...comprehensive. If thats a whole server like here then ill probably start hanging out there instead.
There are also channels for every facet of modding, and we have a weekly discord-broadcast event (messages get sent to participating discord) for user generated mod suggestions.
Also, a commission board- neither of which (I assumed) TIS would want to risk facilitating here.
I'd also like to do another modJam π the last one didn't pop off as much as Id like
Yea straight up. This is a good first line of defense but its where everyone comes too and this server can get quite noisey. Its nice now theres a spot where all the information and people for modding/dev have congregated
Oeuf a jam...im gonna have to brush up and knock the rust off.
Havent done a jam in a super hot minute
There's none planned rn
Thank god π
Now that B42 is out maybe there's a theme that could stand out
we kind of kicked around the idea of having a partner based event
Slice of life
Its more doable with the new skills and end game mechanics
Or something horror. The light propagation was honestly my most hyped new feature and it didnt let down at all.
That's a good point - and Jvla has been working in new features to his Forge API
Ive done a few game jams in my time so I got couple of good ideas left to bring to the table π
You could do a poll of the greater pz community here to see what new feature they like the most and try to find a theme to build off on to do the jam on.
which one lol
hello I just started pz modding and I would like to learn via a doc or something, and if you can tell me how to increase the sickness of a player thanks a lot 
Oh to make custom zombies you mean ?
Any character stat you want to manipulate do it in debug
via a mods
I thought you updated it? I saw it on SS
Yeah I think people would be interested in creative custom zombies
if your just starting off modding then familiarize yourself with the debug side of the game youll be in there a lot
The wiki has been updated, and has a getting started guide
I'm already in debug, but how to add sickness via code
thanks a lot !!
im sure the others have more precise information to documentation on hand
if you click the pinned button on the workshop shop channels it will show you pinned posts with relevant links and important information to help you get started.
I did yea
Yea but my job is just to document it
Once I document it, sure we can make it a thing
I completely rewrote the framework for B42 to take into account the various improvements
And I improved it by a massive amount just by having that OnZombieCreate event
Is the current state of the documentation for it public?
I got more planned, like Bandit does to override the control of zombies
There isn't much doc for it rn
I have the doc for B41 version, and even then I really didn't put the work needed for it
It's very easy to use tho, simply check out TLOU Infected to see how I use it
I actually saw that mod today, havent checked it out though but have it in my pile of mod references scour through it. (only saw it today as it was my first time going through all the 42 mods since launch)
I knew once 42 dropped the flood gate for these types of mods were going to burst
The mod already existed for B41
I had already made it before
But B42 brought me one or two tools to improve it a lot
And I myself learned a lot
So rewrote it with all my new knowledge, and since I had already done the work on understanding how to do things I didn't lose my time on it, while the first time I developed it it took me a while
If May 17th was the date you dropped it for 41 then thats why its so new and fresh to me. I was on a PZ sabbatical
Guys, where in the wiki i can find info about overriding vanilla gear stats? I cant seem to find. (I want it to because i want to disable the overriding that a mod a does)
hi, idk if this is the correct place to ask this, but maybe someone here has experience with making such mods and could provide help
I'm trying to make a true music addon using the true music b42 mod
I'm guessing it works because there is a lot of such mods popping up in the workshop. I've tried loading it by itself, and it seems to work , as I can find the new items in the debug item list
But it's not working correctly for me? Specifically, when I load my custom true music addong alongside ture music b42, it "unloads" , because the new items or cassettes are just not present, even in the debug item list, does anyone know why could this happen?
oh and I just noticed that all the item categories in the debug item list disappear too.. does it unload all of my mods?? why would it do that
Check your debug.log, it might give you hints
Hey guys! Finally made video showing my Project Zomboid server manager! https://youtu.be/lfyC6VQr0XU this is the next update Mod Manager π any feedback be great β€οΈ
Hello everyone,
Iβve spent the past six months developing the Modix game server panel to compete with Pterodactyl and TCAdmin, all without costing a penny and with bringing features no other game server has yet. Much more on the way! and it's all free unlike other panels.
MODIX β GAME SERVER MANAGER BY OV3RLORD
Modix is my personal project, b...
thanks, no idea why it was doing this, but I managed to fix it.
for some reason, when loading the mod, it referred to the path /home/sidoka/Zomboid/mods/home/sidoka/Zomboid/Workshop/mymod instead of the correct one /home/sidoka/Zomboid/Workshop/mymod, which, I guess, forced it to unload all the mods due to a path mismatch, or smth, I dunno
point is, I uploaded the mod to steam workshop and subscribed to it, and then removed the mod files from the Zomboid/Workshop folder. After doing this, it actually loaded fine without errors
If you really want to do just that what you could do is make a local copy of the mod go into its code and change it and remove the workshop version from your save
Because youve made a mistake somehwere. It doesn't 'unload' what happens is that something in the mod like the lua or the javascript crashed in a way that the game probaly ejected the mod entirely from the compiler to avoid crashing all together.
Most likley its a null reference pointer or a conflict
only in the inventory can work
Java, not JavaScript. We're fortunate enough to not live in the reality in which PZ is JavaScript (not a js hater like many are, but the thought of that is nightmarish)
Thank you for the correction. This PZ troubleshooting my own thing is fatiguing me.
Question relating to fileGuidTable, do I need to include the entire base guid table with my additions? I noticed it in Authentic Z it basically starts with base games Guid then below starts adding their custom clothing.
But if its a matter of the mod overwriting the entire table how do different clothes mods remain compatible with each other? π
Wtf AZ does that ?
Hell no never do that
if you're adding outfits, you need to include the guid for every vanilla item you use in the fileguidtable
Ooh
Oh if you touch a Vanilla item? Guess that makes sense. But yeah AZ seems to do that. Granted maybe they have a reason for it but I never dived into much of AZ other than getting it for the miniskirts lol.
Hello, I'm new to modding here, where do you find the "Events" Lua / Listener/ Broadcaster ?
they're detailed here https://github.com/demiurgeQuantified/PZEventDoc/blob/develop/docs/Events.md
no if you even just use a vanilla item in a modded outfit the vanilla item has to be in the mod's fileguidtable for some reason
otherwise the zombie will just be naked
Oh... So thats what it was, just weird that I can't find it after digging the entire Lua File, Thanks
I'd really like that we push to share the wiki, so it becomes an habit to modders to check the wiki for some info or resources on the subject
The wiki is good for not saying the same thing over and over again.
in this case they just contain the same information anyway
I do hope to improve it further, add new stuff, got a few bits planned but some of these I still need to learn how to do, like UI I hope to do that one day but I don't know much I need to fuck around with it, and timed action which I know well enough to be able to write something about it.
However my main goal is to actually have people share it so it becomes a centralized documentation that anyone can add to, but even more importantly is to actually have modders start documenting on it
Your guide is even linked at the end anyway but if you think your guide is worth more sharing than the wiki I'm interested to know why because this kind of limits this effort of pushing modders to actually have a general documentation that every modders contribute to
I've explained it already and already debated it, but this separation of guides and plateforms to write guides on, different gits etc is just making documentation for modding terrible
Everyone's fighting to repeat the same shit over and over, like Star said
Like cool you have this guide that talks about that, this guide that talks about that but at the end of the day all keep repeating the same shit over and over
i just don't really see copy pasting existing reliable resources onto the wiki as consolidation, imo it's further fragmentation
Yea no shit bcs no one's working on it besides me and maybe Chris who did some few bits etc
ANYONE can modify the pages
Such a loss of time to have everyone do their own guides for modding and shit
how so
idk about other resources, but i only created resources that didn't exist yet
Tell me, which guide do I share
https://github.com/MrBounty/PZ-Mod---Doc
https://github.com/demiurgeQuantified/PZEventDoc
https://github.com/FWolfe/Zomboid-Modding-Guide
and there's probably others here, that's only the ones I got stared
How many guides do people need to read to learn something new ?
Seriously
Yeah, and no one can participate
you guys got any tips for starting to make pz mods? ive made a couple of mods for some other games but im really lost when it comes to pz lol
all of them? they all share different and useful information
perfect timing lol
You're the one maintaining it ? If anyone does a pull request you need to accept it ?
that's correct
however should i disappear it is completely possible for anyone to fork it
Then that's not open, I'm sorry but that's not an open project. What if you disagree with someone wanting to add info about something, you're the one blocking the roads to the documentation
On the wiki, anyone can add on to stuff, and if we don't agree, we're forced to discuss to coexist
And then people end up sharing YOUR original guide
"Oh sorry you got the old link ? Nah you need to check the N fork for the up to date guide"
If you're not fine the wiki, tell me about it so I can work on solutions
When you mod in items like helmets and melee weapons is there anything i have to do to make sure they spawn in the world or have the chance too
it depends what you want to make but this is a good place to start
https://pzwiki.net/wiki/Modding
mainly general qol mods maybe some weapons/vehicles etc, ill read up on this really quick
you have to insert them into the distribution tables
https://pzwiki.net/wiki/Procedural_distributions#How_to_add_your_own_items_to_distributions
I'm trying to push community effort in documenting and I don't want to have to constantly fight modders who are already big in documentation stuff to push for a global sharing of documentation that can be modified by everyone without forced limitations and leadership. That's why I didn't want to force myself onto the leader slot when I first started to look at the wiki and how we can actually use it for modding, because I'm not YOUR chief on what should be or not on the wiki. I just want to push easier documentation available for every new and older modders + it's an official website for PZ, what do you need more
If something is not right to you with the wiki rn, please tell me
Please really tell me what you need if you do need something to start getting on the wiki
Or tell me what you think we should do completely differently
i haven't done anything to oppose the efforts of the wiki
i've contributed to it myself and i let you use the events data collected and maintained almost exclusively by me over the last two years
i just sent a link to a resource that answered a question and you got mad at me
I know you're not opposed by it, you've accepted to help me more than one time to clarify stuff. But I'm really trying to push to use the wiki and you just never link it when it comes to event, so I just don't get why
You've mentioned "fragmentation" of documentation but if you accept to help the wiki to develop good documentation for modding, don't you think doing that is exactly "fragmentation" ?
So it just felt like you don't consider the wiki the go-to in a way and if you think that's because of how it's presented or stuff, i'd rather you tell me
Anyway sorry I'm not mad, just confused
there's nothing to my knowledge wrong with the wiki version
Is there a way to make it so explosives deal more damage to players? feels weird to have the pipe bomb I'm editing instakill zombies but the player can just face tank it and walk away with a few scratches
there's probably a better way than this but there is an event when they explode so you could check if they're in range and fuck them up
Maybe also detect when they take damage probably
I think there's an event that gives the type of damage
Also I just remembered I forgot to update the formating for that one on the wiki
Yeaaa that one lol
I'll fix it
how many pipe bombs have you throw ?
wdym
I know this exchange is over, but fwiw: I agree that just having the same info on the wiki isn't all that useful & I think it'd make more sense to just link to albion's event doc on GitHub (perhaps too late, since there's already multiple event pages). If there's a worry of it disappearing, it can always be archivedβit's not uncommon to see references on Wikipedia, for example, include a live link as well as an archive link
omfg
cuz the other alternative would be to not have anything in outputs and have the onCreate put the easter egg in their inventory
It is not a point that is true, but I understand that you're saying it's not as easy to do so
Again and again and again and again and again, always people doing things on their side, yea it's github and what if you disappear or disagree with people, no cooperation, no communication
That's just my two cents anyway, not trying to put down the wiki. I think your work there will be helpful
I'm just talking about events in particular
If we keep this argument, no pages on the modding Wiki makes sense to exist
Literally
Not necessarily. An events page that just explains what they are and has a list with links to further reosurces wouldn't be as duplicative
But I don't think there's really an issue with duplication anyhow
It already links Albion's guide, the wiki already links external stuff
And no one can modify albion's stuff
NO ONE
I don't know why you keep saying that but okay
always people doing things on their side, that's the number one enemy of modding documentation rn
The wiki, everyone can come and add to it, there is no ownership of stuff
I've started modding start of 2024, came into here trying to find resources, and I'm pretty sure more than a few new modders had the same experience of having to constantly ask for everything because there's never a centralized place for everything
Yeah wikis are great
Or it always involves skimming through hundreds of links that were on the main Wiki modding page
Or stuff that are left everywhere, in idfk how many channels
At least 30 channels I know of that have pinned messages with important resources
Bcs no one wants to centralized shit
Let's count together how many pinned mesages alone in this single channel exist
Now do that x30
What's a good documentation if it's not easy to find
this is a weak argument given that omar has himself contributed to both pzeventdoc and its data π
It's me, I'm no one
Yeah, and like I said, how about people you disagree with
The wiki, no one can say your shit doesn't matter, you are forced into debate with others to know how the wiki should be
I didn't really intend or desire to add fire to an argument, just gave my two cents
This doesn't seem like a productive discussion at the moment
hello is there anything to follow on how to make clothing for pz
The main problem rn is that I'd really love to have other modders put some work in documenting stuff on the wiki, bcs I'm pratically alone in it
I've seen you sharing your work & I'm sure it'll inspire others to contribute as well
I'm not an expert in every fields rn, and while I'm learning a lot to try and document stuff, it will take years
If you just starting to build and consolidate all the information for proper documentation especially something as complicated as how to code a game engine it would be better to get it all in one spot first then sift through it all to stream line it.
Its rather common in game engine documentations to see duplicates of information when looking at things.
calling it a Wiki is not doing it justice when its honestly a manual
The main problem is that there was never a community effort to even get a centralized documentation for modding
Uh
Not really
I mean sure for some few bits
The goal is to document everything that exists for modding
And yea some stuff are literal guides currently, but the goal is to just explain every bits
What's available, document stuff that exists for modding
I feel like that fits more the definition of a wiki than a manual ?
For example IsoZombie, you can do a bunch of stuff on it
https://pzwiki.net/wiki/IsoZombie
I started listing everything that's possible
And there's probably other ways, listing all the different ways is good too
I think articles like this are a great example of where the wiki can shine
Yea
Guides seem well-suited for it
Bcs each modders can be expert in a specific field
And come and tell about cool things you can do for various Java objects in this case
But that will be the case for UI stuff too for example
Timed Actions too
That's lua stuff
Later down the road, animation stuff, what could thing can you do with AnimSets
To trigger specific chain of animations for example etc
Another example
I realize after looking at that one that I didn't put the distinction in my mind into words earlier: to me, events feel more like "annotation"-type informationβsomething that'd live in type annotationsβwhereas the above is more like details on what you can do with this. So, for example, a page about events used for timing (EveryX, OnTick, OnTickEvenPaused) & their differences feels more guide-like to me
It'll be both, there will be guides yeah
We can't deny that
Bcs at the end of the day, people need a line to follow sometimes to get started, and guides that tell every steps are needed at some point
The wiki is still likely to change how things are ordered in Modding
Maybe guides should be put in their own categories
Also page names
Should we name those like that ?
Or more like this ?
Should we normalize it in a way ?
Lots of examples
Could always normalize it one way & have the others as redirects (How to make a clothing mod β redirect to "Making a clothing mod" or whatever)
But a lot of these pages are also leftovers of before stuff
i prefer it like "Custom Clothing Modding"
Hmm
i think they should start with the same word so theyre all grouped together on the page
Wdym as redirects ?
Hey all, before I reinvent the wheel, is there any pre fab code to create a table in the UI, a bit like how the inventory pane works.
I've poked around the code for the inventoryPane and inventoryPage but it obviously has worlds more functionality than I need.
Just looking for a basic table system that I can add rows and columns too to show data
Definitely
A redirect is a page that automatically sends visitors to another page, usually an article or section of an article. For example, if you type "UK" in the search box or click on the wikilink UK, you will be taken to the article United Kingdom with a note at the top of the page (or on mobile, in a black message bar at the bottom): "(Redirected fro...
Applies to mediawiki too
Ik what a redirect is but I'm not sure what you mean here
Oooh wait
Ok I think I see what you mean
And that would be amazing
But currently the wiki doesn't have much systems like that
Redirects are used for pages that were moved elsewhere
It does, but doesn't uses it that way
They can be manually added too
Yea, probably
But that depends on how the wiki should be handled
@sudden lichen might know more in detail about that
Or what can and can't be done
But that's also the reason the main Modding page exists, to easily link to existing guides
Tho it still needs a bit of cleanup imo
All you have to do is put in #REDIRECT and the page, I believe in double square* brackets
Notably at the end, I need to go through the various resources and order them
i think its mainly just to make sure old links to the page arent broken
Yea I said that exists, but it's not used the way you described it here
Redirects are pretty common on Wikipedia for linking similar terms, could be used similarly
Oh I believe you lol, but yeah that'd have to be seen with Faala who's a wiki admin
Bcs currently I don't know a single example of it used to find more easily pages
But I agree it'd be great to have that
This discussion is a sudden #pzwiki_editing collab lol
Yea
At the end of the day, we can and should work with the wiki team for the Modding wiki
And I've been working with them
To apply some standards, and proper organization
Today we've even renamed and reorganized some Lua events wiki pages/categories to clean it up a bit
I also made a summary of the changes on the wiki for December
Was looking for it lol
I asked about this earlier but it seems the answer I got didn't solve my issue, so I have those recipes here that let you craft certain items, I was told that I shouldn't use spaces in the recipe names, then how am I supposed to separate the words without the ugly _s between them? I checked the base game recipes and they just have the whole recipe name in 1 word, so i guess it's separated somewhere else?
Another question, is it possible to have different icons for crafting the same item but with different texture choice? The recipe itself uses getTexture from a lua file to pick the correct texture choice, it works for the crafted item, but it doesn't affect the crafting recipes, is it possible to somehow affect that too?
Translation files
Every recipes should link to a translation file
didn't I rework that page a bit?
could you point me to the correct game files path so i could copy the file xd?
ooh ok found it on that wiki page thanks
You probably don't want to do that lol, you're better off starting with a fresh file
I'm out of the loop, you want to redirect some pages?
i mean idk what i'm doing, gotta open the file and see before i do anything heh
Redirect in wiki are mostly for the users that search a different term
Apparently what is done on Wikipedia, is that you can more easily find pages by doing that
Yeah that's fair
when it comes to categorization, you can use different DEFAULTSORT https://meta.wikimedia.org/wiki/Help:Sorting
Other than that, yeah, pages can be renamed.
what about the other half of my question tho, any ideas? π₯Ί
No that's not the idea lol
oops, old link https://www.mediawiki.org/wiki/Help:Magic_words (search for DEFAULTSORT)
Magic words are strings of text that MediaWiki associates with a return value or function, such as time, site details, or page names. This page explains only the standard magic words; for a technical reference, see Manual:Magic words .
There are three general types of magic words:
Behavior switches: these are usually written as uppercase words ...
Like you have a "Custom Clothing Guide" and it could be found by searching "How to make custom clothings"
For example
And add many many other options I guess
Is what @frank elbow had as an idea I think if he can confirm
I think I mentioned renaming the "How to" guides? But yeah, can set up redirects too
But like I told him, currently the pz wiki doesn't do that
TIL: There is a search on the wiki lol
Or it doesn't use it that way
π
Yea, and it won't find the pages lmao
This is essentially what I had in mind
and can conveniently be accessed using / key
If you search "How to make custom clothing", it just won't find the page name I mentioned
Unless there's a specific redirect
The UX doesn't mesh with my brain, more than likely a me issue lol
These are fine, yeah. Though keep in mind that modding is pretty much the only area where any kind of guides are present (there used to be gameplay guides, but they basically had been removed as outdated; Steam serves a better place for them)
I'm sorry gonna read that last part
Unfortunately there are no templates for this, but these tables are usually scrolling lists with separately rendered borders and headers. For an example of implementation see Player Stats (client\ISUI\PlayerStats\ISPlayerStatsUI.lua) and Item List Viewer (client\ISUI\AdminPanel\ISItemsListViewer.lua).
You had already asked about that different icons thing but like before I just don't understand what you mean by it. Do you mean have variants of the crafted item ?
Generally "How to" is not what the wiki search is for, more a search engine like Google type of thing π€
But yeah, the naming of "How to" guides is something of an old name being followed. Generally pages in PZwiki are encyclopedic-like, so you have pages such as "Items" or "Scripts". One of the pages I eventually got to rename was renaming that https://pzwiki.net/w/index.php?title=List_of_Tiledefs_in_use_by_mods&redirect=no
yea i went to sleep after i asked that last time heh
i have 3 texture choices in the item, red black and white
Is the wiki properly referenced in google searches actually ?
when i craft the item using each recipe, it has the correct in-game texture, and the correct inventory icon, but in the crafting menu they all have the same 1st texture choice
Hmm
So like you'd like something that cycles through the various textures ?
In a way ?
So visually it animates with the different available icon textures ?
i'm bad at explaining stuff lol, so i have those 3 inventory icons for ankle holsters, i have recipes that let you craft each of those, but in the recipe window, they all use the same red texture, because that's the 1st texture choice in the XML
Ok I'm getting dumber than a wet cake by the minute, is there a way to implement the CraftRecipe_OnCreate Callabacks here? I Keep encountering error using the normal Events.[EventsName].Add([Func])
you can set the recipe's icon with (i think) Icon =
these callbacks aren't events, they're just the signatures for when adding a function to a recipe
e.g. in my craftrecipe OnCreate = myFunction, myFunction should be a lua function that expects these arguments
if you have umbrella then these names are the ones you can use as a type e.g.```lua
---@type CraftRecipe_OnCreate
function myFunction(recipeData, character)
...
end
Visually only
Or do you mean the craft result ?
they mean the icon that appears for the recipe in the menu
Yea
the craft result is ok, i only mean the crafting window icon
And that's what I've been saying lmao
Visually only
Not a question of result
Just have the crafting show there's different variants ?
So it could be like a cycle thing, animated gif showing every variant icons ?
no no no
this i think
i didnt think about even trying that heh, gonna see if it works
yea it does lol, that was simple xd
thank you very much !
wait what?
wait that actually works lol?
i just tried looking in the code and i thought it wasnt possible
yeah it does lol, i remember asking about that back in b41 like a year ago and i was told that it was too complicated to do or smh π
oh really wow, nice, that's some QoL fixes haha π
In case anyone ever uses the search to try and find the same info in this discord as I was working on yesterday.
Setting the "AmmoType" of a weapon and using setCondition(weapon:getCondition) to update the tool tip.
It works. But only once. Then, as Albion surmised, the tool tip is cached and cannot be set again until the game is loaded again.
I have chosen a third option. I am adding to the tooltip with an additional line noting the ammo type loaded by hooking into ISToolTipInv
one more question, where can i find the base game texture icons? are they bundled together in ProjectZomboid\media\texturepacks ?
Also, if you swap the ammotype of a weapon to a custom ammo you have created, a gun must exist that fires that ammotype via script. Otherwise, Java has no idea how that ammo type is supposed to work.
some of the new items icons are loose in media/textures but most of them are in the packs
how can i access those files?
you have to install the zomboid modding tools from the tools section of your steam library and then open tilezed and use the pack viewer tool in the top bar
i have all of the item icons ripped already if you want me to send them
you can also grab them off the wiki
oh true lol, that's even easier
Wait hold up, what do this (vvv) line do ??
---@type CraftRecipe_OnCreate
thanks yall rock!
wiki wont have the filenames though i think?
at runtime literally nothing, but if you have umbrella it tells your ide what types the parameters are (copied from the type definition, so the same information as on that page)
don't really need the names anyways, cuz i gotta recolor them for my custom colors anyway heh
theres a few other ui ones in here but it should have all the items
the other ones should all just be in media/textures
thanks!
Yoink, thank you.
How to get the weapon hit sound into mod data or get the script sound
Oh... So Basically it is like an extra documentation that write to umbrella output
ps: Instead of directly used in the game runtime?
Try lots of way but always buged
Is it possible to have scripts interacting with lua? Like lets say I want to have a mod with multiple levelup sound options, to overwrite it it's easy, you just throw
module Base
{
sound GainExperienceLevel
{
category = Player,
clip
{
file = media/sound/sound_1.wav,
}
}
}
in scripts. But is it possible to check something in game code and play different sound based on lua logic? I can't find relevant either playSoundLocal or GainExperienceLevel in lua files in pz
umbrella cant always tell what types the variables you're using are meant to be, so adding those lines lets it do stuff like autosuggest function names and tell you if youre doing something wrong
I want to like press a key then change the weapon damage and sound,make it happen in lua but the sound
literally speaking though it is a comment so doesn't affect in any way how the code actually executes
What tells you how many times your function is referenced ?
vscode, no?
you might be able to intercept the default levelup sound by adding a function to the LevelPerk event and then stopping the GainExperienceLevel sound from playing
and then you can run whatever code you need to do and play your own sound scripts
one more question, so in that recipes LUA i gotta just start the file with: RecipesEN { drop my Recipe_blablabla,'s close with } and i'm good?
Kind of yes
these are my global lua settings, umbrella automatically changes some other things that aren't as subjective
like it's not going to overwrite anything in the base files if i have a different name for that file right
You need to have this naming
It's forced
That's why prefix are listed on the wiki that way
Because you NEED to use the right file naming
(actually do we have to? @bronze yoke)
yes
Alright good to know
i dont really get what you mean here, can i have my translation file named "Recipes_Evil_EN" ?
No
You're forced in using Recipe_EN
And that won't cause problems
but isn't that going to overwrite the base game file with all the recipes?
It will cause problems if you don't name it that way
translation files aren't loaded through the virtual filesystem so they won't override each other
if you name your file differently it won't load at all
Do script files override each other ?
yes
oh ok so i just name it the same and only type in my translation names and that'll work fine?
Arent events handled in java?
I don't see a definition for LevelPerk event anywhere in game files
I did this before,but I still want to switch the sound to what I want or original one by press a key or something like this
Events.LevelPerk.Add(YourFunction)
Yea except that is adding to event
not changing default behavior that happens when players levels up the skill which plays the sound
yeah its not possible to change it so you have to just stop the sound from playing and then replace it with your own
what they mean is you can most likely just stop the already playing sound on that event
oh wait so practically the game never really call the said function, and it is just used to document the parameter?
player:getEmitter():stopSoundByName("GainExperienceLevel")
might work but for some reason stopSoundLocal() doesnt let you use a string
That looks quite useful from a first glance at the result of changing to these settings
I haven't found a single relevant hit on GainExperienceLevel or levelup in game files that's why I'm confused 
I never actually fucked with the settings of lua in vscode
its hardcoded in the java
You can change the level up sound tho
Yea I know it's possible
you could also replace the sound script with one that doesn't actually have a clip so it doesn't play anything
and then just play whatever you want on the event
wait this is it lmao
ive even done that before and didnt even think of it π
But how to replace itemβs script sound like hit sound name in lua
Existing items ?
DoParam
To clarify: DoParam is like editing the script file, if you want to change one specific instance of an item while playing you need to get the item as a variable and use whatever methods it has to change it.
Since I saw mention of press a key/change damage and sound in the chat.
Here's an example of me simultaneously editing existing data and adding on new params to the pipe bomb.
if item then
item:Load(item:getName(),
[[{
MaxRange = 10,
ExplosionPower = 0,
MaxDamage = 60,
ExtraDamage = 150,
AttachmentType = Hammer,
}]])
end```
awesome thanks
[[ ]] is multiline string
It's originally a script someone here helped me with to edit fluid values on items without overwriting the item.
I messed around with it and is now my go to for editing items that I don't wanna overwrite
It was albion actually
I think
So same as DoParam() but different syntax for changing multiple parameters at once?
Edits existing parameters, and can also add in entirely new ones
ExtraDamage and AttachmentType aren't existing params on the pipe bomb
DoParam("Key = Value") is far more common for editing/adding one parameter, but it wouldn't work for a fluid container since that's a component
"Big Cunt Belle is typing"
π
God mode was not used during this, I fr thought I was about to have to start the scenario over because of that trip. To demonstrate a use case for buffed pipe bombs
The old "throw super bomb in front of you and run past it trusting a cheap interior door to protect you" strategy π
I mean a pipe bomb is just a shrapnel bomb, a door would probably protect you decently
Based off how I threw it, it looks like it would have been the wall protecting me anyway
Before it would kill you through the door ?
I never use these
Before, it would do like zero damage and set everything on fire π
I mean yeah, the US military has an official munitions guide for making pipe bombs because they're effectively just frag grenades
Plus carrying them on your belt
Oooh I see
I think the military also has an official guide for a zombie like scenario
That shrapnel bomb might interest us @tranquil kindle @past radish
They also consider frag grenades "defensive weapons" because you should never use them while running forward, that's what concussion grenades are for.
currently the issue is I don't feel like the bomb does enough damage to players, it just kinda scratches you up a bit
And "home defense frag grenades" sounds very Kentucky
Sandbox option for damage taken by player? Let people adjust to taste, easier than trying to figure out the proper value for everyone to use
idk how to make it effect players more tho, as it doesn't have a separate damage value
This is for a trait/profession buffing mod I'm making.
Though I could single out the engineer changes specifically in the future.
It's mainly targetting the engineer at the moment, because the bombs SUCK at doing anything other than causing a fire
I also want to make it so the bombs can be learned from a military magazine
We're working on The Last of Us mods, and for nail bombs that'd be very useful
I have the damage set high enough to just instakill zombies, but you could set it lower and just deal a lot of damage to em
Also I'm definitely getting put on a watch list due to how much I've been googling about IEDs
π π
lol
Yeah sounds good
I think we might interested in that in the future
hey, does anyone know where do i found the sound files for weapons swing sound effects ?
Maybe they're used to it though, they saw me googling a bunch about making guns at home and improvised firearms, and how matchlocks/flintlocks/wheellocks work
I had it in my first ever mod.
Nice
That's probably in the .bank files
well I posted it a bit ago, but this is what is changed about the pipe bomb to have the effect shown in the video
if item then
item:Load(item:getName(),
[[{
MaxRange = 10,
ExplosionPower = 0,
MaxDamage = 60,
ExtraDamage = 150,
AttachmentType = Hammer,
}]])
end```
You could just copy the pipe bomb from items_traps and then change it as seen above
Setting explosion power to 0 makes it no longer catch stuff on fire, I'm not actually sure if max damage does anything itself for explosives.
And ExtraDamage is what gives it actual damage?
I'm not entirely sure myself, I just know it works
Like an ancient viking knowing that crushing chicken bones into their iron made it stronger.
But not actually knowing why
(The carbon from the chicken bones would smelt into the iron, creating rudimentary steel)
They thought it was the chicken's souls making the iron stronger
Hi I'm new to PZ modding
I am currently working on a mod that messes with zombie behavior
specifically their sight
would anyone know how to config zed characteristics through mod tools?
In what way ?
Blind
Mainly
I've been trying to run a preset where zombies are superhuman yet blind as bats
I'm planning on doing that with my clickers
But neither the base game nor the steam workshop supports this to my liking
Really?
