#mod_development

1 messages ยท Page 82 of 1

fast galleon
#

Do we know if the crafting system for v42 includes expansion of evolved recipe system?

elfin rapids
#

so even if that's coop game that he's hosting he can't just change lua in middle of game?

pulsar heath
#

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

drifting stump
pulsar heath
#

but hes talking about co-op not server

#

so if both have the same edited files

elfin rapids
drifting stump
#

you cant connect without disabling the lua checksum

drifting stump
elfin rapids
#

cause it's just a coop

elfin rapids
drifting stump
#

disable lua checksum

pulsar heath
#

co-op for me is split screen

#

but i misunderstood

elfin rapids
drifting stump
#

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

elfin rapids
#

i've read that disabling anticheat is enough (cause it also disabled lua check), i'll check that later

#

thanks for help

pulsar heath
#

pz has anti cheat?

elfin rapids
#

kind of

drifting stump
#

yes

pulsar heath
#

thats new for me... what anti cheat does it have?

#

how does it distinguishes cheats from lua modding?

sour island
pulsar heath
#

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

sour island
#

Yeah, the most I've used it for was UI

pulsar heath
#

nice to know

sour island
#

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

pulsar heath
#

oh i "broke" EHE

sour island
#

Oh?

pulsar heath
#

yup... added a wrong event syntax and that savegame is dead

sour island
#

Errors?

pulsar heath
#

like it works... but it keeps spiting errors... i was my stupidity though

#

it*

sour island
#

What's the error - I can write in a parser

pulsar heath
#

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

calm depot
pulsar heath
#

but even so... you can still cheat with a mod right?

calm depot
#

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

pulsar heath
#

if it passes the checksum

#

at least in single player i mean

surreal skiff
#

it amazes me how smart some of you are

calm depot
#

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

pulsar heath
#

that makes sense

drifting stump
#

if you were to modify the java core of the game you could do so much more than cheese the checksum

calm depot
#

heh

#

you don't say

pulsar heath
#

here i was thinking the java core only did the checksum

#

๐Ÿ˜„

drifting stump
#

the anti cheats arent descriptive for a reason so wont comment much more

pulsar heath
#

thats more like a game protection than an anti cheat from my point of view

#

i can still force god mode using lua

drifting stump
#

its just a deterrent

pulsar heath
#

at least in sp

calm depot
#

you can, but then it will set a bit in a certain type of packet and the server will find out

drifting stump
#

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

pulsar heath
#

so its not ant anti cheat literally

#

more like an anti tamper measure

drifting stump
#

ive said enough to piece together things

pulsar heath
#

but i understand

calm depot
#

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

drifting stump
#

devs have asked us to not clarify things too much

pulsar heath
#

but cheating in this game... would take all the fun out of it

calm depot
#

yeah, the kind of people who want to use it will go and join PVP servers to grief folks

astral dune
#

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

calm depot
#

osnap

pulsar heath
#

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

calm depot
#

to annoy and upset

pulsar heath
#

but yeah, cheaters were one of the reasons i stopped playing fps

calm depot
#

let me guess... CS:GO?

pulsar heath
#

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

calm depot
#

doesn't even need a KD ratio, just look at online chess ๐Ÿ˜„

pulsar heath
#

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?

calm depot
pulsar heath
#

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?

dull moss
#

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?
pulsar heath
#

at first i thought it might be some mod that got update but some files got left behind

pulsar heath
#

isnt that a bit much?

dull moss
#

lmao

#

no

pulsar heath
#

and im confused

#

if a zombie dies removes onzombie kill everyone minute removes oneminute update and on zombie dead adds zombie kill

dull moss
#

that's not how it works

#

read the last line

pulsar heath
#

what i see is when you create a player you run the function
it removes the events and then adds them again

thick karma
pulsar heath
#

the events are binded to the player char?

#

so you do that to make sure its working on the right char?!

dull moss
#

oh kek

#

it does proc it twice if u make a new one

calm depot
#

no, the events are not

dull moss
#

LOG : General , 1673569637654> ETW Logger: modData.FearOfInside: -1
LOG : General , 1673569637668> ETW Logger: modData.FearOfInside: -2

thick karma
#

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

dull moss
#

lel

calm depot
#

for it to have practical meaning, you should remove the events when the player's character dies

dull moss
#

meh

pulsar heath
#

that makes more sense

dull moss
#

i'd rather remove before adding

calm depot
#

