Barotrauma

Barotrauma

AI NPCs
356 Comments
RubbingMyAxe  [author] 21 Jul @ 7:34pm 
@Padre That's an error with the "broken english" NPCs. It will be fixed in the next update, coming out soon.
Padre 21 Jul @ 7:10pm 
ERROR when attempting to chat.
!Marin How are you.
[CL LUA ERROR] USERNAME C:/.../Lua/AI_NPC.lua:(583,4-586,0): attempt to index a nil value
Turning off "UserCharacterProfiles" alliviates the problem, although it sucks turning it off.
RubbingMyAxe  [author] 8 Jul @ 5:12am 
I have created a discord for the mod in case anyone wants to join to give feedback, report bugs, provide suggestions, help test or develop it, etc.

https://discord.gg/uWpFN4NPx3
jossebul 6 Jul @ 5:16pm 
nice thanks a lot ! and yeah a discord could help crowdsourcing some of the work of finding models and prompts that work well
RubbingMyAxe  [author] 6 Jul @ 4:57pm 
Also, sneak peak next update I made it pretty easy to find and select free models via the OpenRouter API: https://i.imgur.com/45SPB3I.png
RubbingMyAxe  [author] 6 Jul @ 4:50pm 
@jossebul Yeah, results can vary a lot depending on the model. I mostly use ChatGPT and I'm constantly testing so many different things that I don't try the free ones as much as I should... I should probably start a Discord server or something to get better feedback.

But anyway, it might help to tweak Artie's personality? In the Data folder of the mod, there is a UniqueCharacterProfiles.json file where I created some personality descriptions of all the special NPCs. You can try tweaking this part:

"Artie Dolittle":
{
"Description": "You are a young, incompetent, clumsy, drunk man who volunteered to work for free.",
"Style": ["peppy", "energetic", "eager", "desperate", "informal", "sarcastic"]

Maybe removing "drunk" and "peppy" would help.
jossebul 6 Jul @ 4:16pm 
so the mod has a lot of potential and already has some very fun uses, but (and that's probably an issue that depends on the model, I'm currently using the first free one I found, mistralai) I cannot let enable for NPCs on because everytime I get the same incredibly cringe and physically painful sentences from artie dolittle like look at this (he literally just killed a barotraumatic seasnek, one of the tiniest and most common random creatures you find) :
Artie Dolittle : *giggles uncontrollably* OHHHH MY GOSH -- *stumbles* -- I JUST *KILLED* A *SEASNEK* ?! *hic* DID I ?! *peeks at gun* Ohhhh no, is it *dead*? *giggles nervously* Or is it *laughing* at me ?!
appleman 26 Jun @ 1:35am 
Yes, I agree with that approach. having the feature turned off by default and allowing users to enable it if they want.
If this feature gets added, I’d personally use it in situations where I want all crewmates to respond to a specific hostile creature, or just to watch them fight with outpost security for fun.
I do understand that if all AIs respond at once, token usage could increase exponentially.
While I don’t know much about LLMs or AI systems, I wonder if, for commands like !Everybody, the response could be a fixed preset line instead of generating a new reply for each AI.
That might help reduce the token usage for that kind of command.
RubbingMyAxe  [author] 26 Jun @ 12:36am 
I am looking into both of those. I think no matter which way I go about it, it will be heavy on token usage compared to the rest of the mod so far. Tokens are getting cheaper every few months though, and some people might not care because they are using local models. So I may add it in and leave it off by default for those that want to use it.
appleman 26 Jun @ 12:02am 
This mod is really fun to play with. I especially enjoy communicating with the AI teammates.
I think it would be even better if two features were added:
First, a command like !Everybody that makes all AI crew members respond at once.
Second, it would be amazing if the AI could also communicate with each other.
Thank you so much for creating such an entertaining and immersive mod.
RubbingMyAxe  [author] 25 Jun @ 6:07pm 
Close to releasing an update to address all the errors and issues that I've been told about. I've encountered some problems with the major new features that I was going to add, so this won't be as large of an update as I was hoping.
RubbingMyAxe  [author] 22 Jun @ 8:15am 
They can respond to chat message and interpret basic commands from them. Like "bring me a wrench", they will search the submarine for a wrench and then bring it to you. You can't like teach them to do something that they execute unprompted though, at least not yet.
BrGuardian 22 Jun @ 6:47am 
So, this only makes the AI respond to your chat messages, or I could teach them to execute functions?
RubbingMyAxe  [author] 20 Jun @ 6:29pm 
It can work with Gemini through OpenRouter, I am not sure if it will work directly because I have not tried Gemini before.
I was wondering if this can only work with OpenAI API or if it can be done with Gemini?
RubbingMyAxe  [author] 17 Jun @ 11:53pm 
Been looking at the mod since the update and I see a few things that are broken... The AI Options menu is busted in single player now, it won't even open. I'm working on it along with some of the other bugs that have been reported recently. I will hopefully have an update out this week with those issues fixed and some new features.
Gnom Bober 17 Jun @ 3:56am 
i just copypasted entire lore of barotrauma from an steam post to the custom promt menu and it fixed everything. (I also changed ai model but nvm) now they know everything about factions and give different opinions about it. :steamhappy:
Gnom Bober 17 Jun @ 2:14am 
@RubbingMyAxe, thanks. But all of the outpost npcs say that they work for the outpost and not belong to any faction. Maybe this because I use Dynamic Europa mod. Also anyone I ask seems to not have any opinion on factions, bots can't decide to being on side of coalition or separatists, they always answer something neutral. I am sure that happening because of model I use and I just expect too much from an free model lol
RubbingMyAxe  [author] 17 Jun @ 12:27am 
Unless something changed with the last game update, outpost NPCs should know what faction they work for at least. Faction relations aren't aware of unless something about barotrauma was in the model's training data.

There is a configuration setting to give every bot extra information: CustomInstructions. It will add the text into the prompt for every bot.

For individual bots, the console command ai_getprofile and ai_setprofile can be used to add extra information to their personality description. I don't think that will work for the special named bots like Artie Dolittle though, because I have default ones setup for them in a data file.
Gnom Bober 17 Jun @ 12:18am 
Mod is amazing and have a lot of future potential. If it will be updated in the future this is just gold. The only problem that npcs dont understand what faction they work for and sometimes dont know anything about faction relations. I think bots just have small info about what the hell happening in the game, how can i manually give them information? Or maybe this problem just because of model I using.
jossebul 14 Jun @ 7:18am 
@RubbingMyAxe thanks, I'll try to find another model before bothering you lol
RubbingMyAxe  [author] 10 Jun @ 1:33pm 
@jossebul I don't see a free version of mythomist anymore, you need to pick a different free model on Open Router.

I haven't tried deepseek before, that error message is kind of difficult to debug. If you want to add me on Steam/Discord I can try to take a look at some of the output files.

I am not sure if deep seek will work well with this mod since it is a reasoning model. They tend to output a lot of thinking.
jossebul 10 Jun @ 12:52pm 
wait I've tried to use deepseek now and I get a different error : "unexpected token : '<eof>' reason:"
jossebul 10 Jun @ 12:46pm 
I'm not sure how to use this ? I got myself a key on openrouter, copy and pasted the things reccommended in using alternative model, and I never get any answers from bots, it only says to the console "error received from API: no endpoint found for gryphe/mythomist-7b:free"
Partnerbot 10 Jun @ 11:23am 
Dont need this shit I AM THE AI.
Капец Блин 20 May @ 2:50am 
ty bro
RubbingMyAxe  [author] 19 May @ 1:29pm 
There are a lot of 7b models on openrouter, you just pick the one you want to use and put its full name (including :free if it's a free model).

For example:

mistralai/mistral-7b-instruct:free
Капец Блин 19 May @ 9:18am 
What model should i type to use Openrouter 7b?
RubbingMyAxe  [author] 13 May @ 9:33pm 
@Rcmac206 Yes.
Rcmac206 13 May @ 9:14pm 
if it's running on a server, does only the host need to install lua for it to work?
化合螨 10 May @ 8:03pm 
The reactor function has not been activated
Silly cat 25 Apr @ 11:09am 
I just want to give orders to all of my crew you know? Like that would be really usefull.
RubbingMyAxe  [author] 24 Apr @ 3:15pm 
Currently the mod doesn't have a way to talk to all of the NPCs at the same time. I may do something where you can give orders without responses to groups of NPCs, but making them all respond at once would be a lot of API requests.
Silly cat 24 Apr @ 7:40am 
Just a question, how do give them all (speak to all of the NPCS at the same time) an command? Like "ALARM!!".
frost 22 Apr @ 10:30pm 
nah it was just using contextual orders like telling them to fix the hull or i think reporting a hull breach and having them go fix it bugged their responses completely, i dont think it had anything to do with what i said to them but idk. my friend tested them out in singleplayer with my exact same modlist and he had no issues.
RubbingMyAxe  [author] 22 Apr @ 9:24am 
Glad it fixed the problem. Do you remember what you said to them before it started happening? Did you type a % sign or something?
frost 22 Apr @ 9:09am 
the command works and the bots can respond freely again, thank you and take my steam points
RubbingMyAxe  [author] 22 Apr @ 8:11am 
@Trevorluck What issue are you having? You can add me on Steam or Discord and I can help walk you through it, if you need.
RubbingMyAxe  [author] 22 Apr @ 8:10am 
@frost I've not seen that error before, it looks like it has something to do with your conversation history with that bot. Did you use any special characters, or maybe a different language? Maybe you had a % in there and it's not being escaped properly...

Use the ai_clearconversationhistory <NPC NAME> console command and that should help.
frost 21 Apr @ 10:56am 
for the error message it states ai_npc (1918,1-88) invalid use of % in replacement string
frost 21 Apr @ 10:27am 
using contextual orders make the bot silent and they dont respond to any messages afterwards, any fix?
Trevorluck 21 Apr @ 10:13am 
Can anyone make a tutorial on how to set this up? Been trying since yesterday and no luck
Russian Bear 15 Apr @ 9:47am 
Thanks, i will try it.
RubbingMyAxe  [author] 15 Apr @ 9:23am 
Yeah, some regions are blocked from a lot of the AI providers because of sanctions. If you have a good enough PC you can host locally, someone else in the comments got that to work a couple of months ago.
Russian Bear 15 Apr @ 8:55am 
I think that mod i so cool but sadly i cant play with that because API have error in my region and when i turn on VPN it says i have wrong API but maybe i will find something that can fix it. I like that idea when you can talk with npc like they are real.
RubbingMyAxe  [author] 12 Apr @ 1:30am 
I think the Current Features and Goals thread had suggestions in it, but you can make your own thread for your suggestions if you want. If it will make the mod better and I can figure out how to do it, I will give it a shot.
Oyster 12 Apr @ 1:10am 
THIS IS AWESOME!!! Been using llama3-8b (free hosting on groq because I'm broke, if anyone doesn't understand how to get and use API keys, do some research because there's plenty of free ones that will just strongly rate limit you. I don't use openai.) and have <5 second response times, and it's incredible how EVERYTHING like the mission, crew roles, HP, orders, etc. are actually accounted for. Even the NPC's "traits" are used. (ex: "joker" trait makes them crack terrible jokes nonstop. I had a "rude" captain threatening to weld me inside the airlock.) Only have had one minor bug (gonna post in bug reports).

Oh yeah and being able to actually command them to do ingame things with chat is mind-blowing! This + the smarter AI mod makes them unbelievably lively. Like I swear they're sentient.

Do you have a suggestions thread? If not you should make one because I do have a few.

Amazing work! So much potential.
RubbingMyAxe  [author] 11 Apr @ 7:46am 
I haven't had a chance to try the new update yet, if anyone finds something broken with the mod let me know.
RubbingMyAxe  [author] 15 Mar @ 4:39pm 
I sent you an invite on steam.
ronnan 15 Mar @ 3:12pm 
if ofcourse that is a possibility