Address and variable

Variables existing in the simulation can be referenced using addresses.

Address looks similar to the urls you know from your browser, or the file paths from your operating system. Multiple parts are separated by forward slashes /. Here are a few examples of different addresses:

# full path (sometimes called a "global" path, as opposed to "local"), starts with '/'
/region/e01001/generic/some_component/int/some_number
# relative path ("entity-local"), starts with '~'
~generic/some_component/int/some_number
# relative path ("component-local")
int/some_number
# dynamic path, contains another address within curly brackets
/region/e01001/generic/{str/component_name}/int/some_number

Building addresses we generally follow this scheme:

/[entity_type]/[entity_id]/[element_type]/[element_id]/[var_type]/[var_id]

Relative address

Relative (or local) means that some of the address is omitted because it can be inferred from the execution context.

Dynamic address

Curly brackets can be used to insert some other variable’s value into the path by referencing the path to that other variable.