Divooka Reference

Story

29 nodes

On this page 29

Add Achievement

Function

A story with an achievement, which Achieve grants and the Achievements screen lists.

Signature
AddAchievement -> Story
    story: Story
    ID: Text
    title: Text
    description: Text
    hidden: Truth
Story AddAchievement(
    Story story,
    string id,
    string title,
    string description = "",
    bool hidden = false)

Parameters

nametypedefaultdescription
storyStory—The story.
IDText—What Achieve names it by.
titleText—Its name on the Achievements screen.
descriptionText—What earns it.
hiddenTruthFalseKept secret until it is earned.

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Add Audio Name

Function

A story with a name for an audio file, so lines can play theme rather than its path.

Signature
AddAudioName(story: Story, name: Text, file: Text) -> Story
Story AddAudioName(Story story, string name, string file)

Parameters

nametypedefaultdescription
storyStory—
nameText—
fileText—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Add Channel

Function

A story with an audio channel of its own, beside music, sound, voice and ambience.

Signature
AddChannel -> Story
    story: Story
    name: Text
    mixer: Text
    loop: Truth
    restoreOnLoad: Truth
    fadeOut: Number
Story AddChannel(
    Story story,
    string name,
    string mixer = "sfx",
    bool loop = false,
    bool restoreOnLoad = true,
    double fadeOut = 0)

Parameters

nametypedefaultdescription
storyStory—The story.
nameText—The channel's name.
mixerTextsfxThe volume slider it follows: music, sfx or voice.
loopTruthFalseWhether what plays on it loops unless told otherwise.
restoreOnLoadTruthTrueWhether it starts again when a save is loaded.
fadeOutNumber0Seconds of fade when what plays is replaced or stopped.

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Add Character

Function

A story with a character added.

Signature
AddCharacter -> Story
    story: Story
    character: Character Definition
Story AddCharacter(Story story, CharacterDefinition character)

Parameters

nametypedefaultdescription
storyStory—
characterCharacter Definition—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Add Constant

Function

A story with a constant, set when a game starts and again after a load so a changed value reaches old saves.

Signature
AddConstant(story: Story, name: Text, value: Text) -> Story
Story AddConstant(Story story, string name, string value)

Parameters

nametypedefaultdescription
storyStory—
nameText—
valueText—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Add Default

Function

A story with a variable's starting value: affection and 0.

Signature
AddDefault(story: Story, variable: Text, value: Text) -> Story
Story AddDefault(Story story, string variable, string value)

Parameters

nametypedefaultdescription
storyStory—
variableText—
valueText—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Add Gallery Entry

Function

A story with a gallery entry, unlocked once its pictures have been seen.

Signature
AddGalleryEntry -> Story
    story: Story
    ID: Text
    title: Text
    images: Text
Story AddGalleryEntry(
    Story story,
    string id,
    string title,
    string images)

Parameters

nametypedefaultdescription
storyStory—The story.
IDText—The entry's id.
titleText—Its name in the Gallery.
imagesText—The images it shows, by name and separated by commas: cg red_thread, or cg guqin, cg river_lanterns. The first is the thumbnail.

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Add Gallery Entry When

Function

A story with a gallery entry unlocked when a condition holds, rather than when its pictures have been seen.

Signature
AddGalleryEntryWhen -> Story
    story: Story
    ID: Text
    title: Text
    images: Text
    when: Condition
Story AddGalleryEntryWhen(
    Story story,
    string id,
    string title,
    string images,
    Condition when)

Parameters

nametypedefaultdescription
storyStory—
IDText—
titleText—
imagesText—
whenCondition—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Add Image

Function

