Arx scripting language

From Arx Libertatis Wiki
Jump to: navigation, search

This article describes the scripting language used in Arx Fatalis and Arx Libertatis.

Entities

Main article: Entity.

Classes

Events

Main article: Script:Events.

Variables

Main article: Script:Variables.

Arx scripts know three basic data types: int, real and text. 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.

Char Byte Scope Type
# 0x23 global int
& 0x26 global real
$ 0x24 global text
§ 0xA7 entity int
@ 0x40 entity real
£ 0xA3 entity text
^ 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.

Commands

Main article: Script:Commands.

Control flow

Main article: Script:Control flow.


Search script files

mkdir assets
cd assets
arxunpak ~/.local/share/arx/{data,loc,data2,sfx,speech}.pak
grep -rP -ia 's_*p_*e_*c_*i_*a_*l_*f_*x' graph/obj3d/interactive/