#mod_development
1 messages · Page 140 of 1
yeah XP logic gets complicated fast - when you start dealing with xpMaps and multipliers
So what this does is let you get lost bonus XP from skill books that you leveled out of being able to use?
there's multiplier for recovered exp and if it's equals to 1 then u can absolutely don't think about skill books. any xp that u will lose due to have no exp mult from skill book will be recovery after read this skill book
yeah, I'm confused already on first step with Write journal action 
I dont remember when I rewrote SRJ to handle bonus XP / TVXP but what it does is use a modData list of XP
the write function just grabs that list and segments it into little bits and manually loops the action to add little by little
speaking of which I plan to remove isReadBook and the craft action I'm using
it only causes issues seemingly lol
ah, btw about tvxp, do u know if there's way to detect source of xp? like to detect if given xp is one from tv
What do you add to your mod pack to add items to zombie loot?
Cause it's not in the distributions.lua right?
TVXP is problematic because of how it's written in - it's behind a few locals which would mean either overwriting the file (breaking alot of compatibility) or doing what I did which is decorate the java function
my mod is a bit of a house of cards cause of it lol
I went all in, and made my entire mod work off a decoration to the exposed addXP
but it doesn't catch calls made in java - so I use an event for those calls
as for the source - I pull the coroutines
same way you can get the file name for errors
Related to this: decided to write a type stub for the extra Kahlua standard lib stuff. May be of interest to y'all @frank lintel @fast galleon
edit: just noticed the return value is missing from random, oops—returns a number. same for bytecodeloader, which returns function|string?
I don't recommend actually using some of these, though (namely: serialize, deserialize, and especially bytecodeloader because package.classpath doesn't exist in PZ)
Didn't bother writing an explanation of what they do bc I am lazy 😇
swear ya watching me I was just going thru the whole zdoc-lua and replacing all the int/integer/long/doubles for number
Oh golly, I just used the alias annotation
its all mixed and matched some were Integer some integer etc...
but it did get rid of a tons of mismatch warnings though so wasnt pointless
I didnt touch any of the fun() args0: <type> though figured they were java calls or something
The overload annotations?
yeah
Gotcha, those are just for overloads of functions
I just changed the normal args and returns
kinda talked to Nolan also slightly asking about any issues with putting that git page up.
Wym?
well (e) mighta had one private already..., I dunno just making sure not step on toes
plus if there was work already done rather go off that also...
Nolan was the last person believe that pushed updates for SS but there was no git page anywhere and SSR way outdated/depreciated
Good that you're making sure they're okay w it
well trying too atleast... why I just did the git forked off SSR only having the lua stuff not the whole mod but if there was an issue easily just make it private for myself. I like the mod main reason trying to work on it
SSR has a discord server
I dont know if there's a github associated with the project
nvm, missed that you've talked to him
yeah there a SSR git got the wiki on it, SS references back to that but the code is old and not up to date. (plus the name change to SS etc so I just forked under the new name.)
wouldn't it be better to use the current code base?
you got a link for the SSR discord Im in the SS one Nolan I think got started
well thats why first thing I did was pushed all the new code :)
yeah Im in there also if its the same one
Did you rip out all the prints he does?
yep... I havent done much seriously with it.just cleaning up somewhat, and it might be the hard way learning the whole PZ/lua IDE enivro, language etc so not a bad thing cuz I been muddling thru it
You should tell him to update his repo - would make collabing easier
I don't know how he's doing it with the guy that kept working on SS
me either why I asked let'm know I forked and updated to current and asked if there any issue with that cuz anyone can look at what Ive done and implement it and also work on it. (that is if nothing new past what was published hasnt been done) one of the reasons not trying anything major just general code cleanup, formatting.... then look all them prints going bybye or toggleable
other major reason would be v42...
but there been a few things I seen and I was just like 'no' changing this...
nolan was the latest addition to the group right? ryuu and others were before that (dunno honestly if anyone working on anything atm)
Nah, other way round
Nolan made SS waaaay back when
it's undergone a few rolls down the hill as major updates went out
at one point he became busy IRL, and Ryuu started releasing updates
I believe he's the one that released an update as it's own mod every few weeks?
in any case, I think Nolan came back and the two agreed to collab
dunno we'll see I guess.
I am trying to make custom item, but I cannot spawn them in or can't find them. I don't see any errors in the F11 window. What can I do to see what's wrong?
function TEST() for playerIndex = 0, getNumActivePlayers()-1 do local player = getSpecificPlayer(playerIndex); local roll = ZombRand(1,100); if roll == 1 then getPlayer():Say("*TEST GOOD*"); else getPlayer():Say("*TEST BAD*"); end end end Events.EveryDays.Add(TEST);
Does this event trigger in MP for every player with different roll?
if its running client side would think so.
thanks, seems logical when I think of it now
question: does IsVehicleIntersecting not work properly if called on the server? like.. are BaseVehicle instances not loaded on the server as cells are loaded, only on clients?
vehicles definitely exist on the server
then why, when called on the load grid square event, does the server seem to never detect vehicles intersecting the square
perhaps it is pre-empting the vehicle loading?
does anyone know how to contact Brita or Arsenal[26]?
I can not leave a comment on the arsenal mod workshop page to inquire about a missing feature that is available in SP but not in the server sandbox settings. I do not have the option to send spent brass directly to a players inventory in MP. the option is not present in the sandbox settings in MP. >_<
yo is it possible to change the zombie models?
You contact Brita through his Patreon
Meaning I have to sub to his patroen in order to ask questions?
.>
I mean..
I love both arsenal and Brita's work, and usualy throw money at mod makers who's content I like....
but....
<.<
eh, who am I kidding, I was guna sub to their patreon the other day anyway.
w<
probably cuz their mods r so high profile
Well, I subbed. 😄
I Updated my Voiced Radio and TVs mod, adding every voice line to KnoxTalk Radio
https://steamcommunity.com/sharedfiles/filedetails/?id=2950750587
I Wish to know which Programs are the ones most players want to be voiced. which ones' you think I should focus on next?
I left a pinned discussion about this on the workshop. If you can, please write your anwsers there too so I have a better idea what most people want.
because i have no clue
I would think it is given there are mods on the workshop that make players and... I do believe zombies into anthro creatures.
the survivor one exists, but not the zombie one
wait it does exist
aw but it needs the fuckin survivor one
u can still do it without it. that mod just doesnt
there's also a mod that makes special zombies
aw 
lol
Actually 
same... burble burble
listening to the spring peepers going nuts in the marshland/creek and thinking on where to go on survivor...
Was just watching a streamer react to the newest Jubilee video.
I cant do them.
I spent like 18 hours coding this weekend.
Im gonna watch someone reacting to something it will be myself at myself later all
and just 🤣 at myself
thats okay you know what I been teeeding thru
Sooo it seems like it wasn't a mod i was looking for.
It was this tool: https://grabofus.github.io/zomboid-chunk-cleaner/
what's it gonna be
vapes
gnome ||//elf//|| bars
i am really struggling making this 3d model with all the curves lol
a²+b²=c²
be careful with that tool!
I tried wiping chunks that were in the black area off the map, whee, in my game, there actually IS map, and instead it wuped the same amount but from the edge of what map it shows DOWN> I wiped the entire base my friends and I had built and ended roling the servr back like, 9 hours. :/
insane mod
yea very nice. very popular
i saw the grid based inventory thing in progress too
gonna be crazy paired with the weapon modifiers mod
any recommendation for lua compilers?
what do you mean? lua isn't a compiled language
you mean like a test compiler?
can I make a recipe use the eat animation?
item GnomeBar
{
DisplayCategory = Junk,
Weight = 0.05,
CantBeConsolided = true,
UseWhileEquipped = FALSE,
Type = Drainable,
DisplayName = Gnome Bar,
Icon = defaultIcon,
StaticModel = defaultIcon,
WorldStaticModel = defaultIcon,
ReplaceOnDeplete = GBEmpty,
UseDelta = 0.25,
}```
I have this item
I want it to be a drainable that can be used that doesn't produce another item
so i made a recipe as so
recipe smoke gnome Bar
{
keep GnomeBar,
Result: GnomeBar,
onCreate: OnEat_Cigarettes,
Time: 50,
RemoveResultItem: true,
}```
i thought setting oncreate might make it use the eat animation but it didn't
i'm kinda lost and don't know if i'm approaching the entire structure correctly, though
I wanted to try to look at how pills function in the game since theyre a drainable that can essentially be eaten, but I cannot find the functions and searches here say theyre in the java code instaed
Ok yeah it shows the discovered areas in yellow so i guess i would only restore those chunks.
test
if ya dont need it in the ide could just use an online one.
AnimNode: eat
Add that to your Recipe. The crafting TimedAction uses this value in the recipe to set the animation. You can use any of the actions that are defined in media/AnimSets/player/actions
well, the map addons I have are off the map in some places, that's where those yelow loaded chunks were, but it derped and droped the whole selection down to where the top of the selection was at the top of the map instead of deleting the yelow outside the map. :/
Somehow I was able to finish the wall and door repairing mod(I hope it's working properly, I'm not so sure lol). Thanks for answering to my questions while i was working on it. https://steamcommunity.com/sharedfiles/filedetails/?id=2953293740
How would I add a custom sound to that? I've tried defining custom eat sound in the item but that doesn't work
it appears there's no sound at all when the recipe is made
was there any road blocks on your vanilla vehicle armor project ? @bronze yoke also was it anonymous that also attempted this
yo i needed this too. nice
Recipes have a Sound parameter
i haven't heard from the modeller in a while so the project is basically dead
"Saw Logs" has:
Sound:Sawing
So something like that
codewise it was in a pretty good state, i never got around to implementing some of the fancy new stuff we came up with but the main stuff was near complete and polished
so then i would just drop a .ogg file in the /sounds folder
and I can just reference that?
i believe so, yes
I noticed the absence of updates too and was sad.
maybe i'll talk to him about releasing what we did have done
i'd still have a lot of work to do before release but it'd be a waste to leave it to rot
is there a way to remove the "all" option
AllowOnlyOne : true,
in the recipe definition did not work
gotcha thnx
was it manual tho
or you had a way to automate it
and did it involve modelling?
i don't really know what you mean by was it manual
but it definitely involved modelling
Hi! I am thinking about working on a mod of mine an adding new sprites. Does anyone knows a web resource for this which maybe a good starting point?
many thanks!
table.insert(VehicleDistributions.GloveBox.items, "1_Dollar_Bill")
table.insert(VehicleDistributions.GloveBox.items, 50)
I want it to come out with 50% probability, I'm not sure if it's true?
it's not exactly 1:1 like that because of the loot rarity sandbox option stuff
you can see how common something will be as a percentage in lootzed
Ohh thanks my friend
like get script manager and iterate the functions onto all the vehicle but like you said before it reads the script ontick so i figured it would be impossible
lmfao
still stuck on this if anyone has any ideas
what does the script for ur item look like rn
item GnomeBar
{
DisplayCategory = Junk,
Weight = 0.05,
CantBeConsolided = true,
UseWhileEquipped = FALSE,
Type = Drainable,
DisplayName = Gnome Bar,
Icon = defaultIcon,
StaticModel = defaultIcon,
WorldStaticModel = defaultIcon,
ReplaceOnDeplete = GBEmpty,
UseDelta = 0.25,
EatType = Cigarettes,
CustomEatSound = ecig,
}
recipe Smoke
{
GnomeBar,
Result : GnomeBar,
Time : 125,
RemoveResultItem : true,
MaxItems : 1,
AnimNode : Eat,
Sound : ecig,
AllowOnlyOne : true,
}
whay does MaxItems do
do u need it if u have allowonlyone?
neither of those parameters do anything
it could still be read
i didnt see maxitems in the script guide
too bad im not on my pc or i'd be skimming through things rn
I think you want to make a context option instead of a recipe.
can i link animNode and custom sound to a lua callback function that a new custom context menu would create?
because I was using it as a recipe so I could use those parameters
You should be able to do all of that in a timed action.
I look at cigarette now and it has CustomContextMenu in script.
not sure I've seen that before
that parameter only works on food items unfortunately
I mean, you could make it food and add poison value.
i want it to be a drainable item so it can't be a food :/
needs to have more than one use
food have more than one use, eat percent
how to make option to hide pants to shoes and on shoes?
I saw that in the eat action, might not be what is used in the script.
Whoever you are... I just wanna talk...
i think we should blame steam too because it is not possible to untoggle given ratings
so it rises the chance for that to happen
i notice that unfortunally is common 
Yeah, I don't have real hard feelings about it
Only one action for you to take. Delete and republish.
lol
Also if it doesn't break 5% I wouldn't worry
I'm really not. Back in the day when I had no star rating I was a little more miffed
Now it's just funny that only one person disliked it enough to give it a negative rating
I've had people curse me out and swear this mod off
Still at 2%
The loudest group is always the minority
I usually don't check these stats -- was there another player bump?
The sub counts are super different within a couple months
Hello! I'd like to take a look at making a small mod with some retextured (though separate) items. The retexturing part I can figure out, but I'm a little more confused about how to implement the mod. Would it be possible to get a little help in that regard?
i'm so confused
why is it putting my arms up instead of the eat animation
function hitVape:start() -- Trigger when the action start
print("Action start");
self.character:getEmitter():playSound("ecig")
self:setActionAnim("CharacterActionAnims.Eat")
end```
Hm…maybe check see if the code is checking a different line instead or maybe check see if a conflicting mod has the same sort of code and it’s causing a bit of a bug
no other mods active
That’s strange
so no animations seem to be working actually
i tried to replace it with the dig animation and that doesn't work either
i'm lost
I'm trying to somewhat replicate the relieve yourself mechanic this mod has but for some reason can't seem to get it to work can someone help me out? https://steamcommunity.com/sharedfiles/filedetails/?id=2881673254
{
Tissue/ToiletPaper/PaperNapkins,
HottieZ/OppaiZ/177013,
MapleSyrup/Pie/Toothpaste/Soap/Butter/Sausage/Grapefruit/Banana/Eggplant/Zucchini/MayonnaiseFull,
Result:Tissue,
Time:10,
IsHidden:true,
OnCreate:Recipe.OnCreate.FapTime,
AnimNode:BuildLow,
NeedToBeLearn:false,
CanBeDoneFromFloor:true,
Sound:PageFlipMagazine,
Prop1:Source=1,
Prop2:Source=2,
}
recipe Rub one out
{
Socks_Long,
HottieZ/OppaiZ/177013,
MapleSyrup/Pie/Toothpaste/Soap/Butter/Sausage/Grapefruit/Banana/Eggplant/Zucchini/MayonnaiseFull,
Result:Socks_Long,
Time:10,
IsHidden:true,
OnCreate:Recipe.OnCreate.FapTime,
AnimNode:BuildLow,
NeedToBeLearn:false,
CanBeDoneFromFloor:true,
Sound:PageFlipMagazine,
Prop1:Source=1,
Prop2:Source=2,
}```
don't judge me

