United Offensive stock script API registry¶
Scope¶
This appendix records the callable and field names registered by the stock
multiplayer game module. The project’s recovered STRICT_STOCK source is
the exclusive authority. Names added only by maintained compatibility,
diagnostic, or safety code are not included.
This is a registry reference, not a promise that every method accepts every object subtype. A method name can compile because it exists in the global method resolver and still reject the receiver or arguments at runtime. The language rules and call syntax are specified in United Offensive scripting language.
Name resolution¶
Global function names are searched in a 120-entry table. Method names are searched in this exact order:
player methods (60 entries);
script-mover methods (12 entries);
vehicle methods (31 entries);
HUD-element methods (14 entries);
generic built-in methods (56 entries).
Each table uses exact string comparison. Script identifiers have already been canonicalized to lowercase by the scanner.
The registry contains two deliberate duplicate slots:
precacheturretappears twice in the global-function table and resolves to the same callback;getentitynumberappears twice in the generic-method table and resolves to the same callback.
The first matching entry wins.
Global functions¶
Developer-only functions¶
These names are marked developer-only by the stock registry:
printprintlnassert
All other global registry entries have the ordinary availability flag.
Outside /# ... #/, a developer-only call is legal only as a statement and
the compiler conditionally retains it as developer code. Inside a developer
region, it follows the ordinary call-expression rules.
Console, messaging, and diagnostics¶
|
|
|
prof_begin and prof_end are present but their stock game callbacks
have empty bodies.
Entity creation, lookup, and testing¶
|
|
|
Cvars, time, and level control¶
|
|
|
Weapons and animation queries¶
|
|
|
Objectives and multiplayer state¶
|
|
|
Scalar, random, vector, and angle operations¶
|
|
|
Audio¶
|
|
|
Precache and registration¶
|
|
|
Effects, damage, and environment¶
|
|
|
HUD and vehicles¶
|
|
|
Method registries¶
Player methods¶
|
|
|
Script-mover methods¶
These are resolved after player methods and before vehicle methods:
|
|
|
Vehicle methods¶
|
|
|
HUD-element methods¶
|
|
|
Generic built-in methods¶
|
|
|
Script-visible fields¶
Entity and spawn fields¶
The spawn parser and live entity-field registry expose the same ordered field
set. time aliases the storage used by speed; _color aliases
color; and shard aliases count.
Field |
Value class |
Live entity write behavior |
|---|---|---|
|
string |
Read-only after spawn. |
|
vector |
Custom origin setter. |
|
model/string |
Read-only after spawn. |
|
int |
Read-only after spawn. |
|
float |
Writable. |
|
string |
Writable. |
|
float |
Writable. |
|
int |
Writable; |
|
light field |
Special spawn-time conversion; the live generic field bridge has no getter or setter case for this type. |
|
int |
Writable. |
|
vector |
Custom angle setter. |
|
float |
Writable. |
|
vector |
Writable. |
|
float |
Writable. |
|
vector |
Writable aliases. |
|
int |
Writable. |
|
float |
Writable. |
|
float |
Writable. |
|
int |
Writable. |
|
int |
Writable alias of |
|
string |
Writable. |
|
string |
Read-only after spawn. |
|
int |
Writable. |
|
entity |
Writable entity reference. |
Player/client fields¶
Field |
Value class |
Access |
|---|---|---|
|
string |
Read-only. |
|
custom string/team |
Read/write. |
|
custom string/squad |
Read/write. |
|
custom string/state |
Read/write. |
|
int |
Read/write through custom setter. |
|
int |
Read/write through custom setter. |
|
int |
Read-only. |
|
int |
Read/write through custom setter. |
|
int |
Read/write. |
|
custom string/icon |
Read/write. |
|
custom string/icon |
Read/write. |
|
custom string/team |
Read/write. |
|
int |
Read/write through custom setter. |
|
float seconds |
Read/write; stored internally in milliseconds. |
|
object-like field |
Read-only. |
|
int |
Read/write. The C registry label is |
HUD-element fields¶
Field |
Value class |
Notes |
|---|---|---|
|
int |
Screen position components. |
|
float |
Uses the stock font-scale setter. |
|
string enum |
|
|
string enum |
|
|
string enum |
|
|
vector |
RGB conversion through the stock color setter/getter. |
|
float |
Alpha conversion through the stock setter/getter. |
|
localized string |
Set through the localized-string field handler. |
|
float |
Sort key. |
|
bool/int |
Selects archived rather than current HUD transmission. |
Vehicle path-node fields¶
The vehicle path-node field bridge exposes:
Field |
Value class |
|---|---|
|
string |
|
vector |
|
float |
Vehicle path-node fields are read-only through the script object-field bridge.
Implementation basis¶
The registry counts, names, order, and flags above come from the maintained
stock tables in script_builtins.c, script_player.c, vehicle.c,
hudelem.c, and client_fields.c. Entity/spawn fields come from the two
ordered field tables in script_builtins.c. Method lookup order comes from
Scr_GetMethod in that same source area.