#Lethal Performance & DiFFoZ Tweaks & BepInEx Faster Load AssetBundles Patcher

1 messages · Page 5 of 1

neon bluff
#

Like what

molten light
#

I think whenever it migrated the old values to have the terminal always be on when on the ship it just migrated it as always on all the time

#

Which is not what I wanted

#

XD

#

But not much you can do, sometimes configs migrate things weird

robust dock
#

yeah that's why I avoid migrating settings as much as possible

#

I see a lot of mods changing their config layout all the time and then there's all kinds of new issues lol

molten light
#

Yeah lol, config refactoring for cleanup is always good though it's just sometimes the migration process isn't the best

robust dock
#

it takes a ton of tedious testing to make sure something like that works correctly

rapid tapir
# neon bluff Like what

can't remember, but i'll give a few that it should have
fix personal scanner off
external cam fps should be 0
always render monitors should be off

stray solstice
#

DUDE

#

Can someone help with my pack

rapid tapir
#

bsadgbhoa

#

send it

#

I'll take a peek

rapid tapir
#

Just like the others though, I won't be going in-depth

stray solstice
stray solstice
#

I don't need config suggestions

#

😭

rapid tapir
#

oh geez uh, tbh it'd be easier for you to just take a peek at the mods in CompanyIssuedFixes

#

There's a lot missing lol

stray solstice
#

Which ones does it replace?

stray solstice
rapid tapir
#

well the pack only has fix/perfomance mods and it said it added like 22

#

not all need to be added but like everything i'd reccomend is on there basically

#

although

stray solstice
#

Wait

#

No dissonance lag fix?

#

But isn't that super needed?

rapid tapir
#

WesleysInteriorsAddon: causes massive lag when nutcrackers wake
DissonanceLagFix: already included in LethalFixes
AEIOUCompany: Has performance issues, use MelaniesVoice instead
LetMeLookDown: only adds like a 5 degree difference now since Zeekerss changed the angle in v65

stray solstice
#

Woa....

#

This is why I need to ask

stray solstice
rapid tapir
#

I plan to eventually just make a modpack with only performance mods

#

prob two versions tbh

#

One that's configured to have minimal visual changes

#

and one that's like i need every frame possible without using HD Lethal Company my pc is a potato

molten light
#

lol

#

It sets the same value as what is now vanilla

rapid tapir
molten light
#

Nope

#

That was what GI's option used to do

#

and Shaosil pulled it

rapid tapir
#

ahhh

#

so i just got em mixed up lol

molten light
#

Flip probably really should deprecate that mod now though

#

@untold trench You think you can dep LetMeLookDown since it's in vanilla now?

honest oxide
open plover
#

Idk who the dev is but Jester stomp shake should be detached too because of how hard it tanks fps by existing

rapid tapir
#

btw not doing anymore testing tonight or anything, going to bed lol

rapid tapir
#

afaik a lot of their older mods have big performance impact

open plover
#

Oh I couldn’t check cuz mobile

untold trench
#

Nvm, it's deprecated now

polar willow
old summit
honest oxide
old summit
#

What about disabling post processing?

#

I recently did that I’m trying to see if it changes performance in any major way

honest oxide
#

in external cam? it would probably improve performance just a little

#

i'm not completely sure about it since it's been a really long time since i last talked to someone about the cam fps

#

so if someone would like to correct me please feel free

midnight tendon
#

I ended up sleeping 💀 why these 3 kill performance?

midnight tendon
#

Nevermind I looked the chat

open plover
#

@rapid tapir update to the wesley interior situation

#

it no longer changes my fps when being enabled / disabled

#

nothing makes any sense istg

#

its like this after I made some of the changes you recommended last night and some other small things I did myself

agile oyster
#

jesterstompshake does FindObjectsOfType<JesterAI> every single frame in the player script

#

even if there's no jester and even if the ship is not landed

#

no wonder

open plover
#

its peak when it does work

open plover
#

show capacity and jester stop screen shake like aleck said
i think that was it but im not sure??
I doubt that would be it

agile oyster
#

lol

#

i have been using showcapacity for like months

#

not knowing that it does gameobject.find each frame

#

whyy piggy

honest oxide
open plover
#

makes me wanna look at other piggy mods to make sure they dont cause issues lol...

#

anything wrong with these?

agile oyster
#

and then add __instance to that list in a jesterai.start patch

#

and rmeove in jesterai.ondestroy

#

could also just search through roundmanager.instance.spawnedenemies for jesterai instances (still kind of expensive, but would be less engineering, and significantly less expensive than a full search, at least)

vestal nimbus
#

shrimp makes me angy

#

im not sure there might be some stuff in the code though thats not done well

open plover
open plover
vestal nimbus
#

ate all my scrap and killed 5 people when i was playing yesterday 😔

open plover
#

oh so skill issue

vestal nimbus
#

nou

open plover
open plover
#

i had revolver with low spawn rate

vestal nimbus
#

also the jester uses an animation event for footsteps, and he DOES postfix it, why he doesnt do the stomping on that postfix i have no idea

agile oyster
#

Lol

agile oyster
vestal nimbus
#

no idea

agile oyster
#

why is it patching timeofday

#

but with playaudioanimationevent as __instance

vestal nimbus
#

huh

agile oyster
#

it's also searching for a jester AI component which definitely would not be up the hierarchy from timeofday

vestal nimbus
#

i didnt even notice that parameter being playaudioanimationevent

#

lol

agile oyster
#

i think this is probably meant to be a playaudioanimationevent patch that was copy pasted and not properly revised?

vestal nimbus
#

oh yeah its disabled

agile oyster
#

bizarre

open plover
#

yeah stomp shake szxhould probably be deprecated lol

vestal nimbus
#

still makes no sense why hes not just doing the stomp effect on the jester's footsteps, but eh

molten light
#

XD

#

It would make the whole screen shake even when inside

#

Just by having JesterStompShake

open plover
#

fire

patent sluice
gusty kayak
vestal nimbus
#

Not really unfortunatrly

midnight tendon
#

Well... ShowCapacity and JesterStompShake updated... are they good now? plink

old summit
#

So probably

midnight tendon
#

Previous ones said that too, maybe the optimizations weren't enough this update

old summit
#

Only one way to find out

rapid tapir
vague belfry
#

it's no longer checking everything every frame

#

yippee

open plover
hidden cypress
#

Is there any specific way I need to cfg this mod, been using the default for a while

hidden cypress
#

also when "[22:16:24.5313076] [Info :LethalPeformance.Patcher] Saved 1 config(s)" is logged there is a lag spike

molten light
hidden cypress
#

no imp

agile oyster
#

showcapacity will still tank your performance

#

still has gameobject.finds every frame

#

im not actually sure what changed

#

possible there have been some improvements

#

but i would still probably suggest against using it unless performance is not a concern for you at all

molten light
#

@abstract ivy looks like Show capacity is still being naughty

abstract ivy
#

Structurally, it will only run once if there is no problem

#

Oh wait

#

i didnt update it

agile oyster
#

lol i was wondering if that might've been the case

#

it looked pretty much the same as it did yesterday

#

i might also suggest using a publicizer for the game assembly instead of using reflection on a regularb asis

#

reflection is expensive and you should try using it as little as possible

#

it's not as big of an issue as .find and derivatives tho

agile oyster
#

this is all you need to do to get the publicizer working, at which point you can access all private fields/methods in assembly-csharp as if they were public

arctic ether
#

Fumo is very optimised

molten light
#

@agile oyster Do you think LethalPipeRemoval might be a culprit of lag? It uses GameObject.Find for almost everything

agile oyster
#

terminalreposition uses gameobject.find in update()

#

customterminal uses gameobject.find in update()

#

movecoil also

#

movevent (if deletevent is off)

#

movetank (if deleteoxygentank is off)

#

movefilter (if deleteairfilter is off)

#

movestorage

#

movemonitor

#

movebuttons

#

movebed

#

so if you use any of those config settings

#

then yes

molten light
#

Yeah I don't use any of the stuff for repositions

agile oyster
#

also there is a lot of wasted work here, for example

#

but this only runs one time in start() so it wouldn't cause persistent lag

#

hangarship is already cached as startofround.instance.elevatortransform

#

and they could've just used transform.find on that object instead of searching the entire hierarchy for every single object

dull quarry
#

probably faster to find and destroy specific meshes

agile oyster
#

stuff like that

molten light
#

I'm really surprised a replacement hasn't been made tbh

#

The mod hasn't been updated in quite a while

honest oxide
rapid tapir
honest oxide
#

Wait

#

Guys I'm stupid again

#

This font makes l and 1 look the same

#

I thought they just skipped 2-10 entirely lmfao

rapid tapir
#

My excuse is that it’s 3 AM

robust dock
#

the source code is most likely more reasonable

honest oxide
#

Na I also misread it

#

It makes more sense now but I still wouldn't title my vars like that

agile oyster
#

local variables are often named in source code, but those labels don't get compiled, and can't be decompiled in return

#

val, val2, val3, etc. is all just auto-generated labels

arctic ether
stray solstice
#

@rapid tapir

#

Ever since I used your modpack for performance stuff

#

My debug menu or BepinEX is not showing

#

Was that your mod that did that?

rapid tapir
rapid tapir
#

np

stray solstice
#

What is it called?

rapid tapir
#

You need to enable it in the BepInEx cfg

stray solstice
#

But I can't seem to find specifically what you mean

#

Like THIS BEPINEX?

#

Found it

rapid tapir
#

👍

ancient igloo
#

Hello for some reason LethalPerformace is causing #1293353988913233991 to turn bees invisible! I've been dealing with the problem for months and until now I was not able to identify what is causing it.

#

The only thing I was able to identify was the line in my code that calling to a method from my library was causing the issue but it did not make sense.

hollow thicket
#

@polar willow @ancient igloo

#

What part of the code is used when spawning bees & beehives? What behavior is assigned when spawning entities.

ancient igloo
#

I don't change anything about spawning

hollow thicket
robust dock
ancient igloo
#
        [HarmonyPatch("Update")]
        [HarmonyPostfix]
        static void UpdatePatch(RedLocustBees __instance)
        {
            BeeValues beeData = beeList[__instance];
            if (RoundManagerPatch.RequestUpdate(__instance) == true)
            {
                (line 56)RoundManagerPatch.ScheduleGlobalListUpdate(__instance, EnemyAIPatch.FilterEnemyList(EnemyAIPatch.GetOutsideEnemyList(EnemyAIPatch.GetCompleteList(__instance), __instance), beeList[__instance].enemyTypes, blacklist, __instance, true, Script.BoundingConfig.IgnoreImmortalEnemies.Value));
            }
        }
#

added (line 56) for reference

#

I had what I thought was fix but I removed it because adding a delay before the line could fire up did not work at all.

dusky barn
#

I've had the invisible bees glitch both host and client, I run LethalPerformance (and have had some other mods come/go so no idea what the glitch was from exactly) but don't run NaturalSelection (and never have)
No idea if that helps in the slightest

robust dock
#

damn that is a lot of nested method calls

#

and when you say you narrowed it down to that line you mean that removing it fixes the invisible bees? is this global list used in a way that it predicates a lot of other logic? seems like it must not be the root cause if so

ancient igloo
#

It's been some time since I tested it but in the past when I commented out the line bees didn't turn invisible. I'll check if it's still the case when I get home. As for the global list I've used almost identical format in the rest of the enemy rewamps and no issue arouse from it and I made a great effort to optimize the cycle as much as I could.

robust dock
#

right, but a list alone doesn't do anything, so presumably the list is used by something else that may actually be at issue here

#

unless I'm misunderstand the purpose of the code here, which is very possible as I didn't try to figure out what all the methods were doing

ancient igloo
#

TLDR instead of every enemy having a local list of enemies I instead went for a Dictionary where every enemy type has it's own list which every enemy of that type share. The enemy lists are updated periodically and only one instance of each enemy type is allowed to schedule update at a time.

polar willow
#

@ancient igloo your library modifying the spawned enemy list, please fix it

#

we probably should implement some protection from writing to that list for other mods

ancient igloo
#

I thought I was making a copy of the list and not directly modifying it

fallen ember
#

by the naming i think you wanted to have a copy of the list

#

just add a .ToList() at the end

dull quarry
#

yeee naur thats reference based

can do new List<EnemyAI>(theListIWannaCopy) to do what you want btw

#

(or tolist which i think does the same thing just more explicitly named)

ancient igloo
#

OOOOOOOOOOOOhhh

#

Now I feel both stupid and enlightened

dull quarry
#

ive done it before dw

ancient igloo
#

I am surprised the game didn't brick itself

ancient igloo
polar willow
#

@ancient igloo the conflict which my mod was because of using that list for setting if enemy mesh should be hidden or not. But if ShipWindows mod installed we would not see that ptoblem, as that mod removes that check

ancient igloo
#

Makes sense. Thank you very much for letting me know about the huge oversight!

robust dock
#

I only recently remembered that SetPlayerSafeInShip uses FindObjectsOfType, it's not so noticeable when it only gets called once, but on a custom moon it was getting spammed because of overlapping reverb triggers

#

incredibly cursed

#

worth noting that Imperium and probably some other mods don't add enemies to that list (at least on the host), I wonder if it would be good to add a debug mode where it warns if an enemy isn't added to the spawned list

polar willow
#

.

molten light
robust dock
#

the one I was referring to is fixed, I made some suggestions to the author to ensure it doesn't happen

#

regardless, installing LethalPerformance and ReverbTriggerFix helps immensely with that

molten light
#

Ahhh okay

viral coyote
#

How does the Faster Load Asset Bundle patcher work with the new LLL?

polar willow
#

should work just fine

robust dock
#

looks like PlayerControllerB.NearOtherPlayers() could potentially stand to iterate and use a proximity check instead of using physics, it appears to use more time than I would expect the iterative approach to use

#

I'm assuming that you're not super active rn DiFF, so perhaps I'll end up making a separate general optimization mod to toss this in along with anything else I happen to find

#

but if you are and want to yoink the idea, feel free

#

it would definitely fit into LethalPerformance (though arguably could change behavior slightly, sampling distance to two points should be close enough)

polar willow
#

i'll look into

polar willow
#

sadly, but just iterating players will not work as expected

#

game actually just checks if any collider (expect with layer mask 8 (room)) are in radius. So iterating only players will not work

molten light
#

rip

#

@robust dock

agile oyster
#

seems like a really weird decision to make

fallen ember
#

isn't that because using Distance is round while colliders check for overlapping boxes?

but i might be wrong as i've not seen the LC code for it

agile oyster
#
private bool NearOtherPlayers(PlayerControllerB playerScript = null, float checkRadius = 10f)
{
    if (playerScript == null)
    {
        playerScript = this;
    }
    base.gameObject.layer = 0;
    bool flag = Physics.CheckSphere(playerScript.transform.position, checkRadius, 8, QueryTriggerInteraction.Ignore);
    base.gameObject.layer = 3;
    return flag;
}
#

