pixi-vn-storage

Manages persistent game variables, flags, and stored classes in Pixi'VN games.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @drincs/pixi-vn.

What problem does it solve? Game state like flags, counters, and custom objects must survive save/load and history go-back in a Pixi'VN game, and using the wrong storage API or reserved keys can silently break persistence. ## Core Features & Use Cases - Simple Variables and Flags: Read and write persistent values with storage.set/storage.get, and use the dedicated storage.flags store for booleans to keep save files small. - Custom Persisted Classes: Extend StoredClassModel with a category ID and per-instance ID so rich objects like quest trackers survive save/load with per-property overrides. - Temporary Label-Scoped Variables: Use storage.temp for scratch state that automatically resets when the originating label closes. - Use Case: Track whether the player has met a character by setting a flag, then store a quest model whose completed property persists across saves and history rewind. ## Quick Start Ask the AI to add a persistent gold counter and a quest-tracking StoredClassModel to your Pixi'VN game using the storage API.

Frequently Asked Questions about pixi-vn-storage

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

FAQPage Schema
How do I save game variables in Pixi'VN?

Use the storage singleton: call storage.set(key, value) to write and storage.get(key) to read. Values can be strings, numbers, booleans, null, plain objects, or arrays, and everything set through storage is automatically included in save/load and history snapshots.

How do I persist a custom class in Pixi'VN?

Extend StoredClassModel with a categoryId and instance id, then expose properties through getStorageProperty and setStorageProperty. Constructor arguments become in-memory defaults, while setStorageProperty writes overrides into storage that survive save/load.

Should I use storage.set or storage.flags for booleans in Pixi'VN?

Use storage.flags.set/get for booleans. Flags are stored internally as a single array of active names, which serializes much smaller than one storage entry per boolean, and unset flags default to false.

What is the difference between storage.temp and storage.set in Pixi'VN?

storage.temp variables are readable through storage.get but are deleted when the label that set them closes, including on jump. Use storage.set for any state that must outlive the current label.

Which storage keys are reserved in Pixi'VN?

Keys listed in the SYSTEM_RESERVED_STORAGE_KEYS constant are off-limits, including dialogue, choice:options, input:value, character, and label:opened. Avoid the ___-fenced prefix style in your own keys to prevent collisions with engine bookkeeping.