When you let three pawns chat together, a single dialogue request results in token consumption skyrocketing to 10,000 or 20,000? When you look closely, you find that the dialogue history takes up the lion's share.
Not only does it hurt your wallet, but due to the excessively long dialogue history, the quality of the pawns' speech drops, and there's even slight logical confusion.
Core Logic:
This mod compresses long historical dialogue records into concise event summaries and injects them into your prompts using a reasonable filtering method. This reduces token consumption while maintaining memory continuity.
Features:
Automatic Recording: Similar to RimTalk - Expand Memory, it fully records dialogue characters, time, location, and content.
Intelligent Compression: Automatically sends past dialogues to an AI for summarization (it is recommended to use free/cheap models).
Layered Injection: Dynamically filters records based on the current participating characters. Recent dialogues remain as detailed text, while older dialogues provide only summaries.
Efficient Sorting: Even if AI summarization is not enabled, the mod will automatically organize the dialogue logic, rearrange it by timeline, and output it using a unified template to optimize the AI's understanding of the history section.
Manual Management: There is a window button for this mod in the bottom right corner of the game interface. Once opened, you can view all current records and manually modify or delete them.
How to Use:
Configure API: You need to configure the API used for summarization in the settings. Free or cheap models are recommended; for example, player2's gpt-oss-120b or ds v4 flash.
Modify Prompt:
If you are a beginner, please enable RimTalk's advanced prompt mode, replace {{chat.history}} in the Chat History entry with {{memory_chain}}, and add: #Dialogue History at the beginning.
If you are an experienced user, you can place it anywhere you find appropriate. This mod only adds this single variable. You can check what content it injects after using it for a while (personal suggestion: use it to replace your original variable for dialogue context).
You can also adjust various parameters regarding dialogue filtering in the mod settings.
FAQ:
Q: Doesn't summarization also cost tokens?
A: You can configure a cheap or even free model specifically for summarization. At a negligible cost, you can save 30%–50% of the context cost for your main RimTalk model.
Q: Is it compatible with the RimTalk - Expand Memory mod?
A: No conflict. It is possible and recommended to install both. The two mods have different focuses; this mod focuses on the compression and sorting of real-time dialogue history. It is recommended to replace its {{pawn.ABM}} with this mod's {{memory_chain}}.
Q: Why was this mod created?
A: As mentioned at the beginning, I set the ABM output to 3 rounds in "Expand Memory" and ended up with about 3,500 tokens per person just for the dialogue memory part. Especially when using ds v4 pro, I consumed 20,000 tokens only to get a single-sentence reply... so this mod was born.
Other:
This mod was created with the assistance of AI and is my first time using Claude Code.
This mod has not been fully tested; there may be potential conflicts or other issues.
Update Log
(7.4): During finals week, I ouldn't help tinkering and finished this. The variable {{memory_chain}} has been enhanced to recognize prefixed content, such as {{pawn.memory_chain}}. For specific setup instructions, please refer to the discussion thread.
(6.1): Happy Children's Day! Module settings now support: toggle recording/sending of conversation location, custom summary truncation length; logs now auto-delete (keeps last 140 entries).
(5.22): Added API testing feature.
(5.21): Fixed the issue where the AI summary feature was not working; Added custom prompt feature.
Welcome to provide feedback or suggestions. If you find any bugs, please let me know, and I will do my best to fix them.
(AI-translated. Please forgive any mistakes.)
Check change notes. Vanilla Furniture Expanded - Security is a complete overhaul and rebalance of the original security module, addressing outdated balance and vastly expanding defensive options from early to late game. For the new players, this mod should be the ultimate thing y
Adds new list boxes for recipe bills, health bills, plant selection, architect menu, research menu, and a quick select menu for designators, making it easier to find things when lots of mods are running.