every day I stray further from gods light
I forgot this mod existed
But if you want help try looking for the animations function first
the what?
The code piece that the animation uses to activate
if you mean this part OnCreate:Recipe.OnCreate.FapTime, I have that implemented pretty much exactly how their mod has it as well
Maybe there is another piece you’re missing
local stats = player:getStats();
local bodyDamage = player:getBodyDamage();
stats:setStress(stats:getStress() - 0.5);
if stats:getStress() < 0 then
stats:setStress(0);
end
stats:setFatigue(stats:getFatigue() + 0.33);
if stats:getFatigue() > 100 then
stats:setFatigue(100);
end
bodyDamage:setBoredomLevel(0);
stats:setThirst(stats:getThirst() + 0.15);
if stats:getThirst() > 100 then
stats:setThirst(100);
end
stats:setHunger(stats:getHunger() + 0.09);
if stats:getHunger() > 100 then
stats:setHunger(100);
end
bodyDamage:setUnhappynessLevel(bodyDamage:getUnhappynessLevel() - 75);
if bodyDamage:getUnhappynessLevel() < 0 then
bodyDamage:setUnhappynessLevel(0);
end
stats:setEndurance(stats:getEndurance() - 0.25);
if stats:getEndurance() < 0 then
stats:setEndurance(0);
end
player:getXp():AddXP(Perks.Strength, 100);
player:getXp():AddXP(Perks.Fitness, 100);
end```
Hm
maybe but the mod doesn't really have a lot to it and It looks like I took just about everything I need
Maybe the entire mod is needed for it to function properly
I'm not even getting the cotext menu actuon for it with all the recipe options in my inventory
Probably has a function that relies on something in the mod
Try looking into that more
Seems like you’re missing pieces there
I am. And I don't think anything else from the mod is needed. From what I can tell it's a bog standard crafting recipe that uses that oncreate for all the stat changes
eveything else is just for their book added
and distribution
this is all there is for that mods lua minus distribution
and this is their recipies recipe
And you’re saying the context menu and the crafting menu isn’t showing?
Do you require recipecode?
I have it hidden in the crafting menu so it wouldn't show.
the crafting menu itself does
but the context menu option when right clicking isn't giving the option
i'm not sure what this means
I mean do you have require „recipecode“ in your file?
scrolls up and reads code
This is an important QoL feature
And that gif is too visually loud
Idk, how would I check?
We have People making this and all I want is a mod that lets you fix power stations to restore power to towns
Restorable powergrid
Something for late game really
Just write the line in your file
That's cool and all but lets be honest more people would be out their polishing their pole with mayo to battle crippling depression than doing stuff like that
or is that just me
And the tools for modding don’t work on there
When was this made?!
YES
Long time ago. One of my first commission projects
Back when i was still solo
I suggested this!
I’ve been looking for forever for this and even planned on making my own
You sir or ma’am
its because CharacterActionAnims.Eat was in quotations
That will up my TLOU save so much
Have my respect
that's an hour down the drain
could you give us some insite on how this will work?
like is it just random per house or do corpses in houses cause it like in the game?
Zombies contribute to contaminating a room, skeletons contribute to holding the current contamination level
Buildings slowly diffuse the contamination throughout themselves
Only loaded buildings are updated
Updates are time weighted based on last update time
Oops
lol
Gladly if I get a good pc to help mod stuff in
Contamination slowly goes down when there is nothing in a room contaminating it
very cool. again this is going to level up my TLOU challenge so much. Glad to see someone finally made it. Now we just need proper TLOU infected. I'm using personalized zombies for that but they lack the visual flair.
Oh, zombie corpses also cause contamination as well
ello guys~! could someone help me with OOP problem Im having??
Dude I’m just happy I can finally fix the fucking power grid now
I literally have something to do late game besides just burn Louisville to the ground
Show us
function MyUI:create()
local btnWid = 175
local btnHgt = FONT_HGT_SMALL + 2 * 4
local padBottom = 10
local texture = {}
self.image = ISImage:new(self:getWidth()*0.001, self:getHeight()*0.001, 0, 0, getTexture("media/ui/mag/pic1.png"));
-- self.image.scaledWidth = self:getWidth()
--self.image.scaledHeight = self:getHeight()
self:addChild(self.image);
self.cancel = ISButton:new(self:getWidth() - btnWid + 55 , self:getHeight() - padBottom - btnHgt, btnWid*0.5, btnHgt, "cancel", self, MyUI.onOptionMouseDown);
self.cancel.internal = "cancel";
self.cancel:initialise();
self.cancel:instantiate();
self.cancel.borderColor = self.buttonBorderColor;
self:addChild(self.cancel);
end```
i made this to run when a player open a magazine
Ahhh UI im out
XD
Not my forte
im trying to make that "getTexture" to varie
depend on the item
a player open
what will be the best way to do that..
btw do you have it so some houses can spawn already contaminated and full of corpses? like a random event
The base game does
how do I make a lua function reduce the number of uses an item has?
I'm making a custom timed action.
I assume it would be under
function hitVape:perform() -- Trigger when the action is complete
--print("Action perform");
ISBaseTimedAction.perform(self);
end```
I just don't know the code to actually reduce the number of uses
The first update of the house will treat that as several days and it will be contaminated as a result
self.item something something
Like useddelta?
gotcha
isn't that just the number for how much it changes per use?
You could on the update()
You'll likely want to pass the item the player is reading to your create function
Gradually reduce the thing and have a check if its empty
That way you can use it to determine what texture you want.
i don't know how to reduce it in general is the issue
function MyUI:create(result)?
i'm still pretty new to this
assuming result is the item, yea
it just inherites it?
lua has no restrictions on parameters
function OpenmagZ_OnCreate(items, result, player)
local myUI = MyUI:new()
myUI:initialise();
myUI:addToUIManager();
end```
so parameter of "result" from that function
can b called
right away at
function MyUI:create(result)?
is it cuz they are in the same lua file?
-- Fill entirely the blowtorch with the remaining propane
function Recipe.OnCreate.RefillBlowTorch(items, result, player)
local previousBT = nil;
local propaneTank = nil;
for i=0, items:size()-1 do
if items:get(i):getType() == "BlowTorch" then
previousBT = items:get(i);
elseif items:get(i):getType() == "PropaneTank" then
propaneTank = items:get(i);
end
end
result:setUsedDelta(previousBT:getUsedDelta() + result:getUseDelta() * 30);
while result:getUsedDelta() < 1 and propaneTank:getUsedDelta() > 0 do
result:setUsedDelta(result:getUsedDelta() + result:getUseDelta() * 10);
propaneTank:Use();
end
if result:getUsedDelta() > 1 then
result:setUsedDelta(1);
end
end
heres a vanilla reference
function OpenmagZ_OnCreate(items, result, player)
local myUI = MyUI:new()
myUI:initialise();
myUI:create(result);
myUI:addToUIManager();
end
hmm
so myUI:create(result) don't need to go under myUI:initialise(() ?
but even if I do create(result)
ill have multiple lines of ```lua
function MyUI:create()
local btnWid = 175
local btnHgt = FONT_HGT_SMALL + 2 * 4
local padBottom = 10
local texture = {}
self.image = ISImage:new(self:getWidth()*0.001, self:getHeight()*0.001, 0, 0, getTexture("media/ui/mag/pic1.png"));
-- self.image.scaledWidth = self:getWidth()
--self.image.scaledHeight = self:getHeight()
self:addChild(self.image);
self.cancel = ISButton:new(self:getWidth() - btnWid + 55 , self:getHeight() - padBottom - btnHgt, btnWid*0.5, btnHgt, "cancel", self, MyUI.onOptionMouseDown);
self.cancel.internal = "cancel";
self.cancel:initialise();
self.cancel:instantiate();
self.cancel.borderColor = self.buttonBorderColor;
self:addChild(self.cancel);
end```
for each texture / item i want to show?
Figured out my issue. Pretty stupid of my not to realize the problem sooner
I'm not proud of the abomination I have created
I plan on it
the only issue is it doesn't seem to drain contents of stuff like the mayo
not sure how to do that
so I guess you put back in the jar when you are done

