Disable AI (temporarily) based on distance to the player and user defined bot limit within that distance. Only the closest bots (distance wise) are enabled based on a max value you set in bepinex config.
Compatibility
Should work with spt-aki 3.5.4 and above with the newest versions
Installation
1. Download the file and unzip it into your SPT-AKI folder.
2. Verify that your Spt-aki/Bepinex/Plugins folder now has a dvize.AILimit.dll file in it.
Using the Plugin
1. Press the F12 Key to bring up the Bepinex Plugin Config Menu (At any point in the Tarkov game)
2. Configure the Bot Limit and the Distance to your cpu needs.
3. Click anywhere off screen
4. Profit.
How is this different from AI Disabler (thanks Nexus4880)'s mod?
For instance, i could set the AI Distance limit to 400 and the bot limit to 5.
Within that max distance of 400, my version will only enable the closest 5 bots.
Once you kill the bots close to you, it could activate bots up to your maximum much further away.
12.7K Downloads
SPT 3.9.0
Reminder that questing bots has its own implementation of AI Limit.
12.2K Downloads
SPT 3.8.0
Forgot to add a setting for ground zero. Thanks kickyflips
904 Downloads
SPT 3.8.0
Updated to allow map bot distance changes even in-raid instead of having to wait for next raid.
5.1K Downloads
Updated to only search for changes in bots after the set number of in "Delay frames before recheck" bots setting.
Basically will check if any new bots have spawned and calculate distances and sorting after every 300 frames by default (AI Limit used to do this every frame).
Performance improvement of about 10 fps to old version of ai limit (according to one tester)
5.5K Downloads
Updated for SPT 3.7.1 (just in case)
i think last version worked fine but whatever
2.0K Downloads
Build for 3.7.0 release.
should have fixed it not working on next raid (i think).
4.8K Downloads
Build for SPT 3.6.0 and 3.6.1 Only
2.6K Downloads
SPT 3.5.8 and 3.5.7
Added clearing the AI decision queue before disabling
(hopefully helps with stutters when re-enabling and garbled sound).
602 Downloads
971 Downloads
Test version of AI Limit that will support AI Mods like SAIN and Big Brain.
- It actually disables the gameobject so if a bot is 'disabled' they will not be visible in game. - you will have to figure out your magic number but remember that the closest X number of bots within your set distance will always be visible. You don't want too high of a number, but you don't want too low of a distance number either :). A bot that is re-enabled will cause some stuttering.
- Now has distances you can set per map and changing the settings need to be done prior to raid (probably)
679 Downloads
Rebuild for 3.5.7
No other changes at this time.
3.2K Downloads
Rebuild for 3.5.5
2.0K Downloads
Rebuild for SPT 3.5.3
1.2K Downloads
Updated for 3.5.1
2.7K Downloads
Recompile for 3.5.0
3.5K Downloads
- Should have fixed the dictionary errors as far as I can tell.
- Feels like that should have fixed the performance issue as well.. .let me know in comments if not.
935 Downloads
- Rewrote AI Limit to not use LINQ because someone aka debbiedowner said it was garbage .. and cwx said it was poop. fk u but i also love u.
- Added dictionaries for more efficient lookups instead of going through the full lists.
- Added timer option in bepinex config (f12 ) menu so you can set how long a new spawn can move freely before being disabled - based on your settings. This means no stuck bots unless it gets really crazy.
- Added quicksort for more efficiency.
- Does this really add more speed.. meh not in my opinion but you will get about 15 fps more from default give or take. However, this will not cull your spawns outside of the distance you set.
I am able to run about 70 fps on a 5900x and 2080 super with 40 bots on customs.
*12/22 - updated the zip because i saw a dictionary error in logs. should not affect the mod but if you play a long raid the log file could build up. This is for all 264 downloads before i posted this message.
2.4K Downloads
Re-release since i had a memory issue earlier (forgot to clear a list)
- Check to see if the bot camera is visible as well before disabling (prevents the not spawning issue).
- Also cleaned up code so log is clear.
- Switched to update instead of fixedupdate as the behavior.enabled was not being set correctly in that loop.
- Memory issue was due to me forgetting to clear a list on each frame.
Should see more performance as well as spawn issue/limits fixed for Lua Respawn.
463 Downloads
Quick fix. I had to remove some experimental code i left in there.
it would have basically been like as if you had no limiter at all.
182 Downloads
3.2.5 update. no new changes otherwise.
1.7K Downloads
This time my code optimizations works. Really some dumb issue with vars having to be outside the update function instead of at the top.
unity garbage collection best practices - this helped me figure out some things.
I feel like i get more frames than my previous version, you guys tell me in comments if i'm high.
715 Downloads
Only added this version to fix the download link issue.
github:
Not quite yet...