#mod_development
1 messages ยท Page 89 of 1
outside could not work cos mb PZCalendar.getInstance() returns different instance when lua loads

why would the time be different from line to line of your code
i dont want to change the time
u always have same instance
Even still.. redundant calls like that are bad practice.
Good luck with your project.
XD
thank you, it works like it was meant to
now look at right side
2 lines as print and 2 same lines as log
working?
proof that your code and this code do exactly the same thing
as u see
yes, same value
and show me the value changes
still thinking how that is an improvement, the vars are still there
calling a function is slow, java function even slower, better do it once instead of three times
thank you
and it's less ugly
that i cant take as a reply to my question
i can
so basicly what youre saying it to create a local instace call and catch the values from that
instead of calling a new instance for every value i need
correct?
Then what are you doing asking for critique?
yes
but it's not new instance
it's always same
if you say this is wrong because of this it is a critique
the way you replied you just said, this is bad
usually saying thats wrong, this is right because x or y
thats a critique
Stop trying to rage-bait.
rage bait?
๐
if you dont wanna reply just dont reply
but telling me thats wrong to it this way
i rather you dont reply at all
You're breaking the "be lovely" rule. Take the suggestion or don't.
im breaking the be lovely rule?
albion pointed out why it was bad
you simply said its wrong, this is right
thats all im saying
that's all it takes
only if u not a full beginner
if u already creating big mod u should know 3 calls need more performance than 1 single call
it's basic logic
I hope u got smth good practice from this discussion
i see blocked messages warning so if any of you two are talking to me dont bother, i got the help i needed from albion and have taken the liberty to avoid interacting with you guys, so good luck and please do ignore me if you can, be lovely
ow shit thats a great idea
whats that lua interpreter from
Looks like a mod.
inst that aiteron aud
A glorified loadstring text body. Useful
mmm...
rofl
nah, I don't think so
okay, have a good day XD
He won't see it - no point on continuing it
cheat menu rebirth
what a lovely mod name
( is anti-cheat guy)
yea but still poor text input
Why does a cheatmenu have a lua interpreter?
it's maximum in pz for now
Oh - it's actually like cheating tools?
why not
Lol.
When I think of cheat menus I assumed it'd be like for single player use for more or less spawning items, god mode, traits, xp, etc- that sounds more like a debug tool
i do use it to test simple code ingame
i'd take a complete guess that the creator just created it as a utility for themselves anyway and at that point you may as well include it, it does somewhat fit
tbh good thing cos at least for me almost all useful functions are there and no need to create mine dev menu
exactly
What does the show modData window look like?
it's not from original debug mode?
Lol. Reminds me of a cheat mod for mp that tried to call itself anti-cheat.
nah - show modData isn't vanilla
AUD has one - so I'm curious - hmmmm
I have both so idk from where this feature
ah - it's aud then
heh
I'm improving off of AUD atm
lmk if you find any issues or want to test what I have
Also supports cars, zombie, corpses
I patched up this game and that tool became a useless pile of code.
monster 
Nice.
u mean that u creating mod like aud?
Also did this the other day
I patched up 60 zero-days.. so yes I am a monster.. and It was all done in kotlin.
Nah, I asked aileron if it would be ok to use his mod as a base and give it a face lift
This window is pulling the options off of the cheat menu and decorating the functions into toggles
will update aud or create new one?
Probably create a new mod
oh, cool
Not to rehash the past convo about steam workshops - but I don't think Aiteron would want me to nag him to upload stuff lmao
Steam API + Git actions + push privileges.
will wait it 
hello fellow modders
i bring a question today which is bugging me for couple of days now
hello there
could someone explain why VirtualZombieManager.instance:createRealZombieNow(X, Y, Z);
this works
while VirtualZombieManager():createRealZombieNow(X, Y, Z);
this brings null error?
thought .instance is just a variable
You're calling a Java class as a function
VirtualZombieManager is that class.
yes
VirtualZombieManager even not a function or metatable
You can't execute a class object
it's just a table with some functions
๐
It's so much worse but basically that
do you mean to have written VirtualZombieManager:createRealZombieNow(X, Y, Z); ?
and is your question about instances?
im sorry, since im a beginner python user, i thought one can call a class.. i guess it works differently in Lua
Kahlua logic. ๐คฃ
Absolutely fine.
yea, i need some explination of what .instance is doing
for easy to get it heh
Lua uses colon like python passes self to calls for instances
it's the created object from the class
ah
I'm not 100% sure why it needs one - or if it even has one
there should only be 1 zombiemanager
Maybe a java -> kahlua -> lua thing
So foo:bar() is the same as foo.bar(self)
oh..
Thought explaining that would help you with python xp
But you'd only instance something if you needed to have multiple instances of it?
I think IsoWorld does something wacky where it creates an instance to use for getWorld
No. Singleton.
and using IsoWorld. in Lua returns the original
when i googled why you would use a singleton, literally all i could find was 'don't', so i have no idea
hmm i see
Haha what
I singleton in my job.
i didn't look too deeply but that was the theme of the first few results
what's a singleton? .?
Keep OOP while coding global code? Hell yeah
one more question, im trying to study how to change an attribute of zombies (such as strength, speed and health)
Java singletons are common practice
Im guessing the attributes are saved in Class IsoZombie
i have found strength and speed in there
but coulnd't find the health
is the variable in a different name ? or am i looking at a wrong class?
i've tried to search it on forum but couldn't find any
You can change attributes for single/specific zombies but it's kind of counterintuitive - as zombies constantly recalculate their stats you'll have to plug in the changes onZombieUpdate - if that's what you want
correct, exactly my intention
I think IsoZombie uses some variables from IsoGameCharacter - like health
it does say it is inheriting it
the classes for players, gameCharacters, zombies are a bit mangled from new features coming in
speed is from gameCharacter but behaves differently in players/zombies
if I recall
same for health... sort of
so when a zombie spawns, its executing all those 3 classes at once?
it's inherited so yes if you want to think about it that way - but not isoPlayers
i see
isoObject -> isoMovingObject -> isoGameCharacter
| |
isoPlayer isoZombie
it forks
idk if I've conveyed that well
so my guess is that in order for me to keep the zombie health stay high ( for example 400) ill have to execute the check event for every tick or so. This brings me a concern of lag issue
Some of the stats don't recalculate every tick
it surely gives me a place to brainstrom
ah
I wanted to have a zombie be even faster than a sprinter ๐ฆ
:(((
you can do whacky stuff with it
also zombie health is 2, player is 1
keep that in mind making one with 400 HP
please no.. 
I misread that as horsepower
it was the beefy aliens - I wanted them to sprint a bit faster
thanks for all the helpful answers fellows
wizard zombies that can blink through walls. Fund it
The best is my unkillable Spiffo
Bring back lag bites.
god please no..
x2
xD
the game doesn't like to make zombies have high health - so on death it resurrects a tick later
also it is given sight of the closet player within the cell
Canon
interesting
it's set to always walk, can't be stomped on, and flips cars
Undead being undead.. when the bug is the feature.
oh.. flipping cars..
Where's the gif of a zombie flipping a car onto a house
not on this pc
my aim is to b able to spawn a boss zombie at command
took forever to figure out the physics of it - at one point the car just kept spinning
Is a national treasure
which acts like anyother zombie so i can control its movement like one you see in debug
would've been a sight to watch XD
oh gee
Anyone know if you can get the rcon password from debug?
exact thought that came to my mind when i saw it XD
i do want to try a nomad run one of these days
i always end up hunkering down and building a base but it would be nice to have an impetus to keep moving
i was thinking of downloading that Kino's Journey mod and following her "no longer than 3 days in one location" rule lol
Cars. How do they work?
One of the more rigid classes in terms of whats available
for the flip I'm applying a rotation manually - I don't think there's a way to apply a force
I think that I am going to aim for a release of a Java mod this weekend.
the issue in the gif is it's too close to the house and the car is trying to flip itself back
I think they made cars alot more flip happy
there's a java mod on steam for better physics
Cars are turtles
includes the car not screeching to a stop when someone gets out
I saw that on Reddit
I can finally enjoy my rollout mod to its full potential
My mod will unlock the potential for full shader support.
Gotta clean it up before releasing it
Blurrrr
I kind of hope client based experiences become more of a thing
like an identification system would be neat - where 1 player can see information others cannot
Dnd mod when?
dabbling in injuries/diseases (zoonotic with animals coming soon), and needing more first aid skill to understand what each drug would be for is a neat concept to me
otherwise you just see the actual name of the drug
- knowing how much is needed
barotrauma does this nicely as not having enough medical skill results in the game suggesting horrible treatments
rub some ointment on that broken bone
i thought that was the game being weird and did it anyway ๐
first aid is weirdly weak in zomboid, kind of a nothing skill, so anything to make it more useful sounds good to me
specifically a proper implementation of client-sided item names would be nice - the way vanilla does it isn't that clean and doesn't suit every purpose
seeing/masking player's identities would be fun too
Opening the RecordedMedia folder to figure out how the VHS and CDs play their script and take a look at it
Ah. I see. Each line has its own dialogue line. Let me just then reference these lines!
I've made a mistake.
hey ive got an idea for a mod anyone know whom im to talk to for help making itl be my first mod
What sort of mod?
Question for anyone familiar:
I've got an output from WordEd, but I want to use it for CDs instead of a radio broadcast. Is there something else I have to generate beyond copying the format the lua has in the recorded_media lua?
is table.unpack available/exposed? seems to be throwing an error
forgot the game uses older Lua, it's just unpack()
IS there an event for updating the sandbox option on the server?
It's UpdateFromLua
Let me send you the exact function
Oh, sorry, I meant an event for when the settings are updated
I used to cache the settings in my mods and the server owner scolded me since they're already a locally stored array...
Oh okk i don't think so
Oh well. I updated my stuff to read the sandboxVars regularly
Tbf I'm like if you change options you can restart server to apply the new options seems not a big deal for me
Yeah, for them it was, they didn't like restarting the game to apply a small sandbox settings change
They're in a nightly coma for the next 12 hours or so so I won't have feedback
Okk good luck then ๐
has anyone has tried messing around with the climatemanager?
climatemanager is big *is used in a number of places, can you be more specific?
trying to mess around and trigger storms...
triggerCustomWeatherStage()
but from what im reading there is also
transmitTriggerBlizzard()
transmitTriggerStorm()
transmitTriggerTropical()
they all use float values right?
the float represents what? Duration?
the triggercustomweather stage uses two ints
but cant figure out what they do... just used a random number in each and nothing happened ๐
btw I look now at PZCalendar.getInstance() and it always returns a new Calendar.
That means it is a different object every time?
I haven't looked at weather since they updated a few things, so not sure.
it means i have do use a local to get the instance whenever i want up to date values
ill post the code i've ended up with
a sec
local playerChar = getPlayer()
local calendar = PZCalendar.getInstance()
local hour = calendar:get(Calendar.HOUR_OF_DAY)
local minute = calendar:get(Calendar.MINUTE)
local second = calendar:get(Calendar.SECOND)
if hour == 0 then --check if its 0, if true replaces 0 with 24
TraitEndTime = (24 * 60 + minute + timervalue ) * 60 + second
else TraitEndTime = (hour * 60 + minute + timervalue) * 60 + second
end
if not playerChar:HasTrait(TWETraitsTable[MyTrait]) then
playerChar:getTraits():add(TWETraitsTable[MyTrait]);
table.insert(TWETempTraitsTable, {trait = TWETraitsTable[MyTrait], endtime = TraitEndTime})
HaloTextHelper.addTextWithArrow(playerChar, getText("UI_trait_"..TWETraitsTable[MyTrait]), true, HaloTextHelper.getColorGreen())
Events.EveryOneMinute.Remove(TWE_TraitCheck);
Events.EveryOneMinute.Add(TWE_TraitCheck);
end
end```
then i made a "timer" function
local playerChar = getPlayer()
local calendar = PZCalendar.getInstance()
local hour = calendar:get(Calendar.HOUR_OF_DAY)
local minute = calendar:get(Calendar.MINUTE)
local second = calendar:get(Calendar.SECOND)
if hour == 0 then --check if its 0, if true replaces 0 with 24
currentTime = (24 * 60 + minute) * 60 + second
else currentTime = (hour * 60 + minute) * 60 + second
end
--print("---twe---------Checking traits------------")
--print("Current time: " .. currentTime)
for i, v in ipairs(TWETempTraitsTable) do
local trait = v.trait
local endtime = v.endtime
--print("Index: " .. i )
--print("Trait: " .. trait)
--print("EndTime: " .. endtime)
if endtime <= currentTime then
print("Removing trait: " .. trait)
print("Endtime: " .. endtime)
playerChar:getTraits():remove(trait);
HaloTextHelper.addTextWithArrow(playerChar, getText("UI_trait_"..trait), false, HaloTextHelper.getColorRed())
table.remove(TWETempTraitsTable, i)
if #TWETempTraitsTable == 0 then
Events.EveryOneMinute.Remove(TWE_TraitCheck)
break
end
end
end
end```
now the only thing i need to do is to find out why some traits return the label properly and others don't... but thats not something urgent for now
so i started working on the next module for the mod... weather events
but cant find no info about the values to use on the trigger functions for the weather
looking through the vanilla lua, i found some values
so i think the 1st value is the type and the second duration?!
triggerCustomWeatherStage(3,48);
Tropical
triggerCustomWeatherStage(8,48);
Blizzard
triggerCustomWeatherStage(7,48);
the only value that doesnt change is the second arg... so im guessing thats the duration
and the first arg the type
but cant find any info on it
so i was guessing right... kind off
any info of what the stages represent?
but what does the stage value represent? The only examples i found are the ones on the vanilla lua that i posted above
but i guess those 3 will do
nothing happens ๐
clim:triggerCustomWeatherStage(3,48);```
no rain nothing
oops nevermind... it takes a while
ok so the float value is game time hours
debug has a Big number of tools to mess with weather. In case you want to test something in particular, once you find what you want you can use that as a reference.
debug crashes my game since the last update
thats why im "fishing"
but i wonder if i mess around in the debug-ini
and change some values to true if it will enabled the debug options that i change to true :\
You should consider asking questions here instead of trying to find one person to help you. There are probably many people with answers you need and they're all available to help on their own unique schedules, so you're better off just asking for whatever you need.
(But if you wanna send a sustained forward movement signal using your left joystick in Lua, good luck, pretty sure it's not possible or we don't know how. ๐ญ)
got the weather bit working, now moving on to more car events... was thinking it would be nice to trigger the alarm of a car or cars near the player and now im entering an area that i know nothing about...
mycar = player:getNearVehicle()```
this works if the player is really close to the car
any tips of how to detect nearby cars and trigger the alarm?
i need to try and reinstall the game again and see if this time that fixes the crash with the debug mode... fishing for code is not fun...
Did you try verifying files?
did that as well
its a pain having to quit to menu to reload lua
change the code in the file load the save again
try again... after a few loads restart the game
local vehicles = getAllVehicles()
if i print it i get a list of vehicles, but... for some reason i dont think this is correct
this is probably the vehicles available in the game...
u can check pz source, copy function logic from there and create lua function with bigger range
Reloading files using AUD should be fine in this case
hmm nothing to lose, might as well give it a shot ๐
hmmm setAlarm(true) doesnt work... lets keep fishing
@sour island hows the heat map project going?
this mod is awesome!
i give up on the alarms for now... but its something nice to add... trigger car or house alarms
The heatmap itself is done - just a matter of implementing it in EHE
Right now it uses the heatmap alongside the old player targeting if no heatmap info is found.
When you make it available for public use let me know... Wanna make a wandering horde mode, and the heat map would make a lot of things more dynamic
Anyone have any readily available snippets for checking whether the character is holding a reloadable weapon?
All I need to know is whether, not the weapon or anything else.
It's currently in the EHE repo - may release it as an API but I'm starting to dislike the steam required feature
Adding a require after the fact causes issues as servers will boot up and disable all the related mods.
Check the reload timed action there's a can be reloaded function
Thanks
There's a few things to check for - chamber(ed) rounds and such
I don't want to know if it actively needs reloading... only whether it's a weapon with the capacity to be reloaded
I actually see something promising but apparently I had to fail awhile and ask before I spotted it.
It has that behavior in there too- just saying there's two kinds of reloadable weapons
Bah doesn't give me what I hoped... booo.
There's all the related functions in there though
You might not be able to only use 1 function - but what about getMaxCapacity?
Any community-released API = drool.
@sour island getPlayer():getSecondaryHandItem():isReloadable(getPlayer()) (or Primary, obv.)
I'll have to check it out then
Example.usingReloadable = function(player)
local primary = player:getPrimaryHandItem()
local secondary = player:getSecondaryHandItem()
if primary and primary.isReloadable and primary:isReloadable(player) then return true end
if secondary and secondary.isReloadable and secondary:isReloadable(player) then return true end
end
Hey guys, think this is a good place to ask. I heard you can program mods for this game in Java and Lua, is that true?
I'm thinking of getting more involved in learning programming in Java so this might be a good start if it is possible
I heard it's frowned upon for some reason, dunno why
(making mods in java)
Ohhh they said because you can't put them on the workshop
Now I remember
You can, however, your end users will need to download an off-workshop program for injecting Java mods, and that program comes with a pretty big caveat that the Java side of modding is open season when it comes to running arbitrary code on their PCs, which may scare away some users. @drifting ore
Lua mods remain more user-friendly. Not always as good at or even able to get the job done, depending on the job, but I think a lot of modders are worried about user-friendliness. At least I am.
Is there a way to prevent commands from writing in the player's chat? For example the command "/createhorde2" writes "Horde Spawned" in the chat. Or is there a way to clear just one message from the chat ?
Yeah definitely
to add to what Burryaga said:
what's a little misleading is that you're really writing Java using Lua syntax in like 95% of the code. there isn't a true Lua API other than for interacting with certain things (events, for example). the majority is just automatically converted Java objects and methods, so it's incredibly hacky and things rarely work the way you'd expect if you understand only Lua or only Java.
Having to download more stuff just to play doesn't make much sense for users I think as well
Interesting. I'll definitely look into Java a bit more maybe it'll help me understand programming in lua here more
it'll definitely help, but if you aren't familiar with Lua's syntax it'll also be pretty confusing once you get into it. I highly recommend this: https://github.com/FWolfe/Zomboid-Modding-Guide
the code section in particular. it's helped me work around the quirks and figure out what's inherently weird/janky/busted in the implementation and the workarounds that are necessary to get things functioning properly.
nice to see that guide is still useful. need to actually start updating it at some point.
its probably the best out there currently
What is an API for gaming mods? I read a bit online but didn't fully understand. Is it another mod that you attach as a requirement for your own? Like, something really useful that your mod takes advantage of?
ya pretty much
saves you from having to reinvent the wheel, but ties you to somebody elses update schedule. Upsides and downsides
what if it ties you to yourself

if its your own api ya, lol. Or "Utility/Library" mod
think public repository you can pr to fix whatever you need fixed when you need
So like a really basic example to help me understand... A mod that lists every item and renames them to something easily usable and adds a function to extend this example, if you want to spawn cake, you could type in your code spawn(Cake)
This is like a trash example but is that what an API does in a nutshell?
ScriptManager in a way is an api
ScriptManager is what you use to modify / create new items right?
Thanks!
Ah so you simplify like Anon said, something everyone uses and make it more accessible
Instead of everyone having to make 150000 lines of code
They make 100
well it doesnt just simplify it enables new functionality too
Oh
Ya, I suppose you can call something that adds new functionality an API too, although maybe not strictly so
Sounds like fun to work on
it is an api
For example I'm writing a vehicle damage events mod, that makes collisions fire events that others can use to handle damage or other features
name=Expanded Hotwire
poster=poster.png
id=expandedhotwire
require=radialmenuapi
versionMin=41.65
description=Adds the ability to unhotwire a car and make keys if the player has high enough skills.
url=
Thanks! Saved that msg, useful ๐
So everything inside of the API mod, you can use in your own mod? Like, functions, tables, etc .?
for example expandedhotwire replaces the vanilla hotwire slices without overwriting the whole vehicle radial
in stricter languages, you're only supposed to touch the interfaces the API provides, which is the actual API part of the "API", lua is similar although most people don't seem to write it to limit access to stuff
if any mod wanted to overwrite any of the vehicle slices they would have to overwrite the entire function or do some really hacky stuff effectively making it so only one mod could replace
the api dealt with this
Oh yeah I remember now a bit when trying to learn how to use some api's websites provide or other programs
Like instagrams api
Hey guys, anyone knows whats the Brush tool/Fast Move called?
i managed to find most of them but not the Brush tool and Fast Move
player:setGodMod()
player:setGhostMode()
player:setInvisible()
player:setInvincible()
player:setShowAdminTag()
player:setUnlimitedCarry()
player:setUnlimitedEndurance()
player:setHealthCheat()
player:setFarmingCheat()
player:setCanHearAll()
player:setMechanicsCheat()
player:setZombiesDontAttack()
player:setTimedActionInstantCheat()
player:setNetworkTeleportEnabled()
player:setShowMPInfos()```
You can only use that which is allowed and provided
which in lua is any global, or local that has been returned
but lots of people just make everything global, not because they want you to access it they just don't know any better, lol
So that loops us back into using modules in lua right?
yes, thats part of properly scoping a lua project
Nice
I'm gonna learn a bit more about what goes into this and see if I can write one of my own as a test
Sounds like it could be useful to others if done properly
If you can compartmentalize some of the boilerplate or tedious things people often have to do, it likely will be. Just don't pull an ItemTweaker and become really popular while also screwing up everyone's load times, lol
I don't have much knowledge in coding but I do have a big willpower when it comes to datamining and alike so might try something with that ๐คฃ
Whats itemtweaker
a lot of "API"s on the workshop are actually libraries, and a lot of libraries are actually APIs. they're similar and definitions vary, but imo they're distinct
put simply:
- a library is a collection of useful code/snippets/functions/etc. for a fairly broad range of functionality
- an API (application program interface) is an interface (duh) for code that's either fairly annoying to interact with, in a different format/location, or for simplifying the functions normally used to access the underlying code
Interesting
which is why I said you may not call some of these things API "strictly", but colloquially its the same

pretty much a small summary though, and people argue about the definition of all of the above constantly
even experienced senior devs sometimes argue about the difference between a framework, an API, a library, and a ton of other vague terms that have been misused over generations
an API (more of a wrapper) that handles messing with item scripts. It also prints every single change during loading, which is super duper slow. What it does is actually so simple I don't think anyone should use it
print is very slow, comparatively
prints in kahlua are the devil
@quasi geode expose logger pls thx ty
IIRC Tyrir made either his own itemtweaker or some patcher for it that caches all the print strings and then just prints one big list at the end. Made it like 100x faster
paste this in the console and youll see just how slow prints are
for i=0,10000 do
print(i)
end
that should be enough iirc
one more 0 and its a crash
Is the issue because of the output render or is it laggy even without it?
To clarify - the visual output in debug mode - or is even adding to the text log also laggy?
anywhere and everywhere
Perhaps having halo text or using say() should be normalized for debug messages
Or even a custom UI that scrolls?
Personally I try to have getDebug() enclose prints
Sorry to the 6 people that legitimately play in debug mode ๐
ya, my modules always shadow print, and change its behaviour based on debug mode. I feel like its good practice
yeah imo mods should ship without any prints at all - either comment everything out or use a debug flag conditional
performance in debug is already skewed anyways, so may as well go wild with them otherwise
ISFastTeleportMove.cheat = true
BrushToolManager.openPanel(getPlayer()) --brush manager
BrushToolChooseTileUI.openPanel(30, 20, getPlayer()) --tile picker
๐
Console output is also doubled since MP release
I include a lot of prints for EHE troubleshooting - what would be an alternative? Text editing/writing?
Would it be any different to print at that point?
hmmm a ui for debug prints might be a good performance fix
though it wont work on servers
Working on a significant update to EHE so prepping troubleshooting now will shave off a lot of work later ๐
significant = flyable helicopters? 
as long as they're behind debug conditionals, I don't think it's an issue to leave it
@quasi geode congratulations
They're not - it's meant for figuring out end users issues
So it's just ID info and x/ys for events when states/target change
if its not happening every tick I wouldn't worry about it too much
If there is a way to set up a client-side-only config file where someone could enable/disable troubleshooting messages I would personally do that, but I don't know what kind of lift that is
I feel like that's on the user though, if they're trying to troubleshoot something without being in debug mode that's on them 
Thanks a lot!
drool
Hey all is ISCharacterScreen still a thing? I'm looking for it in the vanilla lua client folder but not seeing it there. I see mods calling it so it's got to be around somewhere...
media\lua\client\XpSystem\ISUI\ISCharacterScreen.lua
Xp system!!! Thank you ๐
(Good old windows explorer file search being as useless as ever, should've caught that)
Listary is a blessing
Oo I'll look into that
holy hell can't believe this has been freely available all this time. THANK YOU
why bother with a different app when VSCode already lets you search by filename 
just ctrl+P and bam
you're there
(or if you're using intellij, I'm sure there's an equivalent command)
(and if you aren't using one of those two for modding then wtf are you doing with your life)
intellij searches by filename by double tapping shift, and inside the files through a context menu, but ya I'm downloading this as soon as I get home
good to know also ty
also is there a way to integrate libraries in vscode like i have setup from the guide for intellij?
i figure i can just use the already decomplied libraries but i havent found the way to import them for usage in vscode. love intellij but its base program is super clunky and not straightforward to me
the decomped libraries should work, but capsid also produces emmylua notations which make intellij the superior choice
How accurate is the "clear description for Moodles" mod?
seems like there are many factors taken into account
it tells you specifically what stats are added/removed by the thing that causes the moodle. at least assuming you are talking about same thing. like if you obtain the ability to read nutritional values from the thing that generates the moodle. it should show that. or if you get 10% xp bonus or w/e
seems to be based on exactly what you gain/lose though for the most part. im sure there is at least one instance where it doesn't work perfectly in that regard
does that not make sense? lol
I just want to know where those buffs and debuffs are from
if you haven't i'd just check the code out. i havent seen if its a library or not
I've been going through the vanilla lua, but there are far too many points to consider
i meant the mod code ๐
you will see where it obtains the values from
if it pulls from the mod that has the moodle or if it uses its own "translated library"
The mod has no lua code. It's just a pure text translation. ๐
then easy. just converts the values into readable
that's why I would like to know where do they get those numbers
i will look at the code of the mod itself and can probably tell you
the numbers are predefined in the translation
YES
it looks like it decides what the number is
no matter what the number is
or verbiage
so if heavyload is level 4 moodle it's going to say "-20% crit. chance<br>-0.28 attack speed<br>+52% trip chance<br>-32% climb chance<br>-60% speed<br>reduced endurance<br>run/exercise disabled<br>losing HP", no matter what the value is
depending on what it pulls
I mean, I would like to know how do they get these number
from decompiled code
that's alright. Your effort to answer my question is appreciated. ๐
I've been doing that but started getting tired, so I would like to know if someone already verified the data
It's been almost a year since the mod was published, and that's before I got to know PZ
there haven't been any major changes that I'm aware of that'd affect those values in the last year
I haven't kept up with minor patches though, so maybe I missed a few
so im still trying to trigger alarm of a nearby car/house to go off... but now that i had a break and think a bit more... in vehicles the only thing i found related to alarms is 2 booleans isAlarmed() and setAlarmed(), so... i should be looking for something related to sound events to check if the car isAlarmed is true and to trigger the sound in the car location ?
thanks for the input
probably not any sort of sound-related code, the func you're looking for would be the action that's performed when breaking a window on a car
(or whatever - I don't know if things other than breaking the window can trigger it)
hmmm thats a fair point
but it'd be way easier just to search your workspace for isAlarmed() wouldn't it?
(or your decomp, if that's separate from your workspace)
been looking throught the files the whole day ๐
learned a few useful things, but also got a lot of dead ends
there's that many instances of isAlarmed?
wat
nop
i found isAlarmed not long ago
was looking just for alarm
i've been looking not only for that
got the weather triggers figured out
the fog... almost
I don't know what you mean by this
did you follow isAlarmed to see what it executes?
when i search the file contents i searched for anything containing "alarm"
in the process of it
following the bread crumbs
thats what lead me to the possibility of a sound trigger
took me like 10 seconds to find it, and I didn't even have my editor open
gotta work on your ctrl+shift+f skills

notepad ++
i do ... i just dont... like it...
intellij also works, I'm less familiar with the commands in it but it's also ctrl+shift+F there
lmao dont blame ya
is there a way to import libs for reference in vscode?
that's insane
why not?
because it's complete dogshit?
i have it setup to look inside the files
and takes ages?
never let me down so far
that's not the point LOL
okay you have fun with that

if you're a masochist that's fine, I accept you, just don't ask for help finding stuff
im not always at my main pc
so, i got used to use tools that work on any potato machine
VS Code is potato machine friendly
My PC is from 2014
I'm on my shitty laptop right now and I just found that in under 10 seconds
it's really good
but its better than intelli ๐
i like it over intellij even without libs
tons of usefull addons also to imporove productivity
i use intelliJ for decomp, VSCode for lua
i use notepad and notepad++ for lua ๐
i saw external library reference in vscode im going to look into that
only open intelli to check the syntax of things i want to use
I ditched Notepad++ since I get to know VS Code
notepad and notepad++ are dogshit
that's coming from me using notepad++ for 10+ years
i'd sooner use Sublime or Atom, but even those don't hold a candle to VSCode
there is even a web version https://vscode.dev/
as long as i can type and save file
its good enough ๐
but better is always welcome
it can run on a browser, so your potato pc surely can too
not at my potato pc
no problems running anything on this one ๐
the one i was using a few hours ago its a potato... i7 second generation
๐
still works well enough for basic stuff
i've kept my amd skt 939 x64
vscode is definitely not "optimized" its made in electron
using that is a challenge
but it still works fine for... normal daily use kind off
that pc should be hitting the 19 years mark soon
i think i got it in 2004 or something
jesus
the cost to keep that alive maybe more expensive than buying a new one lol
how thing were so dumb back then
its more like a souvenir, and retro is mainstream now... so im not a weirdo for still having my amiga 500
๐
electron is perfectly fine as long as the overlaying TS/JS is written decently, and it is
speaking about perfomance... lets check on the app and see if its still working... left it running on a potato pc and should be running for about 6h now...
so if it works well on that junk, it should work on any modern pc
maybe if you have like 2GB of RAM, but otherwise it's perfectly fine as far as native-web goes
i'm on a shitty old i3 and I can run electron apps just fine lol
which is why i said "optimized"
the quality of the code matters way more
there isn't really a good alternative, either
electron is pmuch the best option there is
exactly
refer to what was said here
theres is always a trade off no matter what the language
...if "dev speed" is "make your team re-code across several languages, platforms, and targets" then... sure?
but that'd be insane
some have more of a trade off than others
Would someone happens to know if I put a function on WorldSoundEvent client side and call sendClientCommand will the command server side be triggered multiple time if there's multiple player around the sound event ?
like, no one would reasonably do that - because it'd be stupid
that was the coding world for a lot of time
im not sure what youre trying to argue here i simply said vscode is built on an objectively slow platform though it doesnt need more performance
it would trigger for each client
I wouldn't call it a slow platform by any means, and it isn't unoptimized. just because something is faster doesn't mean that the thing it's faster than is slow
like, I'd consider Usain Bolt pretty fast. but a jet is faster. does that suddenly mean usain bolt is slow? nah.
yes
but comparing a native-focused, restrictive, non-portable desktop app to a web app is ridiculous (like comparing a runner to a jet)

this has escalated quickly
anyway these technologies give me a job

ty
getNearVehicle has a very limited range
nah this is normal convo for these guys. see these debates randomly all the time between certain groups. love reading haha
need to find another way
ah
zombies, items, traits, helis, weather, and some car events done
now to add more stuff
i thought there was a chunk option also
also trying to work on the fog
or at least beiung able to trigger by that. i also gues i dont know how you are trying to implement it specifically
but thats not a priority
there are two mods using fog very sepficially that will help you
one is by soul filcher
toxic zones
well, when i figure out howto implement it ill let you know :D... still fishing for ways to do it
helps define zones for that type of event at least. not sure if it uses fog though so maybe not great for this usage but maybe could be for other things. i'm looking for other options for the alarm
maybe the unused vanilla will work better for that function lol
i see a commented out section that is supposed to do same thing
ill probably need to define a radius and sort through the objects in that radius and grab all the cars found
no idea if thats outdated or just unoptimized
thats probably your best bet honestly
yeah... then from what im reading if the car has the keys in the ignition the alarm wont trigger...
now i know why this one didnt trigger the alarm when i tested the command
Could you tell which channel do you make this mod for? 
anyone who streams on twitch can use it
it uses a app with the twitch api library built in
so as long as you have an account on twitch you can use the mod
made the 1st version around one year ago, perhaps more ...
i think i saw someone also grabbing object and using car parts instead of whole car also
so im re learning everything i knew about pz modding...
been there done that ๐
i use that for the car events ( engine stall, drain gas, etc )
also finished the temporary traits option thanks to @dull moss
and the channel it was originaly made for... until other streamers started anoying me to put the mod on the workshop was https://www.twitch.tv/them3ss
the 1st version depended on virtual keypresses sent from touch portal... so this time i thought... just make your own app and make the config easier for anyone who wants to use it, and also, that way i dont have to worry about the limitations of the software used as middleman between twitch and the game
if i want to do something i just code it in the app and make the mod deal with the app response
ok got the alarm thing sorted. now just need to make a function to grab all cars in a raius and randomly set the alarm of one or more
but first... find out how to stop the damn alarm lol
Reminds me.. I need to update the LuaCommands Java mod for streamers to craft custom commands for their Twitch channels.
@alpine scroll
Am approaching having enough time to work on things again. =)
well when code doesnt work just pull the battery out...
isnt that related to when the alarm is disabled?
ok im just being dumb as usual
forgot to set isAlarmed back to false
oh lol
๐
was gonna say removing battery isn't ideal so glad you got it figured out
it isnt but its better that the thing not shutting up
nice, followed now lol
i use both
is anyone a good coder?
Because I need someone for it
I tell you why I want a coder so DM
why dont you just say what you need? And maybe someone around can help you out
I'm planning to make a mod M3ss
I won't take the credit to myself
I just want to make a mod where cars can have snow on them when It's snows
That's what I need
If there's no help for me then I'm fine with it
I know there is mod that has it
If I add an event that already exists, will it run the same event twice? Or will it just not add bc its identical
im sure someone around can provide some help, im just not one of them, know nothing of how to do something like that
Event var1 = (Event)EventMap.get(var0);
if (var1 != null) {
return var1;
ngl, I am unsure which this answers lol...
I am basically trying to add a function to the event manager when the player does a specific thing, but I wanna make sure that it wont get added multiple times with repetition of that action lol
That's hard to understand
do you want to make a new Event like OnTick
or add a function to an event that already exists?
Nice. I like the idea.
Do you want to mod the textures or both the model and the textures?
(Imagines lumps on the car)
see, you already found someone to help you ๐
It'd also be cool to add the option to blur the screen when the windows of the car fog up from the difference of temp inside and outside.
Will be possible once I release my shaders core mod. (Plan to in the coming week)
There's this mod
But it uses rust
as the format it's just a texture
I want it to be more then that
That might be cool
I wouldn't blame them for the texture-only application.
What would be cool is if you could add child-models to the parent-model being the car. That way we could add 3D snow clumps as an additional model to the car without having to modify the car model.
_>
<_<
I see
Would be epic to get that sort of solution. (model hierarchy)
Sorry- I am trying to hook onto Event.EveryOneMinute
I do Event.EveryOneMinute.Add(MyFunction) that triggers when the player consumes a specific item. Then, that function has its own exit, where it will count the remaining duration and then when that hits 0 will do Event.EveryOneMinute.Remove(MyFunction)
I just want to make sure that when I add my function to the event manager, it wont create duplicates. So- I dont want 20 instances of MyFunction running if they consume 20 of the item. If that makes more sense
Going AFK. Clocking out of work.
Man PZ is so alien to me with 3D models.. That's definitely a good thing to see them in the game now.
woot.
iirc the kentucky vehicle overhaul mod does that for the vanilla ones. And plenty of the modded vehicles come with that by default
then you should check that counter, if the counter exists don't add it again
Theres a trigger() something like that.. it triggers events so technically u can create own events
otherwise check length of counters, no sure on the exact format
You can play and use them in game as well
Which is pretty cool
There's only two of these models that has interiors
i remember seing a mod that added realistic action into a military truck, like opening doors, hood etc
pretty cool
Item consumed adds onto that duration- So taking multiple items would increase the duration without multiplying the function ๐
with very well designed animations as well
use a counter then
That's right
I guess you guys glossed over my post, lol
replaces all the vanilla vehicles with ones with animated doors and trunks and stuff
you need to use a counter to control the time remaining of the effect, not to add another event
so if someone has the buff or debuff from consuming food, everytime they do it if the counter > 0 then just add to the counter
if the counter reaches 0 the buff or debuff is removed
What do you mean?
i actually did something similar for temporary traits yesterday but based on real world time
someone asked about if this was built into game or not. while the functions are, the usage isn't. that is what anon was sharing.
@winter thunder
local playerChar = getPlayer()
local calendar = PZCalendar.getInstance()
local hour = calendar:get(Calendar.HOUR_OF_DAY)
local minute = calendar:get(Calendar.MINUTE)
local second = calendar:get(Calendar.SECOND)
if hour == 0 then --check if its 0, if true replaces 0 with 24
currentTime = (24 * 60 + minute) * 60 + second
else currentTime = (hour * 60 + minute) * 60 + second
end
for i, v in ipairs(TWETempTraitsTable) do
local trait = v.trait
local endtime = v.endtime
if endtime <= currentTime then
playerChar:getTraits():remove(trait);
HaloTextHelper.addTextWithArrow(playerChar, getText("UI_trait_"..trait), false, HaloTextHelper.getColorRed())
table.remove(TWETempTraitsTable, i)
if #TWETempTraitsTable == 0 then
Events.EveryOneMinute.Remove(TWE_TraitCheck)
break
end
end
end
end```
thank you also. didn't know this was a thing
I see
local drugDuration = itemMD.SPDurations
if drugCore.SPDurations.Stimulants == 0 then
drugCore.SPDurations.Stimulants = drugCore.SPDurations.Stimulants + drugDuration
Event.EveryOneMinute.Add(BaseStimulantEffects)
else
drugCore.SPDurations.Stimulants = drugCore.SPDurations.Stimulants + drugDuration
end
So- Something like this? That way I don't add the function unless the duration is already 0
I know it has a lot of my own specific naming- But it basically checks the mod data of the item for the duration value, and the mod data of the player for the remaining duration
I don't think events are duplicated
Oops wrong comment srry
@winter thunder
yes, you can move the + out of if
local drugDuration = itemMD.SPDurations
if drugCore.SPDurations.Stimulants == 0 then
Event.EveryOneMinute.Add(BaseStimulantEffects)
end
drugCore.SPDurations.Stimulants = drugCore.SPDurations.Stimulants + drugDuration
Like you can add an event several time it won't trigger multiple time
some mixing of terms here. OnTick is an Event, the functions you pass to it don't really have a name, but EventHandler would be more apt
trying to add the same Event multiple times does nothing, but multiple handlers to one event is different
I mean having a function added multiple times to an event
Is that true?
it makes the game go bananas sometimes
i made the game crash yesterday
because i added the same function several times
If Events.OnEquipPrimary.Add(OnEquipPrimary) is added 10 times the function won't trigger 10 times when you actually equip a primary
but i was using the lua interpreter inside the game
At least from what i've seen in debug
so that might be the reason why
thats good, but I assume if you pass a closure rather than a pure function it will probably consider it a separate thing
i need a break from raging at my code, so ill guess ill go rage at hs rng ๐
Kahlua handles functions as closures. I'd say that if you loadstring the function or compare as a string then yeah it'd not be equal.
You could also wrap the function inside of another.
just saying that Events.OnTick.Add(myFunction) will probably ignore extra calls with but Events.OnTick.Add(getMyClosure(data)) probably won't, even with the same data in the closure
Kahlua's vm translates back and forth with functions as LuaClosures.
I'm clarifying for anyone who doesn't know.
All good.
zxTest = function()print("test") end
for i=1,10 do
Events.OnContainerUpdate.Add(zxTest)
end
--then do
triggerEvent("OnContainerUpdate")
10 prints
@golden sparrow
mystery solved, extra registrations are no good
Events uses equals check as a map of collections and I think that the hash code is calculated in LuaClosures.. not 100% sure..
Yup.
Oh okk is that client side ?
SP side?
I must have been wrong in my belief good to know ๐
so then, what does this do? ๐ค
Events.OnTick.Add(myFunc)
Events.OnTick.Add(myFunc)
Events.OnTick.Add(myFunc)
Events.OnTick.Add(myFunc)
Events.OnTick.Remove(myFunc)
Everyone act cool- We have a new celebrity typing ๐
each Event is basically a ArrayList of LuaClosure's. .Remove is mapped to ArrayList.remove, so should remove the first matching entry
well there we go
so keep track of your event handlers, cause this could get out of hand quick
Ughhhhh.... I am still having errors pop up in game ๐ญ
I would really appreciate having someone look over my Lua. Idk if I am handling my tables incorrectly, but I am consistently getting issues with the game reading/writing to my mod data
post it, if you dare
Bet- I have no shame
This is a function triggers as an OnEat function
function TakeMeth (food, player)
local modData = player:getModData().StreetPharma
local drugCore = modData.SPCore
local itemMD = food:getModData()
print("Player has taken drugs.")
local drugPotency = PotencyMod(player, itemMD.SPPotency)
drugCore.Stimulant = drugCore.Stimulant or 0
drugCore.Stimulant = drugCore.Stimulant + drugPotency
print("drugCore.Stimulant = " .. drugCore.Stimulant)
if drugCore.SPDurations.Stimulants == 0 then
Event.EveryOneMinute.Add(BaseStimulantEffects)
print("Began Base Stimulant Effects")
end
local drugDuration = itemMD.SPDurations
drugCore.SPDurations.Stimulants = drugCore.SPDurations.Stimulants + drugDuration
end
this is the PotencyMod function called in the middle there
local function PotencyMod(player, potency)
local base = 1
if player:HasTrait("Emaciated") then
base = 1.5
elseif player:HasTrait("Very Underweight") then
base = 1.25
elseif player:HasTrait("Underweight") then
base = 1.1
elseif player:HasTrait("Overweight") then
base = 0.9
elseif player:HasTrait("Obese") then
base = 0.75
end
if player:HasTrait("IronGut") then
base = base * 0.9
elseif player:HasTrait("WeakStomach") then
base = base * 1.1
end
local finalPotency = (base * potency)
return finalPotency
end
And this is my function that initializes the mod data on the player
function InitializePlayerDrugData()
local modData = getPlayer():getModData()
modData.StreetPharma = modData.StreetPharma or {}
local playerMD = modData.StreetPharma
playerMD.SPCore = playerMD.SPCore or {}
local drugCore = playerMD.SPCore
drugCore.Stimulant = drugCore.Stimulant or 0
print("drugCore.Stimulant = " .. drugCore.Stimulant)
playerMD.SPDuration = playerMD.SPDuration or {}
local SPDuration = playerMD.SPDurations
SPDuration.Stimulant = SPDuration.Stimulant or 0
print("SPDuration.Stimulant = " .. SPDuration.Stimulant)
playerMD.SPDrugTiers = playerMD.SPDrugTiers or {}
local SPDrugTiers = playerMD.SPDrugTiers
SPDrugTiers.Stimulant = SPDrugTiers.Stimulant or 0
print("SPDrugTiers.Stimulant = " .. SPDrugTiers.Stimulant)
print("Initialized Player Mod Data for StreetPharma")
end
Events.OnCreatePlayer.Add(InitializePlayerDrugData);
And, here is an example of one of the item scripts
(names are currently just for testing purposes lol)
item MethBagBlue
{
DisplayName = Blue Razz Meth (Caffeine),
Type = Food,
Weight = 0.1,
HungerChange = -10,
WorldStaticModel = MethBagBlue,
Icon = MethBlue,
CustomContextMenu = Smoke,
OnEat = TakeMeth,
SPPotency = 1,
SPDuration = 15,
}
will be cool to see error msg too 
@sour island btw can u add button to delete single error and completely clear the list of ones in errorMagnifier?
which line in InitializePlayerDrugData is 116?
what's 116 line?
This one
playerMD.SPDuration = playerMD.SPDuration or {}
local SPDuration = playerMD.SPDurations
SPDuration.Stimulant = SPDuration.Stimulant or 0 <----- This one
print("SPDuration.Stimulant = " .. SPDuration.Stimulant)
SPDurations vs SPDuration
lel
obviously its hard to see, or we would have just pointed it out instead of asking for the line
I can try - but I should point out the errors are handled as keys so they can't repeat
A quick question, I've been analysing some code and very often something like that appears:
aFunction():anotherFunction():someOtherOne()
just want to know if that's like a function inside a function or they just return a table
isnt that effectively the same as something like
getPlayer():getStats():getHunger()
For a base code equivalent ^
It depends on what things you are calling- Like, if I put getPlayer():getModData().Example
Mod data returns a table, and .Example is the specific variable on that table I am referencing
yes, Ik but anyway if there's more errors better to clear the list and see new error as single
oh, thanks, btw, I've seen getModData() but I'm not sure what it means. It's like a unique id for an entity?
fair enough, I wonder if I can flag removed errors by how many times they repeat
Mod data is a table on players, items, and a lot of other things. It holds whatever you want it to.
So- In item scripts, there are specific variables the game recognizes and knows how to handle. If you add in a variable that the game is unfamiliar with, it will treat that as mod data.
On the player, you can set mod data to keep track of things as well. It is also a table, which can have subtables and variables written to it. So- If you wanted to keep track of the total number of oranges the player has ate, you could create a new variable and function to track that.
--Pretend this function triggers when the player eats an orange lol
function ThisTracksOranges()
getPlayer:getModData().Oranges = getPlayer:getModData().Oranges or 0
-- This funciton would create our variable, so that we dont accidentally try to instance a table that doesnt exist.
getPlayer:getModData().Oranges = getPlayer:getModData().Oranges + 1
-- Now that we are 100% that it exists, we can modify it
end
what do you need it for?
if you scroll up a little and look at my code, you can see some ways I use it
btw not so good way to create this one
hard to see structure of table
any advice on how I could do it better? Just working on getting my testing branch working as intended, there are a lot more variables to be added to that...
lol
are your 3 tables only 1 deep?
If you use this or AUD
https://github.com/ChuckTheSheep/pz-modding-community
You can view your modData
It is 1 table, with the added sub tables. Right now, they are only 1 deep, but that is because my main branch had too many moving parts that I couldnt tell what was breaking lol, so I gutted everything except what was 100% necessary to bug test
local modData = getPlayer():getModData()
modData.StreetPharma = modData.StreetPharma or {
SPCore = {
Stimulant = 0,
},
SPDuration = {
Stimulant = 0,
},
SPDrugTiers = {
Stimulant = 0,
},
}
this won't initialise new values if you change the format, but since your mod isn't out yet that's not a concern
so it's a place where you can store custom variables... does it come empty by default?
I'd suggest making pseudo-objects and use copyTable
if u will some change in structure in future, for example, create new key:
local modData = getPlayer():getModData()
modData.StreetPharma = modData.StreetPharma or {
SPCore = {
Stimulant = 0,
},
SPDuration = {
Stimulant = 0,
},
SPDrugTiers = {
Stimulant = 0,
},
}
-- new key in SPCore
modData.StreetPharma.SPCore.NewValue = modData.StreetPharma.SPCore.NewValue or 0
-- new table in StreetPharma
modData.StreetPharma.SPNew = modData.StreetPharma.SPNew or {}
modData.StreetPharma.SPNew.NewValue = modData.StreetPharma.SPNew.NewValue or 0
It's a free table to use as you please - automatically saves to the object it's attached to -- there's a few caveats to this rule
@winter thunder I'd even suggest flipping the key/values but that might be personal preference
I also don't know how your system works but seeing as there's 3 values tied to stims
you could do stimulant = {core=0, duration=0, drugTiers=0}
yeah i was thinking the same thing
There is going to be 5 categories of drugs, and probably more than 5 variables that key off of them
So its going to be a bit of a mess either way- But I will 100% consider that haha, sounds much cleaner
what do i use to make the text appear above head? teehee
halo text or say()
ty
what does core and drugTier do btw?
But yeah @sour island I think that will be a lot better- Would mean I can have ~6 tables to hold all the info, instead of a new one for each with the 5 dug cats under each one lol. Appreciate the advice
Core is where I store data relating to toxicity, cumulative potency, and categoric potency of the consumed drugs.
Drug tier keeps track of the "tier" of drug high the player is experiencing, I didnt post the function that utilizes that, because that would have been a huge block of unneeded code lol
Basically allows me to use the moodle framework to mimic the same tiered effects of other things in the game
local drugData = {ID = "noID", core = 0, duration = 0, drugTiers = 0}
---creates an unreferenced copy of the table
local function newDrugData(ID)
local newData = copyTable(drugData)
newData.ID = ID
end
So this would allow me to do something like
modData.StreetPharma = modData.StreetPharma or {
Stimulant = newDrugData(Stimulant),
Depressant = newDrugData(Depressant),
etc, etc, etc...
}
???
it wouldn't work as efficiently in the case you have now as there's 3 different lists
it's a copy of a table - recursive and unreferenced
you could create a table for streetpharma and copy that over
if there's a specific structure you want - with default values
local drugData = {
SPCore = {
Stimulant = 0,
},
SPDuration = {
Stimulant = 0,
},
SPDrugTiers = {
Stimulant = 0,
},
}
---creates an unreferenced copy of the table
local function newDrugData()
local newData = copyTable(drugData)
return newData
end
Using what you have atm
Wouldn't really cost cut in this case although it might make your functions look a bit neater
Hey guys, I'm getting a WorldDictionary error about a missing script for my item here...
ERROR: General , 1674180190822> 0> zombie.world.WorldDictionaryException: Warning client has no script for item Base.Disc_Homemade
But the script looks like this:
What am I doing incorrectly?
PPZCDs.Disc_Homemade
You're apparently referencing Base.Disc_Homemade somewhere, but your module is PPZCDs
@rain shard
Nice.
Looking at github actions -
# .github/workflows/release.yml
on:
push:
tags:
- 'v*.*.*'
jobs:
build_addon:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set VERSION env
run: echo VERSION=${GITHUB_REF:11} >> $GITHUB_ENV
- name: Build addon with HEMTT
uses: 16AAModTeam/hemtt@stable
with:
command: 'build --release'
# Upload to Steam Workshop
- uses: arma-actions/workshop-upload@v1
with:
appId: '107410' # default
itemId: '1643238133' # Id of item to update
contentPath: 'releases/${{ env.VERSION }}/@armaforces_mods'
changelog: 'Content of change notes'
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
wondering how to inject a changelog based on the repo's comit names
๐ค
or even generate a changelog based on something in the commit like 'changelog: x'
any gitHub heads?
does anyone know if makeshift radios spawn on their own or are they craft only ?
if I took and changed the text in media/radio/RadioData.xml, would it change what text is shown in the game when the radios are playing ?
Has anyone had any success actually implementing their own custom CDs? Despite everything mirrored the recording doesn't seem to be in the list itself.
If you use the lua function stuff you can parse the ingredients to look for certain things
just use an oncreate to swap it for another item?
nah, in recipes ingredient section you can use functions too
well, I'm making a food recipe that I want them to cook, and once it's cooked I want that to be used in a new recipe
so is it possible to use sandboxvar with a recipe? lol
im trying to do something like this right now
recipe Open Supplies
{
EmergencyFoodSupplyBox,
keep [EHE_Recipe.CanOpenBoxes],
Result:NoticeFlyer,
CanBeDoneFromFloor:true,
OnCreate:EHE_Recipe.FOOD,
Time:70.0,
Sound:OpenBox,
}
function EHE_Recipe.CanOpenBoxes(scriptItems)
scriptItems:addAll(getScriptManager():getItemsTag("CanOpenBoxes"))
end
You can have the script manager parse through possible usable items
OnPerform / OnTest can be used to remove ingredients that don't match what you want
also isCooked and setCooked are things
I guess I can do an OnTest and have the character say it needs to be cooked
if onTest fails it won't appear as a context
hmmm
Trying to ponder how to communicate that to the player then
{
Yeast,
destroy WaterPotSlurry,
Result:UnfermentedSlurry,
Time:50.0,
Category:Cooking,
OnTest:Recipe.OnTest.isSlurryCooked,
OnGiveXP:Recipe.OnGiveXP.Cooking10,
}```
In this case Yeast wouldnt be cooked eitherway though?
yea, but I want the WaterPotSlurry to be cooked
ah
OnCanPerform:
vanilla has a lua -- for testing if food items are cooked or burnt function Recipe.OnCanPerform.SliceCooked(recipe, playerObj, item) return item and (item:isCooked() or item:isBurnt()) end
@sour island btw need to do when u opens the error menu put error panels on top of other ones 
yea, I perusing that, I wonder how I can communicate that to the user
hm?
they popups under active panels
ah

@sour island is blue 
After much trial and error, I got this work by doing the exact same thing I did in the beginning.
Replaced the function in debug menu with my own that pulls the functions and names from the tick boxes
Well... I tried: https://steamcommunity.com/sharedfiles/filedetails/?id=2920683818
lol, a fitting preview to end a really disappointing mod.
couldn't get it to work with controllers?
If i create a function from a client that dmgs zeds will ot require sendclientcommand to server?
no
Nice
Or maybe i should i run it server sided like checks if player is equipped with chain saw and is aiming then if adjacentile == zombie:getSquare
Is anyone familiar with WordZed enough to answer this question:
Is there a way to make a radio station that plays at a later date than day 0 that isn't just adding a million broadcasts to hit the day range you want?
Also do you need to use wordzed to edit the dialogue in the radio ? I am changing radiodata.xml and was wondering if its enough on its own, just replacing.
AFAIK, you should be able to edit the xml itself because it pulls the GUID to play the dialogue itself-- though radios are kind of something I'm not 100% sure about because they're different from VHS/CDs.
WordZed itself is for making new TV Stations and Radio Stations
Yeah I am just after replacing a bit of the dialogue on the radio. I am not adding a new station or anything like that.
Though it is one big file, taking a while ๐
What I would do is change just a sentence for a radio broadcast you now plays, load up in debug, see if it loads that altered line and blamo
Then you know you can continue editing the XML
how would I do that in debug ?
Just spawn a radio, tune into the broadcast
Hello instead of zombie updates updatingg fonctions like this one checking if zombie isAttacking is there a way i can check the same way but only when the zombie bites/damages the target, i am having a problem with zombie isAttacking excueting before the target gets hit meaning player cant fight back needs a ranged wp or some type of handweapon like spear
Guten tag, is there's a way on how to make a helicopter mod for PZ?
I already have the asset but haven't figure out on how to make it work for PZ
progress for anyone interested:
eliminated the AUD panel, integrated it into the debug menu, changed the icon of the button, replaced the cheat menu with a panel of toggable buttons
best part are the panels are instanced and just need a title and a list of functions fed into it
Also, I don't believe AUD had highlight colors for the buttons so I added some
๐ 
yea thats really nice


