#mod_development
1 messages ยท Page 144 of 1
mmm much better
Cherry ice looks a little funny but it's gotta have white somewhere lol
i'm actually going to change it
see how the end of watermelon ice is put white
i'm going to change all the "ice" tags to just be white
not like how watermelon is now
zamn, this site is baller
too bad my browser is interfering with it too much
ooo, I have an idea: you could take the "ice" in each name, keep its blending options, but put an overlay to make it look icey
not sure how I'd do that tho
Just light blue blurs and whites
just get a free overlay brush
hey glytcher do you know if there is a way to make a timed sequence happen within a function
Ye. Use vishnyas lua timers
thanks! is that a framework?
i see
it's like a guide framework? or a require framework?
ah nvm
so i use those functions if i want to create a timer that does something when the timer ends
you require the module (if it has one) and then call the methods
thanks
for what im trying to do (make a startup "effect" for the world power turning back on) would this be the right thing for me? i wouldnt necessarily say i need a timer per se
Wait ill teach you. Let me go back to pc
to play a sound to give a feeling of the power gradually turning on
if you want a delay you need a timer of some sort
i see
so i would play the sound and time the power turning back on to happen at the end/climax of the sound effect
you're gonna have to time that manually, the game isn't very smart with sound
i see
timer:Simple(10, function() print("delay"); end)
just check the pastebin on the mod page
and this can go within the function?
thats basically it if you want more complex stuff
it can go complex
fantastique
yes
nope
ah
i think i might be fine actually
maybe not
if i want to make a measure for players changing the elec shutoff date mid playthrough, should i just have an override sandbox option?
I'll stick with my concentrate of Blue Hawaiian
since my mod changes the sandbox option for ElecShutModifier, and stores it in a table to reset it
ice has a different meaning...
okay heres all of them donne
i think i'm satisfied with this
now i just need an image of a player zoomed in wearing a trench coat, fedora, and katana smoking the vape
dont look here last 'person' I helped post production got me friending a chatgpt bot... without being told I was.
dang my fingers ache I hate remixing sometimes...
wait what
if you mean the post before last one, yeah just had to deal with that.
idk anymore since pao fixed repairable powergrid it used to be local only and i didnt know that that time...
so idk how he did it but it must be some server client codes
i see
what about Banana Ice and Black Ice?
whoops
ah you have black ice, but not banana
thank you for catching that
๐ซก
cuz bananaananana is special ice.
speaking of fixes, KI5 forgot to add a whole item in his new ambulance mod ๐คฆโโ๏ธ
luckily i have a backup but idk where they've gone
are you sure you're in the right directory?
i just took a dab
happens to me when there's like 3 workshop and mod folders in all of PZ's files
mind go zzz
you got the wrong kind then...
also should replace/remove sleeping pills in your mod then make ppl wanna bub
my test subject is being so cooperative
standing still while the power starts and stops constantly
ok im gonna give a try at the timer api
Your rat looks like a cat
but which came first?
finally someone grasping it.
I wish I was a woman so I can multi-task this massive patch updating operation
(too busy fixating on one thing like a mammoth hunter)
does it require merges?
beautiful
i'm kinda proud of how this came out
"but it's not in alphabetical order!!!!!"


saying this one right now... if it dont have merges saying could be worse...
hidden flavor
eww..
noice
welcome
big chopper
now you're gonna be stuck here until you spam enough for katana and another month for the spiffo badge
that actually would likely make me throw up/sick
wheres an edgy place i can take a photo for the mod
the prison derp..
ye โ๏ธ
police station lmao
or a church yeah
i think church
which town has a church
i don't even play this damn game
well you said edgy a church nah dont even think they care on that
there in all of them arent they?
idk
1 sec I know where one is
lol, I just remembered back when I started playing this game, I studied other player's playthroughs, thought of strategies, and other stuff
Now I mod this game and meme my playthroughs whenever I even do them (CoD zombies trains and such)
police station NW of the firehouse also
is there not a trench coat in vanilla
yeah?
there is a leather jacket
there we go
thank you
all geared up and ready to vape

