Barotrauma

Barotrauma

352 ratings
Smarter Bot AI
7
7
3
6
3
8
4
2
2
3
5
4
4
2
2
3
3
3
3
2
2
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
562.265 KB
5 Oct, 2024 @ 10:41pm
18 Jun @ 12:37pm
59 Change Notes ( view )

Subscribe to download
Smarter Bot AI

In 2 collections by Landbanana
TheoreticalBarotrauma
61 items
TheoreticalBarotraumaServer
49 items
Description
Some changes to the bot AI that I think are good for gameplay. Feel free to comment any suggestions you might have! I've provided some videos of a few options since it's a bit hard to explain how some stuff works in text.

Almost fully server-side, and should be safe to add/remove at any time during a save. Clientside is only needed for the configuration GUI and Orders module, which is by default disabled.

Requires Lua for Barotrauma. Make sure to follow all install instructions!

All options are completely modular, and can be enabled/disabled/tweaked using the in-game config menu (button located on the "escape" key menu).

Current Changes
  1. Equip Items
    • Crew Loadout:
      Set what items you want the bots to automatically search for/equip in various inventory slots (can be differentiated by job).
    • Re-Equip Armor:
      Bots will check their inventory and re-equip any armor they might've taken off.

  2. Combat Tweaks
    • Pre-Spin Turrets:
      Bots will spin-up certain turrets (e.g. chaingun), letting them actually utilize them. Can also adjust spin-up noise volume.
    • Arrest Humans In Player Sub:
      Bots set to "Fight Intruders" will automatically arrest hostile humans in the player sub, if they have handcuffs and a stunning weapon.
    • Prevent Attacking Handcuffed:
      Bots should never attack people in handcuffs or paralyzed people.

  3. Cleaning Additions
    • Purchased Item Crates:
      Lets you set an auto-order on purchased crates, either deconstruct or ignore.
    • Deconstruct In Bulk:
      Let bots set to "Deconstruct Items" pick up stacks of items at a time.
    • Only Use Ship Deconstructor:
      Bots will no longer use deconstructors outside the player submarine, if the player submarine has a deconstructor, even if the queue is full.

  4. Orders
    (Client and Server side probably required, unless disabled as it is by default)
    • Avoid Wandering in Room:
      Marks the current hull you're in as a room that the AI should "Avoid Staying" in. This means that they should no longer randomly wander into the room, but will still complete any tasks that may require them to enter the room.
    • Perform:
      Tell the AI to use various instruments on board the submarine. This includes Accordions, Harmonicas, and Guitars, and bikehorns (indirectly).

  5. Smarter Pets
    • Eat Food In Inventory:
      Pets are able to eat any food items inside their personal inventory when hungry. Has an option to override the "protect owner" targeting that prevents pets from eating when their owner is nearby (only affects eating inventory items).
    • Bots Play When Idle:
      Idle human bots will play with any nearby visibly non-happy pet, checking for said pets at a customizable interval.
    • Cleanable Produce:
      AI can now pick up pet "produce" items like poop, chitin, and mucus balls. They will be placed in the same containers that garden produce would be.

  6. Operate Reactor Tweaks
    • Set Fuel Rod Amount:
      Set the amount of fuel rods a bot set to "Turn On Reactor" will attempt to keep inside the reactor.
    • Detect Autoreactor:
      Added an optional setting (enabled by default) to detect if an autoreactor controller (any signal received) is trying to control the reactor. If an autoreactor controller is detected, the bot will no longer interact with the reactor beyond just refuelling and repairing. The bot will also give some dialogue to indicate this.

  7. Use Talents
    • Assistant - "Inspiring Tunes":
      Assistant AI will play bikehorns as well as any other intrument in their inventory every so often, optionally only doing so if a nearby crewmate can be buffed. This talent gives nearby a buff to all skills when doing so.

    • Assistant - "Jenga Master":
      Assistant AI will go around the sub after a set delay (when idling only), interacting with any containers that do not have the "Jenga Master" buff. This increases the Max Stack Size of every interacted container, and stops once there are no more containers to buff.

    • Assistant - "Non-Threatening":
      Assistant AI will "play dead" by ragdolling if they are being attacked and their health is below a set minimum, preventing enemies from targeting them after 2 seconds. This does not happen if the hull they're in is on fire or flooded and they need a suit/mask.

    • Captain - "Steady Tune":
      Captain AI will play a harmonica in their inventory every so often, optionally only doing so if a nearby crewmate can be buffed. This talent gives nearby crewmates psychosis resistance when doing so.

    • Engineer - "Melodic Respite":
      Engineers will play guitar with this talent, giving a long-lasting boost to repair speed for nearby crewmates.

  8. Ladder Fix:
    The annoying bug where bots get stuck on ladders has (hopefully) been fixed. After being stuck for a set period of time, bots should "nudge" themselves to the next node in their pathing.

  9. Mute Singleplayer Bot Conversations:
    SINGLEPLAYER. Also, disabled by default. This disables all the random bot conversations that normally occur (same as the vanilla Server-Side setting in Server Settings). Also has a suboption to completely disable all bot chat messages and bubble popups.

  10. Smarter Load Items:
    Bots will now replace the batteries in charged items (flashlight, handheld sonar, etc.) and oxygen tanks with a fresh battery/tank. Note: empty items (those without a battery/tank) will not be filled, as only replacing works.

  11. Replenish Inventory:
    Bots will now seek out and refill their own oxygen tanks, batteries. welding fuel tanks, and ammunition. Can optionally be applied to the "Wait" order, or only when docked.

  12. Use Furniture
    • Auto Use When Idle:
      Bots are able to sleep, just like with chairs and sitting. Sleeping actually heals a little over time in vanilla, and if you're using Neurotrauma, sleeping can help heal concussions.
    • Stay In Bed If Hurt:
      Bots will stay inside a bed if they are idling, hurt, and it is safe to do so. NOTE: This does not mean that they seek out beds when hurt, however, just that they won't leave if they are already in one.

  13. Crew Stays in Sub
    Bots (and you!) will always spawn in the sub when docking at an outpost.

