Looking for something more specific?
- Conditions - This guide will how you how you can create and combine multiple regular conditions.
- Data Bindings - This guide will explain special list-based conditions.
Alternatively, head back to the guide overview on the getting started page.
In Artemis it's possible to define custom logic using the visual scripting system.
This system uses nodes that have one or more inputs and outputs which allows you to create both simple and very advanced data flows.
Nodes are used in both conditions and data bindings, allow you to make your profile interactive.
An example node script that activates a layer when the player has a certain wanted level in GTA:V
In the example above there are 4 nodes that together determine whether a layer should be activated.
- The Data Model node has an output pin (green) outputting the current wanted level of the player
- The Numeric node has an output pin (green) outputting the value entered in the numberbox
- Both values are entered into the two input pins (white) of the Greater Than node
- The Greater Than node outputs true or false (red) depending on whether the top value is greater than the bottom value
- The resulting value is entered into the final Activate Layer node which determines whether the layer should be activated or not
The editor shows all the nodes of your visual script
- Each node has one or more input (left) and output (right) pins
- A node may also contain pin collections, to these you can freely add/remove extra pins
- Some nodes contain extra UI elements, such as input fields
The editor is used to create visual scripts, depending on where you want to use nodes there are two ways to access the editor
- Select a layer and pick either the Conditional or the Event activation type
- Click the Edit condition script button
- Select a layer, find the property you want to create a data binding for and click on the -button
- On the newly opened panel, click the toggle next to the property name to enable data bindings
- A small visual editor opens, you can also open the full editor by clicking the -button
The editor uses a canvas in which you can freely rearrange your nodes in a way that makes sense for you. Try to avoid overlapping nodes or crossing paths to keep things easy to follow.
- Pan around the canvas pressing middle mouse button, zoom in and out by scrolling
- Right-click to add a node at your current position
- Click and drag to select multiple nodes
- Del to delete the current selection
- Ctrl + D to duplicate the current selection (does not copy connections)
- Click and drag on a pin to connect it to another pin via a cable
- The colors indicate the type and have to match
- White pins can take any color
- An output pin can connect to multiple input pins
- An input pin can only connect to one output pin
- Use middle mouse button to disconnect a pin
- Drop a cable in empty space to easily create a compatible node
To read values from the data model right-click and add the Data-Model-Value node.
Click on Click to select and pick a value from the data model. Once you've picked a value the output pin will change color to reflect the type of value you've chosen.
The visual scripting system uses colors to differentiate between types of data. This is required because you can't, for example, turn a number into a color.
There are nodes to turn one type of value into another, per example the Color Ramp node lets you turn a number between 0.0 and 1.0 into a color picked from a gradient.