Divooka Reference

Effects

16 nodes

On this page 16

Add To List

Function

Adds a value to a list variable, such as a gift to those given.

Signature
AddToList(variable: Text, value: Text) -> Effect
Effect AddToList(string variable, string value)

Parameters

nametypedefaultdescription
variableText—
valueText—

Returns

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

Add To Variable

Function

Adds to a number variable.

Signature
AddToVariable(variable: Text, amount: Number) -> Effect
Effect AddToVariable(string variable, double amount = 1)

Parameters

nametypedefaultdescription
variableText—
amountNumber1

Returns

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

Change Variable

Function

Changes a variable by an operator: =, +=, -=, *=, /=, //= or %=.

Signature
ChangeVariable -> Effect
    variable: Text
    assignment: Text
    value: Text
Effect ChangeVariable(
    string variable,
    string assignment,
    string value)

Parameters

nametypedefaultdescription
variableText—
assignmentText—
valueText—

Returns

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

Change Variable By Variable

Function

Changes a variable by another variable's value: bag-=chosen takes the chosen gift out of the bag, coins+=reward adds a reward.

Signature
ChangeVariableByVariable -> Effect
    variable: Text
    assignment: Text
    other: Text
Effect ChangeVariableByVariable(
    string variable,
    string assignment,
    string other)

Parameters

nametypedefaultdescription
variableText—The variable changed.
assignmentText—One of =, +=, -=, *=, /=, //=, %=.
otherText—The variable whose value it is changed by.

Returns

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

Combine Effects

Function

Several changes, in order.

Signature
CombineEffects -> Effect
    first: Effect
    second: Effect
    third: Effect
    fourth: Effect
Effect CombineEffects(
    Effect first,
    Effect second,
    Effect third,
    Effect fourth)

Parameters

nametypedefaultdescription
firstEffect—
secondEffect—
thirdEffect—
fourthEffect—

Returns

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

Copy Variable

Function

Sets a variable to another's value.

Signature
CopyVariable(variable: Text, from: Text) -> Effect
Effect CopyVariable(string variable, string from)

Parameters

nametypedefaultdescription
variableText—
fromText—

Returns

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

Effect From Function

Function

Changes the story's variables however a graph says: a graph that takes Story Variables and sets them with Set Number, Set Text and Set Flag.

Signature
EffectFromFunction -> Effect
    change: Action<Story Variables>
    description: Text
Effect EffectFromFunction(
    Action<StoryVariables> change,
    string description = "an effect from a function")

Parameters

nametypedefaultdescription
changeAction<Story Variables>—The graph.
descriptionTextan effect from a functionWhat it changes, in words.

Returns

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

Effect From Script

Function

A change written as script, as after $: affection += 1.

Signature
EffectFromScript(code: Text) -> Effect
Effect EffectFromScript(string code)

Parameters

nametypedefaultdescription
codeText—

Returns

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

Number From Function

Function

Sets a number variable to what a function answers: a Function graph that takes Story Variables and answers a number.

Signature
NumberFromFunction -> Effect
    variable: Text
    compute: Func<Story Variables, Number>
Effect NumberFromFunction(
    string variable,
    Func<StoryVariables, double> compute)

Parameters

nametypedefaultdescription
variableText—The variable.
computeFunc<Story Variables, Number>—The function.

Returns

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

Random Number

Function

Sets a variable to a whole number from the minimum to the maximum, both included, drawn so that rolling back draws the same.

Signature
RandomNumber -> Effect
    variable: Text
    minimum: Integer
    maximum: Integer
Effect RandomNumber(string variable, int minimum, int maximum)

Parameters

nametypedefaultdescription
variableText—
minimumInteger—
maximumInteger—

Returns

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

Remove From List

Function

Removes a value from a list variable.

Signature
RemoveFromList(variable: Text, value: Text) -> Effect
Effect RemoveFromList(string variable, string value)

Parameters

nametypedefaultdescription
variableText—
valueText—

Returns

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

Set To Condition

Function

Sets a variable to whether a condition holds now.

Signature
SetToCondition(variable: Text, condition: Condition) -> Effect
Effect SetToCondition(string variable, Condition condition)

Parameters

nametypedefaultdescription
variableText—
conditionCondition—

Returns

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

Set Variable

Function

Sets a variable to a value.

Signature
SetVariable(variable: Text, value: Text) -> Effect
Effect SetVariable(string variable, string value)

Parameters

nametypedefaultdescription
variableText—The variable.
valueText—The value as typed: a number, true, false, or text.

Returns

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

Subtract From Variable

Function

Takes from a number variable.

Signature
SubtractFromVariable(variable: Text, amount: Number) -> Effect
Effect SubtractFromVariable(string variable, double amount = 1)

Parameters

nametypedefaultdescription
variableText—
amountNumber1

Returns

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

Text From Function

Function

Sets a text variable to what a function answers: a Function graph that takes Story Variables and answers text.

Signature
TextFromFunction -> Effect
    variable: Text
    compute: Func<Story Variables, Text>
Effect TextFromFunction(
    string variable,
    Func<StoryVariables, string> compute)

Parameters

nametypedefaultdescription
variableText—The variable.
computeFunc<Story Variables, Text>—The function.

Returns

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

Toggle Variable

Function

Turns a true variable false, and a false one true.

Signature
ToggleVariable(variable: Text) -> Effect
Effect ToggleVariable(string variable)

Parameters

nametypedefaultdescription
variableText—

Returns

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