#mod_development
1 messages ยท Page 82 of 1
so even if that's coop game that he's hosting he can't just change lua in middle of game?
in middle in the game not even in single player
of*
if you change a lua file you have to reload the lua, for that you need to go back to the main menu and load the save again
both the server and clients need to have exactly the same files
i know, we had same lua after it was edited
you cant connect without disabling the lua checksum
hosted runs a server
cause it's just a coop
if that's important it's option of hosting coop, not just dedicated server
disable lua checksum
is that the only option? i also don't know how to do that
all 3 split screen users malding
you also should move the mods out of the workshop folder and into the normal mod folder
not sure if it also does a checksum with workshop
i've read that disabling anticheat is enough (cause it also disabled lua check), i'll check that later
thanks for help
pz has anti cheat?
kind of
yes
thats new for me... what anti cheat does it have?
how does it distinguishes cheats from lua modding?
AUD has an in-game reload - but it's highly dependant on how the functions are written to have any effect. Stuff like Events.X.Add would be a done deal unless the author incorporates a remove somehow
so it depends on the code of the mod, so mostly you need to back to the menu and let the game reload lua when starting or loading a game
thats nice tbh
Yeah, the most I've used it for was UI
nice to know
I'm currently working on a facelift of sorts on AUD
Right now I'm working on merging it with the vanilla debug menu - but eventually I'm going to see about getting the reload to perhaps behave better
oh i "broke" EHE
Oh?
yup... added a wrong event syntax and that savegame is dead
Errors?
What's the error - I can write in a parser
gimme a second ill check the log
function: eHeliEvent_OnHour -- file: ExpandedHelicopter06_EventScheduler.lua line # 306 | MOD: Expanded Helicopter Events.
[12-01-23 20:44:44.480] ERROR: General , 1673556284480> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: __le not defined for operand at KahluaUtil.fail line:82..
[12-01-23 20:44:44.480] ERROR: General , 1673556284480> DebugLogStream.printException> Stack trace:.```
thought it was my mod, unloaded it but it kept spiting the same error
i broke something on that save
lemme get the rest of the errors
function: eHeliEvent_OnHour -- file: ExpandedHelicopter06_EventScheduler.lua line # 306 | MOD: Expanded Helicopter Events.
[12-01-23 20:36:09.698] LOG : General , 1673555769698> Event 1:.
[12-01-23 20:36:09.698] LOG : General , 1673555769698> Start Day: 1.
[12-01-23 20:36:09.699] LOG : General , 1673555769699> Start Time: 1200.
[12-01-23 20:36:09.699] LOG : General , 1673555769699> Preset: raiders.
[12-01-23 20:36:09.700] LOG : General , 1673555769700> Triggered: true.
[12-01-23 20:36:09.700] LOG : General , 1673555769700> Event 2:.
[12-01-23 20:36:09.700] LOG : General , 1673555769700> Start Day: 1.
[12-01-23 20:36:09.701] LOG : General , 1673555769701> Start Time: 1300.
[12-01-23 20:36:09.701] LOG : General , 1673555769701> Preset: raiders.
[12-01-23 20:36:09.701] LOG : General , 1673555769701> Triggered: true.
[12-01-23 20:36:09.701] LOG : General , 1673555769701> Event 3:.
[12-01-23 20:36:09.702] LOG : General , 1673555769702> Start Day: 1.
[12-01-23 20:36:09.702] LOG : General , 1673555769702> Start Time: 1300.
[12-01-23 20:36:09.703] ERROR: General , 1673555769703> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: __concat not defined for operands: Preset: and null at KahluaUtil.fail line:82..
[12-01-23 20:36:09.703] ERROR: General , 1673555769703> DebugLogStream.printException> Stack trace:.
[12-01-23 20:36:09.708] LOG : General , 1673555769707> -----------------------------------------```
and the reason why i think was the time i used before using it properly
from this point on, everytime there was an event it would call the event but spit an error out
reseting the events in the mod menu did nothing... it crashed the game
but i doubt anyone else will have this problem
just to let you know
There are a set of actions that are supposed to be initiated on the server side. If they're not, you get kicked
but even so... you can still cheat with a mod right?
there's also a few bits and bobs where the client tells the server if it's in debug mode, or if you have god mode turned on
it amazes me how smart some of you are
if you were to modify the java core of the game, you could make it calculate the checksum from unmodified files whilst loading entirely different ones into the lua state
so yes, it's a script-kiddie defeater
that makes sense
if you were to modify the java core of the game you could do so much more than cheese the checksum
the anti cheats arent descriptive for a reason so wont comment much more
thats more like a game protection than an anti cheat from my point of view
i can still force god mode using lua
its just a deterrent
at least in sp
you can, but then it will set a bit in a certain type of packet and the server will find out
but if youre forcing god mode through lua on a server the file is meant to have passed the checksum
so its assumed as intended
thats not what the anti cheats prevent
ive said enough to piece together things
but i understand
actually, no, if the lua matches on the server and client and it turns on god mode on that client, the server absolutely will still kick them if they don't have a privileged account level
devs have asked us to not clarify things too much
sure but its a kick... kicking cheaters is not a way to deal with them
but cheating in this game... would take all the fun out of it
yeah, the kind of people who want to use it will go and join PVP servers to grief folks
thats a particular point of view. People who regularly cheat in MP games get their kicks from having that kinda of power over other people
osnap
cheating on a sp game i can understand why some ppl do it... mp... wheres the fun in that?
sure high KD ratio or whatever... but... you didnt earn it and at the end of the day youre still bad at the game no matter the numbers
so no braggin' rights there
to annoy and upset
but yeah, cheaters were one of the reasons i stopped playing fps
let me guess... CS:GO?
and not only
the last drop was the cheating idiots on pubg
they killed the game
bf3 also had a rough period with cheaters all over the place
any game thats has a kd and goes mainstream will have a problem with cheating
doesn't even need a KD ratio, just look at online chess ๐
some developers can solve the problem or at least mitigate it, some dont
kd wr mmr
theres always a number behind the cheating reason
the most on you face cheating i've seen was on bf3... getting killed from 200 meters away with a defibrilator leaves no doubt if the other dude was cheating or not ๐
anyone knows if they are gonna improve the mod downloading when joining the server? I never had problems so far, but i have a few players that get stuck after downloading a mod when connecting to the server... they then need to unsubscribe the mod and subscribe again or the server keeps saying they have a diferent version and its the same version both on server and client
or perhaps i have something wrong on the server configs...
or is it a steam problem?
@sour island - heres the bit i think its where i broke the mod by sending invalid parameters to it
https://pastebin.com/LDEQHziZ
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
the first problem is common and yeah, pretty much everyone just unsubs and resubs.
The second problem is common when the client is up to date but the server is not and needs a restart
everything is up to date... according to what im reading from one of my viewers complaining: Server, Malformed packet detected. Type 21.
and he even reinstalled the game
so im just gonna turn off anticheat 21 i guess?
so I saw someone saying here that you should do events like this
local function initializeTraitsLogic(playerIndex, player)
Events.OnZombieDead.Remove(onZombieKill);
Events.EveryOneMinute.Remove(oneMinuteUpdate);
Events.OnZombieDead.Add(onZombieKill);
Events.EveryOneMinute.Add(oneMinuteUpdate);
end
Events.OnCreatePlayer.Add(initializeTraitsLogic)
```so if character dies and they create new one without leaving to main menu, it doesn't duplicate events. Is that correct?
at first i thought it might be some mod that got update but some files got left behind
every one minute?
isnt that a bit much?
and im confused
if a zombie dies removes onzombie kill everyone minute removes oneminute update and on zombie dead adds zombie kill
what i see is when you create a player you run the function
it removes the events and then adds them again
I do this kind of stuff, yes, Music.
the events are binded to the player char?
so you do that to make sure its working on the right char?!
no, the events are not
LOG : General , 1673569637654> ETW Logger: modData.FearOfInside: -1
LOG : General , 1673569637668> ETW Logger: modData.FearOfInside: -2
I almost always remove before adding functions to events unless I am 10000% that function could not have been added before I am adding it... and even then I might remove it first because honestly I don't see the harm
lel
for it to have practical meaning, you should remove the events when the player's character dies
meh
that makes more sense
i'd rather remove before adding
otherwise, you're just deleting and adding the event all in the same tick, which is pointless
dont need to have event in 2 places then
so im not the only thinking that?ยป
Splitscreen?
only one...
would two splitscreen players trigger two OnCreatePlayers?
Based on my guess that it would, I tend to follow the Remove-Add practice
who cares about spitscreen players 
it would, yes
lol
In prep for making my mods coop splitscreen compat
so without split screen, the code is pointless
with split screen, it's actively harmful
if my mods dont work in split screen i do not care
Why harmful?
oh I take that back, it'll delete itself first so it won't do anything bad
^
Yeah it doesn't do anything tmk to delete a nonexistent function on an event
Whereas double-adding can completely bork a loop
so its just to make sure nothing else is there?
either way though, why do you need to defer your events to player creation?
I do not always but for events that use playerIndex and player it's p convenient
that i think i know why, since you may die and make a new char
Both are passed automatically
that way it inits when a new char is made
Again, I do not assume player 0 in any of my mods.
I am working toward splitscreen compat
er, for events that pass you a player... how are they going to fire if the player is currently out-of-game due to death?
Not there yet but have made many steps toward it in many places
OnCreatePlayer passes a player, that's all. I was only saying why I would add the event then. Possibly I am adding an event that I want to trigger immediately after instantiating some player data.
It's just convenient to add the listener right there.
i still fail to see the point of doing that, but if it works for you good...
If the player dies with the events die with it
E.g., load mod data on the player and then begin the event.
Maybe not the "best" way, but, yeah, if I know something works and isn't slowing things down (notably), I tend to let it be lol.
there absolutely is value in minimising event registration; the less stuff you have registered and the less time that stuff spends registered, the more CPU cycles you save
but I don't follow how having a function that instantly unregisters and reregisters achieves anything
Only if the registration might be triggered twice in a row... e.g. when adding and removing listeners on the basis of async events.
99.99% of player time is spent in the game, not character creation. if you're concerned about CPU use of your event hooks while the player is just creating a character, their experience when actually playing is going to suck
If u are on debug
And you want to restart the code
If you dont have something to unregister the function then it might get doubled
Like onfill shows multiple instances of the same context menu
No it's not the CPU use, sometimes double-adding an Event hook can bug the purpose of the hook entirely.
im still trying to understand the point as well
Doing something twice that needs to happen once per tick e.g. can cause issues depending on the situation.
yes, you definitely should not be double-registering
It can be harmless, but also can cause issues.
even if harmless, it's wasted cycles
But no I am not worried about CPU usage with stuff like this
nothing thats does nothing is harmless in coding
Compared to code breakage that is
I mean if I know how to make something a little faster but not less legible I generally will, of course.
thats like going into a car starting the engine
then stoping the engine
and starting it again
if you register your events at the scope of the lua chunk (i.e. not nested inside anything) then you have no concerns about it being double registered
That's fair. But I add and remove events based on whether they need to exist. I guess perhaps that's a waste of energy is part of what you're suggesting
You would perhaps add them all and just let them return nil when unnecessary
but thats a different thing
Which I SOMETIMES do
its not remove add
it's not if there's some amount of frames passing between it being unregistered and reregistered
There are in my case.
worth it
well it works for you, so im glad... gonna stop melting my brain over it
#1 rule of gaming: amortise your processing costs across as many frames as possible
thats the same as writing some code to do X
and instead of creating a function and call it when needed
you just copy paste the code..
it works yes
but not the best way
Makes sense.
I've considered adjusting my recovery mod so it heals different things on different ticks but it feels like micro-opt lol
(Context: recovers basically 9 different character stats every 300th tick, all on that tick. Has to do some checking and arithmetic for each. No noticeable slowdown on my PC but meh lol sometimes I get an urge to try to be unnecessarily fancy)
first, benchmark
Yeah fair.
so question for ModOptions dev users out there
I got following lines in the body of my lua (not in the specific function)
local SBvars = SandboxVars.EvolvingTraitsWorld;
local notification = EvolvingTraitsWorld.settings.EnableNotifications;
if I change sandbox settings midgame, changes come into play instantly.
if I change modoptions, it doesn't change shit
oh
wait its cuz it passes value and not a reference
cuz EvolvingTraitsWorld.settings.EnableNotifications is not a table
right?
You can change mod options manually during gameplay but it will not be reflected in the Options menu so I wouldn't recommend it.
Recipe for confusing users.
he's referring to programatically changing option values
Yeah sorry.
How are you trying to change Mod Options in-game and not getting results exactly?
why would i want to change modoptions from inside code
Haha honestly I just guessed that's where someone would run into difficulty.
My bad.
if SBvars.Runner == true and not player:HasTrait("Jogger") and sprinting >= SBvars.RunnerSkill then
player:getTraits():add("Jogger");
applyXPBoost(player, Perks.Sprinting, 1);
if notification == true then HaloTextHelper.addTextWithArrow(player, getText("UI_trait_Jogger"), true, HaloTextHelper.getColorGreen()) end
end
end```
And the reason for me is that I wanted to adjust Mod Options after character loaded into the game on the basis of Sandbox Options to enable admins to override player options.
But that didn't work out.
you dont need to?
whenever you use player options, make sure you count for sandbox
hold up i did that
there
if percentage <= math.min(SBvars.SmokerMoodlePercentage, MOvars.SmokerMoodleVisibilityValue)
makes sure that even if ModOptions are set higher than allowed
it runs sandbox value
so admins can limit players
Yes but I didn't want invisible overrides, I wanted the users to simply inherit settings determined by an admin
Which they could then freely change.
ah
I do have some situations where I use an override like yours
This was a different and much lamer situation
๐ญ
i just put it in modoptions tooltip so they know that it will be overriden by sandbox
if its above allowed
anyway
local SBvars = SandboxVars.EvolvingTraitsWorld;
local notification = EvolvingTraitsWorld.settings.EnableNotifications;
function func()
player:getTraits():add("Jogger");
applyXPBoost(player, Perks.Sprinting, 1);
if notification == true then
HaloTextHelper.addTextWithArrow(player, getText("UI_trait_Jogger"), true, HaloTextHelper.getColorGreen())
end
end
this doesnt work
notification is locked in true
of course it is
lua is a by-value language
but, lua is still by value, the value is the address of the table

