StageLines
namespace Griff.Modules.VisualNovels;
public static class StageLinesReading what a visual novel’s stage is told: its positions, backgrounds and a character’s expressions (rows of “Name: value”), the directions on dialogue lines, and the lines themselves taken apart and put back together, for the editor’s Dialogue Editor and for agents. And what the stage looks like at any line of a dialogue (At), read top to bottom.
Properties
Section titled “Properties”TagWords
Section titled “TagWords”public static IReadOnlyList<string> TagWords { get; }The words that start a stage’s dialogue tags: “[show …]”, “[hide …]”, “[move …]” and “[background …]” (or “[bg …]”).
TransitionWords
Section titled “TransitionWords”public static IReadOnlyList<string> TransitionWords { get; }How things come and go, as a tag says them: cut, fade and slide.
Methods
Section titled “Methods”public static StageLines.StageState At(Stage stage, Dialogue? dialogue, int row)What stage shows at row row of dialogue’s lines, read top to bottom from the stage as it’s set up: each row’s directions done in turn (whatever its flags say, and whichever way the choices go), and the row’s speaker on stage, with the expression they say it with.
DirectionIn
Section titled “DirectionIn”public static StageDirection? DirectionIn(string tag, Stage? stage)The direction a tag (“[show Ava left]”) gives, or null for another kind of tag.
public static ValueTuple<string, string>? Entry(string? row)A row “Name: value” taken apart, or null when it has no name.
public static IReadOnlyList<StageLines.Face> Faces(IReadOnlyList<string>? rows)A character’s expressions, from rows like “Happy: Textures/ava-happy.png” or “Laugh: Laugh” (a clip).
IsEveryone
Section titled “IsEveryone”public static bool IsEveryone(string? who)True for the word that means everyone on stage: “all” or “everyone”.
public static string Join(StageLines.LineParts parts)Puts a row back together from its parts (see Split).
KindOf
Section titled “KindOf”public static DirectionKind? KindOf(string word)The kind of direction a tag starting with word gives, or null for a word that isn’t one.
public static IReadOnlyList<StageLines.Look> Looks(IReadOnlyList<string>? rows)A stage’s backgrounds, from rows like “Park: Backgrounds/park.png” (a picture), “Night: #10183A” (a color) or “Dusk: #F2A65A #3A2F5B” (a color at the top running to another at the bottom).
public static IReadOnlyList<string> Names(IReadOnlyList<string>? rows)The names the rows give, in order.
public static StageDirection? Read(string word, string args, Stage? stage)Reads a direction: the tag’s word (“show”) and the rest (args, “Ava left happy fade”), against stage’s characters, positions, backgrounds and expressions. Words can come in any order after the character’s name, with commas and little words between (“at left, happy”). Null for a word that isn’t a direction.
public static StageLines.LineParts Split(string? row)Takes a row of a dialogue’s lines apart (see LineParts).
public static IReadOnlyList<StageLines.Spot> Spots(IReadOnlyList<string>? rows)A stage’s positions, from rows like “Left: -4.5” or “Far Left: -7, -0.5” (across, and up).