#mod_development
1 messages · Page 189 of 1
The ⚡ pill in the middle gotta be fire.
hello!
how your progress?
find way to sync Light in mp?
im trying to find method for sync torchlight in mp for attachments slots...
I tryed delete func for enable item from hotbar on client mod side and do it like vanilla method when u push F.
Work for user, but not sync for other.
And I found some workaround for Blowtorch.
They create Light source when u use Blowtorch for dismantle etc...
and now trying to braincrack how to possible to adapt it...
like:
-it should be on attachments slot;
-it should be with workaround with not Light like vanilla method, because it create two(from vanilla and workaround) light source for user and one(from workaround) for other.
-need stuff only for drainable battery in your attachments slot from event key pressed
something else...
was looking at the profession codes in game and it confused me anyone got time to explain to ||🥔|| me
prof where character creation method?
yeas
not the hardest part.
local your profession (description, number of free point etc)
adding of skills
adding of traits
adding of recipes
same stuff for traits
local traits (description, true, false etc)
true false work like -
First - can u peek it trait or its like prof trait (hidden trait)
Second - hidden in mp
if u send part of code, then i can explain more, just not remember all stuff
😄 thanks , just figured if im doing pills then why not have a death one as well. Makes sense. Might later extend on the idea if it gains traction.
Yes, I used server commands to update clients
Best of the best
where i can found your work with it?
Hey everyone, i'm new to modding for Zomboid and I try to add a function called when a player Disinfect himself a wound or when that wound is disinfected by someone else. I struggle to find the right event that fit best for this case, do you have some hints?
EHE but it's just a basic (although I know they're hard to get a handle of) server/client command
For flares I create a lightsource every tick if the location is different to the previous
bad for perfomance?
Probably not ideal - but I don't think the engine supports creating movable lightsources through exposed methods last I checked
What they do let you do is creating a light source and turning it off - it's actually the same lights as the lamps
The light moves with the player using what I did
I forget why setting it's xyz doesnt work
I think it doesnt update in MP
Well, it seems I misunderstood
Oh wait I'm mistaken
by feeding the previous lightsource into getCell():addLampPost(lightsource) - it updates the position
wait nope - mis-mis-read
I am actually creating a new lightsource
function eheFlareSystem.processLightSource(flare, x, y, z, active)
if isServer() then return end
--print("PROCESS LIGHT -- x"..tostring(x)..", y"..tostring(y)..", z"..tostring(z).." = "..tostring(active))
---@type IsoLightSource
local currentLight = eheFlareSystem.activeLightSources[flare:getID()]
local ignoreUpdate = currentLight and currentLight:getX()==x and currentLight:getY()==y and currentLight:getZ()==z
if active==true then
if ignoreUpdate then return end
eheFlareSystem.activeLightSources[flare:getID()] = IsoLightSource.new(x, y, z, 200, 0, 0, 4)
--print("activeLightSources ID:"..tostring(eheFlareSystem.activeLightSources[flare:getID()]))
getCell():addLamppost(eheFlareSystem.activeLightSources[flare:getID()])
end
if currentLight then
currentLight:setActive(false)
getCell():removeLamppost(currentLight)
end
if active==false then
flare:setCondition(0)
flare:setName(getText("IGUI_Spent").." "..flare:getScriptItem():getDisplayName())
end
end
lamp post - its radius light? not cone?
It is radius yeah
I would have to check how flashlights are handled for coned lights
im not found anything from Light, lightsource, flashlight etc in lua...
What are you exactly trying to do?
I'm wondering why there are so many candle checks in vanilla when u push F, even from Attachments slots... but Candle cant be attached lol...
but for Flashlight only one
sync flashlight in mp, when flashlight in attachments slots
ah
there's methods for mp torch stuff
they probably didn't sync attached light sources and only handled primary/secondary
there are also getters for each setters - so you could technically grab the values and send them over a command
i delete script for hotbar from mod, for enable item state.
I try do it for vanilla server side script for enable state from attached slots, but without result...
public boolean mpTorchCone;
public float mpTorchDist;
public float mpTorchStrength;
you can't update players on the server-side you have to transmit
understood, but did not implement the idea, alas...
it would probably fix your issue - unless you already fixed it
I'm kind of surprised this is an issue at all
isoPlayer
public InventoryItem getActiveLightItem() {
if (this.rightHandItem != null && this.rightHandItem.isEmittingLight()) {
return this.rightHandItem;
} else if (this.leftHandItem != null && this.leftHandItem.isEmittingLight()) {
return this.leftHandItem;
} else {
AttachedItems var1 = this.getAttachedItems();
for(int var2 = 0; var2 < var1.size(); ++var2) {
InventoryItem var3 = var1.getItemByIndex(var2);
if (var3.isEmittingLight()) {
return var3;
}
}
return null;
}
}
The game claims to be returning the attached item

