When finishing a quest changes what the player can do next, the game has to honor that ending even if a character has more to say. In Retrieval-Augmented Local Llama 3.2 for Dynamic Quest Generation and Consistent NPC Personalities in Role-Playing Games (2026), Benaya Friyandi Siahaan and Hanny Haryanto found that their local language model kept the story going after the test quest had reached its ending, sometimes reviving defeated enemies. The engine should decide when a thread is over if closure commits the player’s choice, grants a reward, or changes which actions are available. The model can still write the farewell, because the game can settle what happened before asking a character to respond.

What continued after the quest ended

The authors tested whether a local model could generate quests and stay in character when the system supplied relevant game lore. They used retrieval-augmented generation, which looks up material such as character backgrounds and quest details and adds it to the model’s prompt. They ran each of three retrieval configurations twice in a simulated role-playing game. In the reported ending, the main antagonist had been defeated and peace restored. The authors treated those events as evidence that the story had reached its conclusion, but the system had no engine trigger that used those events to stop generation.

The run records show why ending a quest and stopping a response are separate decisions. The authors write, “Because the model simply continued generating text until it hit a hard token and computational limit, the system had to forcefully terminate the process.” The run metadata marked all three second runs as stopped midway, although the authors judged the quest complete in each. The limit could tell the system when to stop spending resources on the output. It could not tell the game whether the player had finished the quest.

A quick reply was also a poor guide to whether the system would finish the quest promptly. The second run of the byte-pair encoding configuration had the fastest average reply in the benchmark, at 23.53 seconds, yet it took 220.59 seconds to process the quest narrative, up from 152.01 seconds in that configuration’s first run. The authors attributed the longer run to narrative loops and proposed a trigger that would let the engine stop quest generation when specified objectives were met. For a team diagnosing a similar problem, the distinction matters: timing individual replies won’t show how much generation happened after the last consequential action.

Applying this to your game

A quest’s stopping rule should follow the action the player expects the game to honor. In a hypothetical inquiry into a flooded market, a player first tells the clerk that a pump failed, then inspects the tide gate and changes their account. A designer can let the journal hold one editable draft, so the newer explanation replaces the earlier one as the account ready to file. The model can help the player put that explanation into words, but the player sees which version is current before filing it. That way, a confident statement in an earlier conversation does not become the answer the game carries forward.

Filing can close the inquiry without settling what caused the flood. The quest rule can check that the required inspections are recorded and that the player confirmed the report, then save the submitted account and mark the thread closed. If the evidence fits both explanations, the designer can let the player file an inconclusive report. A later council scene can then read what was filed and acknowledge that the cause remains unresolved. If the story needs the player to establish a cause, the designer can instead author a clue that distinguishes the two explanations, so the verdict follows from something the player could find.

Closing the thread changes what the dialogue system is allowed to ask the model to do. Once the engine saves the filed report, it can stop requesting investigative turns and allow a single closing line based on that report. If the line runs out of time, the game can show an authored acknowledgment and leave the filing intact. If the player returns to the clerk after reloading, the engine can offer a conversation about the aftermath because it reads the saved outcome. A retrieved fragment of the old pump discussion may still be useful background, but it cannot make the inquiry active again.

A three-step flow diagram shows an editable draft at the top, a middle step with a stamped document labeled as confirming and filing to close the quest, and a bottom step where a later character scene reads the filed report. Blue arrows connect the steps from top to bottom, with a green check mark beside the filing step.

View full-size figure

The council reads the account the player filed, so a theory they floated earlier cannot replace it. The case can close even when the filed report says the cause is unresolved.[1]

A team can keep the filing interaction small by looking for a commitment the interface already makes clear. If the journal already has a File Report action that displays the current account, that action and one authored acknowledgment may be all the scene needs. If players can file only through free conversation, the model can notice that a line sounds like a request to submit and show the account for confirmation. That extra step earns its place when the same words might mean either “this is my current theory” or “put this on record.” Where an existing action already makes the difference clear, another confirmation adds friction without resolving that ambiguity.

A playtest should check whether the engine closes the right thread at the right moment. A team can compare the existing dialogue flow with a version that gates generation on quest state, then watch what happens when players revise a draft, leave without filing, and return after filing and reloading. The team can log investigative turns after closure and cases where the quest closes while the player still means to investigate. Asking players which account the council will receive can show whether they understood what they committed to. Fewer stray turns would help, but if players lose their chance to ask an expected follow-up, the team may need to keep that topic available as aftermath rather than reopen the inquiry.

The design transfers where the game can name a condition it can actually check. Siahaan and Haryanto observed the failure in a simulated scenario with a local Llama 3.2 setup and two runs per retrieval configuration. They did not test the engine controller they proposed, so their timings do not tell a team how much time its own gate would save. For an improvised conversation that promises no lasting change, a clear way for the player to end the exchange may be enough. The engine can stop requesting turns without declaring that the characters settled the matter.

Sources

  1. Retrieval-Augmented Local Llama 3.2 for Dynamic Quest Generation and Consistent NPC Personalities in Role-Playing Games

    paper · Benaya Friyandi Siahaan, H. Haryanto, 2026; full text read via PDF text on 2026-12-05 · Source accessed: