Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

feat: Integrate YarnSpinner into dialogue system module #8

@Bli-AIk

Description

@Bli-AIk

🔗 Is your feature request related to a specific issue?

To maximize flexibility, the framework should not be limited to a single narrative tool. Yarn Spinner is another very popular and powerful open-source choice for creating interactive dialogue, especially favored for its human-readable syntax.


💡 Feature Description

Create an integration layer for Yarn Spinner, allowing it to serve as an alternative narrative backend to Ink.

  • Expected outcome or effect: The ability for developers to write and execute narrative content in Yarn Spinner's .yarn format.
  • Specific implementation ideas: The following definitions are for reference only and are subject to change. Implementation could include:
    • A YarnPlayer class that can load, compile, and run Yarn Spinner projects.
    • Implement a DialogueRunner that connects the Yarn runtime to the UI and other game systems.
    • Similar to the Ink integration, create a bridge for two-way communication with the Fact and Event systems. This includes:
      • Exposing custom commands in Yarn (<<command>>) to fire game events.
      • Exposing custom functions to query the Fact database (if has_item("key")).
  • Usage scenarios or benefits: This provides flexibility and choice for the development team, allowing writers to use the tool they are most comfortable with without requiring changes to the core game logic.

⚖ Alternatives Considered

N/A


📝 Additional Information

The official Yarn Spinner C# libraries will be used as the core runtime. The work is primarily in creating the "glue" that connects it to the Lunar framework systems.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions