pixi-vn-history

Implements go-back navigation and dialogue backlog UIs using the Pixi'VN stepHistory API.

145|9|Updated Feb 14, 2024
One-click install
npx skills add https://github.com/DRincs-Productions/pixi-vn --skill pixi-vn-history-drincs-productions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pixi-vn-history
Source: https://github.com/DRincs-Productions/pixi-vn/tree/main/skills/history
Command: npx skills add https://github.com/DRincs-Productions/pixi-vn --skill pixi-vn-history-drincs-productions

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @drincs/pixi-vn.

What problem does it solve? Players of narrative games expect to rewind dialogue and review a history log, but wiring Pixi'VN's stepHistory module correctly — including goBackMode behavior, save/load limits, and backlog rendering — requires knowledge not fully covered in the public docs. ## Core Features & Use Cases - Go-Back / Rewind: Trigger stepHistory.back(props) from buttons or gestures, guard it with canGoBack, and choose between "step" and "paragraph" goBackMode granularity. - Backlog / History Log UI: Read narrativeHistory, currentLabelHistory, or currentPageParagraphs to render a scrollback panel with speaker, text, choices, and player input. - Save/Load Tuning: Control how many steps remain go-back-able after loading a save via stepLimitSaved, and permanently block rewinding after irreversible choices with blockGoBack(). - Use Case: Add a "back" button and a searchable history panel to a React visual novel scaffolded with npm create pixi-vn@latest, following the official template's React Query patterns. ## Quick Start Ask the AI to add a go-back button and a dialogue backlog panel to your Pixi'VN game using the stepHistory API.

Frequently Asked Questions about pixi-vn-history

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a go-back button to a Pixi'VN game?

Call `await stepHistory.back(props)` from your button's click handler, passing the StepLabelProps object used by your step functions. Use `stepHistory.canGoBack` to enable or disable the button, and pass `{ steps: n }` to go back multiple steps at once.

How do I build a dialogue history or backlog panel in Pixi'VN?

Read `stepHistory.narrativeHistory`, which returns NarrationHistory entries containing dialogue, choices, playerMadeChoice, and inputValue for each recorded step. Map these into rows with speaker name and text, optionally filtering by a search string.

What is the difference between step and paragraph goBackMode in Pixi'VN?

In `"step"` mode (default) every step can be undone individually. In `"paragraph"` mode, back() jumps to the start of the previous paragraph, replaying everything since the last call, jump, choice, or input boundary.

Does going back in Pixi'VN work after loading a save file?

Yes, but only up to `stepHistory.stepLimitSaved` steps (default 20), since older steps are dropped from exported save data. Set stepLimitSaved to Infinity to keep the entire history go-back-able after loading.

Can I redo after going back in Pixi'VN?

No. Going back to an earlier step discards every step recorded after that point, so there is nothing to redo. Also note that `stepHistory.get(stepIndex)` may return undefined for bookkeeping-only steps with no displayable content.