#Lethal Performance & DiFFoZ Tweaks & BepInEx Faster Load AssetBundles Patcher
1 messages · Page 5 of 1
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
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
Yeah lol, config refactoring for cleanup is always good though it's just sometimes the migration process isn't the best
it takes a ton of tedious testing to make sure something like that works correctly
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
Ok
Just like the others though, I won't be going in-depth
0193dca5-2ee5-af57-1ab1-e19a276747b6
JUST A SKIM OF WHATS IN IT IS Appreciated OR WHAT ITS MISSING
I don't need config suggestions
😭
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
Which ones does it replace?
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
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
I'll have to tweak around! Thanks again!

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
No LetMeLookDown does zero difference now
lol
It sets the same value as what is now vanilla
ah i thought it was 85/80
Flip probably really should deprecate that mod now though
@untold trench You think you can dep LetMeLookDown since it's in vanilla now?
i looked at a modpack code someone created today and saw that mod, it made me irrationally angry
Idk who the dev is but Jester stomp shake should be detached too because of how hard it tanks fps by existing
btw not doing anymore testing tonight or anything, going to bed lol
It's Piggy
afaik a lot of their older mods have big performance impact
Oh I couldn’t check cuz mobile
Oh yeah, I forgot that was changed. I should do that then. Tomorrow haha
Nvm, it's deprecated now
some note, currently brutal company minus extra is broken with lethal performance
https://github.com/DiFFoZ/LethalPerformance/issues/11
if someone reports about harmony issue with patching animatedSun, then suggest them to downgrade/remove lethalperformance
and also i would be appreciated if someone would fix issue with BFLAP compatibility for Wine
https://github.com/DiFFoZ/BepInExFasterLoadAssetBundles/issues/15
I don't really want to implement env to ignore free disk space check.
here the code: https://github.com/DiFFoZ/BepInExFasterLoadAssetBundles/blob/master/BepInExFasterLoadAssetBundles/Helpers/DriveHelper.cs
What’s wrong with having fix personal scanner on? And isn’t it better to set external cam fps for something like 5?
fix personal scanner doesn't matter if you have something like testaccount's gooditemscan
and iirc setting a cap for external cam actually uses more processing power to force it to render at a different rate, so letting it render at the same speed as the rest of the game uses less resources
Dang
What about disabling post processing?
I recently did that I’m trying to see if it changes performance in any major way
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
I ended up sleeping 💀 why these 3 kill performance?
Nevermind I looked the chat
@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
Lol
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
somebody should make a proper one fr
its peak when it does work
What did you change
LMK
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
lol
i have been using showcapacity for like months
not knowing that it does gameobject.find each frame
whyy piggy
Wouldn't it be better to just make a JesterAI type variable and call FindObjectsOfType to assign it in Start?
makes me wanna look at other piggy mods to make sure they dont cause issues lol...
anything wrong with these?
you could just make a static list of jesterai instances (i assume they wanted it to support multiple jesters when using spawn mods)
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)
the variety mod fucks with the animator
shrimp makes me angy
im not sure there might be some stuff in the code though thats not done well
pain
wdym
ate all my scrap and killed 5 people when i was playing yesterday 😔
oh so skill issue
nou
might jjust disable all but the gate then
i had revolver with low spawn rate
jester stomp shake also doing getcomponent every update for timeofday lol
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
Lol
also wait what the hell is this patch
no idea
huh
it's also searching for a jester AI component which definitely would not be up the hierarchy from timeofday
i think this is probably meant to be a playaudioanimationevent patch that was copy pasted and not properly revised?
oh yeah its disabled
bizarre
yeah stomp shake szxhould probably be deprecated lol
still makes no sense why hes not just doing the stomp effect on the jester's footsteps, but eh
Xu remember back when it made the Redwood's footsteps go ballistic?
XD
It would make the whole screen shake even when inside
Just by having JesterStompShake
fire
Didn't it's latest update specifically fix that?
Not really unfortunatrly
Well... ShowCapacity and JesterStompShake updated... are they good now? 
They’re latest changelogs say they’ve had some optimisation
So probably
Previous ones said that too, maybe the optimizations weren't enough this update
Only one way to find out
Unfortunately I’m unable to test it myself, as I won’t have access to my PC until the weekend
ooo
i shall test
it's no longer checking everything every frame
yippee
results is that it still hurts fps but 10x less
Is there any specific way I need to cfg this mod, been using the default for a while
also when "[22:16:24.5313076] [Info :LethalPeformance.Patcher] Saved 1 config(s)" is logged there is a lag spike
Probably if you're using Imperium or something
this is late and i've only just now looked into it
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
@abstract ivy looks like Show capacity is still being naughty
Structurally, it will only run once if there is no problem
Oh wait
i didnt update it
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
Is it similar to nstrip?
im not personally familiar with nstrip
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
@agile oyster Do you think LethalPipeRemoval might be a culprit of lag? It uses GameObject.Find for almost everything
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
Yeah I don't use any of the stuff for repositions
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
probably faster to find and destroy specific meshes
stuff like that
I'm really surprised a replacement hasn't been made tbh
The mod hasn't been updated in quite a while
Might be ocd but this numbering scheme makes me angry
I just noticed that wtf it’s so cursed
Wait
Guys I'm stupid again
This font makes l and 1 look the same
I thought they just skipped 2-10 entirely lmfao
My excuse is that it’s 3 AM
it's just the way variables are named in the decompilation
the source code is most likely more reasonable
Na I also misread it
It makes more sense now but I still wouldn't title my vars like that
well the point is that they probably dont
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
In the actual code they most likely have actual names.
@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?
Yeah it’s disabled in CompanyIssuedFixes. You can go into the BepInEx cfg for it to re-enable it
Thanks!
np
You need to enable it in the BepInEx cfg
I might be stupid
But I can't seem to find specifically what you mean
Like THIS BEPINEX?
Found it
👍
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.
@polar willow @ancient igloo
What part of the code is used when spawning bees & beehives? What behavior is assigned when spawning entities.
I don't change anything about spawning
I was more talking about LethalPerformance. I don’t know what it does, but I assume it’s affecting how stuff is loaded due to the invisible bees bug.
you narrowed it down to a line of code? what line was it?
Line 56 in BeeAIPatch
[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.
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
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
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.
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
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.
@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
I thought I was making a copy of the list and not directly modifying it
by the naming i think you wanted to have a copy of the list
just add a .ToList() at the end
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)
or this
ive done it before dw
I am surprised the game didn't brick itself
maybe warning something was modified that shouldn't be modified would be enough
@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
Makes sense. Thank you very much for letting me know about the huge oversight!
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
.
Do you know of any mods utilizing this? o.o
utilizing what? overlapping reverb triggers?
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
Ahhh okay
How does the Faster Load Asset Bundle patcher work with the new LLL?
should work just fine
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)
i'll look into
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
seems like a really weird decision to make
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
im pretty sure it is this, yeah
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
yeah it's a sphere cast so not really overlapping boxes but still uses the colliders full size and not the origin
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)
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 
yeah, that was my first thought too
but it is the case
bunch of DecalStickableSurfaces
wait, im a bit confused, he's using layer 3 as the layermask?
and the PlaceableShipObjects collider that causes you to explode
when flying jetpacks
this is for CheckSphere
Lol
wouldn't he be ignoring the player layer by having 8 there?
the wording here is kind of confusing but the layer mask is inclusive
by making the layer mask 8, he is only fetching colliders on layer 3
everything else is ignored
bleh yeah that sounded weird to begin with, i guess the wording is just stupid
it is weird yeah
and also that method is not expensive at all
so i don't see a reason to optimize it
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
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
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
would it be too invasive to get a trigger collider on the player to track that?
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
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
yeah, it might work if it called Rigidbody.Move
Hmm I've been wondering if OnTriggerEnter() was viable for reverb triggers, I noticed some streamers getting really bad FPS lag whenever a player or two was standing in front of an entrance, I assume they weren't playing with most of the recommended performance mods so I've been wondering how to mitigate that from the map side for these cases
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?
will test it later
and may include it to the next release
i think yes
because of spectating stuff
they do for some things, but I haven't really looked too closely at whether it's doing more work than necessary for uncontrolled players
it's definitely possible that it is
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
I don't have any overlapping ones though, closest thing I have is one that's inside a PlayerPhysicsRegion, so the player is colliding with both that and the reverb trigger, so maybe that's causing something
it shouldn't, the thing that causes them to spam is when (from memory, may be wrong) PlayerControllerB.currentReverbTrigger changes twice in a frame
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
if this is reproducible, I'd recommend checking here to figure out how to profile it https://discord.com/channels/1168655651455639582/1259442214921175082
no, it would be per player
Oh I remember trying to set that up one time but the mod I was trying to profile used FixPluginTypesSerialization, good to know there's a workaround now, yippee
Forgot about that guide though, I'll be messing around with it, thanks! 
Does appear to be the case, but I've only got one of them at each entrance 
Good news is it doesn't happen due to the Ferris wheel, bad news is it happens on every exit lol
not enough findobjectsoftype
True I gotta add my own 
i liked that one enemy that did findobjectsoftype 5 times in update in a row
it's odd if it is calling two OnTriggerStay() methods if you only have one trigger there, maybe hit it with a UnityExplorer hook to print out the hierarchy of each trigger
also... why do you have reverb triggers on your entrances?
I think the teleports themselves are supposed to be able to use a reverb trigger preset to change weather and all that
Oh
I was unaware of that
yurp
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
huh, even with usePreset it definitely shouldn't have been hitting ChangeAudioReverbForPlayer twice
Oh not sure then, hmm
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
Sure
Actually I could just use the class that inherits AudioReverbTrigger that I was testing a cooldown on
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
Oh I thought you meant MonoMod hooks
nope
UnityExplorer lets you write Harmony hooks at runtime
it automatically prints out all arguments and the return value of a method by default
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
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?
bflap doesn't save uncompressed bundles in profile directory and instead use game directory
so changing profile won't cause uncompressing bundles again
Alright thanks
smol patch
[0.5.1] 2024-01-27
Fixed
- Compatibility with BrutalCompanyMinusExtra(Reborn).
Aw no Vehicle Controller Caching?
no
2024? 
we went back in time to make sure zeek keep updating the game
wdym guys it's for v47 
v50 is releasing 10PM tonight
@rain juniper is v1 still defaults multithreading to be enabled?
or you changed that already?
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.
yes, it is causing crashing
It causes crashing for some people
with multithreading it's just RNG
I tell you from experience
yeah i highly doubt admin would fix something like this
Do you recommend disabling this option for a better experience?
YES
like this?
yup
Thaks ^^
Apparently it is the best, at least to remove it in the loadforc Sound API
As seen in the image above
Yeah it’s basically rng if your game hard crashes if you don’t disable it
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
nope
ok it's just problem with debug profile
when profiler attaches the game will run simulate multiple times even if fps is stable
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
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
ahh, I see, good to know
just wondering if there a way to turn off logging for the mod
[06:05:56.0862732] [Info :LethalPeformance.Patcher] Saved 1 config(s)
sometimes causes lag spikes
It's never caused lag spikes for me
its fairly uncommon so it could be a false alarm
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
hmmmm, ill look into it but I need it for lethal hands lol
thx for the info
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
saving configs only can cause lag spike if you're about to close the game, but I think it's just some other mod causing that lag
ah alright, first suspect down I suppose lol
@vague belfry would be the person who's spent the most time on weather stuff afaik
depends on what you mean by that
I need to just set to all levels a rainy weather
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?
yeah
i assume without taking any additional dependencies?
looks like i found how
honestly you could just take those from StartOfRound.Instance.levels
since LLL adds to that array
hm, let me check
yeah it works
probably I got confused because I was using Wesley moon
it's probably forced to none, because of it counted as company building?
I think you can still have weather on that moon, atleast I managed to put custom weather on there before, dunno about vanilla
i'm not exactly sure how it's achieved, but i'm pretty confident there's something that forces it to be clear
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 
@dull quarry probably you should add a check if it's vanilla moon or not for fixing water shader
[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
Ooh yay, does this mean if an entrance generation fails it won't lag so badly?
yeah
Yippee 
The update isn't on Thunderstore yet?
;o
I was checking why I didn't see it yet in Gale and noticed it never got uploaded
XD
@polar willow Lmk when you actually get this update uploaded to Thunderstore 🙏 I hope to play with it today
fyi is that temp caching is not on the update yet
only caching of these 3 things
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!
yeah, I always use Lunx modpack as a base for playing with my friends, less time to configure 🙂
The current version of it is much more Vanilla+ than some of the older codes I've sent
@polar willow you mentioned caching of entrance teleports, I assume that would include RoundManager.FindMainEntrancePosition and FindMainEntranceScript?
I had some patches ready to ship in a new PathfindingLagFix Beta since those methods are used mostly in enemies, but I wanted to make sure I won't conflict
here's the commit: https://github.com/Zaggy1024/LC_PathfindingLagFix/commit/7e68e7f3a907529b6fafb535aaebac6332b8c526
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)
@polar willow Any eta on the update? 
currently no eta
I want the Entrance Teleport caching lol
oh lol thanks
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?
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
Oh I think ButteryStancakes has something like that in MaskFixes? Maybe partially, I know it had to do with the elevator search from masked
yeah i cached elevator script properly
in the rewritten masked roaming behavior
i didnt patch entrance teleport
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.
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
what is es3 caching?
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
if im saving using zeekerss' es3 stuff, is there anything i can do to make saving more bearable?
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
is that part of the ES3Settings thing?
yes
hmm okay, whats ES3File?
es3file is just in memory file and contains all data that file stored
uncompressed and unencrypted
okay so for saving, this is good?
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
so i should have my mod make its own save files?
yes
so this is as good as i can get saving?
yeah
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
would be nice to have a library that will do this work
like sync to the current save file name etc
there's lethalmoddatalib but i dont really know too much about what it does internally
plus i hear it half works nowadays
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
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
yeah
okie, thanks 
and with some patching is now saving as a json text
but sadly that would be a breaking change
here pretty version
these mods are gods gift to the world
Yeah all the mold stuff when the fox got added is when the overhead when saving really became apparent tbh
wait why is that? if it uses keys in the file, doesn't ignoring a key just mean that that data is unused? how does it break?
because of sending the flag to not encrypt it confuses ES3 about how it should load?
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
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
but diffoz does not want to do so because it would break vanilla compatibility
it's definitely possible
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
neither am i. to be fair the performance hit for using the defaults should not matter as you are not supposed to constantly be re-reading the saves anyways :/
the main issue i have is that zeekers save system is already dis-organized in itself. so anything adding to it makes that folder even worse
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
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
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?
There is new mod optimization was made that targets on memory and rendering fixes: https://canary.discord.com/channels/1168655651455639582/1345089401100701778
Recommend to check pinned message to see all known issues + fixInputActions option is currently unstable, so I recommend to turn it off.
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
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
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
LCGeneralSaveDatais 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
Is the fire exits caching here too?
👀
I'm most certainly excited for the ES3 stuff
no
Got ya was just wondering if you ever got around to that
God it feels so smooth now
How long do you keep it in pre-release for? I'm just gonna stay on this version til you push the full update 😂
until I will get some checks that it is stable
The main issue I'm seeing is it makes the Diversity cutscene play on every game boot
Lol
o lol

