Difference between revisions of "Object.dat"
Jump to navigation
Jump to search
m (Removed stub template) |
m (Switched to alternative names for optional break info) |
||
Line 87: | Line 87: | ||
|colspan="5" |<h3>Extra breakable object information</h3> | |colspan="5" |<h3>Extra breakable object information</h3> | ||
|- | |- | ||
− | | ||R ||{{a|c}} | | + | | ||R ||{{a|c}} |Smash Multiplier ||float ||How much larger the force needed to smash an object should be than the force needed to break it. In code: |
− | <code>smashForce = | + | <code>smashForce = smashMultiplier * breakForce</code> |
Smashing always takes precedence over breaking so if <code>smashForce == breakForce</code>, the object will smash and not break. | Smashing always takes precedence over breaking so if <code>smashForce == breakForce</code>, the object will smash and not break. | ||
Line 94: | Line 94: | ||
To prevent the object smashing, set a very large value so that it is impossible for the player to achieve the required smash force. | To prevent the object smashing, set a very large value so that it is impossible for the player to achieve the required smash force. | ||
|- | |- | ||
− | | ||S ||{{a|c}} | | + | | ||S ||{{a|c}} |Break Velocity X ||float ||Offset velocity on X axis. Offset values are added to the velocity from the impact after randomness is factored in. |
|- | |- | ||
− | | ||T ||{{a|c}} | | + | | ||T ||{{a|c}} |Break Velocity Y ||float ||Offset velocity on Y axis. |
|- | |- | ||
− | | ||U ||{{a|c}} | | + | | ||U ||{{a|c}} |Break Velocity Z ||float ||Offset velocity on Z axis. |
|- | |- | ||
− | | ||V ||{{a|c}} | | + | | ||V ||{{a|c}} |Break Velocity Rand ||float ||The maximum deviation from the B-VX/Y/Z values due to randomness. |
|- | |- | ||
− | | ||W ||{{a|c}} | | + | | ||W ||{{a|c}} |Gun Break Mode ||integer || Object behaviour when shot with a gun. Values: |
:<code>0</code> = Immune to gun damage | :<code>0</code> = Immune to gun damage | ||
Line 111: | Line 111: | ||
|- | |- | ||
− | | ||X ||{{a|c}} | | + | | ||X ||{{a|c}} |Produce Sparks on Impact ||integer ||Whether sparks are produced on impact (1) or not (0). |
|} | |} | ||
[[Category:Map Formats]] | [[Category:Map Formats]] | ||
{{N|4|SA|VC|3}} | {{N|4|SA|VC|3}} |
Revision as of 14:11, 21 August 2020
The object.dat
file is located in the /data
directory of GTA III, Vice City, and San Andreas, or the /common/data
directory of GTA IV. It defines the physical aspects of objects defined in IDE files.
Format
Name in file | Data type | Description | ||
---|---|---|---|---|
A | Object name | string | Object name. Maximum of 256 characters in length. | |
B | Mass | float | 1 to 50000 inclusive. Unit is kilograms. | |
C | TurnMass | float | The description within the file says kg m^3 or some such dimension, but kg/m3 is actually the unit of density. However, kg/m2 is the unit of rotational inertia, which is sometimes referred to as "rotational mass" (and could be what "TurnMass" is referring to). | |
D | Air Resistance | float | Normalised between 1 and 0. 0 means complete air resistance, 1 means no air resistance. Most objects have a value of 0.99 for this attribute. | |
E | Elasticity | float | How much the object bounces when it collides with something. Normalised. 0 is the least bouncy, 1 is the most. | |
F | Percent Submerged | float | 10 to 120. Most objects have a value of 50.0 for this attribute. | |
G | Uproot Force | float | The magnitude of the force vector that must be applied to the object to remove it from the ground. Possibly Newtons, but no units given. | |
H | Collision Damage Multiplier | float | Controls how much damage a collision with this object should do to vehicles. "0.1 - 5.0 ish" according to the file. | |
I | Collision Damage Effect | integer | What happens to the object when it is collided with. Values:
If either | |
J | Special Collision Response Cases | integer | Specifies if the game has a custom response for collisions with this object, and what the response should be if there is one. Values:
| |
K | Camera to avoid this object | integer | Boolean (written as 1 or 0, not true/false) that controls whether the camera should move around the object. | |
L | Causes Explosion | integer | If not 0, FX_NAME should be a valid effect name. 0 if no explosion effect should occur.
| |
M | FX_TYPE | integer | When the explosion effect should be played. Values:
| |
N,O,P | FX_OFFSET | float[3] | 3D vector. Offset of the effect system from the pivot of the object. If x == -999.0 , the game plays the effect at the point of collision.
| |
Q | FX_NAME | string | The name of the effect to play. If there is no effect, none should be used. (The file says it should be noname , but none is used instead. noname is never used.)
| |
Extra breakable object information | ||||
R | Smash Multiplier | float | How much larger the force needed to smash an object should be than the force needed to break it. In code:
Smashing always takes precedence over breaking so if To prevent the object smashing, set a very large value so that it is impossible for the player to achieve the required smash force. | |
S | Break Velocity X | float | Offset velocity on X axis. Offset values are added to the velocity from the impact after randomness is factored in. | |
T | Break Velocity Y | float | Offset velocity on Y axis. | |
U | Break Velocity Z | float | Offset velocity on Z axis. | |
V | Break Velocity Rand | float | The maximum deviation from the B-VX/Y/Z values due to randomness. | |
W | Gun Break Mode | integer | Object behaviour when shot with a gun. Values:
| |
X | Produce Sparks on Impact | integer | Whether sparks are produced on impact (1) or not (0). |
Grand Theft Auto IV | |
---|---|
File Formats | .dat • .gxt • .ide • .img • .ipl • .nod • .sco • .rpf • .rrr • .wad • .wbd/.wbn • .wdd • .wdr • .wft • .whm • .wpl • .wtd |
Documentation | Audio • Bink Video • Cryptography • Cutscenes • GXT Text • Image listing • Keycodes • Map Listing • Native functions • Paths • Radar Blips • Radio Stations • Saves • Scenarios • VTable • Weapons |
Tools | ASI Loader • ENBSeries • G-Texture • GIMS IV • Ingame WPL Editor • IV Needle • OpenIV • SparkIV • XLiveLess • WPL Manager • X Mod Installer Alice • C++ Script Hook • .NET Script Hook • Scocl |
Tutorials | Importing Textures with OpenIV • Importing Textures with SparkIV |
Modifications | GTA Connected • Gostown IV • Four Multiplayer • IV Multiplayer • CitizenMP:IV Reloaded |
Useful links | Community portal • Discussion forums • Modding forums • Mods on GTAGarage.com |