8 is used as the layer mask

#

8 = 2^3

#

and layer 3 is Player

fallen ember
#

yeah it's a sphere cast so not really overlapping boxes but still uses the colliders full size and not the origin

agile oyster
#

it unassigns the local player's collider from the player layer, checks a spherecast for colliders, and then reassigns the player's collider's layer and returns

#

interestingly this makes the assumption that the function is always being called by the local player since it does base.gameObject instead of playerScript.gameObject

#

that assumption holds true in vanilla but might not in other mods (although i'd hope other mods are not using this function TBH)

vestal nimbus
#

i would be surprised if the player only had 1 collider in the player layer that's a non isTrigger

#

just checked, i guess there really is only one Think

agile oyster
#

yeah, that was my first thought too

#

but it is the case

#

bunch of DecalStickableSurfaces

vestal nimbus
#

wait, im a bit confused, he's using layer 3 as the layermask?

agile oyster
#

and the PlaceableShipObjects collider that causes you to explode

#

when flying jetpacks

vestal nimbus
#

this is for CheckSphere

agile oyster
#

Lol

vestal nimbus
#

wouldn't he be ignoring the player layer by having 8 there?

agile oyster
#

by making the layer mask 8, he is only fetching colliders on layer 3

#

everything else is ignored

vestal nimbus
#

bleh yeah that sounded weird to begin with, i guess the wording is just stupid

agile oyster
#

it is weird yeah

polar willow
#

and also that method is not expensive at all

#

so i don't see a reason to optimize it

robust dock
#

it was showing up with a fair amount more time in my profiles, that's curious

#

I'll have another look later, but that's too bad it's not feasible

#

I feel like it's possible the complexity could vary based on the moon but I'm not sure

robust dock
#

ah no, I guess it wasn't in a non-deep profile

reason I was interested in optimizing it though is because it's a pretty significant portion of the time spent in PlayerControllerB.Update() for non-local players:

#

the more the time spent for non-local players can be reduced, the better things will look in big lobbies

robust dock
#
static bool Prefix(GameNetcodeStuff.PlayerControllerB __instance, ref bool __result, GameNetcodeStuff.PlayerControllerB __0, float __1)
{
    var allPlayers = StartOfRound.Instance.allPlayerScripts;
    var playerInRange = false;
    for (var i = 0; i < allPlayers.Length; i++) {
        var player = allPlayers[i];
        if (player == __instance)
            continue;
        if (!player.isPlayerControlled)
            continue;
        if (player.isPlayerDead)
            continue;
        if (UnityEngine.Vector3.Distance(__instance.transform.position, player.transform.position) - player.thisController.radius > __1)
            continue;
        playerInRange = true;
    }

    __result = playerInRange;
    return false;
}

this patch seems accurate enough and reduces the time spent in PlayerControllerB.Update() for a controlled non-local player by about 10 microseconds.. not huge, but it's something worth doing anyway imo

#

in vanilla, this runs regardless of whether a player is controlled or not, but it seems like MoreCompany disables all uncontrolled players, thankfully

#

still, the savings can definitely add up in a big lobby if this can be combined with other savings in the update function imo

#

(would be easier to tell where we can get those savings if PlayerControllerB.Update() wasn't so huge 😅 )

#

at some point I'll probably run this patch on a big lobby to see what kind of difference it makes in practice, if I get a chance

dull quarry
#

would it be too invasive to get a trigger collider on the player to track that?

robust dock
#

OnTriggerEnter and OnTriggerExit are unfortunately not reliable, probably why zeekerss ended up using OnTriggerStay for reverb triggers instead

#

OnTriggerExit doesn't trigger when a player is killed and teleported to the unused players area for some reason

agile oyster
#

if i had to guess

#

it's because setting transform.position doesn't update all the callbacks on the rigidbody

#

intuition makes me want to guess it'd be fine if he teleported the rigidbody instead

#

but idk

#

it's kinematic so maybe that wouldnt even work

robust dock
#

yeah, it might work if it called Rigidbody.Move

sharp sage
#

Another idea I had was to keep OnTriggerStay() but only running once every 5-10 seconds if a player is inside, but that could also run into similar issues

#

Now that I think about it though, do reverb triggers need to also affect players other than the local client?

polar willow
#

and may include it to the next release

polar willow
#

because of spectating stuff

robust dock
#

generally the rule of thumb is that if you don't want to rely on LethalPerformance to fix the reverb triggers spamming FindObjectsOfType every frame, you have to ensure that the player can only stand in one reverb trigger at a time

#

it's designed to only change the properties if the player is changing reverb triggers, but if you are colliding with two of them at once, it just makes the two fight each other

sharp sage
robust dock
#

it shouldn't, the thing that causes them to spam is when (from memory, may be wrong) PlayerControllerB.currentReverbTrigger changes twice in a frame

sharp sage
#

Hmm

#

Could that happen with two players inside the same trigger maybe?

#

I'm not even 100% sure if it's reverb triggers causing the lag actually, I'm just assuming that's the case since it's been happening suspiciously near every entrance

robust dock
robust dock
sharp sage
#

Forgot about that guide though, I'll be messing around with it, thanks! yoiled

sharp sage
#

Good news is it doesn't happen due to the Ferris wheel, bad news is it happens on every exit lol

vestal nimbus
#

not enough findobjectsoftype

sharp sage
#

True I gotta add my own beevil

vestal nimbus
#

i liked that one enemy that did findobjectsoftype 5 times in update in a row

sharp sage
#

💀

#

enemy mechanic, attacks your frames

vestal nimbus
#

unity is the real enemy

robust dock
#

also... why do you have reverb triggers on your entrances?

sharp sage
#

Yeah I uhhh

#

I think I know what it is

robust dock
#

I think the teleports themselves are supposed to be able to use a reverb trigger preset to change weather and all that

robust dock
#

yurp

sharp sage
#

However on top of that I had a number in usePreset for the reverb triggers, which calls a bunch of stuff 💀

#

I'll definitely get rid of all this lol

#

Guess I just hadn't noticed them causing issues since I've just had LethalPerformance on both my testing profile and actual modpack

robust dock
#

huh, even with usePreset it definitely shouldn't have been hitting ChangeAudioReverbForPlayer twice

sharp sage
#

Oh not sure then, hmm

robust dock
#

or it does hit that method twice, but you would only see the FindObjectOfType once

#

and it would also show as recursive on the deep profile

#

would definitely recommend using a hook to print what triggers you're hitting there

sharp sage
#

Sure

#

Actually I could just use the class that inherits AudioReverbTrigger that I was testing a cooldown on

robust dock
#

oh sure

#

UnityExplorer is very convenient if you already know how to code though

#

allows you to test more thing without restarting than even all the other access it gives you in inspector

sharp sage
#

Oh I do use it

#

That's how I recreated the entirety of Bozoros' project 💀

robust dock
#

sorry I meant specifically the hooks

#

but if you mean that then based

sharp sage
#

Oh I thought you meant MonoMod hooks

robust dock
#

nope

#

UnityExplorer lets you write Harmony hooks at runtime

#

it automatically prints out all arguments and the return value of a method by default

sharp sage
#

Yeah I haven't actually messed with the editor stuff from UnityExplorer, I've just been using it to inspect/modify stuff

#

I'll give it a try at some point, it does sound interesting

old summit
#

I’ve been using it for a while but I’m a bit curious. How does BFLAP play out with profile codes? It’s slower on the first startup so does that count through profile codes or does the extra speed get added the first time?

polar willow
#

bflap doesn't save uncompressed bundles in profile directory and instead use game directory

#

so changing profile won't cause uncompressing bundles again

old summit
#

Alright thanks

polar willow
#

smol patch

[0.5.1] 2024-01-27

Fixed

  • Compatibility with BrutalCompanyMinusExtra(Reborn).
molten light
polar willow
#

no

pallid mural
polar willow
#

wdym guys it's for v47 Trollface

old summit
#

v50 is releasing 10PM tonight

stray solstice
#

Wow!!!

#

That's amazing!!!

polar willow
#

@rain juniper is v1 still defaults multithreading to be enabled?

#

or you changed that already?

gaunt wedge
#

It is enabled by default, is it causing problems?

#

The last time I played I didn't have any problems, or at least I didn't feel like I had any.

polar willow
#

yes, it is causing crashing

old summit
#

It causes crashing for some people

polar willow
#

and looks like running game as admin can prevent this issue

#

or is just rng

thorny gazelle
#

I tell you from experience

fallen ember
#

yeah i highly doubt admin would fix something like this

gaunt wedge
gaunt wedge
thorny gazelle
#

yup

gaunt wedge
#

Thaks ^^

stray solstice
#

Wait what

#

Do I disable this in general?

gaunt wedge
#

As seen in the image above

stray solstice
#

Huh

#

Neat

open plover
polar willow
#

hm i noticed that with vsync Physics.Simulate may call like 8 times in one frame, even through my fps is stable at 60

#

or it's because of setting Application.targetFrameRate to 30 while vsync is on

#

let me check

polar willow
#

ok it's just problem with debug profile

#

when profiler attaches the game will run simulate multiple times even if fps is stable

robust dock
#

huh, I hadn't noticed that happening unless I had really bad frame times, that's curious

#

I definitely see the fluctuation due to the fixed updates though, not sure if there's more we could do about that other than fixing some more of the trigger exclusions

polar willow
#

looks like it's because of how deltatime calculated with vsync

#

when game is in windowed mode and minimized, it calls fixedupdate's multiple times

#

when i set cap to 60fps then it doesn't happen

robust dock
#

ahh, I see, good to know

polar willow
hidden cypress
#

[06:05:56.0862732] [Info :LethalPeformance.Patcher] Saved 1 config(s)
sometimes causes lag spikes

molten light
#

It's never caused lag spikes for me

hidden cypress
molten light
#

I know you use LethalEmotesAPI for example and that is known to cause some lag spikes and stuff, dunno if you use anything else that might

hidden cypress
#

thx for the info

robust dock
#

if you mean that the lag happens when that is printed, then it's probably caused by something else another mod is doing around the time when it is writing to its config

#

I very much doubt LethalPerformance is causing stutters just by writing config files for other mods

polar willow
hidden cypress
polar willow
#

man how to override weather of custom levels

#

and without reference of LLL :/

vestal nimbus
#

@vague belfry would be the person who's spent the most time on weather stuff afaik

vague belfry
#

depends on what you mean by that

polar willow
#

I need to just set to all levels a rainy weather

vague belfry
#

set all weathers' default weight to 0 and Rainy's to 9999 in Registry config

#

oh wait, you want to do it as an external mod?

polar willow
vague belfry
#

i assume without taking any additional dependencies?

polar willow
#

looks like i found how

vague belfry
#

honestly you could just take those from StartOfRound.Instance.levels

#

since LLL adds to that array

polar willow
#

hm, let me check

polar willow
#

probably I got confused because I was using Wesley moon

#

it's probably forced to none, because of it counted as company building?

vestal nimbus
#

I think you can still have weather on that moon, atleast I managed to put custom weather on there before, dunno about vanilla

vague belfry
polar willow
#

probably just no effect spawned or just moved, because visor still shows rain drops. eh, will just use starlancer moons instead

#

i love a lot of logs yoiled

#

@dull quarry probably you should add a check if it's vanilla moon or not for fixing water shader

polar willow
#

[0.5.2] 2025-02-14

Added

  • Caching of AudioListener, DepositItemsDesk, BeltBagInventoryUI.
#

and some work was made for temporary caching, that could be used for EntranceTeleport

molten light
polar willow
#

yeah

molten light
#

Yippee lunxara_love_with_tail

molten light
#

;o

#

I was checking why I didn't see it yet in Gale and noticed it never got uploaded

#

XD

molten light
#

@polar willow Lmk when you actually get this update uploaded to Thunderstore 🙏 I hope to play with it today

polar willow
#

only caching of these 3 things

molten light
#

Ah okay

prime spade
# molten light Ah okay

I must say your modpack is goated...I basically made a more vanilla version of it and using it as a base....just wanted to give you props!

polar willow
#

yeah, I always use Lunx modpack as a base for playing with my friends, less time to configure 🙂

molten light
#

lunxara_love_with_tail The current version of it is much more Vanilla+ than some of the older codes I've sent

robust dock
#

if possible, I'd kinda like to include these regardless of the caching you implement on your end, but if it would cause a conflict I'm also fine with ditching it in favor of your implementation (especially if you can also avoid allocation)

molten light
#

@polar willow Any eta on the update? LUBBERS

polar willow
#

currently no eta

grim vortex
#

what even is the update?

#

is there a way to see

molten light
#

I want the Entrance Teleport caching lol

grim vortex
#

oh lol thanks

limber yew
#

What problems come from not caching the entrance teleport? Is that when you go through the main door to the interior? Does it lag or something?

robust dock
#

main things are

  • low fps with Loadstone before the interior has generated fully
  • masked potentially causing stutters in the AI interval
#

I haven't measured specifically how much of the masked stutter is from the entrance teleport search vs the mineshaft elevator search, but I believe the majority of it is from the elevator

#

entrance and elevator are both going to be patched in a future beta of PathfindingLagFix as well, though

limber yew
#

Oh I think ButteryStancakes has something like that in MaskFixes? Maybe partially, I know it had to do with the elevator search from masked

agile oyster
#

yeah i cached elevator script properly

#

in the rewritten masked roaming behavior

#

i didnt patch entrance teleport

polar willow
#

well my plan is to cache these objects, so if other mods are trying to get them, then no need to call expensive API, because it will be already cached.

Like StarlancerFix searches for EntranceTeleport's to link doors internally.

polar willow
#

generic patching...

#

time to cache a lot of things for ES3

#

if ES3 caching will make a big change, then I may rewrite it to use prepatching method, instead of using harmony

honest oxide
#

what is es3 caching?

polar willow
#

ES3 is the system that game uses for save state

#

but because of how Zeekerss set up it, it causes a lot of overhead of saving/loading data due to encryption

#

and then json parsing

vestal nimbus
#

if im saving using zeekerss' es3 stuff, is there anything i can do to make saving more bearable?

polar willow
#

if you're using other path for saving, then you can specify to not encrypt the data

#

and you can also use ES3File that will cache all data to the memory, so loading will be fast

vestal nimbus
#

is that part of the ES3Settings thing?

polar willow
#

yes

vestal nimbus
#

owo_think hmm okay, whats ES3File?

polar willow
#

es3file is just in memory file and contains all data that file stored

#

uncompressed and unencrypted

vestal nimbus
#

okay so for saving, this is good?

polar willow
#

no, because you're using path that game uses

#

you need unique path, because if your mod will removed then save file cannot be deserialized

vestal nimbus
#

so i should have my mod make its own save files?

polar willow
#

yes

vestal nimbus
#

so this is as good as i can get saving?

polar willow
#

yeah

vestal nimbus
#

neat, that's pretty cool, imma redo a bunch of my saves rq and then take a look at the loads, assuming there's something i can do there

polar willow
#

would be nice to have a library that will do this work

#

like sync to the current save file name etc

vestal nimbus
#

there's lethalmoddatalib but i dont really know too much about what it does internally

#

plus i hear it half works nowadays

polar willow
#

it's just uses game current save name

#

but just adds prefix, so key is unique

#

oh wait it actually uses other file path

#

but doesn't set encryption to none

vestal nimbus
#

and for load, i assume just using the same settings is all i can do? noticed i could pass in the settings after the default value

polar willow
#

yeah

vestal nimbus
#

okie, thanks RemHeartHug

polar willow
#

and with some patching is now saving as a json text

#

but sadly that would be a breaking change

#

here pretty version

cobalt goblet
#

these mods are gods gift to the world

molten light
robust dock
#

because of sending the flag to not encrypt it confuses ES3 about how it should load?

fallen ember
#

the point is him specifying ES3Settings to not encrypt

#

either you keep default settings to write to vanilla files or you use a separate file

robust dock
#

wouldn't it make more sense for mods to save to the same file and then let LethalPerformance modify how that is done globally to be more efficient?

#

it looks like it ought to be possible to modify the defaults to not use encryption, and if mods use the default then they would automatically inherit that as well

fallen ember
#

it's definitely possible

robust dock
#

hmm, it seems surprising to me if there's not a way to retry a load with different settings if a first try fails

#

obviously that would require hooks, but it seems like that is necessary regardless

#

I'm just not personally a fan of the trend of splitting save data into multiple files, my game save folder looks like a disaster already lol

#

currently it's only the vanilla data and mod data lib, I hate to imagine what it'll be like if each mod makes their own

fallen ember
fallen ember
robust dock
#

yeah

#

from my perspective, if LethalPerformance hooks the save/load methods that vanilla uses to make them cached, then it seems like the best thing would be for mods to also use that method for consistency, and then they can take advantage of that as well

#

that way, if there are future improvements to be had that go beyond what we currently know is possible, then they can benefit from those as well

#

but maybe diffoz knows a reason why that isn't preferable

polar willow
#

I can with breaking change set encryption to None at least for saves, but not for general save, as it would then require for player to always use my mod to not break all in-game settings

robust dock
#

is it not possible to detect the encrypted format and then migrate it to be clear?

#

attempt loading without encryption, and if that fails, try with encryption and transfer all kvps to a few file?

polar willow
polar willow
#

bruh, for some reason ES3 bugs and writes string data wrong, but if I reserialize it then it saves it correctly

#

welp time to log on every step of serialization

polar willow
#

hmm, would someone be happy to get copy of general save without encryption by enabling option in the config?

#

because currently it's only saves LCSaveFile1-3 without encryption, everything else is still with encryption

polar willow
#

Pre-release [0.0.100] 2025-03-02

ES3 caching is here! yay

Precaution:
If you load the game without LethalPerformance after playing with it, you will not able to get your saves to get loaded!

Added

  • Caching of AudioListener, DepositItemsDesk, BeltBagInventoryUI.
  • Caching of ES3 files.
  • Saving ES3 files as unencrypted. Note that LCGeneralSaveData is still will be encrypted.
#

I would also recommend to backup saves, just in case

#

you can find them if you press Ctrl Shift L in main menu

molten light
#

👀

#

I'm most certainly excited for the ES3 stuff

polar willow
molten light
#

Got ya was just wondering if you ever got around to that

molten light
#

How long do you keep it in pre-release for? I'm just gonna stay on this version til you push the full update 😂

polar willow
#

until I will get some checks that it is stable

molten light
molten light
#

Lol

polar willow
#

o lol

molten light
#

I'm guessing it usually saves whether you've seen it or not to LCGeneralSaveData or something in some odd way

polar willow
#

it doesn't even use general save and instead use default name (SaveFile.es3). The problem is that it checks if key of save exists before loading

molten light
#

Ah I see, I wonder how easy that is to fix then

polar willow
#

Pre-release [0.0.101] 2025-03-02

Fixed

  • Diversity intro cutscene plays every session.
flat spade
#

that was fast

molten light
#

Noice 😄

polar willow
#

oops I uncomment some debug logs, ignore FATAL [ES3 Save/Load] logs lol

molten light
#

Ah so it won't hurt anything then

#

Right now I'm testing to see if Journeys stuff works okay with it

mellow shoal
molten light
polar willow
#

welp, yes. Only by that I can do of removing encryption

#

please note that mods are also counted right now

molten light
#

Oh interesting

polar willow
#

but not LCGeneralSave(.moddata)

fallen ember
#

maybe also add a folder to the base path so your unecrypted files do not overwrite vanilla ones?

mellow shoal
#

it's more just knowing it will make you saves unplayable without it I'd honestly rather the easier precaution of searching and disabling the mod in other people's packs and remove it from my own. just to be able to play without mods if needed

polar willow
molten light
#

Yeah the problem of not being able to add or remove mods currently is a bit strange but I'm sure that will get addressed

#

It's pre-release for a reason

#

My main thing right now is making sure Journeys progress saves okay

#

for when it does reach full release

#

I can just make a new save for stream today idm

mellow shoal
#

but it is the release on thunderstore right now no?

molten light
mellow shoal
#

or is this like a seperate thing like a beta veraion

molten light
#

you have to specifically change it to the pre-release build for it

#

current live version is 0.5.1

fallen ember
#

🤔 i'm seeing that you would have to change the actual working directory of Unity to pad all filepaths. as zeekers uses relative paths

molten light
#

you have to change it to 0.0.101 for the caching testing

polar willow
molten light
#

Yeah

#

Journeys stuff doesn't work

polar willow
#

plus what happen if these 2 files will out of sync

molten light
#

you'll lose progress after a save reload

fallen ember
#

what 2 files? with your mod all the files are incompatible. so if you go back to vanilla all files need to be deleted and remade. and same in the opposite

#

nobody should use vanilla files with your mod nor vice-versa

#

at this point making sure you always save/read from a different folder is the only way to not break the vanilla files

polar willow
#

forget it, I just force encryption for all saves again

fallen ember
#

that was not my point but you-do-you 🤷 . matty out

polar willow
#

Pre-release [0.0.102] 2025-03-02

Changed

  • Force encryption for all saves. Prevents losing save when loading to the game without LethalPerformance.
molten light
#

I just had to restore a full backup when testing going back to live branch cus even my rank and stuff got reset to like 25

mellow shoal
#

i mean you can probably make it an option if you really want but people want to use this mod for just better performance and you can do some stuff with the save file to optimize it i just think it should be done in a way where you don't brick people's files if they remove your performance mod.
especially users who don't read changelogs or are even in this discord it could be a huge headache and confusion to find out the saves breaking was over removing a performance mod.
you could totally make it an option or maybe even a seperate thing if you want and give that proper warnings.

molten light
#

This I agree with

#

I'm guessing the Journeys progress not saving for example is cus LCModDataLib relies heavily on some encryption stuff

#

I like how optimized it was when testing though

polar willow
molten light
#

Like LCSaveFile1, LCSaveFile2, etc

#

Anyways I went to Galetry and played the tapes to unlock the moons and when reloading the save they were locked again essentially

mellow shoal
molten light
#

I'll see if it works now with the save encryption

#

since that is back

mellow shoal
molten light
#

I'm thinking LCModDataLib wasn't working properly then with the unencrypted stuff, so I wanna test if it works okay now or if it's the caching as a whole

polar willow
#

it because it was also using KeyExists before loading

molten light
#

Ahhhh

#

That makes a huge amount of sense

#

I wasn't entirely sure how ModDataLib handled stuff

#

But I know it breaks rather easily even from stuff like LCBetterSaves

#

So it was an edge case I considered to break from lack of encryption

fallen ember
#

gotta love when people go out of their way to check for KeyExist for serving the default value. as if Load didn't have the option to pass a default value to it 🙃

molten light
#

Yeah

#

@polar willow Guessing you'll be pushing a patch for it like with the Diversity save stuff

polar willow
#

I just patched global method

#

so doesn't matter

molten light
#

Even with Encryption reenabled saving is still extremely smooth

#

Yeah it's still not saving the progress

molten light
polar willow
#

looking rn

molten light
#

Yeah cus I even double checked and it's only happening when running the pre-release build of LethalPerformance so something is being strange lol

polar willow
#

|| where is that tape, I still didn't played wesleys moons after big update 😭 ||

molten light
polar willow
#

|| holy CINEMA ||

#

not again

#

why es3 why

molten light
#

🤔

#

At least my modpack is exposing all the bugs with the caching that need fixed x)

polar willow
#

oh wait now I see why, it forces all valuetypes to be saved as object

molten light
#

Oh this makes a lot of sense

molten light
cursive dagger
#

Here's an idea for making the save file situation as painless as possible

  1. Separate the save file optimization into its own mod so that it will be explicitly obvious that this behavior is in a modpack + can still be depended on even if for some reason LP needs to be disabled / removed from a modpack
  2. Keep the encrypted save file as the same name, but when the save file mod is loaded, saves use a different file name. So both the unencrypted and the encrypted files will be present in the folder
  3. In game, all saving and loading just uses your unencrypted files. Every time the main menu is loaded, write whatever files were touched to the encrypted files.

This system would make it extremely obvious that save file stuff is going on in a modpack, and always provide a way for the game to function even if someone removes the mod, since the encrypted save file would be there with the right name in the right path. The worst case scenario would be that someone closes LC directly from in-game without exiting to the menu first and then removes the mod, resulting in their encrypted save file being slightly out of date. But they would be able to fix this simply by opening the main menu with your mod

#

Also would be a good idea to have a button in Lethal Config to manually trigger the encrypted save so someone can do that without exiting to main menu if they would like

polar willow
#

just found that if you try to save null value with type of object, then it will throw NRE

#

ES3....

molten light
#

🤔

polar willow
molten light
#

Then yeah maybe you could do what DBJ is suggesting for example, that way extra data that is not working properly from caching can still load

#

Or maybe LethalModDataLib should be excluded

polar willow
#

I cannot exclude by mod id

molten light
#

Yeah then DBJ's suggestion would work, since the way you described it it's failing to load the saved data on save load right?

cursive dagger
#

my suggestion would rely on the save file mod's ability to successfully read/write its own unencrypted save file and then write that data to the vanilla save file format

polar willow
#

Pre-release [0.0.103] 2025-03-02

Fixed

  • Saving value by forcing it as object, causing writing garbage data.
molten light
molten light
molten light
#

XD

molten light
#

Yeah not even a crash reporter it just froze and then closed when I tried to delete a save

#

lol

polar willow
#

Pre-release [0.0.104] 2025-03-02

Fixed

  • Crash when deleting save file.
#

looks like only you @molten light did the testing lol

molten light
molten light
warm fjord
#

hello everyone, i saw on the BepInEx Faster Load AssetBundles Patcher that introtweaks is not compatible with this mod. is there an alternative to IT ?

quartz pollen
warm fjord
midnight tendon
#

why it isn't compatible?

#

curiosity

quartz pollen
pallid mural
warm fjord
#

i checked some earlier messages in this discord and i also saw that, but i never experienced any issues with lll and custom moons

midnight tendon
warm fjord
#

i wonder if its still accurate today but just in case i'll stop using these mods

midnight tendon
#

any mod that skip that menu will have "troubles"

#

but i never had any problem with BFLAP and introtweaks

pallid mural
#

well i do have problems with it same with older comments
its been a while tho so i dont know what mod it breaks in my case anymore

honest oxide
#

the ES3 caching won't corrupt saves on profiles that don't use lethalperformance right?

thorny spire
#

idk about corrupt but it won't let u load saves that have used it from what I can tell

honest oxide
#

that's fine imo

#

as long as the saves that don't use it are untouched (granted i don't load them with LP)