otherwise, you're just deleting and adding the event all in the same tick, which is pointless

dull moss
#

dont need to have event in 2 places then

pulsar heath
#

so im not the only thinking that?ยป

pulsar heath
#

only one...

thick karma
#

would two splitscreen players trigger two OnCreatePlayers?

#

Based on my guess that it would, I tend to follow the Remove-Add practice

dull moss
#

who cares about spitscreen players KekW

calm depot
#

it would, yes

pulsar heath
#

lol

thick karma
#

In prep for making my mods coop splitscreen compat

calm depot
#

so without split screen, the code is pointless

#

with split screen, it's actively harmful

pulsar heath
#

if my mods dont work in split screen i do not care

thick karma
#

Why harmful?

calm depot
#

oh I take that back, it'll delete itself first so it won't do anything bad

dull moss
#

^

thick karma
#

Yeah it doesn't do anything tmk to delete a nonexistent function on an event

#

Whereas double-adding can completely bork a loop

pulsar heath
#

so its just to make sure nothing else is there?

calm depot
#

either way though, why do you need to defer your events to player creation?

thick karma
#

I do not always but for events that use playerIndex and player it's p convenient

pulsar heath
#

that i think i know why, since you may die and make a new char

thick karma
#

Both are passed automatically

pulsar heath
#

that way it inits when a new char is made

thick karma
#

Again, I do not assume player 0 in any of my mods.

#

I am working toward splitscreen compat

calm depot
#

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?

thick karma
#

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.

pulsar heath
#

i still fail to see the point of doing that, but if it works for you good...

ancient grail
#

If the player dies with the events die with it

thick karma
#

E.g., load mod data on the player and then begin the event.

ancient grail
#

Like remove itself

#

Esp the on player update

thick karma
#

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.

calm depot
#

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

thick karma
#

Only if the registration might be triggered twice in a row... e.g. when adding and removing listeners on the basis of async events.

calm depot
#

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

ancient grail
#

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

thick karma
#

No it's not the CPU use, sometimes double-adding an Event hook can bug the purpose of the hook entirely.

pulsar heath
thick karma
#

Doing something twice that needs to happen once per tick e.g. can cause issues depending on the situation.

calm depot
#

yes, you definitely should not be double-registering

thick karma
#

It can be harmless, but also can cause issues.

calm depot
#

even if harmless, it's wasted cycles

thick karma
#

But no I am not worried about CPU usage with stuff like this

pulsar heath
#

nothing thats does nothing is harmless in coding

thick karma
#

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.

pulsar heath
#

thats like going into a car starting the engine

#

then stoping the engine

#

and starting it again

calm depot
#

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

thick karma
#

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

pulsar heath
#

but thats a different thing

thick karma
#

Which I SOMETIMES do

pulsar heath
#

its not remove add

calm depot
#

it's not if there's some amount of frames passing between it being unregistered and reregistered

thick karma
#

There are in my case.

calm depot
#

worth it

pulsar heath
#

well it works for you, so im glad... gonna stop melting my brain over it

thick karma
#

Or have been

#

But yeah I think it's situational and also subjective

calm depot
#

#1 rule of gaming: amortise your processing costs across as many frames as possible

pulsar heath
#

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

thick karma
#

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)

calm depot
#

first, benchmark

thick karma
#

Yeah fair.

dull moss
#

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?

thick karma
#

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.

calm depot
#

he's referring to programatically changing option values

thick karma
#

Yeah sorry.

#

How are you trying to change Mod Options in-game and not getting results exactly?

dull moss
#

why would i want to change modoptions from inside code

thick karma
#

Haha honestly I just guessed that's where someone would run into difficulty.

#

My bad.