I'm guessing it usually saves whether you've seen it or not to LCGeneralSaveData or something in some odd way
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
Ah I see, I wonder how easy that is to fix then
Pre-release [0.0.101] 2025-03-02
Fixed
- Diversity intro cutscene plays every session.
that was fast
Noice 😄
oops I uncomment some debug logs, ignore FATAL [ES3 Save/Load] logs lol
Ah so it won't hurt anything then
Right now I'm testing to see if Journeys stuff works okay with it

does this now mean if i play with someone else's pack and they have lethal performance it will make that save file unreadable after? because i imagine that being a pretty big issue and i hope I'm understanding wrong
Probably, although at this point Lethal Performance should likely be in your pack unless you need to do some specific debugging and stuff without it
welp, yes. Only by that I can do of removing encryption
please note that mods are also counted right now
Oh interesting
but not LCGeneralSave(.moddata)
maybe also add a folder to the base path so your unecrypted files do not overwrite vanilla ones?
This could work 🤔
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
then there is no point of saving unencrypted file
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
but it is the release on thunderstore right now no?
No no current version doesn't have Caching
or is this like a seperate thing like a beta veraion
you have to specifically change it to the pre-release build for it
current live version is 0.5.1
🤔 i'm seeing that you would have to change the actual working directory of Unity to pad all filepaths. as zeekers uses relative paths
you have to change it to 0.0.101 for the caching testing
es3 behind the scene will add full path to the file
plus what happen if these 2 files will out of sync
you'll lose progress after a save reload
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
forget it, I just force encryption for all saves again
that was not my point but you-do-you 🤷 . matty out
Pre-release [0.0.102] 2025-03-02
Changed
- Force encryption for all saves. Prevents losing save when loading to the game without LethalPerformance.
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
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.
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
the save is in wesleys moons or it's different mod?
@mellow shoal do you got an explanation for how the Wesley stuff saves when unlocking it? It saves to LCSaveFilex.moddata right?
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
yes it's part of the wesleymoons thing. it uses lcmoddatalib to save it's values.
lcmoddatalib does all that stuff. wesley's stuff just tells moddatalib to save a value and that mod interacts with this stuff
Yeah
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
it because it was also using KeyExists before loading
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
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 🙃
Yeah
@polar willow Guessing you'll be pushing a patch for it like with the Diversity save stuff
Even with Encryption reenabled saving is still extremely smooth
Yeah it's still not saving the progress
What's causing the progress to fail to save then? 🤔
looking rn
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
|| where is that tape, I still didn't played wesleys moons after big update 😭 ||
||So if you go to the Galetry, make sure WesleyMoonsScripts Lock Moons is enabled. Infernis is by the Infernis picture and Asteroid-13's is by the projector. There's 2 you have to do parkour for||
oh wait now I see why, it forces all valuetypes to be saved as object
Oh this makes a lot of sense
Hope it's easy to fix 
Here's an idea for making the save file situation as painless as possible
- 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
- 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
- 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
just found that if you try to save null value with type of object, then it will throw NRE
ES3....
🤔
no, it's hard to find the real reason
Hmmmm
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
I cannot exclude by mod id
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?
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
o
Pre-release [0.0.103] 2025-03-02
Fixed
- Saving value by forcing it as object, causing writing garbage data.
Oh you figured it out
Theoretically if this is the one with remaining issues fixed I expect we'll see a 0.5.2 release soon, unless you plan to jump the version straight to 0.6.0 :3
Well the game crashes if you try to delete saves
XD
Yeah not even a crash reporter it just froze and then closed when I tried to delete a save
lol
Pre-release [0.0.104] 2025-03-02
Fixed
- Crash when deleting save file.
looks like only you @molten light did the testing lol

