#mod_development
1 messages Β· Page 175 of 1
is anyone able to show me how I should lay out a recipe that uses a custom animation?
Damn. I should have done more research. I knew about this mod but didn't realize the buckets could also take dirt. Thanks!
I'm essentially trying to make it so all vanilla bags can also hold dirt, gravel, or sand
because it pisses me off when I have 5 duffel bags but no sacks and I want to get a safe farm set up
I might cry if you tell me it exists because I scoured the workshop and didn't find anything like it
You can use this mod to do it, check the script edits file where I add it to some vanilla items.
Thanks! I will! For now I'm going to call it a night though because tomorrow I'm probably going to rip out everything I've done so far. Thank you both so much! Good night!
gn!
(the time wasn't wasted. It was a great learning opportunity! However I'd prefer to write good code from example rather than the spagetti I was writing)
Will do π πββοΈ πββοΈ
Edits.Items = {
["Dirtbag"] = {
Tags = { _DirtContainer = true },
},
It's all the things I wondered if I could do... answered.
I cant figure this out, errors arent really telling me anything either
as mentioned earlier im trying to apply a custom animation to a crafting recipe, but when I do it instead of my animation playing, my character just raises their hand to the sky like the falling animation.
tried to see if I can fix it myself and somehow made my guy dab
it says I need a PerformingAction but I have no idea how to implement that
cant find anything from googling it
I got it to no longer give me that error, but it still doesnt play the animation when asked.
is the animation set up to work with timed actions? (xml file)
so when you say custom animation, you mean a vanilla animation?
custom animation
made in blender
I used the tutorial which just shows me how to get it so I can play the animation through a keybind. but I cant figure out how to get it to work as a PerformingAction
take a look at the xml files in AnimSets/player/actions
Take a look at the file in the base game: media/AnimSets/player/actions/SawLog.xml
This is a good example of a "custom" animation for a crafting recipe. You will see that there is the condition for the animation:
<m_Name>PerformingAction</m_Name>
<m_Type>STRING</m_Type>
<m_StringValue>SawLog</m_StringValue>
</m_Conditions>```
So, create your own xml file similar to this one (make sure to put it in the same folder structure in your mod), and use your own condition value like:
```<m_Conditions>
<m_Name>PerformingAction</m_Name>
<m_Type>STRING</m_Type>
<m_StringValue>MyCondition</m_StringValue>
</m_Conditions>```
In your recipe, then set the `AnimNode` to your condition value:
```AnimNode:MyCondition,```
Hello everyone,
The transmission client/server is working perfectly, i can extract the data from the table. I would like know if is possible to retrieve ONLY the value from getTotalKills(username, value) method
I want to retrieve the public server-side method getTotalKills(username, value) from this mod:
https://steamcommunity.com/sharedfiles/filedetails/?id=2857273296 located in the file media/server/Server.lua .
Thank you
side client
client/MyDebug.lua
require("Server") -- this is mod Ashen MP Ranking
local function onServerResponse(module, command, args)
print("onServerResponse")
print(args)
print("-----------------------------------")
print(args.ladder.zKillsTot[1][1])
print("-----------------------------------")
end
local function sendServerRequest()
print("sendServerRequest")
local player = getPlayer()
local module = "AshenMPRanking"
local command = "PlayerData"
local username = player:getUsername()
local dbg
sendClientCommand(player, module, command, {username})
end
local function onCustomUIKeyPressed(key)
sendServerRequest()
end
Events.OnCustomUIKeyPressed.Add(onCustomUIKeyPressed)
Events.OnServerCommand.Add(onServerResponse)
----------------------------------------------------------------
side server
server/MyDebugServer.lua
-----@param player -- getplayer()
-----@param module -- AshenMPRanking
-----@param command -- "PlayerData"
-----@param args -- userName - getPlayer:use
local function handleClientRequest(player, module, command, username )
local totalKills = getTotalKills(username, nil)
sendServerCommand(module, command, { totalKills })
end
Events.OnClientCommand.Add(handleClientRequest)
Is there an animation guide online I can link to people?
its pinned in #modeling
but it doesnt go over any of the code stuff just actual animations and rigging
kadgbrasdlkbg agakdsjgbasdkfgbadsfgbnasdfg
its still not playing the animation
Where did you put the xml file that you created?
In your recipe, if you do:
AnimNode:SawLog,
Does it play the "SawLog" animation?
yes it does
I don't think so, not for the info I provided. Most I've seen has it just adding the Animation as an idle or something.
Cool. So, where did you put the xml file that you created? In your mod, it HAS to be in: media/AnimSets/player/actions/whatever.xml
ya its in that file locaiton
Also, did you restart the game after making it? Like, actually close and re-open the game? it won't load new files
what's the contents of your xml file
I just copied some vanilla code, i forgot which one it was exactly
then I had the IsTestfile is my AnimNode
In that action, set: <m_AnimName>Bob_IdleSawLog</m_AnimName>
In your recipe, set: AnimNode:IsTestfile
Does it play the Saw Log animation on your recipe? If so, then its the name of your Animation.
Seems like it. At least you got the rest setup and you know the issue. Just be sure that the m_AnimName is set to whatever the animation's name actually is
so m_AnimName should be the files name?
ooooh wait I see it now
im stupid, that should be the animation files name
I changed the animation fbx file name to Bazinga just to test
not necessarily. it just so happens that the base game names all animations with their file names (if that's where you're getting that assumption). it will be the name you set for the animation itself in blender or fragmotion or whatever you used. You also need to ensure that your animation is in media/anims_X/Bob/
Possibly if you don't set a name then it just uses the file name, if that's working for you. But i definitely have animations playing that have a different file name. ha
so in blender I would go to the nonlinear animation and set the animation name to what I want the m_AnimName?
correct
ok so I see that it did work. but its only applying some of the animation not all. like only the arms are animated instead of the whole body
but that probably has to deal with my exporting the file wrong
Yea, there is no blending in your action file so it should be applying to the whole model.
Still, forward progress is good
ye, i should get some sleep. later i will figure out why its not applying the whole animation only parts
I wanted to go to bed two hours ago but i just wanted to try and finish this first π
same. i just finished my proof of concept for a "drop in" replacement for the context menu so its a radial now:
oooo nice
was easier than i thought, but needs a lot of work. i have it limited to only 8 things currently because the build menu created hundreds of entries. ha.
How do you manage the side entries for the options in the menu? Do you refresh the window with the options or do you create a new popup with those?
This does seem like a mod that would pop off
Currently everything is added to only one radial, haven't gotten that far yet. For radials with only one layer of a submenu, i could make something popout. but will probably start with just make a new radial that replaces the current that has a back button.
and eh, if it doesn't take off then oh well. I'm having fun, and that's all that matters imo. π
lmao. misread that, further proof i need to sleep.
I prefer this one over the current one already
We'll see what happens here. I should be working on so many other things.
I added this to the xml for the lower body to animate.
<m_SubStateBoneWeights>
<boneName>Bip01</boneName>
</m_SubStateBoneWeights>
Hello there, anyone knows where is handled the difference between long key pressed Vs quick key pressed (e.g. for window climb Vs open/close) ?
there's some related java logic in IsoPlayer doContext.
Looks great! But the question is: does the radial menu have a method for removing items? I did not find it. This does not allow injections to be done properly, as far as I understand. Just clear it completely and re-add the necessary menu items. For me, this is a big pain. Tell me if there is a way to remove an item from the radial menu.
damn, amazing ideas as always π
Currently making a mod to place the police deputy hat on the back, I noticed that whenever my character puts on any clothes which are torn, the hat's texture becomes a flat grey. Anyone knows what is going on?
Hello, I'm using an invalid animName on purpose (it gives an ok result for zombiesturning) are there side effects to expect in addition to the warning log ? <m_AnimName>invalidOnPurpose</m_AnimName>``````WARN : General , 1687793980874> AnimationPlayer.play> Anim Clip not found: invalidOnPurpose
So, if I wanted to make a mod that replaced in game text how would I do that?
it depends on the text. precise what you wanna do.
Iβm changing Health UI text
it depends on what you wanna do. you can either change lua for Health UI or find the text you wanna change from the text files under media\lua\shared\Translate\EN\ and add the same file to your mod with your changed text (you do not need to duplicate all unchanged text)
I am not a mod developer but I'm looking to commission one to make some vehicles for me. If anyone is willing please DM me
Hello, one of mod creators let me make a mirror version of his mod with some small patches.
I copied this mod without changing anything, uploaded it on steam workshop on private just to test it
and this copied version of original mod just doesnt work, i dont understand why
it has different IDs
sorry I just woke up but it worked, thanks bro
@dark wedgethank you for all the help too 6 hours ago
in your mod.info file you should change id=PreviousIdByVictorGreen``````name=PreviousNameByVictorGreen
okay, done. Now it works on single player
but cant use it on local hosted server, it stops at (NormalTermination)
LOG : General , 1687801213896> SERVER: info@coop mode enabled
LOG : General , 1687801213896> SERVER: status@UI_ServerStatus_Initialising
LOG : General , 1687801233328> SERVER: src\public\tier1\interface.h (265) : m_pModule
LOG : Network , 1687801233329> [CoopMaster] Unknown message incoming from the slave server: src\public\tier1\interface.h (265) : m_pModule
LOG : General , 1687801233329> SERVER: process-status@terminated
LOG : Network , 1687801255907> [26-06-23 19:40:55.907] > ZNet: workshop item 1635082819 is not installed
LOG : Network , 1687801255909> [26-06-23 19:40:55.909] > ZNet: workshop item 1423496473 is not installed
LOG : Network , 1687801255910> [26-06-23 19:40:55.910] > ZNet: workshop item 498455406 is not installed
LOG : Network , 1687801255916> [26-06-23 19:40:55.916] > ZNet: workshop item 2802932924 is not installed
thats the only thing that appeared in console.txt
i tried to run it with my mod only, these 4 mentioned at the bottom are some random old mods i dont even have
Afaik, your problem is related to multiplayer server use, not to modding.
Oh god that so obvious, thanks I'm gonna try this
Hey, looking to force the player to fall down for a set amount of time. Anyone know how to force the player into that sort of state?
Alright- I think that a timed action would be the best, but I have never actually coded my own timed action so π
for some reason the game just refuses to recognize my IGUI_EN
the filename should be IG_UI_EN
It really do be like that sometimes... The amount of headache I have caused myself by missing one character somewhere is insane lol
that one bugs me because of the inconsistency
it should either be IGUI or IG_UI, not both
This game doesn't have consistency with naming conventions.. not even the API.
My personal fav is when there are typos in the naming of things
Sometimes I'm calling methods with C# PascalCase names and sometimes I'm calling snake_case functions..
colour is not a typ0.
i've given in and started using american spelling in my apis
complicating things further doesn't really help as it turns out π

There's a typo in the perks names that I always found wholesome
Passiv
too cool for the letter E
or maybe too passive π§
the E is too aggressive
Sometimes they name the method with a small letter, sometimes with a capital letter. Sometimes it starts as CamelCase, but in the middle of the method name the new words are in lowercase. Umbrella really helps in this situation π
getX() is part of IsoObject, I want to store localy getX for an IsoPlayer instance (inherits from IsoObject in Java), should I write local isoPlayer_base = __classmetatables[IsoPlayer.class].__index local getX = isoPlayer_base.getX or local isoObject_base = __classmetatables[IsoObject.class].__index local getX = isoObject_base.getX before calling local x = getX(isoPlayerInstance) ? @jaunty marten
is there an event for when an item enters a player's inventory?
doesn't matter
Eggons added such events in https://steamcommunity.com/sharedfiles/filedetails/?id=2617575303
ah so that is to say there isn't one in vanilla?
I want to make hook at Commands.remove (server\Vehicles\VehicleCommands.lua:551), but Commands is in local scope and file not exported anyting. Is there any way to inject my code into this function?
i need to get keyId of vehicle before that was removed
you can add your own command listener and get that data from the args
In this case, the standard command works earlier and the car has already been removed. I can't get keyId
add your command listener from the shared folder so it executes before the vanilla listener gets added
Nice idea! I will try
otherwise you could hook BaseVehicle.permanentlyRemove
It worked. Thank you!
how would somone make custom radio messages
vanilla painting action refers "Painting" sound. I do not find such any Painting.ogg under media/sound. Where should I look for to get it ?
sound Painting
{
category = Player,
clip
{
event = Character/Survival/Carpentry/Painting,
}
}
this means it's from fmod
if it's too new to be in the loose files then you have to extract the soundbanks
I won't ask
I have a few quick theory questions if anyone doesn't mind. I have a mod that is going to behave very similarly to another, which means I'm probably going to copy a lot of functions over for my own.
1.** Is it possible** to require the functions from the first mod so that I don't have to rewrite them? I'll only rewrite them if the mod is absent?
if getActivatedMods():contains("SomeCleverMod") == true then
--require the file to gain access to the necessary functions
else
--write the functions myself since the mod isn't present
end
- If it is possible, is there any performance reason to do this? Or should I just duplicate the functions and not worry about it?
As I'm thinking about this I'm starting to feel like it's probably not a good idea to do this. IfSomeCleverModchanges then my mod will probably implode when the when the two mods are enabled together.
So, I want to make a pretty simple mod that removes some items from another mod
and upload that to the workshop, but i don't wanna just have that mod be a reupload of that mod just with some items missing
How would i go about making a mod that patches the other mod by removing some of the items from it
- only if they are global or if they're returned by the file they're defined in
- there are memory and compatibility reasons
the best way to write lua is with modules, which have the best support for this, but the majority of mods don't use them - some of them use a global table instead which is just as good for your purposes, but if they're completely local you'll have to duplicate
Hmm, ok
so what you're saying is like, using global tables to stop those items from spawning/being obtained?
i was actually continuing my response to collide but the answer to your question is similar
my bad
Trying to make a clothing mod but the model keeps breaking, is there any way to fix this?
The reason why is because I want to use this on a server
or have it be able to be used on a server and said server has a mod that allows you to pick almost any clothing when you spawn in
if I were to just take the items off the loot table they would still be able to be obtained through character creation
hence my issue
if you want to remove items the easiest way would just be to copy their item script, remove the items from the copy, and upload a mod containing only the item script
ohhhh ok
there's an OBSOLETE parameter for items, but i don't think it works as well as it does for recipes...?
i should check that, if that works it'd be even better to just make a new script that marks those items as obsolete and nothing else
alright
how would I go about that then?
I don't got experience with modding unfortunately
but I assume you find the mod file and edit the script from there, then just upload the item script which will override the original mod?
i had a quick look and it looks like OBSOLETE will stop it from spawning anywhere, but i don't think it'll stop it from showing up in the clothing selection unless the mod you're talking about specifically adds that
well, I'll take what I can get
@ornate parrot this might be a little hacky, but would it be sufficient for you to just overwrite the items you don't want to be items you do? Or is it necessary that the items be completely gone? For instance if the main mod in question has crocs as a type of shoe and you want that gone, would it be enough if crocs were actually just regular trainers. The full item name would still be crocs, but you could change the display name, model, etc to be trainers.
I'm mostly trying to remove the extra clothing the mod adds and keep the shoes
I suggest pursuing what Albion suggests first though. She's far more knowledgeable and will most likely be able to get you the best results.
also keeping very few clothes as well but mainly only the riot gear
so the way i'd do this: if two mods have the same filename in the same directory, only the file from the mod latest in the load order will be loaded - if your mod requires the other mod, i think it forces it to be later, so just copy their script with the same name and path, and remove the parts you don't want
i'd like to see a cleaner solution to this since file overrides are generally frowned upon but i've never come across needing to remove an item wholesale before
as I said I'd also be fine if it stopped them from spawning
since right now I don't have a server nor do I use those clothes in singleplayer when I spawn in so
in that case, a lua script like this:
local item = ScriptManager.instance:getItem("Module.Item")
if item then
item:DoParam("OBSOLETE = true")
end
```would be able to stop the item from spawning
you'd just need to swap out the "Module.Item" with the full type of the item (usually something like "MyMod.MyItem" or "Base.MyItem")
Hold on I'm trying to find that
so I assume this is a code thing. but I am trying to get my custom animation to loop for if someones going to be crafting a large quantity of items. but when I enable <m_Looped> it for some reason speeds up my animation to a comical degree
does anyone know why it speeds up?
I assume its beacuse of these? but when I remove them the animation actually gets faster
nah speedscale doesnt seem to slow it down
If you guys haven't read or learned anything about "Behavior Trees", I found an awesome article that was recommended by ChatGPT. If you don't know what I'm talking about, Behavior Trees are what make NPC's possible, dynamic, and engaging.
While I wasn't looking specifically for something related to Project Zomboid, that is where the author made his inroads to the subject. The primary complain he had about online tutorials is that while they explained the topic, they failed to demonstrate the subject matter in any useful context. So he did it with PZ.
I think maybe ChatGPT remembered that I ask many questions about LUA and Modding for PZ and gave me relevant article, OR it's just a happy coincidence. No telling, but if you want to check it out, it's titled "Behavior trees for AI: How they work" by Chris Simpson. I'm reading it for free on gamedeloper.com. Unreal Engine also has some good documentation and exaples of Behavior Trees and AI. I think this will be very important as NPC's are introduced the game.
so I guess I cant loop my animation at all because of the broken speed. since SpeedScale doesnt seem to do anything when loop is applied.
Idk if you're aware but that's one of the devs of PZ's blog lol
is there a way to pop up a message everytime a player picks up a specific item?
You can now crawl under cars with https://steamcommunity.com/sharedfiles/filedetails/?id=2995230593
Just released my mod on steam for the first time π
If the mod will be useful - rate, add to favorites, use it, ask questions 
https://steamcommunity.com/sharedfiles/filedetails/?id=2994732935
Anyone willing to help me out with something? I'm not quite sure how to go about applying it
Basically want to force the player to fall/collapse, for some amount of time
I was thinking of using a timed action, but I am not sure if that would be the best way to handle it
grats!
Or, would I be able to just force the player into the PlayerFallDownState, and then exit that state after
Apologies for interrupting.
Is it currently possible to add a second chat tab, similar to the admin tab?
i've heard that it is, but that's it's surprisingly complex for what should be simple
Yeah, I only know of one mod that does it. It is the bikinitools: Server Edition
But. I wouldnt try to replicate the code base there, since there is a pretty large security issue with that mod imo
Thank you so very much! Really helpful. Much love.
Additionally, I'm looking to commission said chat tab code function ($$$).
DM if interested.
Hello! I wanted to ask if getCell():getOnlinePlayers() is the right call to get playerobjects in the current cell?
currently use getCell():getZombieList() for zombies
just getOnlinePlayers()
hmm don't know what I'm doing wrong π¦ but it gave me a stacktrace error
java.lang.RuntimeException: Object tried to call nil in CheckPnZ
local PlayerList = getOnlinePlayers()
if PlayerList ~= nil then
for i = 0, PlayerList:size() - 1 do
local player = PlayerList:get(i)
if player then
square = player:getCurrentSquare()
I also tried out getSurvivorList() but doesn't seem to work
which line does it point to?
local PlayerList = getOnlinePlayers()
Okay Pascal Case got me

I got a curiosity at 2am bruh
is it possible to like, create your own moodle?
and has anyone ever done it?
huh I will look into them because it is an interesting concept though having it as an individual mod probably is why they arent popular. I see the idea being better for a larger more complex mod with a moodle that relates to it. like a smoking overhaul mod having a custom smoking moodle and ect. not just the moodle and release.
It's very complicated and hard to get custom moodles to work too because the base game already has all the important moods. So there should not be a need to add more.
How would I go about making a mod that replaces a texture?
I made a small edit to the skinny version of the suit pants and want to try uploading it
As far as I know, to replace the texture, you need to name the file exactly like the original and that's it
I wrote the code
everything works
, but
I'm doing random spawn of things
, it turned
out that 98 items need to be written to each container (250 pieces)
, this is 24750 lines of code
+-
Is there any way to simplify the process? Or write a program that will do it for me or something else?
does the OnFillContainer event apply to a player's inventory?
no
it's only fired by the initial spawning of loot
stuff like the inventory never gets loot spawned
is there an event that triggers after the player inventory is updated? like, if an item gets added to the player's inventory
i've looked at the wiki but i cant seem to find one
no
welp, that sucks
you can hook the inventory transfer action instead
i cant seem to find that in the lua events section of the wiki
Its not an event but hooking into an existing function
this is getting a bit too complicated for me, so i guess i gotta put a hold on this HAHAHA
thanks for the help!
I'm kinda interested in modmaking but I probably want to wait until Build 42 for anything serious, right? Is it possible to create a new skill, or are the skills pretty hardcoded vis-a-vis the menu UI?
Its possible to make a new skill appear in the ui + b42 seems like a long time away from releasing
adding a skill to the ui is pretty simple, it's probably the actual implementation of the skill that'll be more complex
there's a script format for skills
I'm thinking my skill will be more like carpentry/metalworking where it's more of a construction check number versus like aiming or fitness.
There doesn't happen to be a guide on this anywhere, is there? I haven't seen any mods that add new skills.
There is that piano mod that has a functioning trait added in
What ? overplay being hurt https://steamcommunity.com/sharedfiles/filedetails/?id=2859296947
Ya I was looking into making a Moodle without having to rely on the framework but couldn't get it to work so I scrapped all I did last night lol
In addition to less work, you'll also get compatibility with existing mods using the framework. But this is not working for Splitscreen players.
Ya, frameworks do make things a lot easier, but I feel like having a list of mandatory mods needed just for yours to work is bad UX. But it takes a lot of skill and is usually a waste of time to try and not use them.
It'd be nice if I could get frameworks to write EmmyLua typings.
Either that or typings can be done third-party.
Anyone know how you snap an item to a surface?
I want to create a mod that replaces the suit pants texture
I tried doing that last night but it simply didn't replace the texture
so I'm unsure how to go about that
I am brainstorming how I want to do this custom moodle and I have no idea how to do any of it cuz its my first time messing with stuff like this
so my idea is to have a stat that accumulates over time, sort of like Boredom. and then I can assign that new stat to certain books or actions to reduce it.
does anyone know of any resources related to creating a custom stat like that?
Can anyone explain what each of the following are on IsoMovingObject, or at least which should be used to absolutely position something in the world?
- x,y,z
- Lx, Ly, Lz
- Nx, Ny
- Limpuslex, Limpulsey
x,y,z
i know the l-x,y,z needs to be set to teleport players but i don't think it's necessary for any other objects...?
ty. I am trying to teleport vehicles around, and just setting the xyz using setX, setY, and setZ didn't seem to work. I tried also with the setLx,etc and still didn't seem to work, but I mgiht have had other issues. figured I would ask before spending too much more time on it.
ohh @mild venture knows something about this
Trying to solve the "too many vehicles in one area" lag issue on a big server. Making a "parking/reclaim" system for vehicles.
they were trying to teleport vehicles too, i don't think anything i pointed them towards worked but i think they did get it working in the end...?
the reason the usual method doesn't work on vehicles is because their position belongs to the physics engine
idea was to TP the vehicles to the other side of the river, and give the player a claim slip. Then they can come back to the "teller" and get their car back.
you probably won't be able to teleport them to an unloaded area
I already have a way to load unloaded chunks on server
Hi! Yesterday i published mod for this. https://steamcommunity.com/sharedfiles/filedetails/?id=2994732935
oh?
Oh damn, mind if I peek into your source and maybe learn myself a few things?
Experimental type of teleport must helped eith you issue
hey albion do you know how to replace a base game texture via an insallable mod?
I tried making one last night but I didn't quite figure it out all the way
i think if the filepath in a mod matches the vanilla one's it'll load yours instead
Its open source. You can take it on gihub also
Simply overwrite it...
The game loads your version of the file after the base file.
Note: file names and paths MUST be exact. File format, dimensions, etc.. need to make sure everything matches.
I did
I have a ghost account which can receive servercommands to be teleported to where I need.
your filepath doesn't match, my one is in textures\Clothes\SuitTrousers and yours is in textures\SuitTrousers
hmm, ok
Oh damn man, just looked at it. I don't even want to guess how long it took to figure out which fields you needed to get using getClassFields.. then how to apply it.
in fact, the guy who made the ancient mod for towing cars told me where to dig. sorry i forgot his name
This is why i love modding. We are all just building and learning from each other
It didn't work for some reason
That's so weird this should've worked
wait nbm
nvm
it's clothes not clothing
IT WORKS I FINALLY FIXED IT
yay!
that part of the suit pants annoyed me so insanely much it's unreal
What the difference? Removed small black line at the bottom of short?
Original vs. fixed
Oh, nice. Looks better
where in the vanilla code can I view how character stats are made? I want to try to make a new one for my mod.
That shit annoyed me so much
I'm glad I was able to fix it
now I can actually use the skinny version of the pants in peace
anyways I'll also fix the other 2 suit pants
army pants and white suit pants
Stats.java, but they really are just numbers
there's nothing mindblowing in there
Now
I've got 1 question
How would I fix it for modded pants?
I.E Small Town First Responders
if it helps me create my own then id be more than happy
you can't really replicate the way they do it
just creating a moddata table with myStat = 0 would literally be reimplementing what that class does
what's wrong with our trousers?
Huh?
nothing, I was gonna do the same thing I did to the other suit pants though
taking off the black line on the top so that way the skinny version don't look weird
if there is a resource that would assist me in trying to create a new stat id go with that, if not then i will just figure it out with the vanilla stuff
i didn't look closely before, yeah that's weird as hell
Literally this is the only change lol
the belt buckle is way too far from the top of the trousers
it definitely happens with stfr textures too? i might bring it up with them
I mean
it's not a fault on their part
it's more of a thing that was part of the OG suit pants texture that came with PZ that nobody really noticed until it was pointed out
well of course, but if it's an easy fix and we all agree it's better and should be done
and we've all been using those same suit pants textures
if they wanna make that fix they can, it saves me time from adding it onto my mod lol
as for doing it with an external patch, it's just the same method, except you need to ensure your mod loads after theirs
i think mods that require another mod in their modinfo load after that mod in singleplayer, for servers though the load order is up to the host
I'll check it in a bit
rn I wanna try making the mod so it looks good on the workshop
i'm not too familiar with ensuring the load order of mods as i primarily work with lua which has simpler solutions for that
Either way
it's unfortunate
most annoying and infuriating thing ever when you finally notice it
i'm probably going to have to install that mod when you've released it
It'll be released pretty soon dw
only affects the skinny version of all kinds of suit pants
luckily i haven't been able to spot anywhere in stfr that runs into that issue
maybe one of the texture artists spotted it already or we just haven't reskinned the item with the issue
oh good
It's only for the skinny variant of the pants however
and I haven't found the skinny variants for the stfr pants yet

yeah, i'm not sure we have any? but as always i'm not the assets guy
@left plank SOS
if they were ever to add skinny variants then yes you would see it
<@&671452400221159444>
Thanks, deleting the rest
Sorry missed that
slowpokes
does this seem relevtively close to creating a custom stat?
the Stats object is hardcoded, you can't just add custom stats
local modData = player:getModData()
modData.myMod = modData.myMod or {}
myMod.myStat = 0
```this sort of thing is the easiest way to make a custom stat

thanks, I will just have to figure out how to proceed from here
embedding a scrolling list within a scrolling list has been so painful lol
ikr
I think need do something with scrollbar flag
@bronze yoke hey, sorry to bother you, but I want to make something of a reskin mod that adds new variants/colors to a pre-existing item
basically, different colors for leather jackets
basically just a brown and red version of the leather jacket
?
I wanted it to appear this way actually π
Personal preference of course - I think if the list scrolled as well as the interior one things would get confusing
I have the interior one pass it's scroll events to the other one
I wanna try making several leather jacket reskins
Hello, we are creating a mod for random appearance in containers. There is a problem, in some containers the items are not displayed, some items are displayed and some are not, what is the reason for this?
or adding different colors to the leather jacket
2 more colors
idk how to do that tho
i think this can be done with doparam
how?
i don't know what doparam is
I'd also hope it's still compatible with Spongie's Clothing
the different texture options are declared in the item script right? you probably have to use lua to add onto them
oh ok
I don't know how I'd go about that though considering I don't have any expereince with lua
guys i never remember, when i save some translation files (ln my case French files that has "special" characters like Γ ,Γ© etc..) do i have to save them in ANSI ? UTF 8 ? other ? to make them appear correctly in the game
I think utf8
Oh yeah i just looked others FR translation files i had in others mods folders and yeah, seems like it is UTF 8, thanks
Going to use this with the debug tools to add an editing interface for modData and hopefully fields, Soonβ’
Hello everyone, I'm trying to create a way to spawn furniture in game. I started out using setTileObject but I was able to run through that. While investigating setThumpable I came across ISSimplefurniture which appeared to be a magical function that just did it all.
So i'm trying to create 5 boxes in a line - i've gotten this far but when I run this code the game gets stuck in a horrible horrible loop - it errors out on every line of ISSimplefurniture. am I just doing something stupid with the sprites?
The errors seem to start with line15 of ISSimplefurniture (buildUtil.setInfo(self.javaObject, self);)
print("5boxes");
local sqX = 150
local sqY = 70
local sqZ = 0
local size = 5
local cell = getCell()
for x = sqX - size, sqX + 1 do
conceptsquare = getSquare(x, sqY, sqZ);
print(conceptsquare);
conceptsquare:ClearTileObjectsExceptFloor();
ISSimpleFurniture:create(x,sqY,sqZ,'furniture_storage_02_17','furniture_storage_02_18');
print("ObjectAdded");
end
end```
Any help would be amazing, especially if it's something simple / stupid that I'm doing. I know I could probably get more efficient with the location, but this is for a PoC and my plan is to optimise later.
IsoThumpable(IsoCell var1, IsoGridSquare var2, String var3, boolean var4, KahluaTable var5)
you're forcing a string into where a boolean should be
ISSimpleFurniture:create(x, y, z, north, sprite)
IsoThumpable(IsoCell cell, IsoGridSquare gridSquare, String sprite, boolean north, se.krka.kahlua.vm.KahluaTable table)
NORTH
I thought North was the north version of the sprite
not a boolean
thank you
I think there's something that does use string in that position
there's another constructor that takes two strings, yeah
I think IsoObjects?
this oneIsoThumpable(IsoCell cell, IsoGridSquare gridSquare, String closedSprite, String openSprite, boolean north, se.krka.kahlua.vm.KahluaTable table)
ah
Howdy - how difficult would it be to spawn in notebooks with prewritten text in specific containers, possibly in modded locations / spawn a specific zombie with specific loot in a building? I haven't tried modding but I'm working on a challenge
Lmao
If you're trying to make stuff appear randomly you could tie into when items are first found.
I do some similar stuff in NamedLiterature
So, maybe another stupid question, so how should I know if the boolean should be true or false in this instance? If what I want to spawn is facing that direction?
That mod applies a title to the object, changes their stats, etc - you could add prefilled stuff. IF you're trying to make some sort of predetermined events, that would take more work.
I want to spawn army Intel that players need to retrieve before extraction. So a notebook in a drawer that has generic codes or something
Ah that's what I was asking, ok good to know.
you could use OnFillContainer or LoadGridsquare, check if the container/square meets the conditions, then spawn a specific item and then mess with its properties
Noted, cool. I haven't dipped into modding before but I figured it's better to ask before struggling through something
Making some good progress with my radial context menu replacement. It now can be a drop-in replacement for all context menus, I have submenus working (currently only right-click to "go back"), and it should be compatible with all mods as I'm just hooking into what already exists. Its worked so far on everything I've tried it with at least. That said, if a mod wants a custom icon in the radial, they'll have to set it via a new function. Still needs some work (especially icons), but its definitely coming along.
@bronze yoke - thank you both for your advice.
I set it to false, but i'm still getting the same errors. I'm not sure what I'm meant to set the Boolean 'North' to, but I figure False is better than nothing.
When the game loads it goes into error overdrive until I close it, the screen is black and the errors are all to do with lighting. So maybe I'm referencing an object that doesn't exist?
local sqY = 70
local sqZ = 0
local size = 5
local cell = getCell()
for x = sqX - size, sqX + 1 do
conceptsquare = getSquare(x, sqY, sqZ);
print(conceptsquare);
conceptsquare:ClearTileObjectsExceptFloor();
ISSimpleFurniture:create(x,sqY,sqZ,false,'furniture_storage_02_17');
print("ObjectAdded");
end```
i'm not sure if you're using ISSimpleFurniture correctly
create looks like an instance method
it inherits from ISBuildingObject which is usually used for the build cursor
yeah, i think you'd need to do something like
furniture = ISSimpleFurniture:new(name, sprite, northSprite)
furniture:create(x,sqY,sqZ,false,'furniture_storage_02_17')
you might want to just copy some of the stuff create does since it seems like using the ISSimpleFurniture class is a roundabout way of doing things
What does the error say?
you're sort of creating a building cursor and then immediately making it activate
i forgot i'd already created objects from lua before, here's an example of how i did it```lua
local crate = IsoObject.new(freeSquare, 'furniture_storage_02_17', 'furniture_storage_02_18')
freeSquare:AddTileObject(crate)
freeSquare being your IsoGridSquare of course
iirc the second sprite name there is a mistake and the second string is just a name for the object
I did try this but the I was able to move through the object. I figured this was because it was a tile and didnβt have all the other properties?
Yeah I think I might go back to trying to make a thumpable object?
it's kind of frustrating there's no obvious way to do basic things like... create an object LOL
Yeah! I might have a go with the ISsimplefurniture:new at some point but alas.
Is there a way to remove an item from the radial menu?
Iβve gone to bed now, so I canβt dig it out - but thanks for asking to have a look. Appreciate the help.
For a regular radial, I think you can use RadialMenuAPI for that (haven't tried it, but iirc this is one of the features). For my context menu radials, it works the same as the current context menu stuff where you can just move stuff around. I don't build the radial until it's ready, so you can move stuff around.
Thank you, I will explore the code of RadialMenuAPI
QoL of 2023 ? :Pπ
Cool! I am too work now on UI π
ooh, any sneak peaks? (I won't tell)
For what purposes used this ui?
This is for custom areas people may need to refer to - in this case it's for zones that will spawn mining nodes
Once it's more stable I'll be repackaging it to work as an API
Can be used for another idea someone had where zombies behave differently in certain areas
damn, i wrote something like this for stfr but i never thought of writing an editor
stfr?
Well the alternative would be to have people edit lua files and save to them
Also I didn't really look at vanilla zones per say - but I could alter it to do so
small town first responders
I wasn't sure if those can be edited and saved
it's just some zones for the purpose of spawning e.g. rosewood uniform police in rosewood
Guys again a quick question about how translation files work. I play with game in French so i try when possible to get all my mods in French. But wanted to know, for example when the game can't find the French translation for a string (example an item name) (lets imagine i forgot to translate a string), it will always display the English translation instead right?
elseif tileToItemList[spr] then
sledgeDestroy(obj)
obj:getSquare():transmitRemoveItemFromSquare(obj)
local count = tileToItemList[spr].count
for j = 1, count do
local hasContainer = false
-- add item to a container if there is one
local objs = square:getObjects()
for k = 0, objs:size() - 1 do
local o = objs:get(k)
local c = o:getContainer()
if c and c:getType() ~= "counter" then
hasContainer = true
-- Add items to the container
c:AddItem(tileToItemList[spr].item, 1)
end
end
if not hasContainer then
local surfaceOffset = obj:getSurfaceOffset()
local random_x = ZombRand(-5, 5)
local random_y = ZombRand(-5, 5)
square:AddWorldInventoryItem(tileToItemList[spr].item, random_x / 10, random_y / 10, (0 + surfaceOffset), 1)
end
end
table.insert(objectsToRemove, obj) -- Add the object to the removal table```
I DID IT
Hey :) just copy/past all files from : /shared/Translate/EN to shared/Translate/FR and edit them, don't forget to put the encoding in ANSI
Any that stays English at that point is probably hard-coded in the Lua
the answer to your question is yes though
yeah thats what i do ^^
learnt that trick when i was translating mods for Stalker Anomaly
But do this in your mod.. not directly in the main mod
So after when you load ur mods, you call the translation mod at the end and it's will overwrite all translation file
also, if the developer was lazy, item names might sometimes be specified in the script instead of a translation file - i think translation files should still work for those but you'll need to work out the translation string's name yourself
oh btw you sure about ANSI as encoding?
Yes :)
i asked earler, and seems like for French its better to use UTF cuz it has special characters
like Γ Γ© Γ¨ etc
You can try to use UTF-8 π€£ you will see what happens with special characters
the wiki says they use ISO-8859-1
lol ok ^^
I'll go for Ansi then :p
thanks for answers !
omg lol just realized who i was talking to ^^'. Yeah ok i think you know what you're talking about :p
i dont see other french that often on the official PZ discord :p (sry for off topic, i stop there ^^)
Does a mod exist to lock spawn regions based on how many players picked that region so far? If so what is it, and if not would that even be possible?

was busy so couldn't answer. any of them, isoplayer is subclass of isoobject so methods are same
glad to see how someone doing optimisation via caching of methods 
Has anyone here used / know of a mod that uses the changeState function?
I want to make sure I am using it correctly
This is how it is written in the docs. So, assumedly I would need to put the state into the parentheses of the function
In the actual 'State' class, this is what it looks like
Would I just put the name of the subclass itself into that funciton? i.e. -> player:changeState(PlayerFallDownState)
player:changeState(PlayerFallDownState.instance())
guys, how to eclipse two zombie state (if they crawling and if they already run anim?)
zReDontSetZombiesOnFire = {}
function zReDontSetZombiesOnFire.OnUpdate(zombie) --, apply
if not zombie or zombie:isDead() or not zombie:isOnFire() then
return
else
zombie:setWalkType("sprint1")
end
end
--Events.EveryOneMinute.Add(zReDontSetZombiesOnFire.OnUpdate)
Events.OnZombieUpdate.Add(zReDontSetZombiesOnFire.OnUpdate)
@verbal yew What is it you are trying to do? Seems like the goal is to make zombies sprint while on fire?
Yep, but i need eclipsing crawling zombie (because they can't stand up and being run) and already running zombies (for not looping... i think... apologize this code should be here... or not)
No you are alright. I understand what you are trying to do here. I will look through some of the javadocs rq and see if there is anything I can recommend
thanks ^^'
By any chance is this publicly available either through the workshop or on github? I'd love to leverage this for some things I'm working on.
zombie:toggleCrawling()
zombie:isCrawling()
zombie:getCrawlerType()
zombie:wasFakeDead()
hmm... it's for crawl state
Yee, I found that too. I was just going to write up some code rq
return not zombie:isKnockedDown()
and zombie:getCrawlerType() == 0
and not zombie:wasFakeDead()
end
function zReDontSetZombiesOnFire.OnUpdate(zombie) --, apply
if not zombie or zombie:isDead() or not zombie:isOnFire() or (zombie:isCrawling() and zReDontSetZombiesOnFire.shouldBeStanding(zombie)) then
return
else
zombie:setWalkType("sprint1")
end
end```
so ive been reading up on stuff to learn lua more. and I have a few questions
when people reference "myMod", what exaclty do I even put there?
I see dozens of people using that as like a generic placeholder, but I cant figure out what information youre actually suppose to fill in for that
what do you mean?
like an example im looking at now "module myMod" or these two picture examples
Ive seen people even in this chat use that as example code, and I just cant figure out what to put there
it should just be the name of your mod
i recommend doing things with modules instead of globals
the syntax is very similar but you avoid polluting the global namespace and the performance is better
got damn i feel like dumb...
if i knocked zombie, how to be return here:
return
not zombie:isKnockedDown()
and zombie:getCrawlerType() == 0
and not zombie:wasFakeDead()
end``` ?
-------------------------------------
-- lua/shared/MyMod/MyModule.lua
-------------------------------------
local myModule = {}
myModule.foo = "bar"
function myModule.myFunc() end
return myModule
-------------------------------------
-- lua/shared/MyMod/AnotherFile.lua
-------------------------------------
local myModule = require "MyMod/MyModule"
myModule.myFunc()
print(myModule.foo)
you keep everything in that local myModule table (or whatever you name your module) and return it at the end, then you can require it if you want to use it in another file
0?
Not yet. Still writing my first real tests with it. Once thats done, I'll be confident it ain't a buggy mess and I'll put it on Github.
What is the code to pull the current sandbox choice for something, I want to pull zombie speed
SandboxVars.ZombieLore.Speed?
So, I think that this would accomplish what you were trying to do. @verbal yew
```lua
local defaultSpeed = SandboxVars.ZombieLore.Speed
function ZombiesOnFireBad(zombie)
if zombie:isOnFire() == true && zombie:isAlive() == true then
getSandboxOptions():set("ZombieLore.Speed", 1)
zombie:makeInactive(true)
zombie:makeInactive(false)
getSandboxOptions():set("ZombieLore.Speed", defaultSpeed)
end
end
Events.OnZombieUpdate.Add(ZombiesOnFireBad)
@tame mulch
There are quite a few changes for sandbox options in v42. Will there be support to make scheduled changes and push them to clients from server?
instead of default you should have a previous value that is not cached maybe
I have no clue if it'll work, mind you. I borrowed the concept of how to make the zombies sprint from this mod https://steamcommunity.com/sharedfiles/filedetails/?id=2797104510&searchtext=sprinter.
It seemed to be the closest thing I could easily find to emulate what you are trying to do. Basically, you change the world setting, forcefully make the zombie braindead, un-lobotomize it. and that should force it to follow the newly updated world settings. Then you set it back to the original lore speed.
Allows you to not need to worry about the type of zombie, because it will just make any living zombie that is currently on fire into a sprinter. Meaning that even the crawlers should be fine to be updated
Yeah, I wasnt too sure what to do with that tbh. I figure it'd even be fine to have it default to speed 2 for the fast shamblers that I think most people play on lol
Or maybe 3
Otherwise, make sure to cache it after they (Sandbox options) are loaded
thanks

stuff like
zombie:getModData():SPEED_SPRINTER=1
@fast galleon You happen to know of any good way to purposefully knock a player on the ground for a set amount of time? π₯Ί π
idk how to time it but setBumpType, setBumped and stuff is used for knocking players over
no, I can show you "sleeping zombie" for 1 minute
The timer side is really easy, I just dont know anything about messing with animations / player states
for example the zombies use a reanimateTimer value, so they don't get up while the player is standing on them.
Yeah, I have been working on and off on a drug mod. So I am trying to set up a point where if the player OD's, they will fall to the ground, be unable to move or otherwise do anything, and then stand back up while undergoing some pretty big negatives.
I have all of it down EXCEPT how to get them on the ground for awhile... π
these are for zombies, maybe some will apply to players π€
local zombie = zedList:get(i)
--zombie:setKnockedDown(true)
--zombie:setStaggerBack(true)
zombie:setHitReaction("Floor") --string Floor, FenceWindow, HitReaction, EndDeath, ""
--zombie:setPlayerAttackPosition("") --string BEHIND, ""
--zombie:setHitForce(0.001)
--zombie:reportEvent("wasHit")
zombie:setFallOnFront(true)
--zombie:setCanWalk(false)
--zombie:setOnFloor(true)
well my concern with the bump type stuff is that it already has a set time
i'm not sure you can cleanly stop it at the right time
hmm, how to possible set cooldown on function when they has KeyPressed Event?
save timestamp of last successful attempt and compare the current timestamp

what weird ass math is causing this lol
I tell it to raise in only increments of 0.1 then it suddenly goes into 99999999999999999999
and it always only does it after 0.7. no matter how I try to edit it
it's just a precision error
as long as you use floats you're going to see those, usually you can just ignore them
alright
ive been using if's to control how high it can build up to
idk if its optimal but it works
you could use integers for consistency, say 0 to 100
you can use modData.TestStat = math.min(math.max(modData.TestStat, 0), 100)

math.max returns the highest number out of its arguments, math.min returns the lowest, if you put them together it's a clamping function
as Vishnya says, it's more optimal to use if
is that right?
seems to be
ive seen the vanilla game use something similar to this for the debug menu code for the stat bars
if modData.TestStat < 0 then modData.TestStat = 0 elseif modData.TestStat > 1 then modData.TestStat = 1 end
but i couldnt find the exact stuff anymore so I just went into if's
ya that still does the infinite looping of 1, but its pretty much looks like a more compact version of what I did so I will prob just use the if statements I already made
you still need the if modData.TestStat = 1 after that
pog knowledge
gonna get around to making my big weapon pack
if it's gonna be attachment oriented, do i have all the attachments on the gun model itself or are they attached through other means
i need to eventually finish my weapon pack
do i need to segment and separate every aspect of the attachments itself
Could someone explain the exact chances of getting a thread to drop for a given Tailoring level? Roughly how much of a chance increase is it per level? I've gathered that the game pulls a random number of up to seven, and if your Tailoring+1 is high enough you can get a thread. I think the number of thread you get is based on how many body parts the given clothing covers, but I'm not sure.
I don't actually know the specifics of ZombRand. Does it go from 0-7, or 1-7?
Looking through some old messages, it seems ZombRand would actually output something like 0-6? Would this mean you're guaranteed to get a thread at Tailoring level 5?
I still don't get this part
local thread = InventoryItemFactory.CreateItem("Base.Thread");
for i=1,10-max do
thread:Use();
is there a way to make require in client from shared?
hello everyone, I added a mod that makes random spawn items a little more items and it stopped working. What is the reason?
before
after
Hello there! Im looking for some help regarding Generators. Im making a mod which adds a modified version of a generator with extended range
Im willing to pay for help and or a lesson on how to do this
guys, your help :P
local zReChance = 0
local zReIsDoctor = self.character:getDescriptor():getProfession() == "profession_doctor2"
if zReDoctor <= 8 then
zReChance = 0
elseif zReDoctor = 9 then
zReChance = 10
else -- zReDoctor = 10
zReChance = 15
end
local zReTotalChance = 25 + zReChance + (zReIsDoctor and 100 or 0) -- 25% + chance from aid skill```
is the formula used correctly?
for zReIsDoctor stuff
Is it for the vaccine mod?
Because you'd actually have to be a virologist (or at least have a foundation in biology/biochemistry/microbiology) to work on vaccines - rather than be a doctor.
It's generally a master degree after you get a bachelor degree in one of those 3 bio degrees.
You could add a new skill and professions for it?
My own question:
Do zombie stats apply per-zombie? So, would it be possible to randomly make some zombies smarter / stronger / faster?
I probably arive after the war, but there is code to handle scrolling inside scrolling in ISScrollingListBox:prerender() -- This is to handle this listbox being inside a scrolling parent. if self.parent and self.parent:getScrollChildren() then stencilX = self.javaObject:clampToParentX(self:getAbsoluteX() + stencilX) - self:getAbsoluteX() stencilX2 = self.javaObject:clampToParentX(self:getAbsoluteX() + stencilX2) - self:getAbsoluteX() stencilY = self.javaObject:clampToParentY(self:getAbsoluteY() + stencilY) - self:getAbsoluteY() stencilY2 = self.javaObject:clampToParentY(self:getAbsoluteY() + stencilY2) - self:getAbsoluteY() end self:setStencilRect(stencilX, stencilY, stencilX2 - stencilX, stencilY2 - stencilY)
--- other topic --
Is there a way to get modded item icon in the item list ? this has bothered me for too long.
The icon is missing next to the name for Metal Spear
Dont think so i think its a bug with the list in vanilla
So far i seen none of the modded items ever had an icon even if it was correctly implemented
yeah, but I do not find where this is added in ISScrollingListBox
Maybe debug one is its own?
Unless you mean it then ive no idea
It does bother me aswell might check it out later aswell
ISItemsListTable Line 375
The viewer is directly looking up the textures instead of reading from the item object.
yep, on it, thanx π
Would be a nice little thing to have fixed.
yeahh... even that is a stretch
yep
@wet sandal @neon bronze So those icons must be in texture packs to work in vanilla. afaik there is not more Item_<Name>.png in PZ directories. I am tempted to fallback (except for moveable) to getTexture('media/textures/Item_'..item:getIcon()..'.png') but this is only because I used to put my items icons in that folder. It wil not work for other mods. Any preference for loose Item_ICON.png fodler ?
how does a "virologist" trit, for example?
I dont want to add more profession.
it's actually just a convention.
I would look into how getTexture access the path maybe it uses the vanilla path and not the mod path
it looks into textures loaded from packs or full path starting from media
should be, all zombie has hex code, check random zombies days and night
I am stupid and misread it
I just replaced the code (Line 370 - 379) with this and it seems to work fine
local texture = item.item:getNormalTexture()
if texture then
self:drawTextureScaledAspect2(texture, self.columns[2].size + iconX, y + (self.itemheight - iconSize) / 2, iconSize, iconSize, 1, 1, 1, 1);
end
Forget the icon bit
It's good to see modders with good knowledge on UI API.
Thats a lot better with mods like Brita's
I just directly editted the vanilla file, so I don't have anything proper to share
All good.
I might swap active projects and work on the HTML render engine stuff I did back in Christmas time last year.
=D
UI is sounding more fun again.
It always sounds fun but when you start coding it it becomes a pain again
Nah.. Not this one. If you want a demo of a cat pic on your main menu I can throw you a compiled mod zip file of the prototype.
Haha
Woops that was the compiled file
TSTL compiling TypeScript to Lua. :D
Ah, that makes more sense.
I'm a document goblin.
Possibly? A profession isn't that much more work than a trait though.
What started that project was me asking how to simplify implementing RadialMenus.
<radialmenu>
<item>..</item>
</radialmenu>
``` (Or something similar)
Anyways, Still nice stuff @wet sandal
possibly, but don't want to do all profession stuff (for foraging in main)
Awesome !
@jaunty marten I bet you'd like to hear me resume that project. xP
I think it's about time I stop neglecting that.
fk yea

@red tiger love it
@neon bronze @wet sandal Feel free to use that snippet. I consider it is not worth a dedicated mod and put it in Tchernolib in next update. ```require "ISUI/AdminPanel/ISItemsListTable"
if ISItemsListTable.isModdedIconPatched then return end
local lcl = {}
lcl.item_base = __classmetatables[Item.class].__index
lcl.item_getIcon = lcl.item_base.getIcon
lcl.item_getIconsForTexture = lcl.item_base.getIconsForTexture
lcl.item_getNormalTexture = lcl.item_base.getNormalTexture
lcl.item_getCategory = lcl.item_base.getTypeString
lcl.iconSize = getTextManager():getFontHeight(UIFont.Small)
local vanilla_ISItemsListTable_drawDatas = ISItemsListTable.drawDatas
function ISItemsListTable:drawDatas(y, item, alt)
local returnValue = vanilla_ISItemsListTable_drawDatas(self,y,item,alt)
------- hidden
if y + self:getYScroll() + self.itemheight < 0 or y + self:getYScroll() >= self.height then
return returnValue
end
------- vanilla did the job ?
local icon = nil
local iconsForTestures = lcl.item_getIconsForTexture(item.item)
if iconsForTestures and not iconsForTestures:isEmpty() then
icon = iconsForTestures:get(0)
else
icon = lcl.item_getIcon(item.item)
end
local vanillaFoundTexture = false
if icon then
local texture = getTexture("Item_" .. icon)
if texture then
vanillaFoundTexture = true
end
end
if not vanillaFoundTexture and lcl.item_getCategory(item.item) ~= 'Moveable' then
local texture = lcl.item_getNormalTexture(item.item)--thx to Notloc
if texture then
local iconX = 4
local xoffset = 10;
self:drawTextureScaledAspect2(texture, self.columns[2].size + iconX, y + (self.itemheight - lcl.iconSize) / 2, lcl.iconSize, lcl.iconSize, 1, 1, 1, 1);
end
end
return returnValue
end
ISItemsListTable.isModdedIconPatched = true
literally this
moodle framework 10/10
ey anyone can help me figure out how to spawn something ON THE GROUND if there is no surface that works?
elseif tileToItemList[x_spr] then
sledgeDestroy(x_obj)
x_obj:getSquare():transmitRemoveItemFromSquare(x_obj)
local count = tileToItemList[x_spr].count
for j = 1, count do
local hasContainer = false
-- add item to a container if there is one
local objs = square:getObjects()
for k = 0, objs:size() - 1 do
local o = objs:get(k)
local c = o:getContainer()
if c and c:getType() ~= "counter" then
hasContainer = true
-- Add items to the container
c:AddItem(tileToItemList[x_spr].item, 1)
end
end
if not hasContainer then
for l = 0, objs:size() - 1 do
local surf_object = square:getObjects():get(l)
if surf_object and surf_object:getProperties():getSurface() and surf_object:getProperties():getSurface() > 0 then
local surfaceOffset = surf_object:getProperties():getSurface()
local random_x = ZombRand(0, 5)
local random_y = ZombRand(0, 5)
square:AddWorldInventoryItem(tileToItemList[x_spr].item, random_x / 25, random_y / 25, (0 + (surfaceOffset / 192)), 1)
end
end
end```
How do I get the player current square? player:getCurrentSquare() is always returning nil on a OnPlayerUpdate hook.
player:getSquare()
Tried that, also nil.
Do you have the current player object?
Don't you get that from the onplayerupdate hook?
Does that send the player object or player integer ID?
it sends the object
Strange. No it should not return nil.
I wonder if you try to refetch the player through the ID stored in that object.
See what you get then.
local player = ...;
local player2 = getPlayerByOnlineID(player:getOnlineID());
you should use getSpecificPlayer and getPlayerNum, onlineids aren't assigned in singleplayer
nil for a square is saying something is very wrong. Either your object is in an illegal state or that you're not calling what you think.
Was trying to recall the API name.
Thanks.
Hey @bronze yoke - thanks for the code / time yesterday. I played around with it and managed to get it to work by doing this:
local conceptsquare = getSquare(155,70,0);
conceptsquare:ClearTileObjectsExceptFloor();
print("Object Clear");
local object = ISSimpleFurniture:new("cardboardbox","furniture_storage_02_17","furniture_storage_02_18");
object:create(conceptsquare:getX(), conceptsquare:getY(), conceptsquare:getZ(), false, "furniture_storage_02_17");
what is the function to set/get sickness on a player?
found it with discord search, getPlayer():getStats():setSickness(#)
you can't actually set sickness with that
the game recalculates your sickness every frame, so whatever you do will be overwritten
use foodsickness instead
I figured though if I wanted to actually do what I wanted, it was going to take me ages to work with ISSimpleFurniture as it didn't create a container. My thought was to redo ISSimpleFurniture and a few others to try to get what I needed, but it looks like i'm creating new objects from scratch. I was wondering if anyone knew how to just copy and paste an existing piece of furniture or an existing ISOObject. I can't quite work it out from the docs.
Found the issue. Small typo when assigning the player current square to a variable.
xP
yesterday I tried looking at what was the problem I couldnt see it not sure what to look for I may be missing a line or something
oh almost forgot item is not showing up in spawn menu so its not there
I tried looking at my first weapon mod I could not see it
item base instead of module base
fixed it but no item still
What's the actual range of ZombRand? Like, if I did ZombRand(7), would that be 0-7, 1-7, 0-6, or 1-6?
i set food sickness to 0 and still queasy
you might be sick from infection or fakeinfection
you need to put a open bracket after "module Base" and a closing one at the last line
to clarify on how this works, your final 'sickness' value is just the highest out of your foodsickness, your infection level, and your fake infection level
what about corpses
they add to food sickness
let me check that actually, i glanced over it yesterday
yes, that's correct
Anyone got any tips on where to look for cloning an object and placing it elsewhere?
Would IsoObjectPicker be the right code, or is that more for selecting an object and adding items to it?
thanks lol
ive made it so infection, fake infection, and foodsickness is set to 0 every ingame minute (second irl), but i still get queasy, is it possible another mod is influencing my sickness?
if the character is actually infected, setting their infection level to 0 doesn't work (the game also recalculates that every frame)
otherwise yeah could be a mod, every ingame minute shouldn't be long enough to see queasy pop up again
Would there be anyway to change the servers sandbox settings via a lua script? Sorry I'm a bit new to Kahlua and understanding how the imports or methods would work here.
i think one of the mods we had was infecting us as soon as the run started π₯΄
wacky stuff
but it was a good introduction to modding for me
looking through media/scripts/vehicles/vehicle_suv.txt right now.
Where is the weight of the Franklin All-Terrain defined? I know it is 85 but I don't see this file defining a TruckBed which the other vehicles do
Guys, how to intergrate recipes, like this
function ISReadABook:perform(...)
if self.item:getFullType() == "Base.NutritionistMagazine" then
local characterMetaTable = getmetatable(self.character)
local originalReadLiterature = characterMetaTable.__index.ReadLiterature
characterMetaTable.__index.ReadLiterature = function(character, ...)
local traits = character:getTraits()
if not traits:contains("Nutritionist") then
traits:add("Nutritionist")
end
end
local result = originalISReadABookPerform(self, ...)
characterMetaTable.__index.ReadLiterature = originalReadLiterature
return result
end
return originalISReadABookPerform(self, ...)
end``` but not for trait, need add recipes
I'm hung up on an event if anyone has a moment. I'm using Events.OnCreatePlayer to do something to the player once they load in. However in my experience Events.OnCreatePlayer is only triggering when the player has already been created and is loading into the game a second time. When I create the character originally, nothing happens. When I exit and reload my action to the player happens 100% of the time. Does anyone know what's going on? Or does anyone know of an event that fires after the character is in, but before the player gains control? Thanks in advance!
Edit: in case it helps clarify what I'm doing. I'm attempting to remove the player's inventory which I can do with getPlayer():getInventory():removeAllItems(). This only works when the character has already loaded in. Perhaps because the clothes haven't been equipped yet?
it should fire even on the first time
Events.OnGameStart.Add?
don't use getPlayer(), OnCreatePlayer passes the player object
the object might not be added to the list getPlayer uses yet, and it'll cause your code to clear player 1's inventory every time a splitscreen character spawns
OnCreateLivingCharacter will fire during character creation
anyway thank you guys for all the modding help
like on the main menu while customising them
Events.OnGameBoot.Add?
no, that fires on the main menu
OnGameBoot fires before OnCreatePlayer I was thinking of OnGameStart
OnPlayerUpdate ?! xD
Events.OnCreatePlayer.Add(function(index, player)
player:getInventory():removeAllItems()
end)
What is the difference between OnGameStart and OnGameBoot?
ongameboot fires on the main menu when the game has finished loading it
boot is what takes you to the main menu, start is when you gain control of a survivor
thanks
I'm trying to modify this so the function isn't inside the event call. But I'm getting this error attempted index: getInventory of non-table
local function runTests(index, player)
print("Running debug tests")
local inventory = player:getInventory()
inventory:removeAllItems()
end
if isDebugEnabled() then
Events.OnCreatePlayer.Add(runTests(index, player))
end
you're calling the function and passing the return value instead of passing the function reference
Events.OnCreatePlayer.Add(runTests)
I still enter fully clothed when I first start a new game. Is there a chance the character is assigned a starting outfit AFTER OnCreatePlayer?
However that's a really good point about not using getPlayer()! Thank you!
is the clothing actually in your inventory? maybe the wornitems hasn't updated
My leading assumption is that it hasn't. It isn't terribly important for me to remove the clothes. I'm mostly just experimenting with equipping and removing things to better understand ItemContainer
While I wait for Notloc's testing UI I'm writing my own super hacky unit tests
Thank you so much for the help! I think I'm going to sleep on this.
yeah, i had a quick look but i don't see any indication that clothing should be added after the event (the event turns out to not even be part of the player creation process
) so i think it's just wornitems, the object that stores the appearance, not being notified of the items being removed
I'll double check the player inventory then. Maybe I've been just quitting out after seeing my character clothed.
yeah, i haven't tested it myself so i could always be wrong
I did notice last night that everything but the player's backpack and shoes had been removed even though the inventory was empty.
i think burryaga actually had an issue to do with messing with clothing on creation too but i don't remember how that turned out
the backpack is a whole different story. My character keeps getting one somehow...
I'll dig back through the history and see if I find anything revolutionary

You're right! Inventory is empty but the character is fully dressed. It's wornitems not getting updated. π€
player:getWornItems():clear() might work
testing now
I say it every time, but you're a dang magician. Thank you again! That worked perfectly!
nice!
I can hopefully sleep soundly now, not worrying about what I'm doing wrong. Good night @bronze yoke! @verbal yew thank you for helping as well! Good night to you both. π
gn!
good night :P
Is there a way to replace a weapon with an item upon breaking?
What's the error?
I've been staring at this for a minute and I don't see anything, it should work.Is that actually line 403 in your code? Sometimes the source viewer is a bit behind if you make changes and didn't restart
yep, it 403 line
i think it's because perform in craft
Those. I can't count the skill level while crafting
CmpSyringeWithPlainVaccine=1,
CmpTestTubeWithRareBlood/MatRareBlood=2,
CmpTestTubeWithAntibodies=3,
CmpFlaskWithSodiumHypochlorite=1,
keep Paintbrush,
destroy NotebookVaccineStart=1,
Result:LabFlaskDirty=1,
Sound:Mixing_B,
Time:400.0,
Category:Vaccine,
CanBeDoneFromFloor:False,
SkillRequired:Doctor=2,
NeedToBeLearn:True,
OnTest:LabRecipes_IsNearChemistrySet,
OnCreate:LabRecipes_UpgradeVaccine2,
OnGiveXP:LabRecipes_GiveXP_Doctor_5,
}``` OnCreate:LabRecipes_UpgradeVaccine2,
getPlayer():getPerkLevel(Perks.Doctor)?
min
nope, not work
hmmm, I'll try work-arounded
pre function with global param for
Events.LevelPerk.Add(LevelPerk)
idk what to tell you, something else is wrong. It is absolutely giving you the player object that you should be able to pull from. I made this change in lua/server/recipecode.lua
local jar = items:get(0);
local aged = jar:getAge() / jar:getOffAgeMax();
result:setAge(result:getOffAgeMax() * aged);
player:getInventory():AddItem("Base.EmptyJar");
print("TEST: " .. tostring(player:getPerkLevel(Perks.Doctor))) -- HERE
-- print("you're new food have age " .. result:getAge());
end```
Opened a Jar of Cabbage, and:
He didn't add it to the Recipe object
that's his problem lol
function should be Recipe.OnCreate.LabRecipes_UpgradeVaccine2 not LabRecipes_UpgradeVaccine2
also jesus what are these comments
remove all of this
why is this here

from old owner of code
server
what difference?
local inv = player:getInventory();
for i = 0, items:size()-1 do
if string.find(items:get(i):getType(),"CmpTestTubeWith") then
inv:AddItem("LabItems.LabTestTubeDirty");
elseif string.find(items:get(i):getType(),"CmpSyringeReusable") then
inv:AddItem("LabItems.LabSyringeReusableUsed");
end--if
end--for
-- local zReDoctor = getSpecificPlayer(0):getPerkLevel(Perks.Doctor) -- upgrade on 2 lvl
local zReIsDoctor = player:getDescriptor():getProfession() == "profession_doctor2"
local zReChance = 0
--[[if zReDoctor <= 2 then
zReChance = 0
elseif zReDoctor == 3 then
zReChance = 5
elseif zReDoctor == 4 then
zReChance = 15
elseif zReDoctor == 5 then
zReChance = 25
elseif zReDoctor == 6 then
zReChance = 30
elseif zReDoctor == 7 then
zReChance = 35
elseif zReDoctor == 8 then
zReChance = 35
elseif zReDoctor == 9 then
zReChance = 35
else -- zReDoctor == 10
zReChance = 35
end ]]--
local zReTotalChance = 0 + zReChance + (zReIsDoctor and 100 or 0) --
if zReTotalChance >= ZombRand(1, 100) then
inv:AddItem("LabBooks.NotebookVaccine2");
else
inv:AddItem("LabBooks.NotebookVaccineStart");
end--if
end--function```
old method work fine, in new just can't check First Aid skill level
I donβt know why, the whole staff works...
not considering my current attempt to add logic to item drop chance after craft
You might want to verify your game files or something. because your code works for me
function should be Recipe.OnCreate.LabRecipes_UpgradeVaccine2 not LabRecipes_UpgradeVaccine2
okey... trying it...
I copied the function LabRecipes_UpgradeVaccine2 into lua/server/recipecode.lua with:
...all the same....
local zReDoctor = player:getPerkLevel(Perks.Doctor) -- upgrade on 2 lvl
print("HELLO: " .. tostring(zReDoctor))
...```
and set:
``` recipe Open Jar of Tomatoes
{
CannedTomato,
Result:farming.Tomato=5,
Time:30.0,
OnCreate:LabRecipes_UpgradeVaccine2,
Category:Cooking,
OnGiveXP:Recipe.OnGiveXP.None,
}```
And I got "HELLO: 2" as the output as expected.
how about link in recipes?
OnCreate:LabRecipes_UpgradeVaccine2,
what it shoul be?
it doesn't matter. as long as it exists. the devs just did that for organization
making random new global funcs is bad practice imo, ...but taking a look at that file it's a gigantic dumpster fire.
i wont touch that with a 10ft pole sorry my love
lol)
hmmmm....
i think i solved the problem
threw all the mathematical calculations before the add items in inv
When I was trying to solve a problem the other night, cursing at the screen when I eventually realised I'd made a simple mistake. My partner asked if it was actually fun what I was doing. I said no and yes. This can be so painful, but the rewards are so sweet when you get to see what you've made, in the game and working.
Best way i'd describe this feeling is like having indigestion to then finally being able to pass it. Or waking up in good health after having a major hedache the night prior.
Is it possible to change the display name of a skill/perk without changing all references to it? Like, is the name that shows up in the UI changeable separately from the name used in references to it in code?
I want to change "Electricity" to show up as something like "Tinkering", but without going through all references to the Electricity skill in vanilla/modded code.
You can try to go into language files
IGUI_perks_Electricity = "Electrical", in /media/lua/shared/Translate/EN/IG_UI_EN.txt
Ohhh, I never thought of that. That's very clever. Thank you!
Not a problem
I really wish I can see what code isnt working
You are likely running lua code without being wrapped in an event when starting the game.
This is highly discouraged because it can produce results like this.
Run the game using a batch file provided to show the console so you can read the error regardless of the state of the game loading.
Hey, how can i inflict some of the effects of fever and sickness onto the player? i don't want them to die. i haven't found the documentation on moodles anywhere
set their foodsickness
No let me rephrase, i want to get some of the effects of foodsickness, but not all of them, especially not the chance of death part at high foodsickness.
the strength of the player's sickness moodle is taken from whichever is highest of food sickness, infection, and fake infection
there's no other way to make the player sick
is there no way to change healing speed, and carry capacity?
i've heard carry capacity is annoying but it's not something i've looked into myself
everyone i've seen wanting to change the healing rate ends up just adding/subtracting health every tick
probably the same method
ighto i will try to fix it
All I wanted to do was change some colors for how the radial renders. Long story short, I ended up just making a new one in Lua so I could. 
does anyone know if it's possible to enter a town and it turn on pvp? just think pvp zones/cities would be cool
What's this? 
Public repo up by any chance?
Is it possible to make the character (when entering their inventory) do what Joel does in TLOU?
This is a guide for crafting and upgrading in The Last of Us on PS3. This guide will also get you the ' Let's Gear Up ' Trophy.
Links:
01:51 Crafting:
To craft an item you need resources including, rags, alcohol, explosives, sugar and binding you also need a recipe to craft for example to be able to craft a bomb you are given the recipe by Bi...
Letting you guys know that I have a currently unreleased vscode extension called PZ-Wallet that I will release soon.
The extension allows people to build templates & snippets to use when modding Project Zomboid.
Any chance compatibility for IntelliJ could be added?
I'd love to test and provide feedback if that could be possible.
I'd need to write a flavor for IDEA but I know it's possible.
Especially since I've got some larger scope mods planned. Some on-the-fly examples / templates would come in handy when figuring out certain aspects of it.
Not public yet, as its not fully functional. Its only drawing the slices so far. However, this wil be a re-implementation of the radial menu in lua to let me tweak it a bit more as its a java object. I started this as my context radial menu needed some coloring, but will be able to forward my changes to the big radial too.
The templates are stored in a separate repo for allowing people to add to it over time:
https://github.com/asledgehammer/PZ-Wallet-Templates
If you could eventually release as a library, or public repo, that'd be really neat. I've been wanting to do some UI stuff.
Plus, I will make a small API for it so that radials work like context menus (i.e. easy reordering, adding/removal, built-in pagination, easy radial submenus, etc). You'll be able to set your own color on a slice, and more and whatnot
Does anyone know how to stop the zoom changes while scrolling inside my panel? upd: solved
complete novice here, does anyone know where I should start on making a weapon rebalance mod?
just editing stats
Hey @red tiger is it possible for you to make zedscript correct a wrong script or scan if something is wrong I don't know how that stuff works so I'm asking you?
This is what I am currently working on when I work on the project.
oh nice I love using zedscript and have trouble with alot of stuff so that's why I was asking
No problem.
alright.
hey folks, I've recently started fiddling around with modding and for the life of me... I can't figure out how to edit item tool tips when you hover over them on the inventory pane
I think I found the place where the tooltip is rendered in lua (ISToolTipInv:render()), but I don't exactly know how to add stuff to the object tooltip.
E.g. I want to add a new progress bar to weapons and possibly some custom text.
Does anyone have any knowledge around this bit? It seems like I'm missing something obvious π
suggestions for trip wire?
how do you detect when the context menu is opened?
more specifically opened on an inventory item?
found what i was looking for, someone posted here about it a while ago
Inventory Context Menu
function(player, context, items)
Events.OnFillInventoryObjectContextMenu.Add(function);```
OKay, another instance of losing my mind.
I am setting up a special case of loot on zombies, and in the OnZombieDead event I am trying to add an item to the zombie to be dropped. Currently, I am doing:
local realItem = InventoryItemFactory.CreateItem("Base.AssaultRifle") -- just for example
zombie:addItemToSpawnAtDeath(realItem)
And that isn't working. So I tried to use zombie:getInventory():AddItem("...") and that didn't work. I looked at the java, and..
if (this.shouldDoInventory()) {
this.DoZombieInventory();
}
LuaEventManager.triggerEvent("OnZombieDead", this);
It appears Inventory is done before the OnZombieDead event, so I tried to call DoZombieInventory as well, but that doesn't seem to make a difference. Does anyone know how to add an item to be dropped on the corpse from lua?
you can do it the way MoreTraits does it.
that mod checks what containers are near the player and uses the container type to determine what it should do.
@robust briar
function ContainerEvents(_iSInventoryPage, _state)
local page = _iSInventoryPage;
local state = _state;
if state == "end" then
local player = getPlayer();
DoStuffWithInventory(page, state, player);
end
end
function DoStuffWithInventory(page, state, player)
for i,v in ipairs(Page.backpacks) do
if v.inventory:getParent() then
if instanceof(v.inventory:getParent(), "IsoDeadBody") and v.inventory:getParent():getContainer() then
--we have a body
end
end
end
end
Events.OnRefreshInventoryWindowContainers.Add(ContainerEvents);
that might work, i just quickly copied the important stuff from More Traits' file by hand
Yeah, I mean that would work, but then it going to put the special drop on any random zombie corpse
then make it more specific
So, need to log the XY of the death, then send that to client, then have client find the corpse in the tile, and plop the weapon in it..
or something like that
calling additem after death should work
i've done this before
the zombie's inventory object is passed to the corpse when it gets created so anything you put in there should carry over
holy stuff
π
Yeah, I thought that would work... but nadda. Did you do on client or server?
in special zombie or in random?
client, the server won't even fire the event
Server is fireing the event alright lol. I am doing it on server, and it is running.
I see my debug prints
in multiplayer?
yup
in the server log and not in the in-game console?
I have at the top of the file
if isClient() then return end
correct, in the debug-server log
hmm i'd better correct that then
the client might still be authoritative of the inventory yeah
like zombie dies on client, does all its loot there, and just
tells the server about it
this makes things... not great for me
the shouldDoInventory check indicates that only one client from many that could call that method should actually fill the inventory
cause I need to track the last time globally a zombie got the special loot, so I was using ModData.. and I HATE the client side global moddata sync
its sooo.. terrible
sucks it up, and starts typing all the boilerplate for global moddata hell
you can tell the server to update it with a client command instead
no need to sync stuff only one side needs
well, every client needs to know last time as well
so they know if they are allowed to spawn the special loot
could also run into a situation where it doesn't sync in time π’
if two people kill a zombie at the exact same moment
if not zombie:getOutfitName() then return false end
local inv = zombie:getInventory();
if 10 >= ZombRand (1, 100) then
inv:AddItems("Base.Spoon", 1);
end
end
Events.OnZombieDead.Add(CheckDrops);
on server
you can send a server command when it flips
generally not a fan of syncing moddata so i tend to think in commands
That didn't work for me
on server
in MP
same, most of my MP stuff is done with commands..
i use moddata exclusively for information that should be persistent, and it rarely makes sense for both the server and the client to need to save the same information
this is that unfortunate case
cause I need globally, all clients to agree
on when the last time special loot was dropped
and it needs to persist
for like
DAYS
across reboots
well only the server needs to save it
Yeah, but every client needs that data, and needs to know when it changes
OHH I SEE
the general idea to me is that clients keep a bool that they request the state of when joining and the server sends a command to update it when it changes
don't sync it
with moddata
yeah I do that for another mod
meh, probably about the same amount of work
ty for the info
ty for the info that onzombiedead is not client specific
how to put a counter in a function?
like u do same stuff two times, second step should be one param + 5 for example
for loop?
for each player separately
Well, like I want to do a thing.
I have a vaccine that has a 30% chance to give trit.
If it didnβt prok, for example, and you use it again, then the chance is already higher, by 5% for example.
Hi, is there a way to save a variable after exiting the game? i.e not have it reset to its default value after relogging/re-launching the game
use moddata
if the variable is supposed to be relevant to a specific object you can get that object's moddata table with object:getModData()
if it's not really attached to a specific object then you can get a global moddata table with ModData.getOrCreate("MyUniqueKey")
its tied to a player's modded moodle
in both cases moddata is just a lua table that saves
either along with the object or along with the world
in this case i'd recommend player moddata
lua makes this so much harder π
local SayVARIANT = ""
local SayTOTAL = ""
SayVARIANT = ZombRand(1, 4)
SayTOTAL = tostring(SayNOTRESULT.."_"..SayVARIANT)
self.character:Say(getText("SayTOTAL"));```
IGUI_EN= {
IGUI_zReVaccineNotResult_1 = "Nah",
IGUI_zReVaccineNotResult_2 = "Nope",
IGUI_zReVaccineNotResult_3 = "No",
IGUI_zReVaccineNotResult_4 = "Empty",
}
should work?
ZombRand(1, 5) because the second value is not inclusive
if you do ZombRand(1, 4) the possible values are 1, 2, 3
it's possible to tostring 3 stuff?
it's only 1 thing after the concatenation anyway, but i think the tostring is not needed anyway
it's for future plan.
For sound shout mod.
i need 3 stuff:
gender, shout or whisper, variant
tostring(gender.."_"..shout.."_"..variant)
it's be work?
yes, by the time the tostring is called it's already concatenated it into one object
but the concatenation will ensure it's a string anyway so tostring isn't needed
what do u mean...
e.g. in your code, SayNOTRESULT.."_"..SayVARIANT will become IGUI_zReVaccineNotResult_3 , that can't be represented as anything but a string anyway
im sorry what
the second value is exclusive
the first is inclusive
thats cursed
this is pretty much the standard syntax for rng functions
i've always assumed the reasoning is because ZombRand(4) can return 4 different values
why did they do it like that
it has a lot of convenient implications
it has a lot of weird vibes 
0, 1, 2, 3?
Just released an addon for the "Shops" mod. Now you can view the history of transactions in the wallet
https://steamcommunity.com/sharedfiles/filedetails/?id=2996594080
I have not even played this game yet I already have a mod idea π«‘
You use Lua to mod this, right? So my ComputerCraft skills should carry over
Hello, welcome to PZ mod development!
Here are some links with resources to get familiar with making mods for Project Zomboid.
https://pzwiki.net/wiki/Modding
https://github.com/FWolfe/Zomboid-Modding-Guide
Thanks! :D