yeah just move notification init to func
Or just use your mod option
hoped not to have it around
in every function

yo bigbrain moment
local SBvars = SandboxVars.EvolvingTraitsWorld;
local notificati = EvolvingTraitsWorld.settings;
function func()
player:getTraits():add("Jogger");
applyXPBoost(player, Perks.Sprinting, 1);
if notificati.on == true then
HaloTextHelper.addTextWithArrow(player, getText("UI_trait_Jogger"), true, HaloTextHelper.getColorGreen())
end
end

That looks poetic man

local notification = setmetatable({}, { __eq = function(_,b) return EvolvingTraitsWorld.settings.EnableNotifications == b end})
if notification == true then ...
๐
i got no idea whats that but if it works i'll use it
it would, but it's a joke

creating a table and setting an __eq metamethod is ridiculous overkill


resource-wise?
it's unnecessary, ugly code
dont care
it does also happen to be a bit slower, but not enough to care
1 ugly line of code @ start of file makes other 900 lines look better
lol
i'll take it
well, then perhaps it is justified
Does this emoji look stressed? I dont see why that looks like stress. He should be less stressed cuz his covering his ears 
until you forget how the magic works ๐
i don't need to remember how it works
Food for thought, not for everyone, feel free to hate my style, reject it, and do something else:
Example.mod = {
options = {
angry = true,
happy = true,
sad = false
},
names = {
angry = "Angry",
happy = "Happy",
sad = "Sad"
},
mod_id = "Example",
mod_shortname = "Example"
}
Example.loadModOptions = function()
-- Connecting the options to the menu, so user can change and save them.
if ModOptions and ModOptions.getInstance then
Example.modSettings = ModOptions:getInstance(Example.mod)
local angry = Example.modSettings:getData("angry")
local happy = Example.modSettings:getData("happy")
local sad = Example.modSettings:getData("sad")
angry.tooltip = "Pick this if you're angry."
happy.tooltip = "Pick this if you're happy."
sad.tooltip = "Pick this if you're sad."
end
end
Example.loadModOptions()
Usage:
Example.mod.options.myVariable
i just need to have comment next to it
I hate you and all your life
||just for the lulz though||
god
I do it this way because I like the legibility of using my variables like this but you do you.
@thick karma I like the style, except the = function() - just do function Example.loadModOptions()
In VS Code, the automatic colorizing of code differentiates Example from loadModOptions if you do it the way I did it, and so because I am obsessively into nice colors, I have adjusted my normal style in Lua.
If you do function Example.loadModOptions, Example.loadModOptions is all one color.
Boooooo to all one color.
I also use the function func()
Cuz its easier to just copy paste to debug
can't you alter the syntax highlighting not to do that?!?
also, that is the worst reason I've ever heard ๐
lol very probably
But altering my behavior was infinitely easier.
I spent basically 0 minutes on that
Haha
trivia: What is the difference between these two:
local foo = function() end and local function foo() end

