Visual Novel settings
A cross-platform configuration system for visual novels, featuring cascading overrides and real-time state management.
Overrides
This library provides various settings to simulate visual novels in Rust applications. It includes settings for colors, timing, images, objects, layout, and names.
Each parameter can have a default value and you can add temporary overrides to these values, which will only be active during a single continuous dialog.
Most parameters can also have a character specific values, which are only set when a character speaks. These character specific parameters can also have temporary overrides.
The priorities of the values is like this:
- Scene value (
scene) - Character specific scene value (
characters_scene) - Aspect value (
aspect) - Character specific aspect value (
characters_aspect) - Character specific default value (
characters_default) - Default value (
default)
Aspects are story-driven overrides (e.g. a "Mood" aspect with values like "Happy" or "Sad") that globally affect visual settings based on the current state of the story.
This should make managing state for visual novels easy.
Features
🎨 Cascading Settings
Address any setting by its configuration key, globally or per character:
let mut settings = common;
let mut context = new;
settings.apply_setting;
settings.apply_setting;
assert_eq!;
assert_eq!;
🔄 State Management
Apply scene-level changes while a dialog runs, then drop them again:
let setter = create_setter
.expect;
settings.change;
settings.reset;
Unparsable values are reported and skipped rather than panicking, so a malformed configuration degrades instead of taking the application down.
🛠️ Editor Support
Parameter::names() lists every statically known key for completion, and two
read-only checks answer different questions about a key while the user types:
assert!;
assert!;
assert!;
assert!;
lookup asks whether a key resolves against a loaded configuration, accepts
only whether it is well-formed — useful for a document with no configuration
beside it, where every object name is undeclared but the document is correct.
Parameter::create keeps declaring unknown object, anchor and custom parameter
names, which is what loading a configuration needs.
Core Types
| Type | Description |
|---|---|
PlayerSettings |
Root container for all configuration |
Override<T> |
6-level hierarchical value management |
Parameter |
Addressable setting path |
Setter |
Setting path paired with a value |
Change |
Mutation operation for scene-level overrides |
Documentation
Developed with ❤️ for visual novel creators