Table of Contents
Nodes are scriptable points, regions, and paths that can be used for a variety of purposes.
A node has a at least one point (the center point) and spans a rectangular or circular area. Additional path points can be added if needed.
Example use cases:
- Place currents and steam
- Make entities or the camera follow a path
- Provide hints for nearby entities or other nodes
- Perform an action when an entity enters a region
- ...
In the map editor
See Editor controls for how to manipulate nodes.
The only way to create or delete nodes is via the map editor.
Builtin nodes
The game recognizes certain node names and performs a built-in function. Some built-in functions take parameters, these follow after the node name (separated by spaces).
- seting ingredient amount - short for set ingredient; instructs certain entities covered by the node area to spawn the specified ingredient on some condition (e.g. song plants, pullable leaves).
- setent entityname - short for set entity, instructs an entity to spawn another entity on some condition.
- current alpha - places a current that follows the path. Must have at least 2 path points.
Alpha
is used to control transparency. The width of the node area controls the current thickness. Can be enabled or disabled vianode_setActive()
. - gem gemname - when Naija enters the area, a gem is placed on the minimap.
- waterbubble - When placed in air, the covered area acts like it's filled with water. Can be enabled or disabled via
node_setActive()
. - cook - places a map gem when first entered. Can use 3 cooking slots when in the area.
- zoom amount time - When Naija is inside the area, set map zoom to
zoom
overtime
seconds. - radarhide - When Naija is inside the area, the minimap is blacked out and the main map is blocked.
- bgsfxloop sound - When Naija is inside the area, play
sound
in a loop. - savepoint - Node is displayed as a save point icon on the world map. The actual saving functionality is scripted.
- steam speed - Similar to a current node. Steam flows along the individual path points. Can be enabled or disabled with
node_setActive()
. - warpnode map nodename flip - When Naija is inside the area, warp to the node
nodename
onmap
. By default Naija will face left after the warp. Passflip
= 1 to face right. See warping between maps for details. - warplocalnode nodename type - When Naija is inside the area, warp to
nodename
on the current map.Type
can be "in" or "out". See warping between maps for details. - warp map type - When Naija is inside the area, warp to the corresponding node on map
map
. See warping between maps for details. - spiritportal map nodename - When Naija is inside the area, revert to normal form and warp to the node
nodename
onmap
. This node type is never used by the game and likely a leftover from the development process. - spiritbeacon - When Naija is inside the area and the spirit form beacon ability is used, revert to normal form in place ("teleport the body to the spirit").
- vox file re - When Naija is inside the area, play voice
file
. Once the voice was played a permanent entry is set in the save file and this node will never play again. To allow the voice to play again, pass anything asre
. The node will be active again after the next map load. - voice file re - Alias for vox.
- se name distance number - "spawn enemy" - When Naija is not within
distance
, spawnnumber
enemies of typename
. Compatibility note: There is only one map in the vanilla game that uses this. Using this node is not recommended since it may cause problems with scripting. - pe name - "particle effect" - This node continuously plays the specified particle effect. Commonly used: pe bubbles01. Due to a bug the particle effect is updated twice per frame, resulting in twice the intensity. Since the vanilla maps were designed with this bug present, it is to be considered a feature. The particle emitter can be enabled or disabled via
node_setActive()
. - naijastart. Places Naija on this node if the map is entered without a set position. Used to position Naija on the starting map. Also useful to specify a default position to start at when loading the map in the editor. If not present, Naija is placed at position (0, 0) (upper left corner).
Node scripts
Each node may have an attached script. See Node scripting for details.
The script is independent of the builtin function; both will be handled if present. A good example for this is the savepoint node: The world map gem functionality is built-in, but the right-click activation is scripted.
There is no way to disable built-in functionality, but some nodes can be toggled using node_setActive()
.
Nodes can not be deleted or created via scripting. Existing nodes can be moved via node_setPosition(me, x, y)
, although it is not recommended since a node is permanently moved once the map is saved.