Blueprint basics
Blueprints (nodes) are the visual programming system that is used to control the behavior of your mod elements. Each element that can be controlled with blueprints will have a section at the bottom of the mod element page where they can be edited.
Nodes
Nodes are used to represent some portion of code. This can be as a variable, statement, function, or event.
Selecting nodes
Nodes can be selected by clicking on them in the blueprint editor window. Nodes can be moved on the graph by clicking and dragging. Double clicking on a node will open a window with more information about the node.
Adding nodes
New nodes can be added to the graph by right clicking anywhere on the graph and clicking "Add Node". This will open a context menu, where the node categories are displayed. Hovering over each category will show all the nodes available in that category. Clicking on an entry within the category will add the node to the graph.
Inputs & Outputs
Nodes can have any number of inputs and outputs, which are used to connect them with other nodes.
- Connectors are used to control the execution order of nodes. Certain nodes which represents code that is independent of execution order do not have connectors.
- Inputs that are not connectors are used to pass data/code between the nodes.
Event nodes only have output nodes. This is an indication that they are an entry point to the blueprint/code. The execution order starts at event nodes.
Connecting Nodes
To connect two nodes, click and hold on the output of the first node. Drag your mouse to the input of the second node, and release.
Certain nodes have inputs and outputs with explicit types. These can only be connected to other inputs/outputs of the same type. Think of this like passing arguments to a function. You must pass arguments with the correct type.
Execution order
Blueprints are triggered by Event nodes. When an event for the mod element is fired, the nodes that are connected to the event node will be executed. You can think of the nodes connected to an event as the code that would run inside of the event method. An event also behaves like a method signature because it has parameters that are provided which can be used inside the method (in the nodes connected to the event).