Source-checkedCreatures & NPCs

AI NPCs

by RubbingMyAxe · for Barotrauma

Integrates Generative AI Into Barotrauma This mod integrates generative AI into Barotrauma for several purposes: Chat - NPCs respond to messages using session context (conversation history, health,…

11KDownloads
8 mo agoLast updated
169 MBFile size
Steam WorkshopSource

About AI NPCs

From Steam Workshop

Integrates Generative AI Into Barotrauma This mod integrates generative AI into Barotrauma for several purposes: Chat - NPCs respond to messages using session context (conversation history, health,…

Integrates Generative AI Into Barotrauma

This mod integrates generative AI into Barotrauma for several purposes:

  • Chat - NPCs respond to messages using session context (conversation history, health, inventory, submarine state, etc.).
  • Orders - NPCs interpret natural-language commands from chat messages and can execute multi-step tasks (e.g., "go to the submarine, get a shotgun, and bring it to me").
  • Speech to Text - Use your microphone to issue commands; can also transcribe voice to text chat in multiplayer. Supports many languages.
  • Text to Speech - Gives NPCs voices so that they can speak through a simulated VOIP system.
  • Vision - NPCs can receive an image of their surroundings with the chat prompt, allowing them to read signs and comment on nearby objects.
  • More to come!

Requirements

  • Lua for Barotrauma (with CSharp Scriping enabled)
  • The necessary credentials (API key and/or endpoint URL) for your chosen AI provider(s).

How to Play for Free

Most AI providers charge for API usage. With appropriate models and local speech to text, typical sessions cost merely cents when using this mod. But if you want to use the mod completely free, the options below work with some limitations.

Player2

Simple and quick to set up. Requires you to install a desktop client and create an account, but gives many free uses daily. [olist] [*]Download and install Player2: https://player2.game [*]Launch it. [*]Create an account. [*]Select Player2 as your AI provider for Chat/Orders/Speech-to-Text. [/olist]

OpenRouter

A bit more setup involved and a low number of free daily uses, but has many models to choose from. [olist] [*]Go to OpenRouter's website: https://openrouter.ai/ [*]Create an account. [*]Create an API key. [*]Select OpenRouter as your AI provider for Chat/Orders. [*]Select your desired Model from the dropdown (the list is filtered to Free by default). [*]Enter your API key. [/olist]

Local Hosting

Unlimited free uses, but requires a powerful PC, is much more complicated to set up, and requires several gigabytes of free space to download the AI model. Recommended for experienced users only. [olist] [*]Download and install a local LM system, for example: LM Studio [*]Further instructions can be found on this mod's Discord: Barotrauma AI NPCs Discord [/olist]

Setup Instructions

General Setup

[olist] [*]On the Main Menu, click the 'Mods' button. [*]Include Lua for Barotrauma and AI NPCs in your Enabled Packages list, and click Apply. [*]Install client-side Lua by following this guide: Lua Installation Guide. [*]On the main menu, click the 'Open LuaCs Settings' text at the top left of the screen. [*]Check 'Enable CSharp Scripting' and then click 'Close'. [*]Follow the additional steps below. [/olist]

Singleplayer

[olist] [*]Start a game. [*]Press ESC and click the 'AI NPCs Options' button. [*]Select your desired API provider(s) and enter any necessary information (endpoint, model, or API key). [*]Click the 'Apply' button at the bottom of the screen to save your changes. [/olist]

Hosting a Multiplayer Server

[olist] [*]Click the 'Host Server' button on the main menu. [*]Set the 'Server Executable' to 'Lua for Barotrauma' when starting your server. [*]Press ESC and click the 'AI NPCs Options' button. [*]Select your desired API provider(s) and enter any necessary information (endpoint, model, or API key). (As the server host, only you can change these settings for your server.) [*]Click the 'Apply' button at the bottom of the screen to save your changes. [/olist]

Usage

Text Chat

To interact with an NPC, type "!" followed by the NPC's first or last name and your message. For example: !artie how are you doing?

With Orders enabled, your message can include commands that the NPCs will try to execute. For example: !artie bring me 5 bandages then repair the submarine

To give commands to a group of NPCs by role, you can specify all/every or one/any followed by the role. You can also use the singular or plural form of the role, or even some shorthand forms. Examples:

  • !mechanic bring me a wrench
  • !security officers operate the turrets
  • !medics heal the crew
  • !all assistants fix the submarine
  • !any engineer repair the reactor

Speech to Text

Check the Local checkbox in AI NPC Options to have the speech to text processed locally for free! This uses CPU, so it may be taxing on weaker computers. It's also not as accurate as most APIs.

If Speech to Text is enabled, you can press the Speech to Text hotkey (defaults to tilde, configurable in AI NPC Options) and speak when you see the green microphone icon above your character's head.

Use the same rules as above when speaking: say an NPC's first/last name or role followed by your message.

General Information

Compatible with Singleplayer and Multiplayer modes (Campaign, Mission, Sandbox).

In Multiplayer, only the server needs to have the AI providers selected. For the server host, the AI NPCs Options menu will update the server's settings. For clients, it will only update their local settings.

There is a F3 console command for modifying individual NPC personalities and voices: ai_customize <NPC NAME>. All console commands are viewable by running the "help" command. They are prefixed with "ai_" and support TAB auto-complete for certain parameters like configuration settings and NPC names.

Read the full description on Steam Workshop →

Highlights

From source data

Footprint

A 169 MB download, rated a light load on a server.

Last update

Its author last shipped an update 8 mo ago.

AI NPCs on Nxeon

From our catalogue
One-click install
Not available. One-click install isn't available for this game's mods yet. Download it and upload it to your server in Files.
Server load
light
Smallest plan we suggest
Barotrauma — 2 GB (2 GB RAM). This follows our own load rating above, not a benchmark.
Latest build
2026-03-04, released 2026-03-04, 169 MB

Game versions by loader

LoaderGame versionsNewest
Workshop

From 1 recorded build of AI NPCs.

Dependencies

Declared by the newest build that lists any. Required ones are installed with it on one-click installs.

Run AI NPCs on a Barotrauma server

Deploy a server above, then upload the file in Files.

What kind of mod it is

From the catalog
Listed on Steam Workshop as “Maps”

Creatures & NPCs

Adds or changes creatures, NPCs and how they behave.

Compatibility

Game
Barotrauma
File size
169 MB

Verified at the source

  • ✓Steam WorkshopOfficial listing, checked 2026-10-10Open ↗
  • ✓AuthorRubbingMyAxe, as published on Steam Workshop
  • ✓LicenseNot published by the sourceFree

AI NPCs, answered

Generated from the mod’s own source data.

Is it free?

Yes. AI NPCs is free to download from Steam Workshop.

How do I add it to my Nxeon server?

One-click install isn't available for this game's mods yet. Download AI NPCs from Steam Workshop and upload it to your Nxeon Barotrauma server in Files.

NxLabs

Run AI NPCs on a Barotrauma server.

Deploy in about a minute from $4.99 a month, then upload AI NPCs in Files.