RedNodeEditor
RedNodeEditor
A custom node editor to make mods for Sons of the Forest
📙 Documentation 📙
FEATURES ⭐
Made specifically for RedLoader
Shareable projects: share you mod projects with others
Error detection: detects common errors when building the mod
Colored graph comments: comment your node sections with what they do
Node descriptions: each node when hovered shows a description about what it does or how should be used
Zoom: zoomable graph editor
Variables: store values in containers to later use them
Custom events: alter the node flow and keeps a tidy editor visual
Generic and Unity nodes: expand the modding capabilities beyond the provided nodes
200+ available nodes to use
Installation ⬇️
Download the latest RedNodeEditor Setup.exe from the release section
Run the setup as administrator and install the application
Open the app and start making mods
Mods installation ⏬
Install RedNodeLoader as a standard RedLoader mod
Place the
.rmod
file and eventual mod folder in theSonsOfTheForest/Mods/RedNodeLoader/Mods
folder
General infos
Administrator privileges are required to write mod files to disk
Two project examples are provided with the editor installation:
Project name | Description | Real mod link | Difficulty |
---|---|---|---|
ModMenuExample.rproj | Simplified version of my mod menu | easy-intermediate | |
PlaneModExample.rproj | Mod where you can pilot a plane | harder |
Mod project files end with .rproj
extension
Mod files end with .rmod
extension
The custom extensions are only there for clarity, in reality they are .json and .xml respectively
Requirements ⚠️
Microsoft Visual C++ Redistributable (probably)
FAQ ❓
Can I make all type of mods with this?
While it's surely not possible to make all types of mods, it should offer a vast arsenal to make easy and more complex type of mods like the two provided mod examples. By providing both premade and generic nodes it pretty much depends on the user capabilities and understanding of the tool.
Can I still make something out of this if I don't know how to program and/or unity game development?
Absolutely yes! Some nodes may sound unfamiliar like the Unity node category, but a big chunk of them are self-explanatory and are shortly described when hovered.
How is this related to RedLoader?
The application was built with a focus on RedLoader by using it's functionalities and making nodes based on it. The mods themselves are read and resolved by a RedLoader mod (RedNodeLoader), which executes each node accordingly.
How can I use arrays/list?
Containers like arrays and list aren't currently supported and so aren't for loops.
Will an eventual application/loader update break my mods?
Depending if the mod used some nodes which where greatly changed in functionalities the mod may break or not. (Reverting to an older version of the loader is always possible to keep using it).
Mod menu mod example
Contributing to the project 🎮
To create a new node we need to make a new class which derives from the SonsNode class and populate it's informations like shown below.
Nodes having inputs only:
Nodes having an output only:
Nodes having both inputs and an output:
Nodes using external types:
If the input argument isn't of the common types (int, float, bool, string, Vector3, Vector2) the property must still be written and marked with the [XmlIgnore]
attribute like shown in the example below.
Implementing the new node
To make the node functional we need to implement it's behaviour in RedNodeLoader. To do so we need to create a new class which must have the same exact name, namespace and properties names as the one defined in the editor before. We then need to override the Execute method, which is where the node behaviour will happen, and add inputs and outputs of the node as properties if any.
The RedNodeLoader.GetArgumentsOf(this)
method is used to retrieve both static inputs and passed arguments of a node.
Here is an example implementation for the SetWalkSpeed node we showed before.
Nodes having an output:
Nodes having an output argument must have a public property of whatever name we chose and as the same type defined in the editor class. The output property must have the [IsArgOut]
attribute to define it's an output argument.
Here is an example implementation for the GetRunSpeed node we showed before.
Nodes having both inputs and an output:
Nodes using external types:
VECTORS: when working with vectors always use
System.Numerics.Vector
as the property type and not theUnityEngine
one, both in the editor and RedNodeLoader class. In the implementation of the node you will then need to create aUnityEngine.Vector
using the (X,Y,Z) values accordingly.
Last updated