Node Graphs - Suvidriel/VNyanDoc GitHub Wiki
VNyan uses an easy-to-use Node Graph-based interface allowing you to design chat interactions, model movements, and more!
VNyan graphs are separated pages for your node setups. They can be exported and loaded as JSON files, allowing you to share them with others.
The graph order can be rearranged using the arrows on the top right of the menu. At the bottom of the node graph window, you can toggle graphs on and off, preventing them from running, as well as rename them. The graph order can dictate the order that nodes execute, which may sometimes be relevant if two graphs are connected in some way by using the same parameters, triggers, or if they activate nodes that override each other.
You can navigate in graphs by dragging with the middle mouse button, and zooming in and out with the scroll wheel.
Nodes are the main building blocks of VNyan Graphs. They can have any number of input and/or output sockets depending on each node's function. Wires can be drawn between the output socket of one node and the input socket of another node. There is no limit to the amount of nodes that can be chained together, or how many nodes are connected with each socket, but triggers will only flow from Call Sockets to Listener sockets (connecting too many nodes to one socket may make it difficult to troubleshoot your graphs).
The order that nodes are wired into a socket generally dictates the order that the nodes execute. However, this is not always reliable and the order can sometimes change on application restart or when loading the graph (when the order of execution is important for your graph setup, the Ordered Execution node should be used).
There are four main categories of nodes in VNyan:
Type | Description |
---|---|
Callback nodes | Nodes that send triggers on different events |
Action nodes | Nodes that apply an action or effect when triggered. |
Gateway nodes | Conditional Nodes, Filter Nodes, and Nodes with more specific or complex operations. |
Value nodes | Nodes used to manipulate input and output values from parameters or other nodes. |
Sockets are used to connect different outputs and inputs from nodes with one another. VNyan nodes have three types of sockets:
Type | Color | Description |
---|---|---|
Call Sockets | Yellow | These sockets send a trigger to all connected Listener sockets, activating the nodes it is connected to. Call Sockets can be found on Callback Nodes and Gateway Nodes. At least one Call Socket per node should be connected to at least one Listener Socket for the node to have an effect. Call Sockets do not send over values from one node to another. For this, see Value Sockets. |
Listener Sockets | Teal | These sockets listen for a trigger signal from all connected Call sockets. These triggers will activate the node these Listener Sockets are on. They can be found on Action Nodes and Gateway Nodes. All nodes have a maximum of one Listener Socket. Listener Sockets do not receive values from other nodes. For this, see Value Sockets. |
Value Sockets | Red | Value Sockets can be both input and output sockets, depending on their position on the node. Input Value Sockets are aligned on the left side of the node, and Output Value Sockets are aligned on the right of the node. Connecting Output Value Sockets to Input Value Sockets allows you to easily assign output values from one node to the variables of another. Output Value Sockets are typically found on Callback Node and Value Nodes, and Input Value Sockets are typically found on Action Nodes, Gateway Nodes and Value Nodes. |
There are two main ways that input values can be specified in VNyan nodes. One is through Value Sockets described above. The other is manually. Value Socket input is particularly useful when the parameters of your node can vary depending on the output of another node, for example when setting up different actions for different stream redeems. Manual input easily lets you specify values that do not ever change, or values that you control yourself though parameters.
The different types of input are:
Name | Method | Description |
---|---|---|
Input Field | Manual | The most flexible and most common of the different input methods. Depending on the context, can either take any numerical or any text input. Many Input Fields also allow you to specify a parameter as input (see below) |
Dropdown | Manual | A dropdown menu with predetermined options. |
Slider | Manual | A slider used for numerical input that must fall within a predefined range. Often accompanied with an Input Field to easily set precise values. |
Checkbox | Manual | A checkbox to turn a specific option on or off. Values are a boolean True or False. |
Value Socket | Socket | A red Input Value Socket described above. Most manual input fields have a linked Input Value socket. These sockets can be used to feed input directly from other nodes. To be able to to connect an input socket, its value type must match that of the output socket. If types do not match, Value nodes can be used to convert them first. |
VNyan nodes also have two different types of outputs:
Name | Method | Description |
---|---|---|
Call Socket | Trigger Output | Output from a node that sends a trigger signal to activate another node. This signal is sent through yellow Call Sockets described above. In particular, some Gateway Nodes can send several different Trigger Outputs depending on certain conditions. Trigger outputs do not forward any values into the next node. |
Value Socket | Socket | A red Output Value Socket described above. These sockets can be used to feed values directly to other nodes. To be able to to connect an output socket, its value type must match that of the input socket. If types do not match, Value nodes can be used to convert them first. Output Value Sockets do not send a trigger signal, and so cannot be used to trigger other nodes. |
Most node input fields are able to take parameters as input. For text fields (like parameter or blendshape names), use text parameters with angled brackets like this: <parameter>
. You can also combine text strings with parameters within text fields (for example, if you wanted the id to be object[parameter]
). For number fields, use number parameters with square brackets like this: [parameter]
.