Russian Translation by Kirid


GitHub[github.com]
Popular Discussions View All (3)
109
21 Aug @ 9:45am
Suggestions
Landbanana
70
27 Jul @ 5:59am
Bug Reports
Landbanana
212 Comments
SomeRomanianGuy 12 minutes ago 
Nevermind. It's the sub I'm using. It's that exact gun that doesn't fire. Mod's working fine.
SomeRomanianGuy 2 hours ago 
Added this mod mid-save. For some reason, my bot refuses to fire the chaingun. Doesn't even warm it up or anything, just points it at enemies without firing. I got Lua.
Bubble Gum 6 hours ago 
Приветствую, а улучшение на ИИ капитана для вождения подлодки имеется?
Desulator 21 Aug @ 2:00pm 
Привет автор. Я тут попытался вкатиться в моддинг, но пока не очень (сложная задача, там либо lua, либо c# надо, ахах).
Не подскажешь, мб ты пытался добавить приказ на полив растений или как-то автоматизировать это? У меня помимо этой идеи была ещё костыльная - сделать умный цветочный горшок, который бы просто подключался через компонент "или" к сирене при низком уровне воды, но пока и эта задача у меня не решается.
Заранее спасибо за ответ.
Conradey12 21 Aug @ 9:26am 
This mod does not seem to work with Baroverhaul, if anyone was wondering. It would be SWEET if it did.
John Dick 18 Aug @ 2:33am 
There is a mod called Baroverhaul that adds new skills related to music tools and the time between their use. Does this mod work with them?
senpai loves✿you 17 Aug @ 4:03am 
Как застревали они в лестницах, так и застревают :breina:
Divizor 15 Aug @ 8:29am 
Вроде появилось меню настройки ботов, однако боты не экипируются нужными предметами.
shalakimbir_82 14 Aug @ 3:36am 
не работает хотя я скачал lua
wiwestor 14 Aug @ 2:42am 
would be nice to have abitlity to set amount of needed items in the lodout screen