You are here: Foswiki>WorldFoundry Web>OADIFFFormat (18 Apr 2002, KevinSeghetti;)Edit Attach

OAD IFF file Format

KevinSeghetti -- This document was written for a 3rd party using our editing system in their own game, so it has a 'not using World Foundry' slant which should probably be removed.

This data is designed to supplement the actual file, refer to one of the .oad IFF files while reading this. The outer chunk name for a World Foundry OAD file is 'TYPE', contained within are:
Chunk Name
Description
'NAME'
String containing name of this group of data
'TYPE': name of object type (class)
'STRU': name of rollup or group
DATA CHUNK: name of this data chunk
'STRU'
Structure, chunk containing other chunks, used for scoping and grouping of data
'OPEN'
Flag used by attrib to decide if this roll-up should be open or not (kts: replace with 'FLAG'
'DSNM'
Display Name of this data type (what attrib shows its name to be)
'RANG'
Minimum and Maximum range of value, stored in the same type as the data type.
  Struct
  {
    DATA_TYPE min;
    DATA_TYPE max;
  }
  
'DATA'
The actual value of this data type
  Struct
  {
    DATA_TYPE value;
  }
  
'ENVL'
Enumeration Values. String containing textual descriptions of the values of this data type, delineated by '|'. Used by attrib for multiple choice drop-downs. Example: "False|True"
'HELP'
String used by attrib for tool-tips. Contains user information about how to use this data type.
'ENBL'
Enable. String containing an expression used to determine if the data type is currently enabled (editable in attrib)
'DISP'
Enumeration indicating to attrib how to display this data type:
00 SHOW_AS_N_A
Not Applicible, some types don't look at the show as field
01 SHOW_AS_NUMBER
ordinary edit box
02 SHOW_AS_SLIDER
slider
03 SHOW_AS_TOGGLE
button switching between two strings found in 'ENVL'
04 SHOW_AS_DROPMENU
drop-down menu containing strings found in 'ENVL'
05 SHOW_AS_RADIOBUTTONS
radio buttons using strings found in 'ENVL'
06 SHOW_AS_HIDDEN
do not display
07 SHOW_AS_COLOR
color picker
08 SHOW_AS_CHECKBOX
simple checkbox
09 SHOW_AS_MAILBOX
string, for use with separate text file enumerating values
10 SHOW_AS_COMBOBOX
drop-down menu containing strings found in 'ENVL'
'HINT'
String containing special information, type specific.

Data Type Chunks

Each of these is a container chunk, with the actual value stored in the 'DATA' chunk inside.

Chunk Name
Description
'I32'
32 Bit integer
'F32'
32 bit fixed point #
'STR'
String, could contain a 'LEN' chunk indicating string length.

OAS Files

OAS files are text files which are passed through prep to produce the .iff file and the .ht file for each object type. They contain prep macros, which support default parameters, parameters are comma separated, to use the default, put nothing between the commas (you can leave the commas off the end of the list). See oad.doc for descriptions of what most of these entries mean. Common parameters:

Parameter Name
Description
name
name given to this OAD Entry, this is the name you will use to refer to this field from source code (with spaces removed), also used as display name if no display name given.
displayName
Name displayed in attribute editor.
szEnableExpression
Boolean expression which controls whether the Entry is currently editable, or ghosted.
x
OBSOLETE. screen position of parameters
y
OBSOLETE. screen position of parameters
min
Minimum value for Entry
max
Maximum value for Entry
default
Default value for Entry
help
String used for tool-tips on each Entry (not implemented yet)
showas
Used to control how each Entry is displayed. Valid types are
SHOW_AS_N_A
Generic
SHOW_AS_NUMBER
Only for numbers
SHOW_AS_SLIDER
Only for numbers
SHOW_AS_TOGGLE
Button which changes text
SHOW_AS_DROPMENU
Drop down menu of choices
SHOW_AS_RADIOBUTTONS
Radio button array
SHOW_AS_HIDDEN
Don't display at all
SHOW_AS_COLOR
Use color picker
SHOW_AS_CHECKBOX
Use Check box (boolean)
SHOW_AS_MAILBOX
WORLD FOUNDRY GAME ENGINE ONLY
SHOW_AS_COMBOBOX
Drop down with editing


Macro Name
Parameters
Description
TYPEHEADER
displayName, variableName=displayName(OBSOLETE)
Must come before any other macros, sets macro name
TYPEFOOTER
(none)
Must come after all other macros, closes out type description
PROPERTY_SHEET_HEADER
name, active=0, szEnableExpression="1", size=0
Beginning of new property sheet. If 'active' is true, the sheet will default to open, otherwise it will start closed. 'size' is used to override the default size of the sheet. (only use if the automatic sheet size is incorrect.)
PROPERTY_SHEET_FOOTER
(none)
Ending of property sheet
GROUP_START
name, width=0, szEnableExpression="1", y=-1, x=-1
Beginning of a group. Groups are shown in max inside a small line box. Groups may not be nested. 'width' sets the width of the group (only use if the automatic width is incorrect.)
GROUP_END
(y=-1,x=-1)
Ending of a group. 'x' & 'y' are OBSOLETE.
TYPEENTRYFIXED32
name, displayName=name, min, max, def=min, showas=SHOW_AS_N_A, help="", szEnableExpression="1", y=-1, x=-1
A 32 bit fixed point value: 1.15.16 (sign, whole, fraction). Creates 'FX32' chunk.
TYPEENTRYINT32
name, displayName=name, min, max, def=min, buttons="", showas=SHOW_AS_NUMBER, help="", szEnableExpression="1", y=-1, x=-1
A 32 bit Scalar Value. Creates 'I32' chunk. If showas causes text to be used for choices, buttons contains the strings to use (| seperated)
TYPEENTRYSTRING
name, displayName=name, length, help="", szEnableExpression="1", y=-1, x=-1
A text string. Creates 'STR' chunk. 'length' specifies the length of the string.
TYPEENTRY_STRING_IGNORE
name, displayName=name, help="", szEnableExpression="1", y=-1, x=-1
A text string, not placed in final output from level converter. Used for notes. Creates 'STR' chunk.
TYPEENTRYBOOLEAN
name, displayName=name, def, showas=SHOW_AS_CHECKBOX, help="", szEnableExpression="1", y=-1, x=-1
A single bit of output. Creates 'I32' chunk.
TYPEENTRYBOOLEANTOGGLE
name, displayName=name,def, showas=SHOW_AS_RADIOBUTTONS, buttons="FALSE TRUE", help="", szEnableExpression="1", y=-1, x=-1
A single bit of output. Displays as a single button which changes name when clicked. Names are given in the 'buttons' field. Creates 'I32' chunk.
TYPEENTRYOBJREFERENCE
name, displayName=name, help="", szEnableExpression="1", y=-1, x=-1, def=""
Reference to another Max object. Creates 'STR' chunk containing name of referenced object.
TYPEENTRYFILENAME
name, displayName=name, filespec="*.*", help="", szEnableExpression="1", y=-1, x=-1
Uses a file requestor to obtain a filename. Creates 'STR' chunk containing filename. 'filespec'
TYPEENTRYCOLOR
name, displayName=name, def, help="", szEnableExpression="1", y=-1, x=-1
Uses a color selector to get a color. Creates an 'I32' chunk, 32 bit color, 8 bits each(alpha, red, green, blue)
TYPEENTRYCLASSREFERENCE
Name, displayName=name, help="", szEnableExpression="1", y=-1, x=-1, def=""
This displays as a class picker from a drop down list. Creates an 'STR' chunk containing the name of the class chosen. (Class = World Foundry object type).
LEVELCONFLAGSHORTCUT
(none)
This displays an object picker, allows one object to refer to another objects attributes. (Check with Bill, does this create output?)
LEVELCONFLAGNOINSTANCES
(none)
If an object type contains this flag, the level converter should ignore the object and not convert it. (This is how disabled works). Creates a 'HINT' chunk with text of "No Instances"
LEVELCONFLAGEXTRACTLIGHT
(none)
If an object type contains this flag, the level converter should extract lighting information for this object (Check with Bill, does max2ifflvl output enough information to do this?)
LEVELCONFLAGCOMMONBLOCK
name
Beginning of a common block. ONLY USED BY WORLD FOUNDRY GAME ENGINE.
LEVELCONFLAGENDCOMMONBLOCK
(none)
Ending of a common block. ONLY USED BY WORLD FOUNDRY GAME ENGINE.
LEVELCONFLAGROOM
(none)
If an object type contains this flag, the level converter should interpret this object as a room. ONLY USED BY WORLD FOUNDRY GAME ENGINE
TYPEENTRYCAMERA
name, displayName=name, followObj, szEnableExpression="1"
This is a flag used by levelcon to extract camera information. OBSOLETE. DO NOT USE.
TYPEENTRYCAMERAREFERENCE
name, displayName=name, help="", szEnableExpression="1", y=-1, x=-1
Reference to a Max camera. Creates 'STR' chunk containing name of referenced camera. OBSOLETE DO NOT USE.
TYPEENTRYLIGHTREFERENCE
name, displayName=name, help="", szEnableExpression="1", y=-1, x=-1
Reference to a Max light. Creates 'STR' chunk containing name of referenced light. OBSOLETE DO NOT USE.
Topic revision: r1 - 18 Apr 2002, KevinSeghetti;
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback