Bothering mod authors will lead to warnings and repeat offenses will lead to eventual bans.
Sleepy Time
Sleepy Time allows players to change the distances that the bots will activate and deactivate. There's also an option (enabled by default) that allows all bots to take a nap; by default bosses and PMCs never sleep. Sleepy Time isn't a magic bullet, but it will help claw back some FPS.
Configuration
The configuration file has information on how to configure Sleepy Time. Because other mods may override the settings, it's important to have Sleepy Time be the last mod in the load order, as determined alphabetically by folder name. If you are unsure if another mod is conflicting, look for the output in the the console at raid start: [INFO] Customs: activate: 265 -> 120, sleep: 300 -> 144, where 120 would be your configuration value for bigmap (Customs).
Activate/sleep internals
There are two distances (in meters) that determine the bots' wakefulness: distance-to-activate and distance-to-sleep. The distance isn't only to the player; it's to all enemy players. Scavs will tend to have only a handful of enemies (PMCs and the player), whereas the PMCs will have most every bot (and the player) as an enemy. This results in fighting across the map, even if it's far away from your PMC.
For the simple case of activation or sleeping, the respective distances are only checked once every ten seconds. If your distance-to-activate is too small, you can easily approach a sleeping bot. When a bot takes damage, it will become ineligible for sleep for thirty seconds, and if it was sleeping, it will be activated.
This is why there's the option--and by default it's enabled--to allow PMCs to sleep. Otherwise, they roam around a bit and activate the scavs, even if they never notice each other. It's also why there's a flurry of activity (and frame drops) whenever new bots are spawned--the new bots are active for at least ten seconds and sleeping bots may wake due to new enemy proximity.
An astute reader will observe that distance-to-sleep isn't configured; it's done automagically as an additional 20% of distance-to-activate, which is a ballpark estimate of BSG's configuration. When starting a raid, the distances will be displayed in the server console for your viewing pleasure.
What Sleepy Time is not
Sleepy Time doesn't hard-stop the AI; it works within BSG's AI design. If you want a mod that hard-stops the AI, look at AI Disabler. Be warned though, this has some significant drawbacks to counter its significant benefit. First and foremost, if the bots spawn in the same location and are outside of the active range, they will be stuck within each other and never move again. This frequently happens with boss spawns and their followers. Also, there's no persistent configuration nor per-map configuration.
As noted in the intro, Sleepy Time is not a magic bullet. There are spawn patterns that can keep some bots active indefinitely. One such case is on Customs, where the wall between new gas station and the warehouse district can separate PMCs and Scavs waves. With enough bots of opposing factions, Sleepy Time's power of naptime won't help near as much.
-
Version 1.0.1
- sotthata
- 1.6k Downloads
Minor update, but important if running mods that also modify the same BSG tuning knobs:
- Renamed folder to "zSotthata-SleepyTime";
- updated configuration documentation; and
- updated README.
-
Version 1.0.0
- sotthata
- 772 Downloads
Cosm1c Gam3r
Not working on AKI 3.3.0
It shows errors in AKI server
Margorubber
this mod doesn't change the ai difficulty, right? I swear ai just got easier after I installed this mod
Padey
will you update this mod in the future to 2.3.0 ?
hiosss
Sorry I dont understand how to activate this mod, do I have to write the comand in a console in the raid ? if so, how I can open that console, and if not, where i can configure the distances? in the archive config??
Can someone explain me please !! :))
sotthata Author
This mod is like any other mod server-side mod. Unzip the contents into user/mods. It should be user/mods/zSotthata-SleepyTime/ if you've done it correctly. Start the server. You'll see a message in the server window (not in-game console) that reads [INFO] Loading: Sotthata-SleepyTime 1.0.1.
Tada. You know it is installed properly.
Whenever you zone into a raid, you'll see an output in the aforementioned server window that describes what were BSGs settings for that map and what the new values are.
For configuration, please read the the mod's "Overview" on this website; the file referenced is config/config.json.
footlicker
question;
if
"overrides": {
"factory4_day": null,
and
"activation-distance": 100,
then
factory day bot sleep distance = 100?
or
"it will use the respective map's default."
(if the default is other than 100, or does it mean the default is defined by "activation-distance"?)
Thx, great mod!
sotthata Author
Yes, it'll use the map's default as specified by BSG. Think of it as "I'm overriding the 'activation-distance' to use BSG's value."
Tchiang
Work on 2.2.3 ?
sotthata Author
Yuppers.
nekoworkshop
Just a heads up for those who use FAIT (Fin's AI Tweak). FAIT seems to overwrite the very same value this mod changes. I was wonder why I'm seeing something like this in my log, despite the value I set in the config is nowhere near 330.
[INFO] Customs: activate: 265 -> 330, sleep: 300 -> 350
Here is the code in FAIT (1.21.3a) that causes the conflict. It's on line 958 in the mod.js
After commenting out the two lines that change DistToSleep and DistToActivate I'm seeing a noticeable performance improvement.
sotthata Author
Nice catch!
I performed a test and if you use Fin's trick of ensuring that my mod is below is in the sort order by prepending the folder with a "z" (i.e., "zSotthata-SleepyTime"), it will overwrite Fin's changes. This way you won't have to keep hacking his file as he updates.
The next time I publish I'll make this change inside the archive.
Rinlzer0001
To anyone wondering, there's not a lot to be done about the hard stutters as the AI spawn in, if you want them to function, at all. Mods that hard-stop them will bork the ever-loving dog shit out of every single raid, as Sotthata has explained.
Now, all of that being said, Sotthata, I have to say that this mod does help quite a bit, at least for me, with your default settings. The stutters only last for about half to a full second and then I'm good. You did a fine job, a damn fine job on this one, and I for one, thank you.
LazyAmerican
I'd gladly accept stutters if it means I could run factory fps on all maps lol
sotthata Author
Heh, we'd all love that wouldn't we?
There are bot spawns that happen where, unfortunately, you won't see much of an improvement. For instance, if a squad of PMC spawns at Custom's new gas and several scavs spawn on the other side of the wall in the warehouse districts, they will be close enough to keep each other active as they are enemies of each other, but can't kill each other off due to LOS.
On the whole though, you'll see improvement.
Kantore
This mod makes my tarkov 10+ fps than.
Thank you sotthata!
Jesus01
Hi, i think mine is not working.
I played one game on customs and i heard shots from RUAF Roadblock while being on dorms, and i still find dead bodys everywhere.
Idk if i installed something wrong, i changed some parameters for performance but thats all.
https://codepaste.sp-tarkov.co…8QCpzbvHfy6tZH7pF1NNNK6FH
This were the things i changed
sotthata Author
This mod doesn't hard-stop the AI. As I described in the README, bots will remain active or will activate if enemies are within range. The most common occurrence of this is when new waves spawn. To hear that you heard shots while at dorms does not surprise me in the least. This is also why frame drops still happen when waves spawn in as the bots are busy doing stuff until ten seconds elapse--at a minimum.
If you want a mod that hard-stops the AI, look at AI Disabler. Be warned, though, this has some significant drawbacks to counter its significant benefit. First and foremost, when waves spawn, if the bots spawn in the same location and are outside of the active range, they will be stuck within each other and never move again. This frequently happens with boss spawns and their followers. Also, there's no persistent configuration nor per-map configuration.
Someday I may get around to writing a module.dll mod to give me greater control over the AI, but Lost Ark is now out and there's grinding to be done!
Thanks for asking though, it helps me know what to clarify in the docs when I next publish.
Yurian
Should this mod work in Customs? The config does not specify this;
"The map names are: bigmap, factory4_day, factory4_night, interchange, ",
"laboratory, lighthouse, rezervbase, shoreline, and woods.",
Can customs be added?
thank!
sotthata Author
Yes, the mod works for all maps, and all maps will use the default value specified in activation-distance unless it's added to the overrides section.
Customs is "bigmap". Those map names are the internal BSG names.
SirDigby
Interesting, will try this out. I use Lua's Spawn Rework and Custom Spawn Points and also space out my NPC spawns over the course of the raid to simulate conflicts throughout the raid and PMC's moving through different areas but I still get the initial stutters at the start as the base NPC's are spawned, so will this smooth that out? Guess I'll find out, it's downloaded...
TomfloxMeister
Did it improve your fps?
SirDigby
Only done one raid so far but it seems to have helped ease out the initial spawn stutters, but I also changed up my Lua spawns too as I've extended my raids to 60 mins so I won't definitively say yes but you're best just to slap it in and see for yourself.