RimWorld

RimWorld

41 betyg
OpenRimWorldAI
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Mod, 1.5
Filstorlek
Lades upp
Uppdaterades
456.329 KB
21 jan @ 9:20
15 feb @ 21:07
15 ändringsnotiser ( visa )

Abonnera för att ladda ner
OpenRimWorldAI

Beskrivning
Dear Developers:
packageId = OpenRimWorldAI.Base
Use 'await OpenRimWorldAI.AI.SendPromptAsync(prompt,[rules,identity,instructions,showAlert:True])' to send prompts. Outputs will be returned as string and create an alert. (showAlert is False by default)
Character Limitation: 128,000 characters max (About 32,000 Tokens)
public static async Task<string> SendPromptAsync(string prompt, string promptRules = "Do not repeat sentences. Don't explain yourself. Never break character. ", string identity = "", string promptInstruction = "Include your name in a subject/header. Respond to the following and wrap your subject/header in tildes(~): ") //You can use these for data dumps: string itemList = AI_Information.GetStorageItems(); string completedResearchList = AI_Information.GetCompletedResearch(); string allpawnStatsList = AI_Information.GetAllPawnStats(); string pawnStatsList = AI_Information.GetPawnStats(pawn); string colony = AI_Information.GetColonyInfo();
OpenRimWorldAI.AskAPawn
was created to provide a simple example: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3412825218

OpenRimWorldAI

What is it?
Ursprungligen skrivet av Developer:
OpenRimWorldAI is a RimWorld mod that adds AI using OpenRouter's API. OpenRouter offers both free & paid services.
What does it add to the game?
Ursprungligen skrivet av Developer:
OpenRimWorldAI will act as my base for future AI work. With base, you will get a daily report from one of your pawns regarding the status of your colony.
Things you can do:
  • Receive Daily Reports from a random Pawn
  • Pre-loaded with Free API keys (Recommend getting your own due to quotas)
  • Chose your own model!
Any Setup Required?
Ursprungligen skrivet av Developer:
No, it'll work out of the box. I do recommend applying your own API Key. Each key has a 200 request per day limit. Optionally with your own key, you can can add funds to use paid models.
What's the recommended LLM/Model?
Ursprungligen skrivet av Developer:
Everything has been tested to work with "google/gemini-2.0-flash-exp:free" with "OpenRouter". Gemini already has context that relates to RimWorld which greatly compliments this mod.

OpenRouter (Recommended) vs Ollama (Not Recommended)
Ursprungligen skrivet av Developer:
OpenRouter offers API services to some of the best LLMs out there. They offer both free & paid services. This mod has been tested to work with OpenRouter using the "gemini-2.0-flash-exp:free" model. It requires no additional hardware constraints to the user. It also accepts up to 128,000 characters.

Ollama is a locally ran server. For top models, it requires some serious hardware and due to my own hardware constraints testing has been limited. In testing I've tried a few models:
Deepseek yielding poor results
LLama3.3 requires more memory than I can afford
LLama3.2 3b was similiar to Deepseek in the sense that neither were trained with RimWorld knowledge.
Updates
v.1.1: Updates to support "AskAPawn" Updates: - Mirrored "FindPawnByName()" from Overlord to "AI_Information" to support "AskAPawn" - Added new parameters, "includePawnDetails" & "internalThoughts", for SendPromptAsync(): includePawnDetails: Attempts to find pawn based name in header/subject if possible and includes additional details. internalThoughts: If true, looks for a semi-colon and parses that part of the response as internal thoughts. public static async Task<string> SendPromptAsync( string prompt, string promptRules = "useDefaultDef", string identity = "useDefaultDef", string promptInstruction = "useDefaultDef", bool showAlert=false, LetterDef letterType = null, bool includePawnDetails=false, bool internalThoughts=false ) v.1.0: - Added Ollama as an option for AI. I do not recommend it especially if your computer can not process large amounts of data. For Daily Reports the character length is usually around 4000 characters. - Added a new setting "RimWorld Background" which will front-load "What RimWorld Is" to the AI. Adds ~1200 characters. (This is useful for models that do not have RimWorld as part of their training data) - RimWorld_Background can also be modified in the Defs. (Historical updates move to "Change Notes")
60 kommentarer
Darksy Lin 12 aug @ 22:53 
The best mod ever. Please update it for 1.6, it's a really cool mod.
Rage 21 jun @ 23:17 
request you make a api adaption for anthropic itself. claude systems would do wonders and i refuse to constantly pay for shoddymiddlemen everytime its ai related. at the current moment anthropic is the only dev of a good ai system.
Krypt 23 maj @ 20:53 
I can't restrain myself from making this absolutely unconstructiove comment:
> OpenRouter (Recommended) vs Ollama (Not Recommended)

Aaand this line is the reason I will not use this mod, but rather implement my own.
GrimStrider 15 apr @ 0:27 
The ai seems to be very confused about what gender my pawns are XD
SenjuWoo 10 mar @ 14:23 
All good
LoneLemone  [skapare] 10 mar @ 14:17 
I don't really have the time right now. Between vacation and business travel I'm a little too busy right now.
Bleeding Eyes Mcgee 8 mar @ 13:33 
It seems to have been removed, but a while ago the description mentioned plans for another addon that deals with moods, relationships and conversations. Is there still a chance that it might come out eventually, or was it fully cancelled?
SenjuWoo 18 feb @ 21:06 
Ir would be nice if you made an other expantion where the ai could generate names for pawns and stuff knowing their names and all their info from the game and well seed names, world names, tribe names ect...
LoneLemone  [skapare] 15 feb @ 18:21 
Hey everyone,

The base mod here functions pretty well. I've been putting a lot of work into the "Overlord" expansion and being entertained with how chaotic the AI is. See: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3420778796

With the base mod performing well with OpenRouter, I'm considering adding a few additional API Sources:
- Google (Gemini)
- OpenAI (GPT)
- Microsoft (Copilot)

Not sure if OpenAI/Microsoft offer a dev key with free usage, but I know Google does for Gemini.

OpenRouter will still remain the default due it's capability of supporting a broad range of models and easy pay-model for those that choose to use it.
2922608187 12 feb @ 11:35 
thanks,got it