Featured Performance Improvements 0.2.2

Please do not ask when mod authors will update their mods to 3.10 or if they can upload older versions of their mods.
Bothering mod authors will lead to warnings and repeat offenses will lead to eventual bans.

Fixing bugs and optimizing code

REQUIRES UnityToolkit


A collection of performance improvements I'm working on. I will update and include other fixes and improvements I make as I optimize things.


This has not been tested with Fika and no support will be offered to Fika users. Especially those found trying to bypass feature restrictions.


Issues? Open one here


Adds:

  • AI limiter based on range, fully configurable in the F12 menu. (Disabled if Fika or Questing Bots is present)
  • Dynamic optic resolution based on the active scaling mode in the EFT graphics settings. If DLSS is the mode chosen in the EFT graphic settings then its the mode the mod will use to scale the resolution when scoped in. This should vastly improve fps when using scopes. THE MODE SELECTED IN THE MOD MUST MATCH YOUR EFT GRAPHIC SETTINGS OR A FLICKER WILL HAPPEN. I CAN DO NOTHING ABOUT THIS.
  • Experimental patches. These range from threading optimizations to logic optimizations. Can be disabled in the F12 menu.
  • New Graphics Settings in the EFT Graphics settings page.


Fixes:

  • The stutter on bot death (one of the most egregious issues with the 3.10 client)





Todo:

  • Attempt to thread path finding logic, this eats about 6-12ms per call to each method and can be potentially multi-threaded.
  • Attempt to thread bot spawning, this should address stutters on bot spawn.
  • Random fixes of broken code I come across while doing other things.


Installation:
vKRw58b.gif