My best guess would be whatever they have to update MP sync is not using active light source? Idk
I actually can't find uses of the three mpTorch variables
so my files might be out of date or it's in the C++ stuff
i correctly understood that this is a ready-made solution to my problem?
This is the java code
I was trying to find where it updates the flashlight (torch) stuff
I found something else in LightingJNI
Seems like it's grabbing the light sources from IsoGameCharacter's methods to update torches
I don't see why its not updating attached items though
very odd
Are these vanilla items that you're attaching?
The fact some of the sincere "good idea" comments are getting hundreds of upvotes makes me very concerned
yep, vanilla flashlight
Yeah I can't really see why it's not updating or syncing on MP
like 3d high detalized feet...
lol 😆
I made a poster for hands/feet with visible fingers/toes
ngl having actual fingers does look better lol
but yeah the high def skins mods venture into some weird groups
perverts already have a mod to sniff socks...
Wicked Whims in PZ!
Soon TM
lyrical digression
Yeah what kind of pervert would be into socks
so that possible do other players also see the light from the flashlight when it is not in hand, but attached?
I'm not sure tbh - lights had issues when MP was first relreleased - most notably with car headlights
I've also seen weird behavior where when you turn on a flashlight everyone on your end would also get a flashlight cone but only on your end
The car stuff was patched - the other thing Idk, the hurdle would most likely be that most people don't use flashlights lol
apparently people get on servers with day length settings of one hour
We use flashlights all the time.
and this is not the first time I see this problem in the comments of mods that add slots for attaching a flashlight
I know, I was speaking to the average experience, but more so the vanilla experience in testing. I imagine a few things get missed/overlooked.
eh...
ok, I'll try using the vanilla method with workaround for blowtorch
I can't figure out how to update the zombie textures live after editing its WornItems (clothing). What's the method to do so? I've confirmed that the clothing does update, its just the visuals that dont change with it
I've tried resetmodel, all the update methods I could find on isozombie, but they all dont seem to do it
Mmmm I need some help
How should the GameTime:getInstance():getMinutes() should work? I'm trying everything but I keep getting the same error
There a code
Ugghh
UpdateModelsNextFrame()
Or something
Im not exactly sure but its something like this
Goodluck
WornItems are used when the zombie has been killed, was fake dead or is reanimated player.
You should use costumes instead, or change the ItemVisuals.
getGameTime() returns the instance.
GameTime:getInstance():getMinutes() should also work if you change it to: GameTime.getInstance():getMinutes(). Make sure to not use GameTime.instance from lua as it's usually not the actual instance.
Thank you!! 🙂
can we control the max no of items that can spawn in whole map?
I can think of a way - items have a function/method when spawned if I recall
Easier to do if the item can only be crafted - but I think there is a method is for anytime it's spawned as well
Away from the computer rn
Interesting, i'd like something rare to spawn but there can be only 1 or 2 instances on map at max. OtherWise might have to think of something else.
Well you could always use that API to spawn things on specific squares if you'd like.
That'd be a third method - if the on-spawn method isn't what I recalled.
You can also tap into onFill to remove extras although that'd be a bit messier
By that API, you items? I can look into items and see if i find anything useful. Idk why i felt like i read somewhere in procedural distributions something related to "max items" that can spawn.
unfortunately an item's OnCreate is fired before the item is added to the container, so you can't delete items during it
there's workarounds of course but it'd be awkward
here's a collection of modding tools I've made in python :3
Ight
Couldn't find lockpicking mod as good as ZRe Better Lockpicking but without mini games.
So I tried to construct it from other mods:
https://steamcommunity.com/sharedfiles/filedetails/?id=3018802126
Hey everybody I’m trying to use the tile picker, I got it open, found the tile I want, how do I actually place it?
Does anyone knows how I could change the map buildings draw threshold (like always there no matter the zoom level) ?
is there any ways to inject in OnCreate function?
Trying something like that, but nothing works
local oldRecipe_OnCreate_CutAnimal = Recipe.OnCreate.CutAnimal
function Recipe.OnCreate.CutAnimal()
print("Hello")
oldRecipe_OnCreate_CutAnimal(self)
end```
this will cause errors because it doesn't pass the arguments to the original
in this context self is nil, recipe functions don't have a concept of self
local oldRecipe_OnCreate_CutAnimal = Recipe.OnCreate.CutAnimal
function Recipe.OnCreate.CutAnimal(...)
print("Hello")
oldRecipe_OnCreate_CutAnimal(...)
end
```this can work, or you can write the arguments out manually (which you will probably need if your patch is going to use them)
will try
same error
is your file in server?
if it's not, the table won't be created yet when your file runs
ah yea... recipecode should be in server folder. Now its working. Thank you.
If someone has an idea of how I could build an image of the full map (not like https://map.projectzomboid.com but more like the in game map, top down view if easier) with all buildings and roads visible it would help me tremendously. I see two ways that don't necessarily appeal me (third one seems easier but I have no idea how for now) which are :
- Manually zoom & move the in game map to take a screenshot of each "cell" (a cell just being the region visible at the specific zoom level buildings and roads become visible)
- Make a mod to automatically set the correct zoom and move the map every 2min so I just have to take a screenshot each time
- Make a mod to change at what zoom the buildings and roads become visible so it always visible no matter the zoom level so I can take a single screenshot of the map
Or maybe I'm overthinking it and there is an easy way
idea!
backpack from pants!
not best method...
i mean
this part on client-side
When trying to adapt the Better Lockpicking mod, I came across the fact that all these functions must be shared by the server
If someone in a co-op unlocked something - for someone it often remains not unlocked, or returns to its original state if you move far away.
Common Sense use best method for to get around such problems
All questions to the creator Paperclip Lockpicking (~ ̄▽ ̄)~
It's basically his code.
The author of the mod didn't wanted to add magazines (or he couldn't). And Better Lockpicking mod has no option to turn off minigames. So I hacked it together in couple of evenings
Thx for the tip
I'll try to do something about it
I'm talking about the main mistake that is here and is in my zRe version)
Ooh)
But when I think that without a mini-game it turns into a chance unlock attempt, which does not depend on me, but on skills - in any case, there is some percentage of luck...
All in all, it makes me sad.
May be. But while I played with BL (better lockpicking) it often found for myself that its easier to just smash window or dismantle a door than to waiste so many time on mini game.
I mean, I'd like to remove the crowbar mini-game, but leave it with the lockpicks...
just thinking out loud
Tbh crowbar minigame was last drop that made me start searching for another mod
When character with 10 str can't pry door
It's frustrating
IMHO tho
for door
first - client side func with anim (for car it can be send args on serv)
second - server side func (not sure why it can't be send like args... but... BytBraven has more skills, that should be)
Yes, it will be necessary for me to somehow sit down and add fixes to this mod...
It seems there the binding goes to the lockpicking skill, and not to strength...
My bad
God... I'm just tired of modding... i want to play xD
👀 I'll definitely look into it this evening
Heh (~ ̄▽ ̄)~ same here
I'm not playing anymore. I'm hoarding mods
Cant
Stop
Must
Find
More mods

I once got stuck in modding, adding what I'm missing or fixing what I've been playing with, but it's no longer supported...
And it sucked me into this modding routine...
Without knowledge...
Oh god, I feel like I'm trying to learn Chinese from scratch while talking to Chinese people.
I finally made my dream exoskeleton, just adding a passive increase in carry weight, without all the OVERPOWER bullshit
best way to learn chinese👀
i feel the same way, its been a while since i actually played the game lol. Mostly just launch, test mod and repeat. It's been a fun process tho.
Okay, cried, pooped, have to work! (c)
looks cool, what's that in his hand? ah sledge maybe its road for a second i thought it was something else.
yep yep!
Yep) i found nice trait in SOTO by HEA and steal trait for normal use in combat for heavy stuff)))
Named it like "Titan's Grasp")))
make algebra mods then
What is SOTO from HEA?
ah, combat with sledge hammer im sure it'll be interesting.
I honestly thought it was a reference to game or something
There is only one reference - Titan's Grip.
The warrior has the same skill in the World of Warcraft, which allows him to carry a two-handed weapon in one hand.
ah oki oki
OK, I am trying to find a quick and easy way to remove NPC corpses from the world identically to how zombies are removed in sandbox...
https://github.com/shadowhunter100/PZNS/discussions/38#discussioncomment-6726083
I can't find one for local/solo, but I found a server option...
https://projectzomboid.com/modding/zombie/network/ServerOptions.html#RemovePlayerCorpsesOnCorpseRemoval
So is there a way to make the API call and have the same option enabled for solo?
im failing ong
100 in the class but I know the next test is killing me
nevermind, I found out
thank you for the help, itemvisuals was it
did you ever finish the nuke mod
i want to show my friend
i told him ab it
it also happens to update the corpse loot too so thats nice
I’m sorry but school has me fucked up
ah alr
I can finish it soon but I’m really pressed to work on irl stuff
I can say this, it will be complete
When: between now and 2083
Alpha bee’s model tutorial seems helpful so imma try and work on my nuke mod tomorrow
Gn everyone
guys, when i create clothes preset for zombies, part of item can be <probably> with chance.
How about if i need chose texture for clothes, if clothes have 3 texture for choose.
Dont want to do duplicate item just only for every texture
Can’t wait to use this on the server
Is there way to inject new occupations in vanilla map spawnpoints?
I mean...just keep spawn points for vanilla occupations and add new occupations to them
I'm not sure how to do it well
thx for pointing this out. Moved door unlocking to server side. Dunno about MP but in SP works without any issues. ༼ ◕_◕ ༽ 👌
out of curiousity is there any community effort to define all the methods and other stuff that exist
would be very nice
👋
Hey all, hope everyone is having a chill time being productive.
Quick question.
Is it possible to limit the amount of traits a user can pick?
I think I saw people with 100+ traits, so not really?
Yeah, I was hoping that I could find a way to put a cap on it, but I wanted to know if it was even possible to begin with.
hmm, workaround like:
all profession get X point
u need cap for example 5 traits.
then one trait should be cost X:5
Super doable! Thanks!
That was my second option.
I think you can probably override the UI to simply not be able to add anymore traits after traits count > X
That would work around costs
Incidentally, I usually allow 1 free point whenever I play (in MP or otherwise) to open up options and not have to take on an added negative trait
Anyone familiar with modInfo multiple requires? is it just require=TargetSquareOnLoad,ZoneAPIChucked
I feel like this gets brought up a bunch and I can never remember lol
yep
How do upload my mod to the Steam workshop
You can simply google it or even watch video instruction on YouTube
in just b4 build 42
working on a simple area based tp mod 🙂
is it safe to change an items body location in an update
need to change one of my amputation items from jacketSuit to a custom body location
Hey there folks. I sometimes see people asking to pay for mods. Is that a common thing? Are there any people here who make commissioned mods?
I know several people here take commissions. I've done some before even
feel free to DM me with your idea if you'd like 🙂
@north junco
I only recently heard about this being a thing, but I'd love to support the modding community (and also get something cool out of it). I tried to get into modding myself, but I just ended up making some reskins.
Learning to mod PZ is a lot of fun (although it can be frustrating at times)
i learned basically everything i needed to know from scratch either from this discord, picking apart other mods, or light googling
PZ players know pain, fr that's why the modding community is so top 🔥
I think it helps to have a clear idea of what you want to do. I've had a wishlist for PZ features for years, but just never managed to get into the modding scene. There's also that feeling of "it all goes to shit when the next update hits anyway" skulking about.
Honestly depends what you're making, I'm not really too worried about updating my mods for b42
you're in luck, pz updates are like.. never
I don't wanna spam chat too much, but maybe some of you more experienced modders have an idea on whether or not this is feasible to make.
I'd love to have a mod inspired my Michonne from the Walking Dead. She does this thing where she removes the jaw of a zombie, and they just stop trying to bite her. Then she can just pull them along, kind of like a pet.
I was thinking something similar. If a zombie is knocked down, and you have a knife/axe/sharp thing, you could right-click and "pacify" them. Then they'd be harmless, and also not de-spawn from that point on. It wouldn't necessarily have a practical use, but could be neat in role-playing.
More advanced add-ons to that could be having one work as a sort of extra carrying space, or have them following you if you put them on a leash.
Would any part of that be feasible to make through a mod?
im not the most veteran modder, but something like that would be pretty insanely hard honestly
because you would be literally changing the zombie AI
tbh it's probably more feasible than most "zombies don't attack" mods, I haven't seen anyone make zombies not follow the player, but have seen them not attack and follow
without making the player litteraly invisible that is ^
I could see it working if you could make the player register as invisible to one zombie only maybe
but i think the invisibility thing is a global toggle
I wouldn't know of a valid method for that
i don't either
that's why i'm not sure if it's feasible honestly
I think a more realistic idea for that mod, albeit not as cool would be something as follows
instead of pacifying a downed zombie, you can right click a recent corpse to "pacify" it
sort of like the autopsy mod
CanAttack
public boolean CanAttack()
its not as realistic but if you RP it a bit, it works
then you have a zombie model item that's basically a duplicate of the player model
it uses a custom body location
place it behind the player
it will walk exactly in sync with the player, but it will basically be a "walking" zombie behind the player
Spooky
you could even make it a backpack lol
so you could store the items in it as you had mentioned
this idea is definitely not as intricate or as cool as what you described, but I think it's a more realistic rendition of what you could possibly do without too much trouble with PZ mechanics
That's really clever! Thank you guys for the input, I'm happy to get some insight. It is always a bit intimidating to put forward your ideas and thoughts without too much insight into what makes the game tick, so I appreciate the discussion.
Always fun to talk posibilities 🙂
I want to add a custom body location item to the default character creation menu.
I'm assuming I do this in ClothingSelectionDefinitions.lua
is there a way I can simply add to this table
instead of overwriting this file
You could maybe use table insert and overwrite this table
get the original first
cus this is base game file
I think 👀
I haven't done anything with lua in months at this point. I've just been making models for my hair and accessories and gun mods
😭
Oh! Another thing. I've been working on making an alternate zombie sound pack, but I'm not that familiar with how to make sound mods. Basically just new sounds, maybe some alternate skins.
If I were to provide all material, would it be a lot of trouble putting it together?
I wanted to start a new playthrough for halloween, and had this idea of making the zombies look and sound different, for extra creepiness.
It's a nightmare to do well
best advice I can provide here is picking apart a similar sound pack mod on the workshop
And all the ones I've seen are manual install
Zomboid has like
8 bar 16 bar
slow fast
intense
different versions of same song
and they line them up perfectly for lua events, it's really smart
Someone could accomplish something amazing if they spent a lot of time but most rush it and end up with a choppy asf music override
Oh, I wouldn't want to overwrite music. Just zombie noises.
I got a script you can use for this actually
if u want
there's the manual install method too
I'll probably start with the manual install. I tried to get it to work, but I think I just added it to the wrong place.
I've been working a lot with sound, and made a whole pack of zombies saying variations of creepy "Hello" noises. I'd love to hear a horde of them.
"feel free to yoink" written in the description, if you ever wanna mess with it, not even lua just a script, mega easy to swap out sounds
Thank you, I appreciate it!
[hr] I think
yes, hr
okay i'm so rusty at lua i can't remember how to do this lol
how do I access this table in my lua file and add to it?
how do i make it so that only the water from a pot of water is used in a recipe or how would i give back the pot?
At the top of a fresh lua script write
require "Definitions/ClothingSelectionDefinitions"
then you can access the table as if it was a part of your script i.e
function addNewItemsToSelection()
-- Define a new item
local newItem = "base.itemIwantToadd"
-- Use table.insert to add the new item to the "Hat" items array
table.insert(ClothingSelectionDefinitions.default.Female.Hat.items, newItem)
end
Probably would be fine hooking this onto onGameStart event, I Think
This worked! Thank you! I was really struggling lmao
Okay, so now how could I add a new category to this? I've tried several different things I can't seem to get it to work
table.insert(ClothingSelectionDefinitions.default.Female, "Amputation_LA")
table.insert(ClothingSelectionDefinitions.default.Female.Amputation_LA.items, "AmputationsRP.Amp_LA")
table.insert(ClothingSelectionDefinitions.default.Female.Amputation_LA.chance, 0)
this doesn't work
basically, my items use a custom body location
i'm trying to make them available during character creation without needing to use the "unlock all clothing" option during sandbox creation
Might be worth looking at a mod that does a similar thing, also during the debugging phase make sure you're checking your console in Zomboid folder, to ensure you're definitely accessing the correct table and successfully overwriting it 👌🏻
definitely accessing the correct table and such as your method worked for adding it to a base category
do you happen to know of any similar mods? I searched all 400 of mine for a clothingselectiondefinition file and none had one that did something similar
Did you define Amputation_LA as a list?
Like Amputation_LA = {}
i also tried that to no avail yeah
What was the error?
local amp_LA = {
chance = 1,
items = {"Base.Tie_Full"},
}```
one sec
let me revert to that state and get that error back
No, I mean - in order to insert into it, it needs to exist.
I don't even think you should be using insert in this case 🤔
ClothingSelectionDefinitions.default.Female.Amputation_LA = {}
table.insert(ClothingSelectionDefinitions.default.Female.Amputation_LA.items, "AmputationsRP.Amp_LA")
table.insert(ClothingSelectionDefinitions.default.Female.Amputation_LA.chance, 0)
what would you propose? I saw PLL has a file called PLLClothingSelectionDefinitions, which is almost the same name and its almost an exact duplicate but i don't know how or where its even loaded
ill try yours, one sec
ERROR: General , 1692128491775> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "se.krka.kahlua.vm.KahluaTable.len()" because "<local2>" is null at TableLib.insert line:217.
ERROR: General , 1692128491775> DebugLogStream.printException> Stack trace:
java.lang.NullPointerException: Cannot invoke "se.krka.kahlua.vm.KahluaTable.len()" because "<local2>" is null
at se.krka.kahlua.stdlib.TableLib.insert(TableLib.java:217)
at se.krka.kahlua.stdlib.TableLib.call(TableLib.java:89)
at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:182)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:1007)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1812)
at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
at zombie.Lua.Event.trigger(Event.java:64)
at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:65)
at zombie.GameWindow.enter(GameWindow.java:753)
at zombie.GameWindow.mainThread(GameWindow.java:491)
at java.base/java.lang.Thread.run(Unknown Source)
LOG : General , 1692128491781> -----------------------------------------
STACK TRACE
-----------------------------------------
Callframe at: table.insert
function: addNewItemsToSelection -- file: AMPClothingSelectionDefinitions.lua line # 17 | MOD: Amputations
line 17 being table.insert(ClothingSelectionDefinitions.default.Female.Amputation_LA.items, "AmputationsRP.Amp_LA")
let me see if just inserting the category itself with no items or chance will work
link to our shared mod
that's for a profession
ClothingSelectionDefinitions is a keyed table though
mine needs to be added to default
insert only handles position and is for iterated tables
you're basically defining female[1] = "Amputation_LA"
then trying to insert into a key that doesn't exist
yeah I see the issue there
i don't really see a way around this and I don't know of a similar mod that handles something like it
Does what I wrote not work?
Oh
cause items and chance don't exist lol
ClothingSelectionDefinitions.default.Female.Amputation_LA = {chance=0, items={"AmputationsRP.Amp_LA"}}
Just do this then
Also, chance=0 ?
i believe chance is the random chance for it to spawn with that
like when you first open char select
you get a random outfit
i don't want people randomly spawning amputated
so i figured chance at 0 is best
I'm on mobile but that looks good, similar to example from your previous clothing.
lets GO
thank you so much, Chuck
you're amazing and a wonderful help as always
very much appreciate it
this really makes the mod a lot more accessible
thas dope 
damn thats awesome
Anyone have any good tutorials for making a clothing mod?
i was literally going to ask the same thing lol

i searched through the history of this channel and found this https://theindiestone.com/forums/index.php?/topic/37647-the-one-stop-shop-for-3d-modeling-from-blender-to-zomboid/
Hello and Welcome! Here you will find a concise and comprehensive guide and tutorial of making 3D models for Project Zomboid. Currently, this will mainly pertain to custom Clothing creation but may include weapon creation in the future. This will present how to create models from scratch with Ble...
seems decent
not so much a tutoral, but a sample mod for adding retextures. https://steamcommunity.com/sharedfiles/filedetails/?id=2902353381
Question, does Kahlua use 32-bit or 64-bit numbers? Working on whole numbers with some big number math
Hey guys, I'm new to modding when it comes to PZ. If I want to know whether the player is sneezing or coughing, do I simply write this?
local isSneezeOrCough = player:getBodyDamage().getSneezeOrCoughActive()
local isSneezeorCough = player:IsSneezingCoughing()```
Im a little new to coding but I think that this works
I dont believe you need to do "player:getBodyDamage()"
i see, thanks!
btw, when doing booleans like "player:IsSneezingCoughing()" you have to define what "player" is.
Anyone know which vanilla file deals with rain barrel/plumbing range?
I found the ISPlumbItem in base timed actions but I cannot figure out the range from it.
the range is hardcoded in java
So, some decompiling it is XD
I hope this is the right channel. If I want to tweak the Firearms B41 mod for my own use, do I just copy the mod from workshop folder to my local mods folder and start changing values?
Man im so confused xd are there really no clothing mod tutorials out there?
Ye, pretty much it
Hey everyone. Does someone know if vehicle tweaker api allows adding templates to vehicle txt files? I've used it to changed existing values in the past but I was wondering if it could be used to add extra functionality to a vehicle without having to overwrite the original file.
How often it can be used in the evolved recipes i believe
if my clothes has not one (3) texture for choose, can i wear zombie in not random texture clothes?
i mean, in clothes xml for clothes preset u added only guid and probably, never seen for texture...
Its possible?
Or i should do clothes copy with other guid for every texture?

