Difference between revisions of "DgBangerData"

From Mm2kiwi
Jump to: navigation, search
(Added info about TexNumber and the particle image files.)
m (Updated audio stuff)
Line 14: Line 14:
 
!tag!!format!!Description
 
!tag!!format!!Description
 
|-
 
|-
|AudioId||int||Index in a list of sound effects the object makes when collided with
+
|AudioId||int||Index in a list of sound effects the object makes all the time?
 
|-
 
|-
 
|Size||float float float||Width, height and depth of the bounding box around the object
 
|Size||float float float||Width, height and depth of the bounding box around the object
Line 44: Line 44:
 
|YRadius||float||Unknown
 
|YRadius||float||Unknown
 
|-
 
|-
|ColliderId||int||Unknown
+
|ColliderId||int||Index in a list of sound effects the object makes when collided with. The list is defined in the file [[default_impacts.csv|/aud/cardata/player/default_impacts.csv]].
 
|-
 
|-
 
|CollisionPrim||int||Unknown, values 0, 1 and 2 are used in MM2 files
 
|CollisionPrim||int||Unknown, values 0, 1 and 2 are used in MM2 files

Revision as of 20:28, 6 August 2006

The dgBangerData files are used to define collision properties for PKG objects. These properties define how an object behaves when something collides with it. The format is ASCII-based and made up of tag-value rows grouped in blocks between { and } symbols.

The files start with a definition of the type of banger data given. None of the MM2 files use anything but type a, like this:

type: a

Next comes the main dgBangerData block:

dgBangerData {
<tags>
}

<tags> is replaced by a list of tags from the following table. The order of the tags may be significant, but some tags may be omitted from the file.

Tags of the dgBangerData block
tag format Description
AudioId int Index in a list of sound effects the object makes all the time?
Size float float float Width, height and depth of the bounding box around the object
CG float float float Center of gravity, rotation takes place around this point
NumGlows int 0=no effect, 1=light glow at night
Mass float Mass of the object in kilograms, closely related to the objects weight
Elasticity float Controls the bounciness of the object
Friction float friction coefficient, determines how much force is required to slide along the surface of the object
ImpulseLimit2 float Force required to move the object
SpinAxis int Unknown, always set to 0 in MM2 files
Flash int Unknown
NumParts int Unknown
BirthRule block Particle effect for collision, see below
TexNumber int Number of the particle texture map, see below
BillFlags int Unknown, 0, 64, 128 and 512 are used in MM2 files
YRadius float Unknown
ColliderId int Index in a list of sound effects the object makes when collided with. The list is defined in the file /aud/cardata/player/default_impacts.csv.
CollisionPrim int Unknown, values 0, 1 and 2 are used in MM2 files
CollisionType int Unknown, values 4, 16 and 48 are used in MM2 files

The BirthRule block is the same as used in the asBirthRule files used to define particle effects caused by player vehicles.

The image files for particle effects are named fxptn.tex where n is an integer. MM2 has files from index one to index 16, excluding index 15. It is uncertain if more files can be added, but, at least 15 might be re-instated for new particle textures. See asBirthRule for more details.