User:Shaun/Variables
From Resonite Wiki
More actions
There's a lot of confusion just due to naming unfortunately—@luxkitty on discord
If we are making a list, let's not forget Spatial Variables—@mpmxyz on discord
There is also Parent Values I use these all the time for snappers to move dynvars down into the snapped object's variable space.—@azavit on discord
| Type | Description |
|---|---|
| ProtoFlux:DataModelStore (Synced Variable) |
A variable that will allow writes to it that will persist across contexts, allowing for another impulse or script to read the variable later and act on it. This is good for storing your final value after a massive calculation as a value for a smaller drive script. If a Data Model Store is written to multiple times in a Impulse, the last value is the value that gets networked to other users. Data model stores can be read much later, and will even keep and save their value when an item is saved. |
| ProtoFlux:Store (Unsynced Variable) |
A variable that is not networked and not part of the data model. Each user can have a unique value for themselves inside of a Store and it is not specific to any context, which means it can be used across many objects and ProtoFlux scripts or even as part of a drive. This is similar to what happens when you use a ValueUserOverride on a field, however it does behave slightly differently: It will not update its value automatically when written to from other sources, and you will usually need to use a Continuous Relay with Stores to make them update in the same way that a data model field would. |
| ProtoFlux:Local (Impulse Variable) |
A variable that will have the default value for their data type until written to during a context. During that context, the local variable will keep the value from every write and change to it. Once the context is released, the value instantly returns to the default value, discarding the data, preventing it from being seen or networked. |
| Dynamic Variables (Named variable) |
A system of data storage wherein one can store arbitrary, scoped data under slot hierarchies with arbitrary names, akin to that of an associative array. Their usage is usually found in large systems with many moving parts, but can nonetheless be useful as easy "global" values that can be changed on an object. Category:Components:Data:Dynamic |
| Spatial Variables | A system to allow for sampling values and references from points in global space. The values sampled can transition from one value to another as the sample point moves through physical space in relation to spatial variables. They are mainly used via components, but there are ProtoFlux nodes for sampling them as well, in the spatial variables category. |
| Cloud Variables | Variables that persist across worlds. They work in a similar nature to dynamic variables but instead of relying on parenting or the world hierarchy, they instead rely on paths and user/group ownership. You can think of them in a similar way to a settings or configuration file for your favorite game. Cloud variables are more lively than this though as they are synced between sessions, worlds and even your Resonite dash. |
| Type | Description |
|---|---|
| Parent Values | A tag-based system of data sharing between a Slot and its immediate children. It is generally a more limited, yet simpler and faster, version of dynamic variables. Its main use case is for sharing data between a SnapTarget and the Snapper that is attached to the target. |
| Component:ValueField Component:ReferenceField Component:TypeField |
Components that can be used to store a single value/reference/type on a slot that can be edited from the inspector, or with other components and ProtoFlux. In cases where you want to be able to dynamically reference the value/reference/type instead of directly referencing it, you may be better off using a dynamic variable, and in use cases where you want to easily reference and edit a value/reference/type within a ProtoFlux script while still exposing that value to the data model, you may want to use a ProtoFlux:DataModelStore. |
| Component:ReferenceList | A component that stores a list of references, similar to a Component:ReferenceField. It does not provide a way to index through its items. If you need this functionality, consider using a Component:ReferenceMultiplexer Instead. |
| Data Preset | A component that is useful for switching a list of values or references to a predetermined set. It is commonly used to make clothing combination presets. |
| Component:ValueMultiplexer Component:ReferenceMultiplexer |
Components that contain a list of values/references and drive a target field, using an index to select which value/reference is sent. |
| Component:AssetMultiplexer | A component that contains a list of assets and drives a target field, using an index to select which asset is sent. |
| Component:ToolMultiplexer | A component that contains a list of tools and can be equipped like a normal tool, using an index to select which tool is activated. |