Script:Variables: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
(Reorganize system variable table)
Line 58: Line 58:
= System variables =
= System variables =


System variables don't always have the value type in the name. Some return results specific to the calling object, others are global. Some system variable prefixes (denoted with a <code>*</code> in the following table) work as functions with the remainder used as the parameters.
System variables don't always have the value type in the name. Some return results specific to the calling object, others are global. Some system variable prefixes (denoted with a <code>&lt;…&gt;</code> in the following table) work as functions with the remainder used as the parameters.


{| class="wikitable"
{| class="wikitable"
Line 66: Line 66:
! Used
! Used
|-
|-
| <code>^$param*</code>
| <code>^$param{{Highlight|number|&lt;i&gt;}}</code>
| {{string}}
| {{string}}
| [[Script:Event|event]] parameter for the given number starting with 1 (^$param4 and higher added in {{Changelog|1.3}})
| [[Script:Event|event]] parameter for the given number starting with 1 (^$param4 and higher added in {{Changelog|1.3}})
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^&param*</code>
| <code>^&param{{Highlight|number|&lt;i&gt;}}</code>
| {{number}}
| {{number}}
| [[Script:Event|event]] parameter for the given number starting with 1 (^&param4 and higher added in {{Changelog|1.3}})
| [[Script:Event|event]] parameter for the given number starting with 1 (^&param4 and higher added in {{Changelog|1.3}})
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^#param*</code>
| <code>^#param{{Highlight|number|&lt;i&gt;}}</code>
| {{int}}
| {{int}}
| [[Script:Event|event]] parameter for the given number starting with 1 (^#param4 and higher added in {{Changelog|1.3}})
| [[Script:Event|event]] parameter for the given number starting with 1 (^#param4 and higher added in {{Changelog|1.3}})
Line 102: Line 102:
|-
|-
| <code>^$objontop</code>
| <code>^$objontop</code>
| {{string}}
| {{Highlight|entity}}
| ID of the entity above the caller (or "none")
| ID of the entity above the caller (or "none")
| align="center" | {{Y}}
| align="center" | {{Y}}
Line 116: Line 116:
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^gore</code>
| <code>^amount</code>
| {{int}}
| {{int}}
| 0 for low-violence versions, 1 for normal versions (Arx Libertatis always reports 1)
| number of items in the stack if the caller is an item (stack), 0 otherwise
| align="center" | {{Y}}
| align="center" | {{N}}
|-
|-
| <code>^gamedays</code>
| <code>^angle</code>
| {{int}}
| {{number}}
| in-game time since the start of the playthough, in days (in 10-days before {{Changelog|1.2}})
| yaw of the caller (Added in {{Changelog|1.2}})
| align="center" | {{N}}
| align="center" | {{N}}
|-
|-
| <code>^gamehours</code>
| <code>^anglex_{{Highlight|entity|&lt;entity&gt;}}</code>
| {{int}}
| {{number}}
| in-game time since the start of the playthough, in hours
| X component of the 2D direction vector of the given entity (Added in {{Changelog|1.2}})
| align="center" | {{N}}
| align="center" | {{N}}
|-
|-
| <code>^gameminutes</code>
| <code>^anglez_{{Highlight|entity|&lt;entity&gt;}}</code>
| {{int}}
| {{number}}
| in-game time since the start of the playthough, in minutes
| Z component of the 2D direction vector of the given entity (Added in {{Changelog|1.2}})
| align="center" | {{N}}
| align="center" | {{N}}
|-
|-
| <code>^gameseconds</code>
| <code>^angleto_{{Highlight|entity|&lt;entity&gt;}}</code>
| {{int}}
| {{number}}
| in-game time since the start of the playthough, in seconds
| direction (yaw) from the caller to the given entity (Added in {{Changelog|1.3}})
| align="center" | {{Y}}
|-
| <code>^amount</code>
| {{int}}
| number of items in the stack if the caller is an item (stack), 0 otherwise
| align="center" | {{N}}
| align="center" | {{N}}
|-
|-
Line 181: Line 176:
| align="center" | {{N}}
| align="center" | {{N}}
|-
|-
| <code>^realdist_*</code>
| <code>^behavior</code>
| {{string}}
| current behavior of the caller NPC
| align="center" | {{N}}
|-
| <code>^camera</code>
| {{Highlight|entity}}
| ID of the active camera or <code>none</code> (Added in {{Changelog|1.2}})
| align="center" | {{N}}
|-
| <code>^demo</code>
| {{int}}
| 1 if using the demo data (as indicated by the PAK
| align="center" | {{Y}}
|-
| <code>^dist_{{Highlight|entity|&lt;entity&gt;}}</code>
| {{number}}
| {{number}}
| portal-based walking distance between the caller and the entity with the given ID
| distance between the caller and the entity with the given ID, 99999999999.0 on error
| align="center" | {{Y}}
|-
| <code>^dragged</code>
| {{Highlight|entity}}
| ID of item being dragged by the player or <code>none</code> (Added in {{Changelog|1.2}})
| align="center" | {{N}}
| align="center" | {{N}}
|-
|-
| <code>^repairprice_*</code>
| <code>^durability</code>
| {{number}}
| {{number}}
| cost in gold for the caller to repair the item with the given id (-1.f if not an item)
| current durability value of the caller
| align="center" | {{Y}}
|-
| <code>^fighting</code>
| {{int}}
| 1 if the player is in combat mode, 0 otherwise
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^rnd_*</code>
| <code>^focal</code>
| {{number}}
| {{number}}
| random number between 0 and the given max (to be determined if inclusive/exclusive)
| the current camera's focal value
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^rune_*</code>
| <code>^gamedays</code>
| {{int}}
| in-game time since the start of the playthough, in days (in 10-days before {{Changelog|1.2}})
| align="center" | {{N}}
|-
| <code>^gamehours</code>
| {{int}}
| {{int}}
| 0 if the player *doesn't* have the given rune, and unspecified non-zero value otherwise
| in-game time since the start of the playthough, in hours
| align="center" | {{N}}
| align="center" | {{N}}
|-
|-
| <code>^inzone_*</code>
| <code>^gameminutes</code>
| {{int}}
| {{int}}
| 1 if the caller is in the area with the given ID, 0 otherwise
| in-game time since the start of the playthough, in minutes
| align="center" | {{N}}
| align="center" | {{N}}
|-
|-
| <code>^player_zone</code>
| <code>^gameseconds</code>
| {{string}}
| {{int}}
| ID of the zone the player is in, "none" if in no zone
| in-game time since the start of the playthough, in seconds
| align="center" | {{Y}}
|-
| <code>^gore</code>
| {{int}}
| 0 for low-violence versions, 1 for normal versions (Arx Libertatis always reports 1)
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
Line 221: Line 251:
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^possess_*</code>
| <code>^inzone_{{Highlight|string|&lt;zone&gt;}}</code>
| {{int}}
| {{int}}
| 1 if the given item is in the player inventory, 2 if it is equipped by the player, 0 otherwise
| 1 if the caller is in the area with the given ID, 0 otherwise
| align="center" | {{Y}}
| align="center" | {{N}}
|-
|-
| <code>^behavior</code>
| <code>^last_spawned</code>
| {{string}}
| {{Highlight|entity}}
| current behavior of the caller NPC
| ID of the last entity spawned by a script
| align="center" | {{N}}
| align="center" | {{N}}
|-
|-
| <code>^sender</code>
| <code>^life</code>
| {{string}}
| {{number}}
| ID of the entity that sent the current [[Script:Event|event]]
| current health value of the caller NPC
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^scale</code>
| <code>^mana</code>
| {{number}}
| {{number}}
| scale of the caller, in percent
| current mana value of the caller NPC
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^speaking</code>
| <code>^maxdurability</code>
| {{int}}
| {{number}}
| 1 if the caller is currently speaking, 0 otherwise
| maximum durability value of the caller
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
| <code>^maxlife</code>
| {{number}}
| maximum health value of the caller NPC
| align="center" | {{N}}
|-
| <code>^maxmana</code>
| {{number}}
| maximum mana value of the caller NPC
| align="center" | {{N}}
|-
|-
| <code>^me</code>
| <code>^me</code>
| {{string}}
| {{Highlight|entity}}
| ID of the caller
| ID of the caller
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^life</code>
| <code>^myspell_{{Highlight|string|&lt;name&gt;}}</code>
| {{number}}
| {{int}}
| current health value of the caller NPC
| 1 if the caller is casting a spell with the given [[Script:spellcast#Spell_names|spell name]], 0 otherwise
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^maxlife</code>
| <code>^npcinsight</code>
| {{number}}
| {{Highlight|entity}}
| maximum health value of the caller NPC
| ID of the first NPC seen by the caller, or "none"
| align="center" | {{N}}
| align="center" | {{Y}}
|-
|-
| <code>^player_life</code>
| <code>^player_attribute_{{Highlight|string|&lt;attribute&gt;}}</code>
| {{number}}
| {{number}}
| the player's current full life (at the start of the frame?)
| [[Attributes|player attribute]], including modifiers
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^player_maxlife</code>
| <code>^player_gold</code>
| {{number}}
| {{number}}
| the player's maximum life
| amount of gold carried by the player
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
Line 276: Line 316:
| align="center" | {{N}}
| align="center" | {{N}}
|-
|-
| <code>^mana</code>
| <code>^player_life</code>
| {{number}}
| {{number}}
| current mana value of the caller NPC
| the player's current full life (at the start of the frame?)
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^maxmana</code>
| <code>^player_maxlife</code>
| {{number}}
| {{number}}
| maximum mana value of the caller NPC
| the player's maximum life
| align="center" | {{N}}
| align="center" | {{Y}}
|-
|-
| <code>^myspell_*</code>
| <code>^player_skill_{{Highlight|string|&lt;skill&gt;}}</code>
| {{int}}
| {{number}}
| 1 if the caller is casting a spell with the given [[Script:spellcast#Spell_names|spell name]], 0 otherwise
| [[Skills|player skill]], including modifiers
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^playerspell_*</code>
| <code>^player_zone</code>
| {{int}}
| {{string}}
| 1 if the player is casting a spell with the given [[Script:spellcast#Spell_names|spell name]] (or for "invisibility" if invisibility > 0.3)
| ID of the zone the player is in, "none" if in no zone
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
Line 301: Line 341:
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^durability</code>
| <code>^playerspell_{{Highlight|string|&lt;name&gt;}}</code>
| {{number}}
| {{int}}
| current durability value of the caller
| 1 if the player is casting a spell with the given [[Script:spellcast#Spell_names|spell name]] (or for "invisibility" if invisibility > 0.3)
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^maxdurability</code>
| <code>^poisoned</code>
| {{number}}
| {{number}}
| maximum durability value of the caller
| the poisoned value of the caller NPC
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^last_spawned</code>
| <code>^possess_{{Highlight|entity|&lt;entity&gt;}}</code>
| {{string}}
| ID of the last entity spawned by a script
| align="center" | {{N}}
|-
| <code>^dist_*</code>
| {{number}}
| distance between the caller and the entity with the given ID, 99999999999.0 on error
| align="center" | {{Y}}
|-
| <code>^demo</code>
| {{int}}
| {{int}}
| 1 if using the demo data (as indicated by the PAK
| 1 if the given item is in the player inventory, 2 if it is equipped by the player, 0 otherwise
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
Line 329: Line 359:
| {{number}}
| {{number}}
| price in gold of the caller Item
| price in gold of the caller Item
| align="center" | {{Y}}
|-
| <code>^poisoned</code>
| {{number}}
| the poisoned value of the caller NPC
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
Line 346: Line 371:
| align="center" | {{N}}
| align="center" | {{N}}
|-
|-
| <code>^player_gold</code>
| <code>^realdist_{{Highlight|entity|&lt;entity&gt;}}</code>
| {{number}}
| {{number}}
| amount of gold carried by the player
| portal-based walking distance between the caller and the entity with the given ID
| align="center" | {{Y}}
| align="center" | {{N}}
|-
|-
| <code>^player_attribute_*</code>
| <code>^repairprice_{{Highlight|entity|&lt;entity&gt;}}</code>
| {{number}}
| {{number}}
| [[Attributes|player attribute]], including modifiers
| cost in gold for the caller to repair the item with the given id (-1.f if not an item)
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^player_skill_*</code>
| <code>^rnd_{{Highlight|number|&lt;max&gt;}}</code>
| {{number}}
| {{number}}
| [[Skills|player skill]], including modifiers
| random number between 0 and the given max (to be determined if inclusive/exclusive)
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^npcinsight</code>
| <code>^rune_{{Highlight|string|&lt;name&gt;}}</code>
| {{string}}
| {{int}}
| ID of the first NPC seen by the caller, or "none"
| 0 if the player *doesn't* have the given rune, and unspecified non-zero value otherwise
| align="center" | {{Y}}
| align="center" | {{N}}
|-
|-
| <code>^target</code>
| <code>^scale</code>
| {{string}}
| {{number}}
| ID of the caller's current target, or "none"
| scale of the caller, in percent
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^focal</code>
| <code>^sender</code>
| {{number}}
| {{Highlight|entity}}
| the current camera's focal value
| ID of the entity that sent the current [[Script:Event|event]]
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^fighting</code>
| <code>^speaking</code>
| {{int}}
| {{int}}
| 1 if the player is in combat mode, 0 otherwise
| 1 if the caller is currently speaking, 0 otherwise
| align="center" | {{Y}}
| align="center" | {{Y}}
|-
|-
| <code>^camera</code>
| <code>^target</code>
| {{string}}
| {{entity}}
| ID of the active camera or <code>none</code> (Added in {{Changelog|1.2}})
| ID of the caller's current target, or "none"
| align="center" | {{N}}
| align="center" | {{Y}}
|-
| <code>^dragged</code>
| {{string}}
| ID of item being dragged by the player or <code>none</code> (Added in {{Changelog|1.2}})
| align="center" | {{N}}
|-
| <code>^angle</code>
| {{number}}
| Yaw of the caller (Added in {{Changelog|1.2}})
| align="center" | {{N}}
|-
| <code>^angle_*</code>
| {{number}}
| Yaw of the given entity (Added in {{Changelog|1.2}})
| align="center" | {{N}}
|-
| <code>^anglex_*</code>
| {{number}}
| X component of the 2D direction vector of the given entity (Added in {{Changelog|1.2}})
| align="center" | {{N}}
|-
| <code>^anglez_*</code>
| {{number}}
| Z component of the 2D direction vector of the given entity (Added in {{Changelog|1.2}})
| align="center" | {{N}}
|-
|-
| <code>^viewx</code>
| <code>^viewx</code>
Line 426: Line 426:
| align="center" | {{N}}
| align="center" | {{N}}
|-
|-
| <code>^viewx_*</code>
| <code>^viewx_{{Highlight|entity|&lt;entity&gt;}}</code>
| {{number}}
| {{number}}
| X component of the 3D view direction vector of the given entity (Added in {{Changelog|1.2}})
| X component of the 3D view direction vector of the given entity (Added in {{Changelog|1.2}})
| align="center" | {{N}}
| align="center" | {{N}}
|-
|-
| <code>^viewy_*</code>
| <code>^viewy_{{Highlight|entity|&lt;entity&gt;}}</code>
| {{number}}
| {{number}}
| Y component of the 3D view direction vector of the given entity (Added in {{Changelog|1.2}})
| Y component of the 3D view direction vector of the given entity (Added in {{Changelog|1.2}})
| align="center" | {{N}}
| align="center" | {{N}}
|-
|-
| <code>^viewz_*</code>
| <code>^viewz_{{Highlight|entity|&lt;entity&gt;}}</code>
| {{number}}
| {{number}}
| Z component of the 3D view direction vector of the given entity (Added in {{Changelog|1.2}})
| Z component of the 3D view direction vector of the given entity (Added in {{Changelog|1.2}})

Revision as of 03:09, 9 January 2022

This page describes variables in the Arx scripting language.

Variable types

Arx scripts know three basic data types:

int 32-bit signed integer
number 32-bit IEEE 754 floating-point number
string arbitrary-length string

Variables can be either global (shared between all entities) or entity-specific. There are also special system variables than can only be read. The variable type is defined by the first character of the variable name. Non-Template:Wp characters are encoded as Template:Wp.

Char Byte Scope Type
# 0x23 global int
& 0x26 global number
$ 0x24 global string
§ 0xA7 entity int
@ 0x40 entity number
£ 0xA3 entity string
^ 0x5E system (mixed)

While variables in Arx scripts are typed, there are no type restrictions for where variables are used: the types are converted automatically.

Setting variables

Global and entity variables can be modified with the following script commands:

ComandDescription
++ <variable>Increment a number or int script variable.
-- <variable>Decrement a number or int script variable.
dec <variable> <value*>Subtract a value from a number or int script variable.
div <variable> <value*>Divide a number or int script variable by a value.
inc <variable> <value*>Add a value to a number or int script variable.
mul <variable> <value*>Multiply a number or int script variable with a value.
set <variable> <value*>Set a script variable.
unset <variable>Remove a script variable.

System variables (those starting with ^) cannot be modified.

Using variables

The pattern ~variable~ will be replaced with the value of the variable named variable (converted to a string) when it occurs in a script command parameter. Spaces in the value will not cause it to be split into multiple parameters, even when the parameter is unquoted. Non-existent system and unset number and int variables will be replaced with 0, unset string variables will be replaced with void, and ~variable~ where variable is an invalid variable name will be replaced with variable.

Additonally, some parameters will automatically dereference variables if passed a variable name: All number and int variables will dereference system, number or int, but not string variables and parameters marked with a * will automatically dereference any variable. Automatic dereferencing of variables happens after ~variable~ expansion.

System variables

System variables don't always have the value type in the name. Some return results specific to the calling object, others are global. Some system variable prefixes (denoted with a <…> in the following table) work as functions with the remainder used as the parameters.

Name Type Description Used
^$param<i> string event parameter for the given number starting with 1 (^$param4 and higher added in Arx Libertatis 1.3)
^&param<i> number event parameter for the given number starting with 1 (^&param4 and higher added in Arx Libertatis 1.3)
^#param<i> int event parameter for the given number starting with 1 (^#param4 and higher added in Arx Libertatis 1.3)
^#timer1 int elapsed time in milliseconds since the last starttimer timer1 call (or 0 if the stopwatch is stopped)
^#timer2 int elapsed time in milliseconds since the last starttimer timer2 call (or 0 if the stopwatch is stopped)
^#timer3 int elapsed time in milliseconds since the last starttimer timer3 call (or 0 if the stopwatch is stopped)
^#timer4 int elapsed time in milliseconds since the last starttimer timer4 call (or 0 if the stopwatch is stopped)
^$objontop entity ID of the entity above the caller (or "none")
^&playerdist number distance between the caller and the player
^#playerdist int distance between the caller and the player
^amount int number of items in the stack if the caller is an item (stack), 0 otherwise
^angle number yaw of the caller (Added in Arx Libertatis 1.2)
^anglex_<entity> number X component of the 2D direction vector of the given entity (Added in Arx Libertatis 1.2)
^anglez_<entity> number Z component of the 2D direction vector of the given entity (Added in Arx Libertatis 1.2)
^angleto_<entity> number direction (yaw) from the caller to the given entity (Added in Arx Libertatis 1.3)
^arxdays int in-game time since the start of the playthough, in in-universe days
^arxhours int in-game time since the start of the playthough, in in-universe hours
^arxminutes int in-game time since the start of the playthough, in in-universe minutes
^arxseconds int in-game time since the start of the playthough, in in-universe seconds
^arxtime_hours int time of the day, in in-universe hours (1-12, 0 at the start of the game)
^arxtime_minutes int time of the day, in in-universe minutes (1-60, 0 at the start of the game)
^arxtime_seconds int time of the day, in in-universe seconds (1-60, 0 at the start of the game)
^behavior string current behavior of the caller NPC
^camera entity ID of the active camera or none (Added in Arx Libertatis 1.2)
^demo int 1 if using the demo data (as indicated by the PAK
^dist_<entity> number distance between the caller and the entity with the given ID, 99999999999.0 on error
^dragged entity ID of item being dragged by the player or none (Added in Arx Libertatis 1.2)
^durability number current durability value of the caller
^fighting int 1 if the player is in combat mode, 0 otherwise
^focal number the current camera's focal value
^gamedays int in-game time since the start of the playthough, in days (in 10-days before Arx Libertatis 1.2)
^gamehours int in-game time since the start of the playthough, in hours
^gameminutes int in-game time since the start of the playthough, in minutes
^gameseconds int in-game time since the start of the playthough, in seconds
^gore int 0 for low-violence versions, 1 for normal versions (Arx Libertatis always reports 1)
^ininitpos int 1 if the caller is exactly at it's initial position, 0 otherwise
^inplayerinventory int 1 if the caller is in the player inventory, 0 otherwise
^inzone_<zone> int 1 if the caller is in the area with the given ID, 0 otherwise
^last_spawned entity ID of the last entity spawned by a script
^life number current health value of the caller NPC
^mana number current mana value of the caller NPC
^maxdurability number maximum durability value of the caller
^maxlife number maximum health value of the caller NPC
^maxmana number maximum mana value of the caller NPC
^me entity ID of the caller
^myspell_<name> int 1 if the caller is casting a spell with the given spell name, 0 otherwise
^npcinsight entity ID of the first NPC seen by the caller, or "none"
^player_attribute_<attribute> number player attribute, including modifiers
^player_gold number amount of gold carried by the player
^player_hunger number the player's hunger value
^player_life number the player's current full life (at the start of the frame?)
^player_maxlife number the player's maximum life
^player_skill_<skill> number player skill, including modifiers
^player_zone string ID of the zone the player is in, "none" if in no zone
^playercasting int 1 if the player is casting a life_drain, harm, fire/ice_field or (mass_)lightning_strike spell
^playerspell_<name> int 1 if the player is casting a spell with the given spell name (or for "invisibility" if invisibility > 0.3)
^poisoned number the poisoned value of the caller NPC
^possess_<entity> int 1 if the given item is in the player inventory, 2 if it is equipped by the player, 0 otherwise
^price number price in gold of the caller Item
^player_poison number the player's poisoned value
^poisonous number the poisonous value of the caller Item
^realdist_<entity> number portal-based walking distance between the caller and the entity with the given ID
^repairprice_<entity> number cost in gold for the caller to repair the item with the given id (-1.f if not an item)
^rnd_<max> number random number between 0 and the given max (to be determined if inclusive/exclusive)
^rune_<name> int 0 if the player *doesn't* have the given rune, and unspecified non-zero value otherwise
^scale number scale of the caller, in percent
^sender entity ID of the entity that sent the current event
^speaking int 1 if the caller is currently speaking, 0 otherwise
^target Am Shaegar (player) ID of the caller's current target, or "none"
^viewx number X component of the 3D view direction vector of the caller (Added in Arx Libertatis 1.2)
^viewy number Y component of the 3D view direction vector of the caller (Added in Arx Libertatis 1.2)
^viewz number Z component of the 3D view direction vector of the caller (Added in Arx Libertatis 1.2)
^viewx_<entity> number X component of the 3D view direction vector of the given entity (Added in Arx Libertatis 1.2)
^viewy_<entity> number Y component of the 3D view direction vector of the given entity (Added in Arx Libertatis 1.2)
^viewz_<entity> number Z component of the 3D view direction vector of the given entity (Added in Arx Libertatis 1.2)

System variables marked as unused may be removed in a future version of Arx Libertatis.

In-universe time

In-universe time runs 6 times faster than real time and has only 12 hours per day. Since these variables are not actually used and NPCs use quest progress instead of time for their day/night cycle this can be considered non-canonical. There is also an unused arx_bell entity class that simulates a day/night cycle with 60 seconds per in-universe day plus 60 seconds per in-universe night.