#mod_development
1 messages ยท Page 137 of 1
doesnt exist you'd have to use an emulator
ds4windows. i meant. i think it is a controller emulator
but i used a stick before....
yeah I dont use emulators...
thats like me trying to remember all this stuff Im trying to do now when I did it for MC.
seriously like If I could remember all the stuff we were doing back then now I would be prob already done in making a git hosted zdoc-lua
i do feel you. i took a small break from pz modding to get back into gta/fivem mapping and boy it took a min to get back into it
even just starting with tools needed
thats why Im looking at maybe trying to make this where I plant my feet and helping the community
but I'd also have to ask the head cheeses if its okay to post that publically dont wanna run into another craftbukkit fiasco
when using profession framework to start a player with a certain outfit. how do I make that outfit persist on respawn? It seems like it only works with that 1st character of the world.
Sounds like theyre doing something with createPlayer
I used another mod as a reference and this is where the outfit is OnNewGame = function(player, square, profession) local player = getPlayer() local Hat = player:getInventory():AddItem("Base.Hat_Fedora") local Jacket = player:getInventory():AddItem("Base.JacketLong_Random") local Shorts = player:getInventory():AddItem("Shorts_CamoGreenLong") local Hands = player:getInventory():AddItem("Base.Gloves_FingerlessGloves") player:setClothingItem_Head(Hat) player:setClothingItem_Torso(Jacket) player:setClothingItem_Legs(Shorts) player:setClothingItem_Feet(Hands) end,
What event is it adding to?
idk. I think it just makes it so those clothing items spawn on the character when it spawns in. The clothing didn't appear in the character creator.
this is the full code
ProfessionFramework.addTrait('Blade', {
name = "UI_trait_Blade",
description = "Whilst others were out partying you were studying the blade. Now it is finally time to show off the results of your training.",
profession = true,
xp = {
[Perks.LongBlade] = 2,
},
inventory = {
["Base.Katana"] = 1,
},
})
ProfessionFramework.addProfession('Weeb', {
name = "Weeb",
description = "anime obsessed degenerate.",
icon = "proff_Weeb",
cost = 4,
xp = {
[Perks.Fitness] = -2,
[Perks.Strength] = -2,
},
traits = {"Blade"},
inventory = {
["Base.Dakimakura1"] = 1,
},
OnNewGame = function(player, square, profession)
local player = getPlayer()
local Hat = player:getInventory():AddItem("Base.Hat_Fedora")
local Jacket = player:getInventory():AddItem("Base.JacketLong_Random")
local Shorts = player:getInventory():AddItem("Shorts_CamoGreenLong")
local Hands = player:getInventory():AddItem("Base.Gloves_FingerlessGloves")
player:setClothingItem_Head(Hat)
player:setClothingItem_Torso(Jacket)
player:setClothingItem_Legs(Shorts)
player:setClothingItem_Feet(Hands)
end,
})
did you make the clothing definitions in a separate file?
i think i showed u how clothing was defined before
it needs its own outfit definitions file
does it? these are vanilla outfits. Everything is working on the initial spawn. it's just on new character that it fails
look in the README file on profession framework and it says exactly where outfits are defined
yeah, it's how lumberjack etc get custom starting clothes
This part?
yea
I'm not seeing anything about needing a seperate outfit definition file. I do see that with prof framework you can use this. clothing = { Tshirt = {"Base.Tshirt_Profession_RangerBrown", "Base.Tshirt_Profession_RangerGreen"}, Pants = {"Base.Trousers_Ranger"}, but would this work with clothing not available in the character creator like leather jackets?
in profession framework it puts them conveniently in one place but it is possible without
and you can do it with any clothing
not just vanilla, and not just default
i let players pick eyepatches, jackets, etc
well i'm using framework. I couldn't figure out vanilla and this is just easier. I got it all working already minus the outfit on respawn
ah, with framework it is possible then
u need to find the clothing scripts to see the locations and names and stuff
i gtg but hope that helps
thanks ๐
there's a jacket definition for example
and leather jacket is probably Base.Jacket_LeatherJacket or something like that
Well not a server
I mean like
host
Like ima use the games host thingy
I just wanna put all the mods I want
into one thing
so I don't accidentally mess it up
me and a few friends of mine are doing a NG rp
Ok 1st dont.
We modders worked hard for our mods only to be packed maybe unless youre solo wnd u make it unlisted
But the thing is you should ask permission from every author of each mod
and I wanna put all the mods for it into one mod
It's unlisted
just for me and a couple friends
I am not gonna post it as my own
because i've tried that
If its local anyways
Imea. Local hosted
yea
And packing it into one mod would work? It wont
You just have to make em download it like update it and all that
p a i n
Also #mod_support would help getting that to work
But modpacks are generally frawned upon
You could do a collection
whats that
That way everyone would just download from that list ๐
how do i do a collection?
Im not sure how to do it but ill try and see how
So if a profession has a special trait applied to it can the profession itself not have a description?
it seems like no matter what I do it doesn't work and sometimes even breaks the trait name for some reason
also if anybody knows how I can make a character start with a weapon with a set condition using Profession framework please let me know. I was told to make an event but idk what that means or how
There is a list of events on the pz mod wiki which are triggered ingame and one of those is when you start a new game
OnNewGame comes to mind to me
or OnCreatePlayer
ah yes. that is what I was using for my outfit. issue with that is it only works once. I need this to happen every new character.
OnCreatePlayer maybe
ok. but what would it look like for a weapn that is nearly broken?
I know how to get it in the inventory but not set the condition
weapon:setCondition(int)
I'm going to go out on a limb and just assume this is being done very wrong. ```ProfessionFramework.addTrait('Blade', {
name = "UI_trait_Blade",
description = "UI_trait_BladeDesc",
profession = true,
xp = {
[Perks.LongBlade] = 2,
},
inventory = {
["Base.Katana"] = 1,
},
OnCreatePlayer = function(playerIndex, player)
local player = player:getInventory():AddItem("Base.Katana)
weapon:setCondition(3)
})```

OnCreatePlayer is something else and does not go into ProfessionFramework
its an Event
Events.OnCreatePlayer.Add(your func here) is usually the syntax events are used
it does go into profession framework actually

it can?
i never used it tbh
do you want to give a char a gun and set it to a specific condition with a specific trait?
a katana but yes
you choose that trait and you get a katana at start but it is nearly broken because mall katana
oh my bad actually, oncreateplayer isn't one of the supported events in profession framework
it wouldn't actually make that much sense for it to be now that i'm thinking about it
they tend to use onGameStart for this
or, OnNewGame would be better
That is what my reference mod was using
function spawnKatana(playerindex, player)
if player:hasTrait(your_trait) then
local inv = player:getInventory()
local katana = inv:addItem("Base.Katana") --or whatever its called
katana:setCondition(your number here)
end
end
Events.OnCreatePlayer.Add(spawnKatana)
I think thats how you could do it maybe
this would give you a katana every time you load in
the trait already gives you the katana so I just need the event to set the condition
name = "UI_trait_Blade",
description = "UI_trait_BladeDesc",
profession = true,
xp = {
[Perks.LongBlade] = 2,
},
inventory = {
["Base.Katana"] = 1,
},
})```
OnNewGame = function(player)
local weapon = player:getInventory():getFirstType("Base.Katana")
weapon:setCondition(3)
end
yea but using OnNewGame means it will only happen the one time. but not if you respawn
which sucks for MP
i've heard it fires every time a character is first created
not with the mod I used as a reference. it uses that to apply an outfit but it only worked with the first character
after that I had to leave the whole save and create a character there
hmm, then the oncreateplayer approach is better
just need to use some moddata to track if it's already happened
technically if you want to you could write a bool to the char's moddata to check if he needs a new katana or not
there is a OnPlayerDeath Event
function spawnKatana(playerindex, player)
if player:getModData().spawn then
player:getModData().spawn = nil
local katana = player:getInventory():getFirstType("Base.Katana")
katana:setCondition(3)
end
end
function respawnKatana(player)
if not player:getModData().spawn then player:getModData().spawn = true end
end
Events.OnPlayerDeath.Add(respawnKatana)
Events.OnCreatePlayer.Add(spawnKatana)
Try this maybe
If you know how to use modData all you have to do is store a variable in there
Doesn't have to even be a boolean as you can check if it's there or not
ok so this doesn't go into the profession lua correct? if so how do I hook it into the profession?
Burryaga showed me with the bitten trait mod for this
I skimmed the convo a bit -- what's the point of adding a katana on death?
and it wouldn't be triggered on the first character, and generally seems like an overcomplicated way to do this?
You don't want it to trigger on the first character?
no, it's a criticism
Ooh, sorry
I want to make it so if you choose my trait you get a nearly borken katana at spawn but I need it to happen every respawn
function spawnKatana(playerindex, player)
if player:getHoursSurvived() == 0.000 then
local katana = player:getInventory():getFirstType("Base.Katana")
katana:setCondition(3)
end
end
Events.OnCreatePlayer.Add(spawnKatana)```
gotta be the other way around
So you just need the onCreatePlayer event
function spawnKatana(playerindex, player)
if not player:getModData().katanaSpawned then
local katana = player:getInventory():getFirstType("Base.Katana")
katana:setCondition(3)
player:getModData().katanaSpawned = true
end
end
Events.OnCreatePlayer.Add(spawnKatana)
so if you respawn with that trait again you get another borken sword
Respawning is a new character
ModData doesn't carry over -- so you would get a new one
There is an issue using OnCreatePlayer in MP tho
oof
If you want the katana to be in the inventory when the player has just created a new character, you have to put a condition to know the number of hours he survived.
that's a good idea
ok so which of those should I use?
But would be less secure than modData
Days survived is a float so you could check it against 0.01
But I would prefer a boolean in modData
yeah, i'd caution against checking floats against exact values
something like < 0.01 as chuck was suggesting

this rainoa person is my mod's biggest supporter
i had one comment on mine and it was a bug report : (
btw thanks before. I got the outfit working
poggies
bug reports are just as helpful as supportive comments!
im hoping to get any reports of mod incompatibilities so i can make sure my mod works as sufficiently as possible
can someone help me with my mod ive been on it for 2 days and nothing seems to add my costum recipes
@rancid panther btw do you know if professions with exclusive traits can't have their own description? I have a description set for my prof but all it shows it the trait name. I tried to fix it and all I managed to do was break the trait name.
the trait description works
This is how we do it,
Events.OnNewGame.Add(function(player, square)
local map = { "APAMisc.Map_FoldCoffee","APAMisc.Map_FoldCrumple","APAMisc.Map_FoldCrumpleCoffee","APAMisc.Map_FoldCrumpleCoffeeDirt","APAMisc.Map_FoldCrumpleDirt }
player:getInventory():AddItem(map[ZombRand(1,#map+1)])
end)```
I want VSCode to allow me to populate an event template as an action.
(Types 'event' & sees 'New Event Hook' or something)
you set them in translation files.
Events['Event'].Add(function(params)
end);
anyone?
A feature like that would be epic.
you want the exclusive trait to have its own description? or the occupation? not sure what you are trying to change
Ok back to work.
i guess no one knows
the occupation. the trait has a descrioption but when I hover over the occupation it just says the trait name and skill points
you have to add a description
in profession framework you need to put it in your UI_EN.txt translation file
UI_prof_ProfName = "blabla",
UI_profdesc_ProfName = "blabla",
here is my code and its not showing up in game so yeah ill go off or not but if someone can help me
its not showing up in game with the mod enabled
module MKSHR+ {
imports {
Base,
}
recipe Craft Makeshift Axe {
UnusableMetal=3,
WoodenStick=2,
SheetRope=1,
keep HammerStone,
Result:Axe,
Sound:Hammering,
Time:200.0,
SkillRequired:MetalWelding=0,
Category:Welding,
}
recipe Craft Makeshift Propane Torch {
UnusableMetal=8,
WoodenStick=2,
SheetRope=1,
PopEmpty=1,
Result:Blowtorch,
Sound:Hammering,
Time:200.0,
SkillRequired:MetalWelding=0,
Category:Welding,
}
recipe Scrap Pop Can to metal {
PopEmpty=1,
Result:UnusableMetal=2,
Sound:Hammering,
Time:20.0,
SkillRequired:MetalWelding=0,
Category:Welding,
}
recipe Craft Tissue {
RippedSheets=3,
Result:Tissue,
Sound:Hammering,
Time:10.0,
SkillRequired:Health=0,
Category:Health,
}
recipe Craft Bandage {
RippedSheets=2,
Tissue=4,
Result:Tissue=2,
Sound:Hammering,
Time:20.0,
SkillRequired:Health=0,
Category:Health,
}
recipe Craft AdhesiveTape {
RippedSheets=8,
LemonGrass=2,
Result:AdhesiveTape,
Sound:Hammering,
Time:50.0,
SkillRequired:Health=1,
Category:Health,
}
recipe Craft Bandaid {
AdhesiveTape=1,
Bandage=1,
Result:Bandaid,
Sound:Hammering,
Time:50.0,
SkillRequired:Health=1,
Category:Health,
}
}
I did
UI_prof_Weeb = "Weeb",
UI_prof_WeebDesc = "Never had a job, dwells inside of their mothers basement, has never felt the touch of a woman and collects the most degenerate material known to man. Some would say your way of life makes being undead preferable.",
UI_trait_Blade = "Studied the Blade",
UI_trait_BladeDesc ="Whilst others were out partying you were studying the blade. Now the time has finally come to show them all the results of your training.",
}```
Weebdesc
ProfessionFramework.addTrait('Blade', {
name = "UI_trait_Blade",
description = "UI_trait_BladeDesc",
profession = true,
xp = {
[Perks.LongBlade] = 2,
},
inventory = {
["Base.Katana"] = 1,
},
})
ProfessionFramework.addProfession('Weeb', {
name = "UI_prof_Weeb",
description = "UI_prof_WeebDesc",
icon = "proff_Weeb",
cost = 4,
xp = {
[Perks.Fitness] = -2,
[Perks.Strength] = -2,
},
traits = {"Blade"},
inventory = {
["Base.Dakimakura1"] = 1,
},
clothing = {
Hat = {"Base.Hat_Fedora"},
Jacket = {"Base.JacketLong_Random"},
Hands = {"Base.Gloves_FingerlessGloves"},
Shoes = {"Base.Shoes_ArmyBoots"},
Pants = {"Base.Shorts_CamoGreenLong"},
},
})
so like this and then also change the translate txt? ProfessionFramework.addProfession('Weeb', { name = "UI_prof_Weeb", description = "UI_profdesc_Weeb", icon = "proff_Weeb", cost = 4, xp = { [Perks.Fitness] = -2, [Perks.Strength] = -2, }, traits = {"Blade"}, inventory = { ["Base.Dakimakura1"] = 1, }, clothing = { Hat = {"Base.Hat_Fedora"}, Jacket = {"Base.JacketLong_Random"}, Hands = {"Base.Gloves_FingerlessGloves"}, Shoes = {"Base.Shoes_ArmyBoots"}, Pants = {"Base.Shorts_CamoGreenLong"}, },
i dont think with profession framework you add a description tag for professions
maybe not even in vanilla
might be a bad idea to include weird characters like + in your module name
where is the file + what is it called?
but yea that's how it should be written
the script file
when they completely don't show up it's usually because it's in the wrong place or missing the extension or something
media/scripts/file.txt?
for skill required Health should be Doctor but i don't think that would make the entire file stop showing up
adding things that dont exist in my mod always makes the file disappear in debug file list
yeah but even with one
like even with the right skills
still doesnt work i tried that
and the import i remove?
ok
you can keep the import but it's redundant if you're already module base
so i can remove it?
yeah
so its just module base without the block or how should it be placed?
what about the semi colon after module base
semicolon?
{
it doesn't need to be inline
sounds like it's definitely an issue with the file structure then
Are you puting the file in the correct folder?
yeah
Maybe missed a bracket somewhere?
"C:\Users\myname\Zomboid\Workshop\MakeshiftItems\Contents\mods\MakeShiftItems\media\scripts\Makeshiftitemsrecipes.lua"
.txt
its not lua
not .lua
wtf
.lua?
im so fucking confused
lets see if it works now people of discord gpt useless
real
wait
the
bandages dont work
why
and why does the propane torch not have image
yeah tissue etc
like the medical ones
oh wait im so stupid
different category
yeah i copied ur code
yeah
i tought i fixed that
but i guess not
why does the propane torch not work like the image?
but it does recognise it as propane torch
Probably should be Result:BlowTorch with a capital 'T'
Alright, I finished the transcript of the entire Life and Living channel, so I decided to release my mod.
https://steamcommunity.com/sharedfiles/filedetails/?id=2950750587
This one adds voice lines (currently) to every Life and living program. The objective is to every radio and TV program.
Special thanks to @abstract raptor for allowing me to use Survivor Radio as a base for this mod
Good job! @keen silo
thanks ๐
if im at triggered event
Events.OnServerCommand
then do call my own command
what is the best practice to get current client player?
just getPlayer()
IsoPlayer:getPlayerByOnlineID(IsoPlayer:getOnlineID())
getSpecificPlayer(0) <- this one
derp just posted wrong channel... lol
Expected to find missing API page for path zombie/modding/ActiveMods
Expected to find missing API page for path zombie/iso/sprite/IsoSpriteGrid
Expected to find missing API page for path zombie/chat/ChatMessage
Expected to find missing API page for path zombie/randomizedWorld/randomizedBuilding/RBBasic
Expected to find missing API page for path zombie/ai/states/FitnessState
Expected to find missing API page for path zombie/globalObjects/CGlobalObjectSystem
Expected to find missing API page for path zombie/ui/UI3DModel
... ``` Got a list now for things to look for first. 
anyone know how I can get a profession to spawn you with a random item from an array list?
local items = {"Base.Apple","Base.Banana"}
local onCreatePlayer = function(_playerIndex, player)
local item = items[ZombRand(#items)+1]
player:getInventory():AddItem(item)
end
Events.OnCreatePlayer.Add(onCreatePlayer)
would this work with an array list my mod already uses? this is it. ```
-- Add Weapons Items Here for each Item variant
DakimakuraWeapons = ArrayList.new()
DakimakuraWeapons:add("Dakimakura1")
DakimakuraWeapons:add("Dakimakura2")
DakimakuraWeapons:add("Dakimakura3")
DakimakuraWeapons:add("Dakimakura4")
DakimakuraWeapons:add("Dakimakura5")
DakimakuraWeapons:add("Dakimakura6")
DakimakuraWeapons:add("Dakimakura7")
DakimakuraWeapons:add("Dakimakura8")
DakimakuraWeapons:add("Dakimakura9")
DakimakuraWeapons:add("Dakimakura10")
DakimakuraWeapons:add("Dakimakura11")
DakimakuraWeapons:add("Dakimakura12")
DakimakuraWeapons:add("Dakimakura13")
DakimakuraWeapons:add("Dakimakura14")
DakimakuraWeapons:add("Dakimakura15")
DakimakuraWeapons:add("Dakimakura16")
DakimakuraWeapons:add("Dakimakura17")
DakimakuraWeapons:add("Dakimakura18")
DakimakuraWeapons:add("Dakimakura19")
DakimakuraWeapons:add("Dakimakura20")
DakimakuraWeapons:add("Dakimakura21")
DakimakuraWeapons:add("Dakimakura22")
DakimakuraWeapons:add("Dakimakura23")
DakimakuraWeapons:add("Dakimakura24")
DakimakuraWeapons:add("Dakimakura25")
DakimakuraWeapons:add("Dakimakura26")
DakimakuraWeapons:add("Dakimakura27")
DakimakuraWeapons:add("Dakimakura28")
DakimakuraWeapons:add("Dakimakura29")
DakimakuraWeapons:add("Dakimakura30")
return DakimakuraWeapons
hi, im still new to lua, and i cant figure out the correct syntax for my item's distribution
may i ask for an example ?
why are you using an arraylist?
it's used in another spawn system that spawns those items on beds.
it's also tied into addons that people make for my mod
so it's just easier if the profession spawns items from that
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...
works like a charm, i was to noob to understand it was what i needed when i searched ๐
do any of you know of a mod that adds, as part of it's other features, a sort of condition bar to bags in the inventory hotbar that changes color based on the fill level of said bag?
I asked there and noone knew thus far, so I figured I might ask here and possibly get an answeer.
I apologize for asking in the wrong channel.
I seem to cause errors to mods that use Global ModData by doing something like:
local function doOnce()
Events.OnInitGlobalModData.Remove(doOnce)
end
Events.OnInitGlobalModData.Add(doOnce)
and nobody can track me
took me a few reloads to find myself
posting in case I remember for next time, not first time I do this
What basically you inititialize the removed the event . Without doing anything? Weird
that's enough to do the error
obviously there's more code after that
Ah i see
Where can I find information on modding pz? I want to add a simple carpentry recipe for the tall fences the often separate houses
Check threads
Thank you so much Poltergeist!

You're good as long as you're not feeling queasy
Not until the sun sets.

I'm also upset because I keep delaying the post for the forums for my VSCode extension for PZ modding scripts.
Too tired from work.
Looking forward to that
I mean.. It's up and live for people to use it but man.. Writing a post feels like too much work.
Thats for txt right?
Yeah. Only syntax highlighting is live atm.
I got to the finish line on the first sprint goal and now I'm dead.
Still useful . Wait live?
Whats it called im gona install now
Was it an index out of bounds error? I think this should probably be a bug reportโI wondered why this would be problematic & checked the decompiled code and I can see why it could cause problems (edit: actually, wait, no I don't. What was the error?) (another parenthesized edit to clarify and make this message even longer: it seems like the only thing that would happen is that it'd skip others' events once) (yet another edit: oh. I see why that would be a problem for an OnInit handler)

Look up "ZedScript" in the Extensions marketplace.

So..
DoParam changes future spawn instances and not the ones thats already looted right?
Then if i do param then spawn the. Revert back the changes
Theoretically that should work right?
I haven't used DoParam so I'm not certain. If that's the case then theoretically yeah, but I'd probably seek out a cleaner way
If im modifying something that doesnt have setter getter naturally then only doparam will work
And yeah i tried this. It didnt work

What's the something?
Oh and here's the webpage too: https://marketplace.visualstudio.com/items?itemName=asledgehammer.zedscript-vscode
Like static models
Nice logo
Theres now setStatic
I retrofitted it from an older logo design candidate for a PZ server in the mid to late 2010's for ZedScript.
Thanks.
I design all my media.
But i know next build they will allow clithing to change texture so tht theres no need to create 4 different items which js the same item
Like hood down and hood up
Cap front cap backwards
Hello everybody
I'm creating my first mod which add new items to the game.
I want to add this items to the loot table but i saw that there are differents ways to do this
In the DistributionProcedural file, i can put :
**table.insert(ProceduralDistributions["list"]["ArmySurplusOutfit"].items, "JacketFlecktarnGreen.JacketFlecktarnGreen");
table.insert(ProceduralDistributions["list"]["ArmySurplusOutfit"].items, 6);
table.insert(ProceduralDistributions["list"]["BedroomSideTable "].items, "JacketFlecktarnGreen.JacketFlecktarnGreen");
table.insert(ProceduralDistributions["list"]["BedroomSideTable "].items, 1); **
OR
**
local targets = {ArmySurplusOutfit = 6, BedroomSideTable = 1, }
local item = "JacketFlecktarnGreen.JacketFlecktarnGreen"
for k,v in pairs(targets) do
local items = list[k].items
table.insert(items, item)
table.insert(items, v)
end
**
I want to do the better thing to the game to make my mod optimized and easy to change. Which solution do you think i must choose ? ๐ฎ
Thank you everybody โค๏ธ
Its the same
The other one is manual input
The second one iterates a table to insert
thank you a lot @ancient grail !
why items have got this format : item.item ? can i use it better than my jacketflecktarngreen.jacketflecktarngreen ?
the format is module.item
Its items.item
The items is the table you insert and item is what you insert
You can name it anything
Oh ok Thank you, i see where is the table you're mentioning, thank you guys !
Anyway, in few weeks i'll publish a new Twitch Integration Mod which let viewers play with there streamer
Viewers can :
- buy a survivor (an avatar linked with the twitch account ID) with channel points ;
- Send survivor into raid to get stuff ;
- Receive Xp Points which let him upgrade his skills
- Find stuff which spawn into the streamer base to help him
I'm using this big mod (we're a team of 4 working on it since 2 months) on my twitch channel everyday and it will be publish in April.
If you want to see it or something, don't hesitate to come ๐ and of course i'll give the link into this discord for all streamers who want to use it
If in the in-game console, I type getPlayer():isOutside(), will it execute the lua statement or not?
need to check certain flags for the player and tiles
yes 
didn't see that the input field is literally titled "Lua Command Line"
at least now I can test lua without rebooting everytime
today i started my transport services inc, it is a realistic fast travel mod to zomboid, works SP and MP, you can ask to stop a bus to specific destination, and the 6 people that enters on bus/van, go with you to destination, it cost some money, im planning to do wallet fund compatibility with atm mod, you can even invite your buddies to your home by using last pos
im planning to record using with full group, you can send yours or we can make it together too, in the future it will be an uber option too, with trip paid by distance too soon (it is more easy to do then the bus thing)
Realistic bus fast travel - Reifel Transitio Rides (RTR) v1.0
https://steamcommunity.com/sharedfiles/filedetails/?id=2949835600
is there a way to register a custom event trigger?
i need one mod to do something exactly when another mod says its ready
like this
๐
does AddEvent have any additional params?
ah shoot I could just check the docs
it does not. ๐
hey hey people, im trying to make a mod which removes the sunday driver trait from the player after having driven for a while. When I use the OnPlayerUpdate event it works but when I try and use EveryTenMinutes it freaks out over player:isdriving. Is there a singular player update line im missing?
was going to link the everytenminutes to a counter that when hitting a certain point removes the trait
another reason for modders to use VS Code ๐ฏ
i love tile inventory
Same lol
i wish more games used them, but every time i see it it's a pleasant surprise
that ui looks a lot neater than the current most popular clothing ui
How do I iterate through all containers the player has equipped? (like backpacks worn on back, bags equipped in hands etc.)
local function addContext(playerID, context, items)
local playerObj = getSpecificPlayer(playerID)
for _, v in ipairs(items) do
local item = v
if item:getDisplayName() == "QuestItem" then
context:addOption(getText("READ"), item, NEXTSTAGE, playerObj)
end
end
end
guys, I am trying to loop through a player's inventory
and if an item with display item name "QuestItem" is found, I want to give it a context menu "Read" when right clicked
is that correct way to do so?
if you need to find an item or something there's a bunch of recursive methods for stuff like that in ItemContainer
otherwise, manually
Ok. Have some ideas how this will work out manually. Do you know how to check whether an item is actually a container? (I would then simply check body locations and hands for equipped items and whether they are containers...)
haha... ya... still a bit different
i think instanceof(item, "InventoryContainer")
i believe thre's a function that checks if an item is in player's inventory.. so i think u can use that or find a function that checks if an item is in certain container
to iterate through inventory, use smth like
for i=1, inventory:size() do
local item = inventory:get(i-1)
-- do smth with the item
end```
also to add context menu, i just have to use the context:addOption ???
not sure if that function is inherited to all items automatically..
Not exactly sure what options there are for adding context menu to items but when I do those things, I directly patch the vanilla function
ISInventoryPaneContextMenu.createMenu
which controls those menus. But there maybe easier ways to do this....
I played Fate so much as a kid
i have it on steam just cuz of the nostalgia
ty
God, I have no idea why these functions I have added to an event are not firing
In a different file, a debug and a sound function ARE working
in this file, it doesn't even give me a log
and now I moved the function code to instead execute immediately and it gets even MORE strange
christ
Show the code
And which folder is it placed?
is it by chance ongameboot in the server folder?
no, it's my own custom event
I will continue dabbling with it until I show this mess
yes
the event itself is working just fine
it's just these stupid timed actions not working as intended in the Java code
Is it on the same lua file
no
Weird
i made an init file for creating the event
and the event triggers in one timed action
for clothing unequip yeah
ill do something else to fix these timed actions
I hate timed actions
okay, what the fuck. Now you're telling me that another part of my code is now not working all of a sudden?
absolute bullshit, I'm done modding for tonight
"yeah, we simply won't transform the item, even though its happening somewhere else entirely from where you were making changes"
I wish everyone here a very nice modding sesh apart from this crap I've been having lol
First person mod in project zombiod
just make another game at that point LOL
just buy dayZ lol
Hmm, im planning to create a mod can change the tailoring material, i mean now we only use leather, denim and cloth to patch holes, i want to create and use rare material for more protection. But i don see any script or lua about that. Any suggest for this idea?
ill take a look and see if i can find a relevant file real quick
yah please, i try to find whole yesterday in searching file, internet but dont find any clue about it :(( Only thing i found is some strip.png :v
holy shit
just finally figured out my mod after being unable to do it all day yesterday
spent all day reading lua documentation because i knew nothing about lua
at long last ive done it
i struggled with replacing / adding to a vanilla function but I think i finally got it
ISEatFoodAction.new = function(self, character, item, percentage)
local isClove = item:getType()
local o = base_eat(self,character, item, percentage)
--print(o.maxTime)
if isClove == "CloveCigarettes" then o.maxTime = 2000 end
--print(o.maxTime)
--print("DONE")
return o
end```
can someone please check and tell me if this is an okay way to accomplish adding to a vanilla function
i don't want to mess anything up, replace any files, or cause conflict with other mods
but i think this should be okay from my research?
@drifting oreI think i found something relevant
media\lua\shared\Definitions\ClothingRecipesDefinitions.lua
ClothingRecipesDefinitions = {};
ClothingRecipesDefinitions["Sheet"] = {materials="Base.RippedSheets:4" }
--ClothingRecipesDefinitions["Belt2"] = {materials="Base.LeatherStrips:1"}
ClothingRecipesDefinitions["FabricType"] = {}
ClothingRecipesDefinitions["FabricType"]["Cotton"] = {};
ClothingRecipesDefinitions["FabricType"]["Cotton"].material = "Base.RippedSheets";
ClothingRecipesDefinitions["FabricType"]["Denim"] = {};
ClothingRecipesDefinitions["FabricType"]["Denim"].material = "Base.DenimStrips";
-- ClothingRecipesDefinitions["FabricType"]["Denim"].tools = "Base.Scissors"; -- commented out as they are unused; recipe code handles this
ClothingRecipesDefinitions["FabricType"]["Denim"].noSheetRope = true;
ClothingRecipesDefinitions["FabricType"]["Leather"] = {}
ClothingRecipesDefinitions["FabricType"]["Leather"].material = "Base.LeatherStrips";
-- ClothingRecipesDefinitions["FabricType"]["Leather"].tools = "Base.Scissors"; -- commented out as they are unused; recipe code handles this
ClothingRecipesDefinitions["FabricType"]["Leather"].noSheetRope = true;```
what command did you use to call the timed action? i might be able to use that to improve my immunity mod in the future
Oh thankyou, iโll check it later when i come home
i'm confused by what you mean
require "TimedActions/ISEatFoodAction"
local base_eat = ISEatFoodAction.new --make a copy of the vanilla function
ISEatFoodAction.new = function(self, character, item, percentage) --override vanilla function
local isClove = item:getType() -- variable containing item type, which is "CloveCigarettes"
local o = base_eat(self,character, item, percentage) --let vanilla new function run to create the "o" object
if isClove == "CloveCigarettes" then o.maxTime = 2000 end -- if the item is a clove cigarette, make the use time longer because cloves burn slow
return o -- returns the o object so that the rest of the vanilla functions can perform
end```
this is the full code and the comments of what it does
nothing else
i'm very new to this
no this is all i have
its just adding into the vanilla function of isEatFoodAction.new
oh okay
the script called it automatically
sorry, i'm still trying to wrap my head around all this
i'm just happy I finally got it working
yay!
something as simple as changing that took me a long time
but i was starting with no knowledge
it's okay tho, the less i learn, the less likely i am to lose hours of sleep over my mod again
now for the real fun part of learning blender and 3d modeling so i can make models
but models for cigarettes and a box of cigarettes should be easy
just a box and a cylinder
u could probably get away with a single cigarette as the 3d model
since the item itself is a single cig

unless u made it a drainable item, but im assuming u used similar code to the cigarette
you're not wrong
oh wow an emote drawn by one of my fav artists. i see them everywhere
however, it could be neat if I made a new item that's a carton containing a number of cigarettes
you could do that as well
hmm
for now I think ill do the single cigarette, upload it to the workshop, and then make a cigarette pack in an update
sapph's cooking has candy cigarettes that are a drainable item instead of 1 cigarette each time
is it possible to have a recipe with no item requirements
i dont think so
because if so I could just make it a recipe item that destroys on use and gives 12 cigarettes
i wish project zomboid had a "cool" moodle or level
so smoking a clove cigarette makes you less cool
lmao
Looks good
@abstract raptor look lava
Hehe

Smoke that you die
where do i get started with learning to make a mod?
i'd like to create a mod that allows blades to be sharpened with a whetstone
There are resources for learning in the pins and threads of this channel + the wiki
that sounds like something you can find on steam workshop
awesome, but it's a bit confusing. are there any specifics that i should look for to 'repair' an item?
so far i was able to modify the durability of a weapon, and it works well
Yes, this is fine. You're effectively doing what Fenris_Wolf recommends in this guide: https://github.com/FWolfe/Zomboid-Modding-Guide/blob/master/api/README.md#overwriting-vanilla-code
is the global moddata at client side independent from global moddata at server side?
Where should I start when adding stuff like custom radio/tv
as in a new item or a new channel
does this cigarette look too big
or is it okay
New Channel like Life and Living or Turbo
hmm, how about value of protection? I mean, Cotton has about 5% protection bonus.
I think it in script but dont see any like that, again :((
i think i found it
man it was a pain in the ass
C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\lua\client\TimedActions\ISRepairClothing.lua
also in there is ISRemovePatch.lua which you may need if you're adding new material
require "TimedActions/ISBaseTimedAction"
ISRepairClothing = ISBaseTimedAction:derive("ISRepairClothing");
function ISRepairClothing:isValid()
return self.character:getInventory():contains(self.clothing) and
self.character:getInventory():contains(self.fabric) and
self.character:getInventory():contains(self.needle) and
self.character:getInventory():contains(self.thread) and
(self.clothing:getPatchType(self.part) == nil)
end
function ISRepairClothing:update()
end
function ISRepairClothing:start()
self:setActionAnim(CharacterActionAnims.Craft);
end
function ISRepairClothing:stop()
ISBaseTimedAction.stop(self);
end
function ISRepairClothing:perform()
self.clothing:addPatch(self.character, self.part, self.fabric);
self.character:resetModel();
self.character:getInventory():Remove(self.fabric);
self.thread:Use();
self.character:getXp():AddXP(Perks.Tailoring, ZombRand(1, 3));
triggerEvent("OnClothingUpdated", self.character)
-- needed to remove from queue / start next.
ISBaseTimedAction.perform(self);
end
function ISRepairClothing:new(character, clothing, part, fabric, thread, needle)
local o = {}
setmetatable(o, self)
self.__index = self
o.character = character;
o.clothing = clothing;
o.part = part;
o.fabric = fabric;
o.thread = thread;
o.needle = needle;
o.stopOnWalk = true;
o.stopOnRun = true;
o.maxTime = 150 - (character:getPerkLevel(Perks.Tailoring) * 6);
if o.character:isTimedActionInstant() then o.maxTime = 1; end
return o;
end````
file contents
so basically you would define your new patches in media\lua\shared\Definitions\ClothingRecipesDefinitions.lua
then you would patch ISRepairClothing:newto check if one of your new patches is the item being applied
(i think)
hmm, i'll try the ClothingRecipeDef first, but still not find the protection value. Just like i want to create a new fabric type, so it should have new protection value
found it @drifting ore
C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\scripts\newItems.txt
{
DisplayCategory = Material,
CanBandage = TRUE,
Weight = 0.05,
AlwaysWelcomeGift = TRUE,
Type = Normal,
DisplayName = Leather Strips,
ReplaceOnUse = LeatherStripsDirty,
Icon = LeatherStrips,
BandagePower = 2,
Tooltip = Tooltip_RippedSheets,
FabricType = Leather,
WorldStaticModel = LeatherStrips,
}```
new item?
feel not true, it for the bandage i think?
just like, fast heal when use leather strip
maybe they use the same variable
but ill keep searching
just trying to provide anything i can โค๏ธ
damn
it also have bandage power
smart way to debug that though
so it's not the value i found
hmm, dont know how to use that
already turn on it but dont know how the dabug work :V
nah i was just saying that was a smart way to test that variable
to see if it really was the protection value
Hey guys you got any idea why my icon wont show up?
items.txt =
module BamsAlarmMod
{
imports
{
Base
}
item HomemadeAlarm
{
Type = Normal,
DisplayName = Homemade Alarm,
Icon = Item_Alarm,
Weight = 1
}
}
name=Bams Homemade Alarm
id=BamsHomemadeAlarm
description=This homemade Alarm created by a Speaker some Wires and 2 Batteries will lure any Zombie that is nearby away from you!
Hey guys you got any idea why my icon wont show up?
items.txt =
module BamsAlarmMod
{
imports
{
Base
}
item HomemadeAlarm
{
Type = Normal,
DisplayName = Homemade Alarm,
Icon = Item_Alarm,
Weight = 1
}
}
mod.info =
name=Bams Homemade Alarm
id=BamsHomemadeAlarm
description=This homemade Alarm created by a Speaker some Wires and 2 Batteries will lure any Zombie that is nearby away from you!
icon format is .png
32x32
in textures/Item_Alarm.png?
yup
you also need a comma after Weight = 1
oh for real? ๐
i believe so
hold on
nah that isnt it :/
yah, not the value :((
this fking thing, that's why dont see so much mod about tailoring
can you show your file structure
sure
for real. I wouldn't have thought it would have been such a pain
this is it
i didn't see the item_
but that's deffo the issue
yah, searching for the whole workshop and really a little mod about tailoring
hmm? My role change :V?
hmm, found some about it on wiki
nope still wont work sadly
does anyone got any idea about file has this class?
i'm still searching
but legit i'm stumped
searching the wiki, files, googling, etc
you picked a tough one lol
haha really hard
hmm new cigar?
i see the image of item on ground, i think u should reduce a little
the size, maybe a little is better, or maybe im wrong cuz i often use the 3d model
oh
look gud with that
module RepairKatana
{
imports
{
Base
}
fixing Fix Katana
{
Require : Katana,
Fixer : Whetstone = 1,
}
}
how can i keep the whetstone after the repair?
im assuming this will delete the item after repairing?
awesome!!!!!!!!!!!!!!!!!!!!!!
thanks a whole bunch!!!!
eh, but it still doesn't address the items not being removed
The guide fails to mention that:
Fixer : Woodglue=2; Woodwork=2,
The 2nd entry is a skill and level.
I'm not sure how that's calculated tbh.
ZedScript is cryptic and band-aid'd to hell.
It might be units of the item?
sigh
i wonder if its just not possible
maybe i could just make the item a drainable
and slowly reduce it's use
is there a "disable all" option in mod manager
i can't find one
but i'm really tired
and i don't feel like manually disabling 400 mods
Saved Presets and there's option to disable all mods
tyvm
-- ["list"]["inventorymale"]
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "gothCigs.CloveCigarettes");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 100);
-- ["list"]["inventoryfemale"]
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "gothCigs.CloveCigarettes");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 100);
this should make it so my item spawns on zombies every time, right?
i'm trying to test my distribution but I can't get the item to spawn
oh nevermind I was using the mod ID instead of the module ID before the item name
Can you do that with items aswell?
got my item distribution working and with that my mod is complete
now i just have to make the steam workshop and preview images
hype
Thought bro was hitting the griddy
@jaunty marten Hey. Spending some time today working on implementing my tokenizer in my vscode extension.
For the largest files, I've gotten the time down from ~2.0 seconds (Horrible) to ~0.02 seconds (Better).
This was due to cursor data being calculated from 0->offset in my char tokenizer.
Implemented a cache for it. 
With my lexer / tokenizer in place for the extension, that means development on auto-complete suggestions, a formatter, and a linter is now possible.
im not a coder so its going to be a hot minute to find out what im doing with these ntm i have at most 80 more of these to make and do their stats
the initial release is going to be these four and wont be anything like what they will be when "project fallout" is released
im hoping i can get who ever modeled "Project Fallout: Scientific Armoury" to make some power armor paints
but atm they are just going to give mechanics skill
If you want to avoid some tedium you could look at how I handled Named literature @vast jasper
I used Base.Book and a list of 3000 titles and authors + a bunch of colored icons to randomly seed names and colors.
๐ yeah i should look into something like that
atm when they are read they turn into one of the vanilla auto magazines
lol glytch3r you spooky bastard xD
@weak sierra nyahahha
U like the idea?
Your zedscript will give birth to a new generation of modders
ZedScript is well.. the name of the script unofficially. This tool will, yeah.
it's pretty cool yeah
Esp if i add a jumpscare when it moves
A little worried about really long code blocks in documentation buuut this does work.
I just laid out the implementation to be incredibly easy to add to.
So all scopes inside of module can be worked on and populated with documentation and auto-fill.
An idea I had was gathering up a list of all item objects and serving them as completion suggestions for recipes.
My full tokenizer is simplified and added to this extension as well.
I'll run through and do Recipe's options today and then fill in as I go forward in the following days.
I laid out the design of this feature for the extension in order to give the opportunity for modders to submit documentation if they wish to help with the process.
I don't expect anyone to do this because in the 10 years I've modded PZ this hasn't happened when I did.
xD
Your plugin is looking slick as hell, Jab
What's the compat on this bad boy?
Just restarted for updates and still can't install it
Make an issue on the repo. I'll need to take a look.
I use the latest VSCode installation.
Can you check your version right quick?
I'm going AFK for a while. Caught me at the last moment.
Sure.
Version: 1.76.2 (user setup)
Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
Date: 2023-03-14T17:55:54.936Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Windows_NT x64 10.0.22000
Sandboxed: Yes
(This is my very first VSCode extension so anything that should be obvious isn't to me =( )
Had to restart one more time to get to 1.76.2, but now it installs.
Not sure if there's a hard dependency or something could be made more permissive with it.
Yeah.
If you have insight feel free to DM me or join my server & say something or make an issue with the fix.
pull-request too?
lol
First
I don't have the fix for you unfortunately, you're one VSCode extension ahead of me in experience ๐
Looks like you have it locked to 1.76.0 and up: https://github.com/asledgehammer/ZedScript-VSCode/blob/main/package.json#L6-L8
I can't say whether that's required for what you're using.
Interestingly, your devDependencies only take a dependency on the vscode types exposed with 1.73.0 and up, so perhaps version can at least be cranked down that far? https://github.com/asledgehammer/ZedScript-VSCode/blob/main/package.json#L34
hey, can anyone give me a guide on how to change a model of a gun?
Am i allowed to use real product images such as this for my workshop preview image
idk the workshop guidelines / rules
i had an idea for a mod and wanted some pointers as to which wiki pages would be the most informative for my concept.
i want to make a very fleshed out bagel-making mod.
and i would like to allow for baking them with dough, toasting them, cutting them, and spreading stuff like jam, peanut butter, and more, onto them.
any assistance would be lovely!
oh and btw i already have a fair amount of coding experience so i can most likely figure any of that out myself, i just need to know what game specific info would be useful
i'd recommend looking at another cooking mod likes sapphs cooking to see how they laid out their recipes / definitions / lua
ur expected to follow copyright laws but i doubt they would pursue you legally for this.
@rancid panther
what about if i remove the brand name
like this
would that avoid copyright?
i just learned about fair use in my class recently
it could be considered transformative, but i dont think the company will care regardless of what you do
i would say removing branding is good enough if you wanna go that route
maybe give it a pz-esque name too
kinda like how the boots mod calls Adidas "Adimas" and how modded vehicles use funny names too
mod doesn't reference the name at all actually
it's just "clove cigarettes"
so name isn't an issue
ill try it without the brand name and see if i get any kickback
only my second mod so i'm trying to be careful. I don't wanna mess anything up or get in trouble
bc i'm having a lot of fun learning how to make mods
making a car mod rn and wondering if it's normal that the entire vehicule (including the grey sections ( when you remove a part) are reflective.. I'm guessing it's not but can't seem to find what I did wrong..
@chrome egret I went ahead and moved the version for vscode.
Let me know if this works.
I just bounced two issues on GitHub at once heh.
One involving code not touched for over 7 months.
I haven't run npm i at all, btw. It borked directly from the extension install
Once you determine the minimum version you think you can support, I was planning on downloading an old portable VS Code to test.
@chrome egret Give the new version to validate & verify for about 8 minutes and try installing 41.78.19
What min version are we looking at for the vscode engine in that release?
Yeah, I think your latest change was only to devDependencies
But you left the engine version the same
Yes. I'm editing this.
Okay. Expect another 8 or so minutes @chrome egret
Should be live.
Is anyone here a timed action guru, god, or deity? Because I need divine power to solve a very simple issue, in which reinventing the wheel 3 different ways did not solve apparently
Is there a mod out there that shows missing dependencies for a downloaded mod?
Not gonna claim any of those titles, but what's your issue? I thought I was at a dead end with my timed action issue and figured it out, so there's hope!
It does appear to let me install with the portable 1.63.2 version I downloaded, but I do think it's broken somehow.
I presume that if it were working I would get some autocompletion help with this input, since it's similar to the example you showed:
recipe Do A Badass Thing
{
On
}
Not getting IntelliSense with the newer VS Code version, but I do at least see syntactical highlighting, and it's not giving an error about the ServiceWorker registration:
Honestly, I should just put it back to 1.75.0
VSCode is very update-friendly.
Here.. one sec.
well alright, i guess i ought to explain exactly what I'm doing
At the beginning of the game, my mod queues a timed action to happen immediately
There is another mod that queues other timed actions before my timed action, but I don't want that
so I have made an event that triggers when my timed action finishes, to call the other mod's code to queue its timed actions
but all sorts of shit happens and I can't make heads or tails
this is still the rough gist. it is a very complicated operation in the code lol
your best shot is the mods explicitly telling you what it requires in the mod.info (mods screen), but there are no mods that can comb through all of the files to find what is what
you could try searching through all of the files for anything that uses getActivatedMods(), but some mods directly use things from other mods without checking if they are enabled
in summary you just need to look at the code
@chrome egret
This is the packaged mod.
Try running it.
I think you can locally use it.
SO this is out of the blue and nobody asked, but I want to bring attention to this for anybody paying attention:
https://discord.com/channels/136501320340209664/1088608788006830112
I have seen a lot of mods now that don't get parsed properly by the native PZ Linux client, and it's because of carriage returns in their files that have been written on DOS systems and can't be properly read by UNIX systems.
Pay attention to hidden characters :^)
๐ I just started writing mods for pz. Any testing tools y'all recommend? It's a bit of an ick to re-run the game over and over :p
Agreed, that's why I put in a report
Like a developer mode or something?
-debug on the launch parameters for PZ.
Put this report on the forums.
Would suck to see that swallowed up here.
Is there a way to do that with Steam?
Thx for the quick response btw!
Launch options. (Right-click the game)
Properties
First tab
advanced users line
I'll see about it sure
I run PZ from Batch files personally.
Say more! Or link the source.
Made a simple car mod, everything works fine, except I'm unable to get the bloodUI to show up on them.. could somebody point me in the right direction?
I've seen the the veh_blood_mask in the game files so my guess is I have to make one for my models. But where do I link it? The in-game car script use them as overlaydamage01 and 02, but when I do that the car gets bloody if the parts have low condition..
Oh ho, do tell!
Do you run the it from the terminal using one of the .app files? I've been looking to figure out how to do that 
I use Windows.
You can do the same thing with shell script unless you're using a Mac IIRC.
I am indeed using a Mac. I probably need to find a different way
I think you can hold down left or right SHIFT when launching the game to enable debug mode.
I am making my mod Parachuting Start work with Insurgent
https://steamcommunity.com/sharedfiles/filedetails/?id=2948659911
https://steamcommunity.com/sharedfiles/filedetails/?id=2907683021
Insurgent auto-equips the weapon on your character and it happens before my parachute action
I am trying to make it auto-equip afterwards but it's not working, even if I comment out the code entirely weird shit still happens
need to sit back down and actually comb through it again. yesterday was a disaster because I also had college assignments and no real free time
[url=http://theindiestone.com/forums/index.php/topic/2530-mod-permissions/?p=36477][img]https://projectzomboid.com/images/MODS_02.png[/img]Website link[/url]
does anyone know why this image wouldn't be loading
for some reason the url image does not load
however [img]https://i.imgur.com/2RKJkHw.jpeg[/img] will load
in the steam workshop item description
how do the safehouses work exactly?
I think most of the stuff you want to do can be realized by using appropriate script.txt definitions for your new items as well recipes and evolved recipes. What could be a thing is allowing to toast them because afaik there isn't any vanilla system allowing toasting (or am I worng? are there even toasters in game??). This might require some additional coding work.
As a starting point, I would just check the vanilla recipe.txt's to get an idea what is going on. They can be be found in media/scripts folder.
id honestly be fine with just using the existing cooked system to represent toasted bagels
would i be able to make the uncooked bagels still be healthy to eat and not be bad like uncooked meat, or is uncooked food by itself unhealthy
like is uncooked food dangerous no matter what
also thanks for the descriptive help 
then you could try doing this by setting "IsCookable = TRUE" in the script definition. This alone won't make the food unhealthy when uncooked.
what's the best way to contact a mod author for permission?
i tried going to their steam page but there's no message option
leaving a comment on their profile seems weird
no github
searched this discord but didn't find someone that could be them
author hasn't commented or updated the mod since January either
all i want to do is use some of their distribution.lua
mod page doesn't list permissions so i guess its credit where do?
all modding for PZ is open source. just credit them if you feel the need too
ill be changing all the spawn rates I just don't want to have to copy / dig through all the spawn locations
so idk if credit is even needed then?
its not specialized spawn locations
just general stuff
probably not, people look at other mods for "how did they do that" all the time
dear respectful coders, could someone help me on what to iterate if I want to find a "dead zombie" on the floor???
do getGridSquare() has its container inherited?
i believe zombie corpses are considered loot containers. i know you can get all of the nearby players loot containers but i don't remember how
dang xD
what i want to do is to bring up a context menu "inspect" when I right click on a dead zombie on floor
So i guessed that i need to get all the dead zombie on the position a mouse right clicked
for _,Container in ipairs(loot.backpacks) do
local Inv = Container.inventory
if Inv:getType() == "???" then
end
end```
then bring up the context menu
then perform the funtion , end remove the zombie below the set x y z
is this all the loot around the player?
what i would do
theres a zombie corpse autopsy mod
it adds an autopsy context menu to a corpse
you could check that out and see how they did it
^
it should be very similar
sounds like a good idea, any idea on the name of the mod?
searching now
ty
might be the vaccine mod
yeah, that will get all of the loot containers the player has near them.
im confused about the loot.backpacks part
is all the containers: including box, zombie inventories, drawers all saved in
loot.backpack table?
huge thanks good sir
honestly so am i, that code is from AutoMechanics originally, it works for my mod.
I never messed around with it to get specifics on what loot vs loot.backpacks is
im not a sir but ty
i see i see
but yeah i think that's a good place to start
apologies, ma'am
no worries!
oh wow my role just ranked up
i'm cool now
literally just published my mod and i'm already going to start working on v2 because i'm bored
i don't even want to play the game anymore ; just make mods for it
Going to try to continue work on my vscode extension before sleep.
please don't mistake source available for free to use
mods are still the property of their creators
the modding tos even makes sure to reinforce this, though it'd be true either way
And this is why I cannot stress enough the importance of licensing your works.
Let people know what you allow them to do with your work.
you do that by adding This mod's permissions fall under TIS's policy....etc to the mod page right
Non-judgmental guidance on choosing a license for your open source project
re: this
jabs Jab
way i see it, modding and writing code is just knowledge and information. anyone could know HOW to write that code. just because one person wrote it doesnt mean that nobody else is allowed too
I went crazy today.
i usually include a license file in the mod's root directory, as well as a 'go read the license file' notice in each file
its okay I just decided to open the attack.class today and my brain just went...
No.. you don't understand..
I went.. crazy.
think lost time counts under that
long as you arent writing methods called like setIsEnabled()
Take a lap.
oh please tell me you didnt join the dark side
still trying to figure out how to add the blood overlay on cars..
in the game file they used Damage1Overlay but that doesn't work for me for some reason. any one familiar with this?
Yuup. I'm in the stage where I get to show off my work the most.
Auto-complete suggestions.
well till ya get that going in IJ wont help me
I just dont like it. its right behind VS2019
God.. Screw Visual Studio though.
I have to use VS for work.
VSCode is my escape from that.
if VS would just straight up compile C out of the box I'd have less complaints
And that's why I don't C.
C and ASM for life
I dunno tho.. people would kill for formatting, auto-completing, and syntax highlighting for ZedScript. =P
make it commandlineable...
See people are asking for this
VSCode.
i think it's great, i just don't want to use two ides for one project (and my projects are usually very light on scripts anyway)
I work on both PipeWrench and ZedScript in VSCode.
I thought about writing a Language Service Protocol package for multiple IDE support buuut
It's haaard
I'd need help.
why Im trying to give you a proper suggestion
I wrote a tokenizer so someone can complete this for me.
wow, is pipewrench and zedscript a plugin for VSCode ?
PipeWrench is actually a node package
ah
I use VSCode mainly so it kind of fancies that environment.
I had to do a fix for someone today with PipeWrench. =(
Pesky replaceAll missing from conventional JavaScript libraries.
if I can get kahlua to compile Im seriously tempted at making a decompile/etc toolset and not hide it behind gradle
I feel like I'm being called out.
Hahahaha
wut?
(Did some private upgrades to Kahlua in the past)
talking about zlib etc the whole source/class/annotation thing
Ah ok.
I upgraded their Reflection API code.
They're using JDK 1.6 API.
Good ole MethodPointer to the rescue..
I havent run into any issues decompiling to 17
yeah, i've never used gradle before and it was a real obstacle in getting that stuff working
its easy to use, problem is what its doing is totally invisible all you seeing is the output/result
and it basically prohibits me from making any source alterations because i don't understand the whole plugin system
I have examples of both for setting up PZ projects in my org's repo.
Gradle GroovyScript & KotlinScript.
And maven too.
now if ya got what it does on github or something so ppl can see and improve it okay fine... sadly atm thats not the case
But I do.. IIRC.
huh wut?
i was trying to rewrite it a little to make it use vsc lua style annotations instead of emmylua back when i was still using vsc but the whole gradle process obfuscated it too much for me
Sorry but some projects are special.. =P
? unless its capsid not gonna help
capsid again..
like I said the library crapper
Party pooper.
I need to write guides though.
People need to know this stuff.
I went through many many hours of suffering to get working some of this stuff.
I even wrote a layered gradle project where some code sits in a private repo while the rest is public.
1 sec
It's so I don't release PZ code. :D
But dw, I'm a old fck too. I played in ASM debuggers as a kid.
That world is crazy.
grrr it removed them again... my IJ I added every single libjar etc from the main game folder as a external library and finally stuff started looking like it knew what to do
what's the difference between defining a recipe and it's results like this
Recipe Open
{
destroy ClovePack,
Result:CloveCigarettes=20,
Time: 10.0,
}```
vs setting an oncreate function that adds items like this
```lua
function Recipe.OnCreate.OpenBoxOfJars(items, result, player)
player:getInventory():AddItems("Base.JarLid", 6);
end```
or are they just two methods of doing the same thing?
the function is what happens when you complete the recipe (using lua code)
the recipe script is the structure, which can instead do basic preset things like immediately give an item
you could theoretically have a recipe that idk spawns zombies or other wack stuff
you would just need Result:Recipe.OnCreate.OpenClovePack or something similar
time to fix this stupid mod again, hold me back
Question about the official game mechanics: If food gets rotten, hunger value is decreased. Are the nutritional values like calories and stuff also decreased?
a bit difficult to find out quickly because when changing age of food in debug mode, the game behaves a bit strangely. So not sure if the results in debug mode are really showing how it is supposed to be during normal game play.
Got an auto-completion with 2 steps, one being all skills and 2nd being all levels.
Wrote an API function variable that can override normal auto-completion generation for properties.
SkillRequired fit the bill for such an override. =)
Could make it so that Lua methods could pre-fill to make typing / organizing easier.
once again, ty for all your help
i saw your comment on my mod on the workshop, much appreciated โค๏ธ
๐
you're really busting your ass on this and making significant progress each day and ive been here less than a week
great job honestly
Thanks. This is actually a project spanning a month and a half, the former work being all API-driven and debugging.
It's nothing to do with the vscode extension. That research led to this extension.
I plan to write a preprocessor language and a compiler for it to compile to ZedScript.
Before that happens I need to master ZedScript.
This is all the work that proceeded the extension: https://github.com/asledgehammer/ZedScriptParser
By the end of this month, you should be able to do quite a bit with ZedScript in VSCode. =)
it will definitely be making my journey to learning how to mod zomboid / use lua a bit easier
If you want to write mods using TypeScript, it is available as an option.
i don't even know what that is honestly
Then don't bother with it lol.
TypeScript is superset JavaScript.
It's a language designed to compile to JS however it can be compiled to others such as Lua.
interesting