If you wish to support my work you can buy me a coffee!

  • Version 0.2.2

    Small bug fix update

    - Fixes an edge case path issue if the plugin is placed inside of a sub folder of plugins

    - Fixes dead bots not being able to be looted

    - Reworked the sleep by count option, it is now max active bots instead of max sleeping bots to make more sense

    - Features that need to be disabled for Fika are now properly disabled


    Additional note: I noticed while working on this update that SAIN disables the standby layer of bots near active ones. So if your targets are not being hit, this is likely the cause. No I wont bypass it.

  • Version 0.2.1

    - Adds a config option to limit the amount of max sleeping bots.

    - When enabled, bots will be disabled from furthest to closest until it reaches its target

    - Added new option to disable limiting sniper scavs

    - Adds bot culling for disabled bots (Can be disabled). I did not cull their equipment, this was intentional. If you see floating equipment walking around it means shit is busted and you should let me know

    - Adds option to disable the shadow settings

    - Fixes another flicker related issue when using dynamic resolution options (This was a flicker caused by me, not one caused by switching sampling modes, I cannot fix that.)

  • Version 0.2.0

    - Adds new options to the EFT graphics menu (No F12 menu😄)

    - Shadow settings have tool-tips to explain what they do. These are taken directly from their documentation.

    - Unknown if these will have any drastic affect for anyone, but added nonetheless.

    - New resampling scalars;

    0.90x

    0.80x

    0.70x

    0.60x

    - New Shadow texture resolution setting (defaulted: Medium);

    Very high

    high

    medium

    low

    - New Shadow Cascade setting (defaulted: Two);

    Zero

    Two

    Four

  • Version 0.1.4

    - Fixes a flicker when using the scaling options. NOTE: If your setting does not match your in game setting it will flicker regardless. This is changing rendering settings at the engine/driver level and I can do nothing about it. From my testing with all the scaling options FSR3 seems to perform the best.

    - Adds Experimental patches. Disabled by default. Requires a restart to enable or disable. These range from threading optimizations to logic optimizations.

    - Threads a method responsible for updating enemy information when a bot is hit. (Experimental can be disabled(requires restart))

    - Bot group updates will happen every other frame (Experimental can be disabled(requires restart))

    - These options have been briefly tested with SAIN and seemed to have cause no issues. They have not been tested with Fika.

  • Version 0.1.3

    - Clamps min and max super sampling option to 1% and 99% respectfully (Prevents crash by a divide by zero error OOPS)

    - Bot limiter will become unavailable if either Fika or Questing bots are present as they are not compatible and have their own solutions. All other features will remain enabled.

    - Bot limiter will now check the distance to enable first and return out if it enabled a bot.

    - Lays the foundation for a future updates, adds code that is disabled for now as I wanted to get these bugs fixed. This is the groundwork for a newer easier to maintain scene cleaner (declutterer) yes I'm aware declutterer is broken, its being rewritten in this mod and then it will become deprecated.

  • Version 0.1.2

    - Adds dynamic resolution scope options based on super sampling, dlss, fsr2, or fsr3 modes. The mode used in mod settings is based on the mode selected in the EFT graphic settings. If DLSS is on, the DLSS mode will be used, etc. This should vastly improve fps when scoped in with optics.

    - Fixes bots potentially not becoming awake again when disabling the bot limiter

  • Version 0.1.1

    - Adds bot distance limiter that will disable bots based on distance, this fixes bsg's AI limiter to behave how the AI limit mod does. Previously it would base its range off of any active bot near it, causing it to almost never trigger. (nice)

    - Able to be enabled or disabled on the fly (F12 menu)

    - You can choose to only disable PMC's, Scavs, or Bosses (F12 menu).

    - Distances are configurable for each map (F12 menu)


    NOTE: if an inactive bot is shot by an active one or yourself, it will become active and have a 30 second cool down before able to be disabled again.

  • Version 0.1.0

  • How can i revert the changes made by this mod and uninstall it if i need to?

    • just remove it from bepinex/plugins

    • and it reverts all changes made? I'll assume you meant that it does. Thanks for the reply

  • Please consider updating de-grasser or integrating in here as an option

  • Is this mod compatible with SAIN?

    Thumbs Up 1
  • Is De clutterer included ? If not should I use De clutterer or not ? cause this is what the mod page says:

    Features of this mod are currently broken. It is currently being rewritten. This will soon be deprecated and hidden. Its functionality will be merged into Performance Improvements and thus this will no longer be needed.

    Thumbs Up 1
    • I wouldn't recommend it, its broken. Its functionality hasn't been ported yet

      Thumbs Up 2
    • Noted.

  • please fix the bots limit, they are destroying my fps. (

    Crying 4
  • Can the experimental options cause crashes ?

    I have been crashing every 5th or 4th raid.

  • hey dev,i have unrelated question but why bosses just frozen and do nothing even pmcs not shoot them

    Already try to delete ur mod but still the same

    • If you've deleted my mod, then its not my issue. Not sure what else there is to say here.

    • Did you manage to fix it somehow ihave the same problem

    • boss notifier is the one cause that

  • Hi, when using this modification with SAIN and FIKA, bots become insanely dumb, stare at walls, shoot randomly, and weird things happen. The result is the same on older and newer versions of these mods. During testing, I completely wiped all configs and mod files and installed everything from scratch.
    Link

    • Known issue at the moment, either don't use fika or don't use this mod for the time being

    • Using 0.2.0 I don't have this issue (with SAIN and FIKA). 0.2.2 definitely has broken bots (they walk in place and are just generally broken), have not tested 0.2.1

  • Absolutely FANTASTIC.

    With 3.10 update of SPT, my performance was absolutely horrid. Frames dropping to less than 20.
    But with this little thing, my frames are somewhat stable around 40-60 frames, only experiencing stutters on bot spawns, but it's tolerable.

    Even during shootouts with multiple bots, the situation is fluid and smooth enough to handle it.
    10/10

    Heart 2
  • God among men. Deleting fika.

    Heart 1
    • Does Fika improve performance in any ways? Isn't that just a mod that allows you to play with other players?

      Thumbs Up 1
    • Just a mod that allows playing with others.

  • Is there a known issue with the AI limiting at this time? With default settings and a fresh install of the mod no bots are being limited, even when the range is set to the minimum. Checked with Dynamic Maps and all bots are moving even at the edges of the map farthest from player.

    • Yeah im working on it

    • Understood, thanks! I appreciate the mod a ton, the scope fix is huge. Thanks for what you’re doing.

    • Should be working correctly now. Apologies. This entire mod is one giant experiment so things breaking is not unexpected

      Heart 3
  • For some odd reason setting Shadow Cascade can't be turned down to None, it always resets to the parameter Two

    • I disabled it and forgot to put it in the patch notes, 0 cascades causes issues with tarkov

      Thumbs Up 1
  • 因为掉帧,我成为了 EFT 图形菜单新设置的最大受益者 我经常使用一个名为 LS Crack 的帧修补工具 不幸的是,帧修补工具导致操作延迟 我使用新设置大大降低了延迟 我不知道原理是什么, 但非常感谢

    Heart 1
  • Isn't this new AI limit option kinda backwards? Why limit sleeping bots instead of active? Limiting active bots would even allow to drop range for limit - i.e if you could have like 12 bots active on a map, you would have the same "active zone" around you(dictated by spawns/spawnpoints) but also a couple ~far active bots for some AI v AI or lootingbots immersion/action. (Spawnzones are limited to 7 bots, according to MOAR - said limit realistically occurs only in hotzones)

    Thumbs Up 5
    • It may be (at least compared to the old AI Limit mod), but I applaud the mod author for taking a stab at my initial request. Progress is progress.

  • Dirtbikercj I just wanted to say an incredible thank you for all your work, SPT is literal my all time favorite game for the longest time now and every update is always like a Christmas present - thank you dude!

    Heart 2
  • n1 musthave mod for current Tarkov patch lol. Ur the best <3

    Heart 1
  • this mod is amazing thank you ! hope u keep updating it <3

    Heart 1
  • Can you add an option for the AI Limiter to also limit the max number of bots active at the same time in addition to distance? Like for example, only allow 5-6 active bots within X meters (kind of like the old AI Limit mod).

    Thumbs Up 5
  • i can actually use magnified optics now, thank you so much

  • Good shit dude

  • Your mod has greatly improved my performance and my FPS



    A suggestion. Can it further optimize performance by keeping inactive BOT models hidden ? Only display models within the activation range.(I haven't tested if your MOD has this feature yet)


    Can we also give a delay of more than ten seconds to activate the MOD at the beginning of the battle?

    Because I've noticed that sometimes bosses are shut down before they even reach their designated positions


    The above functions are all in the AI limit MOD



    Thank you for your work

    Heart 1
    • There is already some culling the game does on bots now

      Happy 1
  • Love this mod, mostly the AI limiter part. Is it actually possible to add the function to Limit AI by Distance but also for example only the closest 10? I think that would push the performance even further.

    Thank you so much.

    Thumbs Up 1
  • Thanks for keeping these banger updates coming.


    Any idea if the most recent updates shadow settings would conflict with the Shadow Flicker Fix mod?

    • Not sure honestly forgot it even existed

    • I used it by accident with SFF. No issues, I just disabled the cascade changes on Shadow Flicker Fix bepinex and used the ones from CJ instead. I left in the Distant Shadow resolution to HIGH however, but no conflict.

  • I know this mod has a spawning option, are there any issues with using this mod with the MOAR spawning mod?

  • If you are able to, would it be possible to add a scaling option to the DLSS / FSR 3 options to be settable as a percentage, rather than the quality presets (for all, not just as scope)? Quality FSR 3 is fine but NAA FSR 3 would be even better ;) (not necessarily a performance fix but sure is a visual fix, considering the significant reduction in ghosting artifacts)

    • I'll look into it at some point, I had already considered adding more sampling options

    • Welp you've got my attention, that's for sure. Looking forward to what comes in the future too.

  • with new experimental enabled client just closes on hard freezes (when new scavs are spawned or a lot of bots activated at once) instead of waiting out like usual

    no fika

    • what do you mean new scavs

    • those what didn't spawn right on map start? scav what spawning during ongoing game

      not sure i get the question

    • woop sorry, that was a case of me not having caffeine yet. I'll try to reproduce. Can you provide a list of mods?

    • all currently installed mods

  • Tested the new experimental option with fika and game randomly crashed. When running dedicated client, the dedi crashes and client loses connection; when running without dedi the local game crashes. For fika users you might want to keep it off for now.


    Here's the crash stack trace from running without dedi:


    ========== OUTPUTTING STACK TRACE ==================

    0x00007FFE22B36B44 (UnityPlayer) UnityMain
    0x00007FFE22B36E66 (UnityPlayer) UnityMain
    0x00007FFE22B03BA7 (UnityPlayer) UnityMain
    0x00007FFE22B5D269 (UnityPlayer) UnityMain
    0x000001AEF822CB4E (Mono JIT Code) (wrapper managed-to-native) UnityEngine.AI.NavMesh:CalculatePathInternal_Injected (UnityEngine.Vector3&,UnityEngine.Vector3&,int,UnityEngine.AI.NavMeshPath)
    0x000001AEF822CA8B (Mono JIT Code) UnityEngine.AI.NavMesh:CalculatePathInternal (UnityEngine.Vector3,UnityEngine.Vector3,int,UnityEngine.AI.NavMeshPath)
    0x000001AEF822C813 (Mono JIT Code) UnityEngine.AI.NavMesh:CalculatePath (UnityEngine.Vector3,UnityEngine.Vector3,int,UnityEngine.AI.NavMeshPath)
    0x000001AEF836B203 (Mono JIT Code) BotsGroup:method_5 (UnityEngine.Vector3,PlaceForCheck)
    0x000001AEF836AE93 (Mono JIT Code) BotsGroup:method_6 (PlaceForCheck)
    0x000001AEF836A073 (Mono JIT Code) BotsGroup:AddPointToSearch (UnityEngine.Vector3,single,EFT.BotOwner,bool,bool)
    0x000001AEF83A48A3 (Mono JIT Code) BotMemoryClass:method_8 (DamageInfoStruct)
    0x000001AEF83A2743 (Mono JIT Code) BotMemoryClass:GetHit (DamageInfoStruct)
    0x000001AEF83A1103 (Mono JIT Code) PerformanceImprovements.Bots.Patches.BotOwnerMethod9:GetHit (EFT.BotOwner,DamageInfoStruct,EBodyPart,single,single)
    0x000001AEF83A06C3 (Mono JIT Code) PerformanceImprovements.Bots.Patches.BotOwnerMethod9/<>c__DisplayClass3_0:<PatchPrefix>b__0 ()
    0x000001AB62067715 (Mono JIT Code) System.Threading.Tasks.Task`1<TResult_REF>:InnerInvoke ()
    0x000001AB61FE4A0B (Mono JIT Code) System.Threading.Tasks.Task:Execute ()
    0x000001AB61FE4973 (Mono JIT Code) System.Threading.Tasks.Task:ExecutionContextCallback (object)
    0x000001AD7FAA1B86 (Mono JIT Code) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
    0x000001AD7FAA155B (Mono JIT Code) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
    0x000001AB61FE4423 (Mono JIT Code) System.Threading.Tasks.Task:ExecuteWithThreadLocal (System.Threading.Tasks.Task&)
    0x000001AB61FE3CC3 (Mono JIT Code) System.Threading.Tasks.Task:ExecuteEntry (bool)
    0x000001AB61FE347B (Mono JIT Code) System.Threading.Tasks.Task:System.Threading.IThreadPoolWorkItem.ExecuteWorkItem ()
    0x000001AB61FE0DE2 (Mono JIT Code) System.Threading.ThreadPoolWorkQueue:Dispatch ()
    0x000001AB61FE0753 (Mono JIT Code) System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()
    0x000001AC8E65B4CD (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_bool (object,intptr,intptr,intptr)
    0x00007FFE21AAE290 (mono-2.0-bdwgc) mono_get_runtime_build_info
    0x00007FFE21A32AC2 (mono-2.0-bdwgc) mono_perfcounters_init
    0x00007FFE21A5A381 (mono-2.0-bdwgc) mono_unity_managed_callstack
    0x00007FFE21A5CA01 (mono-2.0-bdwgc) mono_unity_managed_callstack
    0x00007FFE21A56BE8 (mono-2.0-bdwgc) mono_unity_managed_callstack
    0x00007FFE21A56976 (mono-2.0-bdwgc) mono_unity_managed_callstack
    0x00007FFEE2A3259D (KERNEL32) BaseThreadInitThunk
    0x00007FFEE3CAAF38 (ntdll) RtlUserThreadStart

    ========== END OF STACKTRACE ===========

    • I didn't test it against Fika. I don't see what I'm doing right now ever being Fika compatible. I recommend using a dedicated setup instead.

    • I know, just a heads up for the other fika users. And as I mentioned, the dedicated client also crashed.


      But actually I don't have friends to play with anyway, just using fika to offload the ai to another rig. When the performance gets improved enough or I get a better pc I'll move to vanilla spt and no more incompatibility :D

      Happy 1
  • Thank you, you are making SPT playable!

  • I'm facing issues when using dynamic resolution.
    I use the AMD FSR 3 (Performance) as well as game graphic settings,
    When ads the screen flickers once (makes sense because the vanilla it double sampling then the mod does apply the supersampling ( i use AMD FSR 3)),
    Then un-ads the supersampling seems to be turned off (but in the graphic settings it says it still on) the image are much clear like default game graphic settings aquadesperate

    • Same here, I'm using DLSS Performance and it flickers too, didn't happen in the previous version

    • The mode must be the same in the mod settings as what is selected in the EFT graphic settings. For the love of god people read the mod description I'm getting extremely tired of answering this.

    • i did even before i make a comment, it happens as i described, on mod FSR 3 - Performance, on EFT graphic settings FSR 3 - Performance as well and it does what i described at first.