A story with an image defined: a name and a file (or a colour such as #000).

Signature
AddImage(story: Story, name: Text, file: Text) -> Story
Story AddImage(Story story, string name, string file)

Parameters

nametypedefaultdescription
storyStory—
nameText—
fileText—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Add Image From Source

Function

A story with an image from a source made by the Images nodes: a movie, a filtered or composite picture, a switch.

Signature
AddImageFromSource -> Story
    story: Story
    name: Text
    source: Image Source
Story AddImageFromSource(
    Story story,
    string name,
    ImageSource source)

Parameters

nametypedefaultdescription
storyStory—
nameText—
sourceImage Source—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Add Label

Function

A story with a label added, replacing one of the same name.

Signature
AddLabel(story: Story, label: Label) -> Story
Story AddLabel(Story story, Label label)

Parameters

nametypedefaultdescription
storyStory—
labelLabel—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Add Layered Image

Function

A story with a layered image, assembled with Start Layered Image and the layer nodes.

Signature
AddLayeredImage(story: Story, image: Layered Image) -> Story
Story AddLayeredImage(Story story, LayeredImage image)

Parameters

nametypedefaultdescription
storyStory—
imageLayered Image—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Add Music Track

Function

A story with a track for the music room, unlocked once heard, or when a condition holds.

Signature
AddMusicTrack -> Story
    story: Story
    file: Text
    title: Text
    when: Condition
Story AddMusicTrack(
    Story story,
    string file,
    string title,
    Condition when)

Parameters

nametypedefaultdescription
storyStory—
fileText—
titleText—
whenCondition—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Add Python Definitions

Function

A story with Python run once when a game starts: the functions it defines can be called from any condition, text or effect, as [title_for(trust)].

Signature
AddPythonDefinitions(story: Story, code: Text) -> Story
Story AddPythonDefinitions(Story story, string code)

Parameters

nametypedefaultdescription
storyStory—
codeText—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Add Screen

Function

A story with a screen laid out by the Screens nodes, which Show Screen and Call Screen find by its name.

Signature
AddScreen(story: Story, screen: Screen Layout) -> Story
Story AddScreen(Story story, ScreenLayout screen)

Parameters

nametypedefaultdescription
storyStory—
screenScreen Layout—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Add Style

Function

A story with a style made by the Styles nodes: a look of its own, or, under one of Novella's own names, a restyling of that part of the game.

Signature
AddStyle(story: Story, style: Style Look) -> Story
Story AddStyle(Story story, StyleLook style)

Parameters

nametypedefaultdescription
storyStory—
styleStyle Look—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Add Transition

Function

A story with a named transition, made from a built-in one: slow as dissolve(2).

Signature
AddTransition -> Story
    story: Story
    name: Text
    transition: Text
Story AddTransition(Story story, string name, string transition)

Parameters

nametypedefaultdescription
storyStory—The story.
nameText—The transition's name.
transitionText—What it is, from the Transitions nodes or as written after with.

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Check Story

Function

Checks a story without its files: undefined labels, characters, transforms and transitions.

Signature
CheckStory(story: Story) -> Text Array
string[] CheckStory(Story story)

Parameters

nametypedefaultdescription
storyStory—

Returns

ProblemsText Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Combine Stories

Function

Two stories as one: the second's labels and definitions added to the first's.

Signature
CombineStories(first: Story, second: Story) -> Story
Story CombineStories(Story first, Story second)

Parameters

nametypedefaultdescription
firstStory—
secondStory—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Label Names

Function

The labels a story has, in order.

Signature
LabelNames(story: Story) -> Text Array
string[] LabelNames(Story story)

Parameters

nametypedefaultdescription
storyStory—

Returns

LabelsText Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Make Label

Function

A label: a named place in the story, holding a sequence.

Signature
MakeLabel(name: Text, sequence: Sequence) -> Label
Label MakeLabel(string name, Sequence sequence)

Parameters

nametypedefaultdescription
nameText—The label's name; the game starts at start.
sequenceSequence—What happens there.

Returns

LabelLabel
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Make Label With Parameters

Function

A label that takes arguments, which Call With Arguments passes and the label reads as variables.

Signature
MakeLabelWithParameters -> Label
    name: Text
    parameters: Text
    sequence: Sequence
Label MakeLabelWithParameters(
    string name,
    string parameters,
    Sequence sequence)

Parameters

nametypedefaultdescription
nameText—The label's name.
parametersText—Its parameters, separated by commas, each with an optional default: who, times=1.
sequenceSequence—What happens there.

Returns

LabelLabel
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Start Story

Function

An empty story to add labels and characters to.

Signature
StartStory() -> Story
Story StartStory()

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Story From Library

Function

Reads a story from a script file in the document's library.

Signature
StoryFromLibrary -> Story
    _library: IDivookaAssetLibrary
    path: Text
Story StoryFromLibrary(
    IDivookaAssetLibrary _library,
    string path)

Parameters

nametypedefaultdescription
_libraryIDivookaAssetLibrary—The document's library (supplied automatically).
pathText—The script's path in the library.

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Story From Script

Function

Reads a story from script text.

Signature
StoryFromScript(script: Text, name: Text) -> Story
Story StoryFromScript(
    string script,
    string name = "script.novella")

Parameters

nametypedefaultdescription
scriptText—Novella script.
nameTextscript.novellaA name for error messages.

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Story To Script

Function

A story written as script.

Signature
StoryToScript(story: Story) -> Text
string StoryToScript(Story story)

Parameters

nametypedefaultdescription
storyStory—

Returns

ScriptText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Translate Line

Function

A story with a line translated, found by the label it is in, who says it and what it says.

Signature
TranslateLine -> Story
    story: Story
    language: Text
    label: Text
    speaker: Text
    original: Text
    translated: Text
Story TranslateLine(
    Story story,
    string language,
    string label,
    string speaker,
    string original,
    string translated)

Parameters

nametypedefaultdescription
storyStory—The story.
languageText—The language, such as zh-Hans.
labelText—The label the line is in.
speakerText—The speaking character's id; empty for narration.
originalText—The line as written.
translatedText—The line in the language; empty removes it there.

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Translate Line By Id

Function

A story with a line translated by the id Say Line gave it.

Signature
TranslateLineById -> Story
    story: Story
    language: Text
    ID: Text
    translated: Text
Story TranslateLineById(
    Story story,
    string language,
    string id,
    string translated)

Parameters

nametypedefaultdescription
storyStory—
languageText—
IDText—
translatedText—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels

Translate String

Function

A story with any other text translated: a choice, a name, a prompt, a notification.

Signature
TranslateString -> Story
    story: Story
    language: Text
    original: Text
    translated: Text
Story TranslateString(
    Story story,
    string language,
    string original,
    string translated)

Parameters

nametypedefaultdescription
storyStory—
languageText—
originalText—
translatedText—

Returns

StoryStory
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Story
Package
Novella Visual Novels