Enlighten me?
in the first one, you cannot recurse
local function foo() end would be sugar for local foo; foo = function() end
Because it doesn't exist yet.
precisely
well, it only matters for locals
Actually wait... come to think of it.
anything that involves a table lookup is going to be fine
@calm depot But this just ran for me:
bob = function(x)
if (x > 0) then
print(x)
bob(x - 1)
end
end
bob(10)
globals are just an implicit assignment into the magical table _G
10
input:5: attempt to call a nil value (global 'bob')
nice.
Oof
Fascinating
Well if I ever need to make a recursive function in Lua I will now know how not to write it.
Thanks.
LOL
I have no doubt
Most parties I've attended are full of people who appreciate the subtleties of algorithm optimization.
It's all they want to talk about, really.
I'm just like, "Man, can we talk boobs for 5 minutes?" They just kick me out.
lol that is the right emote
I made this using mobile so pla dont judge it oli
I just wanted to ask if something like this is possible
bigTestFunc = (function()
you == ""
function isTestValid()
if you == "want" then
return true
end
end
function endTest()
if isTestValid() then bigTestFunc = nil end
end
end)
you = "want"
Whats goin on?
Lmao nothing.
without tabs its hard to be sure but it looks like your you local won't be available at the bottom
he's also trying to use the comparison operator for an assignment
Ow yeah lets remove the local and make it a global var
ya, I was just typing the comparison thing, haha
what are you trying to achieve? This code doesn't really do much as written
now now, maybe he didn't get to that part yet
Im just curious if you can fit multiple functions inside a function and kill everything this way
you can declare functions inside the body of a function
functions are first-class objects in lua
And, yes, you can make a function in a function that sets the parent nil.
as such, they are essentially the same as all other types, like numbers, booleans, strings, etc
by "kill everything"
I assume you're asking if the other functions get deleted when you set bigTestFunc to nil
Right, I didn't think of that... endTest and isTestValid would survive as globals in your example.
what was the error, I must have made a typo
Iirc burryaga mentioned before that you need to destroy the child if u nil the parent they still exist
no errors
hm, let me do it properly, since you're serious about using it
there isn't really a "child" in this instance. If you had marked those functions as local I suppose you could consider them children of the big function, but they also would not be callable outside the function either
I was promised 1 line
what's the full table path to the value you want to compare?
it will be 1 line ๐
They know, Olipro is talking to Music about his code.
EvolvingTraitsWorld.settings.EnableNotifications
ok, so the if statement would (normally) be if EvolvingTraitsWorld.settings.EnableNotifications == true ?
yer
nothing too complex
if notification == true then HaloTextHelper.addTextWithArrow(player, getText("UI_trait_Bloodlust"), true, HaloTextHelper.getColorGreen()) end```
I use it in all notifications
local notification = function() return EvolvingTraitsWorld.settings.EnableNotifications end
;P
use: notification()
@dull moss
Did I cheat?
why
because that's the obvious solution?
LOL

duly noted
Lmao

๐
Reason why i asked the bigTest thing
Is cuz i want all the code of a trait in one function and onticks check if player has trait
Sorry not trait but sandbox var
I refer you to the same gif
to do anything on every tick, you need to have a really compelling reason
Cuz its possible that they toggle it
And when its on id like the functions to run
Ok
fine, but you don't need to check for that every tick, jeez
you remind me of someone who used a spinlock for a task that took multiple seconds to complete
But theres no event for sandbox updates
what do you mean by "sandbox updates"
I think he's saying he wants a thing to happen regularly, on tick or nearly on tick, but to stop happening if a sandbox option changes, and to begin again if it changes back.
It the functions will behave acording to the change.
you could hook sandbox option changes on the server to send out a command to clients
Is this about the light? @ancient grail
you then hook that command on the client and do your work
I'm sure details would help Olipro help you a lot better.
now you have your own event-driven model
and you don't have to waste CPU cycles constantly polling
Ye and no. Like in general the trait codes ive been working on
I see.
If its a bad idea then im not gona do it
Olipro is suggesting that is it avoidable, and avoidable things should be avoided OnTick.
Instead you can add or remove the event.
Burryaga: Olipro interpreter
lol
cool, I have my own interpreter
What is the onTick process you're toggling?
also - half the game is ran off onTick
idk if adding 1 more will cost much
death by a thousand cuts
Abunch of functions related to certain traits
(One of them is a light that follows the player while they move and actually updates every 5th tick)
also, running off of ticks tends to be insidious because folks inevitably add more code that runs inside the tick, so you get into a pattern of worsening the situation with each feature you add to your mod
also - changing sandbox options isn't something that occurs on the fly unless you have a mod that does so - and you could pry into that update function
and you're adding this to OnPlayerUpdate ?
You could use OnPlayerMove
only caveat would be if the light is disabled via sandbox options changing on the fly they'd have to move once
if you don't have a listener for when sandbox options are changed with the 2 mods that let you do that
Sometimes I sacrifice the milliseconds of others for my own personal hours. Sorry world.
?
exactly, the real question is "does this damage the user experience"
For sure.
it's been a few days since I pushed out the crafting tooltip lag fix and nobody noticed that because of the truncation optimisation, the unavailable items are no longer alphabetically sorted, because nobody cares about the ordering of items they don't have
it was sorting unlisted stuff?
it created a table of everything that matched the recipe, then sorted it all
Yep. Grabs all items, sorts them, then only displays the first ten anyways. Horrific.
for ripping clothes, that's loooads of items when you account for mods
heh
that's not the worst, it then does a deduplication stage which is O(n^2)
for k,v in pairs(t) do for k,v in pairs(t) do end end is quadratic
(in the original code, it's a forwards loop, and then a backwards loop with ipairs, but you get the point)
you got a link to this mod?
I should probably sub to it so I dont forget during my next run
my second mod to make it to the front page of the workshop
Can confirm, it's the real deal.
Makes menu appear instantly.
Gold
nice ๐
Not nice
crafting menu also has some issues last I recall
I had just finished spending at least 30 minutes learning to hide that overlay and testing my solution
page refreshes are like a whole new instance
yes, I might have a look at that next
My effort felt 86% more worthwhile before Olipro and his goddamn solution entered my life
I don't use that menu too often though so it hadn't triggered me
That's how I got into modding
The Bethesda model of attracting modders
LOL
It ended up as vanilla behavior
I couldn't remember what I named the preset
Worth noting the sandbox preset option already did this
๐ค
73 true fans using an unlisted mod
I always leave mods up even if they're obsolete, someone might gain some knowledge from the code
fair, I have it on github
I did some pretty horrific metatable code to get gasoline working in containers
then they added tags, did it themselves and everything was nice
tags are underutilized - I wish more of the vanilla code made use of them
glad they seem to be getting more love
separating the items from the action/recipe, as it should be.
if I had my way, you'd be able to specify a tag, with a set of bit flags that specify how it can be used
e.g. it's a BluePen with Keep flag
some other item is BluePen with Keep and Consume flag
flags dictate what you can do with it in a recipe
that's how I wish food stuffs / liquids / containers worked
as much as I love this game, the fact that there's items for 'withWater' 'withMilk' bugs the crap out of me
I would hope so - but I'm not sure as they added gasoline containers recently
I'll finally be able to water down my guy's cheap bourbon to beer strength
I'd rather have liquids be special objects that can't be acquired without a specially flagged item to hold them
have liquids entering containers cross reference an interactions table
some basic chemical interactions would be neat
there's a game called SS13 that does this - treats player's stomachs as a liquid container too
I have a feeling that's where it's headed
nothing like downing the other half of the thermite recipe as you slowly lose consciousness from ingesting the first half
if stomachContents:isKosher() then
alot of their systems would fit PZ
SS13 added moodles a few years back - wouldnt be surprised if the idea came from PZ
that's an interesting emote ya got there
its an old meme for sure, ballsy to just use it any old place
oh, that's your mod
I considered it but I didn't fancy the balancing
I just read the v2.0.0 tab though and it seems better, I'll give it a go
then again though, I'm not entirely convinced by removal of Hard of Hearing
hmm asthmatic being gained sounds neat
I kind of wanted to dabble in making more types of injuries
more minor ones that if you'd ignore you'd have a bad time
also, it would be nice if the spreadsheet gave estimates for the thresholds - e.g. approximately how many completely broken car parts "6000" condition would be
what balancing
balance it yourself u lazy fuck

also considered making hand washing prevent germ intake when eating - but kind of not sure about it as it sounds unfun
There's sandbox options for everything
can you individually enable or disable gaining/losing specific traits?
yes
FULL sandbox customization. Choose which perks you want to be dynamic, choose how fast you get them, choose how fast you lose them, customize anything with more than 100 sandbox options
You can run whole mod and just make 1 perk dynamic
put that in bold, that's brilliant
should update, its 130 now

I wish we could use colors on steam page for text
Would be an easy highlight for important parts
you can make it a header
or cheat and make it an image
[h1][h2][h3]
can you put alt text on an image?
h3 is good enough
can admins/hosts log on MP with multiple instances?
-nosteam doesnt load mods from my local Workshop folder
which means I have to move my mod over to /mods/
kind of a pain in the ass
make a bat file that you could hit when you need to move stuff
if you need it for active development purposes and need to edit stuff often
I wonder if you can work around that by converting mods into a junction
I need to test MP shit
kind of wild I can't just boot up multiple instances on -debug
the JVM isn't going to know or care that NTFS is redirecting you
-nosteam is the correct flag right?
yeah
i wanna make a framework that modders can use to display internal counters for players to see
like a tab where you could see moddata that modder want you to see
cuz I thought that it'd be very useful to me

cuz I use a lot of internal systems to track different interesting mechanics
I have been working on debug tools that lets you do that
ah I see what you mean
I'll look into how KillCount made new tab and into moodle framework on how to make it into framework
I thought you meant modData itself
is killcount the one that concats a paragraph under the player panel?
problem it requires me to code ui and fuck knows how to do that
it also adds kills page
or wait is that base game?
i havent played without killcount for like 2 years
that's def not vanilla
except the OnPlayerUpdate event
Me and Shark were shooting around ideas - and a tracker system for player history was thrown around
that generates a bunch of slow logs
I could make category = modname
and when u expand it it has fields in it that mod passes to framework
should be doable
@sour island so, I just launched PZ from the .bat file in debug mode, launches multiple times no problem
I'm pretty sure it's their launcher that detects the process already running
which you don't need to use at all, the thing is just a wrapper that loads a JVM
I add Killcount as dependency to 600k subscribers mod submod
Killcount gets 50k subs in 3 weeks

was 90k before
you can circumvent Steam's '1 at a time' by having shortcut's listed under games
Can you connect to your own server multiple times?
ah, good point, it probably won't grant a ticket
yeah that's my only issue
I'm honestly not sure why -nosteam would drop '/workshop/' from the mods to load
I guess just the implication it's 'workshop' and thus steam related
I also hate there's 2 local folders for mods with different file structures
shouldn't be too hard to make a patch that uses steam but does non-steam network
if that's what you're looking for
like to modify the java?
yeah, runtime patch
I made a tool for that
it loads as a java agent
this thing: https://github.com/Olipro/PZHook
Ah I recall this
I'd wager that if you intercept SteamUtils.loadLibrary and rewrite ZNetJNI64 to ZNetNoSteam64 before passing it on, you'll be good to go
actually, if you want a shitty hack... rename the DLL, don't pass -nosteam and let me know if it works ๐
Anyone here?
We're always here
Come join us
Oh hello guys
It's almost similar to a wasteland trying to find people to talk to in pz chat lol
Modding chat is always poppin'
This is where we come to distract ourselves from the typo in our code we're all inevitably chasing down
I don't mean to take advantage of our newly formed acquaintance but do you guys mind if I pick your brains for some modding knowledge?
This is always promising!
I'm incompetent, but fire away, maybe someone smarter will be able to answer what I cannot
Okay I'm trying to make sense of what I have and its ups and downs, this would be my mod install folder basically correct?
My brother kinda just threw a bin of mods at me and told me to subscribe en masse
On Workshop?
Yes
Yeah, so you've got all those mods installed, you just need to activate the ones you want (which is presumably all of them if he told you to DL them all)
install this and then enable it in that list, then restart your game:
https://steamcommunity.com/sharedfiles/filedetails/?id=2694448564
^ Beat me to it
it will save you a lot of agony
With that you can enable them all in one fell swoop
you'll know it's enabled because the mod menu will look different
Don't go there...
it is dependency aware, which, judging by all those mods you have... you're going to need that feature
you're also missing the 4 Color Bic Pen mod, which is absolutely essential ๐
Wait @calm depot you're THAT Olipro?
I'm just new to my brother throwing me into a game that a bunch of middle schoolers modded clumsily
I'm THAT Olipro
Okay so lemme see here
Truly a legend
You are in the presence of a man who singlehandedly revolutionized the Zomboid map-drawing industry
"Subscription" is essentially the same as the install button for mods right?
On Workshop, yeah
Subscribing to something on the Steam Workshop is the same as installing it
MOM GET THE CAMERA 
Where would the mod manager appear? On the mod page?
yes, it replaces the default one
It's a mod in and of itself, so you have to enable it on the mod page, then restart your game
Got it
I exceptionally highly recommend this https://steamcommunity.com/sharedfiles/filedetails/?id=2694448564
10 times better than vanilla mod manager
That's what he's setting up right now lmao
mods can be enabled in two ways:
-
by default, through the main menu, this is necessary for stuff like Mod Manager.
-
per-save game
Do I need to wait for the lua to reload before exiting?
you do, because you don't have a choice
Ok beautiful
unless you particularly need a mod on the main menu, don't enable it by default, do it in your save game
otherwise your game's startup time is going to get slower
welcome to the life of true modder enjoyer
I actually did not know this, I assumed it was all through the menu
Learn something new every day
you have to enable mods if you're hosting from the main menu and want to edit their sandbox options
^ Art of the Deal
This whole setup is for the sake of creating a hosting server for my siblings, I'm the one with the most ram capacity so that job falls on my shoulders
yeah, that's true, but if you're going to host a server properly, using the built-in is pain
Mod Manager has server addon
I'm assuming the color coding has its purpose?
if u hosting locally
Yellow = depended on
it's clearly yellow

its auburn
programmers obviously always do traffic light colours
Okay so far so good
when you use f.lux everything is orange
speak for yourself, I use puce and fuschia
These mods should be enabled in general in the mod page if I am to use them for hosting purposes?
eggshell list, stygia list, that sort of thing
ah, a true colour-blindness connoisseur developer
lmao, if you haven't opened up a file the next morning and gone "wtf was i doing last night" you aren't a true flux user
Then all your oranges are a little more blue and vice versa
I know the pain
that's how i learned the hard way to set it to turn off automatically when PS, etc. is open
pff, sleep is for the weak
@sour island you've piqued my curiousity, did you make your Discord avatar?
Do the mods uninstall once I unsub?
Yep
Help, I accidentally Stable Diffusion myself
is there a reason some of my active mods get disabled whenever I restart the game?
Most of my stuff is commissioned - this is off that one Netflix show
horrifying, which show?
the end of the f***ing world
no kidding
the eye is like that cause i never finished
I watched the first season, but that was Channel 4 back then, I think
no, there shouldn't be. Though if they're enabled only for a save game, they'll never be enabled in the main menu
(unless you go and explicitly enable them globally)
chef's kiss
you know what's funny
i started making mods a couple months ago because I was missing a feature I wanted for my first playthrough after getting back into PZ
I still haven't started that playthrough ๐
All I do is mod now
yep
it's called meta gaming
the real pitfall of modding is once you see how the sausage is made... well its just not that appetizing anymore. This is why I hope whatever I make becomes completely obsolete in 42 so I can play without being familiar with every system
That's definitely true, it definitely removes a little bit of the magic
like any of us won't go and look at the code and update our stuff
it's too late, you huffed the modding crack pipe and now you're hooked
seeing a socket set in the pictures they posted in the recent blog tells me they are fixing to undo my work, which is good
I hope that the game can be played without the need for any QoL mods
the thing is everyone disagrees on what's "qol"
you can put in basic stuff like "open cans with sharp objects," sure, but there'll always be people who think up some ingenious use of something or some better way to represent something and say "why isn't this in the base game"
that's why as a developer one of the smartest things you can do IMO is allow modding
you let the community fill in the cracks and you can focus on building systems rather than minutia
some should be optional, could be turned on or off through the options menu
speaking of which - need to get that community patch rolling
options can become overwhelming too, you need to balance with accessibility
not sure if the patch should flat out overwrite vanilla files :\
would be hard to force it to load first I imagine
I suspect with PZ, folks go through a natural progression of getting comfortable with vanilla and then branching out into mods
yes, I've seen a mod that has 100 of settings 
lmao @dull moss
is there a list of the gets on getClimateManager()? I didn't see one in the java docs. Trying to get the temp.
smh imagine hating on customizability
Javadoc Project Zomboid Modding API declaration: package: zombie.iso.weather, class: ClimateManager
no longer outdated it seems, nice
I just went modded straight away

everything is better with mods
change my mind

I played vanilla first, then when I went to multiplayer, I was thrown straight into mods
I played like 3h of vanilla
you're preaching to the converted in this channel
i hate mods
alright, get in the bin
agreed, those guys are nothing but trouble
ikr
YoUrE DesTroYiNg ThE DeVelOpeRs CreAtIvE ViSioN
i love adding sandbox options, it's a great way to mitigate stupid complaints
"myeeh i don't like this part, i want this, change the ratio, make this easier, make this harder"
modders don't even play the game
lol, wtf does getAmbient() return?
.836989164352417
fuck it here change all the variables yourself see if i care
doing the same thing in my mod
almost 100% configurable
You want 35 propane units a day? knock yourself out.
I'm guessing it's ambient visibility
hyperlinked image of fake comments - straight to a github
havent played the game in last 3 weeks btw
lmao clever
wanna tell me my mod is broken with no context? get ready to sign up
this is a good idea
idiotfilter.png
Speaking of breaking mods, how do you guys handle potentially save-affecting updates? I had to rename a bunch of my files to lay the groundwork for future improvements and while it isn't going to brick anyone's save any modded clothes/items on them/in containers are gonna disappear. Should I just make a comment + note it in the changelog? Create a whole compat file?
Obviously the real answer is "don't be stupid and name your files properly to avoid this issue in the first place"
the majority of sessions are used for testing mods ๐
what are you changing that will destroy the items?
renaming their xml files
On that Steam Recap thing, it said I started up PZ 1600 times over the year.
My next highest was like 200.
So much testing
which XML files?
clothingItems
I haven't done any clothing, but isn't it tied to the GUID
the itemNames in scripts/clothing also changed which is probably what did it
You'd think
yes, changing item names absolutely will
because the world dictionary would be referencing old name X which no longer exists
Though, this is actually useful info
I assumed it was the .xml files
I'd like to change the item names just to bring everything in line but AFAIK those are pretty much invisible
So if I just leave those untouched and accept that they're out of convention then I can mitigate save problems
I would be surprised if just renaming the XML files does anything
As long as you also update the xml path in the fileGuidTable.xml, it doesn't affect anything
And even then, you just get errors until you correct it
Shouldn't cause clothing items to get deleted.
Yeah, it was my changing of the item names that did it
So I guess this is the part where I swallow my pride and sacrifice my beautiful naming conventions for the sake of backwards compatibility
CURSE YOU, PAST ME
What mod is that
MusicManiac's ๐น
Isn't this mod just a randomizer? (Many Spawns)
Why is it showing up as an actual map?

It has a number of spawn point "maps" to pick from
Wait so each selection is literally a custom made map?
No, they're just "maps" of available spawn points
Think of it as a bunch of treasure maps showing you where possible spawns are
They all are maps of the same area but one has profession spawns marked, one has location spawns, one has all the louisville spawns, etc.
Oh so like spawns depending on the profession you choose and etc?
Right
So what's the main advantage of having it besides preemptive information about where you're going to end up?
The default spawn options are very limited
You're basically guaranteed to start in a house or a trailer
That mod not only expands the base system but also offers a lot more interesting possibilities
And this mod enables the "unique" spawn points?
e.g. the ability to start in parts of the map that you usually have to hike out to, or (for example) to start in a police station if you're a police officer, etc.
I really just dislike how it clutters the map selection though
I don't disagree, but fortunately you only have to look at that once when starting a new game :P
Fair enough. Okay now one last question, how do I compile all this in a list to send to my friends?
Your brother threw you a list originally, right?
Or did he just point at the screen lol
The former
if you're the host I'm pretty sure anyone trying to connect will automatically subscribe to and download the mods
So I have premade list in my hands @limber oar
Will they? My brother in law was getting booted from my session because of incompatibility yesterday
You can just throw them the same list and that should work
the mods do need to be listed in the workshop section of the config for them to be downloaded
but you should use Mod Manager to take care of that
You're saying if I list them here my friends would automatically download my mods?
yes, but that interface sucks, use the mod manager mod to setup your other mods
^
use that interface to configure everything, don't worry about mods
then go into Mod Manager and use the Server button to edit it and properly setup mods
if you have no server button, you need to install Mod Manager Server from the workshop
I've set it up, now my friends can join without worrying about synchronizing with my list?
all those numbers in the center column are the workshop ID's associated with the mods. They should download for them no problem
honestly the only time I see compat issues is when a mod updates while the server is still running, so clients connecting have newer versions than the server
And this is all done automatically as they join the server?
ya, takes a minute the first time, as you'd imagine
you mean you don't use vim?
nah I use vscode for work so it's easier to stick with an ide I know
clearly the answer is to use the copy of Eclipse I downloaded from the university of waterloo in 2004
you got me
About 2 years ago, my Emacs config became complex enough to become sentient and convince me to just use VSCode. Haven't looked back
I hope one day when someone random shares a screenshot like this i see my mod.. probably not gonna happen cuz most of my mods start with letter f or m for some reason
I should start naming mods using ' followed by a number
I like looking through all the collections that use mine and trying to draw conclusions about the users based on their modlists
'1992 Glytch3r's Ascending Mod
but I believe Mod ID cannot begin withย '
At least with the mod manager server, it's sorted by Mod Name, not ID
Completely random question, does anyone know offhand if there are any sandboxes on the map
Like playground sandboxes
I wanna shoot a cute photo for the mod page talking about sandbox options
nvm, found one, Rosewood School
Looks like IsoZombie has the isReanimatedPlayer() method
https://zomboid-javadoc.com/41.78/zombie/characters/IsoZombie.html#isReanimatedPlayer()
Javadoc Project Zomboid Modding API declaration: package: zombie.characters, class: IsoZombie
nice thnx
ow wait will still apply to corpses
I think so? pretty sure that's what they still are even when dead (again).
So all my mods seem to be working on my hosted servers except for my custom maps. They're not showing on the world creation page, can someone please help?
Find this page in the Server Settings and use the "Add an Available Map to to the list" to add them to the server. Make sure they are higher than the default Muldraugh map.
Thank you! I didn't even realize that this was a thing!
why does lua have floor/ceiling... I just want a nice even round number without having to take a unilateral decision on if it's going up or down
The 'joy' of Typeless Languages
thankfully zomboid provides round(num, idp)
will give a number rounded to idp places
oh thank god
it's correct?
ceil of 21.000001 is 22?
did you mean floor?
yea
that's easy
yea, dhert told me lol
math.floor(value+0.5)
they imported the java round lol
but whay
idk, just saying its an option
yea its in luautils
local mult = 10^(idp or 0)
return math.floor(num * mult + 0.5) / mult
end```
more accurate than just flooring it
plus you get the decimal places
just sharing my code for the speed gun,. i provided the option to round decimal or not
Events.OnPostUIDraw.Remove(speedGunResult)
local function speedGunResult()
if not getPlayer() then return end
if not (isHasBadge() and isAuthorize()) then return end
local car = IsoObjectPicker.Instance:PickVehicle(getMouseXScaled(), getMouseYScaled())
if car then
if SandboxVars.RadarGun.useKmph then
local KMPH = car:getCurrentSpeedKmHour()
if SandboxVars.RadarGun.showDecimal then
local speedValue = tostring(math.abs(math.floor(KMPH * 100)/100))
else
local speedValue = tostring(math.abs(math.floor(KMPH)))
end
else
local MPH = car:getCurrentSpeedKmHour() / 0.621371
if SandboxVars.RadarGun.showDecimal then
local speedValue = tostring(math.abs(math.floor(MPH * 100)/100))
else
local speedValue = tostring(math.abs(math.floor(MPH)))
end
end
local xOrigin = getCore():getScreenWidth() / 2
local yOrigin = getCore():getScreenHeight() / 2 - 20
if getPlayer():isAiming() then
getTextManager():DrawStringCentre(UIFont.Medium, xOrigin, yOrigin, speedValue, 1, 1, 1, 1)
end
end
end
Events.OnPostUIDraw.Add(speedGunResult)
not sure if its relevant to what you need
you can't just drop
speed gun
and walk off like that
is that already on the workshop?
Speed Demon enthusiasts: 
yes

