Repository navigation
alpha-testing-00019
Pre-release
Pre-release
Changelog
New Features:
- Hierarchical Memory Architecture: Transitioned from a flat event list to a 3-tier system:
- Long-Term Memory: Persistent, narrative summary of everything a character has done in the game so far (up to 5000 characters).
- Mid-Term Memory: "Compressed" synthetic events that summarize batches of recent actions, working as a ”mid-term memory” bridge between long-term memory and current events. Max 900 characters.
- Short-Term Memory: A list of the up to 12 most recent raw events (since last compression), kept verbatim for immediate context.
- Concurrency Locking: Memory maintainance is concurrency-locked to ensure multiple rapid-fire events don’t corrupt the narrative
- Decoupled Dialogue Generation from Memory Maintenance: Dialogue is now requested immediately while Memory Compression runs silently in the background. NOTE: This means you need to be able to utilize concurrent calls. If you use iflow as your free model provider, this probably means you need multiple accounts. I have tested using iflow/deepseek-v3.2 for both dialogue and non-dialogue simultaneuosly using 4 accounts, and that seems to be enough (at least during short testing sessions). YMMV.
- Memory migration:
- Existing saves are automatically converted into the new hierarchical memory system. First time requesting dialogue from an NPC will trigger a ”bootstrapping” event using ALL that character’s previously witnessed events and creating a Long-Term Memory out of them. This can take some time. Using iflow/deepseek-v3.2 on my test save, bootstrapping took 10-12 seconds to complete. If you have a really long save already and/or use a slow model for non-dialogue it can take even longer. This is a one-time thing (per-character) required to migrate the old event system into the new memory system.
- ”Time Gap” feature:
- Synthetic ”time gap” events are injected in between events in the event list that have had more than 12h passed between them, to help the AI establish a timeline.
- New dialogue trigger: Task Completion
- 100% chance to trigger when completing a task given by a unique character, 10% chance to trigger when given by a random NPC. Event text includes your companions if any and includes the name of the task. Only fires if there are nearby witnesses at the time of completion. 15 second cooldown to prevent spam when turning in batches of tasks all at once. Doesn't seem to work with some tasks added by mods but should fail silently in those cases.
Prompt Refinements
- Static prompt in config.lua completely rewritten: Prompt has been streamlined and improved for clarity and parseability. New features like Time Gaps and Long-Term Memory has been incorporated into the prompt, hopefully helping the LLMs establish continuity over longer periods of time. Geographical information about the north-south danger axis and general basic Zone geography is included in the prompt. New instruction to avoid talking about your equipped weapon unless asked.
- Dynamic prompt in prompt_builder.lua completely rewritten and restructured: Character information like rank, faction description, backstory and current weapon moved to an earlier position in the prompt (now injected BEFORE memories/events) to prevent them being weighted too heavily and brought up too often in dialogue. Now only companion status and speaker personality is inserted at the very end, hopefully reducing the impact of ”shiny object phenomenon” of the weapon being mentioned right at the end and thus brought up all the time by the AI.
- Implemented a clearer use of system/user messages in the JSON for headers/content to help with LLM parsing, attention and weighting.
Bug Fixes
- Fixed several bugs related to Speaker Selection:
- Refined and improved prompt wording for the speaker selection function, including strictly enforced JSON Output for pick_speaker to prevent model confusion, hopefully leading to no more malformed pick_speaker responses
- Implemented logic in proxy.lua to disable the 'thinking' parameter for short requests (<100 tokens), preventing backend crashes on simple tasks for certain LLMs.
- Engine-First Data Retrieval: Changed character lookup to prioritize the Game Engine over Local Event Data. This should fix "no character found" errors and issues where backstory or experience were nil because the system was reading a lightweight "witness" object instead of the full character entity.
- Fix: Nil Value Crashes:
- Added automatic "Hydration" in prompt_builder.lua: If backstory or personality are missing from a character object, they are now fetched on-demand from the repo.
- Added tostring() safeguards in factions.lua to prevent crashes when logging unknown factions
- Added fallback strings (e.g., "person") for missing faction descriptions to prevent broken prompt grammar ("is a ." -> "is a person.").
- Added ”unknown” fallback to faction data in game_adapter.lua fixing a rare error with factionless NPCs (most commonly seen in the Rostok Arena)
- Fixed callout spam in mixed faction groups:
- Added safety check in callout script that aborts early if a companion is about to callout an NPC that isn’t an enemy of the player. Can happen in groups with mixed factions.