It probably does. I don't use it but I use same command to load a template to existing vehicles.
Pancakes:8 would mean you can add 8 hunger from apple to the Pancakes. It should be affected by cooking skill.
Can you give an example how you do it?
declaration: package: zombie.scripting.objects, class: VehicleScript
local VehicleScript
VehicleScript = getScriptManager():getVehicle("module.name")
VehicleScript:Load("name","{ key = value, }")
Thanks!
Can you add new variables to items in the scripts txt? Or do you need to do something more fancy in a lua?
You can add tags to items but more than that you cant and would have to do something in lua
...how do I code to get it to wait like just a frame or a second before doing something
well, I still would like an answer for the above in the future, but I think I finally got over the headache without it, yahooey
Hi, I want to disable the players list for non-admin chars. I searched in the ISUI folder but couldn't find it. Can someone tell me where the lua side that creates or renders the players list is thanks.
@neon bronze I'm fairly certain defining new things in the script adds it to the modData for items
But you're limited to numbers/strings
From what I recall, yes if you include something new
How are they stored in item? Is it through moddata.newVar?
yes
} else {
String var10000 = var3.trim();
DebugLog.log("adding unknown item param \"" + var10000 + "\" = \"" + var4.trim() + "\"");
if (this.DefaultModData == null) {
this.DefaultModData = LuaManager.platform.newTable();
}
try {
Double var27 = Double.parseDouble(var4.trim());
this.DefaultModData.rawset(var3.trim(), var27);
} catch (Exception var15) {
this.DefaultModData.rawset(var3.trim(), var4);
}
this is de-compiled code
While it would be nice if more games adopted a published-source approach (like Barotrauma) I also understand the many reasons why not to
String[] var2 = var1.split("=");
String var3 = var2[0].trim();
String var4 = var2[1].trim();
var3/var1000 in this case is the top half of the split string
I agree but it should be kept to place where it matters like say anti-cheat code etc not the part of the code where you add stuff to the item
uhhh
I'm fairly certain they don't name their vars this way internally lmao
again, this is decompiled code
comments/var names are lost
With that we could actually add some functions to the item right? Like if i pass the name of my function that i defined somewhere as a new var in the item script it could be executed then with events right?
You would need to make the function to grab the other function
you can only store strings/numbers this way
Also do you know how it would handle multiple instances for the same new entry?
No
Based on what I can see it's literally A = B, I've never used it.
I do know you can have a gun accept multiple types of ammo with / inbetween ammo types
Maybe it works this way aswell
That's cause it's parsed for that
Again, you'd need to handle all of that
I personally don't see much use in this outside of maybe sub-mod/cross-mod-compatability
Could you tell me where this is handled?
item.java
Thank you for your help
If I've not set cardModData[0], this if statement will return true.
If I have set it, it also returns true.
What statement would work to check if I've given a variable a value? Or if it exists yet.
tables start at index 1
generally
You could technically set 0, -1, -2 as keys but that creates a limbo set of behaviors lol
Heck. Thanks. Coming from mostly c++
Yeah most people familiar with arrays/lists/tables do not like Lua's approach
which is 'everything is tables'
indexes start at 1, but if you define non-numeric keys it changes the tables' behavior
A good example would be using #table to grab the size quickly only works if the keys can be iterated over in numeric order
Changing it to 1 (and also removing the superfluous not) fixed it.
And, yeah, thanks. Will try to just go look up lua specific questions when it's something basic like that.
Could I ask what cardModData is?
There's a few things about ModData that one has to be mindful of as well
Going back to the topic of keys, it's usually better to tier your modData into a sub-table rather than pop it into the main modData table
As anything using simple names could get overwritten - and using overly complicated keys is just annoying 😅
So, I know I've asked this in the discord before, but how would one go about editing the moodles that are already in-game?
It's just being used to store two integers that appear in the tooltip in the inventory but shouldn't be the same for each instance of the item.
Perhaps I'm treating it like an array and that's the wrong move here.
Yeah, many mods use modData and almost none use numeric keys
If you're just trying to grab values and don't need it to iterate at all - you can just define keys
--ModData is a table shared by many mods - so using the main table can get messy
--This defines the sub-table inside of the main modData as either what it currently is, or an empty table
item:getModData().mySpecialModData = item:getModData().mySpecialModData or {}
--This grabs that table
local cardData = item:getModData().mySpecialModData
---You can just define stuff belonging to that table like so
cardData.thing1 = 1
cardData.thing2 = "2"
cardData.thing3 = {}
Sorry, removed my personal preference of using [""] just for readability
If you need a key to result from a concat or include spaces you can use ["var"] instead of .var
But it helps readability imo
mySpecialModData should be something fairly unique
everything else can be short and sweet
Thanks. I'd not considered that moddata would obviously be shared between this and other mods so will look at implementing that.
I'm surprised more mods don't break modData's more often tbh
It would not be that farfetched for someone to use modData for their needs and wipe it for some reason
you can interface with my StatsAPI mod which reimplements them in lua, otherwise it's completely hardcoded java and not really possible to do anything to them
If a weapon has "JamGunChance = 0" does that mean it can never jam?
anyone able to point to a mod or something that changes/adds to one of the default sandbox options so I can figure out how to mod the sandbox menu?
I took a look at that already, I'm trying to figure how to actually change an existing option and then have said changes actually show up ingame.
I've made mod for change car spawn chance.
In spawn list was line
VehicleZoneDistribution.parkingstall.vehicles["Base.AMC_bmw_classic"] = {index = -1, spawnChance = 1};
I've changed it to
VehicleZoneDistribution.parkingstall.vehicles["Base.AMC_bmw_classic"] = {index = -1, spawnChance = SandboxVars.ATSS.AMCbmwclassicparkingstallspawn};
And in sandbox-options same line is
VERSION = 1, option ATSS.AMCbmwclassicparkingstallspawn { page = ATSSAMC, translation = ATSSAMC_AMCbmwclassicparkingstallspawn, type = double, min = 0.00, max = 100.00, default = 3, }
It shows like this, with "Translation" of course
ah, I see.
Sandbox_EN = {
Sandbox_ATSSAMC = "Auto Tsar Motorclub SpawnList Customization"
Sandbox_ATSSAMC_AMCbmwclassicparkingstallspawn = "BWM R80/7 Classic - Parkingstall Spawn Chance"
so any changes made to them show up automatically without needing to do anything special?
so I can just change, say, the water and electric shutoff settings to have an additional value for like, "disabled" or something like that?
You need to repoad Lua in main menu to changes take effect
i'm not sure about vanilla things(
I've changed spawnchance from other mod
Hi iam trying to give character pain as par of the function:
if ZombRand(100) < 20 then
player:getBodyDamage():setUnhappynessLevel(player:getBodyDamage():getUnhappynessLevel() - 25)
player:getBodyDamage():setBoredomLevel(player:getBodyDamage():getBoredomLevel() - 35)
player:getStats():setStress(player:getStats():getStress() - 0.20)
player:getStats():setEndurance(player:getStats():getEndurance() - 0.25)
player:getStats():setFatigue(player:getStats():getFatigue() + 0.25)
player:getStats():player:getStats():setPain(player:getStats():getPain() + 10)(player:getStats():getPain() + 10)
player:Say(getRandomDialogWithMaxIndex(femaleDialogs, #femaleDialogs))
local 23akce = 23:new(player)
ISTimedActionQueue.add(23akce)
everything works good exept character is not getting any pain, i also notice in debuger i cannot move pain sliders until character is hurt in some way. Is there some variable i have to set before character can get pain? Also can i break some vannila functionality with this?
Update pushed https://imgur.com/RvYGvxm
It needs "cloaker" sound from payday 2
Ah, okay! I'll do that. Thank you!
let me know if the api is restrictive, moodles are the most recent addition and some areas are a bit rushed
is there a guide about making armor mods for vehicles? I know the ones about modeling vehicles and uploading them but armor specific? mostly the code components
Hi guys! is there any info out there about how the .lotheader, .bin, and .lotpack files are generated for the maps? I understand that the editor tools exist, but I want to understand what is going on underneath. Are they created from the worldmap.xml files?
I'm simply trying to reach the writings in a notebook, but I couldn't do it, can anyone help?
if handItem:getFullType() == "Base.Notebook" then
pages = handItem:getCustomPages()
print(pages:size()) -- works
print(pages) -- works somehow?
--print("Pages: ".. pages) -- doesnt work
-- get key set
local keySet = pages:keySet()
print(keySet) --works somehow?
--print(keySet:size()) -- doesnt work
--print("Keys: "..keySet) -- doesnt work
-- print values
for _, key in pairs(keySet) do -- doesnt work
local value = pages:get(key)
print("Key:", key, "Value:", value)
end
end
try to convert pages to string with "tostring"
print("Pages: " .. tostring(pages))
keep in mind i have no idea what iam talking about
.
how can i convert it to something that i can use?
try
for i = 0, pages:size()-1 do
print(pages:get(i))
end
```this should print the text of every page
it prints nil for every pages that i filled with something
pages = handItem:getCustomPages()
print(pages:size())
print(pages)
for i = 0, pages:size()-1 do
print(pages:get(i))
end
Try asking #mapping
thanks! I have
Hello Everyone, We need help with a mod we are developing, Voiced Radios and TVs (https://steamcommunity.com/sharedfiles/filedetails/?id=2950750587). Programming knowledge is NOT required. We need Voice actors, specially female VAs to voice the lines for the mod, to have real human emotions (also, people willing to direct and edit the programs are apreciated). The discord link is in the description of the workshop. Once the channels are released, I'll also include the cast of the different actors and directors in the description.
i kinda figure it out:
player:getBodyDamage():getBodyPart(BodyPartType.Head):setAdditionalPain(25)
this will give player headache
player:getBodyDamage():getBodyPart(BodyPartType.Head):setAdditionalPain(0)
this will cure the player
but i cant figure out how to make pain weaker anyone willing to help?
what do you mean by weaker?
from what i understand if you get pain you are getting set amount of pain points every tick, there is variable getPainReduction() and setPainReduction in class bodydamage. Since i cant find any proper documentation anywhere on anything iam just throwing shit on the wall and see what sticks.
iam getting some results with this
player:getBodyDamage():setPainReduction((player:getBodyDamage():getPainReduction() + 35))
but its throwing
se.krka.kahlua.vm.KahluaException: Super mod.lua:443: ')' expected near 35`
at org.luaj.kahluafork.compiler.LexState.lexerror(LexState.java:278)
at org.luaj.kahluafork.compiler.LexState.syntaxerror(LexState.java:289)
at org.luaj.kahluafork.compiler.LexState.error_expected(LexState.java:683)
at org.luaj.kahluafork.compiler.LexState.check_match(LexState.java:713)
at org.luaj.kahluafork.compiler.LexState.prefixexp(LexState.java:1108)
at org.luaj.kahluafork.compiler.LexState.primaryexp(LexState.java:1130)
at org.luaj.kahluafork.compiler.LexState.simpleexp(LexState.java:1211)
at org.luaj.kahluafork.compiler.LexState.subexpr(LexState.java:1303)
at org.luaj.kahluafork.compiler.LexState.expr(LexState.java:1321)
at org.luaj.kahluafork.compiler.LexState.explist1(LexState.java:1036)
but it seems its somhow works anyway
but its probably not right it seems like it could go into negatives and than cause issue with pain slider
i was trying to find code in vanilla that makes painkillers work but i didnt.
public static IsoObject FindExternalWaterSource(int x, int y, int z)
Is this what I would use to change the range used for rain collectors?
does anyone here know how to make a server modpack, upload it to steam, and use it on the server?
Hello Everyone, We need help with a mod we are developing, Voiced Radios and TVs (https://steamcommunity.com/sharedfiles/filedetails/?id=2950750587). Programming knowledge is NOT required. We need Voice actors, specially female VAs to voice the lines for the mod, to have real human emotions (also, people willing to direct and edit the programs are apreciated). The discord link is in the description of the workshop. Once the channels are released, I'll also include the cast of the different actors and directors in the description.
how does the game handle eating and drinking? are they just recipes?
When you eat food with specific tags you trigger functions.
In general eating is function which triggers before/when/after eating
Check for media/lua/client/TimedActions/ISEatFoodAction.lua
Some things like cigarettes triggers OnEat function.
drinking is also just eating with a different name in the ui
Anyone know if there possible to make trait like Football Player?
I like the idea that you can knockdown zombies with certain chance if you bump them while running.
I saw something in More Traitsbut it makes you invisible and just knockdown anything with 1.5 tiles or something like that while sprinting... which is not I'm looking for
where do items trigger the function though? like if I wanted to eat a radio how would I plug that in?
its realized in Insurgent mod
they has same trait
try to do like event
Events.OnCharacterCollide.Add(OnCharacterCollide)
here be one problem - your char with trait should not be knocked
if im trying to craft items from another mod in my mod, how do I set that up?
also if im trying to override something like distribution from another mod
#mod_development message
Badonn did something like that
Copy recept to your mod, add line Obsolete = TRUE, to it and make your item with same item name.
Ur mod need to be loaded after modded one
Override:true will override an existing recipe
how do I make sure its loaded after?
Mod load order thru mod manager
so if im trying to craft ammo for a gun from another mod, I copy over the item to my mod, add obsolete =TRUE to the item, and i'll be able to craft them in my recipes?
You want to use ammo craft from other mod or change the recipe?
theres a mod that adds RPG's but no way to craft ammo. I want to remove their spawn and make them craftable
Copy distibution file to your mod and make spawn to 0. Your file will overwrite spawns of rpg mod.
Make a recipe to make ammo with the same item name as in rpg mod and it will work
Im gonna check my recipes agian, its pretty late and its likely I just spelled something wrong lol
I know that feeling, bro(
Made a mod, made a lot of items nad recipes, made a magazine for recipes, and forgot to put 1 digit in magazine spawn((((
Spent a week to find why everything is working, except magazine spawn
i have notepad with to do list 
I fixed it lol. Yes I did spell something wrong
now all I gotta do is figure out how to turn down the explosion radius on this mod
that's a good idea, usually refer to someone else or my earlier mods.
i just have three projects that I'm currently working on.
Server modification (now I'm getting new sets of clothes, spawns, spawns of zombies in it)... I rly think its Easy and fast add clothes, but nope 
zRe Better Lockpicking - sync to server info... Another small fixes...
zRe Vaccine - completely redo the crafting and research of vaccines, tooltips and more...
And i can’t keep it all in head, it’s better in a notebook
Github/gitlab with comments?
not my way))
old school with list in my room and cat`s paws 
error in my code - cat sit on keyboard
@mellow frigate hi! Your speed framework actually work?
ye altho it's a great idea to use list for certain tasks/checks you have to lookout for in your mods but like DJ suggested you may wanna checkout github. Will make your life much more smoother and it's worth your time as well. Better tracking of every update or tweak in the longer run.
To be honest, I've never used github...
It seems that it will take me longer to get used to it than to take notes at work, and at home transfer them to a notebook
And I even have a briefing board with a couple of knives))
that's true, learning something new takes time but once you're a bit comfortable it adds more value in the long term. Maybe just try out a random project or just text files to get started.
afaik yes, try it with rollerblade mod.
i want use it to my passive exosuit for reduce movement speed
but if u know method for enable-disable sprint mode - it's be great
when i try running my mod when its reloading lua it gives me an error and the screen turns into the main menu with nothing on it. how do i fix this?
there's an error in your mod that's breaking the ui system entirely
oh
you can check console.txt for the error
ok
i didnt find anything in console.txt but in the log.txt i found:
[17-08-23 09:17:29.590] ERROR: General , 1692289049590> ExceptionLogger.logException> Exception thrown java.lang.reflect.InvocationTargetException at NativeMethodAccessorImpl.invoke0 (Native Method)..
[17-08-23 09:17:29.593] ERROR: General , 1692289049593> DebugLogStream.printException> Stack trace:.
[17-08-23 09:17:51.966] LOG : General , 1692289071965> EXITDEBUG: RenderThread.isCloseRequested 1.
[17-08-23 09:17:51.966] LOG : General , 1692289071966> EXITDEBUG: GameWindow.exit 1.
[17-08-23 09:17:51.967] LOG : General , 1692289071967> EXITDEBUG: GameWindow.exit 2.
[17-08-23 09:17:51.967] LOG : General , 1692289071967> EXITDEBUG: GameWindow.exit 3.
[17-08-23 09:17:51.974] LOG : General , 1692289071974> EXITDEBUG: GameWindow.exit 4.
[17-08-23 09:17:52.063] LOG : General , 1692289072063> GameThread exited..
[17-08-23 09:17:52.064] LOG : General , 1692289072064> EXITDEBUG: GameWindow.exit 5.
nvm i foud the issuse
Does anybody know what StopPower does on firearms?
the wiki says 'A modifier that affects the chance of a critical shot.'
which is surprising and frustratingly vague
what could be a reason why my clothing mod is invisable
I found that on the wiki as well. It's very vague. I've tried searching here but nothing that was specific came up. I've been trying to dig around in the game files but I haven't found anything that actually uses that value.
Where did you find that?
IsoPlayer.java
Hmm, thought I looked there but maybe not. Anyway thanks for the help :)
How would I use the items parameter in recipes.OnCreate
it prints out [zombie.inventory.types.Comboitem@3b256153]
and i'm oblivious on how to work with it
i figured getName or getScriptItem but errors.
you can see its class details here
https://projectzomboid.com/modding/zombie/inventory/types/ComboItem.html
the ComboItem class itself barely does anything, it just inherits everything from its parent class InventoryItem:
https://projectzomboid.com/modding/zombie/inventory/InventoryItem.html
which i thought it'd inherit the getName or getScriptItem method? 
it does, it inherits everything InventoryItem has
you can basically treat it entirely as an InventoryItem and nothing should really be different
I don't know if StopPower does anything. I have two identical guns, one with StopPower 2 and one with 20 and they have the same crit chance according to the debug console. I've tried different aiming levels as well
https://github.com/FWolfe/Zomboid-Modding-Guide/blob/master/api/README.md#zomboids-lua-component
you need to use get(0) in this case
ngl i've been looking for that link ever since i forgot to pin it
thank you
get(0) is what i needed, thanks to both
ah yeah, components and wiring
implementation of ragdolls into the game
the crafting stations look p sharp
I'm curious if liquid containers will still be their own item type (like bottleOfWater) or just a general object that has a reference to a fluid object that can be mixed in varying amounts
my understanding was they were mixable now, so i would be shocked if that was still a thing
I was just curious about those technical details
seeing extraction of solids is promising too
Would be fun to have some more traditional sandbox mechanics - even some basic chemistry reactions
also with ragdolls being added - I'm curious if the components and wiring up indivdual things will have 3d strings for wires
alot of potential with strings and wires having a 3d visual
finally... the whip mod is viable...
Was it not already? lol
unless you can animate weapon models, not really
I was thinking of grapplehooks and other stuff
i was thinking of swapping between a couple models to give some basic impression of animation but decided it just wouldn't work out
some 3d projectile code for tossing would be nice too
plus i don't think i could really justify it being a particularly great weapon anyway 😅
My personal take is 'good'/'effective' is kind of missing the point to fun
not to mention during the apocalypse one can't be too picky
i just can't imagine it being good at all
I think all items should be able to held and used to bash stuff
whips mostly just inflict pain, and zombies really do not care about that
yeah i agree
That was actually one of my first mods lol
Weaponizes/Adds Sounds to 86 items:
Used a lua table of 'profiles' applying slight changes - this was also when I grew to hate scripts
for some reason the 25 units of water part in the recipe is gray even when i have 25+ units of water. it still lets me craft it and it takes the water but unless i have a container of 25+ water it will be grayed out. why is this happening?
It works if you have a sink or such nearby?
no, it wont work at all with a sink
So the issue is the individual bottles aren't counting their water together for the recipe?
can't gas cans be filled with water?
I guess not... huh 🤔
they must be because it lets me make it but the text is still grey
the code is this if it helps:
recipe Make Biofuel From Apples
{
Apple = 20,
Water = 25,
CanBeDoneFromFloor:true,
destroy EmptyPetrolCan,
Category:Cooking,
NeedToBeLearn:true,
SkillRequired:Cooking=4,
Result:PetrolCan,
Time:1000.0,
}
You may need to create a function for it so it utilizes multiple items that have water stored. But still unsure how it will work on a recipe.
As I've noticed this on the recipe mod I'm working on.
But I set mine to 10 or below instead which is equivelant to just 1 water bottle or less water units from 1 water item.
OR make a non-replacable water bottle item that can hold 25 units of water. 
Edit: I dm'ed you a possible working script.
thanks i will try a bit later
I'm trying to make a simple poster mod that has a recipe that uses OnCreate to run a lua function because it's a 2 part poster and i want both parts to go into the player inventory. the game just throws up errors and will not open the crafting menu just throws more errors. Can someone assist me?
show errors
theres multiple errors right now i believe this might be connected i throws this one up multiple times and also i can't get the tile to even show so theres 100s of erros for that function: @stdlib.lua -- file: null line # 10
function: setVisible -- file: ISCraftingUI.lua line # 30 | Vanilla
function: toggleCraftingUI -- file: ISCraftingUI.lua line # 1368 | Vanilla
function: onPressKey -- file: ISCraftingUI.lua line # 1382 | Vanilla.
[17-08-23 16:06:28.082] ERROR: General , 1692306388082> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: 1.0 of non-table: null at KahluaThread.tableget line:1689..
[17-08-23 16:06:28.082] ERROR: General , 1692306388082> DebugLogStream.printException> Stack trace:.
[17-08-23 16:06:28.083] LOG : General , 1692306388083> -----------------------------------------
STACK TRACE
attempted index: 1.0 of non-table
function: setVisible -- file: ISCraftingUI.lua line # 30 | Vanilla
Looks like what ever your recipe is is breaking the UI
Whats the recipe?
yeah i figured that i just am not sure why. all the examples i could find online are old and i have no experience in lua
recipe Make We Don't Smoke Poster
{
keep Pencil,
SheetPaper2=4,
OnCreate:Make_WeDontSmokePoster,
}
function Make_WeDontSmokePoster(items, result, player)
player:getInventory():AddItem("Base.WeDontSmoke2")
player:getInventory():AddItem("Base.WeDontSmoke1")
end
ah lol i will try it. omg if that's it
although it was working fine before i added the oncreate to it but i will test first
any results ?
good point
no it is still having the same issues. also i was confued in with the lua where i put base.postername i was using the name i used for the .tile but i would asume it needs the name from the scripts i changed that but still same problem
generally recipes require a resulting item
you should make it WeDontSmoke1 and leave the oncreate to make the WeDontSmoke2
the recipe must have a result, it's used for the recipe's icon and stuff
you guys are awesome! i had that thought about the result thing but did not find anything on the wiki stating that specifically so i assumed i could just do oncreate. It is fixed, and in this time i also checked my files integrity and it fixed the model being broken. i was also having issues with another 64 i made not being able to be picked up, but i will check and see if that works now as well, if not i may come back for some assistance. Thank you so much for your time
Hey fellas. I wanted to pick your brain on a mod idea I had.
I was inspired by this mod that makes your character randomly mention things that happen on screen, like when they're barricading, or cooking.
A mumbling/whistling mod.
If your character is in a good mood and has no serious negative moodlets, there could be a small chance that they'll hum or whistle a little tune. Nothing that zombies can hear (for gameplay purposes), but just something immersive for the player.
What do you think?
Something like this? https://steamcommunity.com/sharedfiles/filedetails/?id=2398253681
But audible correct?
Interesting.
Yeah, exactly. Could maybe use a sneeze as a reference; a sound that has a chance to trigger under certain conditions.
If we want to keep it gender neutral, we could just have whistles. If mumbles were added, there could be a few tunes recorded by a male and female mumbler.
I can picture my desensitized vet whistling "Sweet Caroline", timing the gunshots to the "who-o-oa".
Hey there, I'm wondering if the ItemTweakerAPI able to tweak item added by mods?
I know I can do like this for existing item TweakItem("Base.PipeWrench", "Tags", "PipeWrench")
But if a mod adds an item, should I replace Base with its mod Id / module name?
Yes.
Example: TweakItem("GWP.ColtPeacemaker", "ConditionMax", "50")
Edit: A firearm from Gunrunner's Weapon Pack
Thanks!
not all mod make items in new module, check it in script
Hi guys, sorry if this is a noob question but my item was coming up ingame before and for some reason it has stopped working now (not sure what i've done to make it stop working). I am getting the following error message:
WARN : General , 1692300247814> ItemPickerJava.ExtractContainersFromLua> ignoring invalid ItemPicker item type "KuromiBP.Bag_Kuromi"
My item script module is named "KuromiBP and the item is named Bag_Kuromi so the name should be correct
ChatGPT sorted my issue np
<?xml version="1.0" encoding="utf-8"?> <clothingItem> <m_MaleModel>models_X\Skinned\KuromiBP_M.X</m_MaleModel> <m_FemaleModel>models_X\Skinned\F_SchoolBag.X</m_FemaleModel> <m_GUID>3129ea1c-2df8-4d00-a68c-006fd665625a</m_GUID> <m_Static>false</m_Static> <m_AllowRandomTint>false</m_AllowRandomTint> <m_AttachBone></m_AttachBone> <textureChoices>KuromiColor</textureChoices> </clothingItem>
My item is spawnable and wearable ingame but I really can't figure out why my custom model isn't loading ingame? I've checked the zomboid bags as reference and my item locations are correct and even trying the official alice pack model doesn't show anything ingame.
The above is my "Kuromi-Backpack.txt" item script
@wet sandal hi, its possible to add my custom body slot on your tarkov equip ui?
Or your mod not support it?
Is it possible to just simply add ISContextMenu:removeOptionByName to ISWorldObjectContextMenu? I want to remove a vanilla context menu that appears in the world
Because to replace the context menu with my own
don't use itemtweakerapi, it barely does anything and causes a lot of lag
local item = ScriptManager.instance:getItem("Base.PipeWrench")
if item then
item:DoParam("Tags = PipeWrench")
end
```does the exact same thing without the lag or dependency on another mod
Oh, but what if other mods modify the same item but different params?
itemtweaker would have exactly the same issue, since this is all it does under the hood
(but it adds a print in there which makes it lag a whole bunch)
oh actually sorry i misread your question
that wouldn't conflict
for the same reason that this is all itemtweaker does anyway
ah so its no longer valid to use itemtweakerapi
okay thanks!
btw, would you know anything regarding remove original tooltip in game?
wow....
can u print example for more items with another param?
What kind of script do i need to rename vehicles?
does this support modifying in-game/modded recipe items as well?
Mod items yes
you need translation files, media/Translate_EN/IG_UI_EN.txt, IGUI_VehicleNameModernCar = "Dash Elite",
If a recipe uses a function to add items, like all items with a specific tag, and you add this tag to the item, then yes.
Would this work with modded cars?
that's what translations are for
I'm following how other mods are hiding recipes in game like this ```lua
local recipes = getAllRecipes()
local function HideRecipe()
if recipes then
for i = 0, recipes:size() - 1 do
local recipe = recipes:get(i)
-- print("Remastered Kitsune's Crossbow Mod patched")
if recipe:getName() == "Dismantle Hand Crossbow"
then
recipe:setIsHidden(true)
end
end
end
end
HideRecipe()
But it doesn't seem to work if there's a translation file for the original mod, anyone knows what I'm missing?
Original translation file
Recipes_EN = {
Recipe_Dismantle_Hand Crossbow = "Dismantle Hand Crossbow"
}
dont look at translation file
check in script
recipe RecipeID
{
}
recipe Dismantle Hand Crossbow
{
keep Screwdriver,
HandCrossbow,
NoBrokenItems : true,
Result : ScrapMetal,
Time : 800,
OnCreate : DismantleHandCrossbow_OnCreate,
OnGiveXP : Give10MetalWeldingXP,
Category : Crossbows,
AnimNode : Disassemble,
Prop1 : Screwdriver,
}
It's like this in the recipe script
Seems like already the same as inside my HideRecipe function
try getOriginalName, check docs for right command to be sure.
ah i think its a different error from my side as i put it inside media/lua/server
putting it into media/lua/shared seems to fix the issue
Recipes_EN = {
Recipe_Dismantle_Hand_Crossbow = "Dismantle Hand Crossbow"
}
You forgot "_"
weird behaviour as some inside the server works XD
that's the original mod, i wanted to override it
Yeah, ok.
But there is an error in translation line
Hi, have an way to set options to user ? I want to automaticaly set options
----- AIM OUTLINE -----
local aimOutline = self:addCombo(splitpoint, y, comboWidth, 20, getText("UI_optionscreen_aim_outline"),
{ getText("UI_optionscreen_aim_outline1"), getText("UI_optionscreen_aim_outline2")})
local map = {}
map["defaultTooltip"] = getText("UI_optionscreen_aim_outline_tt")
aimOutline:setToolTipMap(map)
gameOption = GameOption:new('aimOutline', aimOutline)
function gameOption.toUI(self)
local box = self.control
box.selected = getCore():getOptionAimOutline()
end
function gameOption.apply(self)
local box = self.control
if box.options[box.selected] then
getCore():setOptionAimOutline(1)
end
end
self.gameOptions:add(gameOption)
And i want to force player to set it to 1, so "none"
So in getCore():setOptionAimOutline(1), i set it to 1 = none, but its only when player apply any settings
Hello there, am I missing something or is it the translation mechanism for tags that is missing in vanilla ? This starts to be "required" when we wanna make appear in the UI the need for any item having a tag.
Yep, but its Easy to do workaround
not when you wanna outline the tag-item is missing
we take all items, check tagged like
local Part1
local Part2
etc
if item:HasTag("Hammer") then Part1 = UI_MyModHammer
else Part1 = UI_MyModEmpty
if item:HasTag("CanRemoveBarricade") then Part2 = UI_MyModCanRemoveBarricade
else Part2 = UI_MyModEmpty
part when u show moded ui with text something stuff like
getText(part1+Part2 etc)
in locale stuff for UI_MyModEmpty = "",
believe this can be improved and integrated into the overall output of the final text
just hook when u take tags and doing translate string for tags and compile final text to show it in moded ui
or some stuff with _pairs and array of data...
Good day. Will mod name change on steam page brake anything, if i'm not changing mod/workshop ids?
Before I start researching how to do it: Would it be possible to do a "dinner mod"? You click in a table with food/consumables in it. A message pops up: "X players waiting for dinner" and options to Cancel/Eat. When you click eat, every player who joined the table would get a share of all the food who was on the table, and the food would be consumed.
Nope. The only thing that would break stuff would be changing IDs
Yes, this is possible to do - just seems like a lot of work though
Passing out food to your friends is more immersive
Especially when you fight over who might be getting more food
It may be a cultural thing but i find serving everything, gathering around the table and waiting for everyone to start rather immersive. Also I'm the official chef when I play with friends and it's a nightmare to keep track of who ate what and who has my pots now. Planning the meals is a lot of work.
My hydrocraft mod's carpentry workbench isn't being recognized in crafting menu.How to fix it?
Is it possible to make an item have a chance to appear on all zeds? If so, how do I go about, or what is a good mod example?
Also, how can I make an object appear on a player character with a specific trait?
like loot in death body?
yeh
zre mod server => folder with ez zombification tests
I've been trying for hours in lua
require "Items/SuburbsDistributions"
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "base.itemname")
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 0.08)
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "base.itemname")
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.08) ```
lua on server side
If you used
```lua
Code
```
My eyes would appreciate it 🙏
Supports most known languages too
Chuck, Chuck!
TYSM
I saw my items on some dead zeds xD you will be credited in my mod when I finally publish it
U know method for disable run or sprint for player?
what's it mean? ^^'
understood xD
Uh? Like stop a player from running?
There may be a field for that already - I'd have to check
like moveables item's, when player can't sprint or run
You could modify the sprinting XML to have a condition
I think trying to pin something in onPlayerUpdate would cause flickering issues
You could also mess with on key down to check for sprinting keys
But you'd need to check for gamepad too (I think)
I think the XML approach would be the least likely to cause issues
Also an underated way to mod - being XMLs can be very finicky and not documented.
You'd use the setVariable() method to apply variables to the animation system - which the XMLs are listening for
but it not work
local player = getPlayer();
local zReExo = player:getWornItem("zReExoskeleton");
if zReExo then
if player:HasTrait("StrongBack") then
player:setMaxWeightBase(12);
elseif player:HasTrait("WeakBack") then
player:setMaxWeightBase(10);
else
player:setMaxWeightBase(11);
end
player:canSprint(false)
else
if player:HasTrait("StrongBack") then
player:setMaxWeightBase(9);
elseif player:HasTrait("WeakBack") then
player:setMaxWeightBase(7);
else
player:setMaxWeightBase(8);
end
player:canSprint(true)
end
Events.OnClothingUpdated.Add(MyFunc)
Can sprint sounds like it checks if they can, not sets if they can
Is there a way to turn off the sprint?
I offered 3 possibilities
I'm not at a computer for some time - so I can't confirm what canSprint is doing
But given what I recall with the speed system alot of it is calculated in realtime
You can modify a players speed - but again - it may cause flickering with the animations
yeh...
So I would checkout the XMLs for walking, jogging, etc to see what it's doing when it thinks you're sprinting
character:setSprinting(false)
nope
If you say so, mods mods probably don't work
Weight apply to player, but not setSprinting - it's should be like change how u move now when movement
setAllowSprint - work, but only one side
call it each cycle of onplayerupdate
Apply to one side?
will it hurt performance?
I try to avoid frequent events...
Also you were using CanSprint - you tried setSprint?
if setAllowSprint false - u can't sprint - u move like walk or run, but if u try run - then your moveables type stack on run state
if setAllowSprint true - it's default player state.
not work, Tcher says it's should be onplayerupdate event
not tryed
I don't understand what you mean by movables stack
if u trying run, when setAllowSprint false, then your movement be only run.
for example.
Character take setAllowSprint false. I can move walk type with S W D A.
If i push ALT + S/W/D/A - it's not turn in sprint - it's turn in RUN state - work fine.
Not pressed any key (stop movement) - player stop - work fine.
Trying walk - push S/W/D/A - player run - that's mean stuck on run state
In general - after I do a run - all my movement goes into a run animation.
I guess it shouldn't be. In essence, this function should disable the ability to sprint.
but they break movement state if this param false
Hi, I feel like I'm missing some really basic syntax error here but the highlighted if statement on line 4 works without a hitch but the if statement on line 11 doesn't return true. They should be checking the same table for the same item type but only one appears to be doing that.
Any idea what the issue is here? I'm worried it's something basic like I missed a space but I've been staring at the same lines for a while.
(in both cases, the options added to the context won't do what they're meant to but I've got them there as it's an easy test to see if the if statement is triggered; the actual use is meant to be on line 22) (also ignore the comment on line 4; that was just a partly copied line to test if it worked there)
Also, got the trait thing working 👍
Ah so setAllowSprint seems to be toggling the sprint key then
Isnt there an option to have running be toggle vs on press?
Again, though, I think your safest option is to check out the XMLs
There's a lot more factors to deal with trying to pin stuff on update or key presses
The hackiest way to go about it is to equip an invisible item with a run modifier
If XMLs don't prove useful
Thanks, I'll take note.
Im now asking the same thing for the 7th or 6th time now, cause I got ignored everytime
what in the love of god could be some reasons why my clohting mod is invisable
could someone just please give me an answer?
if people aren't answering you it probably just means they don't know the answer
You might get an answer if you provide your scripts and maybe post it to #modeling
Asking with no images or anything to judge leaves all that on the other person to step up and start asking you troubleshoot questions
how tho? thats the channel for posting your modeling progress, This is the mod development channel
Basically walking into an auto body shop saying "doesn't work" and not elaborating or offering clues.
and im not asking anythins specivic, literally anyreason would be good enough for me
I dont know the specific reason why it isnt working
Modellers also make their model appear in game - most know why one may not appear
yeah but that is the modeling channel, this is the channel made for developing a mod
thats what im doing
It's also for support. If you scroll up a bit, there's someone asking for help with an issue.
yes but thats isnt what the channel is here for
This is a general modding (mostly programming)
All of the Workshop category channels are for help
And for showing off progress
Except for mod_support - that's for end users
the describtion for mod_development
if Inide stone wanted people to ask about problems and making mods, they probably would have put modeling is for you in there
Alright, good luck
does anyone know how to marshal the binary blob data from the character sqlite database back into whatever java struct it came from?
iirc there is some binary encoded data stored as a blob in the database, it's one of the columns for a character in the table
that aint the reason, I checked that. Thanks for answering tho
Did you make the scripts for it?
hmm... maybe you didn't attach the object to the bone?... As an option, but still...
Would be nice to see the implementation of the scripts too
Could be as simple as a missing }
@bronze yoke
local function Adjust(Name, Property, Value)
local Item = ScriptManager.instance:getItem(Name)
Item:DoParam(Property.." = "..Value)
end
Adjust("Base.Log","Weight","2.25")
Adjust("Base.LogStacks2","Weight","1.5")
Adjust("Base.LogStacks3","Weight","2.25")```
it's work with better performance than itemtweaker?
oh yep... it's old backup
this is basically all itemtweaker does, but it adds a print in there for every single change which causes a whole bunch of startup lag
@manic relic Without a screenshots of scripts and other files it is impossible to help you because there are too many problems to list them
The most common problem is incorrect names
hmmm
IconsForTexture - it's should contain same name from textureChoices in xml for icon name?
kERHUS could you try the model / texture i sent you in DMs for me if you have a moment mate?
oh, i forgot about you... ahaha xD
chatted here.
I'll check, one min
all good ty
THANK YOU, finally an answer I can work with
thats what ive been asking about, an answer I can go after and check if that it is
Usually, if you ask for help, probably don't know any secrets about how to do it, and you probably could have guessed the correctness of the names yourself
I did that (aint it), but the simple structure of the answer is what makes me happy
And don't forget about the ID, they must be generated and written the same way in two xml files
I think that they are correct
something worng with your model
Is string.byte not available in Kahlua?
yep
ok 1 sec
I need to do math on my data, which is anything from bool to string through numbers
How would you know?
It could even be something you're not aware of
sent ya on dms
clothing item and item are right, same as the xml
What about the model script?
you mean the xml
I need to do math on my data, which is anything from bool to string through numbers. string.byte gives me a non-function error
Yes
where is @late hound when ya need him lol
the vanilla ammo strap has it the same way
Huh
oh my.,... the summoning spell worked!
Now you gotta pay him his tribute
quick gamerbro capture it before it flees!
huh?
Too late
authentic peach is THE person when it comes to clothing models.
there is none better.
could anyone help
yes, he did send me to his guide
~~kahlua is kicking me in the nuts ~~
The string.byte thing?
calculating a checksum
If you have access to decompiled code you can Ctrl+f around for it or any uses
As in tonumber() or getting its bytes?
What exactly are you trying to accomplish in the end result?
I'm looping through sandbox options, which are a mixture of booleans, numbers, and strings
The end result will be that the client will send its calculated value to the server, which will compare it to its own value
Then the server will throw its sandbox settings at the client if the numbers don't match
......
I had a better idea
instead of trying to see if the options are the same, we'll check if the server has updated them and somehow the client has them missed
Don't sandbox settings already match the servers regardless?
It doesn't do the same thing though... ugh
not if you have "a butt-load" of mods
Ah
It breaks... Nobody knows why, but me and Eve fixed it
Too large of a packet maybe?
Perhaps... I haven't tested it too thorougly
I only did the brute-force transmit over mod data...
Sending a client command when they are changed server side should suffice
Ah yeah, the trick would be not sending the entire sandbox list
Im having a bit of an issue with sending a giant table over commands lol
not send the entire list and still determine if the client's is off
You could send a partial list of changes made
I used ModData
And just apply them without comparing
Hmmm
I'm surprised there isn't a transmit sandbox already
Then I'd have to somehow make a list of changes, no?
There is, but it only works if you're an admin client
It only applies changes to admin clients?
Yes but it would be only once - server side
No, only admin clients will have their SandboxOptions.instance:sendToServer() respected at all
Oh to send theirs'
That's probably for the admin controls for sandbox
And this doesn't update all clients?
No, it absolutely does
Just the server side and stops?
Issue was that clients logging on wouldn't sync their settings to the server's
That feels like a bug
Before we continue, I'd like to say I'm trying to solve what feels like a non-issue to me because Evelyn asked me to
What copy of sandbox are they getting when logging in
whatever's saved to their client save for the server
They read whatever is stored in their local save, in map_sand.bin file
Pft
Yeah I know, just that ones somewhat significant lol
So you have a method of sending an update you just can't call on it without an admin present
So I made my own
And youre trying to basically have people login and ask for an update
That part already works
What you could do is apply a number to players online when changes are sent
What evelyn wants is have clients ask every 10 minutes for an update(if there is any)
They login after the fact and that number is less than what it should be
Which... I find needless, personally, since once you are in-game, then changes will apply automatically, without issue
Yeah I wouldn't do a cycled approach
Flagging stuff as mentioned would suffice
What I'm not sure about is where to store that number
Could save to a local txt
Well, globalModData
I mean for the player
same
Oh
it's not synced automatically
Like only update if they're online?
Right now, the mod updates a player's sandbox options when they log in
Oh then you're good?
Yes, the entire syncing process already works
Log in and on update seems to cover any possible issues?
Yes
But Evelyn wants a timed cycle?
it is needless
Anti cheat maybe?
If they want to cheat, they'll make java mods
if they're injecting you've already lost
I can only imagine that this would be related to mods changing the settings server-side, and not making an attempt at being multiplayer-compatible
Yeah I'm just not sure why the cycled update would be needed
I'm asking her now
she's asleep or away
But at that point, my mod's store of sandbox data is not up-to-date anyway
Did they say why? Cause I'm fairly certain there's virtually no way to get it done and be low overhead
Well, my idea for it to be lower on network overhead was the checksum
instead of sending and comparing an entire table, you send two numbers
two because I used poor man's Adler-64
Anyway, until we solve that issue...
I want to create a distillery to make ethanol
I think I have figured out a way to make the manual process, with fermenting and cooking... what I want is to make a semi-automated distiller
That I can offer advice on lol
Something in the likes of a composter. You put Mash in, you can later get Ethanol out
And my advice would be copy the composter and not generators
Update when interacting
Yes, I was thinking a composter
Avoid cycled updates etc
But isn't Composter defined inside Java?
Yeah...
If I play the cards right, the hardest part will be making the tiles
Because god forbid I create anything that looks half-decent
You could ask in mapping
Hah... I'll think of something... I guess time to make some moonshine
tiles?
Hello! I am looking to try and develop a mod which allows for the spawning of new items when you hit a player with a certain weapon
I know what the code is for spawning new items. I just don't know how to make weapons work 😭
Indeed... A fermenter/distiller for moonshine, a composter with a compressor for propane/methane gas... And some unknown device to make biodiesel