Object Attribute Data (OAD) Documentation
The
OAD system is designed to allow objects in the 3D editor to have programmer defined, user edited data associated with them. For example, an object can have an integer which indicates how many life points it starts with which is editable in the 3D level editor, and accessible from code within your game. This is accomplished by defining a data structure which is shared between the attribute editor and the game. From the game's point of view, the system allows the programmer to very quickly define C data structures in their game, and connect them up to a user interface in the level editor.
This data structure defines an array of what we call attributes (thinking of changing to properties) which can be edited on a particular object. Each attribute contains what type of data it is (int, fixed point, string, filename, color, etc.) as well as range limits, its name, help describing it's use, etc.
Object Attributes are described in .oas files, which are edited by the programmer. The .oas file is processed into several different output files: the .oad, .iff, .def and the .ht files. The .oad file is a binary file containing an array of identical structures (defined in oad.h), which describes to attrib what the user interface looks like and what the final binary structure output is. This format is obsolete and only used by the 3D studio Max attribute editor (because I am too lazy to update it to use the new .iff format). The .iff file contains the same information as the .oad file, but instead of an array of fixed size structures it uses IFF chunks so is much easier to extend. The .iff files are used by attribedit, the command line attribute editor tool (which is also called from inside of Innonvation 3D). The .ht file contains a C structure definition which is included into the game, and used to access the attribute data attached to the object in the level file (created by attrib or attribedit). Each .oas file describes an object type. There can be multiple object types, each using its own .oas file. One .oas file can include other .oas files, allowing reuse of .oas definitions in a manner similar to the object-oriented concept of composition or inheritance. In the 3D level editor interface, the type of each object is selected using the object class selector in attrib/attribedit.
The .oas files are located in wfsource/source/oas. The master list of all .oas files which are made available to the game and to the attribute editor is in objects.mac.
Types:
Description
32 bit Integer
1.15.16 fixed point number
Fixed length string
Boolean
32 bit color, 8 bits each(alpha, red, green, blue)
Same as string, with file requester
Object index
Class index
3D Vector (should we use a struct of FX32's instead?)
Quaternion (should we use a struct of FX32's instead?)
Used by collision box (should definitely use a struct of VEC3's for this)
PROPERTY_SHEET_HEADER |
'STRU' |
(none)
KevinSeghetti -- this is a work in progress, not finished yet
Type Entry macros, after each macro name is a table with each parameter name and a description (if a paramter name is followed by = then that indicates a default if no parameter given).
Begins the class definition
Name to display
2. |
Class name=Display name |
Internal name used to refer to this type
Closes the class definition
(none)
Begins a new property sheet definition (tabs in attribedit)
Name which is displayed on tab in attribedit)
In the 3D studio Max version this flag indicates if the rollup starts opened or closed
Expression used to enable this tab (
KevinSeghetti I don't think I support this in attribedit)
Not used by attribedit, not sure in the Max version uses this
Closes a property sheet
(none)
TYPEENTRYINT32
A 32 bit integer
Internal name of this attribute
Name which is displayed in the attribute editor
Minimum value this integer is allowed to be set to
Maximum value this integer is allowed to be set to
default value, this is the value this integer will have if not overridden.
String enumerating values, used for drop down comboboxes, there needs to be max-min entries, separated by vbar
How to display this integer in the attribute editor
Help string for this attriubte, will pop up in a tool tip if mouse is hovered over
9. |
szEnableExpression="1" |
Expression which is evaulated by the attribute editor to deternmine if the user is currently allowed to chane this attribute (for example, if movemnt type is static, then user can't change most physics parameters)
y screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
x screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
TYPEENTRYFIXED32
A 32 bit fixed point # (1.15.16)
Internal name of this attribute
Name which is displayed in the attribute editor
Minimum value this number is allowed to be set to
Maximum value this number is allowed to be set to
default value, this is the value this number will have if not overridden.
How to display this number in the attribute editor
Help string for this attriubte, will pop up in a tool tip if mouse is hovered over
8. |
szEnableExpression="1" |
Expression which is evaulated by the attribute editor to deternmine if the user is currently allowed to chane this attribute (for example, if movemnt type is static, then user can't change most physics parameters)
y screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
x screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
TYPEENTRYVECTOR
Currently Unused.
TYPEENTRYSTRING
A variable lenght text string. Used for things like filenames and object names
Internal name of this attribute
Name which is displayed in the attribute editor
Help string for this attriubte, will pop up in a tool tip if mouse is hovered over
4. |
szEnableExpression="1" |
Expression which is evaulated by the attribute editor to deternmine if the user is currently allowed to chane this attribute (for example, if movemnt type is static, then user can't change most physics parameters)
y screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
x screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
How this string is displayed
TYPEENTRYSTRING_ENUM
Currently Unused
TYPEENTRYSTRING_IGNORE
Only used by TYPEENTRY_XDATA_NOTES
TYPEENTRYBOOLEAN
A variable lenght text string. Used for things like filenames and object names
Internal name of this attribute
Name which is displayed in the attribute editor
Default boolean value
4. |
showas=SHOW_AS_CHECKBOX |
How to display this attribute in the attribute editor. Options are
-
-
-
-
-
-
- CHECKBOX
- ???
Help string for this attriubte, will pop up in a tool tip if mouse is hovered over
6. |
szEnableExpression="1" |
Expression which is evaulated by the attribute editor to deternmine if the user is currently allowed to chane this attribute (for example, if movemnt type is static, then user can't change most physics parameters)
y screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
x screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
TYPEENTRYBOOLEANTOGGLE
Same as boolean but uses 2 radio buttons for values
Internal name of this attribute
Name which is displayed in the attribute editor
Default boolean value
4. |
showas=SHOW_AS_RADIOBUTTONS |
How to display this attribute in the attribute editor. Options are
-
-
-
-
-
-
- CHECKBOX
- ???
names to put on radiobuttons
Help string for this attriubte, will pop up in a tool tip if mouse is hovered over
7. |
szEnableExpression="1" |
Expression which is evaulated by the attribute editor to deternmine if the user is currently allowed to chane this attribute (for example, if movemnt type is static, then user can't change most physics parameters)
y screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
x screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
TYPEENTRYOBJREFERENCE
Object reference, used to refer to one object from another (like the camshot follow field)
Internal name of this attribute
Name which is displayed in the attribute editor
Help string for this attriubte, will pop up in a tool tip if mouse is hovered over
4. |
szEnableExpression="1" |
Expression which is evaulated by the attribute editor to deternmine if the user is currently allowed to chane this attribute (for example, if movemnt type is static, then user can't change most physics parameters)
y screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
x screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
default object name
TYPEENTRYFILENAME
File name, uses a file requestor
Internal name of this attribute
Name which is displayed in the attribute editor
Default file filter
Help string for this attriubte, will pop up in a tool tip if mouse is hovered over
5. |
szEnableExpression="1" |
Expression which is evaulated by the attribute editor to deternmine if the user is currently allowed to chane this attribute (for example, if movemnt type is static, then user can't change most physics parameters)
y screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
x screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
TYPEENTRYXDATA_CONVERT
Used for things like external scripts, probably needs a better name
Internal name of this attribute
Name which is displayed in the attribute editor
Name of XData chunk to convert
boolean indicating if this field is required to be filled out
Help string for this attriubte, will pop up in a tool tip if mouse is hovered over
6. |
szEnableExpression="1" |
Expression which is evaulated by the attribute editor to deternmine if the user is currently allowed to chane this attribute (for example, if movemnt type is static, then user can't change most physics parameters)
y screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
x screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
TYPEENTRYCOLOR
Color picker
Internal name of this attribute
Name which is displayed in the attribute editor
Default color
Help string for this attriubte, will pop up in a tool tip if mouse is hovered over
5. |
szEnableExpression="1" |
Expression which is evaulated by the attribute editor to deternmine if the user is currently allowed to chane this attribute (for example, if movemnt type is static, then user can't change most physics parameters)
y screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
x screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
TYPEENTRYCAMERA
Special flag indicating camera data should be copied into here from 3D editor
TYPEENTRYWAVEFORM
Currently Unused
TYPEENTRYCLASSREFERENCE
Used to refer to class types, for example actbox activated by class.
Internal name of this attribute
Name which is displayed in the attribute editor
Help string for this attriubte, will pop up in a tool tip if mouse is hovered over
4. |
szEnableExpression="1" |
Expression which is evaulated by the attribute editor to deternmine if the user is currently allowed to chane this attribute (for example, if movemnt type is static, then user can't change most physics parameters)
y screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
x screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
GROUP_START
Indicates the start of a group of attributes, this shows up as a box around the attributes in attribedit
Internal name of this attribute
Unused
3. |
szEnableExpression="1" |
Expression which is evaulated by the attribute editor to deternmine if the user is currently allowed to chane this group of attributes (for example, if movemnt type is static, then user can't change most physics parameters)
y screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
x screen coordindate of this attribute (
KevinSeghetti -- legacy, I don't think any of the current attribute editors use this)
GROUP_STOP
Flags the end of a group
The
OAD system file format: See "File Formats.doc"
Note: the binary .oad file has been replaced by an .iff file.
The binary .oad file is currently only used by the 3D Studio Max tools (because I am too lazy to go back and update them to use the IFF format).
Click on OADIFFFormat for the IFF format documentation