LogoPixi’VN

History

Describes how Pixi'VN tracks and manages narrative history, including dialogue, choices, step counters, and save limits.

UI screen

You can find an example of the history UI screen in the interface examples section.

Pixi’VN saves all dialogues, choices, responses, and every opened label and step during the game.

Ottieni

The narration timeline is a list of all dialogues and choices shown to the player.
To get the narrative history, use stepHistory.narrativeHistory. It returns a list of NarrativeHistory<T>[].

const dialogues: NarrativeHistory[] = stepHistory.narrativeHistory;

Rimuovi

To delete all narrative history, use stepHistory.removeNarrativeHistory().

stepHistory.removeNarrativeHistory();

To delete part of the narrative history, pass a number to remove the first N elements:

// Delete the first 2 elements
stepHistory.removeNarrativeHistory(2);

Step save limit

At each step, all information about the current game state is saved.

To prevent the save file from growing too large, there is a limit on the number of steps saved. By default, only the last 20 steps are saved, but you can increase this limit (e.g., to 100). When the limit is reached, only essential information from older steps is kept. This allows you to display the full narrative history, but you cannot return to a specific step beyond the limit.

You can change the step save limit by setting the stepLimitSaved property in the stepHistory object.

import { stepHistory } from '@drincs/pixi-vn'

stepHistory.stepLimitSaved = 100

To disable the step save limit, set stepLimitSaved to Infinity.

import { stepHistory } from '@drincs/pixi-vn'

stepHistory.stepLimitSaved = Infinity