All skills
thedivergentai avatar

/godot-genre-visual-novel

@9d6e91e

Expert blueprint for visual novels (Doki Doki Literature Club, Phoenix Wright, Steins;Gate) focusing on branching narratives, dialogue systems, choice consequences, rollback mechanics, and persistent flags. Use when building story-driven, choice-based, or dating sim games. Keywords visual novel, dialogue system, branching narrative, typewriter effect, rollback, bbcode, RichTextLabel.

Use this Skill: https://skilld.dev/gh/thedivergentai/gd-agentic-skills/godot-genre-visual-novel

This session only. Nothing lands on disk.

referenceskey-mechanics.md

≈560 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Key Mechanics Implementation

Branching Paths (Flags)

Track decisions to influence future scenes.

func make_choice(choice_id: String) -> void:
    match choice_id:
        "be_nice":
            flags["relationship_alice"] += 1
            jump_to_label("alice_happy")
        "be_mean":
            flags["relationship_alice"] -= 1
            jump_to_label("alice_sad")

### 4. Speaker Z-Ordering (Dynamic Focus)
Bring the active speaker to the front and dim others.

```gdscript
# actor_manager.gd
func focus_speaker(active_name: String) -> void:
    for actor in get_children():
        if not actor is CanvasItem: continue
            
        if actor.name == active_name:
            # Move to bottom of tree to render on top & catch input events
            actor.move_to_front()
            actor.modulate = Color.WHITE
        else:
            # Dim inactive actors
            actor.modulate = Color(0.5, 0.5, 0.5, 1.0)

5. Asynchronous Background Loading

Prevent stutters when switching high-res assets.

# background_streamer.gd
var _pending_path: String = ""

func load_background(path: String) -> void:
    _pending_path = path
    ResourceLoader.load_threaded_request(path)
    set_process(true)

func _process(_delta: float) -> void:
    var status = ResourceLoader.load_threaded_get_status(_pending_path)
    if status == ResourceLoader.THREAD_LOAD_LOADED:
        texture = ResourceLoader.load_threaded_get(_pending_path)
        set_process(false)

6. Emotional BBCode Effects

Use RichTextLabel with performance-first append_text.

# dialogue_printer.gd
func print_line(speaker: String, text: String, emotion: String) -> void:
    var bb: String = text
    match emotion:
        "angry": bb = "[shake rate=30.0 level=8]%s[/shake]" % text
        "sad": bb = "[wave amp=20.0 freq=2.0]%s[/wave]" % text
    
    # Use append_text to avoid rebuilding the entire tag stack
    append_text("[b]%s:[/b] %s\n" % [speaker, bb])

### Script Format (JSON vs Resource)
*   **JSON**: Easy to write externally, standard format.
*   **Custom Resource**: Typosafe, editable in Inspector.
*   **Text Parsers**: (e.g., Markdown-like syntax) simpler for writers.

Source: SKILL.md on GitHub

1 warning16d4 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The analyzed skill provides standard Godot Engine templates and documentation for building visual novel games, including dialogue branching, UI management, and a state rollback manager. No security risks or malicious behaviors were detected.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    4/4 files flagged

Signed by skilld at 9d6e91e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 2 months ago

README badge

README badge for thedivergentai/gd-agentic-skills/godot-genre-visual-novel