#mod_development
1 messages Β· Page 128 of 1
the icon name is ok in script
Item_
Alright ill try that
its working! thanks for helping solve my 2 day headache. @open drum
How do I use lua to delete an existing recipe? I've tried using setIsHidden(true) to no avail.
local tobacco_recipes = {
"Hydrocraft.Open Cigarette Carton",
"Hydrocraft.Open Cigarette Pack",
"Hydrocraft.Pack Cigarettes",
"Hydrocraft.Pack Into Carton",
"Hydrocraft.Dry Leaves",
"Hydrocraft.Grind Tobacco",
"Hydrocraft.Roll Cigar",
"Hydrocraft.Put Tobacco in Pipe",
}
for k,v in pairs (tobacco_recipes) do
local recipe = ScriptManager.instance:getRecipe(v)
if recipe then
print("********************* Hydrocraft -> Recipe Hidden? -> " .. v)
recipe:setIsHidden(true)
print(recipe:isHidden())
else
print("********************* Hydrocraft -> Recipe NOT FOUND ->" .. v)
end
end
Above code always returns recipe:isHidden() == true, like it's working, but when I go in-game the recipes are all still available
Entire .lua file is here. https://pastebin.com/T7s2vGJy
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
That'll work. Wish there was a way to outright disable them but I'll take it. Been working on this prob on and off all day
if I want to require modFileOne.lua in modFileTwo.lua in the same folder, would the correct statement be require(modFileOne) or do I need to create an object in modFileOne.lua as a "module"?
set them to hidden AND give them an ontest that returns false always
that was my old approach, inferior
i plan to put this in its own dependency mod so that multiple mods don't need to fuckin loop thru all the recipes
but it's like 2ms so it's not that bad
oh where did it go??
--[[
Version 1.2
1.0: YeetRecipes.lua Written By UdderlyEvelyn 9/9/22
1.1: Updated To Remove Recipes From Books/Magazines 9/24/22
1.2: Removed removal from books/magazines, affecting CanPerform instead now.
Feel free to use this, retain credit to me please. :)
If you only need to replace *one* recipe with a given
name, it is more efficient to use overrides/etc.! If
you're already using this, though, might as well
use it for all recipes to be removed.
]]
local modName = "UdderlyRP"
local recipeDisplayNameLookup = {}
local recipesToYeet = {}
recipesToYeet["Make Sling"] = true --Nah, let's suffer! :)
local yeeted = 0
local start = Calendar.getInstance():getTimeInMillis()
local recipes = getScriptManager():getAllRecipes()
for i = 1, recipes:size() do
local recipe = recipes:get(i - 1)
local name = recipe:getName()
recipeDisplayNameLookup[recipe:getOriginalname()] = name
if recipesToYeet[name] then
recipe:setIsHidden(true)
recipe:setCanPerform("nope")
yeeted = yeeted + 1
print ("["..modName.."] Yeeted \""..name.."\"..")
end
end
local stop = Calendar.getInstance():getTimeInMillis()
print("["..modName.."] Yeeted "..yeeted.." recipes in "..(stop - start).."ms!")```
i was reading it xD
Thanks π
gotta do that '''lua ''' magic lol
ty haha
UdderlyRP_YeetRecipes.lua
in shared
if you use this dont use the same filename, and change the modName variable
I've been looking at the Recipe doc all day and not once noticed the setCanPerform bit :/
i have hesitated to share this cuz i wanted to make it a released thing
but
lord knows when ima get to that
So far I'm just going to use it in Hydrocraft b41 continued, to stop tobacco items from spawning as they have no recipes of consequence and conflict with other smoking mods
I know, I've already set up their distribution to be conditional
So they no longer spawn but if you didn't have a smoking mod installed and ran across 20 or more cigs, you'd still get the option to "pack" them into Hydrocraft packs
Which if you have "Spawn Tobacco Items?" disabled, you'd expect all of that crap to disappear
is this correct? I just really don't get the require statement, the lua docs don't explain it simply lol
no parentheses? all of the require statements I've seen in Kahlua have parentheses
I just need to launch the game and try it...
yep, need parentheses.
gotcha π
This works on single player, but if i run it on server it cause error
could be because i have to use getSpecificPlayer() instead of getPlayer but how do i know if the game is calling the right player? like.. the player who exceuted this command?
since the index is from 0 to what ever the player number... and it always varies
it causes an error because the server doesn't know how to use getPlayer() and will return nil. Use the player parameter in your TESTCOMMAND()
that player is given by the client, who knows what getPlayer() is
so .. like this?
i thought getplayer() function is inherited to all lua
simply remove local player = player, you already have it as a variable ready to go
yes but the server does not touch players. It doesn't know how to access them
client on the other hand does not know how to access the world tiles, like server
hmm i see
i am still struggling to understand how server and client works
even after i read the forum
it is not fun, no
Hey guys,I've been working on getting my mod to work on multiplayer and since there are very little resources on that topic I have a few questions. isClient() / isServer() What these methods do is clear, however when I call isClient() in a file that is located in shared it returns false althought...
documentation would be amazing!!!
Can you help me to understand the getSpecificPlayer() and getPlayerIndex() ???
do i have to getplayer index first
The server absolutely knows how to access players.
On the server, you have to use getPlayerByOnlineID(playerID)
The OnlineID is only given to a player during multiplayer
and put its return into getspecificplayer parameter?
is this steam ID?
No, this is their current OnlineID, which is based on how which player # they are on the server.
no, there are seperate IDs for players.
You, the admin, are 0 if you join first
i see, im guessing it's given differently on diff. server then
oh.. like index
so ill have to get player's ID first
then it will return the player's id in int or wat so ever, and use it as variable to call the function onto that player?
gee im making myself locked in a paradox
When you send the signal from the client to the server, the just ignore this. xDplayer parameter IS the online id of the player that sent the command.
You can't pass an IsoPlayer object like that, as the client and the server don't have the same reference, so it sends the onlineid of the player and the server can get it via getPlayerByOnlineID()
Actually, scratch that. the game does it for you. dope. The player variable should actually already be the player. neat.
been a long day. 
hahah i feel ya
honestly, the less communication needed between server and client, the better, f#&@ that dumb business
xD i feel ur rage
is there way to request item by vehicle part?
finished painstakingly getting this to work:
https://steamcommunity.com/sharedfiles/filedetails/?id=2943068807
what are you trying to do
custom wheel rack for vanilla wheels as spare wheel addon
so if you not mount wheel rack then you don't have option in car to mount spare wheel, but after you install that part you'll see option to install spare wheel
vehicle parts have types, so yes
I'll take a look at the docs
declaration: package: zombie.vehicles, class: VehiclePart
well looking at ki5 vehicles you can install any addon without problem on missing parts so that is hard to get or he just skipped requests by addons
they have specific names, so you cannot make one mod that universally covers all of his vehicles
the only parts that do not have specific names are the vanilla, default ones like Battery and GasTank
expl you can install roof storage without installing railings or same for trunk doors for additional stade where should ve required to have trunk built to can mount doors...
this is a better way of finding vehicle parts, vehicle:getPartById()
https://projectzomboid.com/modding/zombie/vehicles/BaseVehicle.html#getPartById(java.lang.String)
declaration: package: zombie.vehicles, class: BaseVehicle
you can change that by editing the script file that contains the vehicle, or wherever that functionality is determined
mean i know how to add option for specific item what can fit
expl on wheel rack only can be installed vanilla wheels, but the problem is same as in ki5 so i still see option spare wheel and can install wheels even without installing rack first
the issue is that the wheel rack can only install certain wheels, or that the wheel can be installed on the vehicle without the rack?
I am having a hard time understanding your issue, I am sorry
second one
due is something like install part on another part
and that idk if is possible to make
also there is way to make similar part as upper but with adding item to install table for existing slot?
as expl : you need to install custom fusion box to can install trucks batteries for car battery slot (without fusion box you see only car battery that can be installed, but after installing fusion box you will see in battery slot option to install car battery and truck battery)
that is possible to make?
I do not know, I have not seen any vehicles that dynamically change which parts can be added. The only thing I have seen is "missing parts" for upgrading, like in KI5 and Autotsar Tuning Atelier
You need to add the restriction to not install a part if something is missing. It is in the recipes. M151A2 MUTT has a good example, you cannot install certain armor without prerequisites
π
thx will look for that
now how to make possible to do with batteries

@drifting ore I've got the weirdest problem: I can't add your mod "Light-Switch Overhaul" to my collection. Is that because of the review bombing or something else? nevermind, I found your re-upload π
is not public
at all
with some mods has same problem so from that know it
strange, Nippy uploaded a second version of the mod. I'm guessing that's to circumvent the crap that's going on
Hello, is there code to determine if stationary containers were made by the character?
SandboxVars.ZombieLore.ThumpOnConstruction may be the key to my issue.
the game keeps track with a boolean haveConstruction of metagrid zone
if you search through the files you can find examples of this
This is also good solution, most times player made objects will be Thumpable.
Are you trying to prescribe a "created by" value or?
Why is nippy getting review bombed o..o
Hello, are you addressing me?
Yes, sorry - I'm curious what your goal is
I dislike this mod's habit of multiplying items in player-made containers, and wish to address it.
What mod is that? It multiplies items?
Any luck contacting the author?
I prefer to pick up some programming experience by doing it myself.
Fair enough, I saw in the description the author isn't reachable/interested
Are you using the OnFill event for spawning items?
onFill is the event that is called when loot is spawned naturally
I assume the vanilla game bypasses it for constructed things
Not at a computer at the moment but by chance I was using the event for dynamically changing items
The params for it include the container name, type, and container itself -- which means you can pull loot info right from the distro
I think you could probably call loot spawn on the container itself though -- to simply reroll additional loot if you didn't want to break down the methods
This would be nice. I think right now it just doubles existing items if you roll high. Also it used to works every time a new player was around a container and retrigger after updates. Can't say I know it's current state though.
Afterworlds didn't use OnFill. The only piece of code I understood is the one converting the options into the number of days loot will respawn.
How I feel when I see players asking about controller support on an unsupported mod when I have a controller supported similar mod but I don't want to be seen as advertising on an active modder's mod page so I don't tell those poor players that they could easily have what they want if they simply knew my mods existed: π π
I hate competition π
People still install clearly obsolete mods and don't read descriptions
You did the right thing. But you can contact the dude if his discord is same as steam i guess
I hear you... and tbf I am not trying to say that their mod is worse than mine because it lacks support for controllers... The specific mod I just looked at has some (unique) value that KBM users would likely appreciate... But still, it has none for controller users, and I wish I could just help them without worrying about people's egos along the way.
Yeah I tried friending the controller player from the comments because they're not on Discord.
anyone here written frag shaders before?
So when does the loot get spawned?
I presume it's catching the inventory display and spawning stuff there and using modData to stop it from repeating
Moving that code to OnFill would make it only apply when the loot is spawned
Afaik it doesn't run on player built structures
Hey everyone, I'm working on a mod and the items I'm creating have a maxcondition set in the items.txt but don't display their condition in the inventory like say for example a brakes or tires would. Anyone know why?
it's set in the items file.. but only shows encumbrance in game
they need a VehicleType or maybe to be mechanics item
mechanics item is set to true
I tried to set a vehicle type and the game broke lol
{
DisplayCategory = VehicleMaintenance,
Weight = 0.3,
Type = Normal,
DisplayName = BrakePad,
Icon = BrakePad,
StaticModel = BrakePad,
ConditionMax = 100,
MechanicsItem = TRUE,
}```
oh wow, out of sheer stupidity I tried to add the vehicle type again and it worked.
I must have forgot a , or something last time
thanks guys haha π
Yes
definitely the wrong channel glytch go to #creativity hehe
but wanted to share to you guys.. emote for a vblogger/gamer client
- icons for vishnya
Has anyone here used chatGPT or other AI tools to write / help with PZ mods? I've seen some people post a few things on other discords and didn't know how accurate the stuff was
Depends what you need) but you cloud train chat to write for you)
I haven't seen an example that's accurate but it's somewhat close
It could probably write scripts or repetitive stuff tho I just use excel for that...
I bet it would do pretty well if you could feed it some type of error output automatically, saw a whitepaper the other day showing that one of the models could fix its own code by reading the output errors.
the prob with writing stuff without knowing what you are doing is debugging. it could sure maybe write up something. but if you started running into issues. you will spend probably more or as much time figuring that out than just learning to write the mod
c: pretty neat for gaming modding and design
that could be applied to alot of things ahah, try to find a more efficient way to do something but end up spending just as much time or more time than just doing it the original way
It would probably be more useful on a standalone project too
PZ has a lot of intricacies unique to it
chatGPT much better to be used like assistant for planning or idea generation
Or if you have straight up question and doesnβt want to look throug google for the answer)
I'm working on something I think it could help with - catching possible features I'd need
Yeah, it might help (or might not) 
But it really could generate ideas for features/mods
I use playground more than chat.openai, I feel like it can be better at times in terms of accuracy.
An API for accessing new AI models developed by OpenAI
It's free form
Less work for me if I just have to focus on card deck logic, and board game pieces
Playground count your tokens and you have 18$ for free in the beginning. After youβll use them you need to pay
You just need the shuffle function which is super easy for you to do.
Let players move stuff around and possibly cheat eachother π
RP mod nice
Shuffle is there
Would be simplier that way. Buy can you put it on a deck and draw from it?
Wepl maybe if the cards have specific serial id per deck they wouldn't be able to cheat
Using the vanilla CardDeck item I give it a modData list of cards -- drawing a card creates another CardDeck item with just that card listed. Drag dropping decks merges them.
This will let you mix up cards from any deck
Yeah same code
Thats efficient
Cards are just strings, not going to bother with values as it's not needed
Also keeping it as freeform as I can, so I can add more games later
And not have to program whole new features
Smart
Lool playing a game within a game. Thats inception shiz
They mentioned on the blog about adding more junk items- they seem to be all board game centered.
I think junk items should always have a use, even if it's just gameplay flavor or white-noise
Same reason I wrote Named Literature. Very glad the devs seem to share the same outlook.
I hope they change books to be not consumable tho lol
also 100 lmao
i created so many version of read books just to give that effect in my server
Ooh, I wonder If I can use chatGPT to make puns from the book titles
Hmm, I'll start feeding it titles lol
i told it to have avg 5 words with max of 7 words and it nailed it
yea only a couple examples of your type of humor will do the trick
I considered having real world titles to be iffy but I think using only the title falls under fair use
Even commercially(?)
anyone who answers that won't give you the answer i bet
π
i'd just roll with it and not worry too much lol. or if you are worried at all just dont
actually i did look a little bit
i guess because they are just words throw together to make a title, they are all fair use
should probably post the actual link lol
this seems to be focused on books and writing
haha
These aren't half bad, but the poor thing took so long. Same speed as a NES rpg
lmao yea thats why i can't use it for anything but math stuff and things like that
How long does a eat sound has to be, so it doesnt loop? Already added loop = false.
Yeah I pay for the service atm. Use it daily for various work things and haven't exceeded $15 a month :3
soo i have a weird issue... I have a mod which adds a slice to the vehicle radial menu. I was updating the icon for that slice, so naturally, i removed the old icon, and put the new icon, and then updated a few bugs in the code.
I am being driven crazy because it still shows the old icon (even though its not even in the mod's directory anymore??). I thought its reading the mod from somewhere else, but the bugs I fixed in the code are updated and the changes I made to them are taking effect in-game, but not the new icon. Is there something I am missing?
menu:addSlice(vehicle_name .. getText("ContextMenu_clickToRename"), getTexture("media/ui/vehicles/rename.png"), ISRenameEverything.onRenameVehicle, player, vehicle);```
actual in-game icon
Are you subbed to the mod? If it's on the workshop that is.
You'll have to unsub to use the local version.
not even subbed to the workshop version
-- maybe i am lemme see
sighs I was sure I wasn't but apparently I am
That'd do it
I kind of wish the game could handle local vs workshop but they share IDs so it would be a hassle to compare directories and list both
Here is a very good example of chatgpt and openai for games ^^
https://www.youtube.com/watch?v=akceKOLtytw&t=0s&ab_channel=Bloc
The following video will demonstrate the using ChatGPT in Bannerlord with a custom build story engine for NPC dialogue interactions.
SECOND VIDEO(more characters, professions etc): https://youtu.be/L_qauw4QM3Q
In the video, we will go to Battanian village, Imlagh and start chatting with random NPC's. NOTHING is scripted in this video.
This imp...
Might be using the voice AI ElevenLabs for more variety in EHE. I didn't consider having AI also write the lines
anyone got a function for right clicking on a player to add a context menu option.
or a mod that does such a thing?
@mellow frigate you around?
or @timid plume
ElevenLabs
I assume EL is the only real option atm, huh?
This is one of the first use cases for LLM that came to mind for me after seeing ChatGPT blow up. Neat that it's already being considered
May be a silly question, but Iβve been trying to figure out a way to set vanilla items as a potential water source, such as the shower head, washing machine, etc. Is there a simple way to to just make these fixtures have a similar interaction to a sink/toilet?
update tileproperties
TileZed has the ability to do this also
THANK YOU! This makes way more sense than the garbage I was working through
if clickedPlayer and clickedPlayer ~= playerObj and not playerObj:HasTrait("Hemophobic") then
if test == true then return true; end
local option = context:addOption(getText("ContextMenu_Medical_Check"), worldobjects, ISWorldObjectContextMenu.onMedicalCheck, playerObj, clickedPlayer)
if math.abs(playerObj:getX() - clickedPlayer:getX()) > 2 or math.abs(playerObj:getY() - clickedPlayer:getY()) > 2 then
local tooltip = ISWorldObjectContextMenu.addToolTip();
option.notAvailable = true;
tooltip.description = getText("ContextMenu_GetCloser", clickedPlayer:getDisplayName());
option.toolTip = tooltip;
end
end```
This is the way "Medical Check" displays when clicking on another player in the vanilla files
Check line 452 in media\lua\client\ISUI\IsWorldObjectContextMenu.lua
ISWorldObjectContextMenu.createMenu = function(player, worldobjects, x, y, test)```
you should be able to use this as a starting point for editing it to your mod's needs
how does the game hide walls?
*oh right, change alpha
I think it's a combination of the hole-punch shader with the alpha gradient circle texture & LoS direction calculation.
I am running into trouble getting my map mod to load into the game
I can see it in the mod list upon loading PZ, I have all the files correctly placed in the mods folder.
I load into the game and I head to the chunk where my map mod should be loading and nothing is there
- Is this Single Player
- is the mod enabled
- did you start a new game
- I start a new game in solo
- Yes
- I start in solo as a new character so im guessing so?
I start in solo as a new character so im guessing so?
It needs to be a new solo game, not just new character, but you said that higher already. Not sure what else could broken, anything weird pop up in the game logs?
checking that now, but I dont see any errors
I never get an answer on any questions in there, might just be my luck but developing the mod thus far has been one hell of a hassle
That image cut-out is crazy.
if you see it on the worldmap but not in person. it means load order of maps is the issue, if you can't see it in either then it's most likely mod issue itself and how you installed it
also why do you have so many spawn files
you either add it into objects or create a new file and add there, but you shouldnt need multiple files for it
Referencing 2 videos (blackbeard and dirk)
I didnt set up or did not receive instruction to have the location added to the in-game map. Just the physical location in game.
As far as the spawn points and regions..
I added the spawn regions from blackbeards video according to my needs. I have tried loading with and without the spawnregions file
it could break it but most likely not the problem
make sure you added the mod. then goto maps, add the map. in the edit server settings in host
make sure the map is ABOVE Muldragh
also make sure you added the vanilla lot in there also if it's for vanilla map
in your map.info
mod load order and map is backwards from each other. mod order is load from top to bottom. map load order is from bottom to top
I know my map.info is set up properly
As far as the maps portion are you talking about the map.bin file or just the chunk files like I have above.
Or is it something that the resources I had didnt cover?
are you loading into a previous save or new
if new then forget map chunks
when you setup a mod in PZ
you goto host. you click edit. you goto mods, you use the dropdown menu to add the mod
if its a map you have another step. you goto maps two spots below that
then the map should in theory already be added. but just to be sure check
make sure it's above muldraugh, ky
if you did all my directions and still no work, then you did something wrong when exporting your map from worlded or tilezed
Hi guys I've just created my first mod that simply adds a new drink to the game using the Whiskey structure. So I have the full object, water full object and empty bottle object for it. It all works well except I can't drink water out of the bottle once it's been refilled. Is this a common issue and if so does anyone know the fix?
Would be fun to make a mixer skill with a mini game for mixing drinks with buffs.
My course of action would be looking at how bottles work and see if you missed a line of code
Would be great for RPG servers
Currently trying to figure out if i can force my char to equip a welding mask for a recipe i'm making.
Maybe once I can get 1 mod to work hahaha
Sounds super cool
But i don't think that's possible without a bunch of extra lua
Don't mind me.. I throw ideas around when I am not up to my usual shenanigans.
I've had a look through this and it all seems to be there
Have you realized that what I said on that call on Friday is true about modding script pitfalls being the biggest hurdle for new modders? :)
I keep watching the chat here.
So
Quick question.
When adding a crafting recipie, How do I drain a car battery a percentage instead of destroy it
water pot script posted earlier
{
DisplayName = Cooking Pot with Water,
DisplayCategory = Water,
Type = Drainable,
Weight = 3,
Icon = Pot_Water,
CanStoreWater = TRUE,
EatType = Pot,
FillFromDispenserSound = GetWaterFromDispenserMetalBig,
FillFromTapSound = GetWaterFromTapMetalBig,
IsCookable = TRUE,
IsWaterSource = TRUE,
RainFactor = 1,
ReplaceOnDeplete = Pot,
ReplaceOnUseOn = WaterSource-WaterPot,
Tooltip = Tooltip_item_RainFromGround,
UseDelta = 0.04,
UseWhileEquipped = FALSE,
StaticModel = CookingPot,
WorldStaticModel = CookingPotWater_Ground,
}```
It took me like 2 hours to figure out that some things that look like they should reference a texture are actually referencing objects, it was such a pain but now I know it makes a lot more sense
from what i can gather right quick is that you turn your empty bottle into a totally different item and if you add all required lines (like the pot with water posted by Nippy) it should just work XD
yes
there is an item for empty and one for not empty
Nothing to show just yet but I'm working on a visual editor for ZedScript.
The empty one works but its the water filled one that causes the issue
you will see some basic requirements for water item here
it's probably because you arent indicating its water
whats the script look like
probably will help
Ill get it now
I'm still trying to figure out if i can force my char to equip a welding mask when it's crafting an item i'm working on xD but i seem to be failing at that xD
Im not hosting, Im doing solo and enabling the mod through the mod menu
need lua for it
same difference
yeah figured as much xD guess i'm not gonna bother XD
it's not horribly complicated but there is a barrier to get by when coding in general
i'm not that good at lua yet, but i doubt i'd be as easy as just referencing to the game's code for disassembly or something XD
its easier than that really
because the example here is for wearing a clothing item
eat type?
I also thought that but the water filled whiskey bottle also uses the same type
Oh thats actually super helpful to know
I was wondering what it was
Hey guys, I'm having some issues with an onEveryHours event. It's working on my local hosted session, where you hit host and load it in there, but on the server it's not loading and nothing is being printed to the console.
function SBioGasSystem.sandbox()
--Events.EveryTenMinutes.Add(function()SBioGasSystem.instance:addBioWaste() end)
Events.EveryHours.Add(function()SBioGasSystem.instance:processBiowaste() end)
end
Events.OnInitGlobalModData.Add(SBioGasSystem.sandbox)
SGlobalObjectSystem.RegisterSystemClass(SBioGasSystem)```
How does one simply disable / remove all vanilla recipes?
just replace the vanilla recipes file with an empty one
I tried that, it doesn't seem to be working
am I missing something?
module Base
{
}```
that's all there is in C:\Users\Terrormuecke\Zomboid\Workshop\KaeldorMedieval\Contents\mods\Kaeldor\media\scripts
Does anyone knows how the "PoisonDetectionLevel" works? This is a numerical value assigned to food items and it is probably related to how the player can detect whether the food is poisonous. However, I am not able to figure out what it does exactly. See here for the related java command: https://projectzomboid.com/modding/zombie/inventory/types/Food.html#getPoisonDetectionLevel()
declaration: package: zombie.inventory.types, class: Food
OnTest:Recipe.OnTest.IsNotWorn, is not what i'm looking for i think, that checks if an item isn't work (like with ripping sheets from clothes) and all i want is for my char to equip the welding mask before they start making the item in from the recipe XD
And how does one remove all professoins but unemployed? lmao
Sorry ubt this is new land to me
Was away from my pc, I'll be back to troubleshooting in a min. Thank you for the help thus far
Oh it is
if your cooking skill is equal or higher to 10 - poisonDetectionLevel, you will know it is poisoned
e.g. if poisonDetectionLevel is 2, you need to be level 8 or higher to know it is poisoned
i think i understand how the ontest stuff works, now my brain just needs to work with me ROFL
yeah i want my char to equip the Welding mask
i got the animation to use the torch already so that's working as i want it
I think setcanperform or oncanperform can do it also
It triggers before crafting ends
many thanks! very helpful!
yeah i was looking at that page you linked, but now i need my brain to work with me XD
Lmao I feel you there
(gotta love autism, in my case at least)
It took me so long to setup custom craft speed by sandbox options
I still didnβt even implement even though I got it working hahaha
I'm implementing a recipe in my mod so players can make a set of pliers using some materials and a can opener, with the end result of being able to turn Wire into barbed wire for the weapon
and crud the F key on my keyboard keeps ghosttyping :S
i hope that's not gonna get worse. this keyboard wasn't cheap
Any reason why that my mod has no content, but is 7 mb and was downloaded?
There's 0 content in game
but it downloaded 7 mb
@drifting ore
Map did not show up in game on anything anywhere.
I am going to try and go back through and redo all the main files.
If you see anything wrong lmk please
upon load, I confirmed that the mod is "enabled"
next I went to
Solo >
so its not even showing up in the spawn list
Is that going to determine if its on map or only if its a spawn point
I have spawns set for specific professions within the mod but not "all"
Do you need lua to add new food and drink or is it purely the scripts?
sorry for ping but do you also happen to know how the "setPoisonLevelForRecipe" exactly works?
How can I remove all selectable professions or replace them with my own?
Naming the file the same doesn't work, the host 'terminates' on start up
post a picture of the file?
think i'm too tired, i can't seem to come up with what ineed to type to make this work, what i do have right now kinda triggers the recipe not being craftable even IF the mask is equiped LOL
I've tried looking at the code for fishing and other things to see how it works but i just can't wrap my head around it for some reason
Thanx for the help regardless @drifting ore
Np. You essentially will create the requirements or actions you want to happen within that timeframe of the lua script running.
just test it in host mode first or maybe someone who's played sp can help. i have 0.0 seconds in SP ever
so what im running into which might be an issue
I used InGameMap and when I looked at the xml file nothing was in it.
Do I need to define something or even worry about that?
oh you dont need xml to see it in game
only on the worldmap
if you dont have that, it will still appear at the location in game. just cant see anything on map. to see on map you have to generate features
normally when you place buildings, you can tag, or they will be tagged already in buildinged with a specific building property.
does anyone knows which part of the vanilla code realizes crafting the evolved recipes? I just checked ISCraftAction.lua but this seems not to be active in this case
We've tried so many things now. Does anyone know how to remove all vanilla professoins?
Like, this is doing my head in right now π
I mean, if you don't mind using the Profession Framework as a dependency, it's a single line of code
Whatever it takes at this point
I'm starting to burn out
I tried removing professions using the Framework
It doesn't work, cna you please assist me somehow
ProfessionFramework.RemoveDefaultProfessions = true
I currently remove all professions myself, for a Medieval mod I'm working on; that's line 1 lolz
ProfessionFramework.RemoveDefaultProfessions = true
local addProfession = ProfessionFramework.addProfession
addProfession('Peasant', {
name = "UI_prof_peasant",
icon = "prof_peasant",
description = "UI_profdesc_peasant",
cost = 0,
traits = {"Peasant"},
})
local addTrait = ProfessionFramework.addTrait
addTrait("Peasant", {
name = "UI_trait_peasant",
description = "UI_traitdesc_peasant",
profession = true,
exclude = { "Mechanics", "Formerscout", "Handy", "Hunter", "Hunterhunter", "Nutritionist", "BadMiner", "GoodMiner", "SpeedDemon", "SundayDriver"},
recipes = {"Make Stick Trap", "Make Snare Trap", "Herbalist"},
})
The full file right there; removes all professions, then adds in a new one
I'm going to try this, much love going out to you lmaooo
No worries, good luck! If you need additional assitance feel free to ping or DM if you want :3
so I tried again and the cell where my mod is supposed to be is still "empty" or vanilla
I have generated lots, Objects, spawnpoints, I have created zones for water, town..etc
Is my Tilezed supposed to be different than my world ed?
because Tilezed doesnt give me any options to do anything like world ed does and I never saw dirk or Blackbeard do anything major in TZ
I think you essentially need to overwrite the vanilla function BaseGameCharacterDetails.DoProfessions then. This is also what the ProfessionFramework does when RemoveDefaultProfessions is set to true. When you overwrite, you need to make sure to add some code like
for i=1,profList:size() do
local prof = profList:get(i-1)
BaseGameCharacterDetails.SetProfessionDescription(prof)
end```
at the end of your new function to make sure that your new professions get the correct descriptions in the interface. And note that overwriting the vanilla code may lead to several compatibility issues with other mods and in the worst case, to compatibility issues with upcoming vanilla updates.
I finally figured it out
ProfessionFramework.RemoveDefaultProfessions = true
That was literally it
π
This is insane
I've spent like 2-3 hours to find out I was missing the 'true'
lets bring this to mapping so others can see it and answer also. you will get almost no help herre for this
ah ok. then you still use the Framework. Setting this to true has also the effect that the vanilla function is overwritten then. But maybe still the easiest solution
I hope, I never get a response in there
haha i get ya.
@fast galleon are you floating around? Can you help me out with this? It's working on a "hosted" server but not on a live server.
Hello everyone! I need some help, and I think this is the best place to ask, long story short, I'm trying to create a mod that adds some more jewelry (cosmetic only), but I can't fully understand how to do it, I've already been following the steam and theindiestone guides but clearly it is something that is beyond me, I can change textures without problem, but I can't figure out how to add a new object, so I wanted to ask if anyone knows or has a template for a jewelry mod in which I can replace models 3d or textures, to make my life easier. I would appreciate it
If you scroll up I posted a generated UML of the item category for ZedScript.
I believe in you, I'm excited to see the finale product!
Stop loot spawn in player-made containers
can you override base tiles info?
Redid my items UML from earlier.
I'll probably combine these UML into one.
Then it'll be a mega-atlas for ZedScript objects.
:D
Something's puzzling me, The game says certain animations are not in player/actions, but the file exists? for example, i can get SawLog to work, but LootLow fails to work.... am i missing something?
The xml file
the XML file is called LootLow and the name inside is also stated as such, but yet the game says it's not there even though it is... could it be because i'm assigning props?
Trying to find an animation that works with what i'm trying to have the character do (whittling) InsertBullets gets close, but he's cutting his hand with the knife ROFL
figured this out
i'll just fiddle with it, maybe i'll just copy an animation and tweak it to fit my mod
Bandage defaults to the fallback animation (surrender), so i guess it might be the "props"
found a workaround xD
just wish i had a way to reload lua while ingame, haha going back to the menu and reloading the save is getting tedious XD
are you checking in the right file for prints? Not sure what else could be different.
They get put into debug log, right?
I don't know what else it could be either, they're 1:1 with mods and everything and the actual server just doesn't seem like it runs the hourly code.
I think I'll move this to the initSystem function where you have the instance as self, maybe you could try that.
you surely must have a system function where you setObjectModData?
It's a system function that is called when you make the system instance.
self.system:setObjectModDataKeys({'methane', 'biowaste', 'fertilizer', 'exterior'})
I'm not saying this will fix your issue, just make it cleaner. Because self is the system instance here.
oh, I see the whole thing
SGlobalObjectSystem.initSystem(self)
-- Specify GlobalObjectSystem fields that should be saved.
self.system:setModDataKeys({})
-- Specify GlobalObject fields that should be saved.
self.system:setObjectModDataKeys({'methane', 'biowaste', 'fertilizer', 'exterior'})
end```
what's crazy is this was working
I guess it has to be a mod conflict or something
it just blows me away that it would work locally, but not on the server
Does anyone have a way to import PZ animations into blender? i wanna tweak an excisting animation slightly to suit my needs and don't feel like coding the entire thing from scratch
Can someone help me? I can't understand how to make my furniture moveable. I tried everything - used tilezed, wrote script, but it just didn't work.
On this note, I wonder if it's even worth making the new function
function()self:doStuff() end vs doing local self = system.instance
nvm i found an online converter that allowed me to convert the .x to .fbx π
you mean it works when you place on custom map, but can't pick it up?
I don't understand it well enough to really give an opinion haha. I was barely able to write it
I can rotate it, I can place it when I spawn them as an item, but I can't pick it up
do you toggle it "IsMoveAble"?
Yes
that's all I got haha
if you can place the item, there must some requirements to pick it up? tools, skill?
Question about the poison system: There is a java command called "player:isKnownPoison(item)". Does anyone knows whether there is also a command like "player:setKnownPoison(item)"?
what's your goal? doesn't look like there is one
isknownpoison is what queries things like poisondetectionlevel
so not directly, but yes if you set one of the actual ways of detecting poison
seems like the extra function is 20% slower
so it is basically just a command taking the PoisonDetectionLevel of the item and then compares it with the player's cooking skill or smth to check whether it should be given the poisonous icon in interface?
yeah, as well as the herbalism type and some other stuff
Is that bone costume related, or you just happened to post both this morning?
Pyrokinesis is of course a fantastic gameplay idea
The letter spacing within the word "Pyrokinesis" and between that word and the word "Trait" looks a bit strange, presumably because of the thin "I"s (but also in certain letter pairs: O+K and R+A). I don't think it's terribly noticeable, though
Overall, well done π€
Does reverting an update remove the new files?
or do I have to do an update stubbing the broken files?
is it possible to display textdraws above vehicles? Kind of like the textdraws that appear when watching TV?
If you are not satisfied with the result, you can try to have it done by ai. I leave an example
Good morning.
Was fun staying up last night working on perfecting my current UML diagrams for ZedScript.
I plan to do the rest of the categories for ZedScript and then make a mega-map of all images.
I have no one to check my library for accuracy.
Nah im happy doing stuff manually
Anywho, delivering the work as promised.
For modders here: Would you be interested in VSCode support for ZedScript? (Syntax highlighting, error-checking)
Since my work for ZedScript is in Typescript, I can make a VSCode plugin with it.
Could be supercool!!
question, what is the difference of making a recipe on .txt file if can do it in lua
less garbage
*not an expert
perfect timing. Poltergeist was told you might know this answer... what controls what lua script is loaded, and when. is there any control? or they just all loaded up for a mod without any order/control?
this, you can also require inside your script to make a file in same server/client/shared folder is loaded for sure.
@frank lintel
or if anyone else knows this answer because I cant find it documented or explained in any way.
and because somebody asked before... If your file is not in the same location as the other file (related to these 3 folders) then it won't affect the load order.
so require from shared would fail to require from server if used directly and not on an event, or some kind of function call
where do # folders fall in that order
sorry numbered scripts dang # key messing me up with channels
01.lua 02.lua alpha.lua zeta.lua would be and example
and yeah it was folders this mod has like client/01_bla 02_bla and so on...
I really have no idea why he does that btw, that seems like bad design if it's for load order specifically.
this is exactly why Im asking cuz java its clear cut... lua and modding for PZ Im like umm where do I even start....
my life for a main and dependancies ^_^
thanks Poltergeist for the help.
Hi everyone. When I add items to the game there is no picture available in the debug item list (that we can use to sapwn them). Do you know what I should do to get them their picture? Or do you know a mod that does it successfully ?
So I'm making a mod to add a new drink, I've created a distribution file for it and it seems that I've replaced all loot in the game and it can only spawn my item (so 90% of storage is just empty)
So can anyone explain how I should structure them? And do they add onto the vanilla one? Should every structure be renamed or do I need to use a namespace that specifies my mod or something?
#mod_development message
maybe this helps you
This is a visual guide for mappers and modders who need to add or modify PZ's loot entries using the new ProceduralDistributions.lua approach. Whilst the ProceduralDistributions.lua file has been in the game for quite a while (i.e. the Gigamart shelves having distinct loot types), TIS will be eve...
Amazing thank you! It's hard to find this documentation
Is there anyway to use "Tile" as one of Keep item method?
i mean "CERTAIN TILE" should be next to character that do recipe work.
what i want to try is this.
player should be near by "Activated ATM machinie to make Cash(100) in to 100$ bill cash.
so is there any parameter i can use for recipe.txt to use tile as one method?
@spring zephyr check out my atm mod
can i ask you in private chat?
Hi Poltergeist. Thank you for your answer.
Has anyone been able to use the args parameter of sendServerCommand ? (khalua table)
It works like a charm for sendClientCommand (from client to server) but I am not able to use it the other way around.
On the server side I receive and use the content of some sendServerCommand
then I call that:
sendServerCommand(getPlayerByOnlineID(args.target), "BetterPrisonner", "Restrain", {source=player:getOnlineID(), restrainingItem=args.restrainingItem});
and on the client side I receive something with nil as 4th parameter of my OnServerCommand callback
TCHERNO!
Sir ! Yes, Sir !
i was looking for you.
onservercommand only has 3 parameters
module, command, args
thx
you are confusing it with onclientcommand which has 4 (player, module, command, args)
indeed, thx π
i have a bunch of stuff for prisoneering.
and was wondering if i could co-opt your mod to make them work.
let's private message that then
Good day! Recently I began to take interest in creating mods that lets the player feed another player, carry them on your back, massage them to reduce exercise fatigue/stress. But unfortunately, I have never found a similar mod. There are mods that add items, traits, models, and maps, but there are no mods that alter your interactivity with another player. Is it even possible to create such mod?
For example, medical check and trading is a functionality that lets you interact with another player. But there are no mod like that.
Does anyone has an idea how to exclude a vanilla item from a vanilla evolved recipe? I just thought you could overwrite the vanilla item's script.txt entry and simply remove the line
EvolvedRecipe = [something].
Did this for the peanut butter and the new script.txt looks as follows:
However, the recipe options are still shown. For example, the "new" peanut butter can still be used to craft peanut butter sandwiches
(although it requires "Peanut Butter(0)" as ingredient)
already tried to add the line
Override = True
but didn't work so far
if i remember, they're added to the recipes as soon as the line is read, not stored on the script or anything, so unless you directly override the file it'll still be applied?
what do you mean by "directly override"?
and thanks for trying to help! π
(as always... π )
like you'd have to override the vanilla items.txt to stop it from getting applied
you might be able to remove them from the EvolvedRecipe object after the fact
that's what I thought I was doing since my new peanut butter has the same script id as the old one, i.e. Base.PeanutButter. Game also shows the info "overrides vanilla item" in the tooltip
i think override just deletes the previous item when it gets loaded, the original still gets loaded in some capacity i assume (otherwise it'd have to scan all files for overrides before actually loading scripts, which seems silly)
and the problem is that this evolvedrecipe stuff isn't actually stored on the item object, so it doesn't get undone
ah ok... think I got it...
puuuhhhh.... in fact my modding project started as a tiny little project and now I run into dozens of complicated issues like this all the time!! π
Howdy yall
At work but superb survivors/SSR has health check function for the npcs might give ya some insight
Any suggestions of how to do this? Is there a specific java command which does that? For example, in my case with peanut butter and sandwich
evorecipe:remove(Base.PeanutButter)
or smth similar?
EDIT: problem solved.
Quick question.
What is the limit for players on dedicated server?
Not sure if this is the right channel to ask, but I'm considering to try to make the mod for multiplayer and just wondering what is the limit.
Before I try, is it even possible to edit the health of furniture/prop items of things like Fridges and the like?
I feel like if it was, it would already be a mod on the workshop. but since I cant find any Im wondering if its even possible.
Just out of curiosity... Am I able to use Blender 2.79 to import / export models for PZ? I've found this source from Github and added the Python scripts to my Blender program but I still cannot open the models. https://github.com/rundaaa/ZomboidImportExport
Ahhh. You're right. Sorry about that.
all good just likely get a faster answer there
yes there's a few mods that edit health / damage taken of furniture
Really? I can't find any! Care to share, it would help alot. :)
I only found stuff for player built stuff.
sure, a fridge that you haven't moved would not have any health.
There was a mod that showed health of objects when you hit them for example, not sure what it's called.
ISA changes the damage taken, but as you say of a placed object.
ISA?
solar power
any possibility to append ArrayLists via lua code?
I'm confused, Maybe I said it wrong, I was looking for a mod that make the already in-game furniture more robust, not adding new ones. ^^
So, I'm trying to track some specific recipe usage into the DebugLog of the server. Is there any reason why a print wouldn't go to that log?
function Recipe.OnCreate.Logger(items, result, player)
print("APA-ATM-Transaction -- Player: " .. player:getUsername() .. " -- Recieved: " .. result:getType())
end```
it prints to the coop-console.txt on a hosted server, but isn't working on an actual server
Also, @fast galleon still no dice with biogas, the OnEveryHours event just isn't running on the live server, in my local testing when I click on host and start the server there it works. I even tried removing any of the other conditions and doing this.
Events.EveryHours.Add(function()SBioGasSystem.instance:processBiowaste() end)
good evening everyone
i bring another question...
this doesn't output the item lists
it outputs the print() outside the For loop
but nothing inside the loop is showing
did I do something wrong? or is this recorded in somewhere else?
I tested this in Single play
debug doesn't show any errors
My guess is that calling getInventory() of a player doesn't have any return value?
local items = player:getInventory():getItems();
local items_size = items:size()
for i=0,items_size-1, 1 do
local item = items:get(i)
end
gotcha
another question
how did you type in your code in that separate block?
when i copy pasted my snips it just looked terrible
is that a different key on their keyboard not a tilde?
always wondered what key gets replaced or added for the KEY_YEN
is a timestamp inserted automatic to anything put into a DebugLog.log() msg or do we have to add that on?
does update for 3d engine means that all mods have to update their models?
maybe, maybe not
I think they will likely continue using FBX and X models. Modders may need to adjust the parameters or add new ones though, but the models themselves should be fine
Hello.. I am trying to find an example of a mod that can have a zombie spawn in with a certain chance of wearing certain equipment / certain items on its body that can be looted after it's looted.. if anyone knows where I can find a similar code snippet, that would be great. Thanks
umm probably the best chance of finding it will be Authentic Z
though it's a big Mod, there are many snippets that you can learn from
Okay thank you.. I will try to find that
Hello i would like to make profession based on me and my friend is there some yt video that i can watch to learn
any learning resource for mods to work in multiplayer?
check #1070852229654917180
there is this link which helped me a little: https://theindiestone.com/forums/index.php?/topic/15256-multiplayer-coding-questions/
Hey guys,I've been working on getting my mod to work on multiplayer and since there are very little resources on that topic I have a few questions. isClient() / isServer() What these methods do is clear, however when I call isClient() in a file that is located in shared it returns false althought...
how do I actually use PZWorldEd.exe? It's complaining about Tilesets.txt (I just want to see the spawn points in a mod)
https://steamcommunity.com/sharedfiles/filedetails/?id=2735092774 this guide from Dislaik may help.
What's the best way to go about doing a character modification? Do people usually make their own class like male / female (that use entirely new models) or do they just make new articles of clothing?
I think it'd be nice to just spawn in the world with a different character model so I don't have to look for the right clothing (though I could tryout the debug mode anyway).
I'm just starting modding (My pc is mostly fixed finally) I'm a little confused:
Where do you use Java Script and where do you use Lua Script?
Is knowing both required for all modding or is one for a certain type of modding?
i go from 0 to hero recent on it, maybe my journey can help you too, here
#1070852229654917180 message
You dont use javascript at
And its java
But we use khalua
I believe classes are hardcoded
Bro try #mapping
Search the threads
#1070852229654917180 message
well, this isn't mappting page but I think i know what your problem is because I have ran into the same problem before
you have to delete the .tilezed folder in your user folder
Nope all readables
Check out the mod called profession framework
And read stuff from the threads
#1070852229654917180 message
heh Glytch3r my first actual mod is called LoadOrderAcidtest 
lil hint where Im going with this....
Buffy knows alot about this stuff u might want to use her mod as reference
Omg
Ow every one of em go make em print 1 letter
And it should in theory
Show you a vertical readable sentence
If you compose it right
Im just gonna do a simple debug log and have it spit out what lua file loaded... then work thru'm all nothing hard just tedious to make

now if I could get the Lua script file name easy that would make it easier
the pinned stuff in #mapping should be put into a thread of something. Maybe in that channel or added somewhere in this one
same thing with #modeling I guess
Yeah we can just inherit it if no one from their side wants to organize it
Since after all we are trying to compile everything
And threads btw gets removed after a week if inactive
So bump it or lose it
i did not know that 
There is a mapper community disscord server
Thats probably where everything is
About mapping
And the resources
Idk about modelling
forums?
Which is why from time to time
I just say something then delete it
Forums traffic is slower than discord
the unofficial mapping discord has some stuff on modelling like this one, so i guess its all over the place
yes but guides would stay historically I mean
Mapping has the most guides after all
They have alot of documentation and alot of veteran mappers willing to teach
if command == "printcode" then
print ("START")
local playerInventory = player:getInventory():getItems()
local items_size = playerInventory:size()
local money_items = {}
-- Loop through each item in the player's inventory
for i=0,items_size-1, 1 do
print("executed")
-- local item = playerInventory:get(i)
local item = playerInventory:get(i)
local item_type = item:getType()
print("CHECK_POINT")
if item_type == "money" then
-- Add the item to the money_items list
table.insert(money_items, item)
result = money_items:getDisplayName()
print(result)
print("HERE1")
end
end
print("Terminated")
end
end
Im trying to save money types item into a different list
so i can use merge function on them all together
but looks like table.insert(money_items,item) isn't proper way to do it??
since "HERE1" pritn isn't showing up nor the result
table.insert(money_items, item) is fine.
The issue is your condition:
if item_type == "money" then
This is only going to find money that is named "money" as an item. i.e. if the item is defined as "Module.money" or something like this. Make sure that it matches the item's actual name.
He ment
You shoult add the module not just the name
getType()
getModule()
getFullType()
getName()
getDisplayName()
Different things
They using Kahlua2 right?
yeah i realized and posted it there sry lol
np 
got cha thanks π
Well... I think this enough to know, so load order acidtested as 0-9,_,a-z for folders and .lua files
Hi all, I am trying to use the player:say function to let player character speak chines,
but chines text end up corrupted.
Here is the code:
function DoSomething(items, result, player)
player:Say("δ½ ε₯½")
end
Try do by translate files and getText("IGUI_MySayLine")
@nimble spoke sir i need to speak with you
This channel is about mod development, I give you examples and you use them in your mod. It's simple. *Pure copy paste is not allowed, it's for educational purposes.
If you can't make it yourself, commission somebody to make it for you.
does anyone know what hte blender export settisgs for clothes are
#modeling might know more
hemlo, new survivor here. 
what is the policy for requesting mods in this server?
Oh requesting commissions are allowed? Yeah I'd be up to pay for a mod like that./
anything goes, we have a few commissioned modders here
Yeah if anyone is able and willing to make a mod where you can modify the Furniture health in the sandbox settings, DM me your rates and we can talk there then :)
ye i was gonna request, not commission 
i do value the time and skill of modders, im just unable to express it in monetary payment.
that being said maybe someone else like the suggestions as well and chips in.
so essentially i was asking if its okay to barge in here and dump suggestions?
check out our teams discord server we accept commission .. the link can be found on my profile
ah ok incase you change your mind then
ill keep it in mind, thanks for replying 
I am trying to create a button at the right of the title of the main inventory, the one that displays for example "Lance Hernandez's Inventory". Printing (self.title) works but not self.title:getRight(), any idea why?
solved it using lua local x = getTextManager():MeasureStringX(UIFont.Small, self.title) + 60
@hearty gulch
I would ask Udderly first, she might already have something similar.
Finished a quick spawn point mod
https://steamcommunity.com/sharedfiles/filedetails/?id=2943943262
you can try let yours ideas flow here too #1075939080287834113
no offence, that place looks so empty i feel like nobody checks in on it 
function TESTCOMMAND(module, command, player, args)
print("recieved the code")
if command == "printcode" then
print ("START")
local playerInventory = player:getInventory():getItems()
local items_size = playerInventory:size()
local money_items = {}
local value_final = 0
-- Loop through each item in the player's inventory
for i=0,items_size-1, 1 do
print("executed")
-- local item = playerInventory:get(i)
local item = playerInventory:get(i)
local item_type = item:getType()
print(item_type)
if item_type == "Money" then
-- Add the item to the money_items list
table.insert(money_items, item)
result = money_items[#money_items]:getDisplayName()
-- Add the value of the item to the total_value variable
value = tonumber(string.match(result, "%d+%.%d+"))
value_final = value_final + value
print(value_final)
-- test(player)
else
print("This is not a money item")
end
end
--playerInventory:remove(money_items)????
print("Terminated")
end
end
Events.OnClientCommand.Add(TESTCOMMAND)
I want to remove item with type (Money) after executing
money value addition
but if i do clear() then everything in the inventory goes away...
its recent, and its is better to get filtrated there than lost by the crowd
When I test print() for item type, it shows Money without problem
worth a try at least, i suppose 
the people suggests (the official one) send on indie stone forums too, but it make non searchable from discord
there are more populated

@jaunty marten lol yea i know.. my codes are terrible T___T
I'm not about code, I'm about clear() then everything in the inventory goes away
he-he 
is there a way to make an equipped item only show half of the model or so? I'm lookijng to make a inner waist band holster which would have the pistol grip visible but the barrel not
ah ok xD
Not 100% sure but to use the Remove() method, have you tried to just define
local playerInv = player:getInventory()
so without the "getItems()" appended? And then use
playerInv:Remove(InventoryItem)
??
Moreover, if you want to remove all items "Base.Money" from the inventory, you just could try the single command
playerInv:RemoveAll("Money")
hmm ill try it
though i believe i have tried remove function
ill try again though
I think the point is to apply Remove(...) to player:getInventory() and not to player:getInventory():getItems() as you did. See here for more info:
https://projectzomboid.com/modding/zombie/characters/IsoGameCharacter.html#getInventory()
https://projectzomboid.com/modding/zombie/inventory/ItemContainer.html#Remove(zombie.inventory.InventoryItem)
https://projectzomboid.com/modding/zombie/inventory/ItemContainer.html#RemoveAll(java.lang.String)
declaration: package: zombie.characters, class: IsoGameCharacter
declaration: package: zombie.inventory, class: ItemContainer
Also note that "remove(money_items)" will probably not work since your "money_items" is a lua table and I think the Remove() commands are not defined for this type of data.
I think DoRemove(InventoryItem) works for removing that specific item
Item Searcher is updated! https://steamcommunity.com/sharedfiles/filedetails/?id=2789003239
- Added Silent Search option to toggle off character speech
Seems to be the same as Remove(InventoryItem). Not sure why they have this method twice...
The safest way to remove an item is using several things -- check the delete function for debug
You need to confirm worldItems, equipping status etc
At work atm, so no way to look it up
I used a pieced together version before I knew about the debug stuff -- probably causes issues if you're holding the items
Looking for input on this feature request: https://github.com/TheCrimsonKing92/pz-item-searcher/issues/10
What do y'all think of the choices between different modes for the feature?
- Restricted - Player can search only within their safehouse, nowhere else
- Hybrid - Player can search within their safehouse or non-safehouse buildings
- Unrestricted - Player can search anywhere, even within someone else's safehouse
Last one might have to be predicated on the SafehouseAllowLoot server option
OoO 0-9,_,a-z π€« @ancient grail dunno if you seen before I passed out
and apparently _blabla.lua is a valid name too
When playing-testing my modded game in debug mode, using the item search function and dealing with hundreds of items, I detected some short fps drops (from normal 60 fps to 30-something fps). Is this normal game behavior or do you think this could be related to my mod badly optimized? EDIT: guess it is vanilla since I got similar issues in non-modded game
you can find out what by turning on a debug option
I'll have to boot my game up to look up the exact name but it might help id what/why eg. WARN : Lua , 1678261938763> Event.trigger> SLOW Lua event callback metazoneHandler.lua function doMapZones:55 755ms WARN : Lua , 1678261940920> Event.trigger> SLOW Lua event callback forageSystem.lua function init:217 1922ms
@frank lintel
!test.lua
other characters
~test.lua
I was trying to remember the character set used here, but I can't. Check ANSI character codes
I'll add in them I didnt think ! or - was valid but if they are I'll check'm
@small topaz F11 debug menu, options, checks, checks.SlowLuaEvents
This worked
Thanks alot
π
Cool! But to make your mod really bug-free, it might be a good idea to check how your remove-money-function behaves if you have the money equipped in your character's hand, as @sour island suggested here: #mod_development message
not sure if this makes a difference in your case but might be better to give it a try
@fast galleon okay tested ! (exclamation), - (minus), 0 thru 9, _ (underscore), a thru z, ~ (tilde)
albeit not sure on the validity of them.
which file contain delete function if i may ask?? or is there any breakpoint where I can place?
ill look into it thanks
they work, a number of mods use ! and ~ for compatibility issues
oh yeah they def work just not sure if they should. also what is that stamp they put in log unixtime? ticks?
only asking cuz the 'stamp' was like dead sequential in order.
Good morning.
and good to know on that front with compat I'll keep that in mind since ! and ~ are first and last for each of the 3 lua/. folders
changing square positions in chunk breaks my game extra hard now, need to exit the game completely and things are still not normal. This new test doesn't behave well.
You mean like you dont see anything but just black
and I hope they not ansi codes cuz I can def think of one that would mess with ppl in a bad way
I assume they meant ASCII? the order you described there is ASCII order
Which also implies uppercase letters are sorted before lowercase
far as I read has to be lower
For filenames, or something else?
yeah and the folders
They can certainly be uppercase, many vanilla lua files start with "IS"
Unsure whether they're converted to lowercase somewhere, though
dunno. but if they valid easy to test it the way I got it set up atm.
now I feel like testing alt+255 the fake space
only reason Im doing this is because never seen (or could find) anything spelling it out exactly lua script loading order
Anyone familiar with UI
Online right now?
I need to where i can find anything related to bar
Like hp bar fuel bar what do you call that again
health UI stuff is in.... client/XpSystem/ISUI/ character skills window, health and info panels.
Trying to create a custom sort function. This is what I got so far.
-- Called when the player presses on a button
function ISInventoryPage:onSearchContainer()
self.inventoryPane:searchContainer()
end
--Referenced from the previous function
function ISInventoryPane:searchContainer()
local playerObj = getSpecificPlayer(self.player)
local playerInv = getPlayerInventory(self.player).inventory
local items = {}
local it = self.inventory:getItems();
for i = 0, it:size()-1 do
local item = it:get(i);
table.insert(items, item)
end
end```
This code, so far, stores the items of the container that the player is working with in a table
how do I use that table to sort the items according to a custom criteria? I have been looking at how vanilla code does it but no luck with comprehending it
(I can actually sort the items stored in the table, but how can I show them in the container after being sorted according to the new criteria?)
alright so update on what I am trying to do so far. I pulled the items inside a container and stored them in a table, sorted them according to my criteria inside the table.
self.itemSortFunc = ISInventoryPane.itemSortByNameInc```
This is the way to sort inventory items.
```lua
ISInventoryPane.itemSortByNameInc = function(a,b)
if a.equipped and not b.equipped then return false end
if b.equipped and not a.equipped then return true end
if a.inHotbar and not b.inHotbar then return true end
if b.inHotbar and not a.inHotbar then return false end
return not string.sort(a.name, b.name);
end```
This is the code of the function.
I have no idea how to utilize this to sort the containers items according to the sorted items in the table. Would appreciate the help!
Player movement logic is stored in IsoPlayer.java correct?
Trying to figured out some logic for a mod. Basically needing to make a prone animation
heey im grouping up with some people, to do a mod big enough to not be able to do it alone
if interested for more details about it check here
#modeling message
After setting moddata on a placeable object, is there a transmit function that needs to be run to get it to save?
Chuck mentioned it stores it on the square
like after setting moddata do you just run obj:transmitModData();
no i think he said it used to
Oh ok

Having a problem with my mod, despite it being 2 files, one adding items, the other adding recipes. Both are just .txt files.
Itβs getting reported that players are being unable to disinfect bandages and unable to dismantle electronics.
Anyone know a fix?
Show the code
M3ss is taking a break
I can't remember the name or type it that starts with 'B' but Russian.
Vishnya?
Yeah. I can't type it.
hi, I have an idea for a mod but I am unsure of its viability to actually be possible to make. can I get some guidance?
Pinged him a couple days ago on it. Vishnya may be away too.
Wanted his opinion on these.
is to talk about twitch integration?
Nope. He went over my parser code for ZedScript the last I spoke with him.
I want to let him know that the parser code is basically done.
nice!
wow that sounds juicy!
@zinc pilot
Is also looking for that
Json thing
~50 hours of work to get here.
that's a documentation thing
where does the term ZedScript come from?
you're amazing, I would love to have your patience in writing docs
or parsing I guess
still, that's amazing
It is a parser. I now need to write a JSON -> ZedScript exporter. (Much easier)
It's a foundational library for my planned ZedScript editor program.
Ow its different?
I really couldn't distinguish stuff
Jabs is doing all alien work
I mean i never understood anything he says
It has a purpose beyond documentation.
I just live inside my bubble and his like explored the whole ocean and such
Wizardry
I bet thats some kind of magical rabbit
I still have my other projects. I chose to work on ZedScript documentation and library support because of the observation that the majority of problems modders face are related to ZedScript.
I believe jab coined the term?
Having a visual editor with advanced tools to make ZedScript will solve approx. 60% of the issues I see discussed in this chat.
Aiteron & I are using 'ZedScript' as an unofficial name.
I want to make a tornado mod with these things in mind:
-Severe Thunderstorms can appear during spring and summer months, sometimes capable of producing a tornado
-Tornado sirens will sound, with EAS tones preceding them if you have AEBS or TV on. A warning message is displayed with detailed information about the tornado's location, path, speed and potential strength.
-Tornadic winds will appear and cause widespread destruction to structures and trees in its path.
-Wind speeds and destruction will be based on the strength of the tornado.
is this something that might be viable to make in PZ?
Ye i was there on the vc remember
Like u mentioned most modders having problems with the txt files
This is insanely difficult but you can do it
Its just that the only ways to do this are workarounds
There is no route to just being able to spawn an effect
Cuz thats java side like fire and smoke
My focus as a modder in this community is making tools for modders.
So since this is the most common issue, I'm focusing on it.
If possible, I'd love to get the official script name.
(Preferably before publishing my npmjs library)
hemlo, it me again 
anyone knows where i can find the file location for the PZ logo displayed in the ingame escape-menu?
Texture Packs.
Hey! In multiplayer games, is there some kind of unique identification for a specific player like a unique number or string? If so, how to access it via lua code on client side?
IsoPlayer:getOnlineID()
keep in mind it's not persistent
you can use getPlayerByOnlineID(id) if you need the inverse
uuid for mp for future reference search's people, tagging to help on future searches
what do you mean by non-persistent? may change when a player leaves and re-enters game?
i think it stays the same if they leave and rejoin, but if the server restarts the ids will be assigned from 0 again
ah ok.
so, in case of server restart, what happens with all the ModData? will they stay the same or change too? (I guess not since it would be strange but I just ask for being sure)
it stays, unless they delete the players file
kk. thanks!
thanks for the reply. i suppose you dont know any more precise than that?

It should be an artifact inside of one of the texture packs.
in here? i think i checked them all by this point 
I think that it's in UI2.pack
For some reason I cannot unpackage it.
ye its empty for me too
Tiles Tileset images These are the same tilesets released on February 16. For Windows TileZed + WorldEd 32-bit TileZed + WorldEd 64-bit The 32-bit version of WorldEd seems unable to load all the tilesets due to high memory usage, displaying ??? for some tiles. Linux TileZed + WorldEd 64-bit This ...
They use the same format for the UI stuff right?
can't say, but that github is last updates in 2015
The anomaly zone - Building shuffle
Roadside Picnic?
Will when I get home!
Roadside Picnic (Russian: ΠΠΈΠΊΠ½ΠΈΠΊ Π½Π° ΠΎΠ±ΠΎΡΠΈΠ½Π΅, Piknik na obochine, IPA: [pΚ²ΙͺkΛnΚ²ik nΙ ΙΛbotΙΙͺnΚ²e]) is a philosophical science fiction novel by Soviet-Russian authors Arkady and Boris Strugatsky, written in 1971 and published in 1972. It is the brothers' most popular and most widely translated novel outside the former Soviet Union. As of 2003, Bori...
Houses with anomalies
is it good?
I read it last year. It's the book that inspired S.T.A.LK.E.R.
Reminds me of kids messing with roms in school
im trying to use in game animation but keep be able to walking while doing
im using
self:setActionAnim("RefuelGasCan")
self:setActionAnim("BlowTorchFloor")
or an custom one on anims folder self:setActionAnim("BlowTorchFloor_firetrail")
im am on timedaction with
o.stopOnWalk = false; --be able to walk pouring
can someone help me got this working? use RefuelGasCan anim and be able to keep walking, and BlowTorchFloor and be able to walk away without wait it anim finish
did you know about dealing with animation or met some people that have experience on it?
on the fire trail, im trying to customize in game animation to not lock movement, have any idea or met any people that knows that, do you?
i will patch an update including propane torch and better animations
i love and find this two anims
BlowTorchFloor to start fire
and refuelgastank to pour
looks so much better to pour and ignite but i feel bad that was locking movement even it is on timeaction with stoponwalk false
i try to use copy xml from it and edit, and the players starts to do the action not locked but both hands up
and im struggling to set it be able to stop when try to walk, or do the animation while walking
Reminds me of an event area we built
No one was able to beat the maze
The RefuelGasCan animation has the following defined in its XML file:
<m_SubStateBoneWeights>
<boneName>Dummy01</boneName>
</m_SubStateBoneWeights>
<m_SubStateBoneWeights>
<boneName>Translation_Data</boneName>
</m_SubStateBoneWeights>
The Dummy01 means that the animation plays on all bones, and Translation_Data means that the animation will impact the player's movement while the animation is playing. So if the animation doesn't move, the player will not either during this animation. You should be able to create your own action file and use the same animation, just remove that bit about the Translation_Data
woow! @dark wedge the dev from the masterpice handwork stuff right? you are a legend on anims! thanks for helping, i admire you, and awesome anims you did there, and in yours mods
thank you for help me with the anims update! :))
you're too kind. π hope that helps!
i try a shot on the dark yesterday, and delete all the snipped that you mention, and the person does the action, but with both hands up
It means its calling the default which is the loop
Its the surrender
Thats the fallback
Correct. Your conditions didn't match, or it couldn't find what animation to play so it defaulted.
Check your syntax or your files..or where your file is
Is it vanilla xml?
yes, i will try remove Translation_Data from the gasoline, to get expected result to keep the bones positions while pouring, from refuel gas can
and to start fire, i dont know what to do about, and im not sure about the expected result yet, i just dont want it to lock the player position and disable his movement, but it will be nice if he keeps layed down, but if player tries to walk cancel, do not trigger fire, return default animation and walk away
i think that is aprox what im looking for to start fire
because i want it to be friendly to ignite it while being chased
like the current state
welp. I've been dabbling with blender stuffs, and it appears that all my items in the model are stuck in the same spot in-game?
is that a scripting or modelling skill issue? Originally shoved this in the wrong channel...
mk
But you will get better help from there im sure
Also sorry i cant help with the question as i dont use blender
all gud
Have you read peach or dislaiks guides
nope
Maybe i can link them to you and might help you.
perhaps
thnx
many people are asking and suggesting about fire spread sequentially, can you tell me if this can be made via animation (and if its possible and if you are into it we can made a colab on it for sure)
im concerned about bad performace impact on it (that will have if done via code), and be able to use animation on it will be an better performatic approach to it
Does anyone have the list of tiledefinition numbers in use already?
I'm not sure what you mean by using animations to spread fire. Not sure how that would work as animations are done to a game character object.
like, the fire will keep spreading on code but invisible, and the animation goes later filling up the ghost fires
it only matters if the file name is same as another so it doesn't matter much if you have a unique name.
tiledef=uniquedef 666
*tis please update this
The systems are different, you could have events on the animation to light multiple fires at different times during the animation, sure. But for real fire spread that's outside of an animation
I wouldn't tie that to an animation
like, if you was over an gas puddle you have gas on your boots, and fire will catch you when ignited
@dark wedge i was willing about just a visual clue, the fire and the code spreads keeps as original, all instantaneous,
but plays an visual cue animating and virtual fire spread on it, over the tiles
that fire spreads sequentially add a lot of extra processing, and it will be a shot on our own foot, to add visual but have trash performance, it is a strange feeling to see people asking this, but doesnt knows the consequences to it,
to put in a visual perspective, is like to have a ferrari, you can be able to run 400 km/h in 10 seconds (without break, or turning off), but adding fire spread in code, and not just visual, it is run the ferrari 20 km/h in 10 seconds, stops run it again, and keep doing it until the end(result as of turning breaks and turn off to walk a little more next iteration) and wanting to achive the same distance it was when running 400 non stop, so that is a huge bottleneck
im my mind this is the better way to fillup users wants and asking, just putting a visual clue, and keep the code as performatic as possible
ahh the way dirk said in the tut made it sound like the number itself was the main thing.
so theoretically each unique tiledef name has room for 8000
Ok, I think I see what you are going for now. I took a peek at your mods preview, and see that all fire just starts at once. you want to animate the fire spreading, correct?
you should test it, I looked again and he might be right. But I have never seen this issue, I thought I tried it before.
correct! :)) i like the metaphor that i did with the ferrari, it is very accurate of what will happens on code, if its spreads is hardcoded and not an animation visual clue
I found the list its on the wiki thanks to Gargisnar
stupid kahlua. how the hell do i get the USERS current time?!
i know the to the server, but i think it can works on users too, did you try this?
local temp = os.date("*t");
return temp.year .. temp.month .. temp.day .. temp.hour .. temp.min .. temp.sec;
I'm not sure exactly how your mod works now, but I would think the best way would be to determine which squares you should make your trail through first like you are now, and then iterate through that list in steps over time. You don't need to determine if fire will spread to the next square each iteration, just figure it out once, cache it, then step through that cache
there is nothing about it in os variable?
luckily my number is there
Otherwise, I'm not sure if you can hide fire. Once a square is lit then it's there. So you have to apply the fire in steps.
I could be wrong, also just started work so can't take a solid look right now, but can for sure later
Here's my files, am home from my university.
local adjDelivery = os.time(os.date('*t')) + (adjDist/60);
local readjDelivery = os.date("%B %d %Y, %I:%M %p", adjDelivery);
that's still 5 hours ahead.
yeah, i got it, so, the way will to add it, with bad trade off on performance in my opnion, and i will add an option to use that sequentially thing, or the instant one,
and add it disabled by default, the user enable if he wants, if visuals are too important to him more than fps and gameplay advantage, he uses it if he want
users with the default will have a better fps and the fire will get to the and faster, and i think this is something like movie stuff, because irl fire with gas on ground spreads faster, than movies
you can add you own gmt stuff, use the utc time, and ask user to setup their gmt +3 +2 +1 stuff
what?
change the recipes.txt file name
i want it to use the USERS timezone
That'll fix my problem, or...?
if users gives their time zone, you can use utc to result their time, if the game doesnt give you an option to direct use it, it will be an option to make a in-game window to setting up your current time zone, and use utc os to be current time irl
gmt means to me the same as eft to you
ops, my bad, i dont know what eft is
Hi, anyone know how to indentify when a food Is cooked?, Like for example if i Cook a potato it only change the name but it's the same Γtem and if i need to make a recipe with cooked potato i dont know how set cooked to the recipe
How do you submit your tile def? Ishould probably submit mine too
You can afaik. Only servers time zone
Not sure if sp
Mostlikely the pc of the player
Have you tried item:isCooked()
My pc is turned off but ill check using mobile
if you are trying to do it on mp server
and when you test on client, sp, without mp, and are getting the right time
you can use mp compatibility, to sendcommands and the server stores players current time in table, by their onlineid
Nop i dont see that line before thxi try it later in my house
here, to make the table
I am using a client side script. i only want the clientside script to show the correct delivery time to the user. INSTEAD it's using UTC time.
@kindred dawn the filename
Its recipe.txt
That must be it
Ow wait polt already answered this
there is no option in a server to set the timezone that i can see.
It depends on the hosting
I AM HOSTING IT.
You might just want to manually convert the returned value by doing a little math