REDNODE / DOCS

Hello mod

Example apps / hello-mod / v0.1.0

Node modIn the download

The smallest useful Node mod: a window built with the ui builder that follows V, plays a sound and counts save loads.

Simulated game starting
Mod log

    How it works

    A Node mod is a JavaScript module named by main in its manifest. REDnode runs it in Node beside the game, so it can use npm packages, files and timers, and a mistake in it cannot crash the game.

    The window is a tree of nodes. ui.text(...) makes a node and returns it; keep the ones that change, then call set() on them. REDnode draws the tree with the UI kit and sends clicks back to your handlers.

    Every half second the mod asks for V's position and shows it. game.onState reports menus, photo mode and scenes; game.on("PlayerPuppet.OnGameAttached") fires on each save load.

    What it uses

    ui.window ui.text ui.button ui.toggle node.set game.player.position game.onState game.on game.audio.play

    Try this

    Use it

    Copy the files into red4ext/plugins/REDnode/apps/hello-mod/ in the game folder, or start your own package from them: change id and name in the manifest first. The whole folder is on GitHub.