Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Hey maestro, this is awesome! I'm super interested in the design of the breakthrough system and of the sqlite memory retrieval, as I wanted to add features like this myself. Could you explain how it works?

(+1)

SQLite memory: Basically, it gives the AI a searchable notebook for each playthrough. It takes saved scene summaries and important story facts, indexes them in a local SQLite database, and pulls relevant information into the prompt before generating a response.

It prioritizes recent interactions with the characters in the scene, plus older events matching keywords. The added context is capped at 18,000 characters so it doesn’t keep dumping the entire history into every request. Facts also track who knows what and whether something actually happened or was just a character’s claim.

The save is still the source of truth; SQLite is the lookup tool. Selected memories go to their AI provider with the normal prompt. It helps continuity, but doesn’t guarantee perfect recall.

Breakthrough: It’s a separate 0–100 meter for each character, built from the game’s interaction ratings: liked +10, loved +20, hated −15, and disliked unchanged. Positive gains cap at +20 per character per time slot.

At 100, the player can spend it during a scene reply and describe what they’re trying to accomplish. The meter resets to zero, and the next AI request gets a strong instruction to favor that direction if it makes sense.

Think “a really good roll with the AI as the DM.” There’s no fixed success percentage or forced relationship change. Personality, boundaries, and circumstances still matter; if the exact request can’t work, the prompt asks for meaningful progress instead.

It also saves what actually happened—not just what the player requested and feeds relevant outcomes into later scenes to help characters remember the moment. Failed or interrupted activations have refund handling.

Created a github with the changes: https://github.com/maestromods/maestros-community-mods 
Hope these inspire you! Obviously, feel free to use what you like from the code!