Skizot made the model
https://imgur.com/KVdVwxx
just sharing
Thnx for the help on the animation @dark wedge
o.O
Singleplayer users be like:
It might work with npc driving vehicles
If thats a thing
I wish that was lol
Can you make a separate setting so it can measure Zombie speeds?
Imagine clocking Sprinter speeds, lol.
"Uhuh. That one would totally run me down."
Heya, I am trying to make a simple inverted controls mod for a friend that should only trigger in specific cases. The case itself isn't the issue, but the key stroke is. I have looked at the Javadoc and some other mods but I am struggling to find the best way to essentially lets say, have the A key be triggered when the D key is pressed. Which method would need to be used to have a key stroke triggered?
+animal speed for v42 ๐
Idk how to get that variable
But the vehicles speed is from the dashboard
OnKeyPress event
anybody planning to do cockfight and racing mods for animals?
Alright, gotta look into that then. I currently use Events.OnKeyPressed.Add(function); to listen to any key pressed event being fired. I assume I can then specifically also fire events with the key as an integer?
You do animation poltergeist? Seems like your ideas hard to do but that would be so cool
Yep
Just return the key
Nice
That would be a cool thing to do
Hmmm if you can bind the key to another obj that travels
Like the remote control vehicles from gta
That would be sick
Control. Drone or RC
With noisemaker
And flashing lights ..
Its way too OP
Must limit the range of the remote and probably low hp
Can the file writer write bitwise and thus overwrite Java class files? Wondering if it's possible in any way to automate installation of Java mods installed via Steam
A very interesting question.
wouldn't you need to edit java before you can a get file writer for the right directory?
don't olipro and DeltaMango have already what you want?
morning everyone, i need an opinion. Its a small detail but im undecided. I usually make the player char annouce the events like in the picture bellow ( still working on the format of the msg ) But with air events im thinking about only warning the player if he has a radio nearby turned on and tunned to the EBS, am i just being to much of a detail psyco or would that be better?
Tbh I do not know. I have only used the file writer for writing to default directory. Not sure of its limitations.
Is this @ me? I don't understand if so.
cant you just use oli's pzhook?
@thick karma i think it was since its related to your question
and filewriter and reader only writes and reads from the lua folder i think, modfilewriter or something like that writes to the folder mod somewhere dont recall where
used it when i was storing my mod configs inside the mod folder about a year ago
I wasn't aware Oli made this. This looks interesting. Only other Java hook I know seems to be a dead project... Modder seems to have moved along.
this one is not
and works very very well
easy to use as well
gonna see if i can send custom messages to the radio or if i have to create a radio mod to do it or something...
Right on... I may explore it in the future. Currently playing with some other stuff. I kind of want to make a dedicated 360 degree visibility-cone mod... I know of one on the Workshop but it comes with something else and the install process requires manually overwriting the game's Java files. Was wondering if I could recreate the process in a cleaner or more automated way.
i think pzhook will do what you want
if i remember correctly it patches the files itself or you can just run a batch file and use it without patching the exe file of the game
In Meditation, I added halo notes for everything I thought a player might need, and just let people turn them off in Mod Options.
hmmm that might be a good option for me
Seemed like the most user-friendly approach for my sitch
Most people either want all the help or none in my experience.
yup
thats what i was thinking... some want the immersion some just want to have fun
its hard to make it balanced to everyones taste
exactly
for me... since is something for the chat to mess around with the streamers game, immersion is off the window... as soon as i start streaming








flooring it?