#mod_development
1 messages ยท Page 20 of 1
I would love to play that.
I would love to play a mod that implements the daytime radiation mod in the Pripyat one.
Like the daylight zombifies you over time or something.
Been thinking about it ever since I was like 5 hours into PZ years ago. It feels like it would be absolutely perfect for an isometric STALKER experience.
Just have psy-zombies like in STALKER if you're outside during an emission and that's where they come from
along with animals etc. I don't even want regular zombies
I want to just play isometric STALKER lmao
I don't think that the zombies will ever become as moddable.
Would be an excellent mod to work on...
You'd have to modify the client & server's core to get a mod like that going.
Anyone know how to develop a server restart announcement in-game? Ex. Server will restart in 15 minutes, get somewhere safe!
the game already supports sending announcements to everyone
Like an auto message? I have server restarts set for three times a day.
no, manually, you would obviously have to write a script if you want to automate it
There's a couple projects online that does this using the global msg you see on screen for restart timers.
Can't remember the names but yes they're out there.
Thanks, I'll keep an eye out.
or at least to dynamically change the texturelights field and lightbar color via lua?
Does everyone do the modelling themselves for their mods? I'd do the same, but my modelling kinda sucks.
Hi, does anyone know how call the 'DataInputStream.read(byte[], int offset, int len)' via lua? I'm a bit stuck in this part. I tried passing an empty lua table and it gives me 'no implementation error'. Any idea how to pass byte array? Or do I need to stick with 'readByte()'?
when you call a java function, if it expects a java type, then you must pass it one
numeric values and strings are converted for you
in essence, you would need an instance of a byte[]
@calm depot
Thank you for answering.
In that case, I'll just stick to readByte / readLine for text files. I couldn't find a way to initialize java byte array. Even the byte class is not exposed.
@calm depot may I call upon your wisdom at this time
sure
I'm trying to figure out why my timed action seems to perpetually get stuck in :perform() whenever it finishes charging the hand crank
It'll stop the animation and everything when the player runs, but it'd be nice to stomp out the bug once and for all.
sounds like you forgot to call ISBaseTimedAction.perform(self) at the end of the function
paste the code
function ISChargeBattery:perform()
self.character:stopOrTriggerSound(self.sound)
print("Done..?")
-- needed to remove from queue / start next.
self.handCrank:setJobDelta(0.0)
ISBaseTimedAction.perform(self);
end
(the setJobDelta on the item is copied over from ISTakeFuel since I thought that might've been causing the problem. Apparently not, but it doesn't break things so shrug)
uh, why do you set the job delta to 0?
handCrank job delta is treated seperately from regular jobDelta
yeah, I don't expect it to break things but it doesn't do anything useful either
Fair tbh
I can delete it rq
But yeah, it just kinda.. loops perform forever for some reason.
pastebin the entire timedaction file
okie dokie
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
(Yes the instant action code doesnt do anything yet, that'll be patched)
sorry, wrong panel
you have loopedAction set to true
theoretically 
Zomboid modding hours
Now I can finally focus on tiny things to make the mod look marginally more appealing
if o.character:isTimedActionInstant() then o.maxTime = 1; end```
You can reduce this statement to
`o.maxTime = o.character:isTimedActionInstant() and 1 or 600`
Not necessary
maxTime is overwritten by :setTime() in start code anyways
Better to set it up there
then just get rid of the if statement
although it would be good if you respected the instant timed actions
not a huge deal, but useful for debugging
literally just did this lol
maxtime is irrelevant since it's dynamically set anyways so
p sure it's required for startup though so I just leave it
yeah, the base class probably expects it to have a value
Alright, perfect!
Thank you once again Oli, can't believe I glanced over that
Now for this mod to be considered complete in my eyes, just gotta make a couple models and a better thumbnail
Blender
Yeye I know about Blender, I'm just not amazing at modeling lol
I dunno, making models for inorganic objects is alright
Is Smart UV map good enough for zomboid?
start with a cuboid and start subdividing and extruding faces
I generally start with the smart UV map and fiddle with it until it's arranged in a way that I'll be happy to texture
I see
zomboid doesn't care
it's for you to arrange as you see fit
the smart map is just a convenience tool
I have no clue how to do any of that but I'll figure it out as I go!1
I think this is an upgrade.
you should ask in #modeling, curious as well
Is it alright to use 'OnTick' event to create a timer? Or there's a way to create coroutine?
local function onTick()
local currentTimestampMs = getTimestampMs()
for k, v in pairs(tFunctions) do
if (currentTimestampMs - tFunctions[k].timestampMs > tFunctions[k].properties.intervalMs) then
tFunctions[k].properties.elapsedFunction()
if (not tFunctions[k].properties.autoReset) then
tFunctions[k] = nil
else
tFunctions[k].timestampMs = getTimestampMs()
end
end
end
end
Events.OnTick.Add(onTick)
can you do it? sure. Should you? almost certainly not
the real question is why are you implementing a timer
is to call delayed functions at certain intervals.
i need it for my custom meta events. just not sure if it's the right way to do it.
the server don't have update event to hook so im quite troubled with it
there's an event that fires every 10 in-game minutes and every in-game hour
oh, there also one for each in-game day
how long is 10 mins in-game to real life time? i really forgot to check on this one event ๐คฆโโ๏ธ
depends on what the game speed is set to
i'll take a look at it. thank you.
at normal speed, 10 minutes is something like 20 seconds
hmm.. i could use it for meta event timing.
that would be a great choice since the in-game time speed is changeable
it really was a hindsight on my part haha. thanks alot
I'd suggest rolling once a day to decide if a meta event will happen, if it will, enable an event for the every10/hour - once it fires, have it unregister itself
yeap, that's a good idea.
if i want to make a short term roguelike gameplay, what do you think is the best duration for in-game one day?
depends on what you're building
the gameplay is focused on one time session gameplay so i'm a bit clueless how long should i decide. should i based it on targeted session length?
you're asking a game design question and currently you're the only person who knows what the game experience should be like
haha, my bad. i just can't make a decision on it. will ask my friends how long they would like to play per session.
anyway, thanks a lot olipro. wouldn't have noticed my hindsight without you haha.
you mean oversight?
yeah oversight
does someone know if and how I can access player inventory on server? inventory seems to be empty on server script but works on client ๐ค
As idea - send command to player client, and player client will send you list of items ID from inv
was thinking about this too, but dismissed it due to performance. strange that server can't access inventory more directly
You might want to work on custom server data storage for player inventories.
reason would be that, the game's architecture has not fully migrated from SP to MP yet.
- get the list of item ids from players when they're connected, compare and store if needed.
- update list if player add/remove items from their inventory.
yeah that's what I'm doing now and works just fine. Thanks for clearing things up ๐
anyone know a "how to make a car mod" video? i cant find it anywhere, help would be appreaciated!
It isn't when you consider that inventory is basically client-side
Until the base game implements full server-side item accounting, I wouldn't recommend designing your mod to do any item operations on the server
Unless you have some compelling scenario where the server absolutely must be coordinating the item operation
id try the filibuster rhymes discord. alot of people there working on car mods, so they probably will know where all the best car related tutorials are, and probably will know more about the process in general
hm, thanks for the info
I'm looking through the modding database at https://projectzomboid.com/modding , Does anyone perhaps know the exact snippet of code one should use for "walk to" to activate at specific x/y coordinate?
Well, I'm working on a "jailbreak" mod to extract all game related data from server to e.g. show on a website or the other way around to trigger events from outside (like a Twitch vote or smth.)
so I guess that would be a reasonable scenario, but I'm working with a server cache + periodic updates from client
and works like a charm - thx ๐
Doing a Java based mod?
nope purely Lua only using tools provided and some linux magic ^^
your better of decompiling it yourself that site is horribly outdated probably from before cars or shortly after
planning to share once I'm happy with it
here is an awesome guide I've used to decompile the game code few days ago ->
Are there example mods with that?
ohh nvm, I tohught it's something else
use the walkTo function on the player object
Hey guys! I'm a bit new to modding PZ, more used to SupCom, and would need a little help to make a clothing mod work. I've been following a steam community tutorial (this one https://steamcommunity.com/sharedfiles/filedetails/?id=2648115890), got the items appearing in the devbug itemlist, but when equipped don't appear, same when dropped on the group with eventual map graphic glitches appearing.
I've been using 3ds max 2019 first, thought it was maybe an export problem and tryed with newest blender version, still no model ingame, only in item listing or inventory
and each clothing model has the armature skinned to it
@heady crystal hi there I have a mod suggestion for you
is there any lead on how to place bagpack attachment?? is it the offset? or does it has anything to do with the 3d model file?
can i do it without touching the 3d file directly?
@heady crystal Have you seen the skyrim mod legacy of the dragonborn, it is a museum that you fill up with all the rare loot, armor, weapons that you find, is that possible?
That's beyond me I'm afraid. I don't make PZ maps.
Anything BitBraven is making right now?
I released a new mod yesterday
I am working on the steering issue of the bicycles atm
Oh cool
Change format to .fbx
Thats first advice i would give you
.x sucs ass
is there a list somewhere with all of the zomboid definitions?
things like Player:getStats()
or PlayerStats:getHunger()
Hi there, new here. I'm sure this may have been asked a lot, and I've googled but don't know which is the best/most current. What is the best guide/starting place for lua modding? I'm a software developer, but know nothing about PZ modding/APIs. Is there a simple mod that I can look through that's a good example to start with? What I've googled has directed to me to year old posts in forums and wikis that are outdated.
I used this to get into modding
This tutorial video will show you how to make a simple drink in Project Zomboid. I will go into the steps involved from start to finish. Read more below.
0:00 intro
1:08 Start
1:44 Searching for images to use in game
2:30 Searching for the Sound Effect
3:06 Creating mod file directory
3:54 Creating mod.info
4:34 Creating a poster
7:14 Adding ne...
Its not most recent, but it will get you on track
Also butchering other mods can help you understand how to
it is :/ but i'll restart the whole thing i might have messed up during the process
https://zomboid-javadoc.com/41.65/zombie/characters/IsoGameCharacter.html#getStats()
https://zomboid-javadoc.com/41.65/zombie/characters/Stats.html#getHunger()
Javadoc Project Zomboid Modding API declaration: package: zombie.characters, class: Stats
Javadoc Project Zomboid Modding API declaration: package: zombie.characters, class: IsoGameCharacter
thanks
Im trying to figure out how to determine if the object attacked is a thumpable. Any ideas? I did try this:
local function onWeaponHitZedorPlayer(_actor, _target, _weapon, _damage)
local player = getPlayer();
local thump = _actor:getThumpTarget();
if instanceof(thump, "IsoThumpable") then
player:Say("I found a thump!");
end
if instanceof(_target, "IsoThumpable") then
player:Say("I hit a thump 2!");
end
end
Events.OnWeaponHitCharacter.Add(onWeaponHitZedorPlayer)
Thanks, starting there. Just what I needed, something to move me in the right direction.
Maybe OnPlayerAttackFinished and check the health of nearby thumpables?
Or if you have a specific tghumpable you can predict, check that? :S
I had similar issue and couldn't figure out a good solution
Hrmm, alright. I thought of the first suggestion but I keep thinking there has to be be an easier way. Have you messed with any of the hooks?
yes from the debug screen if ur in debug mode
search for/select on right
then reload button to the right of the entry or at the bottom of the open script
note that this doesn't work for every scenario depending on when it executes what, sometimes u need to go reload all in the menu or restart the game or at least reload a save/rejoin
but for many things it is sufficient
Use debug mode -debug and press f11
Nope, haven't used that
I just have a quick question about the bayonnets of the brita's firearm mod
How are they working ? is there a key to attack like with a melee weapon or is it the shoving who now produce xp for a melee type ?
hola! : ) anybody knows where i can find something about how the motion sensors work? i mean the code for it ๐
ah okay thanks
what's the best way to get rid of an existing recipe entirely?
base game one
ammocrafting mod, i've been overriding the gather gunpowder recipe but i'd rather just remove it so i can name my recipes what i like instead of being restricted to that naming to match the one i override now
Is it even possible to offset the extents of a vehicle?
extentsOffset seems to be completely useless
Could just delete all the info in the current recipe file(s) then create your own recipe file. Keep the original recipe file with deleted info in the mod directory.
i guess i could mark it as hidden and require learning it with no book assigned, but i imagine there should be a way to programatically remove it
well i can't delete all the info in the base game file from a mod :p
Its just a recipe file?
no
is there a way to detect when a player has eaten something? and what they ate?
/*This is just to yeet the original recipe.*/
recipe Gather Gunpowder
{
Hidden:true,
Category:Firearm,
Override:true,
NeedToBeLearn:true,
}```
can anyone link a mod for managing zombie loot spawn rates? a lot of them seem to be outdated
like i can do that i guess
#mod_support or #pz_b42_chat this is for modders
but check out "More Loot Settings" perhaps
kicks u out of the room
ty sorry about that
Dang I could hear it from here
so anyone got any better ideas than the shenanigans i posted above?
i know i can pull the recipe from lua
can i remove it from the table of recipes somehow?
for that matter i'd love to know how to programmatically add recipes to that table
tried to add attachment to the bag, is there any lead on how to fix this wrong placement?
๐คฃ
lel
I've never messed with this but maybe you can look at authentic Z's files to see how they did it
How can I make some noise at the player position to attract zombies, similar to sneezing
@thorn bane ```lua
addSound(playerObj, x, y, z, radius, volume);
Cheers! What does volume do in this context?
I believe it's how much it gets their attention compared to other noises
Gotcha gotcha, I'll read the docs on it. Thanks!
thanks... i see that i need to change offset, do you know how do i change it inside the game?
Alright, as I (potentially) prepare to set up my next mod, I have a some questions.
Does anybody know how to detect if a sofa / cushion chair is on a tile?
I imagine it would require searching through tile IDs, but I wanna make sure that it doesn't require that first.
how much information can i change on a recipe marked as Override:true
before it goes "this isn't the same recipe" and makes it a new one
because whatever that line is i think i crossed it
mm
oh nvm i was editing the wrong copy somehow.

The only other way I could think to identify it is if they have some kind of special tag, but most of the detection I have to do for my mods use the tile IDs
Is there a mod, or a way to create a mod. That limits peoples resolution to 1080p to prevent OP sight?
Yes you can
getCore():getScreenWidth()
it's in media\lua\client\OptionScreens\MainOptions.lua
Best solution probably is to cehck the current screen width and height, display a warning and then tell the server and kick them
Anyone have any ideas on going about preventing a player from causing damage to a thumpable? I've tested and looked through the available events & hooks but doesn't seem like any are useful for this.
what is going on with bullet amounts and the number of items you spawn with a recipe or function
how come adding "200" bullets gives you "1800" bullets
it's like they are auto-multiplied for some reason
do i just need to divide everything by 9? why?
happens with cheat menu rebirth and with my own recipes..
Anyone know what the clothing definitions are for stuff like masks and backpacks? Trying to add the option to equip a balaclava for one of my traits but I can't find where to put it
I have an issue with mods on my server
Look at the bullet items. "Count" is probably what's causing it. Same thing happens with nails since the count is 5. You tell the game to spawn nails via recipe and it'll spawn 5 nails at a time (unless you use OnCreate or whatever vs just the result item)
that.. that is annoying
how can I reload lua without leave my party ?
so.. can i make it spawn the amount that I want by doing decimal math or do i have to do OnCreate every time i want to spawn less
e.g., if count is 9 and i want 200, 200/9 is 22.22..
can i put 22.22 in there
ugh that won't even round nicely
why is this a feature
Probably have to use OnCreate and do it that way. Never tried dividing the result item but I'm guessing it won't work.
i imagine it'll work if it's evenly divisible lol
but.. only then
ugh
or i can redefine all the items that act like this but then i have to redefine all the recipes that use them :D
pain in the butt
im already doing this just to work around another limitation in the engine
and im faced with another one
๐
Yep, it is. I just use OnCreate, spawn what is needed, then "removeitem". May not be the most efficient way (maybe someone else has a better way) but it works so far.
oh yeah i remember something i saw though
UseDelta on drainables
can i make that lower than .1
like .01, .001
etc
googles around
seems so
guess i can just modify the gunpowder item to make it more granular
i was making recipes to work around the limitation of 1 unit out of 10
not considering changing that
Drainables can be lower than .1 yes. I have a few in my personal mod we run on my server. Pills and other meds mainly.
Is there a way to profile lua functions?
hrmm, there really is no way to determine what object is attacked by a player? Determining if you attacked a player or zed is a none issue with Events.OnWeaponHitCharacter.
I think so and I also think so for zombie attacks as well
Such as detecting if thumpable is attacked ๐ฆ
oh god it creates COUNT even through oncreate
wth
i guess ill have to.. remove the extras? this is really stupid
Maybe by timestamps? But it can affect on performance
i just want to make recipes that yield a single bullet, why is this so difficult to do :|
Why just don't set count to 1?
won't that mess up anything else that assumes count is not 1?
i guess i can do that
it's really odd how it's seemingly impossible to bypass this count system though
It's custom bullets or default?
combination
the mod runs on top of VFE
so it's mostly default plus two types
though VFE may well change the counts
no idea
can of course look
Try get code from ItemTweaker and by DoParam set count=1 to items that you need
Hmmm
see.. that's why i didn't wanna touch it
kinda ripples outward..
i wish there were a way to just override the count
and do X
i was sure that OnCreate would let me
Why you need get 1 bullet and where?
it's an ammocrafting mod
and it's for recipes to craft bullets one at a time
i could of course craft larger groups but that's kinda weird and then i have to do tons of math to get all the numbers right
and i already had to do things to get gunpowder more granular and ratios to adjust the amount of gunpowder to the amount i adjusted the can to
it's really weird that we can't just set a container to hold "X units" and instead manipulate through UseDelta
and that count exists at all
spent all day with this xD
rewrote it twice already
function UdderlyAmmoCrafting.OnCraft9(items, result, player)
player:getInventory():AddItem("Base.Bullets9mm")
end```
i was frankly stunned that this obeyed count
maybe there's an overload that i can specify a number
This too add 5 bullets?
yeah
shocked me
cheatmenu mod also adds count per 1 u ask it to spawn
so i know it isn't just me xD
very odd thing for it to do
i can always retrieve count and remove N-1 i suppose but it's very odd to need to
and lots of excess work
so many layers of extra code just to spawn only one ๐
Maybe just remove after 4 bullets?
player:getInventory():Remove(player:getInventory():getFirstType("Base.Bullets9mm"))
player:getInventory():Remove(player:getInventory():getFirstType("Base.Bullets9mm"))
player:getInventory():Remove(player:getInventory():getFirstType("Base.Bullets9mm"))
player:getInventory():Remove(player:getInventory():getFirstType("Base.Bullets9mm"))
im honestly a little afraid it'll try to remove count, but yeah
xD
very silly to need to do all this tho
to maintain compatibility ill retrieve count in case it changes
and do a for loop
Good way!
oh hey i can set count on InventoryItem
so if i instantiate that and set it to 1 then add it perhaps that'll do
oh
or i can modify the result item itself and not remove the item..
if that works
Anyone know if I use a require inside a function, will it run the commands in the requried file again?
suchg as
function myFunc ()
require "myFile"
end;
Events.OnGameStart.Add(myFunc);
Which one of fellow modders made a guide that also included details regarding the loader order? In particular the order of shared, client, and server folders?
LOG : General , 1661985462822> java.security.InvalidParameterException: Error: Override:true is not a valid parameter in item: GunPowder```
it was valid
all day
or at least it didnt make the game freeze like it is now
on that line
:/
hm
maybe it's unrelated.
yeah if i remove that line it just.. stops there anyway loading the test save
ugh
no error
17% cpu probably stuck in a loop
AddItems(x,n)
X is type, n is count
i thought it'd just add count of count
the way things have been goin
thanks
slowly lost my mind today
rewriting the same recipes like 5 times
and now the game just crashes when my mod loads
with no error
v41.73
Is there any event when an item (like food) is used/consumed?
if you literally mean event
they are all listed here
at least as of 41.65 which is still 99% accurate
u could probably get a relevant state from player update or something but not as convenient as u want
oh, you mean "UseItem", it has the tag "OBSOLETE", no problem?
nah i dunno if that one exists or not anymore
not a good idea to use an obsolete thing
could potentially hook this but it's overkill
that is why im searching for a way to check when an item is used
ah i found why the game was crashing
it only took an hour and 6 minutes
to find that one letter was missing from one word in one recipe
:|
please TIS, please add syntax checking pass to scripts
or like..
print which script it's loading
or..
anything
it cudda gone '"Gunpowde" cannot be found'
and even not crashed
What do you all think about adding a hook to WeaponHit in IsoThumpable.java?
nvm still crashin.
For example:
public void WeaponHit(IsoGameCharacter var1, HandWeapon var2) {
IsoPlayer var3 = (IsoPlayer)Type.tryCastTo(var1, IsoPlayer.class);
Thumpable var4 = this.getThumpableFor(var1);
if (LuaHookManager.TriggerHook("WeaponHitObject", var1, var2, var4))
{
if (GameClient.bClient) {
if (var3 != null) {
GameClient.instance.sendWeaponHit(var3, var2, this);
}
if (this.isDoor()) {
this.setRenderEffect(RenderEffectType.Hit_Door, true);
}
} else {
//Thumpable var4 = this.getThumpableFor(var1);
if (var4 != null) {
...
Also, Anyone know of any good java modding frameworks upto date with the latest version?
hey guys, im trying to add a new item and the distributions file is driving me mad:( any tips?
use procedural distributions
not the loot tables themselves like old mods
and
use for loops to add things that are repetitive
to a list of tables
I could just straight up mod java side without a framework, but then Im not sure how people approach the variable names being off & some of the code not being able to be decompiled with something like intellij
if i use procedural distributions to add to the loottables my custom item, the file that i modify with my item needs to be renamed or stays unchanged like this?
there is one, somewhere, i think.. but nobody does that
there's no hook for java mods
so u have to literally have your users install it manually in the folder
that ain't happening for 99.9% of users
and legally it probably can't even come precompiled
so u'd have to distribute a patcher
For MP, definitely not ideal it seems.
to binary patch it
yeah it's useless
just suffer like the rest of us and use lua, or typescript if u want
:p
i hate lua so goddamn much xD
yeah, ik
it'd be nice to change things that aren't exposed
there's even methods that'd expose more but they aren't exposed

Hrmm
Check this out though:
https://steamcommunity.com/sharedfiles/filedetails/?id=1178772929
They are using a Java server-side mod.
Same guy made the quest mod
yup
Then you have this Java Hook:
Seemingly it depends on what you are doing with the Java that determines whether you need to distribute some kinda of patch.
ok so apparently if you use >10 GunPowder in a recipe
it makes the game hang for all eternity with no error
that's fun
yeah server-side java mods are more realistic as long as not required on the client
so, i changed GunPowder's UseDelta to .001
should give gunpowder 1000 uses
or units
yeah?
i then should be able to use well over 10 units
yeah..?
recipe Craft45Round
{
ScrapMetal=1,
GunPowder;10,
keep [Recipe.GetItemTypes.Hammer],
keep Wrench,
Result:Bullets45,
Sound:Hammering,
Time:100.0,
Category:Firearm,
SkillRequired:MetalWelding=2;Reloading=2,
NeedToBeLearn:true,
OnCreate:UdderlyAmmoCrafting.IgnoreCount,
OnGiveXP:UdderlyAmmoCrafting.ReloadingXP1,
}```
this recipe? fine
recipe Craft556Round
{
ScrapMetal=1,
GunPowder;11,
keep [Recipe.GetItemTypes.Hammer],
keep Wrench,
Result:556Bullets,
Sound:Hammering,
Time:100.0,
Category:Firearm,
SkillRequired:MetalWelding=4;Reloading=3,
NeedToBeLearn:true,
OnCreate:UdderlyAmmoCrafting.IgnoreCount,
OnGiveXP:UdderlyAmmoCrafting.ReloadingXP1,
}```
this recipe? nope, game freezes forever when it hits the script.
it's almost identical, i had to take a wild guess to even figure it out
here's the gunpowder script, just for sanity check
item GunPowder
{
DisplayCategory = Material,
Weight = 0.01,
Type = Drainable,
UseDelta = 0.001,
UseWhileEquipped = FALSE,
DisplayName = Gunpowder,
Icon = GunpowderJar,
WeightEmpty = 0.01,
WorldStaticModel = GunpowderJar,
/*Override = TRUE,*/
}```
commented that override line out as part of insane testing
so did i do anything wrong here, or is this a bug?
does UseDelta not give it more units?
will it work if i do GunPowder=1, GunPowder;1,?
tests last thing
Base.
ill double check
im pretty sure rifles are ###Bullets and pistols are Bullets##
yeah, old version of mod that is known working has it that way too
Delta use is denoted by a ;?
mhm
recipe Make Meat Patty
{
MincedMeat;40,
Result:MeatPatty,
Time:30.0,
Category:Cooking,
}
```
vanilla example
Can use Delta be that small?
You have it as less than 1 tho
UseDelta 0.001
yaeh
it can be
and that part works fine
if i comment out the recipes that use >10 gunpowder
game comes up just fine
recipes that remain work
That's true, you said the other bullets work
Any error?
In console?
no it just sits
CPU sits at 17%
i think it enters an infinite loop
damn thing
LOG : Mod , 1661993911631> mod "nattachments" overrides media/lua/shared/translate/es/itemname_es.txt
LOG : Mod , 1661993911633> mod "nattachments" overrides media/lua/shared/translate/es/recipes_es.txt
LOG : Mod , 1661993911634> mod "nattachments" overrides media/lua/shared/translate/es/tooltip_es.txt
LOG : Mod , 1661993911636> mod "nattachments" overrides media/lua/shared/translate/es/ui_es.txt
LOG : Mod , 1661993911700> loading UdderlyGuns-VFE-PPSh41
LOG : Mod , 1661993911706> mod "UdderlyGuns-VFE-PPSh41" overrides media/lua/shared/translate/en/itemname_en.txt
LOG : Mod , 1661993911708> mod "UdderlyGuns-VFE-PPSh41" overrides media/lua/shared/translate/en/recipes_en.txt
LOG : Mod , 1661993911723> mod "UdderlyGuns-VFE-PPSh41" overrides preview.png
LOG : General , 1661993911738> translator: language is EN
LOG : General , 1661993912461> ERROR: module "Base" imports itself
last bit of console.txt
if i make a syntax error in the item script that is alphabetically first in the mod
that error will show
then it will hang
so i know it's on the recipe script
ive very much narrowed the issue to this
unless there's a syntax issue in one of my last few recipes
goes over them
oh
maybe that's it
there's literally a missing }
i can'
I was going to say
But the blocks provided were fine
to the lack of a syntax check for this damn script parser
i probably spend 20 hours a week
just trying to find out why a script breaks
If it makes you feel any better the bug for hanging sounds in EHE was a missing bracket around a variable
yeah when it gives errors they never make sense, and most of the time it gives no errors
it's EXTREMELY rare that the script thing gives errors that are sensible
ok let's see if it works with >10 gunpowder values
now that that's fixed
i spent all day with working code, but giving me the wrong bullet count, i devise ways to fix that, and it started doing this
cuz of a typo during implementation of said fix
heh
btw i came up with a reusable thing
function UdderlyAmmoCrafting.IgnoreCount(items, result, player)
result:setCount(1)
end```
presuming it works
should if result is InventoryItem
easier than writing separate ones
yeah it passed that point in the log
I had an idea
and my trick works
What would be the best way to go about making it so I can detect couches and those chairs with cushions
if UseDelta of .1 gives you 10 uses, then UseDelta of .01 should give 100, and .001 should give 1000
TileID is one way, but it's messy would require an update every. single. time, something new is added
ntm tile packs
sprite name checks for keywords 
Better way may be to check if it's not a tileID and check if it's something you can rest on
But still requires updates
Idea is I want people to be able to "Check between Cushions" and pull out random items for fun
it has a static list of possible sitting tiles atm
that'd be neat
Stuff like funny rats, remotes, screws, maybe even keys.
i'd probably just assume all couch tiles will have "couch" in their name, and let users report ones that don't
tbqh
the list of ones that don't is likely short af
check for restable + couch in sprite name
yeah that's not as easy
but IRL that's less liekly to have stuff in it
u feel it against chair wood/metal under the cushion
and it can fall out more easily
more likely to hit floor
etc
def easier to heuristically detect by name l.ol
No clue how to check sprites yet but I'll figure it out me thinks
I'd just use some string.find stuff for the name yea?
i've worked with that before but it was with an action not a context menu
i did it on sledge destroyu
to do checks before letting someone
whitelist of what u can sledge by sprite

There is that one mod that lets you get the funny uhhh
Fixes on those broken floorboards
u could iterate all objects on the square
and then do getSpriteName and restable checks
and if one exists
add context menu item
tied to that one
Now for the big question
How do I associate one part of the couch
with a couch
So you don't get 2x as much looting
from a couch
i think there's a system that ties multi-sprite objects together
i dont know much bout it
but that said
there's more cushions to loot the longer it is
kinda makes sense to let them
just reduce loot per tile
and then if it's 2 long u get 2x, and 3 long u get 3x
etc
Is there even 3 long couches?
hm fair point
that said, just halve whatever u were planning to give?
unless u meant one item per couch
in which case that's hard
lol
half chance then
I'm thinking like 2~3 per couch
so it could round to 1 or 2
mhm
whats ur workshop link i wanna watch what u put out and see ur battery thing, assuming that's out
no powered recharger? :p
Not yet
;3
Though imo probably wouldnt be as useful tbh
u'd be surprised
my server is super super low loot, i can find more batteries but im lazy, i'd rather throw them in a recharger at home
xD
as long as it could do multiple
a fancy UI with like 6 battery slots would be nice but not too many ppl wanna fuck with UI
- Would soak up generator power
- Isn't nearly as portable
- Regular hand crank is already fast enough
Vs the chad hand crank:
valid but at that point it's just an infinite battery isn't it?
Not necessarily
hand cranks take ages irl
You have to keep your exhaustion in check
Hm valid
I could look into extending the time, it wouldn't be hard
sandbox-configurable wind time
Rn it's 10 in-game minutes but theoretically and hour could work
And electric charger would be epic but I'd need your help for it tbh
How do I go about the sandbox config?
u add a text file that defines the sandbox options at a certain folder depth of ur mod
and then u add translation strings in the translation folder in the lua/shared/translate
Sandbox_EN.txt
that defines the text and tooltips for them
and then u reference in code with SandboxVars.MODNAME.THING
ill link u to one of mine that is relatively simple
the mod isn't simple but the sandbox options are
and using them in code is just as simple as i said above
So just like
SandboxVars.BetterBatteries.CrankTime
then my heccin formula
I'm also tempted to tie the makeshift crank to an exisitng vanilla magazine but idk about it yet
Might even make a custom magazine for it

:kirby: hiiiii
Now for my mod update list:
- Add custom recipe magazine for learning to make the Makeshift Crank
- Add 3D models to existing cranks + new magazine (woa!)
- Add Electric Battery Charger (4 slots, custom ui?)
- Add Sandbox options for endurance loss and crank time
Seems like you've gotten yourself knee-deep in modding.
apparently
Heh..
This is it?
option UdderlyUpToDate.RestartDelayMinutes = {
type = double,
min = 0,
max = 60,
default = 5,
page = UdderlyUpToDate,
translation = UdderlyUpToDate_RestartDelayMinutes,
}
@weak sierra
that's one of them yeh
@sour island so no broken now, but turns out "GunPowder;24," means "1" unit somehow? lmao i cant get a break
it's a 32-bit integer
Will it automatically add the pages?
yes
Yoo you have an axe now
You only have doubles so I was curious what int was represented as
Like "int" or "Integer"
Cuz it varies
Usually int but yknow
Programming be bleh sometimes
i come from c# world which is "microsoft redesigned java to be better"
so i assume the fact that it seemed natural to me is due to this
lol
I'm familiar with java and a bit of C#
I wanna get better at C# but at the same time its like
Do I really need to? I'm not heading into the programming field so
Most I'd probably use it for is unity
i have a server where i teach it and help ppl if u want an invite to there
got some stuff to do ima afk for a bit.
im bak goes back to fighting with gunpowder units
so
how come all of these recipes with >1 gunpowder unit assigned in game are all 1 unit
example
recipe Craft762Round
{
ScrapMetal=1,
GunPowder;24,
keep [Recipe.GetItemTypes.Hammer],
keep Wrench,
Result:762Bullets,
Sound:Hammering,
Time:100.0,
Category:Firearm,
SkillRequired:MetalWelding=4;Reloading=5,
NeedToBeLearn:true,
OnCreate:UdderlyAmmoCrafting.IgnoreCount,
OnGiveXP:UdderlyAmmoCrafting.ReloadingXP1,
}```
AmIDoingItRiteโข๏ธ
i set that to UseDelta 0.001
to get a 1000 unit per can
precisely so that i could have larger values
and not just eat a can instantly
also not sure why the gunpowder weighs .01 when it has 176 units in it
item GunPowder
{
DisplayCategory = Material,
Weight = 0.01,
Type = Drainable,
UseDelta = 0.001,
UseWhileEquipped = FALSE,
DisplayName = Gunpowder,
Icon = GunpowderJar,
WeightEmpty = 0.01,
WorldStaticModel = GunpowderJar,
/*Override = TRUE,*/
}```
since minimum weight in pz is .01 i made it .01 which i think is per unit.. so it should be heavy..? idk
anyway that's not my primary concern
Evelyn do you think I should implement a "penalites enabled" bool?
Also, would it use "bool" or "boolean"
@weak sierra sorry for so many pings aa
Depression / Low Endurance
some ppl might want that off yeah
Tho I wanna figure out how to add a bool setting
could even make each one be its own box
yeah i think it's "boolean", been a minute tho
option BetterBatteries.HandCrankPenalties = {
type boolean,
default = true,
page = BetterBatteries,
translation = BetterBatteries_HandCrankPenalties
}
mhm
it no workie..
then maybe it's bool, idk
im gonna play for a bit
u restarted game right?
sandbox options aren't part of the lua
iirc
mfw
scripts dont reload without restarting really either
lovely
i've heard some ppl imply they should
but
sometimes they do
u know u shud just disregard me i spent 16 hours fighting recipes and im burned out af
im not even sure if i know what im talking about anymore

im sure one of my mods has a boolean but im too dead to remember which
:D
oh
the reading xp one
go poke that one
it has a checkbox for needing light to read
bump for issue #mod_development message
if anyone knows why gunpowder units >1 are interpreted as 1 by the game..
is ;N not correct for units?
Genuinely can't figure out why it's not loading the boolean option
found it
i forgot
a freaking
= sign
@weak sierra kill me now
anyone know some good mod combos
anyone know a mod that allows you to build above yourself?
want to make a simple roof to shelter from the snow, something like this
and for a nomad run, its overkill to get carpentry lvl > get 15 planks > build stairs > go up and build floor > find sledge hammer > destroy stairs
like, it makes sense that our characters could make something like this for shelter but I would take roof above head if nothing else
@teal basin @wet osprey this is the wrong channel for this, this is where modders chat about making mods.
though i must say grafo your question was very well documented
Hi, I'm trying to edit the erosion settings which will enable me to disable trees from spawning at all.
I found in the decompiled code, there is ErosionCategory for each nature stuff
I'm trying to edit NatureTrees spawnChance value to 0
how do I translate that to lua?
I apologize, I'm new to lua modding
Any help would be greatly appreciated, thanks in advance
the code that I found is from this
private int[] spawnChance = new int[100];```
oh I have been modding, have very low skill but managed to get recipes and change some items values, I thought maybe something like this could be done by changing the settings of stairs but wanted to hear if someone would have a better idea on how to approach it (or best case scenario know about a mod that is similar)
Such a mod should actually be easy to make.
you mean being able to build above the player itself?
Does anyone know where I could find an oven cooking script? I want to make cookable food.
maybe it relates with BadCold = true,
items which can be cooked have the IsCookable = true tag in their item script
GoodHot = true,
IsCookable = TRUE,``` Oh! Thank you!!
Um does cooked&burnt food have item_id?
nevermind, i found out that java modding is different and the erosion code is not behind lua exposer
Trying to make a mod to add skill books for agility/combat, but in game my BookTitle comes up with "Tooltip_BookTitle_<name under DisplayName>". Can't seem to find a reference for this on the forums
how do i call a audio function triggered by oncreate recipe
something that wil play even if a player moves and cancel the action
i want to make an alarm sound on our capture flag event
hey, someone can give me some advise about ProceduralDistribution Table not Working?
I just changed the fridges, added one item.
rolls = 1,
items = {
"Burger", 6,
"Burrito", 10,
"Corndog", 10,
"Fries", 6,
"Hotdog", 6,
"MuffinFruit", 10,
"MuffinGeneric", 10,
"Pizza", 6,
"Pop", 6,
"Pop2", 6,
"Pop3", 6,
"PopBottle", 6,
"PopBottle", 6,
"WhiskeyFull", 2,
"NukaCola", 20,
},
junk = {
rolls = 1,
items = {
}
}
}
something like that.
but in every item
the result is loot not spawning :)
any help? thx::))
and I just realised with necroForge i can spawn the item, so its 100% a procedural Table problem
Procedular distribution?
It doesnโt work this way
I would use Table inserts
could you explain me how does that work?
I would love to but i am afar from pc rn
But you can look it up in other poeple mods
If you want look it up from my mod
Okay i found one @wintry stag
So
require 'Items/ProceduralDistributions'
--PROCEDURAL DISTRIBUTIONS
---["list"]["xplace"]
table.insert(ProceduralDistributions["list"]["xplace"].items, "modID.item");
table.insert(ProceduralDistributions["list"]["placeX"].items, 10);
First is declaration where you add insert to list, second is chance
so this in a lua file?
at lua\server\items right?
In your case i see its from tutorial
Do
require 'Items/ProceduralDistributions'
--PROCEDURAL DISTRIBUTIONS
---["list"]["MotelFridge"]
table.insert(ProceduralDistributions["list"]["MotelFridge"].items, "Nuk.NukaCola.");
table.insert(ProceduralDistributions["list"]["MotelFridge"].items, 10);```
I think so
That it
Nothing else
Inserts it here
rolls = 1,
items = {
"Burger", 6,
"Burrito", 10,
"Corndog", 10,
"Fries", 6,
"Hotdog", 6,
"MuffinFruit", 10,
"MuffinGeneric", 10,
"Pizza", 6,
"Pop", 6,
"Pop2", 6,
"Pop3", 6,
"PopBottle", 6,
"PopBottle", 6,
"WhiskeyFull", 2,
"NukaCola", 20,
},
junk = {
rolls = 1,
items = {
}
}
}
And to other places too
Depends what you place in placeX
to change the ["MotelFridge"]
and this require can be worksop id also ?
using a list of places where i want the item to be spawned?
Yes you reapeat it and add places where you want it to spawn
Also
Make spacws
require 'Items/ProceduralDistributions'
--PROCEDURAL DISTRIBUTIONS
---["list"]["xplace"]
table.insert(ProceduralDistributions["list"]["xplace"].items, "modID.item");
table.insert(ProceduralDistributions["list"]["placeX"].items, 10);
---["list"]["xplace"]
table.insert(ProceduralDistributions["list"]["xplace"].items, "modID.item");
table.insert(ProceduralDistributions["list"]["placeX"].items, 10);
Like this
If you forget space between spawn 1 and 2 there will be error
Ye
`LOG : General , 1662035943446> 561,563,192> Workshop: item state CheckItemState -> Ready ID=2850054689
LOG : General , 1662035943447> 561,563,193> 1662035943447 znet: Java_zombie_core_znet_SteamWorkshop_n_1GetItemInstallFolder
LOG : General , 1662035943448> 561,563,193> Workshop: 2850054689 installed to E:\Steam\steamapps\common\ProjectZomboid\steamapps\workshop\content\108600\2850054689
WARN : Mod , 1662035958521> 561,578,266> ZomboidFileSystem.loadModAndRequired> required mod "DRACasino" not found Any reason Im getting this error ?
@untold junco have you placed you mod in c:/users/zomboid/workshop?
yes, that`s my local source
can someone check this lua code? it works but i get a final error every time. Here you have the code and the error ```function tableInsertPlaceAndItem(place)
i = 1
repeat
print("Inserted "..string.format(place[i]).." to the table")
i = i + 1
until(i < 2)
end
tableInsertPlaceAndItem({"MotelFridge","BakeryKitchenFridge"})
i dont get where the error is coming
What's the string.format for?
@wintry stag
Are you sure you're not trying to use tostring()..?
iirc string.format is for stuff like string replacement, not converting a variable to a string.
@weak sierra
are you still looking for a way to remove all existing recipes?
have you tried the reflection methods on scriptmanager instance?
it might introduce unknown behaviors so, you might want to check on how the crafting UI works at least.
Does this code has any errors? I cant find my custom item inside Motel Fridges.
table.insert(ProceduralDistributions["list"]["MotelFridge"].items, 100); ```
Check if
@wintry stag
aright
so
now its like this my code ```require("Items/ProceduralDistributions")
function initDistribution()
table.insert(ProceduralDistributions["list"]["MotelFridge"].items, "NUK.NukaCola");
table.insert(ProceduralDistributions["list"]["MotelFridge"].items, 100);
table.insert(ProceduralDistributions["list"]["SpiffosKitchenFridge"].items, "NUK.NukaCola");
table.insert(ProceduralDistributions["list"]["SpiffosKitchenFridge"].items, 100);
end
Events.OnGameBoot.Add(initDistribution);```
gonna try it
btw idk if its normal and i cant find a clear answer, but i get the error 1 at the bottom right corner every time i get into a new game for testing
Check logs
Ctr f -> modID
And copy error name
and it keeps not apearing
i wanna cry
thx for all the help btw :)
Remove the last one
I donโt have it in mine dist and it is working
you mean
this?ยฟ
table.insert(ProceduralDistributions["list"]["MotelFridge"].items, 100);
or the spiffo's one?
Yes
Still getting error on game start?
Not nice, can you get whole error?
Error like this
Because it will say whats is wrong
I have question, are both from these procedular
LOG : Mod , 1662045194611> 2x version of perts_basement.pack not found.
LOG : Mod , 1662045194616> loading NecroForge
LOG : Mod , 1662045194750> loading NUK
LOG : General , 1662045194790> AngelCodeFont failed to load page 0 texture D:/Program Files ``` this?
yeah
Do you have file hierahy right?
yeah
I may know the dumbest way to โfix itโ
Try changing its name
Name of dist.lua
I know it doensโt make sense
But once it worked for me so it doesnโt hurt to try
not all, but i want to remove select ones yes - i found a way by obsoleting them and reassigning their ingredients to non-spawning "water drop" just for a second layer of insurance
if you have something to point me at i'd definitely be interested
ive not poked reflection
im used to it from C# in concept
can someone explain to me what Ingredient=N, vs Ingredient;N means in recipes? I thought the former was full item count and the latter was units for fillables, but for GunPowder the latter ended up stuck as "1" every time no matter what N was and the former ended up doing units.
Random question., about the lighter mod i put together. If i want it to override the smoker mod while its activated, how does one do it? Is it just a case of load order or anything code specific?
Now for my mod update list:
- Add custom recipe magazine for learning to make the Makeshift Crank
- Add 3D models to existing cranks + new magazine (woa!)
- Add Electric Battery Charger (4 slots, custom ui?)
- Add Sandbox options for endurance loss and crank time
One down, three to go.
nvm
Looks like I've compatibility work to do on this, the lighter refuels but it creates a separate Empty Lighter, if i support that it should work
Does anyone know how to add baked/burnt food images on food items? It seems the baked/burnt item id does not exist.
Hey just want to ask, is that okay if i change 'VERSION = 1' on my sandbox-options.txt ?
and is anyone know what is the function? because after i change the version to 2 or 3, it's ended with sandbox options not loaded on server
thats not the error, search for "stack trace"
it will look like something like this
attempted index: items of non-table: null <- important
LOG : General , 1652792922933> -----------------------------------------
STACK TRACE
-----------------------------------------
function: insertItemListsInDistribution -- file: HCDistributionFunctions.lua line # 207 <- these are important too
function: Distributions_HC.lua -- file: Distributions_HC.lua line # 494 <- these are important too
ERROR: General , 1652792922933> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: items of non-table: null at KahluaThread.tableget line:1689.
ERROR: General , 1652792922933> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: items of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:492)
LOG : General , 1652792922933> -----------------------------------------
STACK TRACE
-----------------------------------------
function: insertItemListsInDistribution -- file: HCDistributionFunctions.lua line # 207
function: Distributions_HC.lua -- file: Distributions_HC.lua line # 494
probably has to do with future changing of the file format and PZ handling old files that retain version=1. i wouldn't change it though right now it probably would hurt nothing.
there's a generic magazine model that most people tend to go with, though feel free to model a magazine if u want x3
load order and for recipes/items setting "Override:true" and "Override=TRUE" respectively
you'd have to do one of two things: A. hook the UI rendering code and do a check for burntness and render a different icon if so. B. hook the cooking code and when it become burnt set the icon on a per-InventoryItem basis (though this won't persist across reloads so you'd need another bit of code to ensure that it would via moddata or another approach).
afaik
repeats her question
can someone explain to me what Ingredient=N, vs Ingredient;N means in recipes? I thought the former was full item count and the latter was units for fillables, but for GunPowder the latter ended up stuck as "1" every time no matter what N was and the former ended up doing units.
i can and will help u with models if you need, btw.
as long as u give credit
I've found a fix for it, i allowed SMEmptyLighter to be picked up and it works with it now
if (item:getType() == "EmptyLighter" or item:getType() == "SMEmptyLighter") then
local hasDrawnEmptyLighterRefill = false;
for x = 0, playerInv:getItems():size() - 1 do
local vItem = playerInv:getItems():get(x);
if (vItem:hasTag("Petrol") or vItem:getType() == "PetrolCan") and vItem:getUsedDelta() > 0 then
if hasDrawnEmptyLighterRefill == false then
local fuelSource = vItem;
context:addOption("Refuel Empty Lighter with " .. vItem:getName(), item, CraftAndRefillLighters.doFillEmptyAction, player, fuelSource);
hasDrawnEmptyLighterRefill = true;
end
end
end
end
idk what ur mod is doin i didnt read all the context, but glad u figured something out 
grats
is the data for when a cell was last visited and when a chunk was last "seen" exposed to lua?
i see IsoGridSquare has an hourLastSeen
so i guess u have to make an IsoGridSquare for a given cell? im not super familiar with these classes yet
hm looks like that's just one square (i knew that, boy i spaced out)
IsoChunk has "visited" and "seen" doubles
hm the visited and seen doubles in the docs aren't on IsoChunk in the decompile
I can model a bit, I just need to figure out how to unwrap and texture.
Magazine I might just re-use the in-game model but retexture it
I appreciate the offer tho!!
Might consider it anyways lol
I'm just worried about the UV mapping and painting tbh
How do I reference textures that I created for items? I thought it was simple as creating textures/Item_<name>.png, then referring to it from scripts like Icon = <name>, but my game is frozen on reloading lua
Yes.
It is exactly that simple. It turns out that when editing I had missed a bracket close, and that messed up everything
In follow up on yesterdays question by rathner, made this to tackle 2k and 4k OP sight
Method calls on Playermove, i can change that and will implement a mssg thrown as well.
Its my 1st Lua work, im a .NET dev, so dont go full stackoverflow on me plz
basicly forces you in 1920*1080, full clientside
any thoughts?
and thx to HamsterCute for putting me on the right track, if you have a steam handle i will gladly credit you
people with 4k and 2k monitors can see way further then 1920 users, hence unbalancing PVP/multiplayer
im tempted to call on PlayerRender, but bit affraid that might cause hickups on the actual moment you join
You won't need to call it that often XD
can i call it somehow after the connect and1 st player render?
i will gladly take any suggestions, i normally write c#
There are lots of events and you can probably also edit the menu code so wehn they close the menu
OnGameStart woudl be nice
Yes, but the game tends to lag a bit when you 1st enter, thats why i didnt do that. Thought changing the res then might cause crashes on low end systems
Yeah you shouldn't really change resolution XD
Instead just display a message or sth
i'd rather keep the server out of it, so rather no kicks
maybe forcedisconnect
mssg, sleep and force?
There's sleep?
It will execute every minute.
Just warn and then yeah disconnect
media\lua\client\OptionScreens\MainScreen.lua
Anyone know of a way to get ISObject info on objects that you hit or target? Pretty much just want to determine if the object the player hits is thumpable or not.
ok, will fix tomorrow and will credit you on steam. thx
Ohh it's okay no credit needed ๐
what is that isoobject info?
Pretty much any type of object information on objects that you hit.
I have only managed to get target/hit info on zeds & players
ohh noo, I tried too, couldn't
Do you know what your target may be?
I ended up saving the object
I dont. The closest i can get is square info on click. From there I can possibly determine which objects exist but then it doesnt work since players can attack objects without directly clicking the object.
What's the full mechanic you're trying to do?
if player attacks thumpable end
--DO SOMETHING
end
havent really thought out the full mechanic until I figured out if this was even possible.
Tried this but getThumpTarget() results in nil when attacking a thumpable.
local player = getPlayer();
local thump = player:getThumpTarget();
if thump ~= nil then
player:Say("Attacked a thumpable");
end
ill put like popcorn or something random and ill try it, sorry for not answering didn't had time but thx @grim rose i apreciate a lot ur help :))))))))
No worries, i went offline soon too
:))))
Also @wintry stag next time you will be checking errors look for this
still not working @grim rose :((
gonna search for that
Hmm if you want i can send me 7zip of that mod
at this chanel or dm ?
Dm
aright
Hello, Where can I find documentation on recipe function signatures? I see recipe's have: OnCreate, OnGiveXP and OnTest, but I don't fully understand what's there. I've seen some mods like AuthenticZ and found one signature used with OnGiveXP:
function AZRecipe.OnGiveXP.Tailoring20(AZRecipe, ingredients, result, player)
player:getXp():AddXP(Perks.Tailoring, 15);
end
Is there any documentation out there that describes what OnGiveXP and other functions signature is?
I've tried google, the wiki, light searching here for "OnCreate" and the https://projectzomboid.com/modding/ site, but I haven't been able to pin point it.
That link is from documentation generated back in 2015 and is heavily outdated.