also I actually called it crunchy long sock
does any one know what type if data is returned in function OpenmagZ_OnCreate(items, result, player)
"result"
is it a string of recipe result item? or display name? item name"""
I think its the item which is the result of your recipe so maybe IsoItem if it exists?
Maybe typeof(result)?
so item name right? not displayname
yea, ill try typeof(result). sigh...coding is so hard...
recipe result on create should be an InventoryItem
so for instance
Base.Apple
that's item name
Apple is displayname
then result will be... which one?
or neither?
It will be an instance of InventoryItem as its type
You could then access its names through :getType and :getDisplayName
ah so neither.. that will b like one of those lua table code
yea, getDisplayName will b a way to do it
thanks
InventoryItem is a java class, userdata in Lua.
display name should change with language setting?
maybe you want getType
i see
haven't tried using getType
so ill see how it works
is return value of getType be diff. for each item a player has?
or will it work like.. kitchen knife, butter knife, and hunting knife all are type knife
It returns the items name as is defined in its .txt file
So if you have Base.Knife it will return Knife
Result is the resulting iventoryItem yes
Items should also be an array of inventoryItems if I'm not mistaken
Some of the Lua functions tied to recipes use the Item (script object) in reference to items.
Also get type only returns the item type -- which is fine but you may want to take module.type into consideration.
Depending on what you need this for.
player:playSound(sound); only plays sounds for the player an others can't hear it, right? But how can I make so sounds play for everyone?
You need to get the emitter
I think its through player:getEmitter() i don remember exactly
But you need the emitter
thanks, I'll look into it
i see i see thank you for clearing it out 🙂
yea i tried this on my mod as well, it is only client side.
trying to open up a ui showing pictures, so each item when they are created, it will open up a window that shows a picture
so ill need to use maybe display name of the item
Ah, yeah displayname is what you'd need
Use rather getType or getFullType
Display names could be changed by players or by translation
I assumed you wanted to display the items name
If you need to get the items texture or a texture consistent to the type then yes- module type or type is better.
Good afternoon.
hey, isn't it morning there?
get better 👍
what i wanted to do is
- make a recipe that allow player to pull out a page from a magazine (easily done)
- Each page that is pulled out has it's own UI when opened (oncreate recipe) it shows up a UI with a .png picture , hence "Texture"
- since making "if"statements for all pages would make the code redundant, i wanted to make a function that would check the name of the "page" and designate "texture" that matches the "page" item which will show up the UI picture I set.
but since i suck at oop hierarchy my head is getting dizzy and starting to feel sad XD
You could put them in a lua key value table and then just call the texture you need for each page
then in recipe i made "recipe rip a page out"
which do a zombierand
and additem() to the player inventory
Tbf it could be even easier if you name the textures something like page1, page2 etc
a random page
Just get the pages type and parse it into the ISImage:new
hmm?
function MyUI:create(result)
local btnWid = 175
local btnHgt = FONT_HGT_SMALL + 2 * 4
local padBottom = 10
local texture = {}
self.image = ISImage:new(self:getWidth()*0.001, self:getHeight()*0.001, 0, 0, getTexture("media/ui/mag/pic1.png"));
-- self.image.scaledWidth = self:getWidth()
--self.image.scaledHeight = self:getHeight()
self:addChild(self.image);
self.cancel = ISButton:new(self:getWidth() - btnWid + 55 , self:getHeight() - padBottom - btnHgt, btnWid*0.5, btnHgt, "cancel", self, MyUI.onOptionMouseDown);
self.cancel.internal = "cancel";
self.cancel:initialise();
self.cancel:instantiate();
self.cancel.borderColor = self.buttonBorderColor;
self:addChild(self.cancel);
end```
self.image = ISImage:new(self:getWidth()*0.001, self:getHeight()*0.001, 0, 0, getTexture("media/ui/mag/pic1.png"));
is this what u mean?
i have pic1, pic2, pic3 etc
saved in a folder
just need to find a simple way to replace that pic1.png pic2.png
depending on the page item a player has
You can concat a random number to a string of the textures are named accordingly
"page" .. n .. ".png"
right
So you would call item:getType() + „.png“
Obviously you still need the path but you just add that before the call
are u guys geniuses?
Too much free time and too socially inept
i wonder if something like self.image = ISImage:new(self:getWidth()0.001, self:getHeight()0.001, 0, 0, getTexture(""media/ui/mag/" ... n ... ".png""));
would work..
It would, I don't think you need the items type unless the page is specific
and "n" being item name
Just put .. instead of …
yea haha
I was thinking n was a random number 😅, but yes you can do it that way
You can concat both
As long as the texture is found
true true
You can also include a default texture if the other isn't found
Also I don't know if this is possible but you should try to store the textures when able
In a keyed table
Are there actual lists in lua? Or is it all tables?
i think they are all tables
ok now.. check this out
function OpenmagZ_OnCreate(items, result, player)
local myUI = MyUI:new()
myUI:initialise();
myUI:addToUIManager();
MyUI:create(result);
end```
function MyUI:create(result)
local btnWid = 175
local btnHgt = FONT_HGT_SMALL + 2 * 4
local padBottom = 10
local texture = result
self.image = ISImage:new(self:getWidth()*0.001, self:getHeight()*0.001, 0, 0, getTexture(""media/ui/mag/"..texture..".png""));
-- self.image.scaledWidth = self:getWidth()
--self.image.scaledHeight = self:getHeight()
self:addChild(self.image);```
Also maybe result:getType()?
But you can ascribe other stuff as keys even other tables
ill have to find out ... depends on the return value of getType()
You can print the texture to get the idea
good idea
notepad ++
self.image = ISImage:new(self:getWidth()*0.001, self:getHeight()*0.001, 0, 0, getTexture(""media/ui/mag/"..texture..".png""));
i don't think ) is needed
don't u guys agree?
too many quotations?
I mean for modeling
ah
I want to put in more than just code I need models
Cause I wanna make like an entire hydro plant
You can use ' for strings in Lua too.
well.. problem ...
function MyUI:create(result)
the "result" is returning nil
so.. caused error in Texture variable
hmmm, can you not DoParam on multiple fields for an item?
adjustments["Base.Honey"] = "Calories = 220"
adjustments["Base.Honey"] = "Carbohydrates = 63"```
only the Carbohydrates line is being applied
oh, I'm stupid, nvm
adjustments["Base.Honey"] = { "HungerChange = -18","Calories = 220","Carbohydrates = 63" }
Is your recipe with remove result = true?
Might spent an hour or so on writing a third attempt on a solid formatter for ZedScript.
what is the time in recipe measured in? i'm trying to match it to a 10 second sound
im gonna make a themepark resort thing
I wonder how big of a mod it would be to fully implement rollercoasters in PZ.
It'd be fun to watch people play RCT in PZ.
Would be funnier to override zed AI and turn them into park guests.
Hey everyone, Im working on my voiced radio and tvs mod, and I want some guidance. Im not from the US, and not know many radio hosts. Im trying to voice the lines of LBMW host Jackie Jaye. Does anybody know of a famous, easily recognizible female radio host to use for voice cloning in ElevenLabs ? I'd like to use real people for certain repeat characters.
It doesn't necesarilly have to be a radio host, but try to keep it in that field of expertise (reporter, show host, etc.), and easily recognizable.
How do edit a bags capacity? I like the look of the duffel bag more than the military bag and would like to swap em.
This is still considered as n api so ill add it to mod tools thread
But i dunno what it does and how to use it
Anyone familiar?
https://steamcommunity.com/sharedfiles/filedetails/?id=2951816996
All the bags future instance use
doparam
For just one instance i think you can use
setCapacity()
iirc
Yes you can even inject custom mod data
Should iterate if you plan to do alot of it
Any chance you can explain how like I’m a 5 year old?
I think ticks
But im not sure
I cant explain this to a 5 yr old tho.
But there are guides posted on the threads ill help u look for it
Thanks! I feel like I’ve looked all over and couldn’t find anything. So I came to the discord in hopes to figure it out.
Basically do param rewrites the item script
So every other item that will spawn ingame will inherit the changes you made
just make a new bag
Lol or thaat
I would if I knew how to do any of that :'(
Can you change the number of points that a skill gives or costs in something like the INI or config?
I dont think so. I have to do it using lua
Is it as simple as changing a single value somewhere?
Can you clarify
What points and whats skill? Perks?
There arr no skills in the game
We have trait perks profession
And whats points
Experience? Level?
Or the one u use for adding traits
That one i think u can modify
Chose to write a shallow, decoupled recursive de-serializer solution for my formatter alongside my deep de-serializer API.

Probably somewhat like Fenris_Wolf's Python 3.0 one. Not referencing it.
My tokenizer preserves comments and empty lines.
Going to also write configurable settings for the formatter, such as inline vs next-line brackets.
module foo {
}
vs
module foo
{
}
Also trying to keep the API open to selection formatting. Not sure how to do that yet. =(
is there a good tutorial anywhere about making mods for b41? i want to ATTEMPT to make an npc mod
ooooooooo
Found another logic bug in my tokenizer.
I add inline comments as a token prior to the bit that comes before it. >_>
See pins and threads in this channel
ah thanks
i did a new analysis and 2 new sheet from the data i gathered this month
here the results
per person top 50:
"how many
participations
in mods 5-stars" modder
39 KI5
26 iBrRus
24 HelloWorld
20 MrDanny
20 soulfilcher
18 star
17 fhqwhgads
17 planetalgol
15 cyt
14 NoctisFalco
14 shark
14 布偶旧猫
13 Chuckleberry Finn
13 nolanritchie
13 Tchernobill
12 Authentic Peach
12 Blackbeard
12 Oh God Spiders No
11 Alec
11 Erin Azakaela Redfire
10 Eggon
10 Monkey
9 eris
9 Johnny Dollar
9 Orc
9 Woldren
8 Aiteron
8 Yeah
7 AuD
7 BitBraven
7 Champygnakx
7 djvirus
7 Gabester
7 Notloc
7 PePePePePeil
7 Skizot
6 (PlentyT)
6 co`
6 Fedia
6 KONIJIMA
6 Madman_Andre (GNU Rick May)
6 Mx
6 Myloo
6 PseudonymousEd
6 RH4DB4
6 spoon
6 Troy Mc'Clure
5 [TECT$ECore] Olipro
5 Afterworlds
big view:
aparisons amount of modders
1 482
2 117
3 36
4 26
5 22
6 11
7 8
9 4
12 3
13 3
14 3
8 2
10 2
11 2
17 2
20 2
15 1
18 1
24 1
26 1
39 1
As always, my "1 hour session" turns into a 5 hour session.
Also, big post is big.
Upload it as a file. You can convert your copied text to a file somewhere near the text input.
aah nice! the expand option, well noticed, i forget about this discord feature
is that content text input searchable/indexed by discord search?
Not sure.
yea... i did actually. That could b the reason
@sour island I also found a bug in your shops and traders mod by the way. Wrote a comment explaining the situation for you to reproduce
That's on the top of my list - I'm working out an outline for an update to the mod
gotcha, ill try it in the afternoon and se if it works
cool cool 🙂 would luv to help if i was any good at coding 😦
luv the shop and traders mod so much
has a huge potential
You can help by telling me how it can be easier to use 😅
Being I wrote it, it all makes sense to me
If you want to put it here - it will be easier for me to look over
easier to use? i think the mod is pretty much straight forward. didn't have trouble finding out how to work with it
sure, ill just write what I wrote on the comment in the webpage as well then 🙂 will that b ok?
oh dang!
congrats!
oh dang
does it also heard from other players??
i tried to add a sound that would also b heard to other players
but failed XD
ah i see i see
you're welcome to try it when it comes out if you'd like
i would but i don't have ppl to play multi with lol
haah
i think it should work tho?
i would gladly try it
function hitVape:start() -- Trigger when the action start
--print("Action start");
--self.character:getEmitter():playSound(self.smokeSound)
if self.smokeSound ~= '' then
self.soundChannel = self.character:getEmitter():playSound(self.smokeSound);
addSound(self.character, self.character:getX(), self.character:getY(), self.character:getZ(), 7, 1)
end
self:setAnimVariable("FoodType", "Cigarettes")
self:setActionAnim(CharacterActionAnims.Eat)
end```
self.character:getY(), self.character:getZ(), 7, 1)
yea i think using emitter
this sets a sound radius
it suppose to work
so i would assume others would hear that
yea
electronic smoke?
yess
nice
I feel so close to getting my formatter working on a basic capacity but..
2 hours of wrestling with an unknown artifact in a couple spots prevented me from getting it done tonight.
This is what it spits out as of now...
there can be only one...
Going to take a look at possibly building a tokenizer for the formatter specifically..
... Another day.
Are you planning on implementing every kind of nic stick out there? Lol
lives up to his name 
Nah
Just these
Now I'm trying to figure out how to assign random names and textures when they are spawned in
@tepid edge
Wow congrats on your new found skill
Was it you who was trying to figure out the item consumption thing? How did that go for you?
The emitter will be heard by others
Addsound is just for zed
Removing that from your code will produce sound but wont attract zed
Do the reverse then you get the reverse effect
@/maemento mori congrats on front page!
is there a function that tells you when a player shoots at/hits a window? or one that defines a window as shootable/breakable?
really funny. there are quite a few mods related to food preservation which have been published during the last week. seems to be the case that some modders had similar ideas independent of each other.
will the render depth factor allow for vehicles you can walk inside of?
there is a trend for that, something influences users, they influence modders and then suddenly everybody is working on the same mod separately
or it's like mobile games, somebody makes one and then there are a dozen clones
ya... I think that food preservation and more interesting long term survival is something which is really necessary for the game. In current vanilla, you could simply try to settle somewhere in wilderness and then spam cabbages via farming. Would be nice to have different ways for long-term survival and ideally, without being able to farm during winter. So it's a good think that modders start addressing this issue imo.
Do you have the item already?
I think people have been mentioning the ISRemoveItemTool removeItem
you could check that function
Good morning.
Mornin' Jab
btw cant you just keep food fresh/frozen by using a gen and a fridge/freezer?
Do media lines only apply effects once? Is there an easy way to have lines that coold be used in a loop for small buffs?
more data sharing
PZ getting bigger and bigger waves of growth since 2021 [B41 multiplayer release]
Just wait for this weekend, a series will begin with more than 50 Spanish streamers that will last a week and will be permadeath
Invest heavily in Spanish mod translations
Just invest on finishing the grid inventory system, w are ultrahyped for that 🧟
Heheh..
Could make a tool that scrapes public portals for popular translators to have "fill-in" translations.
It is what it is, trust me you get what you give.... yeah. you gotta come to my side and see how we live.. yeah.
I experimented with using Google's API to translate to set locales for players on a server.. I can't begin to say how awesome it was to watch people who could never have a conversation in their languages play full on sessions and join factions because of translator support.
I still think that was one of my top-three experiments in PZ.
So cool to see people being a community because of tools and this includes translators for mods.
thats okay I translated all the chinese --comments for the EmmyLua
eg. -- 按符号分割字符串 -- Split strings by symbol
Oh nice.
not that I even got a clue how to use EmmyLua.lua ...
How useful would it be to have a machine-translator tool for mods without official translation support? The tool would generate translated dialog files for the mod.
cuz I dont have a lua compiler....
https://hastebin.com/share/amejocezaj.lua I wish someone ran the emmylua wiki thru a chinese to english...
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
How is it possible to access all body parts please?
bodyDamage:getBodyPart()
I would like to have this condition check for any damage on any body part (no damage from hauling too much items for example)
heh that was odd that first line was disappearing on me untill I " "'d it then it showed up but apparently was there the whole time
How is it possible to get the body part that is damaged between all body parts?
OMG I hadnt noticed!! So exciting!!!
thank you for the heads up
yes that was me. I finally figured it out haha
just had to keep messing with it until I got it right
now when its depleted of uses, it turns into an empty gnome bar
which i plan to also make able to be used but you will audibly cough and attract zombies because itts dry lol
what mod/
?
ah that looks cool
modding a gun is scary
i wouldn't even know what gun to add since brita has like everything at this point
some historical guns
Realistic functional crossbows and bows would be dope
Why does this not work through OnCreate on recipes :
player:getFreeRecipes():add("Craft Something");
you want to add to known recipes probably
Works!
Bleh. I want to make other stuff but I need to finish this mod first
I'm not looking forward to making textures for all these different flavors lol
hey guys! any tricks to start modding? software, guides etc?
Biggest tip is reading Lua documentation then picking apart other mods' code
That's how I learned
Or just looking at how the base game functions work in general
All depends on what you wanna make really
Blender for modeling, vscode for coding
pzwiki is a good start, get an idea of the most common things
Also depends on any prior experience messing with games, or programming
It may be overkill for modding but I use intelliJ + the library tool PZ-Libraries
@sour island
do you think this is realistic?
I would have to check the system again -- the radio scripts and guiid system implied certain lines give the XP
Listened to lines are stored on the player and prevent XP gains from what I know -- idk about mood buffs
i have coding experience but the lua documentation is rather lackluster.
https://projectzomboid.com/modding/zombie/ui/TextManager.html#DrawString(zombie.ui.UIFont,double,double,java.lang.String,double,double,double,double)
for example, unless i am blind, I cant seem to find return values or descriptions of what does doubles are. I really hope that i am blind
declaration: package: zombie.ui, class: TextManager
I thought you might know. If there's a chance I will be looking myself anyway so no need to look if you don't need.
oh let me rephrase. i know what doubles are, i just dont know what these doubles are since i cant find it anywhere.
you would need to go find where that function is called and handled in the source files
and find out how it works and what those variables are doing
gross lol
The javaDoc has been getting updated
documentation is a blessing i guess not a given
It could tell you more there
X Y R G B A?
Pixel X/Y, rgba for color
Those are variable names
that makes a lot of sense. they could have added a single line saying that though no?
that's pz java code, not Lua related
I mean... The "perfect" code is legible without documentation
And I'd say xy rgba is pretty self explanatory
The java doc does include more break down though - is that where your screenshot is from?
now that i know it makes perfect sense lol but first time looker? I would not say that it should click immediately
thank you as well regardless of it being ez lol
time to learn lua as well i guess. should be simple ish to pick up, thank you 🙂
Also if you want to try out stuff: https://www.lua.org/demo.html
Once you get the hang of tables it's pretty easy
Then the challenge is thinking about how to leverage your Lua into the game
sounds good. i think for now i am just gonna make a simple thing and try to show a text in a corner or something. then make it floaty and etc
This tutorial video will show you how to make a simple drink in Project Zomboid. I will go into the steps involved from start to finish. Read more below.
0:00 intro
1:08 Start
1:44 Searching for images to use in game
2:30 Searching for the Sound Effect
3:06 Creating mod file directory
3:54 Creating mod.info
4:34 Creating a poster
7:14 Adding ne...
Also this
It's a little outdated and a few things are different but this is what I used when I very first started to understand file structure and such
yep ^ I used that to "edit" a mod i wanted to play with. So at least I can publish and etc
how long have you been at this?
About a week
Made two mods so far
Third is almost finished
It's not that bad once you get a little bit of a feel for things
agreed
Lack of motivation is gonna be the killer here for me, code at work and at home. I look at it enough.
With the current of things if it took you a week, it will take me a month
I saw your vape mod already and looks cool, does it replace smokes or just for fun?
Nope it's an entirely new item with a custom timed action so it doesn't touch vanilla stuff at all
when things start to finally "click", that's a great feeling
Feel that on the motivation
You said you have coding experience so I doubt it
I have some varied experience but it's mostly in css/html/js
So this was all a bit new to me
I do it for 8 hours 5 days a week 🥹 (most of that time is meeting tbh)
i looked at lua in college but never actually did anything with it
you will find one, it took me a while. if you are making mods this quickly you seem like you know what you are doing 😄
there's no problem with modding for yourself
Making useless mod is my goal right now. My lunch break has changed to looking at lua for PZ now
You don't have to justify it to anyone, even if it's useless like making the rubber ducks make a squeak noise or something
that's in the works
so you won't have to wait for too long haha
Me too. I'm decent at photoshop and stuff but completely new to modeling. Making the models is easier than fucking with textures
I make some models for 3d printing. I am gonna make models with no textures, black and white style. i dont think that is gonna come in handy anytime soon if i can display a simple test in game yet xD
i have two choices on how i want to approach this item im making i could use some opinions
-
Have one item which when spawned, gets assigned a random display name (the vape flavor) and based on that display name, gets assigned the relevant texture file
-
create individual items for each flavor
is 1 even possible
require 'Items/SuburbsDistributions'
require 'Items/Distributions'
require "Vehicles/VehicleDistributions"
table.insert(SuburbsDistributions.cashregister.items, "1_Dollar_Bill")
table.insert(SuburbsDistributions.cashregister.items, 50)
table.insert(SuburbsDistributions.cashregister.items, "2_Dollar_Bill")
table.insert(SuburbsDistributions.cashregister.items, 25)
table.insert(SuburbsDistributions.cashregister.items, "5_Dollar_Bill")
table.insert(SuburbsDistributions.cashregister.items, 12.5)
table.insert(SuburbsDistributions.cashregister.items, "10_Dollar_Bill")
table.insert(SuburbsDistributions.cashregister.items, 6.25)
table.insert(SuburbsDistributions.cashregister.items, "20_Dollar_Bill")
table.insert(SuburbsDistributions.cashregister.items, 3.12)
table.insert(SuburbsDistributions.cashregister.items, "50_Dollar_Bill")
table.insert(SuburbsDistributions.cashregister.items, 1.56)
table.insert(SuburbsDistributions.cashregister.items, "100_Dollar_Bill")
table.insert(SuburbsDistributions.cashregister.items, 0.78)
table.insert(SuburbsDistributions.Bag_MoneyBag.items, "1_Dollar_Bill")
table.insert(SuburbsDistributions.Bag_MoneyBag.items, 50)
table.insert(SuburbsDistributions.Bag_MoneyBag.items, "2_Dollar_Bill")
table.insert(SuburbsDistributions.Bag_MoneyBag.items, 25)
table.insert(SuburbsDistributions.Bag_MoneyBag.items, "5_Dollar_Bill")
table.insert(SuburbsDistributions.Bag_MoneyBag.items, 12.5)
table.insert(SuburbsDistributions.Bag_MoneyBag.items, "10_Dollar_Bill")
table.insert(SuburbsDistributions.Bag_MoneyBag.items, 6.25)
table.insert(SuburbsDistributions.Bag_MoneyBag.items, "20_Dollar_Bill")
table.insert(SuburbsDistributions.Bag_MoneyBag.items, 3.12)
table.insert(SuburbsDistributions.Bag_MoneyBag.items, "50_Dollar_Bill")
table.insert(SuburbsDistributions.Bag_MoneyBag.items, 1.56)
table.insert(SuburbsDistributions.Bag_MoneyBag.items, "100_Dollar_Bill")
table.insert(SuburbsDistributions.Bag_MoneyBag.items, 0.78)
table.insert(VehicleDistributions.GloveBox.items, "1_Dollar_Bill")
table.insert(VehicleDistributions.GloveBox.items, 50)
table.insert(VehicleDistributions.GloveBox.items, "2_Dollar_Bill")
table.insert(VehicleDistributions.GloveBox.items, 25)
table.insert(VehicleDistributions.GloveBox.items, "5_Dollar_Bill")
table.insert(VehicleDistributions.GloveBox.items, 12.5)
table.insert(VehicleDistributions.GloveBox.items, "10_Dollar_Bill")
table.insert(VehicleDistributions.GloveBox.items, 6.25)
table.insert(VehicleDistributions.GloveBox.items, "20_Dollar_Bill")
table.insert(VehicleDistributions.GloveBox.items, 3.12)
table.insert(VehicleDistributions.GloveBox.items, "50_Dollar_Bill")
table.insert(VehicleDistributions.GloveBox.items, 1.56)
table.insert(VehicleDistributions.GloveBox.items, "100_Dollar_Bill")
table.insert(VehicleDistributions.GloveBox.items, 0.78)
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "1_Dollar_Bill")
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 50)
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "2_Dollar_Bill")
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 25)
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "5_Dollar_Bill")
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 12.5)
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "10_Dollar_Bill")
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 6.25)
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "20_Dollar_Bill")
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 3.12)
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "50_Dollar_Bill")
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 1.56)
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "100_Dollar_Bill")
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.78)
What is problem???
lol
option 1 is more dynamic and allows you to add more future textures without changing the code>
Depending on how you implement option two, if you do add more textures or even models, you might have to do more (still minimal) code changes.
Option 1 is fancier and should be smaller package since you are re-using the same model or re-skinning no?
I vote for option 1 even though I have no idea if it is possible ( I don't see why not)
why did you laugh I just started and I'm trying to figure it out.
but what is the problem, have you tried turning it on and off again
For future reference, it would be better to put those values in a table and loop over the table to do those insert calls
"better" meaning more readable in this case
do you know where the logs are?
Yep no error
I'm not at the computer right now, I'll check again tomorrow. I'm trying to set it to console.
yes, but I don't really understand.
Is there a site I can look at?
for loot I generally share this
https://theindiestone.com/forums/index.php?/topic/38165-quick-guide-how-to-mod-the-loot-distribution-system-distributionslua-proceduraldistributionslua/&do=findComment&comment=365101
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...
for scripts
https://pzwiki.net/wiki/Scripts_guide
how about a guide or code on how they are loaded and read
warning, that link doesn't use the tables you want
flow chart?
well more like need to look at exactly how its read/formatting etc so maybe have a way to read/access it in the IDE?
lua table -> java parse, there's a lot of spread info
here's another link
https://theindiestone.com/forums/index.php?/topic/38329-customizing-loot-4151/
Here is an example of a simple map mod using custom room definitions, custom loot zones and custom procedural distribution lists using the new loot distribution system (41.51+). 3 gas stations have been placed in a cell intended to be added to the vanilla map via a map mod, the Northern most stat...
I mean technically all that stuff is just lua tables without the code right?
just wondering any way to get the code those txt files actually represent.
distributions don't have txt
can someone please direct me to a mod making article or forum. I am totally lost, I have copied the mod template to the dime and yet it will not show up in game
Does anyone else get an odd sense of satisfaction in making your code / comments look pretty
Distros are Lua tables, right?
I wish the code I work with had comments. Biggest pet peeve are bad/ugly comments xD LOL
okay just brainstorming but you get where Im going cuz IDE loves to say unknown cuz its getting a ?object?table? built out of those txt files which then carry methods it can use..
i have ocd so documentation is v important to me lol
there's 3 different folders of the game on your pc, maybe it's wrong place? The -nosteam option can affect the folders you need to use
Now you can't ever get away with telling me "My code is self-documenting." xD
i made my co worker do another commit because he had extra spaces and lines where there should have not being. I refused to approve his PR
jab why I wish there was a kinda working javadoc gen for lua
fair enough. Its so bad i wrote a 50 page documentation training manual on my own free will for my job at work
Enter PipeWrench.
just because i was mad it didn't have one
Well sort of.. PipeWrench has a WIP Lua transpiler.
plus i've learned a ton from just picking apart other people's code, so I want people to be able to easily understand and use mine
This is the best that the Lua side of PipeWrench provides rn: https://github.com/asledgehammer/PipeWrench/blob/stable/lua/server/ISObjectClickHandler.d.ts
=(
what do you mean? I have put the folder in workshop in Users, in workshop and mod folder in the Project zomboid file I am unsure where else to put it
Sorry bout that.
yes I think User/Zomboid/Workshop/MyMod/Contents/mods/MyMod is what you want
game install folder (projectzomboid), $home/zomboid, then the mod folder workshop/content/108600
and !steam user might be different...
yo that is super neat
on a second thought dont read my code. it might give u an aneurysm
what is the theme for vc for lua to make it look like that? or is that default
your game folder and home folder both have a /mod folder dont mix them up.
do I actually rename my mod to MyMod?
do not
if not your mod then don't reupload
it is my mod
any time someone gives u a name placeholder, give it a real name
they r just telling u how to do it without holding ur hand
~\Zomboid\mods\Superb-Survivors-4178 for example is where I work on a copy of Superb to fix stuff...
I have the mod folder, where do I put it. I have already tried Users/Zomboid/Workshop and Mods
I am even able to upload it to the steam workshop yet when I subscribe to it, it does not show up
just put it in your home zomboid/mods folder
🙌this
I did this only temporary but I renamed as you see the folder to a new name but also mod.info I change the name there so when loading the mods ingame you know exactly what you loading. esp if you already published a version of it on steam.
yea if they copied mod template then the mod will be the same id as the mod template and thus not work
^
get an icon file too. replace the sample with a relevant image
poster.png
This better comments plugin for vscode is GOAT
you can add custom tags and formats however you like
I highly recommend it
i should get some plugins for vscode
mine doesnt even highlight "not" "and" or "or"
do you even have a lua plugin 😨
i'll get a plugin tho. for my own and everyone's sanity
thats what I got installed, if Im missing any other popular ones dunno
is that where the color theme comes from?
ah just set them for yourself... :P themes...
Much better than what she had ^
I use this when I'm around people so it's annoying enough not to stare at.
I just use light theme when I am coding with people
I dont even use vsc cept for quick looking at code and compare it to IJ
I'm about to change that. =P
no you wont unless you rebuilding the whole UI of vsc
no the comments one only does comments
this is what I normally look at..

i am scrolling through the theme for that colors but i cant find it. my shit is all washed out
give me that neon pink function tags please
eww
back before vscode
Rose theme?
Sakura theme
I used to use Sublime.
good old sublime
best linux editor
isn't bright or burning on my display tbh. looks fine
but my monitor is angled a certain way
I use chalk on the pavement. I program in runes..
i had to stop using it though because i needed clearer syntax highlighting
when i wrote 50k lines of code in autohotkey though? That sublime theme was through it all with me
The theme of my editor keeps changing though.
hold on time to pull out the magnifier and see if we get a color code
dracula theme for dark only
R:252 G:224 B:241 yes as I say burn in bruh..
Pfffft, using VSCode for making mods that you can't even run, test, or compile 🤣
same issue with IJ
I used Notepad++ and recently switched to Kate to have more control over UI
Oh you're talking technical stuff idk anything about that lmao
Vscode is nice for the ui
Syntax highlighting and plug-ins are great too
If you're not using the zedscript plug in you're really missing out
Imagine VSCode but it only shows the things you need: that's Kate >:^)
IJ works fine for me now that I know Im back in the C compiler setup days. all I need is a loader for .txt files as lua objects/tables/whatever and Im set
how to set up your IDE. open the command line game launcher bat file... that gives you a good idea.
both VSCode and studio are great for bigger projects. for basic stuff i just use notepad++
bob and kate
That too, it fits perfectly
if it just lua code stuff Im testing I go right for the online compiler
do wish there was a 5.1 specific one still alive.
Most of my Lua implementations use Java methods or tables so native Lua testing doesn't work
java I got no issues either
I have to raw-dog it using print statements and relaunching the game
Im set on both lua and java now its that loaded stuff so the IDE knows what its dealing with stuff
i just test things with the in-game console when i have to
what kind of goodies can you run with the in game console?
The same as lua scripts, its just a terminal
anything really if you can do one line lua code :)
that would prob be a great start for me to just mess around with functions and stuff to figure out what they are
anything specific to run it or just -debug at launch?
just that and you can explore it all in the F11 menu.
-debug as executable properties, or the other one for the java launcher bat
sounds great. thank you for that, i was hoping something like that existed. my motivation is back
Was like -Ddebug or something
think if you hold shift or something there was a trigger to launch debug mode too
that def wouldnt care for cmd line
Tbh i would 1. Look at mods that do similar things to what you want and 2. Read the java docs for PZ
already ripping down a mod that i got my eyes on. as of right now the only goal i have is to have a clock in just like the digital watch in vanilla. just to explore how things work
A placeable version of the digital watch?
kinda like the the clothing inv mod with the floating button but it just shows the time lmao
hides...
who needs a library we'll just take it direct.
need to make a template out of this so I dont gotta do it over and over by hand
@ maemento I downloaded your mod first mod almost as it came out, I just realized it was you xD
untapped vape market
i think some map mods have spawn definitions for their smoke shops so make sure u use the same tags other smoker mods use
Any texture artists that can give me some advice? How would you go about texturing an item like this? I'm trying to get it done without stretching the image but a lot of them come in different width and heights. I've tried content aware stretching and filling but it has varied results and I'm not a good enough artists to just redraw the edges.
the texure on the model is the stretched one
this is one of the better results
some are not great
@rustic garnet Sorry to ping you here instead of leaving a message in Workshop page for Nested Containers, but I needed to do so hee so that I can show you what's hapening with said mod.
The double entries are from the only two containers I have in my main inventory. it doesn't do this in vehicle, stationary containers, or inside bags I have equipped on my person.
Alright so what are the limitations of the F11 menu for the debug mode?
If I make a mod and install it, load into a save. While in game, change the lua and reload from the debug mode in game -- does this work?
Hahahahaha
Animate a player sleeping and holding onto that thing for dear life.
there is actually a stress debuff you get when you sleep with them equipped but no animation sadly
great idea tho
now I need it
already diid
There is a weeb proffesion. When you take it you spawn wearing a trench coat and fedora and get a random dakimakura and nearly broken mall katana. you also get and exclusive "studied the blade" trait that ups long blade
aaand finally there is this.. https://cdn.discordapp.com/attachments/1074066291318595597/1090001016323317941/ProjectZomboid64_GnJCkWX2VO.mp4

Nope
wtf
10/10
add clove cigs from my mod for extra edginess
the face i made when i turned on the audio
in what way
seems to be working for me
game launch as well as workshop pages
oh yeah it isnt working for me either
not completely down but definitely having issues
iirc steam doing planned shut down every tuesday but not sure about exactly time
good thing i wasnt planning on playing
spent a good half hour looking for a theme that works for my eyes tho
this is what i did today instead of actually coding
got sidetracked and made a vscode theme
lol
{
DisplayName = Gnome Bar,
OnCreate = onVapeSpawn,
}```
function onVapeSpawn(_item)
if not _item then return; end;
local item = _item;
local flavorsList = {
"Tropical Rainbow Blast",
"Blue Razz",
"Watermelon Ice",
"Pink Lemonade",
"Black Ice",
}
random = ZombRand(10)+1;
local displayName = "GnomeBar (" .. flavorsList[random] .. ")";
print(displayName);
print("Printed display name");
item:setDisplayName(displayName);
end```
I'm only getting errors when trying to set the display name on the last line
even when just setting it to a string of "test"
im not sure what i'm doing incorrectly. Any ideas?
what's the item?
its a vape, defined in the first code block
and why r u using _item as argument and on next line doing item = _item instead just use item as arg lul
do item scripts have an onCreate?
its what the wiki did so I was just going off their template to begin with
can u show this wiki page? wth






