Skwizzy added a new file:
QuoteDisplay MoreIf you enjoy my work, support me at Ko-Fi!
REQUIRED DEPENDENCY: BigBrain This mod will not work unless the BigBrain mod is also installed!
View readme for more details. Please report any issues in the comments section here or feel free to open an issue on the github. Having debug enabled in the mod menu is recommended when reporting issues.
- Check here for an existing issue before reporting a bug
Base game behavior:
- Scavs start a raid on patrol, when they finish a combat engagement they will return to patrol mode after the amount of seconds specified in the Mind.TIME_TO_FORGOR_ABOUT_ENEMY_SEC bot config property
- When scavs are on patrol, they have a chance to inspect a nearby corpse and loot simple things such as weapons and
- When scavs are on patrol, sometimes they stop in front of a lootable container and pretend to loot it
- PMCs and Scavs in SPT spawn with some potentially valuable loot already in their inventory
Modded behavior:
- New bot brain layer (LootingLayer) added for looting that replaces the base game logic responsible for "looting"
- LootingLayer will activate every 10 seconds (by default) during a patrol causing the bots to scan for the closest lootable item, container, or corpse. Scan distance configured by the "Detect Loot Distance" setting (75m by default)
- Once a lootable object has been found, bots will attempt to navigate to the object and commence looting
- Bots will attempt to loot everything from within corpse and a container
- Bots will examine each item for about 1 second before looting it (simulates discovering items when searcing containers/corpses)
- If a bot cannot equip a piece of gear, they will attempt to place it in their inventory
- Not all loot is navigable, relies heavily on the availability of a nearby NavMesh that bots can use to navigate
- If a container is behind a door, bots will open the door if unlocked.
- If a bot is stuck in place or if the bot spends too much time moving, the loot will be ignored
- Once looting has finished, bots will wait the amount of time specified
in the "Delay between looting" setting before the next loot scan occurs (15s by default)Gear Swap Criteria
- Bot will always swap to gear that has higher armor rating (helmets, armor vests, armored rigs)
- Backpack will be swapped if backpack being looted has more slots
- When looting larger rigs, bots will swap if currently equipped rig is of equal or lower armor class
- When throwing old backpacks/tactical rigs, bots try to take all the loot from the container thrown
- When looting weapons, bots will compare the item's Handbook(default) or Flea market price in rubles to the value of the weapons currently equipped.
- Looted weapons with higher value will replace an equipped weapon with the lowest value
- Bots prefer to use the highest value weapon as their primary (if they have ammo)
Package Contents
- BepInEx/plugins/skwizzy.LootingBots.dll - Client plugin responsible for all the new corpse looting logic
- user/mods/Skwizzy-LootingBots-ServerMod - Server mod responsible for:
- Marks all items with DiscardLimits as InsuranceDisabled. It then disables the DiscardLimit settings for the server via the EnableDiscardLimits option in Server/database/globals.json. SPT PMC bots by default spawn with loot already in their backpacks, this loot is not marked Found In Raid and thus is subject to BSG's RMT protection logic. With discard limits enabled, when a bot drops their backback to swap to a new one any loot with discard limits in their bag will be deleted immediately when the bag is dropped. To avoid this we set the EnableDiscardLimits to false, and also make sure to flag all items with a DiscardLimit >= 0 as InsuranceDisabled to prevent items suchs as keys and cases to be insured.
- Provides the option to clear out the loot that PMC/Scav bots start with
in their backpacks. This does not include meds, ammo, grenades ect. These options can be found in theSkwizzy-LootingBots-ServerMod/config/config.json
.Install
- Extract the contents of the .zip file into your SPT directory
- Recommended to have LootingBots-ServerMod loaded last in the mod order to make sure discard limits arent enabled by another server mod
Loot Finder
- Enable corpse looting - Enables corpse looting for the selected bot types
- Enable corpse line of sight check - When scanning for loot, corpses will be ignored if they are not visible by the bot
- Detect corpse distance - Distance (in meters) a bot is able to detect a corpse
- Enable container looting - Enables container looting for the selected bot types
- Enable container line of sight check - When scanning for loot, containers will be ignored if they are not visible by the bot
- Detect container distance - Distance (in meters) a bot is able to detect a container
- Enable loose item looting - Enables loose item looting for the selected bot types
- Enable item line of sight check - When scanning for loot, loose items will be ignored if they are not visible by the bot
- Detect item distance - Distance (in meters) a bot is able to detect an item
- Debug: Log Levels - Enable different levels of log messages to show in the logs
- Debug: Show navigation points - Renders spheres where bots are trying to navigate when container looting. (Red): Container position. (Green): Calculated bot destination. (Blue): NavMesh corrected destination (where the bot will move).
Loot Finder (Timing)
- Delay after spawn - Amount of seconds a bot will wait to start their first loot scan after spawning into raid.
- Delay after taking an item (ms) - Amount of milliseconds a bot will wait after taking an item into their inventory before attempting to loot another item. Simulates the amount of time it takes for a player to look through loot decide to take something.
- Enable examine time - Adds a delay before looting an item to simulate the time it takes for a bot to "uncover (examine)" an item when searching containers, items and corpses. The delay is calculated using the ExamineTime of an object and the AttentionExamineTime of the bot.
- Loot scan interval - The amount of seconds the bot will wait until triggering another loot scan
Weapon Loot Settings
- Use flea market prices- Bots will query more accurate ragfair prices to do item value checks. Will make a query to get ragfair prices when the client is first started. May affect initial client start times.
- Calculate value from attachments- Calculate weapon value by looking up each attachment. More accurate than just looking at the base weapon template but a slightly more expensive check
- Allow weapon attachment stripping - Allows bots to take the attachments off of a weapon if they are not able to pick the weapon up into their inventory
- PMC: Min loot value threshold - PMC bots will only loot items that exceed the specified value in roubles. When set to 0, bots will ignore the minimum value threshold
- PMC: Max loot value threshold - PMC bots will NOT loot items that exceed the specified value in roubles. When set to 0, bots will ignore the maximum value threshold
- PMC: Allowed gear to equip - The equipment a PMC bot is able to equip during raid
- PMC: Allowed gear in bags - The equipment a PMC bot is able to place in their backpack/rig
- Scav: Min loot value threshold - All non-PMC bots will only loot items that exceed the specified value in roubles. When set to 0, bots will ignore the minimum value threshold
- Scav: Max value threshold - All non-PMC bots will NOT loot items that exceed the specified value in roubles. When set to 0, bots will ignore the maximum value threshold
- Scav: Allowed gear to equip - The equipment a non-PMC bot is able to equip during raid
- Scav: Allowed gear in bags - The equipment a non-PMC bot is able to place in their backpack/rig
- Log Levels - Enable different levels of log messages to show in the logs
Settings for LootingBots-ServerMod can be found in user/Skwizzy-LootingBots-ServerMod/config/config.json
- pmcSpawnWithLoot - When set to true, PMCs will spawn with loot in their bags/pockets (default SPT behavior)
- scavSpawnWithLoot - When set to true, Scavs will spawn with loot in the bags/pockets (default SPT behavior)
Default config:
- Waypoints - Expanded Bot Patrols - Adds expanded NavMeshes to all maps allowing bots to be able to navigate to almost every part of the map. When playing with larger Loot Detection Distances, this will allow bots to travel freely to extremely far away loot
- SAIN 2.0 - Solarint's AI Modifications - Full AI Combat System Replacement - Amazing overhaul of bot AI, gives the game a whole new feel. Overhaul of the bot reactions allows bots to loot and not be interrupted if they hear shots from halfway across the map as well as many other things!
- Search Open Containers - Allows you to search an opened container without having to close them. Nice QOL when encountering containers that have been looted by a bot and left open
This mod will conflict with any mod that sets theglobals.config.DiscardLimitsEnabled to true. PMC bots will throw exceptions when attempting to discard gear with DiscardLimits set. This needs to be false for the mod to function properly with pmc looting.