The Descent 3 Tablefile Format (.GAM) File Spec. (Text file version: 0.501) --------------------------------------------------------------------------- History: Version Description ------- ----------- 0.502 Fixed error in Weapon page, terrain damage was reported as a float, but should be a byte. 0.501 Fixed error in Texture page, related to procedural textures. The loop reading the palette went 256 iterations, when it should only go 255. 0.50 Initial Creation. Very rough. A Tablefile is a collection of pages that define the properties of textures, weapons, doors, ships, sounds and objects in the Descent 3 universe. A page is a chunk of data that are the properties for one such building block. Some pages contain data primitives along with property data. A data primitive is the raw data needed to define the building block. For instance, one type of primitive for objects is the .OOF (Outrage Object Format) file for the polymodel to be associated with the object. Byte order is little endian (INTEL format) unless stated otherwise. Each page contains it's own version number. There is no versioning information for the Tablefile in general. Each page is responsible for it's own version control. The following is a list of page types that you will find in a Tablefile, along with the value associated with them: PageType Value Description -------- ----- ----------- PAGETYPE_UNKNOWN 0 An empty page. Usually used to create an empty Tablefile. Also is usually the first page found in a Tablefile. PAGETYPE_TEXTURE 1 Contains data and properties for a texture. PAGETYPE_WEAPON 2 Contains data and properties for a weapon (player or robot). PAGETYPE_DOOR 5 Contains data and properties for a door. PAGETYPE_SHIP 6 Contains data and properties for a player ship. PAGETYPE_SOUND 7 Contains data and properties for a sound. PAGETYPE_GAMEFILE 9 Contains data and properties for a game file. Game files are any kind of file that may be used by Descent 3 in some way. Any extra files (that are not a data primitive) in the D3.HOG file are enumerated in these pages. PAGETYPE_GENERIC 10 Contains data and properties for a generic object. A generic object is an object of type robot, powerup, clutter or building. The following page types are outdated and no longer supported. They are listed here because it is possible they may be in a Tablefile. Should you come across one of these pagetypes, it should just be skipped over: PageType Value -------- ----- PAGETYPE_ROBOT 3 PAGETYPE_POWERUP 4 PAGETYPE_MEGACELL 8 TABLEFILE STRUCTURE ------------------- A Tablefile is a collection of the above listed pages formatted in the following way: Offset Size Description ------ ---- ----------- 0 1 byte Page type (see above) 1 4 byte int Page length in bytes (which includes the 4-byte length) 5 (x-4) bytes Page data *Offset is the offset from the start of the file (for Page 0) or the offset from the end of the previous page. This pattern is continued until the EOF (End of File). Pages are listed in no specific order, usually a PAGETYPE_UNKNOWN page will be page 0. For optimal performance (in Descent 3) it is suggested that pages that are dependent on another page come after those pages it is dependent on. The easiest way to handle this is to sort the pages by pagetype in the following way (from beginning of the file to the end): PAGETYPE_TEXTURE PAGETYPE_SOUND PAGETYPE_WEAPON PAGETYPE_GENERIC PAGETYPE_DOOR PAGETYPE_SHIP PAGETYPE_GAMEFILE PSUEDOCODE FOR TABLEFILE READING -------------------------------- FILE *file; // open the table file file = fopen(filename,"rb"); while (!feof(file)) { unsigned char ptype=FILE_READBYTE(file); int length=FILE_READINT(file); switch(ptype) { case PAGETYPE_TEXTURE: tablefile_ReadTexturePage(file); break; case PAGETYPE_DOOR: tablefile_ReadDoorPage(file); break; case PAGETYPE_SOUND: tablefile_ReadSoundPage(file); break; case PAGETYPE_GENERIC: tablefile_ReadGenericPage(file); break; case PAGETYPE_GAMEFILE: tablefile_ReadGamefilePage(file); break; case PAGETYPE_SHIP: tablefile_ReadShipPage(file); break; case PAGETYPE_WEAPON: tablefile_ReadWeaponPage(file); break; // old pagetypes, no longer valid and not supported case PAGETYPE_ROBOT: case PAGETYPE_POWERUP: case PAGETYPE_MEGACELL: case PAGETYPE_UNKNOWN: fseek(file,length-sizeof(int),SEEK_CUR); break; } } fclose(file); THIS DOCUMENT IS NOT AS COMPLETE AS IT POSSIBLY COULD BE. IT IS RECOMMENDED THAT IF YOU ARE WRITING A TABLEFILE EDITOR/CREATOR OF SOME SORT TO ANALYZE THE VALUES OF THE DATA OF THE OBJECTS, TEXTURES, SOUNDS, ETC. IN THE D3.HOG IN YOUR DESCENT 3 DIRECTORY. DOING THIS, YOU WILL BE ABLE TO GET A GOOD IDEA OF THE RANGES OF THE VARIABLES AND WHAT FLAGS/SETTINGS DO WHAT. ----------------------------------------------------------------------------- Page Type Description ----------------------------------------------------------------------------- *NOTE: For the remainder of the document: the symbol "PAGENAME_LEN" represents a value of 35. the symbol "MAX_MODULENAME_LEN" represents a value of 32. the symbol "MAX_PLAYER_WEAPONS" represents a value of 21. the symbol "MAX_WB_GUNPOINTS" represents a value of 8. the symbol "MAX_WB_FIRING_MASKS" represents a value of 8. the symbol "MAX_PROC_ELEMENTS" represents a value of 8000. the symbol "MAX_WEAPON_SOUNDS" represents a value of 7 the symbol "MAX_DSPEW_TYPES" represents a value of 2. the symbol "NUM_MOVEMENT_CLASSES" represents a value of 5. the symbol "NUM_ANIMS_PER_CLASS" represents a value of 24. the symbol "MAX_WBS_PER_OBJ" represents a value of 21. the symbol "MAX_OBJ_SOUNDS" represents a value of 2. the symbol "MAX_AI_SOUNDS" represents a value of 5. the symbol "MAX_DEATH_TYPES" represents a value of 4. Data Size's and Description --------------------------- byte = 1 byte short = 2 bytes int = 4 bytes float = 4 bytes vector = 3 floats (x,y,z) matrix = 3 vectors (right,up,forward) string = \0 (NULL) terminated string, of max length specified (max length includes the NULL terminator). physics_chunk = physics information chunk. See "Physics Chunks". lighting_chunk = lighting information chunk. See "Lighting Chunks". weapon_battery_chunk = weapon battery chunk. See "Weapon Battery Chunks". ------------------------------------ PAGETYPE_DOOR Current Version: 3 ------------------------------------ Data Type Description ---- ----------- short Version - Version of the door page. Used for version control. string Door Name - Used by Descent 3 to refer to this door by name. max length = PAGENAME_LEN string Model Name - Filename of the .OOF file used for the polymodel of the door. max length = PAGENAME_LEN float Opening Time - Time in seconds it takes for the door to open float Close Time - Time in seconds it takes for the door to close float Open Time - Time in seconds the door stays open byte Flags - See "Door Flags" section short Hit Points - How many hitpoints this door has (for destroyable doors) string Open Sound - D3 Sound Page name for the sound to play when this door opens. max length = PAGENAME_LEN string Close Sound - D3 Sound Page name for the sound to play when this door closes. max length = PAGENAME_LEN string Module Name - Filename of the OSIRIS script for this door. This filename doesn't need an extension since it is dependent on the platform that Descent 3 is running for (.DLL for Win32, .so for Linux, etc.). If this is not set then the door will not open! By default this can be set to "Generic", which contains a default generic script for any door. max length = MAX_MODULENAME_LEN (END OF PAGE) Door Flags ---------- DF_BLASTABLE 1 // this door can be destroyed DF_SEETHROUGH 2 // this door can be seen through even when closed ------------------------------------ PAGETYPE_GAMEFILE Current Version: 2 ------------------------------------ Data Type Description ---- ----------- short Version - Version of the gamefile page string Filename - Filename of the game file. max length = PAGENAME_LEN string Directory - Data directory where file should be located. This is used for Descent 3 development only. max length = PAGENAME_LEN (END OF PAGE) NOTE: Third party developers usually don't have to be concerned with Gamefile pages, as they were used for Descent 3 development. The information is given for completeness purposes. ------------------------------------ PAGETYPE_GENERIC Current Version: 27 ------------------------------------ Data Type Description ---- ----------- short Version - Used for version control of the page byte Object Type - Type of generic object: OBJ_ROBOT = 2 OBJ_POWERUP = 7 OBJ_CLUTTER = 11 OBJ_BUILDING = 16 string Name - Table Name of the object. max length = PAGENAME_LEN string Image Name - High resolution .OOF filename for the object polymodel. max length = PAGENAME_LEN string Med. Image Name - Medium resolution .OOF filename for the object polymodel. max length = PAGENAME_LEN string Low Image Name - Low resolution .OOF filename for the object polymodel. max length = PAGENAME_LEN float Impact Size float Impact Time float Damage short Score - Score gained by the player by destroying this object -- The following section is for objects of type OBJ_POWERUP only -- | short Ammo Count - How much ammo this powerup contains by default -- End of section -- string NO LONGER USED - Just ignore this string. max length = PAGENAME_LEN string Module Name - The filename of the OSIRIS module that contains the default script for this object. No file extension needed as it depends on the platform Descent 3 is running on, as to what the real file extension is (Win32 = DLL, Linux = so, etc.). If this is not set, the object will have no default behavior. Usually this is set to "Generic". max length = MAX_MODULENAME_LEN string Script Name Override - Usually when the OSIRIS module (see Module Name) is queried for a script for this object, the Name is passed in for it to use for comparison. However, sometimes, you may want multiple objects to have the same behavior. By creating a behavior, giving it a name and putting the script in the OSIRIS module 'Module Name', you can set the Script Name Override to override the Name passed in to the module. max length = PAGENAME_LEN. byte Has Description - If this is 0, then the object has no inventory description. Else it does. -- The following section of code is only if the object has a description -- | string Description - Description for the object when it is in the inventory. Not used. | max length = 1024 bytes. -- End of Section -- string Icon Name - Not Used (make it a 0 length string). max length = PAGENAME_LEN float Medium LOD Distance - Distance at which the medium resolution model is used float Low LOD Distance - Distance at which the low resolution model is used physics_chunk Physics Information float Size - Object size lighting_chunk Lighting Information int Hit Points - The amount of shields this object has by default int Flags - See "Object Flags". int AI Flags - See "Object AI Flags" byte AI Class - AI Class for object. See "Object AI Classes". byte AI Type - AI Type for object. See "Object AI Types". byte AI Movement Type - AI Movement Type for object. See "Object AI Movement Types". byte AI Movement SubTypes - AI Movement subtypes for object. See "Object AI Movement Types". float AI FOV - cos() of the AI Field of View for object. float AI Max Velocity - Maximum velocity float AI Max Delta Velocity - Maximum delta velocity float AI Max Turn Rate - Maximum Turn Rate int AI Notify Flags - Flags for AI notification. See "Object AI Notification Flags". float AI Max Delta Turn Rate - Maximum Delta Turn Rate float AI Circle Distance - Distance the object should circle it's targets at float AI Attack Vel Percentage - float AI Dodge Percentage - float AI Dodge Vel Percentage - float AI Flee Vel Percentage - float AI Melee Damage 1 - float AI Melee Damage 2 - float AI Melee Latency 1 - float AI Melee Latency 2 - float AI Curiousity - float AI Night Vision - float AI Fog Vision - float AI Lead Accuracy - float AI Lead Varience - float AI Fire Spread - float AI Fight Team - float AI Fight Same - float AI Aggression - float AI Hearing - float AI Frustration - float AI Roaming - float AI Life Preservation - float AI Avoid Friends Distance - float AI Biased Flight Importance - float AI Biased Flight Min - float AI Biased Flight Max - -- The following section is repeated MAX_DSPEW_TYPES times -- | byte Destroy Spew Flags - See "Destroy Spew Flags" | float Destroy Spew Percent - Percent Chance that this object would spew | short Destroy Spew Number - How many of this object to spew if we are to spew it. | string Destroy Spew Object - Table name of the object to spew (for this slot). max length = PAGENAME_LEN. -- End of Section -- -- The following section is repeated NUM_MOVEMENT_CLASSES times -- | -- The following section is repeated NUM_ANIMS_PER_CLASS times -- | | short From Frame - Starting frame of animation | | short To Frame - End frame of animation | | float Seconds Per Class - How long the animation should last | -- End of Section -- -- End of Section -- -- The following section is repeated MAX_WBS_PER_OBJ times -- | weapon_battery_chunk Weapon Battery Information -- End of Section -- -- The following section is repeated MAX_WBS_PER_OBJ times -- | -- The following section is repeated MAX_WB_GUNPOINTS times -- | | string Weapon Name - Table name of the weapon associated with this gunpoint, on this weapon | | battery. max length = PAGENAME_LEN. | -- End of Section -- -- End of Section -- -- The following section is repeated MAX_OBJ_SOUNDS times -- | string Sound Name - Table Sound Name. max length = PAGENAME_LEN -- End of Section -- -- The following section is repeated MAX_AI_SOUNDS times -- | string AI Sound Name - Table Sound Name. max length = PAGENAME_LEN -- End of Section -- -- The following section is repeated MAX_WBS_PER_OBJ times -- | -- The following section is repeated MAX_WB_FIRING_MASKS times -- | | string Fire Sound Name - Table Sound Name for fire sound. max length = PAGENAME_LEN | -- End of Section -- -- End of Section -- -- The following section is repeated NUM_MOVEMENT_CLASSES times -- | -- The following section is repeated NUM_ANIMS_PER_CLASS times -- | | string Animation Sound Name - Table Sound Name for this animation. max length = PAGENAME_LEN. | -- End of Section -- -- End of Section -- float Respawn Scalar - Used for powerups to scale how often they respawn in multiplayer games. Normal is 1.0. short Number of Death Types - Number of types of deaths possible for this object. Maximum value is MAX_DEATH_TYPES. -- The following section is repeated 'Number of Death Types' times -- | int Death Flags - flags for this death type. See "Death Type Flags". | float Death Delay Min. - Minimum amount of time for this death to last. | float Death Delay Max. - Maximum amount of time for this death to last. | byte Death Probability - Probability of this death happening (0 to 100, the probabilites | for all the death types should add up to 100). -- End of Section -- (END OF PAGE) Object Flags ------------ OIF_CONTROL_AI 0x01 //this object uses AI OIF_USES_PHYSICS 0x02 //this object uses physics OIF_DESTROYABLE 0x04 //this object can be destroyed OIF_INVEN_SELECTABLE 0x08 //this object can be selected in the inventory OIF_INVEN_NONUSEABLE 0x10 //this object can not be used by pressing ENTER during the game OIF_INVEN_TYPE_MISSION 0x20 //this object is for Mission objectives OIF_INVEN_NOREMOVE 0x40 //this object should NOT be removed from the inventory when used OIF_INVEN_VISWHENUSED 0x80 //this object will not have it contol type, movement type and render types OIF_AI_SCRIPTED_DEATH 0x100 OIF_DO_CEILING_CHECK 0x200 OIF_IGNORE_FORCEFIELDS_AND_GLASS 0x400 OIF_NO_DIFF_SCALE_DAMAGE 0x800 OIF_NO_DIFF_SCALE_MOVE 0x1000 OIF_AMBIENT_OBJECT 0x2000 //this object is just for show, & can be removed to improve performance Object AI Flags --------------- Object AI Classes ----------------- Object AI Types --------------- AIT_FLYLANDER 0 AIT_STALKER 1 AIT_EVADER1 2 AIT_EVADER2 3 AIT_STATIONARY_TURRET 4 AIT_AIS 5 AIT_MELEE1 6 AIT_BIRD_FLOCK1 7 AIT_HERD1 8 Object AI Movement Types ------------------------ // AI Movement flying types AIMF_NORMAL 0 AIMF_PATH 1 AIMF_HELICOPTER 2 AIMF_HOVERCRAFT 3 AIMF_JET 4 AIMF_PLAYERLIKE 5 // For NPC ships AIMF_BUDDYLIKE 6 // For theif/buddy bots // AI Movement walking types AIMW_RESTRICTED_FLAT 0 // Specify a min/max angle of incline (so we can restrict movement -- i.e we can even do ceiling only robots) AIMW_RESTRICTED_LOW_ANGLE 1 AIMW_RESTRICTED_HIGH_ANGLE 2 AIMW_NON_RESTRICTED 3 AIMW_UNDERWATERONLY 4 // Stays in water AIMW_WATERSURFACE 5 Object AI Notification Flags ---------------------------- Destroy Spew Flags ------------------ Death Type Flags ---------------- ------------------------------------ PAGETYPE_SHIP Current Version: 6 ------------------------------------ Data Type Description ---- ----------- short Version - Version of the ship page. Used for version control. string Ship Name - Descent 3 name of the ship. max length = PAGENAME_LEN string Cockpit Filename - Filename of the .OOF model for the cockpit. max length = PAGENAME_LEN string HUD Config Filename - .INF filename of the HUD configuration file. max length = PAGENAME_LEN string Model Name - Filename for the .OOF model that is the model of the ship. max length = PAGENAME_LEN string Dying Model - Filename for the .OOF model of the ship when it is dying. max length = PAGENAME_LEN string Med. Model Name - Filename for the .OOF model that is the medium res (less poly) version. max length = PAGENAME_LEN string Low Model Name - Filename for the .OOF model that is the low res (really low poly) version. max length = PAGENAME_LEN float Med. LOD Distance - Distance at which the medium res model version of the ship is used float Low LOD Distance - Distance at which the low res model version of the ship is used physics_chunk Physics Information - The physics information for the ship float Size - Size of the radius of the ship float Armor Scalar - Armor scalar for the ship (Pyro-GL = 1.0f) int Flags - Ship flags. See "Ship Flags" section. -- The following section is repeated 'MAX_PLAYER_WEAPONS' times -- | |byte Fire Flags - Firing flags for this weapon. See "Ship Firing Flags" section. |string Fire Sound Name - D3 Tablefile Sound name for the sound to play when firing. | max length = PAGENAME_LEN. |string Release Sound Name - D3 Tablefile Sound name for the sound to play when the trigger is released. | max length = PAGENAME_LEN. |string Spew Powerup Name - The generic object name of the powerup object to spew out for this weapon | if the ship is destroyed and the weapon is to be spewed. max length = PAGENAME_LEN. |int Max Ammo - Maximum amount of ammo this ship can carry for this weapon. | |weapon_battery_chunk Weapon Battery Information - This chunk of data contains the weapon battery | information for this weapon. | | -- The following section is repeated 'MAX_WB_GUNPOINTS' times -- | |string Fire Sound Name - The D3 Tablefile sound name for the sound to play for this weapon | | for when this gunpoint is firing the weapon. max length = PAGENAME_LEN. | -- End of section -- | | -- The following section is repeated 'MAX_WB_FIRING_MASKS' times -- | |string Weapon Name - The D3 Tablefile weapon name for the weapon associated with this weapon | | battery slot. max length = PAGENAME_LEN. | -- End of section -- | -- End of section -- (END OF PAGE) Ship Flags ---------- SF_DEFAULT_ALLOW 1 //Allowed by default Ship Firing Flags ----------------- SFF_FUSION 1 // fires like fusion SFF_ZOOM 4 // Zooms in SFF_TENTHS 8 // Ammo displays in tenths ------------------------------------ PAGETYPE_SOUND Current Version: 1 ------------------------------------ Data Type Description ---- ----------- short Version - Version number, used for version control. string Name - D3 Tablefile name of this sound. max length = PAGENAME_LEN. string Filename - .WAV file for this sound. max length = PAGENAME_LEN. int Flags - Sound flags. See section "Sound Flags". int Loop Start - Sample value for start of a loop (looping sounds) int Loop End - Sample value for end of a loop (looping sounds) float Outer Cone Volume - Percentage of volume for outer cone. int Inner Cone Angle - Degrees for inner cone. int Outer Cone Angle - Degrees for outer cone. float Max Distance - Maximum sound clipping distance. float Min Distance - Minimum sound clipping distance. float Import Adjust - Percentage of original .WAV file sound volume to use when loading the sound. (END OF PAGE) Sound Flags ----------- SPF_LOOPED 1 // Sound is looped SPF_FIXED_FREQ 2 // No doppler shift SPF_OBJ_UPDATE 4 // Sound updates with attached object movements SPF_FOREVER 8 // Always plays in high-level, this flag should be ignored in low-level SPF_PLAYS_EXCLUSIVELY 16 SPF_PLAYS_ONCE 32 SPF_USE_CONE 64 SPF_LISTENER_UPDATE 128 // Sound updates with listener movements SPF_ONCE_PER_OBJ 256 ------------------------------------ PAGETYPE_TEXTURE Current Version: 7 ------------------------------------ Data Type Description ---- ----------- short Version - Version of this page, used for versioning control. string Name - D3 Tablefile name for this texture. max length = PAGENAME_LEN string Bitmap Name - Filename of the .OGF file for this texture. max length = PAGENAME_LEN. string Destroy Name - Filename of the .OGF file to be used as a 'destroyed' version of this texture. max length = PAGENAME_LEN. float Red - Red component of the light this texture gives off (0 to 1.0) float Green - Green component of the light this texture gives off (0 to 1.0) float Blue - Blue component of the light this texture gives off (0 to 1.0) float Alpha - Alpha value of the entire texture (0 to 1.0, 0 being transparent). float Speed - Speed of the texture (????) (0 to 1.0) float U slide - Speed of the sliding of this texture in the U direction. float V slide - Speed of the sliding of this texture in the V direction. float Reflectivity - Reflectivity value of this texture, used during radiosity lighting (0 to 1.0) byte Corona Style - Which type of corona this texture should give off (used if the texture gives off light). A, B, C or D. int Damage - Amount of damage per second this texture does if an object collides with it. int Flags - Texture flags. See "Texture Flags" section. -- The following section is to be read only if the texture is a procedural texture -- | | // Palette section | -- The following section is to be repeated 255 times -- | | short 16 bit color - Color entry for this palette color | -- End of section -- | | byte Heat - 'Heat' intensity | byte Light - ??? | byte Thickness - ??? | float Evaluation Time - ??? | | float Osc. Time - ??? | byte Osc. Value - ??? | | short Num. Proc Elements - Number of procedural elements. max value = MAX_PROC_ELEMENTS | -- The following section is to be repeated 'Num. Proc Elements' times -- | | byte Type - Type of procedural element | | byte Freq. - Frequency of procedural element | | byte Speed - Speed of procedural element | | byte Size - Size of procedural element | | byte x1 - X1 value for procedural element | | byte y1 - Y1 value for procedural element | | byte x2 - X2 value for procedural element | | byte y2 - Y2 value for procedural element | -- End of section -- -- End of Section string Sound Name - D3 Tabel Name of the sound to be associated with this texture. max length = PAGENAME_LEN. float Sound Volume - Volume of the sound (END OF PAGE) Texture Flags ------------- TF_VOLATILE 1 TF_WATER (1<<1) TF_METAL (1<<2) // Shines like metal TF_MARBLE (1<<3) // Shines like marble TF_PLASTIC (1<<4) // Shines like plastic TF_FORCEFIELD (1<<5) TF_ANIMATED (1<<6) // Set for animated textures (.OAF files) TF_DESTROYABLE (1<<7) TF_EFFECT (1<<8) TF_HUD_COCKPIT (1<<9) TF_MINE (1<<10) TF_TERRAIN (1<<11) TF_OBJECT (1<<12) TF_TEXTURE_64 (1<<13) TF_TMAP2 (1<<14) TF_TEXTURE_32 (1<<15) TF_FLY_THRU (1<<16) TF_PASS_THRU (1<<17) TF_PING_PONG (1<<18) TF_LIGHT (1<<19) TF_BREAKABLE (1<<20) // Breakable (as in glass) TF_SATURATE (1<<21) TF_ALPHA (1<<22) TF_DONTUSE (1<<23) TF_PROCEDURAL (1<<24) TF_WATER_PROCEDURAL (1<<25) TF_FORCE_LIGHTMAP (1<<26) TF_SATURATE_LIGHTMAP (1<<27) TF_TEXTURE_256 (1<<28) TF_LAVA (1<<29) TF_RUBBLE (1<<30) TF_SMOOTH_SPECULAR (1<<31) TF_TEXTURE_TYPES (TF_MINE+TF_TERRAIN+TF_OBJECT+TF_EFFECT+TF_HUD_COCKPIT+TF_LIGHT) TF_SPECULAR (TF_METAL+TF_MARBLE|TF_PLASTIC) ------------------------------------ PAGETYPE_WEAPON Current Version: 8 ------------------------------------ Data Type Description ---- ----------- short Version - Version of this page, used for versioning control. string Name - D3 Table name of the weapon. max length = PAGENAME_LEN. string HUD Image - Filename of the HUD icon for this weapon. max length = PAGENAME_LEN. string Fire Image - Filename of the .OOF file used for the actual weapon model. max length = PAGENAME_LEN. (May be an .OGF if the WF_IMAGE_BITMAP flag is set) string Particle Name - Texture Name of the image to use as particles. max length = PAGENAME_LEN. byte Particle Count - How many particles the weapon creates float Particle Life - The lifetime of each particle float Particle Size - The size of each particle int Weapon Flags - See "Weapon Flags" section. string Spawn Name - Name of the weapon this weapon spawns. max length = PAGENAME_LEN. byte Spawn Count - How many weapons to spawn. string Robot Spawn - Name of the robot object to spawn on weapon death. max length = PAGENAME_LEN. string Alt. Spawn Name - An alternative weapon to spawn. max length = PAGENAME_LEN. byte Alt. Spawn Chance - Percentage chance (0 - 100) that the alternate weapon will be spawned. float Gravity Time - How long to create a gravity field (see BlackShark) float Gravity Size - How big of a radius is the gravity field. float Homing FOV - Cos of the Field of View for homing weapons. float Custom Size - Custom size of weapon (to override polymodel size) float Size - Weapon 'blob' size. float Thrust Time - How long this weapon thrusts physics_chunk Physics Information float Terrain Damage Size - Radius of terrain damage this weapon does to the terrain byte Terrain Damage Depth - How deep is the damage on the terrain float Weapon Alpha - How alpha'd the weapon is (0 to 1.0, 0 being transparent) string Explosion Image - D3 Texture Name of the texture to use when the weapon explodes. max length = PAGENAME_LEN. float Explode Time - How long the explosion for this weapon lasts float Explode Size - Size of the explosion float Player Damage - How much damage this weapon does to a player. float Object Damage - How much damage this weapon does to a generic object. float Impact Size - The radius of the sphere used when the weapon impacts and explodes. float Impact Time - How long the impact affect lasts. float Impact Player Damage - How much damage the impact explosion does to a player. float Impact Generic Damage - How much damage the impact explosion does to a generic object. float Impact Force - Amount of force caused by the impact explosion. float Lifetime - How long the weapon lives lighting_chunk Lighting Information float Recoil Force - Recoil force applied to the object (used in Force Feedback also) -- The following section is repeated MAX_WEAPON_SOUNDS times -- | string Sound Name - D3 Table Sound name of the sound associated with this sound slot. | max length = PAGENAME_LEN. -- End of Section string Smoke Name - D3 Texture Name of the texture to use for the smoke trail image string Scorch Image - D3 Texture Name of the texture to use for the scorch mark left by this weapon. max length = PAGENAME_LEN. float Scorch Size - Size of the scorch mark to leave string Icon Name - name of the icon for this weapon. max length = PAGENAME_LEN (END OF PAGE) Weapon Flags ------------ WF_HUD_ANIMATED (1<<0) WF_IMAGE_BITMAP (1<<1) // whether or not the firing image is a bitmap or model WF_SMOKE (1<<2) // Weapon drops smoke as it moves WF_MATTER_WEAPON (1<<3) // This a matter weapon, as opposed to an energy weapon WF_ELECTRICAL (1<<4) // This weapons fires as an electrical storm WF_IMAGE_VCLIP (1<<5) // This weapon fire image is a vclip WF_SPRAY (1<<6) // This weapon is a spray, like a flamethrower WF_STREAMER (1<<7) // This weapon has a streamer effect attached WF_INVISIBLE (1<<8) // This weapon is invisible WF_RING (1<<9) // This weapon is drawn ring style WF_SATURATE (1<<10) // Saturate this bitmap weapon WF_BLAST_RING (1<<11) // Creates a blast ring upon explosion WF_PLANAR_BLAST (1<<12) // Blast bitmap takes on the walls plane WF_PLANAR (1<<13) // This weapon doesn't always face you WF_ENABLE_CAMERA (1<<14) // This weapon can be used for missile camera WF_SPAWNS_IMPACT (1<<15) // This weapon spawns others on impact WF_SPAWNS_TIMEOUT (1<<16) // This weapon spawns others when it times out WF_EXPAND (1<<17) // This weapon expands when exploding WF_MUZZLE (1<<18) // This weapon produces a muzzle flash when fired WF_MICROWAVE (1<<19) // This weapon makes a microwave effect on the victim WF_NAPALM (1<<20) // This weapon does a napalm effect to objects it touches WF_REVERSE_SMOKE (1<<21) // The smoke trail gets smaller as it ages WF_GRAVITY_FIELD (1<<22) // This weapon has a gravity field WF_COUNTERMEASURE (1<<23) // This weapon is a countermeasure WF_SPAWNS_ROBOT (1<<24) // This weapon spawns a robot upon death WF_FREEZE (1<<25) // This weapon slows a ship/object down WF_TIMEOUT_WALL (1<<26) // This weapon times out like a wall hit WF_PLANAR_SMOKE (1<<27) // This weapon has a planar smoke trail instead of a blob WF_SILENT_HOMING (1<<28) // This weapon does not give a homing lock sound WF_HOMING_SPLIT (1<<29) // This weapon homes when it splits WF_NO_ROTATE (1<<30) // This weapon does not rotate as a bitmap WF_CUSTOM_SIZE (1<<31) // This weapon uses a custom size ------------------------------------ Physics Chunks ------------------------------------ Data Type Description ---- ----------- float Mass float Drag float Full Thrust int Flags - See "Physics Flags". float Rotational Drag float Full Rotational Thrust int Number of Bounces - Maximum number of bounces for this item (-1 for infinite) float Initial Velocity vector Initial rotational velocity (3 floats: x,y,z) float Wiggle Amplitude float Wiggles Per Second float CoEfficent Restitution float Hit Death Angle - (the sin of the angle between 0 and 90) float Max Turn-Roll Rate float Turn-Roll ratio (END OF CHUNK) Physics Flags ------------- PF_TURNROLL 0x01 // Roll when turning PF_LEVELING 0x02 // Level object with closest side PF_BOUNCE 0x04 // Bounce (not slide) when hit will PF_WIGGLE 0x08 // Wiggle while flying PF_STICK 0x10 // Object sticks (stops moving) when hits wall PF_PERSISTENT 0x20 // Object keeps going even after it hits another object (eg, fusion cannon) PF_USES_THRUST 0x40 // This object uses its thrust PF_GRAVITY 0x80 // Effected by gravity PF_IGNORE_OWN_CONC_FORCES 0x100 // Ignore it's own concussion force PF_WIND 0x200 // Effected by wind PF_USES_PARENT_VELOCITY 0x400 PF_FIXED_VELOCITY 0x800 PF_FIXED_ROT_VELOCITY 0x1000 PF_NO_COLLIDE_PARENT 0x2000 // this object cannot collide with its parent PF_HITS_SIBLINGS 0x4000 // this object can collide with its siblings (like a bomb) // chrishack -- add flag to weapon page PF_REVERSE_GRAVITY 0x8000 // this object flys upward with gravity PF_GRAVITY_MASK (PF_REVERSE_GRAVITY|PF_GRAVITY) PF_NO_COLLIDE 0x10000 // No collisions AND NO RELINKS -- DANGEROUS TO USE if not used correctly PF_NO_ROBOT_COLLISIONS 0x20000 // No collisions occur with robots PF_POINT_COLLIDE_WALLS 0x40000 // When colliding with walls, make our radius zero PF_HOMING 0x80000 // This object (weapon) homes PF_GUIDED 0x100000 // This object is guided PF_IGNORE_CONCUSSIVE_FORCES 0x200000 PF_DESTINATION_POS 0x400000 PF_LOCK_X 0x800000 PF_LOCK_Y 0x1000000 PF_LOCK_Z 0x2000000 PF_LOCK_P 0x4000000 PF_LOCK_H 0x8000000 PF_LOCK_B 0x10000000 PF_LOCK_MASK (PF_LOCK_X | PF_LOCK_Y | PF_LOCK_Z | PF_LOCK_P | PF_LOCK_H | PF_LOCK_B) PF_NEVER_USE_BIG_SPHERE 0x20000000 PF_NO_SAME_COLLISIONS 0x40000000 PF_NO_DOOR_COLLISIONS 0x80000000 ------------------------------------ Lighting Chunks ------------------------------------ Data Type Description ---- ----------- float Light Distance float Start Red component (between 0 and 1.0) float Start Green component (between 0 and 1.0) float Start Blue component (between 0 and 1.0) float Time Interval float Flicker Distance float Directional Field of View (between 0 and 1.0) float End Red component (between 0 and 1.0) float End Green component (between 0 and 1.0) float End Blue component (between 0 and 1.0) int Flags - see "Lighting Flags" int Time bits - ?? byte Angle -- (NOT USED ??? ) byte Lighting Render Type: Static Lighting = 0 Gouraud Shading = 1 Lightmaps = 2 (END OF CHUNK) Lighting Flags -------------- OLF_FLICKERING 1 OLF_TIMEBITS 2 OLF_PULSE 4 OLF_PULSE_TO_SECOND 8 OLF_FLICKER_SLIGHTLY 16 OLF_DIRECTIONAL 32 // Directional light - casts light in a cone OLF_NO_SPECULARITY 64 // Object does not have specular light cast on it ------------------------------------ Weapon Battery Chunks ------------------------------------ Data Type Description ---- ----------- float Energy Usage - Amount of energy used by this weapon battery slot float Ammo Usage - Amount of ammo used by this weapon battery slot -- The following section is repeated MAX_WB_GUNPOINTS times -- | short Gunpoint Weapon Index - ??? -- End of Section -- -- The following section is repeated MAX_WB_FIRING_MASKS times -- | byte Fire Masks - | float Fire Wait Time - | float Animation Time - | float Animation Start Frame - | float Animation Fire Frame - | float Animation End Frame - -- End of Section -- byte Number Masks - ??? short Aiming GunPoint Index - Gunpoint to use for aiming with this battery byte Aiming Flags - ??? float Aiming Dot - ??? float Aiming Distance - ??? float Aiming XZ Dot - ??? short Flags - See "Weapon Battery Flags" byte Quad Fire Mask - Firing mask override to use when this weapon battery is set with the Quad fire flag. Weapon Battery Flags -------------------- WBF_SPRAY 1 WBF_ANIM_LOCAL 2 WBF_ANIM_FULL 4 WBF_ANIM_MASKS 6 WBF_RANDOM_FIRE_ORDER 8 WBF_GUIDED 16 WBF_USE_CUSTOM_FOV 32 WBF_ON_OFF 64 WBF_USE_CUSTOM_MAX_DIST 128 WBF_USER_TIMEOUT 256 WBF_FIRE_FVEC 512 WBF_AIM_FVEC 1024 WBF_FIRE_TARGET 2048