#

when this error shows up, all the saves are invisible on the host screen until a restart

honest oxide
#

though now, after looking into bettersaves and seeing all the issues it has, i'm considering removing it. i'll try again without it and see how performance handles

#

also is incompatible with SmartItemSaving. sent this message once in logs and broke GI monitors when loaded. disabling SIS fixed the problem. I assume this is because it tries to load the encrypted file (which isn't there now) and errors out?

#

now thta i think about it, this probably occurs with lethallib's item save fix too, but i had it disabled when i found this

molten light
#

for item rotations

#

It works fine

honest oxide
molten light
#

LLL handles that

honest oxide
#

but since i usually remake the save every time it happens i don't need it anymore

honest oxide
molten light
#

So long as you don't have a scrap on the ship that you plan to remove it's fine

molten light
#

ColorfulJarOfPickles

#

Removing that fixed it

#

That mod I think registers things wrong sometimes

agile oyster
#

are you using LCBetterSavesFix

honest oxide
agile oyster
#

okay

molten light
#

Crit has said he wants to rewrite LCBetterSaves entirely maybe it's finally time for it

agile oyster
#

just wanted to check because that error names a mod data file

molten light
#

@feral eagle

agile oyster
#

well

#

lcbettersaves works ok for me

#

for what it's worth

honest oxide
#

ik it does some funky stuff with renaming saves, which mightve caused at least a little of what was happening there

agile oyster
#

i haven't tried it with the new lethal performance beta, but all it needs to do is let you name saves and have more than 3 files

#

and it does both just fine

honest oxide
#

i could try it again now that SIS was removed

#

trying it again without SIS, the same error originating from LCBetterSaves shows in log, and then does this

#

all i did was make a new save, close it, re-enter, then back to menu

feral eagle
molten light
#

Hmmm

#

@polar willow Is there anything that could be changed in LCBetterSavesFix for compat? Maybe @feral eagle could push an update for the Fix mod if it's simple to fix

polar willow
#

I still didn't check source code of LCBSFix to know if it's possible to add compact on my side

molten light
#

I'll check if SaveItemRotations also breaks rq

#

Hmmm @polar willow 🤔

polar willow
#

EM problem

molten light
#

And it fixes the extra overhead it had which I'm glad, I've always favored it over GI's implementation cus GI's behaves a bit weird

polar willow
#

probably fixed, but I'm not sure about these errors

[Info   :LethalPerformance] [Cache] DiFFoZ.Find.SaveFileUISlot_BetterSaves (all objects)
[Info   :LethalPerformance] [Cache] DiFFoZ.Find.NewFileUISlot_BetterSaves (all objects)
Panel label not found.
Delete file game object not found.
Error occurred while refreshing save buttons: Object reference not set to an instance of an object
Error occurred while updating files panel rect: Failed to find FilesPanel RectTransform.
An error occurred during initialization: Object reference not set to an instance of an object
[Info   :LethalPeformance.Patcher] Saved 1 save(s)
#

never used LCBetterSave(Fix) and SmartItemSaving

honest oxide
#

the panel errors are (seemingly) a normal part of LCBetterSaves

#

it sends those all the time but continues to work

polar willow
#

Pre-release [0.0.105] 2025-03-03

Fixed

  • LCBetterSave and SmartItemSaving throwing exception, because of cached saving feature.
molten light
molten light
#

Wonder if this could be cus of Enhanced Monsters

#

@limber peak Why is Enhanced Monsters running a save checker when the game is saving?

#

🤔

limber peak
#

it's development artifacts

#

but it should really not freeze since it's only logs what's being saved

molten light
#

Yeah not sure why there's a small freeze when the game is saving now

limber peak
#

I'll check this if it comes from my checker

midnight stirrup
#

files that normally save without encryption get encrypted

so if i went from the experimental version to the stable one it would not be able to read the file anymore

molten light
#

So idk what files you mean that normally aren't encrypted

limber yew
#

LethalPerformance and LethalSponge work well together? i assume there's pro's for having both?

#

looks like in LethalSponge you can disable "qualityOverrides" so that you dont have both mods adjusting the Atlas stuff?

midnight tendon
#

i mean

#

i forgot that both mods did the same thing

#

but i didn't have any problems

#

so i guess it's fine

molten light
#

I recommend 2048x1024 in both personally

midnight tendon
#

What's the difference between 1024x1024 and 2048x1024

honest oxide
#

2048 is less likely to throw errors about there not being enough space in the atlas probably

midnight tendon
#

isn't that related to Cookie atlas texture resolution?

#

I only saw those errors when i had SpectateEnemies

limber yew
#

i just set them all to 2048, figure that you cant go wrong there and its still way lower than vanilla

molten light
#

Oh yeah since 2048x2048 is an option I would use that in both NODDERS

#

either 2048x1024, 2048x2048 or 4096x2048

molten light
# polar willow ¯\_(ツ)_/¯

Maybe it has something to do with what confusified mentioned? It sounds like some things that don't get encrypted when saving by default in vanilla are with 0.0.105 potentially

polar willow
#

all saves are encrypted

molten light
#

I'm just unsure what he was talking about here

polar willow
#

and even if you will migrate from old prerelease version to the new one, then it will automatically encrypt it

polar willow
#

and got confused

molten light
#

How close are we to you pushing 0.6.0 btw? Things have felt pretty stable besides the fact there's a small freeze when saving with 0.0.105 compared to 0.0.104

#

Dunno why that is, my only guess was the Enhanced Monsters save checker

polar willow
#

well it's probably a lot of stuff happens in the save frame

molten light
#

Since that also updated

#

That is possible

polar willow
#

when mod request to load data, then it will deserialize, for saving it will serialize that data

#

and when a lot of mods requires load and save then it will slow down a bit

#

it still faster than vanilla does, as it doesn't decrypt file, read the file and then deserialize to get your data

molten light
#

True

polar willow
#

no more changes for this release needed

molten light
#

Noice yoiled

polar willow
#

The only thing is I can do is push es3 saving on other thread, but I don't think it would make better, as the caching one.

molten light
#

Cus with 0.0.104 there was no small freeze when it saved at all

#

My guess here is Enhanced Monsters, I wonder if that adds some overhead on the main thread

#

Let me see if that repros with it off

#

Cus when running 0.0.104 I also didn't have the new update for Enhanced Monsters, it was on 1.3.6

#

Okay yeah it still reprod

#

So strange

#

Not a huge deal though

#

Okay yeah

#

@polar willow I just downgraded to 0.0.104 to run a quick test and there is no freeze at all when saving

#

but with 0.0.105 there is

#

No freeze at all

#

I'm relaunching with 0.0.105 rq to grab a recording of that

#

cus I would assume it's a bug

molten light
#

Really odd

molten light
#

Well actually better than a config option maybe a check could be added for them lol

#

That way on boot it detects if they're present or not which removes the extra overhead while the game is saving

polar willow
molten light
honest oxide
#

Hey wait a sec

#

I'm not just on call for checking these clueless

#

I gotta be up for jury duty tomorrow

molten light
honest oxide
#

Hell if I know

molten light
#

lol

honest oxide
#

I probably know less about these than you do

molten light
#

There's a couple changes in LethalPerformancePatcher that might relate to it but I would assume here it's something in Patch_ES3 or ES3Tasker

#

Patch_ES3 especially got a big chunk of code removed lol

polar willow
#

ok i found the reason

#

fixing and pushing

#

Pre-release [0.0.106] 2025-03-04

Changed

  • Updated readme to include Lethal Sponge mod.

Fixed

  • Lag spike during saving due to deleting save keys.
#

I didn't even noticed it because of using vanilla pack for development

molten light
#

Yippee

molten light
polar willow
#

here what happens in during saving frame

molten light
#

Interesting ;o

polar willow
molten light
#

Ig I can pull it lol

polar willow
#

it searches for web spider trap components

molten light
#

Ah yeah that makes sense, it has a fix for spider webs

#

It's a shame we don't have a fix for that that doesn't cause lag spikes

polar willow
#

DiFFoZFixes 👀

molten light
#

iirc TestAccountFixes caused worse lag spikes if not the same

#

Lmao yeah it might be time for DiFFoZFixes

fallen ember
#

what is it trying to fix about the webs?

#

can't we just intercept the web creation code?

polar willow
#

idk, i don't want to check the code

molten light
fallen ember
#

i meant in detail code XD. ik what the bug description is 🙃

molten light
#
    {
        //IL_00d4: Unknown result type (might be due to invalid IL or missing references)
        //IL_00e0: Unknown result type (might be due to invalid IL or missing references)
        //IL_00e5: Unknown result type (might be due to invalid IL or missing references)
        if ((Object)(object)StartOfRound.Instance == (Object)null || (Object)(object)StartOfRound.Instance.localPlayerController == (Object)null || (Object)(object)__instance != (Object)(object)StartOfRound.Instance.localPlayerController)
        {
            return;
        }
        if (HQFixes.webFixOn.Value)
        {
            __instance.hinderedMultiplier = Mathf.Max(1f, __instance.hinderedMultiplier);
            if (HQFixes.timeSinceSpiderCheck < 0f || Time.realtimeSinceStartup - HQFixes.timeSinceSpiderCheck > 1f)
            {
                HQFixes.timeSinceSpiderCheck = Time.realtimeSinceStartup;
                SandSpiderWebTrap[] array = Object.FindObjectsOfType<SandSpiderWebTrap>();
                float num = -1f;
                SandSpiderWebTrap[] array2 = array;
                foreach (SandSpiderWebTrap val in array2)
                {
                    float num2 = Vector3.SqrMagnitude(((Component)val).transform.position - ((Component)__instance).transform.position);
                    if (num > num2 || num < 0f)
                    {
                        num = num2;
                        if (num2 < 25f)
                        {
                            break;
                        }
                    }
                    if (num2 > 25f && (bool)AccessTools.Field(typeof(SandSpiderWebTrap), "hinderingLocalPlayer").GetValue(val))
                    {
                        AccessTools.Method(typeof(SandSpiderWebTrap), "PlayerLeaveWeb", (Type[])null, (Type[])null).Invoke(val, new object[1] { __instance });
                    }
                }
                if (num > 25f && __instance.isInsideFactory)
                {
                    __instance.isMovementHindered = 0;
                    __instance.hinderedMultiplier = 1f;
                }
            }
        }
        if (!HQFixes.interactFixOn.Value)
        {
            return;
        }
        if (__instance.isGrabbingObjectAnimation)
        {
            if (HQFixes.timeSinceGrabbing < 0f)
            {
                HQFixes.timeSinceGrabbing = Time.realtimeSinceStartup;
            }
            else if (Time.realtimeSinceStartup - HQFixes.timeSinceGrabbing > 1f)
            {
                __instance.isGrabbingObjectAnimation = false;
                HQFixes.timeSinceGrabbing = -1f;
            }
        }
        else
        {
            HQFixes.timeSinceGrabbing = -1f;
        }
    }
}```
#

@fallen ember

fallen ember
#

👀 Reflection in Update. not cached FindObjectsOfType. ohhh boy

polar willow
#

at least once per second

molten light
# polar willow at least once per second

Does MagnetLock also do some stuff every frame when a Cruiser is attached btw? I notice the game lags quite a bit when going back into orbit with it present, there's still some lag with it disabled but it's not as bad

#

Unsure if it's that or one of the Cruiser Mods or if it's just an annoying Vanilla thing

molten light
polar willow
#

from what I see VehicleController caching by ButterFixes(?) is not fully covers all ways

#

so it may still call expensive method

molten light
#

Ah yeah that might do it, I think Buttery just cached the important stuff since you planned to cache it eventually

#

@agile oyster Any plans to cache the VehicleController when a Cruiser is Magneted to the ship?

polar willow
#

Pushing release

#

and after few hours will start working on a new pre-release version

molten light
#

Ooh

polar willow
#

[0.6.0] 2025-03-04

ES3 caching is here! yay

Added

  • Caching of AudioListener, DepositItemsDesk, BeltBagInventoryUI.
  • Caching of ES3 files.

Changed

  • Updated readme to include Lethal Sponge mod.
polar willow
#

emblem causing slow start up

agile oyster
#

the only one i left unpatched is DespawnPropsAtEndOfRound which does findobjectsbytype<vehiclecontroller>() instead

#

but that should only run a single time when the ship returns to orbit

#

maybe i misunderstand but im not seeing where ElevatorFullyRunning() calls a search function

#

ElevatorFullyRunning() goes through all the motions required to end a round, and will eventually wind up calling DespawnPropsAtEndOfRound()

#

which destroys all the scrap left on the surface

agile oyster
polar willow
#

Caching of PlayerVoiceIngameSettings done, should help with lag spikes with Mirage mod

polar willow
#

Just found out that unity explorer may break caching system, if you enable UI in the ship scene

molten light
#

Fun

molten light
#

What is it doing that is causing it? I noticed it logs a shit ton of stuff

polar willow
#

a lot of path tracing from what the GC stacktrace is showing me

molten light
#

Fun

polar willow
#

VehicleController caching is done

molten light
#

Noice

#

😄

#

So 0.6.1 soon? lunxara_love_with_tail

polar willow
#

i'm currently thinking of my fix mod, but I also want to implement some silly things, so I'm thinking of DiFFoZUtilities name of the mod

#

idk

vestal nimbus
#

DiFFoZDibalance wen

fleet aspen
#

DiFFixes

old summit
#

Difameleon

vestal nimbus
#

is this a normal warning to get, lol

#

(in my dev pack with unity explorer etc)

polar willow
#

for you yeah

polar willow
#

Pre-release [0.0.110] 2025-03-06

Added

  • Caching of VehicleController, PlayerVoiceIngameSettings objects.

Changed

  • Make rendering sampler to be included in release build, so dev can use it.

Fixed

  • UnityExplorer may break caching system.
molten light
polar willow
#

due to PlayerVoiceIngameSettings

molten light
#

Ahhh

polar willow
#

Game might be requires the sorted list of component, but my caching can only send unsorted

molten light
#

👀

#

Why are there so many failures for ScanNodeProperties? 🤔

polar willow
#

welp, someone request to search them

molten light
#

I mean there's a few scanner mods in my pack so likely one of those

#

lol

polar willow
#

524 lines of catched request to search that are failed and fallback to expensive method

molten light
#

Waaah

#

@polar willow Probably DissonanceVoiceSettings yeah? That or MoreCompany

polar willow
#

if it's printed in main menu, then ignore

molten light
#

Got ya

polar willow
#

man, cruiser really want to find that dropship

molten light
#

Lmao

polar willow
#

like holy

molten light
#

Is it from one of the Cruiser mods or is this a Zeekerss thing?

polar willow
#

zeekerss thing

honest oxide
#

doesnt basegame also spam some log message like "setting positions of ropes" or something when the cruiser is being delivered? makes sense that its trying to find the dropship so much

vestal nimbus
#

well it IS on FixedUpdate (but it shouldnt do it more than once/at all if its in orbit)

vestal nimbus
#

and technically doesnt rely on cruiser existing

honest oxide
#

i guess but it only triggers when the cruiser is being dropped, i guess cus thats the only time it generates the rope

vestal nimbus
#

yes

#

cruiser triggers the rope to activate

#

from buying the cruiser and animation stuff iirc

molten light
#

Oh uh

#

Probably CruiserImproved

#

It still logs with it disabled

#

Hmmm

polar willow
molten light
#

Ah fun

#

tbh the main reason I use that mod is for the move items script it has

#

@lone depot looks like you need to optimize your mod bud peepoLie

molten light
polar willow
#

idk, the naming of the field is confusing

molten light
#

Yeah agreed

polar willow
polar willow
#

Lethal Performance & DiFFoZ Tweaks & BepInEx Faster Load AssetBundles Patcher

agile oyster
#

for all other players there is a delay

#

for however many physics updates between the lever being pulled and the dropship not being loaded (because the scene is still loading) it would be doing a search

agile oyster
molten light
#

@polar willow if a client gets dced LethalPerformance dies and soft locks rounds from ending

polar willow
#

copy paste error

polar willow
#

Pre-release [0.0.111] 2025-03-07

Added

  • Check to prevent vehicle to search dropship after delivery.

Fixed

  • After client disconnect the voice component cause index out of range in caching.
lone depot
agile oyster
#

i mean, doing a scene search for every cruiser every time the magnet is turned on/off is avoidable and unnecessary

thorny spire
#

She has the cruiser lever config disabled

agile oyster
#

if nothing else you can cache your own list of cruisers every time a new one spawns

#

it is definitely not as bad as it could be

#

some of zeekerss' scripts search for objects every single frame and that causes massive performance hits

#

in this case it happens when a function is called that the user can control the call of

#

but it's always good to try and avoid doing find() and derivatives when you can, and at this point mods exist to patch out almost every other instance of finds for vehiclecontroller, which makes this addition a noticeable outlier

#

that is just my two cents though

polar willow
#

you can actually get all vehicles by this: RoundManager.Instance.VehiclesContainer.GetComponentsInChildren<VehicleController>()

agile oyster
#

ah

#

i assume the magnet doesn't reparent the cruiser? just update its position/rotation

lone depot
#

these are fair points. i used fineobjectsoftype from how zeekers was using it
roundmanager child would be much better ya

agile oyster
#

yes, there is a fair amount of bad practice in zeekerss' own code

#

there's also nothing wrong with doing it "a functional way" the first time, doesn't mean your mod is bad

#

but at least IMO it is nice to optimize where it makes sense and is fairly easy

#

on that note, this is an entirely separate conversation but i was reminded by it

agile oyster
#

i dont have a ton of examples of that in my head, but like, here's one

public virtual void UseNestSpawnObject(EnemyAINestSpawnObject nestSpawnObject)
{
    this.agent.enabled = false;
    base.transform.position = nestSpawnObject.transform.position;
    base.transform.rotation = nestSpawnObject.transform.rotation;
    this.agent.enabled = true;
agile oyster
#

possibly

#

there was another thing i was thinking of

#

but i can't seem to remember where it was anymore?

#

when he added the birthday hats in v65 he added some unnecessary code that sets position/rotation of hats you wear (bee,bunny,etc.) every single frame