Syntax

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search


Typical function syntax on the Wiki:

<(returnvalue)> <reference><.><function> <arguments> <optional arguments>

Each element is enclosed by square brackets to clearly show the distinct elements. The function itself is present on all function pages, the rest of the elements are optional depending on the function. If the reference is optional it's set in italics.


(returnvalue)
The value that's returned by the function and can be stored in a variable. You're not required to do anything with it.
reference
The reference the function runs on.
.
See UseReference, only when there's a reference.
function
The function itself, always present.
arguments
Any number of arguments required by the function, separated by spaces or comma's.
optional arguments
These arguments are not required, see the function's page for an explanation about their use.

The returnvalue, the reference, the arguments and the optional arguments are often displayed in the following fashion:

name:type

The name is a description, the type is the variable type that's returned/required. More details on types in the list below.

bool
An integer value of 0 for false, and 1 representing true.
chars
A series of characters.
float
A floating point value.
int(eger)
A 32 bit integer value (as both Long Integer and Short Integer are the same in Oblivion modding).
ref
A reference variable, can contain a reference formID or a base formID.
ArrayID/StringID/HudSID/HudTID
Integer values (either 15 or 16 bit) from 0 up (1 for HUDs) used by pluggy
String
OBSE String format - as of now, works like PrintC in that you need
"blah" ''var01'' ''var02''...
However, there was talk that for v17 you can skip the quotes and just use a string variable.
Others
NVC variables, TSFC variables, and ?