Skwizzy added a new version:
QuoteUpdated for AKI 3.5.5
Skwizzy added a new version:
QuoteUpdated for AKI 3.5.5
Skwizzy added a new version:
QuoteContainer Looting!
Two flavors of container looting to satisfy players with different performance requirements. With dynamic container looting, bots will add container checks alongside their normal dead body check allowing them to identify nearby containers and break their patrol to try and loot them. Reserve patrol looting is similar except it is limited to bots that use the preexisting patrols that stop in front of containers.
As always please let me know if you experience any issues!
Special thanks to DrakiaXYZ and Solarint for answering all my patrol/navmesh related questions!
New Features
- Reserve Patrol Container Looting - First iteration of container looting. Hooks into the method that is called during a patrol that makes a bot pretend to loot a container in raid and actually lets the bots take the items from the container. This version is low cost but also very limited as I havent seen too many bots that are using these specific patrols that have the container points in them.
- Dynamic Looting System - New dynamic looting system that relies on the logic used by the bots to loot corpses. Runs additional logic alongside the corpse looting methods to check for nearby containers within a sphere around the player and finds the closest container that has a valid navigation path. Once the bot reaches the container they will exhibit the same behavior as corpse looting where they crouch, look at the container, and initiate the same looting logic used by corpse looting. After looting, the bot will wait a certain amount of time before trying to find another nearby container to loot.
- If a container is behind a door, the bot will open the door after running into it for a few seconds to get to the container
- If a bot is stuck on an open door, the bot will close it
- Not all containers are able to be reached. This entirely depends on if there is a valid NavMesh nearby that the bot can use to navigate close enough to the container
Mod Settings
- Enable reserve patrols - Enables looting of containers for bots on patrols that stop in front of lootable containers (reserve patrols). Not needed if using dynamic looting.
- Enable dynamic looting - Enable dynamic looting of containers for selected bot types. Will detect containers within the set distance and navigate to them similar to how they would loot a corpse. More resource demanding than reserve patrol looting.
- Dynamic Looting: Dynamic looting: Delay between containers - The amount of time the bot will wait after looting a container before trying to find the next nearest container
- Dynamic looting: Detect container distance - Distance (in meters) a bot is able to detect a container
- Debug: Show navigation points - Renders spheres to help visualize the decision making process for where a bot should move to. (Credits to DrakiaXYZ for the helper)
- Red - container position.
- Black - "Optimized" container position.
- Green - Calculated bot destination
- Blue - Where the bot will actually move. (Position snapped to NavMesh)
Fixes
- Properly disable new corpse looting for bot types when disabling looting
- Update bot's gear value when new weapons are equipped
- Correct weapon swap logic when looted weapon is worth more than both the primary and secondary weapon. (Bot throws secondary, moves primary to secondary, and equips looted weapon as primary)
- Fix issue where bots always swapped from armor vest to armor rig
Skwizzy added a new version:
QuoteDisplay MoreThis is mainly a performance update to address issues reported with the use of flea market queries while in raid. The weapon appraisal system has been overhauled so that the data is initialized when the client first starts, allowing for smoother looting transactions in raid. If you were having performance issues in 1.0.0 with the flea market option, give it a try again in 1.0.1!
Some small enhancements have been included, like including attachments in weapon appraisal making the value calculations a lot more accurate than just using the weapon's TemplateId.
Mod Menu has changed, be sure to double check your settings
Will begin looking into container looting this week!
New Features
3/23
- Mod Menu - Weapon Looting: 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. Defaults to false.
3/24
- Mod Menu - Weapon Looting: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. Disable if experiencing performance issues!
- Mod Menu - Corpse Looting: Enable looting (replaces PMCs can loot) - Enables corpse looting for the selected bot types. Takes effect during the generation of the next raid. Defaults to all
- Mod Menu - Corpse Looting: Log Levels (replaces Enable Debug) - Enable different levels of log messages to show in the logs
Fixes
3/23
- Fix issue where bots were looting items out of deeply nested containers
- Default to Handbook prices for weapon appraisal for performance
- Optimize swap throw/equip flow
- Skip transaction when bot returns the secure container as the place to move the item
- Use existing handbook instance created when client first starts. No more additional query for getting the default prices for weapon appraisal!
3/24
- Move ragfair query to initial client load. Overall loot time in raid is on par if not faster than handbook
- Attachment appraisal for ragfair and handbook
- Convert handbook to dictionary on client start for faster raid access
Skwizzy added a new version:
QuoteDisplay MoreThis is mainly a performance update to address issues reported with the use of flea market queries while in raid. The weapon appraisal system has been overhauled so that the data is initialized when the client first starts, allowing for smoother looting transactions in raid. If you were having performance issues in 1.0.0 with the flea market option, give it a try again in 1.0.1!
Some small enhancements have been included, like including attachments in weapon appraisal making the value calculations a lot more accurate than just using the weapon's TemplateId.
Will begin looking into container looting this week!
New Features
3/23
- Mod Menu - Weapon Looting:
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. Defaults to false.
3/24
- Mod Menu - Weapon Looting: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. Disable if experiencing performance issues!
- Mod Menu - Corpse Looting:
Enable looting (replaces PMCs can loot) - Enables corpse looting for the selected bot types. Takes effect during the generation of the next raid. Defaults to all
- Mod Menu - Corpse Looting: Log Levels (replaces Enable Debug) - Enable different levels of log messages to show in the logs
Fixes
3/23
- Fix issue where bots were looting items out of deeply nested containers
- Default to Handbook prices for weapon appraisal for performance
- Optimize swap throw/equip flow
- Skip transaction when bot returns the secure container as the place to move the item
- Use existing handbook instance created when client first starts. No more additional query for getting the default prices for weapon appraisal!
3/24
- Move ragfair query to initial client load. Overall loot time in raid is on par if not faster than handbook
- Attachment appraisal for ragfair and handbook
- Convert handbook to dictionary on client start for faster raid access
Skwizzy added a new file:
QuoteDisplay MoreIf you enjoy my work, support me at Ko-Fi!
9/23 - I have returned! Work is slowing down and able to focus on the mod again, working on some updates/bugfixes that have been reported while I was away
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.