Capsule VN Engine

Complete User Manual — Version 1.9.0

Part I: Foundation

1. Welcome to Capsule VN Engine

Capsule VN Engine is a complete visual novel creation environment that transforms your stories into playable, distributable games — all within a single, self-contained file.

1.1 Vision

We built Capsule for creators who want to focus on story, not syntax. Every feature exists to remove friction between your imagination and your audience. No installation. No dependencies. No server required. Write, preview, export, share.

The engine embraces a monolithic philosophy: your entire game — code, assets, and runtime — lives in one HTML file. This guarantees:

  • Zero deployment complexity: Double-click to play
  • Universal compatibility: Runs in any modern browser
  • Permanent preservation: No broken links, no deprecated platforms
  • True ownership: Your game, your file, forever

1.2 Philosophy

Accessible depth. Capsule offers two modes: Simple for immediate creation, Expert for granular control. Switch anytime without losing work.

Visual-first design. What you configure is what you see. Real-time preview, instant feedback.

Narrative integrity. The engine protects your story from technical failure: health checks catch errors before they reach players, rollback systems preserve testing states, and validation ensures your logic holds together.

1.3 Who is Capsule for?

Profile What Capsule offers you
Beginner Writer Simple Mode, guided creation, no code required
Experienced Author Variables, conditions, complex narrative branches
Game Designer Inventory, QTE, hotspots, progression systems
Educator Instant export, easy sharing, cross-platform
Archivist Enduring format, autonomous, no external dependencies

Part II: The Basics

2.1 Your First Project

When you open Capsule, you see three columns:

Zone Function
Scenes (left) List of all scenes in your story
Editor (center) Configuration of the selected scene
Preview (right) Real-time rendering of your game

Creating an initial scene

  • Click ➕ New Scene in the left panel
  • Choose Narrative scene (for dialogue and atmosphere)
  • The scene appears in your list, ready to configure
Important Note: Capsule automatically creates a start scene. This is where every player begins. You can rename it, but never delete it without creating another entry point.

2.2 Interface and Modes

Simple Mode vs Expert Mode

Mode Display Ideal for
Simple Essential fields only First steps, narrative focus
Expert All features Complex logic, advanced systems

Switch modes via the Simple / Expert toggle in the header. Your project remains intact; only the interface adapts.

The Tools (Drop-down menu)

Click ⚙️ TOOLS to access:

  • Variables — Track game state (score, flags, relationships)
  • Actors — Reusable characters with multiple expressions and sprite animations
  • UI Custom — Global visual styling
  • HUD — On-screen variable display
  • Inventory — Collectible and usable items
  • Events — Global conditional triggers
  • CG Gallery — Unlockable images and videos
  • Timeline — Visual story map
  • Global Search — Instant cross-project search (Ctrl+Shift+F)
  • Stats — Project health and size monitoring
  • DSL Script — Import a CapsuleScript (.cvl) file directly into your project

2.3 Fundamental Concepts

The Scene, unit of narration

A scene in Capsule is a self-contained narrative moment. It can:

  • Display dialogue with characters
  • Show a background image
  • Play music and sound effects
  • Present choices to the player
  • Execute logic (variables, conditions)
  • Transition automatically to another scene

The Reading Flow

[start] → [scene A] → [scene B] → [choice 1] → [scene C]
                              ↘ [choice 2] → [scene D]

Capsule follows connections you define. No connection = the story pauses (intentional for endings, problematic elsewhere).

Variables: your story's memory

Variables store information across scenes:

Type Usage Example
Number Quantities, scores, counters affection = 45
Text Names, codes, player input playerName = "Alex"
Boolean True/False flags hasKey = true

Access a variable in dialogue with {variableName}.

Concrete Example

In a romance scene, display the player's chosen name:

"Good morning, {playerName}. Did you sleep well?"

If playerName contains "Jordan", the player sees: "Good morning, Jordan. Did you sleep well?"

Part III: Creating a Story

3.1 Scenes

Scene Types

Type Description Typical Usage
Narrative Dialogue, characters, atmosphere Conversation scenes, description
Choice Presentation of multiple choices Narrative decisions, branching
Logic Invisible execution, immediate redirect Calculations, conditional routing, hubs

Configuring a Narrative Scene

Visual & Sound section:

  • Background: Image or video (16:9 recommended, 1920×1080 optimal)
  • Transition: Animation between this scene and the previous
  • Effect: Atmospheric overlay (rain, snow, particles, etc.)
  • Overlay: Additional visual layer (screen effects)
  • Music: Background track (loops automatically)
  • SFX: One-shot sound effect on scene entry
  • Filter: Color grading preset

Dialogue Appearance:

  • Font: Typography family
  • Box Shape: Geometry of dialogue containers
  • Colors: Border, background, and text for both dialogue and name boxes

Best Practices: transitions

Match transition style to narrative rhythm:

  • cut — Abrupt changes, action, tension
  • fade_black — Time passing, chapter breaks
  • slide_left/right — Spatial movement, scene shifting
  • iris_in/out — Dramatic reveals, dream sequences

Logic Scenes (Expert)

A Logic Scene has no visual presence. It executes instantly:

  • Check ⚡ LOGIC SCENE in the scene options bar
  • The scene disappears from visual preview
  • Configure Actions to modify variables
  • Set Auto Next Scene for immediate continuation

Example: simplified combat system

Scene combat_check (Logic):

  • Action: force = force + dice(1,6) (roll 1-6, add to strength)
  • Condition: if force >= 10, go to combat_win
  • Else, go to combat_lose

3.2 Dialogues

Structure of a dialogue line

Each dialogue block contains:

  • Speaker: Character name (optional — leave empty for narration)
  • Text: The spoken content, supporting formatting tags

Typewriter Effect

Dialogue text appears character by character, simulating live speech. The player controls the reading pace:

Action Effect
Click / Tap (while text animating) Instantly display the full line (skip typewriter)
Click / Tap (after full line displayed) Advance to next dialogue line or scene
Text Speed slider (Options) Player can adjust from Slow to Instant in the game's Options menu
Design Tip: The typewriter effect creates natural suspense. Write longer sentences for dramatic moments — the player has to wait through the animation, building tension before the key word appears. Short punchy lines with fast cuts feel urgent and action-oriented.

Text Formatting

Tag Effect Example
[b]text[/b] Bold [b]Run![/b] → Run!
[i]text[/i] Italic [i]whispers[/i] → whispers
[u]text[/u] Underline [u]important[/u]
[shake]text[/shake] Shaking text [shake]EARTHQUAKE[/shake]
[wave]text[/wave] Wavy text [wave]floating[/wave]
[rainbow]text[/rainbow] Animated rainbow colors [rainbow]celebration[/rainbow]
Combining Tags: Tags can be nested. [b][i]Very important[/i][/b] produces bold italic text. Mix sparingly — overuse diminishes impact.

Variables in dialogue

Insert {variableName} anywhere in text. Capsule replaces it with the current value.

Complete Narrative Example

Variable: gold = 150

Dialogue: "You have {gold} gold coins in your pouch."

Player sees: "You have 150 gold coins in your pouch."

Later, after gold = gold - 50:

Same dialogue displays: "You have 100 gold coins in your pouch."

Actor Syntax: {actor:id}

Reference an actor's display name dynamically:

Variable: heroName = "Alexandre"

Actor configuration:
- ID: hero
- Display name: {actor:hero} → resolves to "Alexandre"

Dialogue: "My name is {actor:hero}."
Player sees: "My name is Alexandre."

This decouples narrative reference from actual name, enabling player customization.

3.3 Narrative Flow

Automatic Navigation

Set Auto Next Scene (ID) to continue immediately after the last dialogue line. Ignored if choices exist.

Tip — Empty Scenes: A scene with no dialogue text and an Auto Next Scene acts as an instant redirect. Combined with a transition effect, it creates a seamless visual cut (e.g., scene_a → [hub_redirect with transition:fade_black] → scene_b) without the player ever noticing.

Navigation via Choices

Choices override auto-next. Each choice defines:

  • Text: Button label
  • Target: Destination scene
  • Optional: Conditions, actions, inventory operations

Backtrack (Previous)

The Previous button navigates backward through dialogue history, or to the previous scene if at the first line.

Attention Point: Previous does not undo variable changes or inventory modifications. It only affects navigation position.

Part IV: Choices and Consequences

4.1 Simple Choices

The foundation of branching narrative.

Configuration:

  • Click ➕ Choice in the Choices section
  • Enter Button text (what the player sees)
  • Select Target scene (where the choice leads)
Choice Ordering: Choices display vertically in the order you create them. Placement psychology matters — players' eyes travel top to bottom. Put the "safe" or expected option first, and the bold/risky option second. A surprising third option at the bottom rewards players who read carefully. You can drag choices to reorder them at any time.
Button Text Writing: Keep choice text under 60 characters. Use active verbs: "Attack the guard" not "Choose to fight." Avoid generic labels like "Yes / No" — replace with narrative-specific phrases: "I trust you." / "You're lying." The player should feel the weight of the decision in the words themselves.

Example: First Decision

Scene: tavern_arrival

  • Choice 1: "Order a drink" → tavern_drink
  • Choice 2: "Ask about the stranger" → tavern_inquiry
  • Choice 3: "Leave immediately" → tavern_leave

4.2 Conditional Choices

Choices can appear, disappear, or change based on game state.

Variable Conditions

Operator Meaning Example
= Equal to gold = 100
!= Not equal to metGuard != true
> Greater than strength > 5
< Less than fear < 3
>= Greater or equal level >= 3
<= Less or equal wounds <= 2

Locked Choice Styles

When a condition is false, choose how the choice appears:

Style Appearance Behavior
Locked 🔒 Grayed, padlock icon Not clickable, visible
Hidden Invisible Completely absent
Grayed Grayed without icon Not clickable, visible
Visible Normal Clickable (ignores condition)

Example: Narrative Locked Choice

Choice: "Unlock the gate" (requires hasKey = true)

If locked: Display 🔒 "Unlock the gate" with alternative text: "You need a key to open this."

Player understands why they cannot proceed, creating narrative tension.

Alternative Text

When locked, display different text to explain the barrier:

  • Normal text: "Enter the secret room"
  • Alternative (locked): "A heavy iron door blocks your way"

4.3 Invisible Choices

Set style to Hidden for choices that only appear when conditions are met. Creates emergent narrative paths:

Example: Secret Detection

Hidden choice: "Notice the hidden compartment" (requires perception >= 8)

Players with high perception see the option. Others never know it existed.

4.4 Choice Actions

Execute operations when a choice is selected:

Action Effect Syntax
Add to variable variable += value trust + 5
Subtract from variable variable -= value suspicion - 3
Set variable variable = value side = "rebels"
Add item Add to inventory potion + 1
Remove item Remove from inventory key - 1
Use item Consume consumable healing_herb (use)
Reset all Restore initial variable values Reset game state

Example: Narrative Consequence

Choice: "Defend the village"

  • Action: heroism + 10
  • Action: villageSaved = true
  • Target: village_aftermath

Later scenes check villageSaved to determine available NPCs and dialogue.

Part V: Advanced Logic

5.1 Typed Variables (Expert)

Capsule v1.6.3+ introduces explicit variable types for safer logic.

Type Icon Values Usage
Number 🔢 Integers or decimals Calculations, comparisons
Text 🔤 Strings Names, descriptions, codes
Boolean ✓✗ true / false Flags, binary states

Click the type icon to change. The engine validates operations:

  • Addition/subtraction only on Numbers
  • Boolean variables present true/false dropdowns
Best Practices: Declare all variables in the Variables Manager before use. The Health Check warns about undeclared variables, preventing runtime errors.

5.2 Triggers (Expert)

Triggers execute automatically when conditions are met at scene entry or exit.

Structure of a Trigger

WHEN: [Start of scene / End of scene]
IF: [variable] [operator] [value]
THEN: [Action 1, Action 2, ...]

Trigger Action Types

Action Parameters Effect
Go to Scene Scene ID Immediate redirect
Set Variable Variable, value, operation Modify variable
Play Sound Audio file One-shot sound effect
Roll Dice Min, Max, Target variable Random integer generation stored in a variable
Roll + Add Dice range, Source variable, Target Dice result + bonus variable (D&D style check)

The dice() Function

The dice(min, max) function generates a random integer between min and max (inclusive). It can be used in Set Variable actions to build any random system:

# Roll a standard 6-sided die
randomRoll = dice(1, 6)

# Roll a d20 (tabletop RPG standard)
d20result = dice(1, 20)

# Simulate a coin flip (0 or 1)
coinFlip = dice(0, 1)

# Random event 1-in-4 chance (equals 1 out of 4 values)
chanceRoll = dice(1, 4)
# Then: trigger IF chanceRoll = 1 → rare_event
Tip — Bounded Random: Use dice(1, max) rather than dice(0, max-1) when results represent outcomes — "rolled a 1" is a natural failure concept. For percentage chances, use dice(1, 100) — then a trigger IF result <= 30 represents a 30% probability event, which is intuitive to reason about.

Example: Security Trigger

Scene: throne_room

Trigger (Start):

  • IF: hasRoyalSeal != true
  • THEN: Go to throne_denied

Players without the seal are automatically redirected before seeing the throne room.

Evaluation Order

Triggers process top to bottom. The first Go to Scene action stops evaluation (short-circuit behavior).

Attention Point: Multiple triggers can fire in sequence if none redirect. Use this for compound effects: check health, then check inventory, then play ambient sound.

5.3 Logic Scenes

Invisible routing nodes for complex logic.

Use cases:

  • Hub scenes: Central decision point with multiple conditions
  • Variable normalization: Ensure consistent state before branching
  • Randomization: Dice rolls determining paths
  • Progression checks: Level requirements, item verification

Example: District Hub

Scene district_hub (Logic):

Condition Destination
district = "market" market_scene
district = "temple" temple_scene
district = "docks" docks_scene
(default) district_default

5.4 Inventory (v1.7.0)

Complete item management system.

Defining Items

Each item specifies:

  • ID: Code reference (lowercase, no spaces)
  • Display Name: Player-visible label
  • Icon: Emoji or single character
  • Description: Flavor text shown on inspection
  • Max Stack: Maximum quantity (1 for unique items)
  • Stackable: Whether multiples can be held
  • Consumable: Whether using removes the item

Inventory Operations

Operation Effect Failure Condition
Add Item Increase quantity Exceeds max stack (warning)
Remove Item Decrease quantity Insufficient quantity
Has Item Check possession
Count Item Get quantity Returns 0 if absent
Use Item Consume if consumable Not consumable, or absent

Inventory Conditions

Choices and hotspots can require items:

IF HAS: "ancient_key" (quantity: 1)
IF NOT HAS: "cursed_amulet"
IF COUNT: "gold_coin" >= 50

Example: Narrative Economy

Item: gold_coin (stackable: 99, icon: 🪙)

Choice: "Purchase the map" (requires 20 gold_coin)

On click: Remove 20 gold_coin

On click: Add treasure_map

The player sees their coin count decrease in real-time if HUD is enabled.

5.5 Interactions: Hotspots (v1.7.0)

Point-and-click exploration zones.

Visual Configuration

Property Description
Position (X, Y) Percentage coordinates (0-100)
Size (W, H) Percentage dimensions
Shape Rectangle or Circle
Cursor Pointer, Magnify, Talk, Hand, Eye, Door
Hover Effect Glow, Outline, Scale, Pulse

Hotspot Actions

Action Parameters
Go to Scene Target scene ID
Add Item Item ID, quantity
Remove Item Item ID, quantity
Use Item Item ID
Set Variable Variable, operation, value
Play SFX Sound file
Show Dialogue Speaker, text (popup)

Hotspot Conditions

Hotspots can be disabled based on:

  • Variable conditions: puzzleSolved = true
  • Inventory conditions: hasLantern = true

Example: Exploration Scene

Background: Ancient library

Hotspot Position Cursor Action
"Dusty tome" 25%, 40% Magnify Show dialogue: "The book is written in an unknown language."
"Hidden lever" 60%, 70% Hand IF perception >= 6: Go to secret_passage
"Locked chest" 80%, 55% Door IF HAS old_key: Add ancient_relic, Remove old_key

5.6 QTE: Quick Time Events (v1.8.0)

Timed decisions for tension and action sequences.

Configuration

Parameter Description Range
Duration Seconds to decide 1-60
Timeout Action Behavior on expiration Nothing / Auto-select / Go to scene
Auto-select Choice Which choice (1-indexed) 1-N
Timeout Scene Destination if "Go to scene" Scene ID

Visual feedback

  • Progress bar depletes horizontally
  • Last 30%: Bar turns red, pulses urgently
  • Timer text counts down in seconds

Example: Action Sequence

Scene: bridge_collapse

Choice Consequence
"Jump to the ledge" ledge_escape
"Grab the rope" rope_escape
"Freeze in panic" (no target, timeout consequence)
"Try to reason" bridge_fall

QTE: 5 seconds

Timeout action: Auto-select choice 3 (freeze, leading to bridge_fall)

5.7 Player Inputs: Text Input (v1.8.0)

Collect free-form text from players.

Configuration

Parameter Usage
Target Variable Where to store the input
Validation Text (any), Number only, or Code (exact match)
Title Modal header
Placeholder Hint text in empty field
Default Value Pre-filled content
Allow Cancel Whether player can dismiss without entering

Example: Protagonist Customization

Scene: character_creation

Text Input:

  • Target: heroName
  • Validation: Text
  • Title: "What is your name?"
  • Placeholder: "Enter your name..."
  • Default: "Alex"

Later dialogue: "Welcome to the academy, {heroName}."

Example: Code Puzzle

Text Input:

  • Target: doorCode
  • Validation: Code (exact match: "7349")
  • Title: "Enter the 4-digit code"

Trigger following input checks doorCode and redirects accordingly.

5.8 Global Events — Persistent Cross-Scene Triggers

Global Events are triggers that watch for a condition across every scene in your entire game. Unlike scene-level triggers that only fire when their specific scene is loaded, a Global Event continuously evaluates its condition whenever the game state changes — regardless of which scene the player is currently in.

Access: ⚙️ TOOLS → Events

Key distinction: A scene trigger fires once, when that scene loads. A Global Event fires anywhere, any time its condition becomes true — even in the middle of a scene the player has been in for several dialogue lines.

5.8.1 Configuration

Field Description Example
Event ID Unique technical identifier (lowercase, no spaces) check_death, reputation_milestone
Condition Variable check that activates the event health <= 0
Action What happens when the condition triggers Go to Scene: game_over
Fire Once If checked: event only fires the first time, then disables itself permanently Useful for milestone unlocks
Enabled Toggle the event on/off globally Disable during tutorial or safe zones

5.8.2 Evaluation Timing

Global Events are evaluated:

  • At every scene entry
  • After any variable modification (triggered by scene actions, choices, or triggers)
  • After inventory changes

Evaluation is prioritized — if multiple Global Events trigger simultaneously, they are evaluated in order from top to bottom in the Events panel. The first redirect wins.

5.8.3 Essential Use Cases

Use Case 1: Death / Game Over System

Event ID:   check_death
Condition:  health <= 0
Action:     Go to Scene: game_over
Fire Once:  No (re-evaluates every scene — player may recover health)

Effect: If any action anywhere in the game reduces health to 0 or below,
        the player is redirected to the game_over scene immediately.
        No need to check health manually in every scene.

Use Case 2: Reputation Milestone Unlock

Event ID:   reputation_hero
Condition:  reputation >= 100
Action:     Go to Scene: hero_title_cutscene
Fire Once:  Yes (plays the cutscene once, then never again)

Effect: Wherever the player is when reputation crosses 100, they are
        taken to a special cutscene and awarded the Hero title.
        Fire Once prevents it from interrupting repeatedly.

Use Case 3: Day Limit — Urgency Mechanic

Event ID:   day_limit_reached
Condition:  day >= 7
Action:     Go to Scene: archon_confrontation_forced
Fire Once:  Yes

Effect: If the player spends too many in-game days exploring without
        confronting the antagonist, the story is forced forward.
        Creates urgency — "the world does not wait for you."

Use Case 4: CG Gallery Auto-Unlock

Event ID:   unlock_secret_cg
Condition:  foundSecretRoom = true
Action:     Set Variable: cg_secret_unlocked = true
Fire Once:  Yes

Effect: The moment the player sets foundSecretRoom to true (anywhere),
        the secret CG is silently unlocked in the gallery.

Use Case 5: Sanity / Horror Meter

Event ID:   sanity_collapse
Condition:  sanity <= 20
Action:     Go to Scene: hallucination_sequence
Fire Once:  No

Effect: Whenever sanity drops to 20 or below, the player experiences
        a hallucination. Because Fire Once is off, it can trigger
        repeatedly — reinforcing the horror of repeated trauma.
        (Add a cooldown variable to limit frequency if needed.)

5.8.4 Disabling Events in Safe Zones

Some events should not fire during tutorials, menus, or special sequences. Use a guard variable:

Event:      check_death
Condition:  health <= 0 AND safeMode = false

Add a Logic Scene before tutorial:
  Action: Set safeMode = true

Add a Logic Scene when tutorial ends:
  Action: Set safeMode = false

Effect: The death system is fully suspended during the tutorial,
        then automatically reactivates when gameplay begins.

5.8.5 Global Events vs Scene Triggers — When to Use Which

Scenario Use Why
Death / permadeath system Global Event Must catch health=0 regardless of source
Scene-specific conditional dialogue Scene Trigger Only relevant in that specific context
Time limit / day counter Global Event Needs to interrupt any scene when triggered
Routing players to correct branch Scene Trigger (Logic Scene) Routing is scene-specific, predictable
Achievement / milestone unlocks Global Event (Fire Once) Can happen from many different action sources
Combat damage check Logic Scene trigger You control exactly when it runs (post-attack)

Part VI: Atmosphere and Staging

6.1 Images

Supported Formats

Format Recommended Usage Advantage
WEBP All images Superior compression, preserved quality
PNG Images with transparency Alpha channel, easy editing
JPEG Photographs Universal compatibility

Image Types

Type Recommended Dimensions Usage
Background 1920×1080 (16:9) Full scene
Character sprites Variable, ~900px high Superimposed characters
UI elements Depending on usage Dialogue boxes, buttons
CG Gallery 1920×1080 Unlockable images
Best Practices: optimization
Always convert to WEBP before import. Use exact dimensions (no browser resizing). Limit GIF animations (prefer WebM video).

6.2 Sounds

SFX (Sound Effects)

  • One-shot sounds triggered by scene entry or actions
  • Recommended format: OGG Vorbis, 64-128 kbps
  • Volume controlled by SFX slider in Options

Music

  • Looping background audio
  • Automatic crossfade between scenes (if different file)
  • Recommended format: OGG or MP3, 128 kbps
Attention Point: autoplay
Browsers block audio autoplay. Capsule handles this with a first user interaction. In Auto-Start mode, add a clickable title screen or start music after the first click.

6.3 Transitions

Transition Visual Effect Narrative Usage
Cut Instant change Shock, surprise, fast action
Crossfade Cross dissolve Standard, smooth
Fade to Black Fade to black Time passing, chapter end
Fade to White Fade to white Flashback, dream, loss of consciousness
Slide Left/Right Horizontal slide Spatial movement, panning
Slide Up/Down Vertical slide Ascent/descent, vertigo
Zoom In Enlargement Focus, revelation
Zoom Out Reduction Context setting, isolation
Pixelate Pixelation Digital transition, glitch
Blur Blurring Confusion, mental state change
Flash White flash Lightning, explosion, brutal revelation
Iris In/Out Circular opening/closing Classic cinema, dramatic focus

6.4 Atmospheric Effects

Effect Mood Intensity
Rain Melancholy, intimacy Moderate
Heavy Rain Storm, danger High
Snow Calm, magic, isolation Moderate
Blizzard Survival, hostile High
Sakura Petals Romance, spring, Japan Light
Autumn Leaves Nostalgia, end of a cycle Light
Floating Dust Golden light, timeless Very light
Fireflies Magical night, childhood Light
Twinkling Stars Clear night, contemplation Very light
Embers Destruction, heat, danger Moderate
Smoke Mystery, pollution, war Moderate
Bubbles Underwater, dream, lightness Light
Fog / Dense Fog Mystery, horror, confusion Moderate/High
Speed Lines Action, racing, manga High
God Rays Divine, transcendent, hope Moderate
Glitch Digital, error, tech horror High
TV Static Retro, horror, signal loss Moderate
Vignette Focus, claustrophobia, vintage Moderate
Lightning Flash Thunderstorm, terror, revelation Brutal
Screen Shake Explosion, impact, earthquake Brutal
Pulse Heartbeat, life, threat Moderate
VHS Scan Retro, surveillance, found footage Moderate

Effective Combinations

  • Heavy Rain + Screen Shake + Fade to Black = Destructive storm, tragic end
  • God Rays + Floating Dust + Sakura Petals = Reconciliation scene, ephemeral beauty
  • Glitch + TV Static + VHS Scan = Digital horror, fracturing reality

6.5 Complete UI Customization (UI Custom)

Capsule allows global visual customization that automatically applies to all your scenes, eliminating the need to configure each scene individually.

6.5.1 Customization Architecture

The UI Custom system works on two levels:

Level Scope Usage
Global (UI Custom panel) All scenes Default project style
Local (per scene) Individual scene Exception or specific variation

The "Use default appearance (UI Custom)" checkbox in each scene determines if it inherits the global style or defines its own parameters.

6.5.2 Replacement Images

Import your own images to replace default UI elements. All images are stored in Base64 within the project file, ensuring export autonomy.

Dialogue Box

Property Description Recommended Dimensions
Image Text area background 1600×280 px
Opacity Background transparency (0-1) 0.85 default

Concrete Example: Japanese Visual Novel Style

Import a dialogue box image with golden ornaments at the corners, semi-transparent. Set opacity to 0.9 to preserve readability while showing the background.

Result: all scenes with "Use default appearance" enabled automatically display this custom box.

Name Box

Property Description Recommended Dimensions
Image Background behind character name 400×60 px
Opacity Transparency 1.0 (opaque) default

Example: Elegant Integration

Create an image with a decorative ribbon that slightly overlaps under the main dialogue box. Position it at opacity 1.0 so it partially masks the main box, creating harmonious layering.

Choice Buttons

Property Description Recommended Dimensions
Image Background for each choice button 600×80 px
Opacity Transparency 1.0 default

Example: Medieval Fantasy Style

Design stone buttons with engraved runes. Import the image — all game choices will adopt this style. The "hover" state retains the image but applies the theme's accent color.

Menu Buttons

Property Description Recommended Dimensions
Image Background for main menu buttons 600×80 px
Opacity Transparency 1.0 default

Example: Menu/Game Consistency

Use the same texture as choice buttons to unify the experience. The main menu, save screen, and options screen automatically share this image.

Game Title

Property Description Recommended Dimensions
Image Logo/title replacing text 800×200 px
Opacity Transparency 1.0 default

Example: Professional Logo

Design your title in design software (Photoshop, Illustrator, Figma) with light effects, gradients, or custom typography. Export as transparent PNG. Import into UI Custom — the text "MY GAME" is replaced by your image.

Major advantage: The title can extend beyond text limits, include illustrations, and use effects impossible in pure CSS.

6.5.3 Default Dialogue Appearance

Define a color palette and shapes applied automatically to all scenes checked "Use default appearance".

Configurable Parameters

Category Elements Impact
Font Typography family Readability, tone (modern, classic, etc.)
Box Shape Geometry of containers Global visual style
Dialogue Box Border, background, text Main reading area
Name Box Border, background, text Speaker identification

Available Box Shapes

Shape Characteristic Usage
Standard Rounded corners, classic Universal, safe
Square Right angles, thick borders Cyberpunk, brutalist
Tech Asymmetric, thick left border Science-fiction
Comic Round bubble, name offset Comics, humor
Gem Cut corners, elegant Fantasy, prestige
Minimal No background, bottom border only Contemporary, sleek
Elegant Glassmorphism, background blur Romance, sophistication

Example: Consistent Art Direction

Project: psychological thriller

UI Custom Configuration:

  • Font: 'Courier New', monospace (typewriter = documents, archives)
  • Shape: shape-minimal (tension, nothing superfluous)
  • Dialogue: white border, black background 90%, light gray text
  • Name: blood red border, transparent background, red text

Result: every new scene created with "Use default appearance" immediately inherits this visual identity. No manual configuration required.

6.5.4 Customization Workflow

Step 1: External visual design

Create your assets in your tool of choice:

ui_assets/
├── dialogue_box.webp      (1600×280, semi-transparent bg)
├── name_box.webp          (400×60, left ornament)
├── choice_button.webp     (600×80, stone texture)
├── menu_button.webp       (600×80, same texture)
└── title_logo.webp        (800×200, logo with effects)

Production tips:

  • WEBP format for compression without visible loss
  • Alpha transparency for overlays
  • Test on both light AND dark backgrounds before finalizing

Step 2: Import into Capsule

Open ⚙️ TOOLS → UI Custom

For each element:

  • Check "Use Custom"
  • Click 📂 Choose File or paste a URL
  • Adjust Opacity if necessary
  • Observe the real-time update in the preview

Step 3: Define global colors

In the "Default Dialogue Appearance" section:

Step Action Verification
1 Select font and shape Readability at 1920×1080
2 Define 3 dialogue colors Sufficient contrast
3 Define 3 name colors Visual hierarchy
4 Test on example scene Final rendering

Step 4: Application to scenes

Situation Action Result
Standard scene Check "Use default appearance" Inherits UI Custom automatically
Special scene Uncheck, configure locally Visual exception
New scene Creation → checked by default Immediately consistent

6.5.5 Advanced Use Cases

Temporary Variation (flashback, dream)

Problem: You want a different style for dream sequences, but keep the main style as default.

Solution:

  • Configure UI Custom with your main style (reality)
  • For dream scenes:
    • Uncheck "Use default appearance"
    • Define locally: sepia filter, "Elegant" shape, cursive font
  • At the end of the dream, return to a "Use default appearance" scene — normal style reappears instantly

Multi-protagonists (dynamic name colors)

Problem: Two playable characters with distinct color palettes.

Solution:

  • UI Custom defines base style (shapes, fonts)
  • Per scene, adjust locally:
    • Protagonist A scenes: emerald green name
    • Protagonist B scenes: electric blue name
  • Both share the same box geometry (consistency), but differ by accent color (differentiation)

Implicit Responsive Adaptation

UI Custom images are:

  • Centered automatically
  • Resized as cover or contain depending on the element
  • Preserved in ratio on export
Attention Point: Fixed ratios
Strictly respect recommended ratios. A 1600×280 dialogue box imported as 800×140 will look pixelated. Always prefer native resolution or higher.

6.5.6 UI Custom Elements Summary Table

Element Target File Properties Scene Inheritance
Dialogue Box ui-diag-bg Image, Opacity (0-1) Yes, if checked
Name Box ui-name-bg Image, Opacity (0-1) Yes, if checked
Choice Buttons ui-choice-bg Image, Opacity (0-1) Yes (automatic)
Menu Buttons ui-menu-bg Image, Opacity (0-1) Yes (automatic)
Game Title ui-title-img Image, Opacity (0-1) N/A (menu only)
Global Font fontFamily List selection Yes, if checked
Box Shape boxShape List selection Yes, if checked
Dialogue Colors diagBorder, diagBg, diagText Hex color Yes, if checked
Name Colors nameBorder, nameBg, nameText Hex color Yes, if checked

6.5.7 Complete Example: Full Project Re-skin

Context: You created a modern VN (contemporary, office, city) and want to transform it into medieval fantasy without recreating all scenes.

Before (modern):

  • Font: Segoe UI
  • Shape: Standard
  • Colors: corporate blue, gray
  • No custom images

Transformation:

