(Created page with "= Introduction = Behaviors are Desynceds method of implementing visual coding for the Behavioral Controller Component. Behaviors consist of instructions and curved lines attached between those instructions showing the flow the program follows. Behaviors are currently unique to each Behavioral Controller but a copy can be saved to the Behavior section of the Library. === Behavior Library === The behavior library is accessed through the shared blueprint and behavior Li...") |
No edit summary |
||
Line 1: | Line 1: | ||
=== Accessing the Behavior User Interface === | === Accessing the Behavior User Interface === | ||
Revision as of 15:38, 3 September 2023
Accessing the Behavior User Interface
To access the user interface for behaviors you may use one of two ways:
- Right click on a Behavioral Controller that is installed in a units socket, and click Program Behavior on the popup menu. You will now be in the user interface for the behavior associated with this component.
- Click the edit behavior button next to a saves behavior in the behavior library.
The Behavior Interface
Difference Between Behavior Types.
Saved Behaviors
- If you are working with an instance of a behavior in a save (accessed through the behavior library) the following applies:
- All changes are permanent.
- You can't reload the behavior as there is no other save to work from.
- You do not have access to a menu for saving or loading behaviors.
![]() |
Component Behaviors
- If you are working with an instance of a behavior in a component (accessed through Behavior Controller) the following applies:
- You have access to an undo button. This is not very robust and will only undo one step back then undo the undo if pressed again.
- You have access to running the program while you are viewing the behavioral interface. Stopping, pausing and even incrementing the program by one step. Instructions will be colored green when active.
- There is a library button that gives access to saving and loading to/from the library and clearing the current behavior to default.
![]() |
![]() |
UI Layout
Basic UI Functions
Green: Undo, Stop, Play/Pause, Step, Library Access, Exit UI
Red: Registers of Unit
White: Subtract Parameter, Add Parameter
Blue: Instruction Categories
Yellow: Instructions
Brown: Visual Coding Area
Parameters and Registers
Both parameters and registers can be used to pass information from and to the behavior and the unit in the world. Parameters are dynamic in that you can add or remove them as you want, however if you remove a parameter assigned in the behavior it will also remove its reference anywhere in the instructions for that behavior. Inside the behavior you can click on a register/parameter and drag to an instruction input you can also drag an instruction output to a register or parameter and it will out put to that register/parameter.
Instructions UI
Instructions are the visual code container you drag from the menu to the left into the code area below are three different instructions bridged by connections.
Green: Lock/Unlock Position, Set Comment, Toggle More Options, Set as Next Step. Delete (These only show up when you hover over the Instruction)
Red: Input (Always on the left)
Yellow: Output (Always on the right)
Black: Connection
Blue: Pins (outgoing is always on the right, incoming is always on the left)
Position Locking
Instruction that are position locked will snap into a position relative to the instruction connected to their incoming pin they will also be positioned relative to any other instructions connected to that same instruction. If an instruction has no incoming connections and has position locked toggled on it will snap to the left side of the codding area in a position underneath the Program Start instruction and any other instructions snapped there.
Adding/Removing Instructions
Instructions can be dragged out of the left hand menu by clicking on their name and dragging into the coding area. Instructions will auto connect to the nearest pin when they are released as long as it is a valid connection. Instructions always start position locked and will snap to a position when released.
An instruction dragged over the left hand menu and released there will be removed. Clicking the X at the top right of an instruction will also remove the instruction.
Connections
Dragging an instruction that is unconnected to it's incoming pin near another instructions outgoing pin will bridge these nodes with a connection.
You can connect an unconnected or connected outgoing pin to an incoming pin by dragging from the outgoing pin to an incoming pin.
You can disconnect a connection by dragging from an outgoing pin away from any instruction and releasing.
Note: it is usually a good idea to toggle off the position lock before removing a connection or that instruction and any others connected may drastically realign their positioning.
Coding Area
The coding areas can be dragged around moving all instructions relative to it by left click dragging away from any instructions in the codding area.
Data
Data Types
There are six data types in Desynced
- Item Type
- Unit Type
- Component Type
- Technology Type
- Informational Value Type
- Coordinate Value Type
There is no specific number type because all six data types also encode a number value however if that value is zero it will not display.
Numbers
Numbers are always encoded with one of the other data types even when passing a value that seems to be only numerical it is passing a null value along with the number. It is important to understand this when dealing with instructions that make decisions based on data type.
Parameters
The amount of parameters may be expanded of contracted at the top of the interface for every parameter at the top of the behavior UI you will have a corresponding register next to the Behavior Controller out side the UI. You can set these outer registers and they will pass data into the program and data written to the parameter will pass data out to those registers
Variables
Variables also can expand and contract in amount accessible but the method of doing so is different from parameters. To assign a variable you have to click an output of an instruction and choose a variable if it is the first variable there will only be an 'A' variable once this is assigned you can now assign that 'A' variable to inputs and if you click on another output there will now be a 'B' variable able to be assigned along with the 'A' variable. Contraction of choices works in reverse if you removed all 'A' variables from your instructions you would no longer be able to access 'B' what variables are aces sable can be a bit strange if you remove non sequential variables but you will always be able to access any variable you have assigned and the next in order of any you have assigned.
Unit Registers
Parameters create registers outside of the behavior but there are also the four unit registers these tend to have certain data by default passed through them but it is possible to overwrite what gets passed into or out of them.