#mod_development
1 messages · Page 146 of 1
Already using it to avoid critical damage and one hit kill to him... just need to increase health now
woah so one could hypothetically make a mod that lets you see your old zombie on the map
Zambies has special zombie variants, maybe you can find some inspiration there
would be cool to let your former self roam free and see where it goes on the map
it still unloads, it just keeps moddata
Yeah, stuff that's not close to a player will unload
And I don't think you can spoof the game to keep multiple chunks loaded
For good reason
Although that'd be a fun experiment for a mod
Is anybody here working on like an updated bicycle mod
Does the game really load lua scripts alphabetically? I'm trying to override some DoParams that another mod does in one of its shared lua scripts with a custom mod, and if I name the lua script something higher alphabetically, it doesn't work, but if I name it something lower alphabetically, it works fine...
Completely unaffected by mod loading order
It does
Is there a better practice for trying to do what I'm doing, then? I can't just rip the mod, change it, and reupload it to the workshop for the sake of adding some compatibility with another mod
Can you elaborate on what you're trying to do? You could check that the mod is active then require its file to ensure it runs first
The mod in question changes the MountOn param for some weapons' attachments, and I'm trying to expand it to include those weapons + some additional ones from another mod
So if it runs after your code, it's problematic? It sounds like you'd just need to do the same thing for the additional ones
Well when it runs after my code, it completely overwrites the MountOn param
so if for example it were doing DoParam:("MountOn = Pistol; Pistol2") and I were doing DoParam:("MountOn = Pistol; Pistol2; Pistol3"), just as an example
Gotcha. In that case yeah, a require should do it
Awesome, thank you
was here thinking I could just get away with loading it further down the list
I think a common method for patches is prepending the tilde character, ~, since that sorts after the letters. I'd prefer a require, but then again if the original mod changes the filename it could cause the patch to not work
So perhaps doing that as well would be wise
makes sense
is this decent or anything I can fix?
ideas how to prevent errors and remove event safely? I thought coroutines were already using protected calls.
*I'll add dead status check.
@jaunty marten
@rancid panther
Has anyone made a bug report for that? It would be a trivial fix but I don't think we can really do anything about it since the Event class isn't exposed (but I'd be happy to be proven wrong)
no, it removes fine when no errors are in the coroutine
You can use pcall to capture errors
I see what you mean now, but I still think that bug ought to be reported
yea sorry i wish i knew
This is from https://www.lua.org/pil/9.1.html, so I thought it would be fine.
Note that resume runs in protected mode. Therefore, if there is any error inside a coroutine, Lua will not show the error message, but instead will return it to the resume call.
It should be, but this is Kahlua so that may be inaccurate
Been too tired and unmotivated to work on the vscode extension..
Still a lot of work ahead.
this is why I hate how events made. why they didn't it in way with custom id like Events.SomeEvent.Add("AnyID", func)
say me at least one reason to use hash tables 
I don't think there's anything inherently wrong with the way it's set up, but I find it odd that the remove bug would stick around so long
The UIManager has similar add/remove (i.e. addToUIManager, removeFromUIManager on ISUIElements) but handles them in the way you'd expect, by not removing them until after iteration is done
didn't check these things cos still have no exp with bugging panels that u cannot close them
what cannot be said about events
I just happened to see it while looking at other stuff in there
Has the mod that allows you to create missions been released yet?
Is there a line of code i can use in .lua to check if the character is encumbred?
Just like you can use "getScratchedTime()" for how long a scratch will last for
Javadoc Project Zomboid Modding API declaration: package: zombie.characters, class: IsoPlayer
That, with MoodleType.HeavyLoad (> 0 → encumbered)
Damn, thank you very much
Do you happen to know something about walking animations?
That's a very vague question, so... yes, in that I know that they exist
Im making a mod with a custom walking animation, but for some reason the animation will always be extremely slow no matter how many frames i use, which is very weird
I haven't messed around with animations too much yet, so couldn't tell ya
No problem, thank you very much
This already helps a lot, i was checking for the encumbrance thing under the inventory section and couldnt find a value for it, only "getWeight"
Are you talkin to me by chance?
whomever I was at work so dunno who it was.
but thats the order of loading, shared, client, server as above.
Sorry for taking your time, if i want the code to not be active if the character has the moodle, it should look like this right?
player:getMoodleLevel(MoodleType.HeavyLoad) == 0 then
The code within the if statement? Yeah (I phrase this as a question because if is missing there)
Yes, i havent sent the code here cause it looks like this
Ah
i cant send, over 2000 characters
That's okay, everyone's learning at some point
The entire get[NegativePenalty] section for the legs is so the animations wont play if you have your legs injured, cause right now, since i cant get my animation to play faster naturally, i have to alter its speed in the XML file, which alters every Limp animation speed along with it, making it look goofy
An if statement of that size is a hint that something can be improved—in my opinion it should very rarely if ever span multiple lines
Since you're doing the same checks for every body part (that you're concerned with), it's a good candidate for a loop
How do i use that?
I think if you can figure a way to do this without running this on player update it'd be ideal
Im not sure, because the way it was supposed to work, originally without all the workarounds, was that if your health goes below 80 the animations would take place
Gotcha
Essentially the vital part would be this ↓
if player:getBodyDamage():getHealth() < 80 then
Another bit of advice is that you don't need to explicitly check for true and false in if statement conditions, in most cases. Just x or not x would suffice
The rest is a workaround for not figuring the animations
"x" stands for true and "not x" for false?
x stands for some expression, such as player:getVariableBoolean('IDD')
Also I just realized, https://www.lua.org/pil/4.3.5.html is what you should read (although I'd recommend reading all of PIL, really)
Also, indentation. The code doesn't care, but being consistent with your indentation is a good practice that will make your code more readable (I hope my sending these in bits and pieces isn't too suspenseful, I keep getting distracted)
Its just that i dont really understand how i would apply these things
What's confusing?
I suck at codding, like the
for var=exp1,exp2,exp3 do
something
i assume i would do var=FootL,FootR,[...] Right?
Sorry. → for var=FootL,FootR,[...]
but the "do something" part is what i dont get
I would create a table with the body parts and loop over that. See the second link I sent
To be clear, though, exp1, exp2, and exp3 in that example are numbers, like in the other examples on that page
Yeah i think i would have to study codding from the start, i never really learned anything about it, im dragging myself throught trial and error here
Learning by doing is fine (you still should learn by learning eventually though 😄 ) 🤠 Just some things to think about
Codding seems really interesting and fun, what bugs me is how these things het implemented in practice, like the "getVariable" from PZ that took me a long time to undestand that this was a thing of the game, not the language necessarily, i even thought before that the game was codded in .lua, which is stupid i know
So, I was able to set the zombie health. But now he's disappearing even if I don't hit him
Anyone knows why this is happening? I'm increasing a zombie (with custom outfit) health on onZombieUpdate, it works but after a few seconds it dissappears. If I don't change the health, works fine
i think chuck had that issue before? he probably knows something about it
the game already has a table for body parts. look at getBodyParts()
it's not all body parts
does anyone know how i can mod tv's to create custom channels or if there is already a mod for that? I would like to create a little cinematic short and in the intro i want a broadcast playing with custom audio and text from a tv.
oh i see
Yeah just the lower parts
is there a way to make the play do the stomp animation?
what is the best way to create an explosion effect? (or just creating animated particles, effects)
Omar taking time to help others. Glad to see it.
hi~ i want to make a mod. it adds an option to the context menu when you right click the backpack icon on the right of the inventory page.
I could realize this by modifying the vanilla 'ISInventoryPage.lua'
But how to do this without editing vanilla lua scripts or functions?
it seems that the related function 'ISInventoryPage:onBackpackRightMouseDown' is binded to the button, not triggered by events🤔
is it possible to declare a fixing recipe using more than two items?
yes, for example requiring a metal plate and welding mask
Oh wait, for two items, no
Anyone here knows how to do googlesheet formula and what not
Looking to hire someone for a job
How can i create a sprite on a tile
what are you trying to do
i'm trying to make an explosion effect
Is it illegal to advertise those things in your country?
doubt it
I have to rethink about publishing local beer mod because it's illegal here
won't risk it
ayo i love google sheets but also i dont have time for that
i would try chatgpt in all honesty
ive used it for spreadsheet functions before
I heard chatgpt is good at that too
you can create parody easily without using the actual brand image
hm, I think you can use AttachedSprites.
Look in server/Camping/SCampfireGlobalObject.lua for AttachAnim
yes, that's one of the options but meh
ok
it's more fun (imo) to create fun parody logos than to put the original one in for a game
we did that for mortar mod planned to turn it into api but dont have time to do it 😦
not sure if it's still count as alcohol promotion
it's a videogame it doesn't have to make sense
what u trying to do in spreadsheet?
say literally its not alcohol
but it gets you drunk
how?
who cares
but that would avoid it
lol
actually u said u plan on hiring so maybe it is a lot-lot
my to-do list for my mod:
-make lights flicker
-make light sources weaker
-balance sounds better
-remove scuff
those stuff related to the atmosphere might be better as a separate upload
i think i found it, but i quite don't understand how do i use it
i still need to learn how to turn a square into a sound emitter so i can use isPlaying() boolean check
are emitters specifically used for sounds that other players and zombies can hear? or they can be client-sided as well?
Emitters are mostly for playing the sounds, it involves fmod and I'm not sure on all details.
Then a separate function adds "sound" for zombie attraction.
someone made an interesting note on my mod that if the item is used from a bag rather than the inventory on its last use, it wont replace the item in the bag
if newDelta == 0 then
character:getInventory():Remove(item);
this is how i was replacing the item so I see the problem
how can I instead check the players items + items in bags?
ah
i remember seeing a way but i am not on pc
i think it is something simple enough that u can just look at the vanilla function for that
ah, i saw that. i saw a lot of uses of self.character:getEmitter() but not anywhere could i find something for a tile. i do recall there being a getRandomFreeEmitter() function but i could not connect the dots on how to get a specific emitter
You could use item:GetContainer() to check the container it's in. I'm not able to check at the moment, but I'd think there would be a way for an item to remove itself rather than having to removing it from its container
It might be getContainer, not at my computer atm
turns out i didn't have to
i was using drainables completely wrong
i was taking the useDelta down to 0
but replaceOnDeplete wasn't working
so I was manually replacing the item
turns out if I just called self.item:Use(), it registers the custom timed action as a use and will let replaceOnDeplete function
1
2
item Glue (module Base)
{
DisplayCategory = Material,
Weight = 0.1,
Type = Drainable,
UseDelta = 0.2,
UseWhileEquipped = FALSE,
DisplayName = Glue,
Icon = Glue,
Tooltip = Tooltip_FixItems,
SurvivalGear = TRUE,
WorldStaticModel = Glue,
Tags = Glue,
}
item 5pkGlue (module Packing)
{
Weight = 0.35,
Type = Normal,
DisplayName = 5 x Glue,
Icon = PGlue,
}
recipe Pack 5 Glue (module Packing)
{
Glue=25,
Result:5pkGlue,
Time:50.0,
Category:Storage,
}
And here's my pseudo code
local weight = Base.Glue.getActualWeight();
local delta = Base.Glue.getUseDelta();
Packing.5pkGlue.setActualWeight(weight * 5 * 0.7);
Packing.Pack 5 Glue.Glue.setUseDelta(1/delta * 5);
What I want to do for is mod's compatibility. If other modes override weight and usedelta of glue, I want my mode still to work perfectly. Sorry for asking without knowing lua language but I'm desperate for this. Is it possible to code like that? (Changing weight of 5pkGlue and requirement of recipe)
anyone know how to select the overlays of a certain square by name?
function getTopSprite()
local objs = getPlayer():getSquare():getObjects()
local sprite = objs:get(objs:size()-1):getTextureName()
local target = nil
if luautils.stringStarts(sprite, "blends_streetoverlays") then
target = objs:get(objs:size()-1)
end
return target or nil
end
if getTopSprite() then
print(getTopSprite():getTextureName())
getPlayer():Say(tostring(getTopSprite():getTextureName()))
end
the errors if you go over a gas can lol
Okay, you can edit the recipe. You first need to find it, which requires you to iterate over all of them, pretty dumb
Then you must iterate over its source to change how much glue it takes
recipe:getSource():get(0):setCount(amount)
Well, you can find it by just indexing it
is it actually the extension
idk what that means this is my first time modding
i followed this guide
i followed the structure but when i put my mod outside the mod folder i just get "There are unrecognized folders in your Contents/ folder."
ok nvm
idk what happened but it works now
yes .info is the entension
just like a .jar file is nothing but technically a zip file. rename it poof no more java running open with windows....
Hey man... maybe you can help me again? I did the setHealth to increase the zombie health, but now it disappear after a few seconds... any clue why this happens ?
Are you doing that from server or client folder? I'm curious about that as I have a similar issue but never took the time to investigate
On server
But already notice that if I spawn the zombie too close to me the event onZombieUpdate run on client side... so I think I should put it on shared
But its the increased health that is making him dissapear
This is an MP issue so I do think it is caused by the system detecting a desync in zombie health
anything I can do to make it work ?
this is going to drive me INSANE.
it is only getting the BASE TILE in a square rather than the overlays which is what i need to remove.
I have not fixed it in my mod. Maybe moving to shared would fix it, if it is indeed because of desync.
@faint jewel
I think it should be getAttachedAnimSprite, if aas then iterate through them and check the sprite name (textureName)
I will try put it on shared
still no :/
you talking overall health of all of them?
--Road Repair
for i=1,sqSize do
local obj = sqObjs:get(i-1);
print(obj:getTextureName()) -- this never prints anything but the BASE tile name.
if luautils.stringStarts(obj:getTextureName(), "blends_streetoverlays") then
if isClient() then
sledgeDestroy(obj)
else
obj:getSquare():transmitRemoveItemFromSquare(obj)
end
break
end
end
i need it to find the crack in the blue circle. but instead i only get the ROAD tiles.
sure its a crack not a physical shadow on the model?
i promise they are.
they are the cracks you see in the road.
they are all on one sheet.
well if you need the list of files in all the packs shout. I extracted them all
The overall health of the zombie
i know the sheet i need.
blends_streetoverlays_01
but it does not DETECT them. it only detects blends_street_01
ah.. following now
event trigger you can hook into?
as for the zombie health thing I was thinking anti-cheat but MP wise I got no clue if they even deployed anything like that.
that or its hard coded?
I had my own body become immortal one time after I died I couldnt kill my own self for nothing till I used a car.
guns melee didnt matter
how do i make a occupation mod?
profession framework is the easiest to build from (in my opinion)
idk how to use anything
you can see the examples on their github https://github.com/FWolfe/ProfessionFramework
so where do i start if i want to make a proffesion
you install the PF mod as a base, then make your own pz mod based on this lua as an example https://github.com/FWolfe/ProfessionFramework/blob/master/examples/default_professions.lua
granted you dont need profession framework, you can make occupations without it, but if its your first time modding then i recommend it
i guess i will ask gpt to copilot me
copy the profession framework example for a vanilla occupation and adjust the values first. that's the easiest place to start
wym vannila occupation
the ones in the real game
sigh
profession framework has examples for them
Ive sent you the xode and it detects them
Code*
it dopes not work with what i am doing.
where do i find
I dont get why not
You just need to replace the dekete function for the attach sprite
Or delete parent and respawn
Ok so instead of having it go to waste then ill just share it here incase anyone needs a similar function
streetcracks = {}
streetcracks.tiles = {}
for i = 0, 23 do
streetcracks.tiles["d_streetcracks_1_" .. i] = true
end
function isStreetCracks(spr)
return streetcracks.tiles[spr] or false
end
function getTopCrackSprite()
local player = getPlayer()
local square = player:getSquare():getAdjacentSquare(player:getDir())
local objs = square:getObjects()
local sprite = objs:get(objs:size()-1):getTextureName()
local target = nil
if luautils.stringStarts(sprite, "blends_streetoverlays") or isStreetCracks(sprite) then
target = objs:get(objs:size()-1)
end
return target or nil
end
-- function getTopAttachedCrackSprite()
-- local player = getPlayer()
-- local square = player:getSquare()--:getAdjacentSquare(player:getDir())
-- local objs = square:getObjects()
-- local attachedSprites = objs:get(0):getAttachedAnimSprite()
-- for i = 0, attachedSprites:size()-1 do
-- local sprite = attachedSprites:get(i)
-- if sprite and sprite:getName() ~= nil then
-- if sprite and (luautils.stringStarts(sprite:getSprite(), "blends_streetoverlays") or isStreetCracks(sprite:getSprite())) then
-- target = attachedSprites:get(i):getParentSprite()
-- end
-- end
-- end
-- return target or nil
-- end
function destroyTile(obj)
if isClient() then
sledgeDestroy(obj)
else
obj:getSquare():transmitRemoveItemFromSquare(obj)
end
end
Events.OnPlayerUpdate.Add(function(player)
--if not player:isDriving() then return end
--TODO add moddata to your vehicle and change the if condition above this line with the commented line below
--if not player:getVehicle():getModData().Skizot then return end
if getTopCrackSprite() then
print(getTopCrackSprite():getTextureName())
player:Say(tostring(getTopCrackSprite():getTextureName()))
destroyTile(getTopCrackSprite())
end
-- if getTopAttachedCrackSprite() then
-- print(getTopAttachedCrackSprite():getTextureName())
-- player:Say(tostring(getTopAttachedCrackSprite():getTextureName()))
-- destroyTile(getTopAttachedCrackSprite())
-- end
end)
been poking around the decompiled java files since I want to get into modding
wow there's a lot of (presumably) left over code from things like old npcs/blacksmithing
yes your thing does a thing. congratulations. but it is not the thing I am in need of. I have been trying to tell you i need it to work with MY code. not a whole new code base. as that breaks ALL THE OTHER THINGS I AM DOING.
i just need to know what is different in our selections., that is stopping it from selecting the overlays
read the mod description. it tells you everything you need to know
anyone have any pointers for me? im trying to find how the game makes the radio chat use random "..." and "<wzzt>" strings during a storm, when using a walkie talkie to talk to your multiplayer friends
or which folder, rather
Ye i get you. Which is why im dropping it here for someone who might need it
I believe azak has a tutorial for wordzed
Maybe thats what you need
#1070852229654917180 message here @gaunt meteor
Not sure but check it out it might just be what you are looking for
I have literally no experience in modding yet, but a quick search through the files led me to
lua\server\radio\ISWeatherChannel.lua it has some reference to it I think
thank you both!
How do i use attachedsprites? i can't understand this thing
I had similar issue -- I forget exactly what I changed but you can check EHE's repo
It involved moving part of the attack code to clientside and part of it on server
If the zombies are vanishing when you go to attack them
I will do some testing later, but he vanish even if I don't attack him. In fact, the attack part of the code its not even active, just de set health. I will check moving into shared asap
can i print some things from the game api in debug console with some command? straight up lua? sth else?
If you print something with print via Lua it will show up in the debug console
print('this will show up in the debug console')
👍 👌 🙏
Wish I knew how to link to threads—there's a thread within this channel for mod ideas
thanks
npc will be in main game, so can't avoid them
Didn't work, put in shared, but it keeps vanishing after a few seconds
it´s gonna take a while?
Out of curiosity are there certain categories of ZedScript that are deprecated & not used anymore?
Like animation or animationsMesh..
runtimeanimation was one I found in the engine.
I might be asking questions that are way too technical here..
Anyone else know why this happens on MP and how to solve it? I'm setting a specific zombie health to 50 calling in onZombieUpdate. But after a few seconds the server removes the zombie.
if you looking good you can see they kinda already in there just not implemented yet? ie npc's
I do the damage directly in client for EHE @frosty estuary
I also set their health there too
I would pull out the other stuff and test each feature solo
Are the zombies disappearing all the time or just when hit?
All the time
I'm not hitting him. I spawn a zombie, it runs the update call, set the health to 50 once, then few seconds later the server revome him. All this inside onZombieUpdate call
I'll try ir on client side and test some different approaches to see if work and identify where's the problem
The damage part I already do in client, but I'm not hitting him yet, it's the increasing health that makes it disappear.
If you dont find anything useful I may try to take a look tomorrow
Hi guys 🙂
Hi everyone, I just created my first mod, but im not finding a way to get it into the mods list once I open the game, can anyone give me a helping hand with that ?
the mod is in the username/Zomboid/mods and it has the media folder and the mod.info file inside and inside that media folder I have the lua folder and the sound one.
inside the lua forlder I have the client folder, and inside that one the code itself
and in the source folder the wav files
thanks in advance 🙏
Whatcha building ? @frosty estuary
If you dont mind me asking
if it's not on the list it probably isn't finding the mod.info or there's an error in it
Did you upload it to the workshop?
no i want to test it first 😛
ill try to take a look at that again @bronze yoke
Can you share like screenshots of folder structure
the description of it sounds correct (sounds should be in sound not source but that shouldn't stop your mod from showing on the list)
Directory
If theres nothing wrong there then perhap theres a mising folder
Or file
Fair enough. Can you show your mod info
duuuude im so dumb it was the version in the info file
thanks both you helped me realize that !!
So its now showing?
Just trying to make a custom zombie with more healthy to be more difficult to kill on my server
Ok thanks
Albion if you heal zed woudnt that cause them to vanish
Idont know why ehenever i played with their hp they just despawn
there's some specific rules on how you need to do it, chuck ran into a similar issue with changing zombie health but doesn't remember the specifics of how he solved it

What about the tutorial function
Immortalmom or immortalzed something
On the mom scenario
I tried it it didnt work
Idk why maybe im not using it right
Let me oook for it
it was a networking issue i think
Most of these only work in sp
yeah i wouldn't expect anything from the tutorial to work in mp
I'm using mods that increase damage in specific cases and plays with the zombie health but to decrease it. But in this one trying to increase it's making them to disappear
Even if you send command?
some of it might work but nothing tutorial specific will have been designed to be networked
if something from it works in mp it's a happy coincidence
Is there a way to capture whatever the player is aiming at? Maybe if that is possible
Then before the actual "hit happen"
Do some stuff to prevent the player from actually shooting
For reals and make it look like he did
By triggering the shoot animation and then muzzle flare reduce the guns ammo etc
if you hook attack
But you have to check if the zed you are targeting is the special zed
maybe weaponhitcharacter actually
Yeah but that already hits the thing
it hooks all the consequences of the hit
so if you don't do anything the target won't really be hit
You might not be able to nil the damage param
Or even if u do its already too late?
you might not be familiar with hooks
when you hook it replaces vanilla java code
weaponhitcharacter hooks all the calculations to do with the character being hit
I think i am but if you dont think i am then i must not be
Pls educate me..
Ive seen your guide tho
You can set ignoredamage to true on the target, so it will not get damage just fot this hit
Ok wow
So yeah just hook it then
Comment out the damage
Ok if that works then i dont understand whats the thing missing i mean i thought you needed help to make the zed seem tougher
You could do what you mention since it works for you and just add a counter of number of times it should get a hit before actually taking real damage
You could base it on the weapons damage maybe
If the counter reaches a certain number
Then do the damage
pretty much giving them a shield
Reset the counter
Then repeat?
Yeah.. I will try different approaches like that if the increase health don't work
Im pretty certain the zed will despawn if you do stuff to its health
Mitigate the damage deal and etc... the higher health would be a more simple approach, but it's not working for now
Not Unless chucks remembers his solution for doing so
You could try your method again with a different approach or try this suggested method
If it doesnt work directly u still need to figure out a work around so the code wont be as clean as you thought right?
I will try now some of those other methods
Hello everybody 🙂
I would know more about modding into Project Zomboid and would create a simple mod :
Only let the administrators from a server to fill graves with zombie and don't let players to do it.
Do you know a mod which change function like my project where I could follow the way to do it ?
Or maybe somebody would be so nice that he gonna help me a little 😮
Thank you to you guys 😉
hello there 
Coucou ❤️
I don't know of any mods, but the vanilla code for doing that is in ISWorldObjectContextMenu. You could override ISWorldObjectContextMenu.onFillGrave, but that would still show the option to players. I think your best bet would be adding an event listener for OnFillWorldObjectContextMenu, checking for that option, and removing it if they aren't an admin (which you can check with isAdmin())
Thank you a lot Omar, i gonna try 🙂
Hey by the way i'm trying to find the reason behind this error but can't find any more information about it like which file/line...
[04-04-23 20:28:23.062] ERROR: General , 1680632903062> 0> ExceptionLogger.logException> Exception thrown java.util.UnknownFormatConversionException: Conversion = ' ' at Formatter.parse..
[04-04-23 20:28:23.062] ERROR: General , 1680632903062> 0> DebugLogStream.printException> Stack trace:.
I can't reproduce the issue when i'm alone on the server, it happens when we are a high quantity (more than 20 players) to play on the server
stability is great, but these errors happen when people are joining the server, making their client unresponsive for a minute before being able to join the server
Have you got an idea where i can start to look after this function ? OnFillWorldObjectContextMenu
Search the Lua source for that & you'll see an example
There's no stack trace following it? Just "Stack trace:."?
A quick search suggests that there's a faulty format string somewhere. Are you using mods?
yes we do use mods
the thing is that right now i'm connected on the server, and i don't get any error
however when we have a high population they all get this error
multiple times
I think this may be a better candidate for #1019767076094758924, but since you're using mods the answer may be "it's potentially a mod", because it's potentially a mod
Could always do the tried-and-true removing them in halves. Not ideal for something that relies on a bunch of people
exactly
i don't understand why there is no specific information for this error
usually you have more precisions
so im back because its not working 😛
im trying to do the following mod
when press Q shout custom text followed by custom sound
but I want to have n different texts and sounds where text 1 corresponds with sound 1 and text n with sound n
I have the sound playing but I cant find a way to override the default text for the player shout
any ideas ?
Override IsoPlayer.Callout by modifying __classmetatables[IsoPlayer.class].__index
omar you speak spanish by any chance ? 😛
local _IsoPlayer = __classmetatables[IsoPlayer.class].__index
local _Callout = _IsoPlayer.Callout
---Override to enable custom callouts.
---@param playEmote boolean
function _IsoPlayer:Callout(playEmote)
if getCore():getGameMode() == 'Tutorial' then
return _Callout(self, playEmote)
end
-- your custom shout code here (make sure to handle the case where the player is sneaking)
if playEmote then
self:playEmote('shout')
end
end
No hablo muy bien español
But that should help
Whoops, forgot to include the part I just said lol
lol thats fine, I asked because of the name, that actually helps a lot, its my first mod so not really familiar with the code or lua, but I do get what you did there 😛
thanks 😄 ill keep working on it 😄
https://steamcommunity.com/sharedfiles/filedetails/?id=2874170447
also theres this.. feel free to use as reference
oh man i was too slow hes gone

Anyone knows of an imagehosting that you can get like a fixed url even if you replace the image
It would be useful for workshop descriptions
If you update the image all of your mod posts changes
okay so the stu7pid cracks aree attached great
local weight = Base.Glue.getActualWeight();
Packing.5pkGlue.setActualWeight(weight * 10);
I've tested this code with lua file in media>lua>server folder but it didn't work. I don't know why...
if attachedSprites ~= nil then
for i = 0, attachedSprites:size()-1 do
local sprite = attachedSprites:get(i):getParentSprite()```
how is this throwing errors.
and oof. obj:RemoveAttachedAnims() that removes EVERYTHING but not the one i need to remove.
what are you trying to do and where are you doing this code
are we able to control the reverse speed of vehicles yet?
you have to get the item objects
u can't simply address them directly
things are getting more complicated
as a rule of thumb, everything you do while modding PZ will take 7 times longer than you think it will
ScriptManager.instance:getItem("Base.Glue")
store that in a local, then check if it's nil before doing something to it to avoid error
do the same for the other item
also to do item manipulation
u wanna run that in shared at load time
you mean shared folder in lua?
yes
it has to run before anything else instantiates an instance of it
or it won't work
so while u can do it in another folder or at runtime it's not wise
as it's much more likely to have had an instance made
and may work sometimes and not others
or with some mods and not others
that thing
I need that after other mods' instantiation
I mean if other mod changes glue's weight, I need to get it's weight
how the F%%K does the harvester animate it's thresher?
mods probably won't instantiate items before the world actually loads
so it should be fine to attach it to that
that didnt answer the question at all
local weight = Base.Glue.getActualWeight();
local delta = Base.Glue.getUseDelta();
Packing.5pkGlue.setActualWeight(weight * 5 * 0.7);
Packing.Pack 5 Glue.Glue.setUseDelta(1/delta * 5);
this makes NO SENSE.
you set the weight?
you want to set the weight by a recipe
like right click and set the weight
there are NO animations for this... yet it animates
im willing to help if you want to go vc just say so @little kraken
but you can't just do Base.Glue.getActualWeight() lol
i know
they are just replacing the heads over and over.
cuz i asked him m what he is trying to do expecting like i want the to produce a "some item" when you apply glue to "some other item"
and it should drain the glue a little
they want the weight of their item to mimick the weight of vanilla glue for mod compatibility
then why not just copy the vanilla glue?
i think i get it now
his making a pack of glue
in which when you remove one glue
the weight of the pack is reduced
easier to just create version s of the item
you can also use lua and the weight of the pack detemines how many times you can take a glue
assuming a glue is weight 10 (just for example)
and a pack is 50
when you take 1 glue your pack shouldnow only be 40 weight
and when you take a glue from a pack thats 20 then you produce 2 glues and deletes the glue pack
i think
im not sure tho
it would be easier to have a specific size pack of glue recipe like pantry packing or organized storage.
but if you really want a drainable pack, sapph's cooking has stuff like that
Can XML hold more than 2 Boolean?
By that i mean, do more than 2 checks, in this case i have 2 boolean variables, but one seem to be breaking the other
Oh no, it mixes the Bool values right?
My problem here is that im creating 2 XML files, i have to insert a Boll variable in each
<m_Conditions>
<m_Name>IDD</m_Name>
<m_Type>BOOL</m_Type>
<m_BoolValue>false</m_BoolValue>
</m_Conditions>
The problem is that the BOOL apparently is conflicting with the floor attack that is done by a bool value as well
<m_Conditions>
<m_Name>AimFloorAnim</m_Name>
<m_Type>BOOL</m_Type>
<m_BoolValue>false</m_BoolValue>
</m_Conditions>
So essentially with one of the files my character can just do a standing attack, for the other he can only do a ground attack, because of the distinction on true - false
Any way to circumvent this?
In case you're wondering im doing an atk speed mod, for that i need 2 XML files for the 1HDefault, at least i think i do, unless there is a way for me to use the .lua to choose which file the game will use, aside from using BOOL
hehehehe
Random question, is it possible to make a custom true music addon all off of a mac laptop?
it's extremely simple i bet you could even make in in your phone's notes app if you really wanted
enjoy your comfy bus and theater seats
damn it was not possible before?
@ancient grail sorry for late response. I published easy packing mod and it allows to pack some stacks of items for less weight and lagging. for example, 5 books to one bundle. What I want to do is that if people changes weight of book, my mod's book package also changes it's weight as intended.
Along those same lines, if a user is using soap mod which changes usedelta of soap, I want the requirement of recipe for packing soap to be changed.
nope. was a pet peeve of mine... til i realized no creator of any of those three mods would be responsible for such a patch
enabling this patch automatically enables 5 mods. true actions, rv interiors, autotsar bus, and dependencies
YES. Mine does the same way like pantry packing
ah
this is a liee. the first part takes 7x longer but u multiply that by every idea u suddenly come up with along the way
Well, you need to modify the items dynamically then. For Items you can use a DoParam, so look up a mod that uses ItemTweakerAPI and see what code they use(don't actually use the API, just get the code and remove the printing line)
Best to do it on OnInitGlobalModData I think... Maybe even later, though not sure what would be an optimal event
Also, recommendation: Set your packing recipes to destroy the item when packing. It will avoid the item being "used up"

tf r u doing to this poor little guy
make it so you can use him to plumb a sink
Do you also have a never-ending hatred towards that disgusting rodent who plagued both our eyes and our minds as he presented his unparalleled evil to us in its rawest and most disgusting form?
Don't believe me? Go ask him where he was on November 22nd, 1963...
I've head he even facetimes the orphans back at the orphanage just to rub salt in the wound.
He’s got a smug face and I don’t understand how he tried to get into a relationship with a bird (completely different species) and also the fact that the little family adopted him instead of orphaned children who obviously needed it a lot more than Stuart.
I have terabytes of accumulated hate speech against Stuart Little but I will spare you the details.
the description so far
i also did some research
FAQ
Is this animal abuse? No, actually! Stuart Little is neither man, nor creature, but an abomination and therefore has no human rights. The US Animal Welfare act, introduced in 1966, only regulates the treatment of Guinea pigs & Hamsters, while Stuart Little is a rat. Therefore, he also has no rights as an animal.
🙂
But you gona smoke em?
currently you can slice him, grind him into meatballs, make spaghetti and rat meatballs, roll him into a cigarette, grind him into a spice
and if I can ever figure out how to make the player do the stomp animation
you will be able to stomp him
that's my most wanted feature
but i can't figure out the stomp lol
What do you mean like force stomp?
yes
Its an item on the ground right?
Maybe on player update
Then check if player is stomping(not sure if its a thing)
If you can find this on vanilla
Maybe you can just check for controls
But take note you have to use the binded keys to that thing
Which is what you press then add atck to force stomp
So check that if its pressed
Then check if player is attacking
Once you have the stomp checker
Check for the player current square if theres an inventory item which is stuart
You could also check the inventory panel floor if theres a stuart but that might increase the radius making the player be able to stomp stuart even if his a bit out range
Then after both checks return true just do whatever to him
Hope this help
Im sure i could have explained better
Sorry
Hello, I have a question about health system, is there a way to freeze player damage?
there's a mod called no healin that doesnt let health regenerate, so probably
that's one way of doing it that i hadnt thought of
my thought process was more of just a timed action with stomp as the action animation
Yes theres an event for when you recieve dmg
Just heal the player the same anount
or some way to trigger a stomp from a context menu item
That works too
Theres a doshove
Not sure if there a dostomp
If there none you need to create an xml for that and out it on emote or action
I. Which you can then trigger the animation
with addHealth I suppose?
will stomping stuart little make him disappear and splash blood everywhere?
that's the goal
The pz animation is structured like
All the animation files are just raw data
The xml are the ones that gives it function
Sorta like models to scripts
what other features would you like stuart little to be able to enjoy in this mod?
🙂
Im afk
Ill send it in a bit
you use him as bait for bird traps
Ok, thanks
You might get infected if you dont wear gas mask
Lol
dissect him
Make some events that you heard squeaking noises so it prevented you from going back to sleep
To make the player need to kill em
If youre aiming at it when you shoot it does same as stomp
what kind of sadistic upbringing did you have to come up with these on the fly
are there blenders in the game?
unrelated question
Idk maybe its just a skill i have
Or a trait
If only we have player stats ui thing irl
while not working on my mod atm, i am once again humbly requesting how to get a sound emitter from a square or building
lmao
Maybe its cuz i did alot of branding related projects that requires me to come up with concepts
Its not necessary sadistic themed
I can give humane thoughts too
Like set a trap and release it to the wild
(Or use it to lure zed)
after i get emitters down, that is p much it for optimization and de-scuffifying my mod
damn theres doshove but no dostomp
but then i'll move on to atmospheric stuff like light flickering and light source dimness
i was changing the default sound effects, but i think i might actually just lower my base sound so ambiance is louder in comparison
ended up realizing i'd like most ambiance to be louder. main issue is that the most important sound: refrigerator humming, is not ambiance
maybe i'll just include the overwrite for fridges in my script
this sounds like it is used specifically for when a zombie is lying down
most likely
Thats just to set if a player fan do stomp or not
By default that is set to true
It should be doStomp
Or something if theres such a thing
And
IsStomping
If theres also such a thing
Thank you. I think this is why there's a bug when I pack drainable items.
yes, we ran into that xd
There's some project for VS Code for zomboid scrips I heart
For Lua, IntelliJ, there's a guide on the wiki for setting it up
IF you need help, hit me up
does getNearestBodyworkPart influence what part of vehicle will be hit. Would making protection parts with lower index work.
I just wish Albion had a guide with his messages here, so much useful information in them. Using Load on a Loaded script never occurred to me as something that can be used.
Also what happens to people making vehicle mods, is somebody kidnapping them? Because they all seem to vanish for extended periods of time.
@frosty estuary Idk if you fixed it yet but almost all changes to zombies should be client side
This is probably something that will change as inventory will be more server-side soon
The trick is you have to start the changes server side
And send a command to all clients
You should only have to set the health once fortunately
Not yet... Did some testing, on client side too. If I increase de health it dissapear. I can set health down, no problem, but when I do it to increase won't work
Maybe there's a max health check
I set my nemesis spiffos to 1000hp though and I don't think they despawn
Works on MP too ?
Something may have changed tho
Last time I checked, yes
I wonder how hard it would be to create some sort of test suite 🤔
Can I check how you did it? whats the name of the mod?
It is "super weird helicopter events"
You'd need "easy config chucked" and "expanded helicopter events"
I see some people saying in the comments that spiffos is dissapearing, maybe same issue ?
Oh then, I probably accidentally unsubbed to the comments
And that'd be a new issue 😅
Wait where are those comments?
1 sec
second page
(RW)Rinzik 20/ago./2022 às 18:43
we had the spiffo event happen today, but he spawned and just stood there then disappeared. Now we have seen him in the same spot a few times but once we get close he disappears again. No clue whats happening.
third page
[M E O W N Y X] 8/ago./2022 às 23:50
I imagine Spiffo isn't suppose to suddenly "vanish" after a few seconds of viewing him, because that seems to be the problem me and a friend are having. Spiffo dropped recently in our game but every time we approached him he didn't walk towards us and vanished moments after viewing.
Yeah that was fixed -- it's from August -- but I can check again
Also I was unsubbed oops
Ah... so maybe it's not the same, there's no report of the same proplem with nemesis
You do the setHealth on server side too... I'm doing basicaly the same thing... I you test something here
Confused and alarmed, but mainly wondering how you're zoomed in that much—is there a zoom mod I don't know about that I desperately need
I have all the vanilla options enabled & the closest one still feels rather far
Maybe screen resolution?
Ya I figure it has to do with having a larger screen, but hoped there's a mod for it rather than having to change that
Thank you
Haha instead promoting best mod
Ill post my worst mod
Its 1/2 mods that i made that isnt commission
And i just did to test and learn
I never bothered looking for good audio and never will
Instead of feeling bad about the negative comments it makes me lol hahaha
I mean i wouldnt recommed this mod it is pretty terrible
Just sharing
Just tested to spawn a spiffos from your mod here, and he dissappears too
Maybe the new versions of the game have some kind of check on MP to see if some zombies have some different stats from the default or sandbox config
hi~ i am a new modder. is there any material about the hook system?
A guide to lua events and hooks for Project Zomboid modding - PZ-events-guide/Hooks.md at main · demiurgeQuantified/PZ-events-guide
thanks! this could be useful👍
Hooks and Events are different in that hooks bypass java, where as events run alongside, before/after java
Just a heads up
Good morning.
Is it possible to use ZedScript extension with Intellij?
Unless IntelliJ support TextMate grammars, no. Can it be adapted to work in IntelliJ? Yeah I can work on a separate fork of the VSCode extension to work with IntelliJ.
It becomes a function of time, however.
I'm worried that this work will become more demanding than someone simply working on personal projects in their free-time. The project is set up in a way that is open to improvements from third-parties.
if luautils.stringStarts(obj:getTextureName(), "blends_street_") then
local attachedSprites = obj:getAttachedAnimSprite()
if attachedSprites ~= nil then
for a = 0, attachedSprites:size()-1 do
local sprite = attachedSprites:get(a):getParentSprite()
player:Say(tostring(sprite:getName()))
if sprite and sprite:getName() ~= nil and luautils.stringStarts(sprite:getName(), "overlay_grime_floor_01") then
if isClient() then
sledgeDestroy(sprite)
else
obj:RemoveAttachedAnim(a)
obj:transmitUpdatedSpriteToClients()
end
vehicle:playSound("UseMatch")
end
break
end
end
end
``` shouldn't that interate through all the attached sprites? and if so why is it not getting the grime there?
A couple of things.
- I'd prefer using
print(..)as it's easier to write debug lines. =D - It's possible that those sprites could be registered under a different naming convention / prefix. Print out the name of the
sprite:getName()field in anelseblock above thebreakstatement.
Otherwise you are iterating over the ArrayList<Sprite> properly in Lua.
using print for other sutff, this just made it easier.
this gets a list of tiles in a context menu with image for deletion, seems similar to what ur making
if it goes about things another way may help u figure out why yours doesn't show certain things
did the else block. it never names the grime.
Then I'd suspect that what you're iterating isn't everything that you need to iterate over.
Either that or the grime is a part of the map.
it's attached just like the other grimes are, but the others are the ONLY grime.
these ones have a street line before hte grime and that breaks it.
it seems like it is ONLY getting the first attached
RemoveAttachedAnims THIS will clear them ALL.
but there's no obj:getAttachedAnimSprites()
Are you suggesting that this sprite is not something that you can grab from Lua?
i'm saying it only grabs
Hmmm
the FIRST attached.. sorry
it will only grba 1, 2+ are not grabbed
if i could find a square that has a line, a crack and grime it'd be the grail for testing
I'm trying to add an item from a mod to a custom loot table, but have hit an issue. anyone know what's going on?
-- Glowstick Packs
AuthenticZ.tab_addMagProcedural_GlowstickPack = function(x,count)
ProceduralDistributions = ProceduralDistributions or {};
ProceduralDistributions.list = ProceduralDistributions.list or {};
ProceduralDistributions.list[x] = ProceduralDistributions.list[x] or {};
ProceduralDistributions.list[x].items = ProceduralDistributions.list[x].items or {};
table.insert(ProceduralDistributions.list[x].items,"AuthenticZLite.AuthenticGlowstick_Pack");
table.insert(ProceduralDistributions.list[x].items, count);
end
AuthenticZ.tab_addMagProcedural_GlowstickPack("MyNewList",1.0); --procedural list exists in game, but does not have the item added
AuthenticZ.tab_addMagProcedural_GlowstickPack("ArmyStorageElectronics",1.5); --works fine
Can I overwrite stuff from the shared/Library folder? Like... I want my mod to react to a specific function getting called
shared/Library? isn't that generated by capsid?
you can do this with metatables though
MetaTables?
You're right...
here's a cleaned up example of using metatables from some of my code
local metatable = __classmetatables[IsoPlayer.class].__index
local old_ReadLiterature = metatable.ReadLiterature
function metatable.ReadLiterature(self, item)
-- your code
old_ReadLiterature(self, item)
end
metatables are basically how kahlua stores references to the java classes in lua, so messing with them won't affect anything when it's called from java, only when it's called from lua
thank you
If not for this, I'd have to patch just about every mod that changes sandbox settings at runtime
This lets me write a conditional behavior
Do I just write the class name?
thank you
I don't know in which folder to put it tho
Like... My code is a bit of a mess admittedly, spread along 6 files
I wanted to do it in Shared, but then I can't run the Client commands via the Client engine
iI think Server will be the place...
Good job.
so to protect a basic vehicle part all you need is, add protection part that has a lower index. That's nice.
How can i add a trait to magazine like The Herbalist mag?
herbalist does not give you the trait in vanilla
it just gives you a recipe that the game checks for instead
hmm okay interesting lol
Does anyone know if there is any mod that inhibits sleep in single player? and if this type of mod does not exist, could someone create this type of mod to inhibit sleep in single player?
Hey guys, here's a mod idea if anyone is interested in taking it up as I don't have enough time to figure out the LUA side of things
Simple card games in PZ
So if you find a deck of cards, you can play solitaire or something in a GUI window
Gave it a quick look a few months back but couldn't see a way to animate the GUIs so I gave up
Is there a comprehensive change-log of what changes in modding procedures and requirements happen from sep 2021? 😅
ARGH it's always something.
congrats skiz
@sour island has a project like this
two issues left to solve
?
take the small wins and rest man
o man sorry i really didnt mean to tag i was just going to type ur name my bad
imean the deck of card his saying
Oh
Yeah I'm working on a gameboard and cards mod
It's taken a back burner for a bit
level analysis?
part of better tile picker
local TrashItems={"Base.newpaper","Base.paperbag","Base.paperbag_Jays","Base.paperbag_Spiffos","Base.PaperNapkins","Base.SheetPaper2","Base.PlasticCup","Base.BeerCanEmpty","Base.PopEmpty","Base.WineEmpty","Base.WhiskeyEmpty","Base.BleachEmpty","Base.TinCanEmpty"}
local TrashNumba = 0
for i=1 ,#TrashItems do
TrashNumba = TrashNumba + 1
end
local item = truckbedcontainer:AddItem(TrashItems(TrashNumba))
``` I know this is wrong but my brain is pudding atm. how do i do this right?
what are you trying to do?
select a ranomd item from the array and put it int he truckbedcontainer
local item = truckbedcontainer:AddItem(TrashItems[ZombRand(#TrashItems)+1])
i love you.
lol
if luautils.stringStarts(obj:getTextureName(), "trash_") then any idea how to make that stop freaking out when i run over a model?
❤️
I guess you have nils there?
it nils out yes
ok, do you know if it's the obj or the result of getTextureName
I think it's N.2, just add a check if there's a textureName before calling the function. Same for N.1.
get texturename i THINK is the issue.
but that is a good idea.
and !luautils.stringStarts(GrassBush:getSprite():getName(), "blends_natural") then can lua not do NOTS in ifs?
local name = obj:getTextureName()
if name and luautils.stringStarts(name, "trash_") then
if GrassBush:getSprite() and GrassBush:getSprite():getProperties() and (GrassBush:getSprite():getProperties():Is(IsoFlagType.canBeRemoved) or GrassBush:getSprite():getProperties():s(IsoFlagType.canBeCut)) not luautils.stringStarts(GrassBush:getSprite():getName(), "blends_natural") then
``` if i do that it bitches saying the not should be a then
Can we add protection and stay compatible with other mods? I feel like just making my own script is the best solution.
i didn't run into any specific issues with it
i just didn't edit the existing parts, there wasn't really a need to
a mod that significant is likely to be incompatible with something though
I can already hear people complaining of not finding the vehicle when they have remove vanilla vehicles enabled
¯_(ツ)_/¯
Skizot: steeringIncrement = 0.4,
steeringClamp = 0.1,
[5:23 PM]Skizot: how do these work?
[5:23 PM]Skizot: i want tighter turning on a car.
Alot of car stuff isn't all that accessible - not to say these are not
/* How quickly the front wheels change facing direction. */
steeringIncrement = 0.02,
/* Maximum steering angle. */
steeringClamp = 0.3,
- The first thing you want to do, as with most mods is to create your mods folder structure, use the image below as a reference, replacing MOD_NAME with the name of your mod: Spoiler mods MOD_NAME mod.info MOD_NAME.png media lua client MOD_NAME.lua models Vehicles_MOD_NAME.txt scripts vehicles M...
This may be a stupid question, but how hard would it be to give particular zombies nametags, like players have? (IIRC players have nametags in multiplayer)
I mean is there already a system that could be used, or would it require jumping through hoops and hacking to get it to work, like somehow hooking into the UI and rendering your own nametags.
Albion said zeds dont retain moddata
Unless your saying name tags as items
didn't somebody already do that?
i don't know if it was nametags specifically but there's a mod that gives zombies names in some form
i can't find the mod i was thinking of so it might have been taken down/just bad memory
isoZombies dont save modData unless bReanimated is true afaik
I don't know about adding the overhead nametags, but I think zombies already have names—Like by virtue of them being IsoGameCharacters you can set a name for them, so that part wouldn't be a challenge to implement
true - but depends if that information is saved or not
It should be, since it's a part of IsoGameCharacter. Presumably saved in its save method (double checked and yeah, saved in SurvivorDesc which it saves)
Looks like the code for setting the nametag specifically checks for if they're a player & the field is protected and doesn't appear to have any accessors unfortunately @pulsar falcon, so I think you'd have to go another route. Dunno if halo text would work (for your use case, I mean; setHaloText is available so you could theoretically just add one with a large number, I think. Haven't tried it to be sure)
Heyo, I'm trying to make a mod that turns the leather jackets into a black/red look but it's my first time messing with textures. Can somebody tell me where to look for the leather jacket textures?
can anyone give me the best list for mods in a multiplayer server PLEASE
(if link to a steam community mod list for it)
#general_chat or #pz_b42_chat — this channel is for mod development
clothing_jacket.txt has a lot of jacket scripts (which would list the textures they use)
tfw got my first possibly legitimate bug report on one of my mods and now i need to investigate it
writ of passage.
seems like a possible incompatibility with my own mod that i didnt account for even though i thought i did
im hoping it is just a problem with the one mod tho so i dont have to look for problems in 2 things
i think i found the problem, but i dont know yet how to fix it
when you take the bitten trait, even if your bite heals, it still is technically toggled as "bitten"
so when you get bitten again, it just acts as if you have been bitten the whole time and sets ur hp to whatever it would have been if you never healed the injury
and even healing the body to full, then toggling bite and toggling it off again
when you remove the bandage, it is bitten again
interestingly enough... even toggling a bite on a body part that i didnt add as bitten through the trait seems to return a bite again
it must be an issue on the vanilla bite toggle then.
Hey guys, i just updated my Makeshift mod to include a Tailoring Workbench Tile. And for some reason since the update the tile is bugged and it despawns when you quit and reload the save. The workbench is still there and useable but the tile is invisible. It worked perfectly before the update
Did anyone ever experience this and know a fix ? 😦
https://steamcommunity.com/sharedfiles/filedetails/?id=2827080218
yeah this sucks
the vanilla bite toggle is broken
which means my mod is broken
i really dont want to add a patch to fix the whole vanilla system to fix my mod
oh god... it's the entire injury system
okay i have an idea. now to test it
nope
yep, it's a vanilla issue
recipe Make Rat Meatballs
{
BreadSlices,
StuartLittle,
[Recipe.GetItemTypes.Egg],
keep [Recipe.GetItemTypes.SharpKnife]/[Recipe.GetItemTypes.Saw]/Axe/HandAxe/AxeStone/WoodAxe/MeatCleaver,
Result:RatMeatballs=6,
Time:100,
Category:Cooking,
OnGiveXP:Recipe.OnGiveXP.Cooking3,
AllowRottenItem:false,
Sound:ratscream,
CanBeDoneFromFloor: true,
}```
is there a way to specify it to where it can only use the uncooked version of an item
in a recipe
like here i want something like StuartLittle:Uncooked
you can turn stuart little into a starting recipe ingredient maybe, where you cannot cook him, but you can use him as an ingredient
kinda like beef jerky
How did you spawn it
Ill help you
Hello again, yesterday I was asking about freezing character hp and I cancel my question for now. I have a new one, I'm new to modding and I'm willing to make a mod where you can revive your friends, I have an idea how it can work but I don't know how to realise it properly. Is someone willing to help me with this idea?
or maybe you can share resources where I can find information about how can I do it
save character stats on death. (perks, ondeath)
when a player finds their corpse, the original player (getsteamid) will be able to use a timed action to recover their original character.
maybe even add an option where it only lets non-zombified corpses get revived
recovery journal, save character mod, etc can help with that
if you want to make it so they cannot respawn except after their corpse is retrieved, then i got nothing
there's also that mod about player markers
I saw a mod like that but I wanna do it a lil different, for example when your overall health is 5 percent then you forced in animation like lay on the ground then your character gets a near-death moodlet if moodlet gets in its final state you die or someone with like epipen or some item like that can heal you, if they do that you recover with full health, near-death moodlet is gone but your wounds are present
I can describe how I see some parts more precisely if you need
like in l4d or payday maybe
being swarmed by zombies creates an instant-death scenario. you have to account for that
i like how ur response to dying is an epi pen
yeah, when you get in a near-death state you are invisible and invincible maybe?
To avoid fatal damage you would probably need to listen for the event for receiving damage and exempt the player from the damage—and only apply the amount that would make it so that they're at 5 hp—if it would kill them (I think via setAvoidDamage, unsure off the top of my head)
Unsure whether that accounts for dragdown, though
you need the death animation and a way to turn players invisible/godmode
then context option for revive with timed action
i think you'd have to disable drag down urself. it can be triggered even at near full hp, and cannot by overridden even if you activate god mode or full heal mid animation
how? idk, maybe set a custom zombie strength so it requires more zombies than perceivable to kill a player
We usually disable drag down so drag down situation is impossible in my case
i see
and cheatmenu can make you invisible and invincible
I mean it can do it somehow
maybe I can check how this mod do it
If you intend to upload this mod it would probably still be ideal to consider drag down, even if that's just a section of the description that clarifies death from dragdown is still possible
If it's only for you that's not a concern, of course
had the same thoughts
consider the applications of other users
and either tell them how to do it themselves or make it work in ur mod too
I thought about uploading it and about dragdown, to be honest I don't know if it's gonna be just a warning or how i'm gonna deal with it
but I keeping this in mind
i'd still add an option to disable revival for infected corpses
for this case maybe if player is infected you just die without near-death state
that would work
so my biggest problem for now is what should i do with character health
u also need to consider a few other things:
signifier for death countdown
revival time
option to "give up" or die if u arent gonna be saved
that is why i was asking about freezing health
give up it's a good reminder
i forgot about it
☝️
start with whatever you think is most important to you
Okay, thank you for now guys, i'm gonna think about it again and read the documentation more, maybe some guides
I'll ask again if I'm gonna need more help
we all start somewhere!
i still have tons of problems i need to address before i can finish my current mod
omar already gave you the answer
let me look for the code for you
function antiFallDmg(player, damager, dmg)
if damager == "FALLDOWN" then
player:setHaloNote(tostring(dmg))
local bodydmg = player:getBodyDamage()
local health = bodydmg:getOverallBodyHealth()
bodydmg:AddGeneralHealth(health+dmg);
print(health)
end
end
Events.OnPlayerGetDamage.Add(antiFallDmg)
let me convert it to something that suits your need
i'd start by making a very simple trigger to get players in a "near ded" state
then add the requirements and functionality to that
yourmodname = {}
function yourmodname.dosomeaction()
getPlayer():playEmote("aCustomAnimation")
--TODO add your zedignore code here
--TODO add disable movement codes. im not going to look for it for you cuz i need to do something else now
end
function yourmodname.dontdie(player, damager, dmg)
local bodydmg = player:getBodyDamage()
local health = bodydmg:getOverallBodyHealth()
if dmg > health then
bodydmg:AddGeneralHealth(health+dmg);
if isDebugEnabled() then print(health); player:setHaloNote(tostring(dmg)) end
yourmodname.dosomeaction()
end
end
Events.OnPlayerGetDamage.Add(yourmodname.dontdie)
@primal vapor

Hey guys, I have a question about “Superv Survivors” mod, don’t know if I’m in the right place but here’s the thing, i want make the random survivor spawn via key press to always spawn a survivors with level 5+ aiming, which file in Superv Survivors mod should i edit?
Hi guys, texture issue here, can I use a cloth texture higher than the usual 256x256px? without masks conflicting
I'm working on new gloves models
and having details it's quite impossible with that resolution
blender gives me an uv map of 1024x1024px, which is great for good patterns and design
You do not edit other modders work
Thats unethical
You could however ask for permission
Require the mod then hook on its functions
Or find a different workaround
Oh sorry about that, I’m newbie in modding, tho I’m not going to release that as a mod I’m going to some experimenting so maybe i would be able to make my own and simple survivors mod
Trying to update a mod. Didn't change anything apart from few lines of code. Now I am getting this error, any idea why?
are you synchronizing the tile to the server?
i presume u create it on the client based on those symptoms
did you change the preview image?
Nope, its the same
apparently it can be a connectivity issue, or "steam family sharing" enabled per a google
should poke around until u find the steam API docs for workshop uploads
probably will have a list of actual error codes
hmm will try to disable my VPN and see if it does anything
https://theindiestone.com/forums/index.php?/topic/37047-unable-to-upload-new-mod-to-steam-workshop-failed-to-update-workshop-item-result2/ check your spelling on the file names. btw Blah == blah ie. uppper/lower case dont matter.
I'm unable to upload my new mod "Playable Arcade Machines Grapeseed" to the steam workshop. The error I get is "failed to update workshop item, result=2" The result in my workshop is an empty mod with no content. This is my 3rd mod. I've successfully uploaded my other two mods in the past. I even...
ye i did that. My mod has literally only one file of code, rest of files are translations and poster/preview, etc
checked everyone of them, they seem fine
It shouldn't be the issue since I didn't even play with files names, but only the code within the file itself
well could try yanking files, maybe steam sees something inside one and dont like it dunno.
ofc steam in their awesome documentation explain any of this...
ye idk I tried everything, removed files, changed code to a simple print("test"), change file names, nothing
lemme see if I can even work with other mods
Nope getting same issue on all mods, so I can probably guess its a system/steam related issue
could be very well...
its prob on steams end wouldnt surprise me
haha maybe
how to add player name on specific item
Huh.. I'm at a library that drops https requests for discord media such as profile pictures.. nice.
i want to retexture a shirt, i have the texture but i dont know how to upload it to the workshop
if you make the SpawnHordeUI attract Zombies on render it will freeze at high sound setting 😅
Anyone wants to collab on reanimation mod
Its open to public
Basically original mod idea is that you play as zed after you die.but we are working on branch to turn an arcade pz genre
Hello.
@sour island the debug mod needs a way to access the functions fast from console
hm? like commands?
like ce.aTable.command()
I'll be honest I don't really use the console
What changes would be needed / what would they look like?
just an idea, because I do things from console all the time.
Easies way is to have one global table
I added a lure button to the ISSpawnHordeUI, it uses addSound, should I send that?
it's the one that spawns a zombie on a selected square
Sure, anything is useful
I'm off for the week so maybe I'll have a chance to sit down and start adding useful functions and such
I also want to add a more friendly debug panel API
I made one for loading in EHE's test functions
Hello, I'm pretty new to mod development and this is my first project. It should send a POST request to a webhook url every hour to display the player count of a server if it changed.
local https = require('http')
local lastCheck = os.time()
local interval = 3600
local webhookUrl = "https://discord.com/api/webhooks/a/b"
local lastPlayerCount = 0
function CountPlayers()
local numPlayers = getNumActivePlayers()
if numPlayers ~= lastPlayerCount then
local message = "There are currently " .. numPlayers .. " players online."
local encodedParams = '{"username":"PZ PlayerCount","avatar_url":"path/to/img.jpg","content":"' .. message .. '"}'
http.request('POST', webhookUrl, {
{'content-type', 'application/json'}
}, encodedParams)
lastPlayerCount = numPlayers
end
end
Events.OnTick.Add(function()
local currentTime = os.time()
local timeDiff = currentTime - lastCheck
if timeDiff >= interval then
CountPlayers()
lastCheck = currentTime
end
end)
However, I'm getting:
ERROR: General , 1680908543489> 8,689,381> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: request of non-table: null at KahluaThread.tableget line:1689.
Can anyone help me figure this out? Documentation hasn't been of much help.
also side note: I've removed the json library implementation because it too was giving me errors when I tried to include it.
The error is from
local https
http.require
🤦♂️
had a previous ssl.https implementation and didn't change my variable names... thanks
http might need to be https to match the local variable?
what is the 'http' file?
iirc
I'm new to lua but isnt it just a part of the native functions
same error after changing local https = require to local http = require
honestly im willing to completely rewrite if someone just has a working implementation of HTTP POST request
i just want to communicate with a webhook
This is neither normal Lua or normal API.
You used to be able to use openUrl(..) however it was disabled by means a presumably security concerns.
HTTP POST would've been the only option back then.
I've discussed reimplementing something like this at length with recent discussions between the community and the devs.
Personally I'm wanting my discord invite button mod back.
I can see it being okay if it were just a serverside script and maybe a server setting to enable POST requests before launching the server
You can use a separate process with a file watcher to bounce requests but this would require the client to do it.
If this is a server-specific operation, modify the Java bytecode.
Install Gson to the dedicated server, mod it in to suit whatever JSON needs to be parsed / serialized and wala. =)
I'll see what I can do. I'm only just getting started with zomboid so this has been very insightful, thanks
No problem. I've modified the server and client java code for over ten years. Let me know if you have any questions.
@ancient grail weren't u showing this off as working recently? been no patches
@wise tulip recommend dumping the info to a file in a location accessible to a bot and having the bot read it
was planning to do that for a bot for my server but it's on the backburner
yeah sadly this isn't my server, theyre hosting off of some online service that doesnt give them access to the machine itself
I just figured it'd be a nice introduction to modding lol but I obviously chose the wrong project
What can I set to make a zombie always move like he is about to attack a player (Arms up, faster move speed etc.) instead of his regular move speed.
Ah for reals? Owell
Yeah i learned this from xyberi
I never foung any use for jt
Abd i recall albion tested it by opening different stuff on her pc
yeah, you can open files with it
which concerns me a little but you couldn't run executables at least
If you kill him will he comeback? Like theres alot of em?
he just spawns in bins very rarely
iBrRus told me you cannot modify the zeds animation unless you overwrite the file
Pz simply handles zeds in a very weird way i guess
Thanks
I like Stuart Little tho! 😦
💋
Oh no haha maemento s gona go all out rant mode.
I could make a mod toggle option that turns him into rattatouie instead if that's more to your liking
Wait ehats the difference between them? You dont hate rattatouie only stuart?
Cuz of the back story?
Yes
I hate stuart little and by extension the entire Little family
Except the kid he had nothing to do with it rly
But his parents adopting a literal rat instead of those poor orphaned children who needed it more?
Like go to the dang pet store instead wtf don't taunt the other kids like that?
And he tries to get with a bird (completely different species) and that's like a major plotline in the story????
How would that even work? he's a RAT
At least ratatouille is doing some good in the world by making some fire food
But stuart little?
Useless.
Nuisance, even
Just our there doing stupid boat races
Mori still salty that Stuart Little won the miniature boat race and not him.
Passion from hate i love how you made a working mod from your hate
Usually hate is destructive you used it for creativity
you should see how bitter most modding communites are 😅
U talking about baro?
baro is one of them yeah
Dang . Shouldnt have invested
I havent modded anyother game tbh. I bought 3 other games just cuz they have workshops
Cities skylines has an amazing workshop if you like city builders
If it allows commission then sure
i just mod the games i play
This is the first game I've ever made mods for
I've been modding the heck out of games forever though
aight lets change this up.
this is my trailer in the vehicle editor.
this is what happens ingame, and it IS attached
I was going to say nice . I thought this was a feature you did
what?
does it catch back up when you stop?
looks roughly like the size of the default trailer
so maybe something isn't configured (or something is hardcoded
)
as for it stopping you, the lawnmower might not actually be strong enough to move the trailer
Do you have to and no choice to put file in same structure as the mod's to override it
For example, media/scripts/abcd.txt
Or you can put it like this
media/scripts/modid/abcd.txt?