trench coat, fedora, fingerless gloves
going to spawn a katana
Is it possible to programmatically add items to evolved recipes? Someone left a comment with some code on my Jerky mod and I'm wondering if its feasible. My main concern about adding base items to evolved recipes would cause compatibility issues
if item then
local EvolvedRecipe = item.EvolvedRecipe -- probably another way to get this field if this doesn't work. may need to do tostring(item.EvolvedRecipe) on it
item:DoParam(EvolvedRecipe .. ";Base.BeefJerky:10")
end```
Here's the code they left
also asking cause I'm a lua newbie
i'm not really sure what some parts of this code are supposed to do, but you can add items programmatically like that
local opt = context:insertOptionAfter("Favorite",getText("UI_vape_action"), isVape, callVapeAction, playerObj)
opt.iconTexture = getTexture('media/textures/context.png');
-- Icon that displays adjacent to context menu item```
interesting that you use UI_EN.txt instead of ContextMenu_EN.txt and it still points correctly
all the different translation stuff confuses me tbh
i don't know exactly where things go
๐คทโโ๏ธ
if you favorite the item, does the vape option still remain?
not sure if favorite unfavorite is the same context menu option
no it just moves it to the bottom luckily
nice thinking though, i didn't even consider that
ive just never seen the insertOptionAfter() method, only addOption()
adding to existing. might even be an insert one
addOption() just appends it, although some context menu options still appear below, they probably occur after the inv context menu option Event
or just depending which one loaded when...
translate think it goes in shared
i just copied pwrcosmic's mod lol
PT_BR won't work
awesome!
might be for historical reason? dunno
now there is a lag and i timed it temporarily with a thunder sound
now I don't remember if nil counts as true or false in if statements ๐คฆโโ๏ธ
false...
nil and false are the only false. anything else is true
zero is a number... so it exists...
gimme my binary booleans back ๐ญ
now dunno what happens if you cast 0 to bool
I know 0 is true, wasnt sure what it would do if you cast the string 0 to boolean.
well number..
what is a good way to create/get a custom sound
you mean in general?
how the thunder command works?
dammit i have to sign up to download the sound
oh well. ya gotta do what you gotta do
fake email, or youtube
btw anyone ever see the tags on the audio files... talk about lulz...
ahh nice you used drink animation .smart
no it's the smoke animation
same thing...
nah it's fine it's a royalty free sounds website which i might need to use in the future
self:setOverrideHandModels(nil, self.item); -- !! Put the vape in the secondary hand
self:setAnimVariable("FoodType", "Cigarettes"); -- !! Set variables for the action animation
self:setActionAnim(CharacterActionAnims.Eat); -- !! Call the eat function, with the previous variables, on the vape object (self)```
I know just funny they in there...
actually think first time ever encountered that on something paid for.
how does this look
local option = nil
if item:getType() == "PocketTV3TVMode" then
option = context:addOption(getText("ContextMenu_PocketTV3TVMode_switchMode"), item, PocketTVSwitchModeAction, player)
elseif item:getType() == "PocketTV3RadioMode" then
option = context:addOption(getText("ContextMenu_PocketTV3RadioMode_switchMode"), item, PocketTVSwitchModeAction, player)
end if option then
option.iconTexture = getTexture('media/textures/item_PocketTV3.png')
end
if isDebugEnabled() then
--print('stuff')
end
i do this so incases i forget to remove the print it wont print spam
just an extra precaution .
why not just leave it there and use it like this. DebugLog.log(DebugType.Sound, "ambient: removing ambient sound " + var2.name);
ah nvm forgot might not be albe to call that directly
listen to the first 3 or 4 seconds of this random church organ turning on sound. it's perfect!
unless that is exposed using the different debug type toggle.
i just gotta add some reverb or something
shit, i forgot what I was doing before I added this icon
umm I dont even hear really anything
turn it up, I heard the creaks
there's no point in adding reverb because the base sound has no presence
should be fine as it is. trim the audio or w/e
If I modify the suspension & mass values on a vehicle and the wheels turn completely black, would that be because the wheels are clipping into the vehicle in some way?
fixed it by adding a check
once again, thank you for catching that
i need to learn animation so i can make you blow big fat vape clouds
๐
animations with objects is gonna be a big hard PITA
as in player animations
you'll need to make it a world object
adding an animation to the end of the perform action shouldn't be the worst right
or just make it another timed action?
yeah
idk that's definitely a feature for v2
you won't be able to make it a normal timed action
unless you know how to point to textures and other animations
oof, gotta curb those floats
usedDelta = tonumber(string.format("%.2f", usedDelta))```
why would this be happening on only the number 55?
floats are magical
look at curbing it to the first two decimal points. idk how that specific method formats it
ah, there's a workaround
math.floor(x + 0.5)
multiply usedDelta by 100, and then convert the number into an int double, w/e Lua snobs
this is what i found online
the multiplication is later in the script so it looks like this basically
usedDelta = itemObj:getDelta();
usedDelta = tonumber(string.format("%.2f", usedDelta))
... a bunch of code
usedDelta = usedDelta * 100
self.tooltip:DrawTextRight(fontType, tostring(usedDelta).."%", textWidth+(gap / 1.8), y, color.r, color.g, color.b, color.a)
i guess i multiply first then do math.floor
yeah just do self.tooltip:DrawTextRight(fontType, tostring(tonumber(usedDelta*100)).."%", textWidth+(gap / 1.8), y, color.r, color.g, color.b, color.a)
or without the tonumber, idk
alright, time for the update spree
how does this changelog look?
New update:
Added support for '90 Ford F350 Ambulance
Fixed critical zombie inflation bug
id add some kind of bullet point or something
to each item
if its in the workshop you could make it a list
v 1.0.5
- Added support for '90 Ford F350 Ambulance
- Fixed critical zombie inflation bug yeah maybe something similar to this
I would prefer version number
Update - v1.0.5
yeah something like that
so like
eh, issa mod, idgaf about versioning
โข Added support for '90 Ford F350 Ambulance
โข Fixed critical zombie inflation bug
yeah
I was hoping someone would question my second addition but looks like my April Fools joke is subtle enough >:)
dude, you don't wanna know
oh dang its actually April 1st
nah it's just my Siren Variety - Compatibility Patches
OUCH!
how can i make a check that if a sound is playing it will not try to play the sound again
my second update for my Unified KI5 Crafting Category is the following:
New update:
Added support for Containers! and '90 Ford F350 Ambulance
Removed cake fart
self.soundChannel = self.character:getEmitter()
probably something using that
one sec
i think i know actually
o.smokeSound = "ecig";
-- Name of the sound file that will be played
o.soundChannel = 0;
-- The sound channel (basically frequency) that it will be played on```
```lua
if self.soundChannel ~= 0 and self.character:getEmitter():isPlaying(self.soundChannel) then
self.character:getEmitter():stopSound(self.soundChannel);
self.smokeSound = nil;
end```
this checks if my sound is still playing and stops it if it is
in the perform section of the timed action
i see. thanks
if that helps
i probably need to change some things for mine since it is like ambient noise
if self.smokeSound ~= '' then
-- If no sound is playing, start it
self.soundChannel = self.character:getEmitter():playSound(self.smokeSound);
and this is how its started
probably don't need that but just in case
you're welcome! Good luck!
Ever find jumpscare in your travels?
i haven't
next changelog:
New update:
Added support for Containers! and '90 Ford F350 Ambulance
Adjusted vehicle names with door counts to have written-out numbers
Obliterated black hole that was eating crafting recipes
First victim
want me to format these for you?
nah I don't actually care for formatting. I am doing KISS style
trying to center text in a custom tooltip is pain
even with drawTextCentre
which should be noted for anyone searching in the future
its drawTextCentre (with re) instead of drawTextCenter
damn brits
red alert, red people missing from here
true
red people missing?
The code to match it was so big that I build the whole tooltip from start. The other is to not care and draw from right, or draw it all regular line.
maybe they're planning to do something for April Fools? 
It seems to follow the blog where they said about the new big changes and work.
Java aligns everything by itself then?
local center = ((self.tooltip:getWidth()) / 2);
self.tooltip:DrawTextCentre(fontType, '-- Dead --', center, y, color.r, color.g, color.b,
end```
would be cool to keep the original model and icons though. make a vape tower of your favorite flavors or something
oh snap this is great
it actually just solved another issue i didn't know how to fix too
thank you so much
how do i print to the log console?
print()
print("test")
only if it has a tostring
booleans don't work, numbers do
print("value is "..var)
.. is how you string concatenate
yeah lua is very strange coming from C
yeah...
the lack of semicolons is triggering me
you get used to it. Python broke me with syntaxing
@fading horizon
you then need to patch the metaclass
#mod_development message
If your item is drainable, use DrainableComboItem.class
god python is the bane of my existance
you can use semicolons if you wish ^^
you can put semicolons, its optional
i must suffer with Python because it is the BING BING WAHOO for machine learning, and my only alternative is outdated Java libraries
same, I had to learn it for my coop and its busting my brain (machine learning too)
semicolons are a must if you don't line break
1 line programs go hard
a little note about concatenation is that string.format performs a lot better than multiple concatenations
hii, working on a vehicle mod rn and does anyone know why the blood, damage and rust textures make the vehicle texture like this? when the vehicle is fixed the texture is normal but when it gets damaged it turns like this
i'm even more lost now, but thank you for the resources I will study them
looks like the other textures are missing
i might make a vehicle mod next
i want to make the big hotdog weinermobile
i think that needs to be in game
it's how I did it, you can patch the lua render too. Just explaining if you wonder what is going on there.
exported my model with 2 UVs already so the shader i'm using for the script is vehicle_multiuv
grr
the jumpscare sound is in a soundbank
sorry Pan
for some godawful reason
but soundbank? where those at?
..\Steam\steamapps\common\ProjectZomboid\media\sound\banks\Desktop
nope. you'll need to open them up
I was just hoping maybe someone had a reference list
I think this tool might work
https://github.com/spelunky-fyi/Spel2-Soundbank-Tool
I forgot where I got the one I use
just got the fmod tool
lulz extracting...
oooh nice alot of the files include bpm and bar in name... old school
this gonna be interesting see how compressed this is.