UI Custom Panel

  • Import dialogue_parchment.webp (aged parchment)
  • Import name_banner.webp (fabric banner)
  • Import choice_stone.webp (engraved stone)
  • Import title_fantasy.webp (logo with runes)
  • Change font: Palatino Linotype
  • Change shape: Gem
  • Colors: gold (#FFD700), brown (#3E2723), cream (#FFF8E1)

Existing Scenes

  • All had "Use default appearance" checked
  • Instantly: the entire project adopts the fantasy aesthetic

Spot Adjustments

  • Royal Throne Scene: uncheck, name in royal purple
  • Tavern Scene: uncheck, name in moss green

Result: 4 minutes of configuration, fully re-skinned project, visual consistency guaranteed.


6.6 Cinematic Camera System (v1.9.0)

The Cinematic Camera System adds programmatic movement to static scene backgrounds, creating the illusion of a living, breathing world without requiring video assets. Applied per-scene, it transforms a still image into a cinematic experience through smooth zoom and pan effects rendered entirely in CSS — no performance cost, no file size increase.

6.6.1 How It Works

When a scene is displayed, the camera effect animates the background layer independently of sprites, dialogue, and UI elements. The background image is scaled slightly beyond the viewport to create movement room, then glides according to the chosen mode. Characters and dialogue boxes remain perfectly stable — only the background moves.

Image Recommendation: Use backgrounds at 1920×1080 or larger. Camera modes with Pan require extra horizontal space — a 2560×1080 panorama image works especially well with Pan Left/Right modes.

6.6.2 Configuration

In the scene editor, in the Visual & Sound section, open the 🎥 Camera panel and configure:

  • Camera Mode: Dropdown selector for the type of movement
  • Intensity: How pronounced the effect is (0.1 = subtle, 1.0 = dramatic)
  • Duration: Length in seconds of one complete animation cycle

6.6.3 Available Camera Modes

Mode Description Narrative Usage
None Static background, no animation Standard — full player focus on dialogue
Zoom In Slow, continuous zoom toward the center Mounting tension, claustrophobia, growing threat
Zoom Out Slow progressive widening of the field Discovery, revelation, sense of isolation
Pan Left Background drifts slowly leftward Travel, passing time, movement through space
Pan Right Background drifts slowly rightward Return journey, opposite direction
Ken Burns Diagonal pan combined with slow zoom Classic cinematic, documentary feel, epic vistas
Slow Zoom Very gentle zoom, almost imperceptible Atmosphere depth, living world, subtle life
Breathe Rhythmic zoom in and out, like lungs Horror, heartbeat, fear, mounting dread
Drift Slow, randomized micro-movements Dream sequences, instability, hallucination

6.6.4 Parameters

Parameter Range Default Effect
Intensity 0.1 — 1.0 0.3 Controls how far the camera moves or zooms. 0.1 is barely perceptible; 1.0 is highly dramatic.
Duration 3s — 60s 12s How long one complete animation cycle takes. Shorter = faster movement.

6.6.5 Practical Examples

Example 1: Epic Opening Scene — Mountain Panorama

Background:   mountain_dawn_wide.webp (2560×1080)
Camera Mode:  Ken Burns
Intensity:    0.2 (subtle)
Duration:     20s

Result: As the opening narration plays, the camera slowly pans
across the mountain range and gently zooms in. The scene feels
vast, cinematic, and alive — without any video asset.

Example 2: Horror Scene — Abandoned Corridor

Background:   asylum_corridor.webp
Camera Mode:  Zoom In
Intensity:    0.5
Duration:     8s

Effect: The perspective slowly closes in. As dialogue unfolds,
the claustrophobic zoom makes the player feel the walls
are moving. Combined with effect: fog — extremely effective.

Example 3: Dream Sequence

Background:   dreamscape_abstract.webp
Camera Mode:  Drift
Intensity:    0.4
Effect:       floating_dust
Filter:       sepia

Effect: Random micro-movements combined with floating particles
and warm sepia tones signal an altered state of consciousness.

Example 4: Tense Confrontation — Throne Room

Background:   throne_room.webp
Camera Mode:  Breathe
Intensity:    0.3
Duration:     4s (fast cycle = rapid heartbeat feel)

Effect: The subtle pulsing zoom mimics a heartbeat under stress.
It amplifies the tension of dialogue without distracting from it.

Example 5: Travel Montage

Sequence of 3 scenes, each with:
Camera Mode:  Pan Left
Intensity:    0.6
Duration:     6s
Transition:   crossfade

Effect: Characters appear stationary while backgrounds drift
leftward across scenes — convincingly simulates movement
through different landscapes.
Best Practices:
  • Use Ken Burns at intensity 0.1–0.2 for opening scenes. It reads as professional, not distracting.
  • Avoid intensity >0.6 during long dialogue-heavy scenes — sustained strong movement causes fatigue.
  • Combine strategically: Ken Burns + Sakura Petals = anime title sequence. Zoom In + Heavy Rain + Screen Shake = storm climax.
  • Use None for action choice scenes: full player attention must be on the decision, not the background.
  • The camera effect resets automatically on scene transition — no cleanup needed.

6.6.6 Synergy with Atmospheric Effects

Camera Mode Paired Effect Resulting Mood
Ken Burns Sakura Petals Romantic anime opening, spring beauty
Zoom In Heavy Rain + Screen Shake Catastrophic storm, danger approaching
Breathe Pulse + Vignette Horror, someone watching you
Drift Floating Dust + Fade to White filter Flashback, memory fading
Pan Left Speed Lines Manga-style high-speed chase
Slow Zoom Fireflies + God Rays Magical moment, peaceful wonder

Part VII: Reliability and Quality

7.1 Project Health Check

Capsule analyzes your project in real-time and flags problems.

Alert Types

Level Icon Meaning
Error 🔴 Blocking — game will not work
Warning 🟠 Risk — unpredictable behavior possible
Info 🔵 Suggestion — recommended improvement

Automatic Checks

Problem Detection Correction
Missing scene Reference to non-existent ID Create scene or correct ID
Undeclared variable Use without definition Add in Variables Manager
Orphan scene Never referenced Check if intentional (ending) or error
Dead-end No exit defined Add next, choices, or mark as end
Logic scene without exit Logic scene without next Add mandatory redirection
Type mismatch Math operation on text Change type or operation
Hotspot to missing scene Non-existent target Correct hotspot

Best Practices: Health Check Workflow

  • Create your narrative structure (empty connected scenes)
  • Check Health Check — resolve connection errors
  • Add content (dialogue, images)
  • Check regularly — the panel updates in real-time

7.2 Preventing Errors

Runtime Safeguards

Protection Behavior Limit
Redirect loop Infinite loop detection 100 redirects max
Logic depth Chain of logic scenes 50 scenes max
Trigger depth Nested trigger evaluation 50 evaluations max
Global event depth Chain of global events 20 evaluations max
Scene history Navigation history 100 entries max (RAM protection)

Exceeding a limit stops execution with an explicit error message (Dev mode).

7.3 Best Practices

Narrative Organization

Naming convention:

chapter_01_tavern_intro
chapter_01_tavern_choice
chapter_01_tavern_combat
chapter_01_tavern_aftermath

Hub and spoke:

        [hub_district]
       /      |      \
[market]  [temple]  [docks]
   |          |         |
[return]---[return]---[return]
    \         |         /
     \        |        /
      [hub_district] (next chapter)

Variable Management

Category Prefix Example
Story progression ch (chapter) ch2_unlocked
Character relationships rel_ rel_elara
Inventory flags has_ has_map
World states world_ world_eclipseStarted
Counters cnt_ cnt_deaths

Part VIII: Export and Share

8.1 HTML Export

Click 💾 EXPORT to generate a standalone HTML file containing:

  • Complete game engine (minified JavaScript)
  • All embedded assets (Base64 encoded)
  • Story data and configuration
  • Save/load system (localStorage)
Attention Point: file size
Warning 2 MB Compression recommended
Confirmation 10 MB Strongly advised to compress
Rejection 20 MB Import — compress first

8.2 Browser Compatibility

Browser Support Notes
Chrome/Edge ✅ Complete Recommended for development
Firefox ✅ Complete Excellent support
Safari ✅ Complete Reader mode disabled required
Mobile Chrome ✅ Complete Touch optimized
Mobile Safari ✅ Complete Avoid strict autoplay audio

8.3 Distribution

Web Hosting

Upload the HTML file to:

  • GitHub Pages (free)
  • itch.io (free, VN community)
  • Netlify/Vercel (free, global CDN)
  • Your own server

Native App Distribution

To release your game as a standalone Windows desktop app (.exe) or Android app (.apk), use the companion tools bundled with Capsule:

  • HTML2EXE → converts any HTML export (including multi-chapter) into a .exe for Windows. See section 8.4 for full guide.
  • HTML2APK → converts any HTML export (including multi-chapter) into an .apk for Android. See section 8.5 for full guide.

Direct Sharing

  • Email (if < 10 MB after compression)
  • Cloud storage (Google Drive, Dropbox with direct link)
  • Messaging (Discord, Telegram — drag and drop)
Best Practices: preservation
The standalone HTML format ensures your game remains playable in 10 years. Archive the source file (original .html) and final export. No external dependency can disappear.

8.4 HTML2EXE — Native Desktop App (Windows)

Capsule HTML2EXE converts your exported HTML game file into a native .exe Windows desktop application — in exactly one click. The resulting executable is a fully self-contained program: no browser required, no internet connection, no external dependencies.

HTML2EXE supports multi-chapter projects: bundle all your chapter HTML files together into a single installer that handles chapter transitions automatically.

What is HTML2EXE?
HTML2EXE is a separate companion utility bundled with Capsule (Windows 10/11). It wraps your HTML game in a lightweight native shell, creating a desktop experience that feels identical to a commercial PC game — with a proper window, taskbar icon, and no browser UI chrome.

8.4.1 System Requirements

Requirement Specification
Host OS Windows 10 or Windows 11 (64-bit)
Input One or more exported Capsule HTML files
Output .exe standalone executable
Player OS Windows 10 / Windows 11

8.4.2 Conversion Workflow

  1. Export your completed game from Capsule Studio (💾 EXPORT → HTML file)
  2. Open Capsule HTML2EXE
  3. Click Add File(s) and select your HTML file(s)
    • Single chapter: add one file
    • Multi-chapter saga: add all chapter files in order (chapter1.html, chapter2.html...)
  4. Configure game info: Title, Window Icon (.ico), Window Size
  5. Click Build .EXE
  6. Done — a .exe file is generated in your output folder

8.4.3 Multi-Chapter Support

When bundling multiple chapters:

  • All chapter HTML files are embedded inside the .exe
  • Chapter transitions (Jump to HTML File) resolve internally — no external files needed
  • Save data and variable transfers between chapters work identically to the browser version
  • The player sees a seamless experience — no file system exposure
Example multi-chapter project:
aetheria_chapter1.html    ← Add all three
aetheria_chapter2.html
aetheria_chapter3.html
        ↓
HTML2EXE (1 click)
        ↓
Chronicles_of_Aetheria.exe   ← Single distributable file
                              ← Contains all 3 chapters internally

8.4.4 Distribution via .EXE

Platform Notes
itch.io (Windows download) Upload the .exe, set Platform to Windows. Players download and run directly.
Steam (via Steamworks) Package .exe in a SteamPipe depot. Works with Steam achievements via overlay.
Direct download Share via Google Drive, Dropbox, or your own server. Self-extracting zip optional.
GitHub Releases Attach .exe to a GitHub Release for version-managed distribution.
Windows SmartScreen Notice: The first time players run your .exe, Windows SmartScreen may show a warning because the app is not signed by a commercial certificate. Players can click "More info → Run anyway." This is expected for indie releases. For commercial releases, consider purchasing a code signing certificate to eliminate the warning.

8.5 HTML2APK — Native Android App

Capsule HTML2APK converts your exported HTML game into an .apk Android package — in exactly one click. The resulting APK installs directly on any Android device (4.4+) and runs as a native app with its own home screen icon, full-screen display, and offline capability. No Google Play account required for direct distribution.

HTML2APK also supports multi-chapter projects: all chapters are bundled into a single APK, with chapter transitions handled internally.

What is HTML2APK?
HTML2APK is a companion utility bundled with Capsule (Windows 10/11). It packages your HTML game inside a native Android WebView shell, optimized for mobile gameplay — full-screen, touch-ready, with hardware back button support and proper Android lifecycle management.

8.5.1 System Requirements

Requirement Specification
Build machine OS Windows 10 or Windows 11 (64-bit)
Input One or more exported Capsule HTML files
Output .apk Android package
Player device Android 4.4+ (API level 19+). Works on all modern Android phones and tablets.

8.5.2 Conversion Workflow

  1. Export your completed game from Capsule Studio (💾 EXPORT → HTML file)
  2. Open Capsule HTML2APK
  3. Click Add File(s) and select your HTML file(s)
    • Single chapter: add one file
    • Multi-chapter saga: add all chapter files in order
  4. Configure app info: App Name, Package ID, App Icon (512×512 PNG), Splash Screen (optional)
  5. Click Build .APK
  6. Done — an .apk file is generated, ready to install or publish

8.5.3 Multi-Chapter Support

The multi-chapter behavior is identical to HTML2EXE:

aetheria_chapter1.html
aetheria_chapter2.html
aetheria_chapter3.html
        ↓
HTML2APK (1 click)
        ↓
chronicles_of_aetheria_v1.0.apk   ← All 3 chapters bundled
                                   ← Transitions work internally
                                   ← Save data transfers automatically

8.5.4 Package ID Convention

The Package ID uniquely identifies your app on the Android ecosystem. Use the reverse domain format:

Format:    com.yourname.gamename
Example:   com.lyrastudios.aetheria
Example:   io.itch.yourprofile.mygame
Example:   com.github.username.projectname

Rules:
  - Lowercase only
  - Only letters, digits, and dots
  - No spaces or special characters
  - Must be globally unique if publishing to Google Play

8.5.5 Distribution via .APK

Distribution Method Requirements Notes
Direct sideload Player enables "Install from Unknown Sources" in Android Settings Simplest method. Share APK via link, Discord, or file transfer. No store account needed.
itch.io (Android download) itch.io account Upload APK, set Platform to Android. The itch.io Android app handles installation automatically.
Google Play Store Google Developer account ($25 one-time), convert APK to AAB format Maximum reach. Requires additional review process and compliance with Play policies.
Alternative stores Amazon Appstore, F-Droid, Samsung Galaxy Store Each has its own submission process. APK works directly in most.
Sideloading Note: When distributing outside of Google Play, players must enable "Install from Unknown Sources" (or "Install unknown apps" on newer Android). This is a standard Android security feature. Clearly communicate this to players in your distribution instructions.

8.5.6 Mobile Optimization for APK

Before converting to APK, optimize your project specifically for mobile:

Concern Recommendation Why
File size Keep total HTML under 30 MB per chapter Large APKs take longer to install and consume device storage
Images Use WEBP at 75-80% quality for backgrounds Mobile screens are smaller — full 1920×1080 at 95% quality is overkill
Touch targets Ensure choice buttons are at least 44px tall Capsule's default touch targets are already well-sized
Audio OGG 64-96 kbps maximum Mobile speakers and headphones rarely reveal quality above 96 kbps
Hotspots Keep clickable zones generously sized (15% minimum width) Finger precision on mobile is lower than mouse precision
Stats panel check Mobile Load < 5 seconds Users abandon apps that take more than 5s to open

8.5.7 HTML → EXE / APK Comparison

Feature HTML (Browser) HTML2EXE (Windows) HTML2APK (Android)
Distribution URL link, itch.io embed .exe download .apk download, Play Store
Platform Any browser on any OS Windows 10/11 only Android 4.4+
Internet required No (fully offline) No (fully offline) No (fully offline)
Multi-chapter ✅ (Jump to HTML File) ✅ (bundled internally) ✅ (bundled internally)
Save persistence localStorage (per browser) localStorage (per app) localStorage (per app install)
Effort Zero (just export) 1 click 1 click
Ideal for Sharing, jam entries, demos PC commercial release, Steam Mobile release, Google Play

Part IX: Designing a Complex VN

9.1 Structuring

Recommended Architecture

[main_menu]
    ↓
[start] ───┬──→ [intro_sequence]
           ↓
    [chapter_1_hub] ←——————┐
       /    |    \         |
      ↓     ↓     ↓        |
   [A]→[B] [C]→[D] [E]→[F] |
      \     |     /        |
       └→[chapter_1_end]——─┘
                ↓
        [chapter_2_start] ←—— (via nextFile: chapter2.html)

Multi-chapters

For large stories, use Jump to HTML File:

  • Create chapter1.html, chapter2.html, etc.
  • In the last scene of chapter N:
    • Enable Auto-Start in config
    • Set Jump to HTML File: chapter2.html
  • Variables are automatically transferred

Example: Chapter Transition

Scene: chapter1_finale (Logic)

  • Actions: Automatic save of key variables
  • Next File: chapter2.html

chapter2.html starts with all variables intact.

9.2 Readability

Scene Rhythm

Scene Type Estimated Duration Objective
Exposition 30-60s Context, immersion
Interaction 1-3min Choices, characterization
Climax 30s-2min Tension, decision
Transition 5-15s Change of location/time

Choice Density

  • Minimum: 1 significant choice every 5-10 minutes
  • Maximum: Avoid more than 4 simultaneous choices (paralysis)
  • Balance: 70% narration, 30% interaction

9.3 Maintainability

Internal Documentation

Use implicit comments:

  • Named logic scenes: check_, hub_, calc_
  • Variables with metadata in name
  • Choices with explanatory alternative text

Versioning

Export milestones:

  • mygame_v0.1_prototype.html
  • mygame_v0.5_alpha.html
  • mygame_v1.0_release.html

Part X: FAQ & Frequent Errors

10.1 Common Issues

Q: My game is stuck on a black screen

Check that the scene has either dialogue, choices, or a next scene defined. An empty scene without an exit creates a block.

Q: Variables are not displaying in dialogue

Check syntax: {variableName} (no spaces, exact case). Verify the variable is declared in Variables Manager.

Q: Music is not starting

This is normal — browsers block autoplay. Music starts after the first user click. In Auto-Start mode, add a clickable title screen.

Q: My exported file is 50 MB

Compress your assets:

  • Images: convert to WEBP, reduce to 1920×1080 max
  • Audio: OGG 64-128 kbps
  • Video: WebM 720p

Q: Conditional choices never appear

Check the operator: = for equality, not ==. Verify the variable has the expected value (use Dev Mode).

Q: My Global Event fires on every scene, not just once

Enable the Fire Once option on the event. This causes the event to disable itself after its first trigger. Without it, the event re-evaluates (and potentially re-fires) every scene.

Q: A Global Event is firing at the wrong moment and interrupting important scenes

Add a guard variable (e.g., safeMode = true) to your event condition: health <= 0 AND safeMode = false. Set safeMode = true before scenes you want to protect, and safeMode = false when you want the event to be active again.

Q: HTML2APK shows a "Install Unknown Sources" warning on Android

This is a standard Android security prompt for apps not installed from the Play Store. The player must go to Android Settings → Security → "Install unknown apps" and enable it for their file manager or browser. Include these instructions in your release notes for sideloaded APK distribution.

Q: My .exe shows a Windows SmartScreen warning

This happens because your executable is not signed with a commercial code-signing certificate. Players can click "More info → Run anyway" to proceed. For commercial releases, consider purchasing a code-signing certificate (~$200–$500/year) to eliminate this warning entirely.

Q: Chapter transitions don't work in the .exe or .apk

Make sure you added all chapter HTML files to HTML2EXE/HTML2APK, not just chapter 1. When bundled together, internal chapter transitions resolve automatically. If you only added one file, the app cannot find the other chapters.

Q: Can I publish my Capsule game on Steam?

Yes. Use HTML2EXE to create a .exe, then package it through Steamworks. Capsule games function as any other PC game on Steam. You can additionally integrate Steam achievements by calling the Steam overlay API from a custom HTML wrapper, though this requires technical knowledge. The simplest approach is to release the .exe as-is — Steam handles all distribution and DRM.

10.2 Runtime Error Messages

Message Cause Solution
"Scene not found" Non-existent scene ID Correct ID or create scene
"Infinite loop detected" Redirect loop Add an exit condition
"Logic depth exceeded" Too many chained logic scenes Merge calculations or add narrative scene
"Variable used before initialization" Undeclared variable Add in Variables Manager

10.3 Mobile Optimization

Problem Solution
Slow loading Reduce image size, use WEBP
Audio lag Prefer short effects, avoid heavy music
Small interface Test in mobile preview, adjust fonts
Lost saves iOS: use "Add to Home Screen"

11. Actors

Actors are reusable characters with multiple expressions, eliminating configuration duplication and ensuring narrative consistency.

11.1 Actor Architecture

Concept Description Analogy
Actor Global character entity "The character Elara"
Display Name Name shown in dialogues "Elara" or "Princess Elara"
ID Unique technical reference elara
Sprites Collection of expressions 5, 10, 20 different images
Color Name tint in dialogues Royal gold, menacing red, etc.

11.2 Creating an Actor

Steps:

  • ⚙️ TOOLS → Actors
  • ➕ Create New Actor
  • Actor ID: unique technical identifier (lowercase, no spaces)
    • Example: elara, captain_ren, mysterious_stranger
  • Display Name: name visible to the player
    • Example: "Elara", "Captain Ren", "???"
  • Name Color: name color in dialogues (hex selector)

11.3 Sprite Management (Expressions)

Each actor has a library of interchangeable expressions.

Expression Typical Usage Suggested Naming
default Neutral expression, standard Always define
happy Joy, satisfaction happy, joy
sad Sadness, disappointment sad, sorrow
angry Anger, frustration angry, rage
surprised Shock, revelation surprised, shock
thinking Reflection, doubt thinking, ponder
blushing Embarrassment, romance blush, flustered
determined Resolution, combat determined, resolve

Importing a sprite:

Method Action Result
URL Paste a direct link External reference
File 📂 Choose File → selection Integrated Base64 encoding

Concrete Example: Complete Creation

Actor: elara

Display Name: "Elara"

Color: #D4AF37 (gold)

Sprites:

Expression Image Scenario Usage
default elara_neutral.webp Standard dialogue
happy elara_smile.webp Reunion, success
sad elara_tears.webp Defeat, loss
determined elara_fight.webp Combat, climax
surprised elara_shock.webp Plot revelation

Total: 5 expressions to cover the main narrative arc.

11.4 Usage in Scenes

Referencing an Actor

In the Characters section of a scene:

Field Value Effect
Actor elara (dropdown) Links the character
Expression happy (dropdown) Selects the sprite
Position X 25% Horizontal placement (0 = left edge, 100 = right edge)
Position Y 0% Vertical placement (0 = bottom-anchored, positive = rises above bottom)
Scale 1.0 Relative size (0.8 = slightly smaller, 1.2 = slightly larger)
Mirror / Flip true / false Horizontally flip the sprite — place the same character on opposite sides without a separate sprite

Positioning Guide

Scenario Position X Scale Visual Result
Single character, centered 50% 1.0 Classic VN portrait, centered on screen
Two characters facing each other 25% + 75% 1.0 + 1.0 (mirror right one) Standard conversation left / right
Background character (depth) 50% 0.65 Smaller, appears to be in the distance
Close-up reaction shot 50% 1.4 Cropped portrait, intense emotion
Three characters 15%, 50%, 85% 0.9, 1.0, 0.9 Center is "dominant," flanks slightly smaller
Mirror Tip: Most character sprite sheets face right. Use Mirror on right-positioned characters so they always face inward toward the dialogue — this gives the visual impression of two characters talking to each other rather than both staring off-screen.
Scale for Depth: A character at Scale 0.7 placed at Position X 20% reads as "in the background, to the left." This simple trick adds visual depth without any additional artwork.

Dynamic Syntax: {actor:id}

Automatically display an actor's Display Name in dialogue:

Variable: heroName = "Jordan"

Actor: hero (Display Name: {actor:hero} → "Jordan")

Dialogue: "My name is {actor:hero}, and I won't give up!"

Player result: "My name is Jordan, and I won't give up!"

Major advantage: Change heroName to "Alex" at the start of the game — all dialogues using {actor:hero} update instantly.

11.5 Advanced Workflows

Actor with changing name

Situation Configuration Result
Secret identity Display Name: "???" → revealed: "Lord Vexis" Mystery maintained
Evolving title "Recruit" → "Knight" → "Commander" Visible progression
Possession "Sister Maria" → "The Demon" Horror, transformation

Shared Actor Library

Organize by narrative category:

Main Actors
├── hero (customizable protagonist)
├── companion (constant ally)
└── antagonist (main villain)

Secondary Actors
├── merchant_recurring (comic relief)
├── mentor (guide, likely sacrifice)
└── rival (competition, possible ally)

Episodic Actors
├── village_elder_ch1
├── village_elder_ch2 (same sprite, different name if twist)
└── monster_variants (5× goblin with different colors)

11.6 Sprite Sheet Character Animation (v1.9.0)

Sprite Sheet Animation brings characters to life with frame-by-frame animation, directly within Capsule's actor system. Instead of a static portrait, an expression references a sprite sheet — a single image containing all animation frames arranged in a regular grid. Capsule reads the grid configuration and cycles through frames, producing smooth 2D character animation with zero additional complexity in your scene setup.

What is a Sprite Sheet?
A sprite sheet packs all frames of an animation into one image file. For example, a character blinking: 8 frames in 4 columns × 2 rows. Capsule steps through them sequentially, creating the illusion of motion from a single file. This is memory-efficient, file-efficient, and perfectly adapted to visual novel characters.

11.6.1 Preparing Your Sprite Sheet

Before importing into Capsule, your sprite sheet must follow these rules:

  • All frames must have identical dimensions. If each frame is 256×512 px and you have 8 frames in 4 columns × 2 rows, the total image must be exactly 1024×1024 px.
  • Frames are read left-to-right, top-to-bottom. Frame 1 is top-left; the last frame is bottom-right.
  • PNG with transparent background is strongly recommended for character sprites — it allows proper layering over scene backgrounds.
  • Avoid heavy lossy compression. JPEG artifacts are amplified when cycling through frames. Use PNG or WEBP at 90%+ quality.
  • Empty padding cells are allowed. If your 4×2 grid only has 7 meaningful frames, set Frames to 7 — Capsule will not display the 8th empty cell.

Sprite Sheet Anatomy — Visual Reference:

Example: 4 columns × 2 rows = 8 cells
Each frame: 256 × 512 px
Total image: 1024 × 1024 px

┌──────────┬──────────┬──────────┬──────────┐
│ Frame 1  │ Frame 2  │ Frame 3  │ Frame 4  │  ← Row 1
├──────────┼──────────┼──────────┼──────────┤
│ Frame 5  │ Frame 6  │ Frame 7  │ (empty)  │  ← Row 2
└──────────┴──────────┴──────────┴──────────┘

Playback order: 1 → 2 → 3 → 4 → 5 → 6 → 7 → (loop)
Frames = 7 (the empty 8th cell is automatically skipped)

11.6.2 Activating Animation on an Expression

Animation is configured per-expression inside the Actor panel:

  1. Open ⚙️ TOOLS → Actors and select your actor
  2. Find the expression you want to animate (e.g., default, happy)
  3. Import your sprite sheet image as the expression's source (📂 Choose File)
  4. Click 🎬 Configure Animation to expand the Sprite Sheet panel
  5. Set grid parameters (Columns, Rows, Frames, Frame Width, Frame Height)
  6. Choose an Animation Mode
  7. Set playback speed (FPS preset or custom)
  8. Observe the live preview in the right panel
No scene setup required: Once animation is configured on an expression, it plays automatically whenever that actor + expression combination appears in any scene. No per-scene configuration needed.

11.6.3 Grid Configuration Parameters

Parameter Description Example (4×2 sheet)
Columns Number of frames per row in the sheet 4
Rows Number of rows in the sheet 2
Frames Actual number of animation frames to use (≤ columns × rows). Allows skipping empty padding cells. 7
Frame Width Width of a single frame in pixels 256
Frame Height Height of a single frame in pixels 512

How to calculate Frame Width and Frame Height:

Frame Width  = Total Image Width  ÷ Columns
Frame Height = Total Image Height ÷ Rows

Example: 1024 × 1024 image, 4 columns, 2 rows
Frame Width  = 1024 ÷ 4 = 256 px
Frame Height = 1024 ÷ 2 = 512 px

11.6.4 Animation Modes

Mode Icon Behavior Best For
Continuous Loop 🔄 Plays all frames indefinitely, restarts from frame 1 at the end. Always running. Idle breathing, hair movement, ambient living
Talk (pause when done) 🗣️ Plays while the dialogue line is active (text is appearing). Slows to a near-idle pause once the line has fully displayed. Mouth flap, lip-sync approximation, "speaking" body language
Once (action) Plays all frames exactly once at scene entry, then freezes permanently on the last frame. Does not restart on subsequent dialogue lines. Attack animations, impacts, one-shot reactions, dramatic reveals
Stopped ⏸️ Animation is paused on the first frame. Useful for debugging or when you want full manual control. Debugging, static fallback, conditional animation

11.6.5 Playback Speed

Preset FPS Best Usage
🐢 Slow 3 fps Natural breathing, very subtle effects, slow blinks
▶️ Normal 6 fps Standard idle animation, hair movement, body sway
⚡ Fast 12 fps Action, impact, excitement, rapid reactions
Custom 1–60 fps Fine-tuned control — enter a specific value in the FPS field

11.6.6 Complete Setup Example: Animated Elara

Goal: Elara's happy expression shows her hair gently swaying.

Step 1 — Prepare the sprite sheet:

elara_happy_anim.png
6 frames of hair movement: 3 columns × 2 rows
Each frame: 256 × 512 px
Total image: 768 × 1024 px

Step 2 — Configure in Actor panel:

Parameter Value
Source Image elara_happy_anim.png
Columns 3
Rows 2
Frames 6
Frame Width 256 px
Frame Height 512 px
Mode 🔄 Continuous Loop
FPS 6 (Normal)

Step 3 — Result:
In any scene where Elara appears with expression happy, her portrait is smoothly animated. No per-scene configuration is required. The animation runs as a background process, independent of dialogue flow.

11.6.7 Animation Design Recipes

Recipe 1: Breathing Idle (any character)

8–12 frames of subtle chest and shoulder rise/fall
Mode:  🔄 Continuous Loop
FPS:   3–4 (natural breathing rhythm ~15 cycles/min)
Apply to: "default" and "idle" expressions

Effect: Character feels present and alive even during long
        silent narration sections. Transforms your VN from
        a slideshow into a living world.

Recipe 2: Natural Eye Blink

5 frames: fully-open → half-closed → closed → half-open → open
Mode:  🔄 Continuous Loop
FPS:   8 (blink itself is fast)

Tip: Add 3–4 extra "fully open" frames between blinks to
     create a natural pause. Sequence example:
     open, open, open, open, half, closed, half, open, open...
     This produces a blink every ~1.3 seconds at 6 fps.

Recipe 3: Attack / Combat Action

12–16 frames of full attack animation (windup → strike → recovery)
Mode:  ⚡ Once (action)
FPS:   12–24 (fast, impactful)
Apply to: "battle" or "attack" expression

Effect: Animation plays at full speed on scene entry, then
        holds on the final pose frame. The character looks
        powerful and decisive. Does not loop or repeat.

Recipe 4: Talking Mouth (Lip Sync Approximation)

4–6 frames of different mouth positions (open, half, closed, wide)
Mode:  🗣️ Talk (pause when done)
FPS:   10–12

Effect: Rapidly cycles through mouth positions while the
        typewriter text effect is active, then holds on
        the neutral closed-mouth frame when the line ends.
        Creates a convincing speech impression.

Recipe 5: Looping Magical Aura

8 frames of particle/glow effect around character
Mode:  🔄 Continuous Loop
FPS:   6–8
Apply to: "magic" or "charged" expression

Effect: Magic sparkles or energy flows continuously around
        the character as a visual status indicator.
        Highly effective for mage characters or powered-up states.
Performance Note: Sprite sheet animation uses CSS background-position stepping — it is extremely lightweight. Multiple animated characters at 60 fps each will not cause any performance issues. The sprite sheet image is stored once in Base64 regardless of frame count. The only cost is the sprite sheet file size itself.

11.6.8 Recommended Tools for Creating Sprite Sheets

Tool Platform Usage Export
Aseprite Win / Mac / Linux Pixel art animation — native sprite sheet export File → Export Sprite Sheet → PNG
Adobe Animate Win / Mac Vector / raster animation — export as PNG sequence, then pack Export → Export Movie → PNG sequence
TexturePacker Win / Mac / Linux Packs a folder of PNG frames into an optimized sprite sheet Output: single PNG + fixed grid
Free Texture Packer Browser / Desktop Free alternative to TexturePacker freetexturepacker.com
Spine (Esoteric Software) Win / Mac Skeletal animation — export baked frames as PNG sequence Export → Sequence → PNG
Procreate (iPad) iOS Frame-by-frame drawing on tablet — export as animated PNG Share → Animated PNG, then pack with Free Texture Packer

12. HUD — On-screen Variable Display

The HUD (Heads-Up Display) projects variables in real-time onto the game screen, creating visible and immersive progression mechanics.

12.1 Activation and Global Configuration

Access: ⚙️ TOOLS → HUD

Parameter Options Effect
Enable HUD On/Off Global display
Position Top Left / Top Right / Top Center Screen anchor
Style Compact / Detailed / Minimal Information density
Background Dark / Light / Transparent / Blur Container appearance

12.2 Display Styles

Style Format Usage
Compact 💰 150 Games with many variables
Detailed 💰 Gold: 150 Maximum clarity, tutorials
Minimal 150 Subtle integration, atmosphere

12.3 Configuring HUD Variables

For each displayed variable:

Property Description Example
Variable Variable to monitor gold, health, reputation
Icon Emoji or visual character 💰, ❤️, ⭐
Show in HUD Individual activation Toggle per variable

Example: Complete Narrative RPG

Configured HUD variables:

Variable Icon Style Context
gold 💰 Compact Economy, purchases
health ❤️ Compact Survival, combat
mana 🔮 Compact Magic, spells
reputation 👑 Detailed Social influence
day 📅 Minimal Time

Screen render: [💰 150] [❤️ 8] [🔮 25] [👑 Reputation: 12] [14]

12.4 Available Icons

Capsule offers 28 icons covering common uses:

Category Icons
Economy 💰 🪙 💎 💵
Progression 🏆 ⭐ 👑 ✨
Vitality ❤️ 💙 💚 💕 🔥
Combat ⚡ 🛡️ ⚔️ 💪
Social 🎭 💀
Time ⏰ 📅 🌙 ⏳
Items 🔑 📦 🎯 🧪
States 📊 🎲 🚫

Customization: Click the icon in configuration to open the selector.

12.5 Narrative Use Cases

Visual Novel with Relationship Management

HUD: [💕 Affection: 45] [🔥 Tension: 12]

Choice: "Compliment her dress"
→ Action: affection + 5
→ HUD updates: [💕 Affection: 50] in real-time

Survival Horror with Limited Resources

HUD: [🔋 Battery: 23%] [💊 Medkits: 1] [🗝️ Keys: 0]

Each exploration scene can modify these values.
The player constantly sees the fragility of their situation.

Mystery with Collected Clues

HUD: [📊 Clues: 3/7]

Variable clues incremented by triggers on hotspots.
Implicit objective: complete the collection.

13. CG Gallery — Unlockable Images and Videos

The CG Gallery manages illustrations and cinematics that the player unlocks by progressing, creating a persistent and motivating collection.

13.1 Gallery Architecture

Concept Description
CG Item Entry in the gallery (image or video)
Unlock Automatic or manual unlocking
Persistence localStorage storage, survives saves
Progress Counter X/Y unlocked

13.2 Gallery Configuration

Access: ⚙️ TOOLS → CG Gallery

Adding an Item

Method Action Result Type
➕ Add Image 📂 multiple selection Image (WEBP, PNG, JPG)
🎥 Add Video 📂 multiple selection Video (MP4, WebM)

For each item:

Property Description Example
ID Unique identifier cg_elara_ending
Title Name displayed in gallery "Elara's Promise"
Category Optional grouping "Endings", "Characters", "Secret"
Type Image or Video Automatically detected

13.3 Unlock Mechanisms

Automatic Unlocking (Recommended)

The CG unlocks automatically when the player sees the image/video in normal gameplay.

Required configuration:

  • Use exactly the same URL/file as scene background and in the gallery
  • Capsule detects match and unlocks

Example: Ending Illustration

  • Import ending_elara.webp into CG Gallery
  • Title: "Promised Future"
  • Category: "Endings"
  • In the final scene ending_elara:
    • Background: ending_elara.webp (same file)
  • When player reaches this scene:
    • Image displays normally
    • Capsule detects: "This image is in the gallery"
    • Automatic unlock + silent notification

Manual Unlocking (Advanced)

For secret CGs not displayed directly:

Trigger or Action:
- Type: Unlock CG
- Target: cg_secret_001

Result: Player receives the CG without having "seen" it normally.
Usage: Easter eggs, achievements, bonus content.

13.4 Player Experience

In Main Menu

GALLERY button appears automatically if:

  • At least 1 CG defined in project
  • At least 1 CG unlocked by player

Gallery Interface

Element Description
Grid 16:9 thumbnails, 3-4 columns
Locked State 🔒 Padlock icon, no preview
Unlocked State Clickable thumbnail, title visible
Viewer Fullscreen, navigation ← →
Progression "12 / 24 unlocked"

13.5 Design Strategies

Narrative Structure by Collection

Category Count Unlock
"Main Story" 8 Normal progression, unmissable
"Character Routes" 12 Specific choices, 3-4 per character
"Secret" 4 Hidden conditions, exploration
"Bad Endings" 6 Narrative failures, dramatic irony

Videos in Gallery

Recommended specifications:

  • Format: WebM (VP9) or MP4 (H.264)
  • Resolution: 1920×1080
  • Duration: 10-60 seconds
  • Audio: Ogg Vorbis or AAC

Use Case: Ending Cinematics

Each main route unlocks a 30s video (stylized credits).

The gallery becomes a "cinematheque" of reached endings.

14. Timeline — Visual Story Map

The Timeline is a graphic representation of all your scenes and their connections, essential for visualizing complex narrative structure.

14.1 Timeline Interface

Access: ⚙️ TOOLS → Timeline

Zone Function
Central Canvas Graph of scenes and connections
Toolbar Zoom, layout, navigation
Legend Colors by scene type
Zoom Info Current scale

14.2 Visual Node Types

Color Type Description Identification
🟢 Green Start Unique entry point start or first scene
🔵 Blue Narrative Standard dialogue/choice scene Majority of project
🟠 Orange Logic Invisible scene, calculations isLogicScene: true
🟣 Purple Ending Scene with no exit No next, no choices
🔴 Red Orphan Never referenced scene No incoming connections

14.3 Navigation and Manipulation

Action Method Result
Pan Drag and drop Move view
Zoom Wheel or buttons 🔍+/🔍− 50% to 200%
Fit Button ⬜ Fit Entire graph visible
Reset Button ↺ 100% Zoom 100%, center position
Selection Click node Open scene editor

14.4 Available Layouts

Layout Description Usage
Auto Force-directed algorithm Exploration, pattern detection
Horizontal Left → Right flow Linear reading, chapters
Vertical Top → Bottom flow Vertical progression, ascent/descent

14.5 Reading Structure

Example: Problem Detection

You see a 🔴 red node (orphan) named secret_ending_good.

Investigation:

  • Check choices — none point to secret_ending_good
  • Check triggers — no goto to this scene
  • Check global events — nothing either

Diagnosis: This scene exists but is inaccessible. Either:

  • You forgot a connection (bug)
  • It's intentional (future content, unimplemented secret)

Example: Flow Optimization

Timeline in Horizontal layout shows:

[start] → [intro] → [hub] ─┬→ [route_A] → [ending_A1]
                           ├→ [route_B] → [ending_B1]
                           └→ [route_C] → [ending_C1]

All routes converge from hub. Verify that hub indeed has the 3 corresponding choices.

14.6 Development Workflow

Phase Timeline Action Objective
Prototyping Create empty scenes, connect Validated narrative structure
Writing Progressive coloring (blue dominant) Content coverage
Test Check absence of 🔴 red Total accessibility
Polish Identify 🟣 purple Multiple endings confirmed

16. Stats — Monitoring Project Health and Size

The Stats panel monitors in real-time the technical health and size of your project, preventing issues before export.

16.1 Dashboard

Metric Value Alert Threshold
Words Total word count
Scenes Number of scenes
Images Total image size > 2MB recommended WEBP
Music Music size > 5MB recommended compression
SFX Sound effects size
Videos Video size > 10MB strongly advised
TOTAL Export file weight > 50MB critical
Mobile Load Estimated load time > 10s problematic

16.2 Visual Distribution

Proportional colored bar:

  • 🟢 Green (Images)
  • 🔵 Blue (Music)
  • 🟠 Orange (SFX)
  • 🟣 Purple (Videos)

Immediate identification of dominant asset type.

16.3 Asset Alerts

Automatic detection of large files:

Level Condition Suggested Action
Warning > 2MB Compression recommended
Critical > 10MB Compression strongly advised
Rejection > 20MB (on import) Import blocked, compression mandatory

Alert Example:

⚠️ orchestral_theme.mp3 — 8.5 MB

Advice: Convert to OGG 64kbps → ~2 MB without perceptible audible loss

16.4 Project Health

Automatic software validation:

Type Detected Problem Severity
🔴 Error Missing scene (non-existent reference) Blocking
🔴 Error Undeclared variable used Blocking
🔴 Error Logic scene without exit Blocking
🟠 Warning Orphan scene (never referenced) Risk
🟠 Warning Dead-end without choices or next Risk
🟠 Warning Type mismatch (operation on text) Risk
🔵 Info Declared variable but never used Optimization

16.5 Quality Workflow

Step Stats Check Action
Alpha Milestone Size < 10MB If higher: image audit
Beta Milestone Health Check = 0 error Resolve all 🔴
Pre-release Mobile Load < 5s Final optimization
Final Export Size < 50MB Otherwise: chapters

17. CONFIG — Global Project Configuration

The CONFIG panel centralizes all settings defining the identity and global behavior of your visual novel.

17.0 Capsule System Requirements

Component Requirement Notes
Capsule Studio (Editor) Windows 10 or Windows 11 (64-bit) Installation required. Download from capsulevn.com
Capsule HTML2EXE Windows 10 or Windows 11 (64-bit) Bundled with Capsule. Converts HTML to Windows .exe
Capsule HTML2APK Windows 10 or Windows 11 (64-bit) Bundled with Capsule. Converts HTML to Android .apk
Exported Game (HTML) Any modern browser on any OS Chrome, Firefox, Safari, Edge. Works on Windows, macOS, Linux, iOS, Android
Exported Game (.exe) Windows 10 or Windows 11 Player-facing desktop app
Exported Game (.apk) Android 4.4+ (API 19) Player-facing mobile app
Current Engine Version v1.9.0 As of February 2026

17.1 Access and Architecture

Access: 🏠 Button (house) in header or ⚙️ TOOLS → Config navigation.

Section Function Impact
Game Title Narrative identity Main menu, window title
Languages Multilingual support Dialogue structure, player selector
Menu Background Welcome atmosphere First impression
Menu Music Sound ambiance Immersion before game
Developer Mode Test tools In-game debug panel
Auto-Start Startup flow Skip main menu

17.2 Game Title

Property Description Constraints
Text Name shown on main menu 50 chars max recommended
Render Centered, system typography if no image Responsive

Example: Title Evolution

  • Prototype phase: "MY GAME"
  • Production phase: "Chronicles of Aetheria: The Hollow Crown"

The title can be modified at any time without impacting saves.

17.3 Languages — Multilingual Management

Capsule supports 5 native languages with adapted dialogue structure.

Available Languages

Code Language Flag Icon
en English 🇺🇸
fr Français 🇫🇷
es Español 🇪🇸
de Deutsch 🇩🇪
it Italiano 🇮🇹

Configuration

Format: codes separated by commas, no spaces

Configuration: en,fr,es

Result: The game offers three languages in Options.

Impact on Dialogue Structure

Each dialogue line becomes a multilingual object:

Internal structure:
{
  "en": "Hello, traveler.",
  "fr": "Bonjour, voyageur.",
  "es": "Hola, viajero."
}

In the editor: Additional fields appear for each configured language.

Concrete Example: Trilingual Configuration

CONFIG → Languages: en,fr,de

Dialogue Editor displays:

[EN] "Welcome to the tavern."
[FR] "Bienvenue à la taverne."
[DE] "Willkommen in der Taverne."

The player selects language in Options → all text switches.

Default Language

The first language in list is default:

  • At first launch
  • If player language is unavailable
  • For untranslated dialogues (fallback)

17.4 Menu Background

Type Support Recommendation
Image WEBP, PNG, JPG 1920×1080, game atmosphere
Video MP4, WebM Silent loop, < 10MB

Static Image

Example: Epic Fantasy

  • Image: menu_hero_standing.webp
  • Hero silhouetted against sunset
  • Warm tone, promise of adventure
  • Title logo overlaid

Animated Video

Optimal Specs:

  • Duration: 10-30 seconds (smooth loop)
  • Codec: H.264 (MP4) or VP9 (WebM)
  • Audio: None (music managed separately)
  • Size: < 5MB for fast loading

Example: Sci-Fi

  • Video: menu_hyperspace_loop.mp4
  • Passing stars, warp effect
  • Perfectly seamless loop
  • Creates illusion of moving ship
Autoplay Handling: Browsers block autoplay. Capsule detects first user click to start video silently.

17.5 Menu Music

Property Description Recommended Format
File Looping track OGG or MP3
Bitrate Quality vs size 128 kbps
Length Natural loop 30-120 seconds

Behavior:

  • Automatic playback after first click (browser constraint)
  • Infinite loop while menu is displayed
  • Fade on scene change (crossfade if different music)
  • Immediate stop on NEW GAME

Example: Memorable Theme

  • Track: main_theme.ogg
  • 60 seconds, A-B-A' structure
  • Recognizable from first notes
  • Orchestral reprise in key game moments

17.6 Developer Mode

Enables a complete debug panel accessible in-game.

Function Description Usage
Toggle panel Button 🛠️ or shortcut Show/Hide
Variable inspector Real-time list Verify values
Inline editing Click value → modify Scenario testing
Scene jump Dropdown → selection Instant navigation
History breadcrumb Last 5 scenes Quick backtrack
Event log Chronological log Execution audit
Rollback Automatic snapshots -1, -5, or full list
State export JSON copy Bug report sharing

Activation

CONFIG → Developer Mode → ☑️ Enable Dev Mode
The button 🛠️ appears in top-right corner in-game.

Dev Panel Interface

┌─────────────────────────────┐
│ 🛠️ DEV MODE              ✕  │
├─────────────────────────────┤
│ CURRENT SCENE: forest_ambush │
│ LANGUAGE: EN                │
├─────────────────────────────┤
│ ⚙️ COUNTERS                 │
│ Redirects: 3/100            │
│ Logic Depth: 0/50           │
├─────────────────────────────┤
│ 📊 VARIABLES [🔍 Filter]    │
│ gold        │ 150           │
│ health      │ 8      [edit] │
│ hasKey      │ true   [edit] │
├─────────────────────────────┤
│ 🌐 GLOBAL EVENTS            │
│ #1: reputation >= 50 │ ✓   │
│ #2: day > 7          │ ○   │
├─────────────────────────────┤
│ JUMP TO SCENE [dropdown ▼]  │
├─────────────────────────────┤
│ ⏪ ROLLBACK: 12 snapshots   │
│ [-1] [-5] [📋 List]         │
├─────────────────────────────┤
│ 📋 EVENT LOG                │
│ 14:32:05 🎬 Enter: start    │
│ 14:32:18 📊 gold: 0 → 150   │
│ 14:32:45 ⚡ Trigger fired   │
└─────────────────────────────┘

Rollback system (v1.6.3+)

Automatic saves at each narrative scene:

Command Effect Usage
-1 Return previous scene Immediate correction
-5 Return 5 scenes back Branch testing
📋 List All snapshots Precise navigation

Each snapshot contains:

  • Scene and dialogue index
  • All variable values
  • Full inventory
  • Global events triggered

Example: Narrative Branch Test

You test a romance. At scene 45, you realize a choice at scene 12 blocked the route.

Action: Rollback → select snapshot scene 11 → modify variable affection_elara → re-test.

Time saved: minutes instead of replaying from start.

State Export (Debug)

Button 📋 COPY GAME STATE copies to clipboard:

{
  "currentScene": "palace_confrontation",
  "textIndex": 2,
  "variables": {
    "gold": 150,
    "reputation": 45,
    "hasRoyalSeal": true
  },
  "inventory": {
    "healing_potion": 3,
    "ancient_key": 1
  },
  "triggeredEvents": [0, 3],
  "timestamp": "2024-01-15T14:32:18Z"
}

Usage: Paste into bug report, share with team, or manually restore.

17.7 Auto-Start

Skips title screen to start immediately.

State Behavior Usage
Disabled Main menu displayed Standalone game, first experience
Enabled start scene directly Multi-chapters, demo, narrative sequel

Use Case: Multi-chapters

Project structure:
├── chapter1.html (Auto-Start: OFF)
├── chapter2.html (Auto-Start: ON)
├── chapter3.html (Auto-Start: ON)
└── epilogue.html (Auto-Start: ON)

Player Flow:
chapter1.html → menu → NEW GAME → play
Final scene: Jump to HTML File: chapter2.html
chapter2.html starts immediately (no menu)
Variables transferred automatically via localStorage

Example: Saga in 3 Acts

Act I: Introduction, fundamental choices, cliffhanger

  • Export: aetheria_act1.html (Auto-Start: OFF)

Act II: Consequences, new alliances, revelation

  • Export: aetheria_act2.html (Auto-Start: ON)
  • Detection: if Act I variables absent, message "Please play Act I first"

Act III: Climax, multiple endings, epilogue

  • Export: aetheria_act3.html (Auto-Start: ON)

Audio Handling in Auto-Start

Browsers block audio autoplay. Capsule handles this:

Auto-Start Behavior:
1. start scene displays immediately
2. Music/SFX waiting for first click
3. First click anywhere → unlock audio
4. Normal playback thereafter
Tip: Start with a visually strong but silent scene, or with text prompting click: "Touch the screen to begin your journey."

18. Integration Example — Complete Project

To illustrate the interconnection of all features, here is the complete configuration of a professional visual novel.

18.1 GLOBAL CONFIGURATION

┌─────────────────────────────────────────┐
│  🏠 HOME SCREEN CONFIGURATION           │
├─────────────────────────────────────────┤
│  Game Title: "Chronicles of Aetheria"   │
│                                         │
│  Languages: en,fr,es                    │
│                                         │
│  Menu Background:                       │
│  ☑️ Video → menu_loop.mp4 (WebM, 8MB)   │
│                                         │
│  Menu Music:                            │
│  ☑️ main_theme.ogg (128kbps, loop 60s)  │
│                                         │
│  Developer Mode:                        │
│  ☑️ Enable Dev Mode                     │
│                                         │
│  Auto-Start:                            │
│  ☐ Disabled (main menu active)          │
└─────────────────────────────────────────┘

18.2 CONFIGURED ACTORS

ID Display Name Color Sprites
lyra "Lyra" #9C27B0 default, happy, determined, sad, battle
kael "Kael" #2196F3 default, smirk, angry, wounded, heroic
mysterious "???" → "The Archon" #FFD700 hooded, revealed, triumphant, defeated

18.3 UI CUSTOM

Element File Opacity Notes
Dialogue Box ui_dialogue_fantasy.webp 0.90 Ornate parchment
Name Box ui_name_banner.webp 1.0 Fabric banner
Choice Buttons ui_choice_stone.webp 1.0 Runic stone
Menu Buttons ui_choice_stone.webp 1.0 Identical to choice
Game Title title_aetheria_logo.webp 1.0 Logo with light effects

Default Appearance:

  • Font: 'Palatino Linotype', serif
  • Shape: shape-gem
  • Colors: gold #D4AF37, brown #3E2723, cream #FFF8E1

18.4 ENABLED HUD

Position: Top Left
Style: Compact
Background: Dark

Displayed Variables:
┌─────────────────┐
│ 💰 150 ❤️ 8 🔮 25 │
└─────────────────┘

18.5 CG GALLERY

ID Title Type Unlock
cg_lyra_smile "First Smile" Image Scene lyra_bonding
cg_kael_heroic "The Captain Stands" Image Scene battle_victory
cg_archon_reveal "Truth Unveiled" Image Scene plot_twist
cg_ending_good "A New Dawn" Video Scene ending_good (30s)
cg_ending_bad "Ashes of Aetheria" Video Scene ending_bad (30s)
cg_secret "The Developer's Room" Image Variable foundSecret = true

18.6 NARRATIVE FLOW (Timeline)

[start] → [intro] → [village_hub] ──┬──→ [lyra_route] ──→ [lyra_ending]
                                    ├──→ [kael_route] ──→ [kael_ending]
                                    └──→ [archon_early] ──→ [bad_ending_1]

[village_hub] requires: day < 7
If day >= 7: force [archon_confrontation]

18.7 QUALITY CONTROL POINTS

Verification Tool Frequency
Orphan scenes Timeline After each scene creation
Undeclared variables Health Check Real-time
Project size Stats Before each export
Narrative consistency Global Search Search "TODO", "FIXME"
Ending accessibility Timeline Beta Milestone

19. Advanced Mechanics — Design Recipes

This section presents complete design patterns, ready to implement, for sophisticated game mechanics.

19.1 Complete D&D Dice System (Roll + Add)

Capsule v1.8.0 introduces the Roll + Add action for skill checks Dungeons & Dragons style.

Pattern: Strength Check with Bonus

Context: Player attempts to lift a heavy door. Result = d20 + Strength modifier.

Configuration in 3 triggers:

Order Trigger Condition Action Role
1 roll_strength Always (none) Roll + Add: d20 + strengthMod → result Roll dice
2 check_success result >= 15 Go to: door_opened Success
3 check_failure result < 15 Go to: door_stuck Failure

Detail of Roll + Add Action:

Action Type: Roll + Add
Dice: min 1, max 20
Source Variable: strengthMod (character value, ex: +3)
Target Variable: result

Numerical Example:

  • strengthMod = 3 (strong hero)
  • Roll: 14 on d20
  • Calculation: 14 + 3 = 17
  • result = 17
  • Trigger 2 fires (17 >= 15) → door_opened

Variant: Degrees of Success

DC (Difficulty Class) Result Destination
20+ Critical Success door_perfect (bonus treasure)
15-19 Success door_opened
10-14 Partial Success door_partial (noise, alert)
< 10 Failure door_stuck (minor injury)

Implementation: 4 triggers in cascade

Trigger 1: roll → result = d20 + mod
Trigger 2: if result >= 20 → door_perfect
Trigger 3: if result >= 15 → door_opened  
Trigger 4: if result >= 10 → door_partial
Trigger 5: (no condition) → door_stuck [fallback]
Ordering Tip: Triggers evaluate top-to-bottom. Place most restrictive conditions first (20+ before 15+).

19.2 Turn-Based Combat System

Complete Architecture

Component Type Description
combat_init Logic Scene Initialization, roll initiative
combat_round Logic Scene Central round hub
combat_player Narrative Player turn, action choice
combat_enemy Narrative Enemy turn, narration
combat_end_victory Narrative Combat end, rewards
combat_end_defeat Narrative Game over or retreat

Phase 1: Initiative (Roll + Add)

Scene combat_init (Logic):

Variable Calculation Usage
playerInit d20 + dexterity Player reactivity
enemyInit d20 + enemyDex Enemy reactivity

Routing Triggers:

Trigger: player_first
  IF: playerInit >= enemyInit
  THEN: Go to combat_player

Trigger: enemy_first  
  IF: playerInit < enemyInit
  THEN: Go to combat_enemy

Phase 2: Player Turn (Choice + Actions)

Scene combat_player:

Choice Action Condition
"Attack" damage = d8 + strength, enemyHP -= damage Always
"Defend" defense = true (turn flag) Always
"Use item" Open inventory potions > 0
"Flee" Attempt retreat Always

Consequence: All choices lead to combat_check_end

Phase 3: End Combat Check

Scene combat_check_end (Logic):

Trigger: victory
  IF: enemyHP <= 0
  THEN: Go to combat_end_victory

Trigger: defeat
  IF: playerHP <= 0
  THEN: Go to combat_end_defeat

Trigger: continue_player
  IF: playerInit >= enemyInit AND lastActor = "enemy"
  THEN: Go to combat_player

Trigger: continue_enemy
  IF: enemyInit > playerInit AND lastActor = "player"
  THEN: Go to combat_enemy

Phase 4: Iteration

The logic combat_check_end redirects to:

  • End if victory/defeat condition met
  • Next turn if combat continues

Timeline Visualization:

[combat_init] → [combat_player] ↔ [combat_enemy]
       ↓              ↓                  ↓
[combat_end_victory] ← [combat_check_end] → [combat_end_defeat]

19.3 Quest System with States

Pattern: 3-Step Quest

Step Variable Value Associated Scene
Not started quest_blacksmith 0 village_hub (no clue)
Accepted quest_blacksmith 1 blacksmith_request
Materials collected quest_blacksmith 2 blacksmith_progress
Completed quest_blacksmith 3 blacksmith_complete

Implementation with Conditional Triggers:

In village_hub, an NPC changes dialogue based on state:

Trigger: quest_not_started
  IF: quest_blacksmith = 0 AND hasMetBlacksmith = false
  THEN: Go to blacksmith_intro

Trigger: quest_active  
  IF: quest_blacksmith = 1
  THEN: Go to blacksmith_reminder

Trigger: quest_ready
  IF: quest_blacksmith = 2
  THEN: Go to blacksmith_almost

Trigger: quest_done
  IF: quest_blacksmith = 3
  THEN: Go to blacksmith_thanks

19.4 Faction Reputation System

Multi-Faction Architecture

Faction Variable Thresholds Consequences
Guild rep_guild -10, 0, 10, 25 Quest access, shop prices
Cult rep_cult -10, 0, 10, 25 Infiltration possible, secret ending
Guard rep_guard -10, 0, 10 Combat aid, arrest

Example of Multi-Impact Choice:

Choice: "Turn the thief over to the Guild"
- Action: rep_guild + 5
- Action: rep_cult - 3 (thief was an informant)
- Action: rep_guard + 2 (justice served)

Faction Ending Condition:

Scene: ending_faction_check (Logic)

Trigger: guild_ending
  IF: rep_guild >= 25 AND rep_cult < 0
  THEN: Go to ending_guild_master

Trigger: cult_ending
  IF: rep_cult >= 25
  THEN: Go to ending_cult_leader

Trigger: balanced_ending
  IF: rep_guild >= 10 AND rep_cult >= 10
  THEN: Go to ending_peacemaker

20. Professional Production Tips

20.1 Development Workflows

"Prototype → Polish" Method

Phase Duration Objective Capsule Tools
Structure 10% Narrative architecture Timeline, empty scenes
Greybox 20% Functional flow, placeholders Variables, basic triggers
Content 50% Dialogue, images, audio Rich editor, batch import
Polish 15% Transitions, effects, QA Health Check, Stats, Dev Mode
Export 5% Optimization, packaging Compression, multi-chapters

Parallel Development

Track Responsible Deliverable
Narrative Writer Full script, choice trees
Visual Artist Backgrounds, UI sprites, CG
Technical Integrator Variables, triggers, logic
Audio Composer BGM loops, SFX library

Synchronization: Integrator imports assets progressively, tests immediately in Capsule.

20.2 Asset Optimization

Images — Recommended Pipeline

Source (PSD/PNG) → Export 1920×1080 → WebP Conversion → Capsule Import
         ↓
    [Quality 90%, effort 6]
         ↓
    Typical size: 200-500 KB vs 2-5 MB PNG

Audio — Target Specifications

Type Format Bitrate Max Duration Target Size
BGM loop OGG 128 kbps 60-120s < 2 MB
Ambiance OGG 96 kbps Infinite loop < 1.5 MB
SFX OGG 64 kbps < 5s < 50 KB each
Voice (if used) OGG 160 kbps Phrase < 200 KB

Video — Optimal Encoding

Input: 1920×1080 30fps
↓
Codec: VP9 (WebM) or H.264 (MP4)
Bitrate: 2-5 Mbps
Audio: AAC 128kbps or Ogg Vorbis
↓
Target: < 10 MB for 30 seconds

20.3 Efficient Debugging

Test Logbook

Create a debug_log variable (text):

Action in key scenes:
- debug_log = debug_log + "[Scene: " + currentScene + ", Vars: " + gold + "/" + health + "]\n"
Export via Dev Mode → Copy Game State to trace paths.

Systematic Branch Testing

Test Method Verification
All choices Dev Mode → Jump + Rollback Each destination accessible
Conditions Inline edit variables Boundary behavior (0, max)
Inventory Massive Add/Remove Stack limits, consumables
Endings Timeline → isolated endings Each ending reachable

20.4 Save Patterns

Implicit Checkpoint System

Automatic Save Scenes (invisible):

[chapter1_checkpoint] (Logic)
- Action: save_slot = "auto_ch1"
- Next: chapter1_continues

Detection on load:
- If save_slot starts with "auto_" → display "Continue Chapter X"

Persistent Meta-Progression

Variables stored outside scenario save (via global event):

Variable Usage Persistence
unlocked_chapters Access to next chapters Separate localStorage
gallery_unlocked CG Gallery (native) Automatic
achievements Unlocked achievements Global event + localStorage

20.5 Multi-Platform Release Checklist

When preparing a release across HTML, EXE, and APK simultaneously:

Step HTML HTML2EXE (.exe) HTML2APK (.apk)
Asset optimization WEBP/OGG, <20 MB/chapter Same as HTML More aggressive: WEBP 75%, OGG 64kbps, <15 MB/chapter
Test platform Chrome + Firefox Run .exe on clean Windows install Test APK on at least one real Android device
App icon Not required ICO file (256×256 recommended) PNG 512×512 (all Android densities auto-generated)
Multi-chapter links Files must be in same folder on server Add all chapters in HTML2EXE Add all chapters in HTML2APK
First-run test Open incognito window (no cached saves) Test on a fresh Windows user account Uninstall/reinstall APK on device

20.6 Advanced Internationalization

Text Length Management

Language Ratio vs EN Advice
English 1.0x Reference
French 1.15x Plan 20% margin
German 1.25x Compact phrases, check overflow
Spanish 1.10x Watch combined accents
Italian 1.05x Close to English

Test: Enable all languages, visually verify text fits in dialogue boxes.

Cultural Content

Element Adaptation Technique
Proper Names Kept or translated Variable heroName vs fixed text
Units Metric/Imperial Variable useMetric + conditional display
References Localized Conditional choices per language
Humor Rewriting Alternative scenes per language

Implementation of Conditional Content per Language:

Scene: joke_scene

Dialogue EN: "That's what she said."
Dialogue FR: "C'est pas faux."
Dialogue ES: "Como dicen por ahí."

Alternative: Create a logic scene `joke_router`:
- Trigger: if lang = "en" → joke_english
- Trigger: if lang = "fr" → joke_french
- Trigger: if lang = "es" → joke_spanish

20.7 Security and Robustness

Player Input Validation (Text Input)

Type Validation Example
Text Max length, forbidden chars Name: 20 chars, no <>
Number Range, integer vs float Age: 18-120, integer
Code Exact match, case insensitive "AETHER-7349" = "aether-7349"

Implicit Sanitization: Capsule automatically escapes dangerous HTML characters (<, >, &, ", ') in text inputs.

Anti-Cheat Protection

Vector Protection Limitation
JavaScript Console Minified export Determined, not inviolable
Edit variables Dev Mode disabled in production CONFIG Checkbox
LocalStorage edit Save checksum Not native, manual implementation

20.8 Performance and Scale

Scene Limit

Factor Recommendation Symptom of Excess
Number of scenes < 500 per file Slow editor, long export
Variables < 200 Health Check hard to read
File size < 20 MB Import rejection, mobile crash

Chaptering Strategy:

Project "War and Peace" (2000+ scenes):

chapter1.html: Scenes 1-400, Prologue → Act I
chapter2.html: Scenes 401-800, Act II
chapter3.html: Scenes 801-1200, Act III
chapter4.html: Scenes 1201-1600, Act IV
chapter5.html: Scenes 1601-2000, Act V + Epilogue

Key variables transferred: rep_guild, rep_cult, heroName, gold, level

Load Time Optimization

Technique Impact Implementation
Lazy loading images -50% initial Not native, prefer chapters
Audio streaming -30% size Not applicable (monolithic)
Asset compression -70% size WEBP, OGG, WebM mandatory
Split code -40% initial JS Multi-chapter export

21. Interactive Scenario Recipes

21.1 Emotional Feedback Loop

Step Mechanic Example
Setup Establish expectation "The treasure is behind this door"
Choice Significant decision "Force / Pick Lock / Find Key"
Consequence Immediate feedback Sound, animation, variable modified
Revelation Narrative payoff Treasure obtained, or trap triggered
Deferred Consequence Recall later Key used elsewhere, or guard alerted

21.2 The 3-7-10 Rule

Element Optimal Number Why
Simultaneous Choices 3-4 Analysis paralysis beyond
Major Branches 7 ± 2 Human working memory
Distinct Endings 10+ Replay value, community

21.3 Narrative Tension Management

Ideal Tension Curve:

Tension
  ↑
  │    ╭─╮      ╭──╮        ╭──╮
  │   ╱   ╲    ╱    ╲      ╱    ╲_____
  │  ╱     ╲__╱      ╲____╱          ╲___
  │ ╱                                    ╲___
  │╱                                          ╲___
  └────────────────────────────────────────────────→ Time
    Intro  Conflict1 Conflict2  Climax  Resolution

Choice Points: ↓ (moderate tension, possible decision)
               ↓ (max tension, forced decision)

Capsule Implementation:

Moment Technique Tool
Rise Increasing visual effects fx-rain → fx-rain-heavy → fx-storm
Choice under tension QTE Timer 5-10 seconds
Climax Invisible choices + conditions Hidden style, conditional revelations
Resolution Slow transition, calm music fade_white, BGM volume reduced

22. Integration and Deployment

22.1 Pre-Export Checklist

Category Verification Tool
Functional All scenes accessible Timeline (no 🔴)
Narrative Endings reachable, no blocks Dev Mode → test each branch
Technical 0 Health Check errors Health Panel
Performance Size < 20 MB, mobile < 5s load Stats panel
Quality No visible placeholders Global Search "TODO", "FIXME"
Accessibility Sufficient contrast, text size Preview at different resolutions

22.2 Distribution Platforms

Platform Format Conversion Tool Specifics
Web (any browser) HTML — (native export) GitHub Pages, itch.io embed, Netlify, direct link
itch.io (downloadable) .exe / .apk HTML2EXE / HTML2APK Upload as "Windows" or "Android" release. Thumbnail 630×500.
Steam .exe HTML2EXE Steamworks/Partner required. Wrap .exe in SteamPipe depot.
Google Play Store .apk / .aab HTML2APK $25 Google Developer account. Play Console submission process.
Android Sideload .apk HTML2APK Share APK directly. Player enables "Unknown Sources" on device.
Mobile (PWA) HTML + manifest — (manual) Add web manifest to HTML for installable web app. Touch optimized.
Personal Archive HTML — (native export) Guaranteed longevity, no dependencies, fully playable offline forever.

22.3 Post-Launch

Activity Frequency Tool
Analytics Continuous Manual integration (Google Analytics, Plausible)
Hotfixes Urgent New version, same URL or notification
Content patches Monthly Additional chapters, new endings
Community Continuous Discord, forums, integrated feedback v1.9+

23. CapsuleScript (.cvl) — The Domain-Specific Language

CapsuleScript is the native scripting language of Capsule VN Engine, designed specifically for visual novel authoring. A .cvl file is a plain-text script that encodes your entire visual novel — scenes, dialogues, actors, variables, choices, triggers, and more — in a human-readable format. You write your story in a text editor, then import it into Capsule with a single click.

CapsuleScript is not a programming language. You do not need to know how to code. It is a structured notation — like writing a screenplay with a fixed formatting convention — that Capsule's parser translates directly into a playable game.

23.1 Why Use CapsuleScript?

Use Case Benefit
Fast bulk authoring Write dozens of scenes in minutes without clicking through the visual editor
Version control Plain-text files work perfectly with Git, allowing diff, merge, and history
Collaborative writing Writers can deliver a .cvl file — no Capsule installation required on their side
Script migration Convert existing scripts from Final Draft, Fountain, or Word with a simple reformat
AI-assisted writing CapsuleScript's predictable syntax is ideal for LLM-generated content pipelines
Rapid prototyping Stub out an entire branching structure in 10 minutes, then fill details in the visual editor

23.2 Importing a .cvl File

There are two ways to import CapsuleScript into your project:

  • Via Tools: ⚙️ TOOLS → DSL Script → 📂 Choose File → select your .cvl file → click Import
  • Via drag and drop: Drag any .cvl file directly onto the Capsule studio window

The parser reads the file and creates all declared scenes, variables, actors, and configuration in your project. Existing scenes with matching IDs are merged (their content is updated). New scene IDs are added to the list.

Important: Import does not delete existing scenes. It only creates or updates. To rebuild a project from scratch from a .cvl file, start with a new empty project before importing.

23.3 File Structure Overview

A .cvl file is organized into blocks. Each block starts with a keyword on its own line and ends when the next block begins or the file ends. Blocks can appear in any order. Here is the top-level anatomy:

# CapsuleScript v1.9
# Lines starting with # are comments — ignored by the parser

CONFIG
  title: "My Visual Novel"
  languages: en,fr

VARIABLE name type default
  gold       number  0
  heroName   text    "Alex"
  hasKey     bool    false

ACTOR id
  name: "Display Name"
  color: #hexcolor
  sprite expression: url_or_base64

SCENE scene_id
  bg: background_url
  music: music_url
  # ... scene content ...

CHOICES
  -> "Button text" scene_id
  -> "Another option" other_scene_id
Whitespace Rules: Indentation is for readability only — the parser ignores leading spaces and tabs. What matters is the keyword at the beginning of each block. Blank lines are also ignored. Use any indentation style you prefer.

23.4 Comments

Lines starting with # are comments. They are completely ignored by the parser and can appear anywhere.

# This is a comment — write notes for yourself here
SCENE tavern_intro
  # TODO: add background image later
  bg: placeholder.webp
  text: "The tavern is dimly lit." # inline comments are also supported

23.5 CONFIG Block

The CONFIG block defines global project settings. It maps directly to the CONFIG panel in the visual editor.

CONFIG
  title: "Chronicles of Aetheria"
  languages: en,fr,es
  autostart: false
  devmode: true
  menubg: menu_loop.mp4
  menumusic: main_theme.ogg
Key Type Description Example
title text (quoted) Game title shown on main menu "Chronicles of Aetheria"
languages comma-separated codes Active languages (no spaces) en,fr,es
autostart true / false Skip main menu on load false
devmode true / false Enable developer debug panel true
menubg URL / filename Main menu background image or video menu.webp
menumusic URL / filename Main menu looping music track theme.ogg

23.6 VARIABLE Block

Declares all project variables. Each line after VARIABLE declares one variable: name type default_value.

VARIABLE name type default
  gold         number   0
  heroName     text     "Alex"
  hasKey       bool     false
  reputation   number   50
  side         text     "neutral"
  questDone    bool     false
Type Keyword Default Syntax Example
Number number Integer or decimal gold number 0
Text text Quoted string heroName text "Alex"
Boolean bool true or false hasKey bool false
Tip: The header line VARIABLE name type default is literal — copy it exactly as shown. It is a fixed header that tells the parser the column order. The actual variable declarations begin on the lines that follow.

23.7 ACTOR Block

Declares a reusable character. One ACTOR block per character.

ACTOR elara
  name: "Elara"
  color: #D4AF37
  sprite default: elara_neutral.webp
  sprite happy: elara_smile.webp
  sprite sad: elara_tears.webp
  sprite determined: elara_fight.webp
  sprite surprised: elara_shock.webp
Key Description Example
name: Display name shown in dialogue boxes (quoted) name: "Elara"
color: Name color in dialogue (hex code) color: #D4AF37
sprite expression: Image URL or Base64 for a named expression. Repeat for each expression. sprite happy: elara_smile.webp

The actor ID (here elara) is the technical reference used in scene dialogue. The first sprite line defines the default expression — always include it.

23.8 SCENE Block — The Core

The SCENE block defines a single scene. The ID follows directly after the keyword: SCENE scene_id. The scene ID must be lowercase with no spaces (use underscores).

23.8.1 Scene Visual & Sound Properties

SCENE forest_path
  bg: forest_morning.webp
  music: ambient_birds.ogg
  sfx: leaves_rustle.ogg
  filter: sepia
  effect: floating_dust
  overlay: light_rays.webp
  transition: crossfade
  camera: ken_burns 0.2 15
Key Description Values
bg: Background image or video URL Any URL or filename
music: Looping background music Audio file URL
sfx: One-shot sound effect on scene entry Audio file URL
filter: Color grading filter none, sepia, noir, cold, warm, dream, horror
effect: Atmospheric particle effect rain, snow, sakura, fireflies, fog, glitch, embers, stars, and all others listed in section 6.4
overlay: Additional visual layer over background Image URL
transition: Entrance animation from previous scene cut, crossfade, fade_black, fade_white, slide_left, slide_right, zoom_in, flash, iris_in, and all others in section 6.3
camera: Cinematic camera mode with optional intensity and duration camera: ken_burns or camera: zoom_in 0.4 8 (mode intensity duration)
next: Auto-next scene ID (plays after last dialogue line) Scene ID
logic: true Marks scene as a Logic Scene (invisible, instant redirect) true

23.8.2 Characters in a Scene

Place characters in a scene with char: lines:

SCENE village_morning
  bg: village_square.webp
  char: elara default left
  char: kael smirk right
  char: merchant default center

Syntax: char: actorID expression position

Field Description Values
actorID The actor's technical ID (from ACTOR block) e.g. elara, kael
expression The expression name to display e.g. default, happy, angry
position Horizontal placement left, center, right, or a percentage like 25%

To change an actor's expression mid-scene (between dialogue lines), use expr::

SCENE confrontation
  char: elara default left
  char: kael default right
  say elara: "I trusted you."
  expr kael: angry         # Kael's expression switches to angry
  say kael: "You were naive to."
  expr elara: sad
  say elara: "..."

23.8.3 Dialogue Lines

Dialogue is written with say followed by the speaker ID and the line text:

say elara: "The forest path is clear today."
say kael: "Don't be fooled. Something feels wrong."
say: "A distant howl echoes through the trees."  # No speaker = narration

The speaker field is optional. Omitting it produces narration (no name box displayed).

Multilingual dialogue: When multiple languages are configured, use | to separate translations in order:

# CONFIG languages: en,fr,es
say elara: "The path is clear." | "Le chemin est dégagé." | "El camino está despejado."

Text formatting tags work identically inside dialogue:

say kael: "[b]Run![/b] The [shake]bridge[/shake] is collapsing!"
say: "You have [rainbow]{gold}[/rainbow] gold coins remaining."

23.8.4 Choices

Choices are declared with -> lines after a CHOICES keyword, or inline within a scene using the shorthand choice:.

Method 1 — Inline CHOICES block within a SCENE:

SCENE crossroads
  bg: crossroads.webp
  say: "The road forks ahead."
  CHOICES
    -> "Take the mountain pass"  mountain_pass
    -> "Follow the river road"   river_road
    -> "Camp here for the night" camp_scene

Method 2 — Standalone CHOICES block (for a dedicated Choice scene):

SCENE ending_choice_scene

CHOICES ending_choice_scene
  -> "Save the village" ending_village
  -> "Save the princess" ending_princess
  -> "Flee and survive" ending_coward

Conditional choices: Add a condition in square brackets after the target scene ID:

CHOICES
  -> "Unlock the gate"        gate_open     [hasKey = true]
  -> "Force the gate open"    gate_forced   [strength >= 8]
  -> "Look for another way"   gate_bypass
  -> "Give up"                retreat_scene

Choice style when condition fails — add a style keyword after the condition:

CHOICES
  -> "Buy the sword"   shop_sword  [gold >= 100]  locked    "Not enough gold."
  -> "Buy the staff"   shop_staff  [gold >= 80]   grayed    "Not enough gold."
  -> "Just browse"     shop_browse

Syntax for conditional choices with locked style and alternative text:

-> "Button text" target_scene [condition] style "alternative text when locked"
Style Keyword Effect when condition is false
locked 🔒 Grayed with padlock icon, not clickable. Shows alternative text if provided.
hidden Choice is completely invisible to the player.
grayed Grayed out, no icon, not clickable.

Choice actions: Choices can trigger variable or inventory operations on click. Add ! actions after the condition (or after the target if no condition):

CHOICES
  -> "Defend the village" village_aftermath ! heroism += 10 ! villageSaved = true
  -> "Run away"           coward_path       ! heroism -= 5 ! shame = true
  -> "Buy the potion"     shop_after        [gold >= 20]   ! gold -= 20 ! add:healing_potion

Action syntax:

Syntax Effect Example
var = value Set variable to a value ! side = "rebels"
var += n Add to variable ! gold += 50
var -= n Subtract from variable ! gold -= 20
add:itemID Add item to inventory ! add:healing_potion
remove:itemID Remove item from inventory ! remove:old_key

23.8.5 Triggers within a Scene

Scene triggers are declared with trigger: lines. They execute at scene entry and follow Capsule's standard trigger logic (top-to-bottom, first redirect wins).

SCENE throne_room
  bg: throne.webp
  trigger: start [hasRoyalSeal != true] goto: throne_denied
  trigger: start [day >= 7] goto: late_arrival
  say king: "Ah, you finally come before me."

Syntax: trigger: when [condition] action: target

Field Values Example
when start (scene entry) or end (after last dialogue) trigger: start
[condition] Optional. Same operators as choices: =, !=, >, <, >=, <=. Omit brackets for unconditional trigger. [gold >= 100]
action goto: scene_id to redirect, set: var op val to modify variable, sound: file to play SFX goto: combat_init

Multi-action triggers: Separate actions with |:

trigger: start [enemyMet = false] set: enemyMet = true | sound: sting.ogg | goto: ambush_intro

23.9 LOGIC Scene

Logic Scenes are invisible routing nodes. Declare them by adding logic: true to a SCENE block. They must have at least one trigger: or next: to avoid creating a dead-end.

SCENE hub_district
  logic: true
  trigger: start [district = "market"]  goto: market_scene
  trigger: start [district = "temple"]  goto: temple_scene
  trigger: start [district = "docks"]   goto: docks_scene
  next: district_default
SCENE calc_damage
  logic: true
  trigger: start set: damage = dice(1,8) | set: enemyHP -= damage
  next: combat_check
Best Practice: Always end a Logic Scene with next: fallback_scene_id as a failsafe. If no trigger fires (none of the conditions are true), the next: catches the player and prevents a dead-end.

23.10 INVENTORY Block

Defines all collectible items in one block. Each line after INVENTORY declares one item.

INVENTORY
  healing_potion  "Healing Potion"  💊  "Restores 5 HP."     stack:10  consumable:true
  ancient_key     "Ancient Key"     🗝️  "Fits an old lock."  stack:1   consumable:false
  gold_coin       "Gold Coin"       🪙  "Shiny."             stack:99  consumable:false
  map_of_aetheria "Map of Aetheria" 🗺️  "Marks safe routes." stack:1   consumable:false

Syntax per item: id "Display Name" icon "Description" stack:N consumable:true/false

23.11 HUD Block

Configures the on-screen variable display.

HUD
  enabled: true
  position: top-left
  style: compact
  background: dark
  show: gold        icon:💰
  show: health      icon:❤️
  show: mana        icon:🔮
  show: reputation  icon:👑  style:detailed
Key Values Description
enabled: true / false Turn HUD on or off globally
position: top-left, top-right, top-center Screen anchor point
style: compact, detailed, minimal Default display density
background: dark, light, transparent, blur HUD container background
show: variable_name icon:emoji Variable to display with its icon. Add style:detailed to override per-variable.

23.12 CG_GALLERY Block

Declares unlockable gallery items (images and videos).

CG_GALLERY
  cg_lyra_smile     "First Smile"       image  lyra_smile.webp       category:"Characters"
  cg_kael_heroic    "The Captain Stands" image  kael_battle.webp     category:"Main Story"
  cg_ending_good    "A New Dawn"         video  ending_good.mp4      category:"Endings"
  cg_ending_bad     "Ashes of Aetheria"  video  ending_bad.mp4       category:"Endings"
  cg_secret_room    "The Developer's Room" image secret.webp         category:"Secret"

Syntax: id "Title" image/video file_url category:"Category Name"

Automatic unlock: If the same image URL is used in a scene background AND in the gallery, Capsule automatically unlocks it when the player reaches that scene. Manual unlock requires a trigger action unlock_cg: cg_id in a scene.

23.13 Complete Scene Example — Putting It All Together

Here is a fully-featured scene demonstrating all syntax elements working together:

# ─────────────────────────────────────────────────────────
# Chronicles of Aetheria — Chapter 1 Opening
# ─────────────────────────────────────────────────────────

SCENE chapter1_start
  bg: forest_dawn.webp
  music: ambient_morning.ogg
  effect: floating_dust
  filter: warm
  camera: ken_burns 0.2 20
  transition: fade_black
  char: elara default left
  char: kael default right

  say: "Year 412 of the New Era. The war has been over for three years."
  say: "But not everyone has accepted the peace."

  expr elara: happy
  say elara: "Finally! I can see the capital from here, {actor:kael}."

  expr kael: smirk
  say kael: "Don't celebrate yet. We still have a [b]long[/b] road ahead."

  trigger: start [ch1_started = false] set: ch1_started = true

  CHOICES
    -> "Press forward quickly"     ch1_fast    ! resolve += 5
    -> "Rest before continuing"    ch1_rest
    -> "Check the map"             ch1_map     [has:map_of_aetheria]  locked "You have no map."

23.14 Full Project Template

A minimal but complete .cvl file for a new project:

# ═══════════════════════════════════════════
# my_game.cvl — CapsuleScript v1.9
# ═══════════════════════════════════════════

CONFIG
  title: "My Visual Novel"
  languages: en
  autostart: false
  devmode: false

VARIABLE name type default
  heroName     text     "Alex"
  gold         number   100
  affection    number   0
  hasKey       bool     false
  metNPC       bool     false

ACTOR hero
  name: "{actor:hero}"
  color: #4CAF50
  sprite default: hero_neutral.webp
  sprite happy:   hero_happy.webp
  sprite sad:     hero_sad.webp

ACTOR elara
  name: "Elara"
  color: #D4AF37
  sprite default: elara_neutral.webp
  sprite happy:   elara_smile.webp
  sprite sad:     elara_tears.webp
  sprite angry:   elara_angry.webp

INVENTORY
  healing_potion  "Healing Potion"  💊  "Restores health."  stack:5   consumable:true
  old_key         "Old Key"         🗝️  "Opens old locks."  stack:1   consumable:false

HUD
  enabled: true
  position: top-left
  style: compact
  background: dark
  show: gold    icon:💰
  show: affection icon:💕

# ─────────── SCENES ───────────

SCENE start
  bg: title_screen.webp
  music: main_theme.ogg
  transition: fade_black
  say: "A story begins..."
  next: intro

SCENE intro
  bg: village_morning.webp
  effect: floating_dust
  camera: slow_zoom 0.1 30
  char: elara default center
  say: "The village of Ashfeld. A place you have called home your whole life."
  say elara: "Oh! You're finally awake, {heroName}."
  CHOICES
    -> "Good morning, Elara." intro_friendly ! affection += 5
    -> "Leave me alone."      intro_rude     ! affection -= 3
    -> "What happened?"       intro_confused

SCENE intro_friendly
  char: elara happy center
  say elara: "Someone's in a good mood today! Here, I made breakfast."
  next: village_hub

SCENE intro_rude
  char: elara sad center
  say elara: "...I see. I'll leave it on the table then."
  next: village_hub

SCENE intro_confused
  char: elara default center
  say elara: "You don't remember? There was a [shake]loud noise[/shake] last night."
  next: village_hub

SCENE village_hub
  bg: village_square.webp
  music: village_theme.ogg
  say: "The village square is quiet. Where do you go?"
  CHOICES
    -> "Visit the market"      market_scene
    -> "Go to the old well"    well_scene    [metNPC = true]  hidden
    -> "Check your inventory"  check_inv
    -> "Leave the village"     road_to_city  [gold >= 50]     locked  "You need at least 50 gold to travel."

23.15 DSL Expressions — Conditions & Operators

All conditions used in triggers, choices, and scene logic follow the same syntax:

Operator Meaning Example
= Equal to [side = "rebels"]
!= Not equal to [metGuard != true]
> Greater than [gold > 50]
< Less than [health < 5]
>= Greater than or equal [level >= 3]
<= Less than or equal [wounds <= 2]
has:item Player has item in inventory [has:ancient_key]
!has:item Player does not have item [!has:cursed_amulet]

Combining conditions — use AND between multiple conditions:

trigger: start [rep_guild >= 10 AND day < 7] goto: guild_mission
-> "Join the council" council_scene [level >= 5 AND hasRing = true]

23.16 Advanced .cvl Patterns

Pattern 1: Branching Narrative Structure

SCENE chapter2_hub
  logic: true
  trigger: start [ch2_route = "guild"]   goto: guild_intro
  trigger: start [ch2_route = "cult"]    goto: cult_intro
  trigger: start [ch2_route = "neutral"] goto: neutral_intro
  next: neutral_intro  # fallback

# Each route is a separate scene chain...
SCENE guild_intro
  bg: guild_hall.webp
  music: guild_theme.ogg
  char: guild_master default center
  say guild_master: "Welcome to the Guild, recruit."
  next: guild_chapter2_main

Pattern 2: Global Events (Persistent Triggers)

Declare global events that fire on any scene where the condition becomes true:

GLOBAL_EVENT check_low_health
  condition: [health <= 0]
  action: goto: game_over

GLOBAL_EVENT reputation_milestone
  condition: [reputation >= 100]
  action: set: title = "Champion" | goto: title_unlock_scene

Pattern 3: Dice Roll System (D&D Style)

SCENE strength_check
  logic: true
  trigger: start set: roll_result = dice(1,20) + strengthMod
  trigger: start [roll_result >= 20] goto: door_critical
  trigger: start [roll_result >= 15] goto: door_success
  trigger: start [roll_result >= 10] goto: door_partial
  next: door_fail

SCENE door_critical
  bg: door_open.webp
  say: "Critical success! You rip the door clean off its hinges. [rainbow]Impressive.[/rainbow]"
  next: treasure_room

Pattern 4: Multi-Chapter Saga with Variable Transfer

SCENE chapter1_finale
  logic: true
  # These variables will carry over to chapter2.html
  trigger: start set: ch1_complete = true
  trigger: start [villageSaved = true] set: reputation += 25
  next: chapter1_end_screen

SCENE chapter1_end_screen
  bg: credits_ch1.webp
  music: ending_theme.ogg
  say: "[b]End of Chapter I[/b]"
  say: "Your choices echo forward..."
  # Jump to next chapter file is configured in CONFIG: nextfile: chapter2.html

23.17 Common Mistakes & How to Fix Them

Mistake Symptom Fix
Scene ID contains spaces Parser creates broken scene reference Use underscores: village_square not village square
Quoted text not closed Entire remaining file is treated as one string Check for missing closing " on every say or name line
Choice missing target scene Health Check reports "missing scene" error Every -> line must end with a valid scene ID
Logic scene with no exit Game hangs at that scene — infinite wait Always add next: fallback_id as the last line
Variable used before declaration Health Check warns "undeclared variable" Add every variable to the VARIABLE block before using it
Condition operator == (double equals) Condition never fires Capsule uses single = for equality, not ==
Sprite sheet expression name mismatch Default expression shows instead of animated one Expression name in char: must exactly match the name in sprite expressionName:
Multilingual | count mismatch Parser assigns wrong language to wrong text Every say line must have exactly N pipe-separated values where N = number of configured languages

23.18 CapsuleScript Quick Reference Card

═══════════════════════════════════════════════════════
CAPSULESCRIPT v1.9 — QUICK REFERENCE
═══════════════════════════════════════════════════════

BLOCKS
  CONFIG              Global project settings
  VARIABLE            Declare all variables
  ACTOR id            Define a character
  SCENE id            Define a scene
  CHOICES             Choice menu (inside or outside SCENE)
  INVENTORY           Define collectible items
  HUD                 Configure variable overlay
  CG_GALLERY          Declare unlockable gallery items
  GLOBAL_EVENT id     Declare persistent trigger

SCENE PROPERTIES
  bg:           Background image or video
  music:        Looping music
  sfx:          One-shot sound effect
  effect:       Particle effect (rain, snow, sakura...)
  filter:       Color filter (sepia, noir, warm...)
  overlay:      Additional image layer
  transition:   Entrance animation
  camera:       Camera mode [intensity] [duration]
  char:         actorID expression position
  next:         Auto-next scene ID
  logic: true   Mark as Logic Scene (invisible)
  trigger:      Conditional trigger (see below)

DIALOGUE
  say actorID: "text"       Character speaks
  say: "text"               Narration (no speaker)
  expr actorID: expression  Change expression mid-scene

  Multilingual: say actor: "EN" | "FR" | "ES"
  Tags: [b] [i] [u] [shake] [wave] [rainbow]
  Vars: {variableName}  {actor:actorID}

CHOICES
  -> "text" scene_id
  -> "text" scene_id [condition]
  -> "text" scene_id [condition] locked/hidden/grayed "alt text"
  -> "text" scene_id ! var = val ! var += n ! add:item

TRIGGERS
  trigger: start/end [condition] goto: scene_id
  trigger: start/end [condition] set: var op val
  trigger: start/end [condition] sound: file.ogg
  trigger: start/end [condition] action1 | action2 | ...
  trigger: start/end (no condition = always fires)

CONDITIONS
  [var = val]    [var != val]   [var > val]  [var < val]
  [var >= val]   [var <= val]
  [has:itemID]   [!has:itemID]
  [condA AND condB]

OPERATORS in set/actions
  = (assign)    += (add)    -= (subtract)
  add:itemID    remove:itemID

ACTOR PROPERTIES
  name: "Display Name"
  color: #hexcode
  sprite expressionName: url

VARIABLE DECLARATION
  varname  number/text/bool  defaultValue

═══════════════════════════════════════════════════════
💡 Workflow Tip: Write your complete story structure in a .cvl file first — all scenes connected, placeholder dialogue, choices pointing to real scene IDs. Import it. You will have a fully navigable skeleton with zero dead-ends. Then switch to the visual editor to add backgrounds, music, actor sprites, and polish the dialogue. The two workflows complement each other perfectly: CapsuleScript for architecture speed, the visual editor for artistic depth.

Appendices

A. Keyboard Shortcuts

Shortcut Action
Ctrl+Shift+F Global Search
I (in game) Toggle Inventory
Ctrl+S Export (in editor)
Drag & Drop .cvl Import CapsuleScript into current project

B. Quick Tag Reference

Tag Effect
[b]...[/b] Bold
[i]...[/i] Italic
[u]...[/u] Underline
[shake]...[/shake] Shake
[wave]...[/wave] Wave
[rainbow]...[/rainbow] Rainbow
{varName} Variable value
{actor:id} Actor name

C. Engine Evolution

Version Major Feature
1.0 Base engine, scenes, dialogues
1.2 Actors, multiple expressions
1.3 HUD variables, interface redesign
1.4 Triggers, logic scenes
1.5 Global events, advanced choices, Dev Mode
1.6 Studio modes (Simple/Expert), security, rollback
1.7 Inventory, hotspots, visual timeline, CG Gallery
1.8 QTE, text input, global search, roll+add
1.9 Cinematic Camera System, Sprite Sheet Animation, CapsuleScript (.cvl), HTML2EXE, HTML2APK

23. Capsule Glossary

Term Definition Equivalent
Actor Reusable character with expressions Character, Sprite Set
CapsuleScript Domain-specific scripting language for Capsule, plain-text .cvl files DSL, Script Format, Ink, Fountain
CG Computer Graphic, unlockable illustration Unlockable, Gallery Item
Cinematic Camera Animated background movement (zoom, pan, Ken Burns) applied per-scene Parallax, Camera Motion, Ken Burns Effect
HUD Head-Up Display, overlaid info UI Overlay, Status Display
Hotspot Clickable zone point-and-click Clickable Area, Interactive Zone
Logic Scene Invisible calculation scene Routing Node, Hub
QTE Quick Time Event, timed action Timed Choice, Action Sequence
Rollback Return to previous state Undo, State Restore
Sprite Sheet Single image containing all frames of a character animation in a grid Texture Atlas, Animation Strip
Trigger Automatic condition-action Event Handler, Auto-Action
Variable Persistent game data Flag, Counter, State

24. Resources and Community

24.1 Royalty-Free Assets

Type Source License
Images Unsplash, Pexels, Pixabay CC0 / Pexels
Audio Freesound, Incompetech, Zapsplat CC-BY / Royalty-free
Fonts Google Fonts, Font Squirrel OFL / Free
Icons Feather, Heroicons, Phosphor MIT

24.2 Complementary Tools

Usage Tool Export to Capsule
Pixel art Aseprite, GraphicsGale PNG → WEBP
Sprite sheets Aseprite (native export), TexturePacker, Free Texture Packer PNG sprite sheet → Actor expression
Vector Inkscape, Illustrator SVG → PNG 1920×1080
Audio Audacity, Reaper WAV → OGG
Video DaVinci Resolve, FFmpeg MP4 → WebM VP9
Organization Notion, Obsidian Text export → script
CapsuleScript (.cvl) VS Code (with plain-text highlighting), Notepad++, Sublime Text, any text editor Save as .cvl → Drag & Drop into Capsule

24.3 Official Capsule Resources

Resource URL Content
Official Website capsulevn.com Downloads, news, demo, feature overview
itch.io Page capsuleteam.itch.io/capsule-vn-engine Download, ratings, community comments
HTML2EXE Bundled with Capsule Desktop export tool (Windows → .exe)
HTML2APK Bundled with Capsule Android export tool (.apk)

24.4 VN Community & Asset Sources

Community Platform Focus
Lemma Soft Forums lemmasoft.renai.us/forums Largest VN developer forum, engine-agnostic
VN Dev Subreddit reddit.com/r/vndevs Feedback, showcases, tool discussions
itch.io VN Community itch.io → visual novel tag Discover games, release your own, connect
Open Game Art opengameart.org Free sprites, backgrounds, music for VNs
Itch.io Asset Store itch.io → assets → visual novel Free and paid VN-specific art packs