Divooka Reference

World Editor

15 nodes

On this page 15

Make World Editor

Function

An editor over a copy of a world: the world given is left as it was.

Signature
WorldEditor(world: World) -> World Editor
WorldEditor WorldEditor(World world)

Parameters

nametypedefaultdescription
worldWorld—The world to start from.

Returns

resultWorld Editor
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
World Editor
Package
Fantasy Planet Painter

Add Place

Function

Adds a place, as one step.

Signature
AddPlace
    World Editor: World Editor
    name: Text
    latitude: Number
    longitude: Number
void AddPlace(
    WorldEditor World Editor,
    string name,
    double latitude,
    double longitude)

Parameters

nametypedefaultdescription
World EditorWorld Editor—
nameText—The place's name.
latitudeNumber—Degrees north.
longitudeNumber—Degrees east.
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
World Editor
Package
Fantasy Planet Painter

Erase

Function

Erases along a path, as one step.

Signature
Erase
    World Editor: World Editor
    latitudes: Number Array
    longitudes: Number Array
    size: Integer
    layer: Integer
void Erase(
    WorldEditor World Editor,
    double[] latitudes,
    double[] longitudes,
    int size = 15,
    int layer = 0)

Parameters

nametypedefaultdescription
World EditorWorld Editor—
latitudesNumber Array—The path's latitudes, in degrees north.
longitudesNumber Array—The path's longitudes, in degrees east.
sizeInteger15The eraser's diameter, in cells.
layerInteger0Which layer, from the bottom at 0.
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
World Editor
Package
Fantasy Planet Painter

Can Redo

Function

Whether there is an undone step to redo.

Signature
CanRedo(World Editor: World Editor) -> Truth
bool CanRedo(WorldEditor World Editor)

Parameters

nametypedefaultdescription
World EditorWorld Editor—

Returns

resultTruth
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
World Editor
Package
Fantasy Planet Painter

Can Undo

Function

Whether there is a step to undo.

Signature
CanUndo(World Editor: World Editor) -> Truth
bool CanUndo(WorldEditor World Editor)

Parameters

nametypedefaultdescription
World EditorWorld Editor—

Returns

resultTruth
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
World Editor
Package
Fantasy Planet Painter

History

Function

The steps that can be undone, oldest first.

Signature
History(World Editor: World Editor) -> Text Array
string[] History(WorldEditor World Editor)

Parameters

nametypedefaultdescription
World EditorWorld Editor—

Returns

resultText Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
World Editor
Package
Fantasy Planet Painter

World

Function

The world as it stands now, as a value of its own: later changes here leave it as it was.

Signature
World(World Editor: World Editor) -> World
World World(WorldEditor World Editor)

Parameters

nametypedefaultdescription
World EditorWorld Editor—

Returns

resultWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
World Editor
Package
Fantasy Planet Painter

Paint

Function

Paints one stroke of the brush along a path, as one step.

Signature
Paint
    World Editor: World Editor
    latitudes: Number Array
    longitudes: Number Array
    height: Number
    size: Integer
    tool: Brush Tool
    falloff: Brush Falloff
    layer: Integer
void Paint(
    WorldEditor World Editor,
    double[] latitudes,
    double[] longitudes,
    double height = 1500,
    int size = 9,
    BrushTool tool = BrushTool.SoftBrush,
    BrushFalloff falloff = BrushFalloff.SmoothStep,
    int layer = 0)

Parameters

nametypedefaultdescription
World EditorWorld Editor—
latitudesNumber Array—The path's latitudes, in degrees north; one point paints one dab.
longitudesNumber Array—The path's longitudes, in degrees east.
heightNumber1500The height to paint, in metres on the datum.
sizeInteger9The brush's diameter, in cells.
toolBrush ToolSoft brushThe brush's shape.
falloffBrush FalloffSmooth stepHow a soft or blending brush fades to its edge.
layerInteger0Which layer, from the bottom at 0.
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
World Editor
Package
Fantasy Planet Painter

Raise

Function

Raises or lowers one layer's painted land, as one step.

Signature
Raise
    World Editor: World Editor
    metres: Number
    selection: Height Selection
    layer: Integer
void Raise(
    WorldEditor World Editor,
    double metres,
    HeightSelection selection = HeightSelection.Land,
    int layer = 0)

Parameters

nametypedefaultdescription
World EditorWorld Editor—
metresNumber—How far to raise, negative to lower.
selectionHeight SelectionLandWhich cells: land, water or both.
layerInteger0Which layer, from the bottom at 0.
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
World Editor
Package
Fantasy Planet Painter

Redo

Function

Puts back the latest step taken back.

Signature
Redo(World Editor: World Editor)
void Redo(WorldEditor World Editor)

Parameters

nametypedefaultdescription
World EditorWorld Editor—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
World Editor
Package
Fantasy Planet Painter

Save

Function

Saves the world as it stands as an .fpp2 file.

Signature
Save(World Editor: World Editor, path: Text)
void Save(WorldEditor World Editor, string path)

Parameters

nametypedefaultdescription
World EditorWorld Editor—
pathText—Where to save it, ending in .fpp2.
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
World Editor
Package
Fantasy Planet Painter

Set Sea Level

Function

Moves the sea, as one step.

Signature
SetSeaLevel(World Editor: World Editor, seaLevel: Number)
void SetSeaLevel(WorldEditor World Editor, double seaLevel)

Parameters

nametypedefaultdescription
World EditorWorld Editor—
seaLevelNumber—The sea's height, in metres on the datum.
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
World Editor
Package
Fantasy Planet Painter

Smooth

Function

Smooths one layer's painted cells toward their neighbours, as one step.

Signature
Smooth
    World Editor: World Editor
    amount: Number
    selection: Height Selection
    layer: Integer
void Smooth(
    WorldEditor World Editor,
    double amount = 0.5,
    HeightSelection selection = HeightSelection.All,
    int layer = 0)

Parameters

nametypedefaultdescription
World EditorWorld Editor—
amountNumber0.5How far toward the neighbours' mean, 0 to 1.
selectionHeight SelectionAllWhich cells: land, water or both.
layerInteger0Which layer, from the bottom at 0.
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
World Editor
Package
Fantasy Planet Painter

To String

Function

This node carries no documentation.

Signature
ToString(World Editor: World Editor) -> Text
string ToString(WorldEditor World Editor)

Parameters

nametypedefaultdescription
World EditorWorld Editor—

Returns

resultText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
World Editor
Package
Fantasy Planet Painter

Undo

Function

Takes back the latest step.

Signature
Undo(World Editor: World Editor)
void Undo(WorldEditor World Editor)

Parameters

nametypedefaultdescription
World EditorWorld Editor—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
World Editor
Package
Fantasy Planet Painter