glad I picked a drive with some space on it
ayup
so i finally managed to center the text
but now i'm asking
does the text even look good there
or does it just add clutter
imagine the box is shorter in the second photo as well
or i could change it to where if it's specifically at 0% that it writes dead instead of 0%
what do y'all think
to not have the box with the empty line in the second one, add alternative text to "-- Dead --" like "-- Used --" or "-- Active --" or something
nah keep it consistent with the 0%
and only changed the text
so its basically text or no text is the option
imagine theres no extra space in photo 2
I like the dead text, pretty novel
ded
maybe if you mess with batteries, then the text will already be set up for it
naw its fine as it is now
i have complete control
eventually i might add the vanilla progress bar
but idk i think my version looks clean
and i like that
That looks nice either way, you could mess with background / borders too.
rubs hands....
btw since it dont exist decided to make it
yeah dead definitely needs red background
ty for idea
only 50% thru the 2nd largest pack... meh.
zomboidMusic.bank 3.59GB into a 313MB file dang.
the dudes really know how to compress
yeah the red background and border is cool
now everything is getting that treatment
so thats the full list of all sounds in those plus anything else.
oh God, you're never gonna release this mod, are you?
at least you'll conveniently get around to releasing April 2nd or later
i swear
honestly the new colors might be confusing, like the red DEAD tooltip might be confused for a red flavor at first glance
gonna go look at those .txt files in there now
ah nice actual just simple straight list of the filenames already
was thinking it was one of dem dang script .txt files
yeah it needs a little
also make the red dead tooltip body more apparent
like it strikes out at you (maybe make that one opaque)
btw you using a transparency layer to change how full it shows?
new changelog:
New update:
Removed Tsar's Common Library - Hide Mustang/Samara Recipes, as it is no longer relevant with ATA 2.0
Added sandbox option to remove Snakeneta van, taxi car, and advertisement board trailer from Snake's Mod Pack - Pimp My Ride Mod
Removed dev/null for the 56th time (it keeps coming back, please help)
nah its just how it looked the yellow looks full but then the red clearly halfway
self:drawRect(0, tooltipY-1, vapeTooltipWidth, height, 0.1, color.r, color.g, color.b)
self:drawRectBorder(0, tooltipY-1, vapeTooltipWidth, height, color.a, color.r, color.g, color.b)```
just variations of this
the normal flavors don't have transparency
empty does
i'm still playing around w it
I thought maybe you were using a layer then like resizing it to adjust on fill height then forgot its an icon...
still not finding it btw
look at the mods that replace the jumpscare sound with an empty file
they already did everything
gn fellas, happy April Fools
I'll think about it... but then that kinda moral wise didnt do it myself and gotta credit :P
heh found 'them'
now maybe I can look back and find the trigger
okay last time ill ask i swear
i played with the backgrounds for the colors
what do y'all think
nice or not
wait, you're looking for trigger? Could have said that, is it for jumpscare?
is there a guide on integrating mod options
so i could just have an option for whether or not theres backgrounds
anyone know how to get a string of evolved recipes from an item?
modoptions discussions
i cant figure out the sound thing. it seems every example is using self.sound with a character emitting the sound
Depends what it's for, it might not be required.
trying to append my new evolved recipe to base items, so in theory it would be compatible with other cooking mods
There's a map I think.
just add your Items, I recall DoParam adds them to existing map.
btw who was having issues with the power not staying on or something?
damn okay yeah that works. ty for the knowledge
getSoundManager():PlaySound("powerstartingeffect7", false, 1):setVolume(0.8); --!! When speeding up time the effect plays multiple times.
what's a better way to play this sound so i can use things like getEmitter or self.sound
it seems what i have rn doesnt allow me to check if the sound is playing in order for it not to be played over itself (when time is sped up)
I think you can use getEmitter() with the player
I don't think It's good for multiplayer though
im not sure how to use it. wouldnt it make it so that the sound is playing from the player?
yeah I believe so that's why I say wouldn't be good for mp
it's supposed to be something similar to the power shutting down noise that is heard by everyone
can i still make every player emit that sound but it is always heard on the client side only?
yeah I imagine you can but I doubt It's the best way
GameServer.PlaySoundAtEveryPlayer("RumbleThunder"); if thats exposed dunno but thats what the kick user does to play sounds to everyone MP
i see. do you know if i can use isPlaying or any way to check if the sound is playing?
forgot ban is lightning
no clue you can see how they doing it look at KickUserCommand.class
or how to use isPlaying? maybe what i have rn is fine but i just dont know how to check if the sound playing
i see
dunno that was also in question. but track it back to PlaySoundAtEveryPlayer might help more.
isn't it just
if(isPlaying==true)
{
}
or
while(isPlaying)
{
}
You can see how EHE does it, there's useful examples there.
Im not gonna past that whole code but its doing packet stuff to every client...?
which folder is this one in?
i'll give it a try
zombie/network
idk if that's the correct syntax, that's just how I'd imagine it working
its crazy how well fernflower pulls out the source talking like 99.9% of it
there's this to register one I don't know how to use it though || getSoundManager():registerEmitter(BaseSoundEmitter emitter)
that might be useful thanks
dang I just looked only 13 classes couldnt be decompiled because solely because return value is null...
like is it something like this I have no idea nope doesn't work
since we're all looking at sound, why does truemusic trigger OnWorldSound on clients only for moving objects or is there some other difference why radio items don't trigger the event on client? It works fine on SP.
thats like I wondered why they have a totally different MP bank sound file but all the names seems just like a dup from the ZomboidSound.bank
is there mod or way to make % of random zombies spawned (sprinters, walkers, crawlers)?
@viral notch
this exists already in 2 or more mods.
Also you never answered me what's wrong with ISA.
whips out the VESA
pm or ISA server
that 2 mod
im gonna have to go at this issue with a new approach on another day
ugh
got 2 problems:
events overlapping at higher game speeds (blackout and power startup, power startup and itself)
power not turning on/off properly at higher game speeds due to issue #1
naturally once i fix issue #1, #2 might fix itself
i seem have to corrupted my save from too much testing
i better fix whatever caused that
might be the same problem that i was having with the other things
why I wish there was a test world that you could init from scratch almost instantly cuz how small it is.
i think i know what i need to do for next time i get back to this
what's the difference between translations in IG_UI and just UI
does whitelisted item delete option only deletes Item which was "Discarded"? . i am curious cause if i "Place on the Floor" it wont recognize it as "discarded"???
Where do I find the files for working out? I can't find a script for it in the game files
Place item bypass the server delete
Afaik
Theoretically, IG_UI is specific to text found in-game as opposed to in menus. The distinction isn't super clearโchat window strings are in UI_, some other UI strings are in IGUI_... I assume they were added at different types & strings were added by different people. Functionally, seems like the difference is nothing, unlike stuff like Sandbox_
thank you for the explanation !
i think i'm finally done
mod is ready to release
just need to make the workshop page
ISFitnessUI.lua
What'cha making?
i ended up getting mod options integrated for the tooltip borders / backgrounds
a vape mod
I found a way around it, so I don't need to delve into it xD thanks anyway
Oh cool cool
Y'all know if there's a way to add like a "XP buff" to eating a food item?
So let's say, you eat a protein bar, you get 50% faster strength skill for x minutes
See ISDropWorldItemAction.lua. Specifically worldItem:getWorldItem():setIgnoreRemoveSandbox(true)
More straightforward answer: yeah
I don't know that there's a way to do this built-in, but food items can specify an OnEat callback so this would be possible
Gotcha
Would you happen to know if there's a way to make a Strength Book of sorts? Since that's what I'm also trying to do, but keep getting errors
Tried out somebody else's code and it still doesn't work
So I assume they've done something that breaks it
You mean a book that grants strength xp?
Yeah
Looking at the vanilla skills books suggests that you should be able to just specify Strength as the skill trained by the book, unless there are checks for specific skills
The beginner carpentry book, for example, has these values in its script:
SkillTrained = Carpentry,
LvlSkillTrained = 1,
NumLevelsTrained = 2,
Looking at the vanilla skills books suggests that you should be able to just specify Strength as the skill trained by the book
Doesn't seem like it, gets an instant exception error when I specify "Fitness" or "Strength"
Then I suppose there are checks for specific skills lol
I found a LUA file that apparently bypasses that, so it places Strength and Fitness within the "researchable" skills, but I thought there'd be an easier way, or that I was doing something wrong lmao
thank you โค๏ธ
Just "Lua"โit's not an initialism ๐ Yeah, looks like the vanilla code has a table that associates skill book info with multipliers
The fact that it caused an error implies that a nil check is missing somewhere (the somewhere is doLiteratureMenu)
looks like the vanilla code has a table that associates skill book info with multipliers
That seems to match what I found, so maybe I'm on the right path :P
setIsFakeInfected()
is the zed infection right?
I don't think so
No, there's "setInfected" and there's "setIsFakeInfected"
what fake infected is? dunno
declaration: package: zombie.characters.BodyDamage, class: BodyDamage
which one is the one that makes you turn to zed
i bet joy know
Looks like infected
I don't know off the top of my head lol, I just have the game code open while I'm working on mod stuff
@rancid panther sorry to tag you but i gotta be certain.. which one is the one that turns into zed
infected or fakeinfected?
im sure you know cuz you made a mod about this
It could have better naming tbf
Oh yeah for sure, but difference between "isInfected" and "isFakeInfected" is pretty large
zedInfected
getPlayer():getBodyDamage():setInfected(true)
is the one that turned me into zed
i tested
whew
Good morning.
Going to work on getting item properties documented today.
infected
Yep i tested it
But thnx
You know whats chance of getting infected
Like is it 100%
Whn you get hit?
bites are 100%, lacerations r 25%, and scratches r 7% iirc
Hmmm
Damn
Thats gona be complex
Cuz my passion project is reanimation mod
And i think its almost done (atleast the core functions)
Pao helped me alot
So i needed to ask these things
Imean the mod lets you control your zed
When you die infected
would u need to bypass their death and reanimate them? or have to prevent them from dying but act as if they died?
i see. nice
I actually pasted this before asking for collaborators
what part did you need infection chance for
i can't get my gifs under 2mb for the steam workshop images
๐ญ
why is the limit 2mb wtf
Just compress it till it's under 2mb
ive compressed it to hell several times
i'm just going to try remaking the video
lowest i can get it to is 4mb
Gifs are huge, unfortunately, and most of the time they look like garbage when you make them smaller lmao
Could always link a YT / imgur mp4 instead
It be like that sometimes
fake infected is from a removed trait that made any injury make your character think they're infected
They'd get worse and worse, closer to death, until it stopped randomly
Interesting
Okay. Still fighting with sandbox syncing. The command variant won't work cuz reasons
Now I want to try to use Mod data
I'm struggling to understand it a little tho... I have MrBounty's documentation opened, but I don't think I know how to do it yet
I need to create a lua table over on the server and make sure the players have access to it
Also... what does transmitting mod data do, if I do it on a player character(moving off of the globals for a second)?
ITS HERE
COME GET YOUR GNOME BARS
DON'T FORGET TO MICROWAVE THEM
https://steamcommunity.com/sharedfiles/filedetails/?id=2955999617
Future plans: ... Make it throwable
โ๏ธ

Vape ninja build incoming
Points have been thrown at the post, staple for my future playthroughs
Congrats! The Gifs and previews look great too!
Does anybody here know what kind of string does SandboxOption.getOptionByName() expects?
The tablename.optionname format?
Lmao, i truly believe of workshop trolls that just downvote whatever they see
If you look at the tutorial lua
Or other episode lua
Theres a whole bunch of sandboxvars there
That must be it im guessing
I, uh...
Hope my answer helps you if you cant find what im describing let me know
Yes, but note that not all sandbox options have a table name
Mod sandbox options always will (I believe), but there are a number of vanilla options without a table
Odd, but, if I loop through all options, and make a string that's "SandboxVars."..tostring(tableName).."."..tostring(shortname) it should wor, right?
What are you trying to do?
I need to send the options from the server to the client over global mod data
And I want to make sure that they're loaded in the same order
I don't trust that they have the same index on the server and clients
Why does their load order matter?
They should, but I know better than to assume
because I'm trying to load those settings into a new instance of sandbox options and transmitting them back to the server
So that the server can finally sync the settings for the client
I don't see why you'd encode it as a string rather than just sending a table
I am loading a table into the mod data, yes
I like the way you think! Thats how pz modder should think loool
Then what's the purpose of the string? To be the key?
Always Assume the desync hahah
Why not a structure like { tableName = x, shortName = y, value = z }
Those are some examples of ones without table names
Hmmm... Well, I need to know what to put into the getOptionByName
....
wait
I should check my opther mod
No I accessed sandbox vars directly before
-- where t = table with that structure
local name = t.shortName
if t.tableName then
name = table.concat { t.tableName, '.', t.shortName }
end
So you're sure getOptionByName eats a tablename.shortname format?
You could also encode it this way before sending, if you wanted. The SandboxVars bit isn't necessary
Ok, can I send you a list of options to not change?
If you'd like to double-check you can always look at the source lol, but yeah it uses the name the sandbox option is created with
To actually answer the question up here: No, because not everything has a tableName
I think this is about syncing between server and client, not modifying them
oh, I;m not trying to change anything, don't worry
changing will be for the admins
I checked the source, and... Well, from what I understand it gets the name of the ConfigOption
Which tells me nothin
That tells you quite a lot, I'd argue
From there, think "okay, where is the name set?"
in the constructor
And from where is that constructor called?
any one wanna colab? I have some of the code done and textures, my last guy bailed on me
I need help
from wherever the option is created?
Correct at a high level, but more specifically where
If you don't care to go through this little mental exercise I can tell you, but I think it's useful to think abt these questions when understanding code
I'll ask for the way out... I only know Java from what source diving I do to fix this game
Is there a reason the admins don't use the default UI?
Which sends the options to server and clients
Well that's not the issue I'm trying to solve
Okay. There are a number of classes which inherit ConfigOption, and a number of sandbox option classes which inherit those classes. For example, DoubleSandboxOption within SandboxOptions. If we check the constructors of these, we'll see that they call SandboxOptions.parseName with the given string. The given string is passed directly to the super constructor, which ultimately bubbles up to the constructor of ConfigOption. SandboxOptions.parseName splits the string into a table name and short name, so we can infer that the expected inputโwhich we've discovered is passed directly to the constructorโis the full string (We can also observe that some sandbox option constructors are called with the full name)
sounds like you're creating the issue
Thank you. I've found the parsename and saw it splits by the dot, but I still wasn't sure
the issue is Quantum, I'm trying to negate it completely
Players logging in to the server may be able to play with wrong sandbox settings because it doesn't load from the server, but from the local save file
But not always
so I'm making the client trigger the server's response to update the settings for all online players(incidentally the same as the UI is using)
That requires the client to send in the new settings tho, so I need the server to first transmit the settings over mod data to avoid a rollback of settings
Have you reported this bug?
Yes
It was dismissed as a feature or... Well, something along those lines
And I couldn't provide a reliable reproduction method in an unmodded game anyway
the one about the save file?
Yes
I tried to prove it by changing the values in the local save to cause a desync, but it always worked as intended
It's not like B41 will get an update anyway, and my server owner wants a solution now
In v41, you use SanboxVars.myPage.myValue for example to read the value. No need to do anything more. These work rather reliably after the OnInitGlobalModData event.
I don't understand, you don't like tables and want to try break everything?
down with index 1 !
any one wanna colab? I have some of the code done and textures, my last guy bailed on me
No. I don't know what settings will be on the server. And I need all of them
Where did you report it ?
read the SandboxVars and you'll know?
proof? Seems like he tries to read manually the old file.
See above, I've also observed the behavior
I'd hope someone would've made the bug report on the forum by now
Ah, I see where you reported it Diakon
I see, that too talks about old file and not the loaded values though.
*not sure about the admin UI statement.
The values are loaded from the file, so I'm unsure why the distinction is important here
That is, it would still cause issues with outdated options on clients
I think there's sandbox involved in the connect to server stages.
@frank elbow
ConnectToServerState.java
Taking a look
Yes. It does download them when the file is missing
But again, I'm trying to make a mod to fix it now with whatever I can
It seems like it should be downloading them either way, which is confusing given this issue
Just fleshed out my vscode extension's item documentation for properties by detecting defined types and showing those type-specific properties.
Like type = Weapon shows Weapon-specific properties on-top of the normal properties.
I can only guess they're downloaded but not read or saved
I may have gotten distracted & forgot I was looking into that (update: stopped looking into it now, idk where the problem is)
It seemed like they're read & applied
Now I'll need to actually populate the documentation for properties.
Hello people. I have a dedicated project zomboid server and would like to implement a script where every time a player is killed by another player thunder and lightning are triggered. How could I do this in a simple way? Can someone help me?
ezgif.com gives you more control over the GIF properties
@fading horizon image broke oh goddamn it, now my image broke
Can someone find me the code for duct tape? I canโt find it
The permissions image is broken on the GnomeBars mod page
Or wait, hmm, there's no image embed anyway, nvm
Look at this mod's code for repairing with duct tape: https://steamcommunity.com/sharedfiles/filedetails/?id=2954521171
You should be able to make a similar recipe for sharpening
In order to have circuits inside and be electronic, the model looks like a bottle of shampoo to me. I'm not saying that the mod isn't right, it's super modern but it doesn't give it the electronic touch in appearance. He thought that creating some that give us additional benefits in the game, such as give us health and stop bleeding from bites or cuts as if it were a futuristic hemoesthetic medical kit, that is, an auxiliary medical version, leaving the civilian consumer grade version, implementing a medical version with the rest that already has this mod and that the medical version make a electronic beep when consumed and are for single use so that there is a balance in the game and regularity of first-aid kits
Ah yes. I'll get right on that... medical vapes...
Yeah I don't like the images for permissions
I had enough images going on near the bottom anywaysn
Ty for looking out though
Thx
whetstone mod should be ready by tonight
You should make it so thereโs a chance it explodes and fucking kills them
it already does that if you microwave it basically
Btw @fading horizon are you able to make my distros for me?
The spanish guy that responded is p cool tho, looks like he wants lore-friendly and gameplay-functional stuff tho
i don't think ecigs even existed in 93
"That's a lot of work lol" "its easy enough to do it yourself" which is it mae?
And no they didn't, so his request is a little weird
easy enough to do on your own mod dealing witt your own files that you're familiar with
rather than having to go and try to pick apart someone elses mod and make a distro for it
Alright, today I am gonna do a great work of not touching my mods because I have irl obligations to do ! (Difficulty: Hard)
require 'Items/SuburbsDistributions'
require 'Items/ProceduralDistributions'
require 'Vehicles/VehicleDistributions'
local itemNames = {
"GnomeBars.GnomeBarRB",
"GnomeBars.GnomeBarBlueRazz",
"GnomeBars.GnomeBarWatermelonIce",
"GnomeBars.GnomeBarPinkLemonade",
"GnomeBars.GnomeBarBlackIce",
"GnomeBars.GnomeBarCoolMint",
"GnomeBars.GnomeBarBananaIce",
"GnomeBars.GnomeBarLemonMint",
"GnomeBars.GnomeBarStrawNana",
"GnomeBars.GnomeBarCherryIce",
}```
```lua
-- # Add GnomeBars to regular cigarette spawns
local GBLocaleStore = {"StoreCounterTobacco", "CrateCigarettes", "OtherGeneric", "BarCounterMisc"}
for i in pairs(GBLocaleStore) do
if ProceduralDistributions.list[GBLocaleStore[i]] == nil then
print("FAILURE -- could not find " .. GBLocaleStore[i] .. "!");
else
if ProceduralDistributions.list[GBLocaleStore[i]].items == nil then
print("FAILURE -- could not find " .. GBLocaleStore[i] .. "!");
else
for _, item in ipairs(itemNames) do
table.insert(ProceduralDistributions.list[GBLocaleStore[i]].items, item);
table.insert(ProceduralDistributions.list[GBLocaleStore[i]].items, regularChance);
end
-- // print("Loading GnomeBar store items to " .. GBLocaleStore[i] .. " ....... SUCCESS!");
end
end
end
theres the basics on how to do an item distribution
just modify it for your own item
those aren't basics lol
How to do I begin my script file? Whatโs the opener thing at the top called
The top things are require statements, that is how Lua loads other "modules" before it executes code
You don't need them actually because the base game files always load before mods
I'll show you a function that makes it easier on you. maemento mori's code is great if you have multiple items being added to the same places
@drifting ore #1072112420908175421 message
What is
No, people generally over complicate adding items to the distributions but it can be easy, if you follow this guide. It was written a while ago and isn't entirely up to date but it just works and is simple.
Also it's my weekend and I'm doing other things so I can't respond or follow up re this.
#mod_development message
1/250 chance to play the "you've been gnomed" sound clip when hitting a gnomebars
Yes or no
Go look at my clove cigarettes mod
It's a single item mod with a very, very simply distribution list
Yes
Whatโs the command in debug to give level ten of a skill
You can use the debug player UI to do it.
How
does anyone know if you can play / trigger the stomp animation?
I have a really, really great mod idea
do you know if this applies to new zombies as well (I have the model and a temp texture)? i am having some issues with spawning zombies with such model/texture
Help
please dont spam...
you are.
I donโt see any spam
then open your eyes
Good one!
It's a reasonable request (being asked not to spam, that is)
But either way, you need to provide more information
What is the recipe? Have you checked for console errors? Stuff like that will make people more likely to respond
I just want to make it clear that if I knew how I would help, what I found rude and "spammy" was the fact that the message was a reply to his own previous message to bring visibility again to it (like in facebook marketplace posts) xD
You are actually trying to help and they are silent. Funny.
Also stop demanding help. We don't get paid. A kinder way for me to respond..
If we got paid for answering mod questions I'd have at least, like, one dollar by now
Iโm back
My service dropped
Very sorry
@frank elbow I will send my findings in a minute
I minute as in liek 5 ish
Iโm baking rn
recipes not showing game
I haven't messed with recipes, but NeedToBeLearn:true suggests that the recipe needs to be learned before being used
Have you made sure it's a known recipe?
I'm unsure what you mean by requirement statements
You mean imports { Base }?
I don't think so, looking at the vanilla recipes
Just to be sure about the known recipes bitโhow did you confirm that it's a known recipe?
That does sound like it'd do it, but just to be safe why not try print(getPlayer():getKnownRecipes():contains("make Whetstone")) in the debug console
ok
I'm only asking to make sure because I'm unsure what else it could be; hopefully someone more familiar with recipes will be able to help out
will do now
Oh, wait. Is that your entire script?
yes
I see what you meant by asking about the module bit now ๐คฆ๐พโโ๏ธ you do need to specify a module
That is, module Base { at the top and } at the bottom
Hi, so there's this BicPen mod that adds a secret weapon to the game that you unfortunately can't equip on back for some reason, so I want to make a mod for my private server that allows equipping that said weapon on my back just like any other weapons. I don't have any experiences with modding but I do have some basic knowledge about coding, can anyone guide me on how to start creating mods?
There are some resources in the pins and threads of this channel for mod creation
If you pay me a bottle of Jameson I'll mod anything.
I coded PipeWrench drunk lol
Legit times during that project where that might've helped.
oh jaja thANK YOU!
Hello people. I have a dedicated project zomboid server and would like to implement a script where every time a player is killed by another player thunder and lightning are triggered. How could I do this in a simple way? Can someone help me?
Attempt #2
What have you tried so far?
Commendable.
My life IS Very Sad
Like this? I didn't understand
sorry, didn't realise I replied to the wrong message
then, let me ask a different question, why does it not show the option to equip on back?
I think I found it, CanBeEquipped=back
May want to check out that spoiler
Hey guys, I made a "new" zombie model and I can spawn it in game as of right (naked)
I have a texture.png file that I made as well, how do I make the new model spawn with the texture?
any hints is appreciated ๐
anyone know about steam description formatting and tables
specifically if theres rowspan / colspan options
I would be very surprised to find out that they support that when they don't even support the attributes listed in their own formatting guide
(That is, I doubt there are those options)
that's why i made my own formatting guide
lmao
posting it here again for reference
this is about as nice as i'm going to get for a centered table header without colspan
dang it
i refreshed and lost it
kill me
meme attempt i dunno if its even funny
better then just extracting all the bank files just for teh f of it
the mod name more odd...
haha you noticed that lol
yep
ur images also clickable?
Posting again for anyone who missed it this morning but I finally released the vape mod
https://steamcommunity.com/sharedfiles/filedetails/?id=2955999617
I can't remember who asked me to tag them on release lol
How do I make my icons show up in game?
Currently adding the documentation for weapon item script properties.
Hopefully no one will interpret this statement to mean that I understand what every script property does. =/
guys ive discovered a weird thing
getPlayer():setUsername(nil)
try this
hehehe
i made a pretty cool table display thing for the steam workshop
i think it turned out neat
i'll be uploading this on the formatting guide later if anyone wants to use the template
Does anyone know where items get initiated when loading into a world?
Is there a snippet to reload vehicle script in-game?
*reload all from Vehicle Editor Exists.
Any wizard here knows whats the best way to simulate an animated tile loop
I mean cuz i think this is heavy on ram
And what event should be best to place such function
Cuz my only idea is to check nearby visible tile and then animate it locally
Distribution? Not sure if this what you are asking
Which icons? The icons for your items?
In media\textures, you need to get the name of your item from the script file, like item myItem {}, and put the icon in the folder and name it item_myItem.png. It has to be like that.
No i mean overall, like when i define in a txt file how does it get inserted in the game or where does the game translate the params to make an actual new ingame item
The item script files are immediately loaded upon the game launching. Before the Lua even loads. Its automatic
You don't need to do anything additional to "create" the item in-game if that's what you're asking
@neon bronze
Is it java sided?
getSoundManager():PlaySound("powerstartingeffect", false, 1):setVolume(0.8)
what can i do to assign this to an Emitter that i can use to check if the sound is playing?
did you check ehe for examples yet?
i took a look and it seemed complicated and it was late at night. i'll try giving another look
oh right
it was using coords for the sound
based on the position of the helicopter
i wonder if i can find the exact way the java handled the sound effect for power shutoff
see if any of them returns the sound emitter when you make the sound
how would i do that? getSoundManager():getEmitter("soundname") ?
i have tried getting the sound emitter and i dont think it works since what i have rn literally just plays the sound
i need to set an emitter myself in order for it to return something
quick look
SoundManager registerEmitter
AmbientStreamManager might be fitting here too?
getWorld():getFreeEmitter()
yeah I'd say that's what's used usually.
thanks! what is ambientstreammanager
oh i was also thinking
what if i make the sound emitter the nearest building with power?
wait
nearest building (without power)
what do you mean? All buildings have same setting.
since it should be a sound that doesnt play when someone is in the wilderness for example
i think when a blackout happens in vanilla, the sound doesnt play outdoors or smth
lemme double check
oh wow
it actually plays a different sound depending on how far you are from civilization
that's actually... really cool
okay, i'll try to make the sound come from the nearest building that requires power
Can you create the conditions so the game does that by itself or call the function directly?