dull moss
#
                    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```
thick karma
#

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.

dull moss
#

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

thick karma
#

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.

dull moss
#

ah

thick karma
#

I do have some situations where I use an override like yours

#

This was a different and much lamer situation

#

๐Ÿ˜ญ

dull moss
#

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

calm depot
#

of course it is

dull moss
#

even after i toggle it and save it in modoptions

#

cuz it not a reference, right?

calm depot
#

lua is a by-value language

dull moss
#

well SBvars works

#

cuz it's tabble, right?

calm depot
#

SBVars is a table

#

yes

dull moss
#

well that what I was asking 30 msgs ago

calm depot
#

but, lua is still by value, the value is the address of the table

dull moss
thick karma
dull moss
#

yea i know

thick karma
#

Or just use your mod option

dull moss
#

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
ancient grail
#

That looks poetic man

dull moss
calm depot
#

local notification = setmetatable({}, { __eq = function(_,b) return EvolvingTraitsWorld.settings.EnableNotifications == b end})
if notification == true then ...

๐Ÿ˜

dull moss
#

i got no idea whats that but if it works i'll use it

calm depot
#

it would, but it's a joke

dull moss
calm depot
#

creating a table and setting an __eq metamethod is ridiculous overkill

ancient grail
dull moss
calm depot
#

it's unnecessary, ugly code

dull moss
#

dont care

calm depot
#

it does also happen to be a bit slower, but not enough to care

dull moss
#

1 ugly line of code @ start of file makes other 900 lines look better

calm depot
#

lol

dull moss
#

i'll take it

calm depot
#

well, then perhaps it is justified

ancient grail
#

Does this emoji look stressed? I dont see why that looks like stress. He should be less stressed cuz his covering his ears stressed

calm depot
#

until you forget how the magic works ๐Ÿ™‚

dull moss
#

i don't need to remember how it works

thick karma
#

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
dull moss
#

i just need to have comment next to it

#

I hate you and all your life

#

||just for the lulz though||

#

god

thick karma
#

I do it this way because I like the legibility of using my variables like this but you do you.

calm depot
#

@thick karma I like the style, except the = function() - just do function Example.loadModOptions()

dull moss
#

๐Ÿ™ƒ

thick karma
#

If you do function Example.loadModOptions, Example.loadModOptions is all one color.

#

Boooooo to all one color.

ancient grail
#

I also use the function func()
Cuz its easier to just copy paste to debug

calm depot
#

can't you alter the syntax highlighting not to do that?!?

#

also, that is the worst reason I've ever heard ๐Ÿ˜›

thick karma
#

lol very probably

#

But altering my behavior was infinitely easier.

#

I spent basically 0 minutes on that

#

Haha

calm depot
#

trivia: What is the difference between these two:

local foo = function() end and local function foo() end

dull moss
thick karma
#

Honestly I wasn't aware one existed.

#

I thought it was sugar.

calm depot
#

almost, but not quite

#

it's a subtle but crucial difference

thick karma
#

Enlighten me?

calm depot
#

in the first one, you cannot recurse

thick karma
#

Ahaaaaaaa

#

That would make sense

calm depot
#

local function foo() end would be sugar for local foo; foo = function() end

thick karma
#

Because it doesn't exist yet.

calm depot
#

precisely

thick karma
#

Makes sense.

#

I rarely need to recurse so I hadn't noticed that yet.

calm depot
#

well, it only matters for locals

thick karma
#

Actually wait... come to think of it.

calm depot
#

anything that involves a table lookup is going to be fine

thick karma
#

@calm depot But this just ran for me:

bob = function(x)

   if (x > 0) then
      print(x)
      bob(x - 1)
   end

end

bob(10)
calm depot
#

because that's a global

#

which is a table lookup

thick karma
#

Oh doh

#

Oops

#

Got it.

calm depot
#

globals are just an implicit assignment into the magical table _G

thick karma
#
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.

calm depot
#

hahah

#

I'm an absolute riot at parties

thick karma
#

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.

calm depot
#

5 minutes? 30 seconds and everyone's done.

#

๐Ÿ˜

thick karma
#

lol that is the right emote

ancient grail
#

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"
thick karma
#

Thanks Glytch3r, let's just keep it moving.

#

Nothing to see here, folks.

ancient grail
#

Whats goin on?

thick karma
#

Lmao nothing.

astral dune
calm depot
#

he's also trying to use the comparison operator for an assignment

ancient grail
#

Ow yeah lets remove the local and make it a global var

astral dune
#

ya, I was just typing the comparison thing, haha

#

what are you trying to achieve? This code doesn't really do much as written

calm depot
#

now now, maybe he didn't get to that part yet

ancient grail
#

Im just curious if you can fit multiple functions inside a function and kill everything this way

calm depot
#

you can declare functions inside the body of a function

#

functions are first-class objects in lua

thick karma
#

And, yes, you can make a function in a function that sets the parent nil.

calm depot
#

as such, they are essentially the same as all other types, like numbers, booleans, strings, etc

astral dune
#

by "kill everything"

#

I assume you're asking if the other functions get deleted when you set bigTestFunc to nil

thick karma
#

Right, I didn't think of that... endTest and isTestValid would survive as globals in your example.

calm depot
#

what was the error, I must have made a typo

ancient grail
#

Iirc burryaga mentioned before that you need to destroy the child if u nil the parent they still exist

dull moss
#

no errors

calm depot
#

hm, let me do it properly, since you're serious about using it

astral dune
#

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

dull moss
#

I was promised 1 line

calm depot
#

what's the full table path to the value you want to compare?

dull moss
#

um

#

1s

calm depot
#

it will be 1 line ๐Ÿ˜‰

thick karma
dull moss
#

EvolvingTraitsWorld.settings.EnableNotifications

calm depot
#

ok, so the if statement would (normally) be if EvolvingTraitsWorld.settings.EnableNotifications == true ?

dull moss
#

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

thick karma
#

local notification = function() return EvolvingTraitsWorld.settings.EnableNotifications end

#

;P

#

use: notification()

#

@dull moss

#

Did I cheat?

dull moss
#

heh

#

that's a bigbrain

#

@calm depot you're relieved from your duty my friend

calm depot
#

lol

#

I had (clearly wrongly) assumed you had something against using a function

dull moss
#

why

calm depot
#

because that's the obvious solution?

dull moss
#

is it bad?

#

OH

#

Yea

#

You see

#

This is me

#

now this is you

calm depot
#

LOL

dull moss
calm depot
#

duly noted

dull moss
#

so you better not assume that I thought of obvious solution

thick karma
#

Lmao

dull moss
ancient grail
#

๐Ÿ˜…

#

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

calm depot
#

you want to check if a player has a trait on every tick?

ancient grail
#

Sorry not trait but sandbox var

calm depot
#

I refer you to the same gif

#

to do anything on every tick, you need to have a really compelling reason

ancient grail
#

Cuz its possible that they toggle it
And when its on id like the functions to run

#

Ok

calm depot
#

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

ancient grail
#

But theres no event for sandbox updates

calm depot
#

what do you mean by "sandbox updates"

ancient grail
#

Sandbox options

#

Like when they change jt

thick karma
#

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.

ancient grail
#

It the functions will behave acording to the change.

calm depot
#

you could hook sandbox option changes on the server to send out a command to clients

thick karma
#

Is this about the light? @ancient grail

calm depot
#

you then hook that command on the client and do your work

thick karma
#

I'm sure details would help Olipro help you a lot better.

calm depot
#

now you have your own event-driven model

#

and you don't have to waste CPU cycles constantly polling

ancient grail
#

Ye and no. Like in general the trait codes ive been working on

thick karma
#

I see.

ancient grail
#

If its a bad idea then im not gona do it

thick karma
#

Olipro is suggesting that is it avoidable, and avoidable things should be avoided OnTick.

#

Instead you can add or remove the event.

astral dune
#

Burryaga: Olipro interpreter

thick karma
#

lol

calm depot
#

cool, I have my own interpreter

sour island
#

What is the onTick process you're toggling?

#

also - half the game is ran off onTick

#

idk if adding 1 more will cost much

calm depot
#

death by a thousand cuts

ancient grail
sour island
#

is it something that needs to be updated onTick?

#

something changing?

thick karma
#

(One of them is a light that follows the player while they move and actually updates every 5th tick)

calm depot
#

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

sour island
#

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

thick karma
sour island
#

?

calm depot
#

exactly, the real question is "does this damage the user experience"

thick karma
#

For sure.

calm depot
#

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

sour island
#

it was sorting unlisted stuff?

calm depot
#

it created a table of everything that matched the recipe, then sorted it all

vast nacelle
#

Yep. Grabs all items, sorts them, then only displays the first ten anyways. Horrific.

calm depot
#

for ripping clothes, that's loooads of items when you account for mods

sour island
#

heh

calm depot
#

that's not the worst, it then does a deduplication stage which is O(n^2)

sour island
#

and this is called on render()

#

that's not 1000 cuts, that's a blunt cleaver

calm depot
#

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)

sour island
#

you got a link to this mod?

sour island
#

I should probably sub to it so I dont forget during my next run

calm depot
#

my second mod to make it to the front page of the workshop

thick karma
#

Makes menu appear instantly.

#

Gold

sour island
#

nice ๐Ÿ‘

thick karma
#

Not nice

sour island
#

crafting menu also has some issues last I recall

thick karma
#

I had just finished spending at least 30 minutes learning to hide that overlay and testing my solution

sour island
#

page refreshes are like a whole new instance

calm depot
#

yes, I might have a look at that next

thick karma
#

My effort felt 86% more worthwhile before Olipro and his goddamn solution entered my life

calm depot
#

I don't use that menu too often though so it hadn't triggered me

sour island
#

That's how I got into modding

vast nacelle
#

The Bethesda model of attracting modders

calm depot
#

LOL

sour island
#

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

calm depot
#

I always leave mods up even if they're obsolete, someone might gain some knowledge from the code

sour island
#

fair, I have it on github

calm depot
#

I did some pretty horrific metatable code to get gasoline working in containers

#

then they added tags, did it themselves and everything was nice

sour island
#

tags are underutilized - I wish more of the vanilla code made use of them

#

glad they seem to be getting more love

calm depot
#

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

sour island
#

that's how I wish food stuffs / liquids / containers worked

dull moss
#

only took 3 days

sour island
#

as much as I love this game, the fact that there's items for 'withWater' 'withMilk' bugs the crap out of me

calm depot
#

isn't that changing in b42?

#

they showcased a slick looking UI where fluids will mix

sour island
#

I would hope so - but I'm not sure as they added gasoline containers recently

calm depot
#

I'll finally be able to water down my guy's cheap bourbon to beer strength

sour island
#

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

calm depot
#

I have a feeling that's where it's headed

sour island
#

nothing like downing the other half of the thermite recipe as you slowly lose consciousness from ingesting the first half

calm depot
#

if stomachContents:isKosher() then

sour island
#

alot of their systems would fit PZ

#

SS13 added moodles a few years back - wouldnt be surprised if the idea came from PZ

dull moss
#

@calm depot we frontpage buddies now

sour island
#

that's an interesting emote ya got there

astral dune
#

its an old meme for sure, ballsy to just use it any old place

calm depot
#

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

sour island
#

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

calm depot
#

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

dull moss
#

balance it yourself u lazy fuck

sour island
#

also considered making hand washing prevent germ intake when eating - but kind of not sure about it as it sounds unfun

dull moss
#

There's sandbox options for everything

calm depot
#

can you individually enable or disable gaining/losing specific traits?

dull moss
#

yes

calm depot
#

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

dull moss
#

You can run whole mod and just make 1 perk dynamic

calm depot
#

put that in bold, that's brilliant

dull moss
#

should update, its 130 now

#

I wish we could use colors on steam page for text

#

Would be an easy highlight for important parts

sour island
#

you can make it a header

calm depot
#

or cheat and make it an image

sour island
#

[h1][h2][h3]

calm depot
#

can you put alt text on an image?

dull moss
#

h3 is good enough

sour island
#

can admins/hosts log on MP with multiple instances?

dull moss
#

time to make whole page in h3 cuz whole page is important to read

sour island
#

-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

dull moss
#

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

calm depot
#

I wonder if you can work around that by converting mods into a junction

sour island
#

I need to test MP shit

calm depot
#

(or a link if you're on Linux/Mac)

#

well, I say "I wonder" - I'm sure it would work

sour island
#

kind of wild I can't just boot up multiple instances on -debug

calm depot
#

the JVM isn't going to know or care that NTFS is redirecting you

sour island
#

-nosteam is the correct flag right?

calm depot
#

yeah

dull moss
#

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

sour island
#

I have been working on debug tools that lets you do that

dull moss
#

ye but without debug

#

just a character tab

sour island
#

ah I see what you mean

dull moss
#

I'll look into how KillCount made new tab and into moodle framework on how to make it into framework

sour island
#

I thought you meant modData itself

dull moss
#

ETA to release 3 weeks

sour island
#

is killcount the one that concats a paragraph under the player panel?

dull moss
#

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

sour island
#

that's def not vanilla

dull moss
#

ye

#

its really cool

calm depot
#

except the OnPlayerUpdate event

sour island
#

Me and Shark were shooting around ideas - and a tracker system for player history was thrown around

dull moss
calm depot
#

that generates a bunch of slow logs

dull moss
#

I could make category = modname

#

and when u expand it it has fields in it that mod passes to framework

#

should be doable

calm depot
#

@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

sour island
#

I can launch multiple instances

#

that's not the issue

dull moss
#

I add Killcount as dependency to 600k subscribers mod submod
Killcount gets 50k subs in 3 weeks

#

was 90k before

sour island
#

you can circumvent Steam's '1 at a time' by having shortcut's listed under games

calm depot
#

I'm also running in steam mode

#

didn't need to do anything special

sour island
#

Can you connect to your own server multiple times?

calm depot
#

ah, good point, it probably won't grant a ticket

sour island
#

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

calm depot
#

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

sour island
#

like to modify the java?

calm depot
#

yeah, runtime patch

#

I made a tool for that

#

it loads as a java agent

sour island
#

Ah I recall this

calm depot
#

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 ๐Ÿ™‚

mint helm
#

Anyone here?

limber oar
#

We're always here

sour island
#

Come join us

mint helm
#

Oh hello guys

#

It's almost similar to a wasteland trying to find people to talk to in pz chat lol

limber oar
#

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

mint helm
#

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?

limber oar
#

I'm incompetent, but fire away, maybe someone smarter will be able to answer what I cannot

mint helm
#

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

limber oar
#

On Workshop?

mint helm
#

Yes

limber oar
#

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)

calm depot
limber oar
#

^ Beat me to it

calm depot
#

it will save you a lot of agony

limber oar
#

With that you can enable them all in one fell swoop

calm depot
#

you'll know it's enabled because the mod menu will look different

calm depot
#

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 ๐Ÿ˜

mint helm
#

I'll look into those

#

I'm not new to modding

limber oar
#

Wait @calm depot you're THAT Olipro?

mint helm
#

I'm just new to my brother throwing me into a game that a bunch of middle schoolers modded clumsily

calm depot
#

I'm THAT Olipro

mint helm
#

Okay so lemme see here

limber oar
#

You are in the presence of a man who singlehandedly revolutionized the Zomboid map-drawing industry

mint helm
#

"Subscription" is essentially the same as the install button for mods right?

limber oar
#

On Workshop, yeah

#

Subscribing to something on the Steam Workshop is the same as installing it

dull moss
#

MOM GET THE CAMERA LETSFUCKINGGOOOOOOOOO

mint helm
#

Where would the mod manager appear? On the mod page?

calm depot
#

yes, it replaces the default one

limber oar
#

It's a mod in and of itself, so you have to enable it on the mod page, then restart your game

mint helm
#

Got it

dull moss
#

10 times better than vanilla mod manager

limber oar
#

That's what he's setting up right now lmao

dull moss
#

oh

#

i jsut saw 1 msg

calm depot
#

mods can be enabled in two ways:

  1. by default, through the main menu, this is necessary for stuff like Mod Manager.

  2. per-save game

mint helm
#

Do I need to wait for the lua to reload before exiting?

calm depot
#

you do, because you don't have a choice

limber oar
#

It shouldn't take long

#

For me it's like <5 seconds

mint helm
#

Ok beautiful

calm depot
#

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

dull moss
#

welcome to the life of true modder enjoyer

limber oar
#

Learn something new every day

sour island
#

you have to enable mods if you're hosting from the main menu and want to edit their sandbox options

dull moss
#

you better have all of ours mods now that we helped you peperightgun

limber oar
#

^ Art of the Deal

mint helm
calm depot
#

yeah, that's true, but if you're going to host a server properly, using the built-in is pain

dull moss
#

Mod Manager has server addon

mint helm
#

I'm assuming the color coding has its purpose?

dull moss
#

if u hosting locally

calm depot
#

Yellow = depended on

dull moss
#

orange = dependency

#

thats not yellow u monke

calm depot
#

it's clearly yellow

dull moss
astral dune
#

its auburn

calm depot
#

programmers obviously always do traffic light colours

mint helm
#

Okay so far so good

limber oar
#

when you use f.lux everything is orange

limber oar
mint helm
#

These mods should be enabled in general in the mod page if I am to use them for hosting purposes?

astral dune
#

eggshell list, stygia list, that sort of thing

calm depot
#

ah, a true colour-blindness connoisseur developer

sour island
#

I love making digital art and forgetting f.lux is on

#

real fun

limber oar
mint helm
#

I know the pain

limber oar
#

that's how i learned the hard way to set it to turn off automatically when PS, etc. is open

mint helm
#

Fellow digital artists

#

I have found my people

calm depot
#

pff, sleep is for the weak

calm depot
#

@sour island you've piqued my curiousity, did you make your Discord avatar?

sour island
#

nah that's AI art lmao

#

I'm a class traitor

mint helm
#

Do the mods uninstall once I unsub?

limber oar
#

Yep

calm depot
#

Help, I accidentally Stable Diffusion myself

mint helm
#

is there a reason some of my active mods get disabled whenever I restart the game?

sour island
#

Most of my stuff is commissioned - this is off that one Netflix show

calm depot
#

horrifying, which show?

sour island
#

the end of the f***ing world

calm depot
#

no kidding

sour island
#

the eye is like that cause i never finished

calm depot
#

I watched the first season, but that was Channel 4 back then, I think

sour island
calm depot
#

(unless you go and explicitly enable them globally)

calm depot
limber oar
#

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

sour island
#

yep

cosmic condor
#

it's called meta gaming

astral dune
#

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

limber oar
#

That's definitely true, it definitely removes a little bit of the magic

calm depot
#

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

astral dune
#

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

cosmic condor
#

I hope that the game can be played without the need for any QoL mods

limber oar
#

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

cosmic condor
#

some should be optional, could be turned on or off through the options menu

sour island
#

speaking of which - need to get that community patch rolling

calm depot
#

options can become overwhelming too, you need to balance with accessibility

sour island
#

not sure if the patch should flat out overwrite vanilla files :\

#

would be hard to force it to load first I imagine

calm depot
#

I suspect with PZ, folks go through a natural progression of getting comfortable with vanilla and then branching out into mods

cosmic condor
#

yes, I've seen a mod that has 100 of settings panic

sour island
#

lmao @dull moss

humble oriole
#

is there a list of the gets on getClimateManager()? I didn't see one in the java docs. Trying to get the temp.

dull moss
#

uh

#

huh

calm depot
#

decompile the class

#

or there's the outdated javadoc

dull moss
#

smh imagine hating on customizability

sour island
#

there's also pz-libraries

#

if you're willing to use intelliJ

astral dune
calm depot
#

no longer outdated it seems, nice

dull moss
#

everything is better with mods

#

change my mind

calm depot
#

I played vanilla first, then when I went to multiplayer, I was thrown straight into mods

dull moss
#

I played like 3h of vanilla

calm depot
limber oar
#

i hate mods

dull moss
#

ye fuck mods

calm depot
#

alright, get in the bin

dull moss
limber oar
#

agreed, those guys are nothing but trouble

dull moss
#

ikr

calm depot
#

YoUrE DesTroYiNg ThE DeVelOpeRs CreAtIvE ViSioN

dull moss
#

but ye i will reorganize my sandbox

#

need another page

#

for simple traits bullshit

limber oar
#

i love adding sandbox options, it's a great way to mitigate stupid complaints

limber oar
#

"myeeh i don't like this part, i want this, change the ratio, make this easier, make this harder"

sour island
#

modders don't even play the game

humble oriole
#

lol, wtf does getAmbient() return?
.836989164352417

limber oar
#

fuck it here change all the variables yourself see if i care

humble oriole
#

almost 100% configurable

sour island
#

this is the best way to avoid stupid complaints

humble oriole
#

You want 35 propane units a day? knock yourself out.

calm depot
sour island
#

hyperlinked image of fake comments - straight to a github

dull moss
sour island
#

wanna tell me my mod is broken with no context? get ready to sign up

humble oriole
calm depot
#

idiotfilter.png

limber oar
#

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"

cosmic condor
#

the majority of sessions are used for testing mods ๐Ÿ˜…

calm depot
#

what are you changing that will destroy the items?

limber oar
#

renaming their xml files

vast nacelle
#

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

calm depot
#

which XML files?

limber oar
#

clothingItems

calm depot
#

I haven't done any clothing, but isn't it tied to the GUID

limber oar
#

the itemNames in scripts/clothing also changed which is probably what did it

#

You'd think

calm depot
#

yes, changing item names absolutely will

#

because the world dictionary would be referencing old name X which no longer exists

limber oar
#

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

calm depot
#

I would be surprised if just renaming the XML files does anything

vast nacelle
#

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.

limber oar
#

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

cosmic condor
mint helm
#

Isn't this mod just a randomizer? (Many Spawns)

#

Why is it showing up as an actual map?

ancient grail
limber oar
mint helm
limber oar
#

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.

mint helm
limber oar
#

Right

mint helm
#

So what's the main advantage of having it besides preemptive information about where you're going to end up?

limber oar
#

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

mint helm
#

And this mod enables the "unique" spawn points?

limber oar
#

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.

mint helm
#

I really just dislike how it clutters the map selection though

limber oar
#

I don't disagree, but fortunately you only have to look at that once when starting a new game :P

mint helm
limber oar
#

Your brother threw you a list originally, right?

#

Or did he just point at the screen lol

mint helm
#

The former

astral dune
#

if you're the host I'm pretty sure anyone trying to connect will automatically subscribe to and download the mods

mint helm
#

So I have premade list in my hands @limber oar

mint helm
limber oar
#

You can just throw them the same list and that should work

calm depot
#

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

mint helm
astral dune
#

yes, but that interface sucks, use the mod manager mod to setup your other mods

calm depot
#

^

#

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

mint helm
#

I've set it up, now my friends can join without worrying about synchronizing with my list?

astral dune
#

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

mint helm
astral dune
#

ya, takes a minute the first time, as you'd imagine

limber oar
#

Oh that's cute, VSCode has a special icon for files named "changelog"

calm depot
#

you mean you don't use vim?

limber oar
#

Vim is real?

#

I thought that was a meme

calm depot
#

it's very real

#

exiting vim is a meme

limber oar
#

nah I use vscode for work so it's easier to stick with an ide I know

astral dune
#

clearly the answer is to use the copy of Eclipse I downloaded from the university of waterloo in 2004

calm depot
#

I smell a web developer

#

well, or Facebook, but that's not exactly vanilla VSCode

limber oar
#

you got me

dark wedge
#

About 2 years ago, my Emacs config became complex enough to become sentient and convince me to just use VSCode. Haven't looked back

ancient grail
limber oar
#

I like looking through all the collections that use mine and trying to draw conclusions about the users based on their modlists

cosmic condor
#

but I believe Mod ID cannot begin withย '

vast nacelle
#

At least with the mod manager server, it's sorted by Mod Name, not ID

limber oar
#

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

ancient grail
#

anyway to detect if the corpse on the ground used to be a player

#

via lua code

dark wedge
ancient grail
#

nice thnx

ancient grail
dark wedge
#

I think so? pretty sure that's what they still are even when dead (again).

mint helm
#

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?

vast nacelle
mint helm
humble oriole
#

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

vast nacelle
#

The 'joy' of Typeless Languages

humble oriole
#

the temp outside is 21.0000001 C

#

math.ceil(21.000001) = 22

vapid bloom
dark wedge
humble oriole
#

oh thank god

dull moss
#

ceil of 21.000001 is 22?

#

did you mean floor?

humble oriole
#

no, ceil goes up

#

floor goes down

dull moss
#

oh u want round

humble oriole
#

yea

dull moss
#

that's easy

humble oriole
#

yea, dhert told me lol

dull moss
#

math.floor(value+0.5)

humble oriole
#

they imported the java round lol

dull moss
#

fuck that u can just use floor

humble oriole
#

but whay

dull moss
#

idk, just saying its an option

humble oriole
dark wedge
#

plus you get the decimal places

humble oriole
#

POGGERS flooring it?

#

round(getClimateManager():getTemperature())

ancient grail
#

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

humble oriole
#

you can't just drop

speed gun
and walk off like that
is that already on the workshop?

dull moss
#

speed gun PauseChamp

humble oriole
ancient grail
#

Skizot made the model

humble oriole
#

o.O

ancient grail
eternal garnet
#

I wish that was lol

vast nacelle
#

"Uhuh. That one would totally run me down."

hushed haven
#

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?

fast galleon
ancient grail
fast galleon
#

anybody planning to do cockfight and racing mods for animals?

hushed haven
# ancient grail OnKeyPress event

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?

ancient grail
#

You do animation poltergeist? Seems like your ideas hard to do but that would be so cool

fast galleon
#

no haven't tried that yet.

#

hm, maybe zombies chasing rat with noise maker.

ancient grail
#

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

thick karma
#

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

agile vigil
#

A very interesting question.

fast galleon
#

don't olipro and DeltaMango have already what you want?

pulsar heath
#

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?

thick karma
thick karma
pulsar heath
#

cant you just use oli's pzhook?

#

@thick karma i think it was since its related to your question

pulsar heath
#

used it when i was storing my mod configs inside the mod folder about a year ago

thick karma
pulsar heath
#

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...

thick karma
#

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.

pulsar heath
#

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

thick karma
pulsar heath
#

hmmm that might be a good option for me

thick karma
#

Seemed like the most user-friendly approach for my sitch

#

Most people either want all the help or none in my experience.

pulsar heath
#

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

thick karma
#

exactly

pulsar heath
#

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