Carrier Command 2

Carrier Command 2

Carrier Command 2 Workshop
Modifications for Carrier Command 2.
naegthul 31 Aug, 2024 @ 6:20am
Idea: LLM powered ship AI
Hi, I just played around with the Mantella AI mod for Skyrim (came packaged with the Mad God's Overhaul modpack for Skyrim VR), and what it actually does is relatively simple.

I don't have the time to look into the modding tools / APIs of Carrier Command 2, or to write a mod, so I suggest it here - maybe someone has the muse to pick it up.

This would involve building a prompting system that takes user messages, chat history and game data and sticks those into a prompt for a Large Language Model. Of couse some API integrations for some text generation APIs would be needed to invoke an ai model, then pass the response back into the game. Ideally with optional speech-to-text and text-to-speech systems integrated.

With some smart prompting, given CC2 offers some API to access live in-game data, you could converse with your 'ship ai', ask about inventory, islands, intel on enemies, weather...

Going further, it may be possible to invoke the AI upon in-game events - it could notify the player about stuff he is not focusing on... "The enemy island is launching AA missles at our scout manta".

Going even further, it may be possible for the ai to take actions, change ship heading or speed, order invenotry from islands, deploy vehicles etc. on the players (ideally verbal) command.

could be some work to figure out all the integrations, and then to experiment with the prompt templates, but should be a fun project.

Anyone up to it, or already on it?
< >
Showing 1-4 of 4 comments
Bredroll 71 2 Sep, 2024 @ 3:40pm 
This would be quite fun :D there could theoretically be a way to do this, but it's going to be somewhat hacky. It is possible to _kind of_ get a modded lua screen script to read/write data outside of the game, but it requires an extra app to act as launcher to feed the data in and read what comes out, so would be a challenge similar to my tacview mod
naegthul 4 Sep, 2024 @ 4:01am 
Originally posted by Bredroll:
This would be quite fun :D there could theoretically be a way to do this, but it's going to be somewhat hacky. It is possible to _kind of_ get a modded lua screen script to read/write data outside of the game, but it requires an extra app to act as launcher to feed the data in and read what comes out, so would be a challenge similar to my tacview mod

I suppose running extra apps/scripts beside the game would be needed anyway for monitoring game data, running tts and stt apps and making the API calls to get an LLM response.

So you are saying the 'game data API' would just be text files written by lua script that a separate script could read continously? Thats cool, after creating this thread I was afraid that there may not be a way to export data outside of monitoring memory. I think Mantella AI may even to the same - at least it creates a bunch of text files with the details from the game and current conversation, and it runs a separate app that handles the prompting.
Last edited by naegthul; 4 Sep, 2024 @ 4:20am
naegthul 4 Sep, 2024 @ 4:35am 
I would start by exporting some game information and converting it to natural language as best I can so the LLM does not have to perform any calculations. E.g. instead of putting island coordinates into a prompt, I would do some calculations in script that result in strings like "[Island Name] is about 1 km east of current location".

Get the important data out in this fashion, like island location, ownership, inventory, as well as current time, ship status (damage, inventory, vehicles), weather info on current location (if possible enrich island data with weather on island), closest enemy contacts, etc. and a way to send a message (via in-game chat at first, if possible?) and display the response.

Then it's a lot of experimentation for building good prompts with that info and make the AI understand what it's supposed to do.

LLM would just be there to summarize the info with regards to user input in a way that sounds like a ship AI.

Then go from easy to more complicated:
1. User triggers response with message (This alone would be fun already, but in addition see below)
2. Script monitors exported game data and can trigger messages upon certain events
3. Instruct the LLM to use some keywords when an sction should be taken, interpret the response and trigger stuff in game
Last edited by naegthul; 4 Sep, 2024 @ 4:41am
Bredroll 71 25 Sep, 2024 @ 11:57am 
Using natural language processing will just make what you really want to do harder. Fairly simple speech recognition could drive some actions for you with a bit of work.
< >
Showing 1-4 of 4 comments
Per page: 1530 50