pixi-vn-characters

Define, register, and reference visual novel characters 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-characters-drincs-productions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pixi-vn-characters
Source: https://github.com/DRincs-Productions/pixi-vn/tree/main/skills/characters
Command: npx skills add https://github.com/DRincs-Productions/pixi-vn --skill pixi-vn-characters-drincs-productions

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @drincs/pixi-vn.

What problem does it solve? Creating characters in a Pixi'VN game requires more than instantiating a class: characters must be registered in a central registry to be resolvable by id in dialogue, their stored fields must persist across save/load, and emotion variants need correct storage-key handling. This Skill provides the exact patterns for all of these steps so character code works correctly with the engine. ## Core Features & Use Cases - Character Definition: Create characters with CharacterBaseModel using id, name, surname, age, icon, and color, including custom classes extending CharacterStoredClass with TypeScript interface augmentation. - Registry Management: Register characters with RegisteredCharacters.add and look them up via get, has, values, and keys, following the official React template's module-scope convention. - Emotion Variants & Dialogue Binding: Define per-emotion character variants with shared storage fallback and attach characters to narration.dialogue lines by instance or typed string id. - Use Case: You are scaffolding a visual novel and need a content/characters.ts file where each character is defined once, registered at startup, and safely referenced from every dialogue label. ## Quick Start Use the pixi-vn-characters skill to define two characters with names and colors, register them with RegisteredCharacters, and use one in a narration dialogue line.

Frequently Asked Questions about pixi-vn-characters

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

FAQPage Schema
How do I create a character in Pixi'VN?

Create a character by instantiating CharacterBaseModel with a unique string id and a props object containing name, surname, age, icon, and color. Then register it with RegisteredCharacters.add so the engine can resolve it by id in dialogue.

How do I add custom fields to a Pixi'VN character?

Extend CharacterStoredClass and implement CharacterInterface, backing persistent fields with getStorageProperty and setStorageProperty getters and setters. Augment CharacterInterface via declare module in a pixi-vn.d.ts file so the richer type is visible project-wide.

Why is my Pixi'VN character not found in dialogue after save/load?

The character was likely never passed to RegisteredCharacters.add, so it cannot be resolved by id. Ensure the registration call runs at module load time before any dialogue lookup, typically by importing character files at app startup.

Should I pass a character instance or string id to narration.dialogue?

Without generated typed ids, prefer the instance form since the compiler checks the variable reference. With the Vite plugin's typeFilePath generating a CharacterIdType union, prefer the string id form, which gains the same typo safety without extra imports.

How do character emotions work in Pixi'VN?

Pass an object with id and emotion as the constructor's first argument to create an emotion variant. It stores overrides under a separate id@emotion storage key while falling back to the base character's values for fields it does not override.