Well I can't seem to find anymore problems
so if you wanna push you should be good to lol
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 ?
LC FastStartup is a good alternative
even if its last update was a year ago ?
yup, working good
i remember about it being famous for skipping a lot of mods from loading at startup
i checked some earlier messages in this discord and i also saw that, but i never experienced any issues with lll and custom moons
Isn't that because some mods load on the launch mode menu?
i wonder if its still accurate today but just in case i'll stop using these mods
any mod that skip that menu will have "troubles"
but i never had any problem with BFLAP and introtweaks
yeah that
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
the ES3 caching won't corrupt saves on profiles that don't use lethalperformance right?
idk about corrupt but it won't let u load saves that have used it from what I can tell
that's fine imo
as long as the saves that don't use it are untouched (granted i don't load them with LP)
seems the experimental doesn't play nice with LCBetterSaves
when this error shows up, all the saves are invisible on the host screen until a restart
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
Oh you can just use the saving feature in GI instead
for item rotations
It works fine
i was more using it to stop it from replacing items when a new mod was added
LLL handles that
but since i usually remake the save every time it happens i don't need it anymore
it was still happening even with LLL
So long as you don't have a scrap on the ship that you plan to remove it's fine
There was a scrap mod that caused shuffling for me
ColorfulJarOfPickles
Removing that fixed it
That mod I think registers things wrong sometimes
just to double check
are you using LCBetterSavesFix
yes
okay
Crit has said he wants to rewrite LCBetterSaves entirely maybe it's finally time for it
just wanted to check because that error names a mod data file
@feral eagle
ik it does some funky stuff with renaming saves, which mightve caused at least a little of what was happening there
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
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
Idk
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
I still didn't check source code of LCBSFix to know if it's possible to add compact on my side
Well outside of that and you and @hollow spruce Probably needing to figure out what's going on with SmartItemSaving it's been rock solid imo, played with it the whole stream today c;
I'll check if SaveItemRotations also breaks rq
Hmmm @polar willow 🤔
EM problem
SaveItemRotations works fine

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
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
the panel errors are (seemingly) a normal part of LCBetterSaves
it sends those all the time but continues to work
Pre-release [0.0.105] 2025-03-03
Fixed
- LCBetterSave and SmartItemSaving throwing exception, because of cached saving feature.
Hope this means we'll get a full release soon :3
Seems there's a small freeze when saving after the update for the mod
Wonder if this could be cus of Enhanced Monsters
@limber peak Why is Enhanced Monsters running a save checker when the game is saving?
🤔
Because I needed that to ensure that the dead bodies were saved
it's development artifacts
but it should really not freeze since it's only logs what's being saved
Yeah not sure why there's a small freeze when the game is saving now
I'll check this if it comes from my checker
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
All save files usually get encrypted from what I understand
So idk what files you mean that normally aren't encrypted
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?
i mean
i forgot that both mods did the same thing
but i didn't have any problems
so i guess it's fine
I wouldn't do that, just make sure you set the values in both to be the same
I recommend 2048x1024 in both personally
What's the difference between 1024x1024 and 2048x1024
2048 is less likely to throw errors about there not being enough space in the atlas probably
isn't that related to Cookie atlas texture resolution?
I only saw those errors when i had SpectateEnemies
i just set them all to 2048, figure that you cant go wrong there and its still way lower than vanilla
Oh yeah since 2048x2048 is an option I would use that in both 
either 2048x1024, 2048x2048 or 4096x2048
¯_(ツ)_/¯
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
all saves are encrypted
I'm just unsure what he was talking about here
and even if you will migrate from old prerelease version to the new one, then it will automatically encrypt it
probably he read the first prerelease version changelog
and got confused
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
well it's probably a lot of stuff happens in the save frame
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
True
I can release it right now
no more changes for this release needed
Noice 
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.
Yeah caching probably puts in the most effort, I just wonder if the small freeze with 0.0.105 compared to 0.0.104 is maybe something isn't getting cached but I'm unsure what it would be
Cus with 0.0.104 there was no small freeze when it saved at all
Maybe the log will tell something here 😅
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
0.0.104
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
Was there some overhead that got added somehow when the compat for LCBetterSaves and SmartItemSaving got added? Cus I wonder if that could maybe be a config option that auto enables if either of those mods gets detected if that's the case 🤔
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
here the changes in between 2 versions
https://github.com/DiFFoZ/LethalPerformance/compare/0.0.104...0.0.105
Optimizes the Lethal Company game. Contribute to DiFFoZ/LethalPerformance development by creating an account on GitHub.
It looks like Patch_ES3.cs got the largest changes so my best guess would be it's something there but I'm not sure, @honest oxide maybe you can see if you think I'm correct here 🤔
Hey wait a sec
I'm not just on call for checking these 
I gotta be up for jury duty tomorrow
Sorry I just figure you might be able to spot what it could be better than me
Hell if I know
lol
I probably know less about these than you do
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
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
Yippee
Seems like it's all working as it should now, you should be good to push this as 0.6.0
here what happens in during saving frame
Interesting ;o
also fyi these lag spikes are due to High quota fixes
Why is that causing lag spikes?
Ig I can pull it lol
it searches for web spider trap components
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
DiFFoZFixes 👀
iirc TestAccountFixes caused worse lag spikes if not the same
Lmao yeah it might be time for DiFFoZFixes
what is it trying to fix about the webs?
can't we just intercept the web creation code?
idk, i don't want to check the code
The bug where clients get permanently slowed
i meant in detail code XD. ik what the bug description is 🙃
{
//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
👀 Reflection in Update. not cached FindObjectsOfType. ohhh boy
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
Wonder what else it's doing wrong
from what I see VehicleController caching by ButterFixes(?) is not fully covers all ways
so it may still call expensive method
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?
Pushing release
and after few hours will start working on a new pre-release version
Ooh
[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.
emblem causing slow start up
i patched every method that uses findobjectoftype<vehiclecontroller>()
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
but it looks like that is not what's happening here
Caching of PlayerVoiceIngameSettings done, should help with lag spikes with Mirage mod
Ooh
Just found out that unity explorer may break caching system, if you enable UI in the ship scene
Fun
Yeah I noticed it slows down start up and backing out to the main menu
What is it doing that is causing it? I noticed it logs a shit ton of stuff
a lot of path tracing from what the GC stacktrace is showing me
Fun
VehicleController caching is done
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
DiFFoZDibalance wen
DiFFixes
Difameleon
for you yeah
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.
Any reason why this is a pre-release and not a push to main release? 👀
due to PlayerVoiceIngameSettings
Ahhh
Game might be requires the sorted list of component, but my caching can only send unsorted
welp, someone request to search them
524 lines of catched request to search that are failed and fallback to expensive method
if it's printed in main menu, then ignore
Got ya
man, cruiser really want to find that dropship
Lmao
like holy
Is it from one of the Cruiser mods or is this a Zeekerss thing?
zeekerss thing
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
well it IS on FixedUpdate (but it shouldnt do it more than once/at all if its in orbit)
this too is on update, but this can just kind of exist without depending on the cruiser, cuz it's in the ItemDropShip script
and technically doesnt rely on cruiser existing
i guess but it only triggers when the cruiser is being dropped, i guess cus thats the only time it generates the rope
yes
cruiser triggers the rope to activate
from buying the cruiser and animation stuff iirc
@polar willow Any idea what mod is doing this?
Oh uh
Probably CruiserImproved
It still logs with it disabled
Hmmm
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 
that was easy to optimize
Is this only if the config is enabled to add the lever inside of the Cruiser?
idk, the naming of the field is confusing
Yeah agreed
🤔
Lethal Performance & DiFFoZ Tweaks & BepInEx Faster Load AssetBundles Patcher
the host immediately sets inShipPhase to false once the lever is pulled
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
i believe other clients dont set inShipPhase to false until after the dungeon is completely generated so they would be fine
@polar willow if a client gets dced LethalPerformance dies and soft locks rounds from ending
With Pre-Release 0.0.110
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.
says a person that often doesnt know what theyre talking about with coding. if there was a reason to optimize it or if an actual coder was saying i should optimize it then ok
heres the config to disable over a non issue happening only one time when ship lever is pulled that doesnt cause visible lag
i mean, doing a scene search for every cruiser every time the magnet is turned on/off is avoidable and unnecessary
She has the cruiser lever config disabled
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
you can actually get all vehicles by this: RoundManager.Instance.VehiclesContainer.GetComponentsInChildren<VehicleController>()
ah
i assume the magnet doesn't reparent the cruiser? just update its position/rotation
ok yea
it sets the animator component
these are fair points. i used fineobjectsoftype from how zeekers was using it
roundmanager child would be much better ya
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
i wonder how easy/worthwhile it would be to transpile zeekerss code to fix instances where he does position = and rotation = on 2 consecutive lines with this function
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;
probably it's not worth


