striga

Crates.iostriga
lib.rsstriga
version0.0.4
created_at2025-12-24 12:34:44.572754+00
updated_at2026-01-09 11:23:30.463287+00
descriptionA narrative procedural generation engine.
homepage
repository
max_upload_size
id2003121
size149,469
esmevane (esmevane)

documentation

README

striga

Outline wave language: a procedural generation kit for narrative structures.

Overview

Striga takes an owl file (which is essentially just an xml file with specific tags) and uses it to generate a narration-friendly outline.

For example, this owl config:

<topic name="Act" min="6" max="9">
    <choice name="One" position="required first" consecutive="2-3" followed-by="One, Two" />
    <choice name="Two" consecutive="2-3" followed-by="Two, Three" />
    <choice name="Three" consecutive="2-3" followed-by="Three" />
</topic>

Will set up a narrative generation with the following rules:

  • An overall set of 6 to 9 story beats.
  • The first act, which must be first, can have 2-3 beats, consecutively, and may only be followed by itself or act two.
  • The second act, also 2-3 beats, consecutively, may only be followed by itself or act three.
  • The last act, 2-3 beats as well, consecutively, may only be followed by itself.

Striga will generate a node structure describing its output, which is deterministic given a specific seed - I.E., the same rules and the same seed will always create the same node structure.

Usage

Actually putting the node structure into play involves materializing it: using a set of serde-friendly rust bindings, you can take an owl graph and traverse it.

The most direct parallel to the topic/choice split is an enum. So for example, on the rust side, you can create a materialized view of the nodes by making an Act enum:

enum Act {
    One,
    Two,
    Three
}

It needs to have the following derives:

  • Clone
  • Copy
  • Debug
  • PartialEq, Eq
  • PartialOrd, Ord
  • Hash
  • DeserializeOwned
Commit count: 0

cargo fmt