Difference between revisions of "CARS (IDE Section)"
Prographer (talk | contribs) |
Prographer (talk | contribs) |
||
Line 297: | Line 297: | ||
!Description | !Description | ||
|- | |- | ||
− | |Id||Unique model ID | + | |Id||integer||Unique model ID |
|- | |- | ||
− | |ModelName||Name of the <code>.dff</code> ''model file'' without extension. | + | |ModelName||string||Name of the <code>.dff</code> ''model file'' without extension. |
|- | |- | ||
− | |TxdName||Name of the <code>.txd</code> ''texture dictionary'' without extension. | + | |TxdName||string||Name of the <code>.txd</code> ''texture dictionary'' without extension. |
|- | |- | ||
− | |Type||Type of vehicle, which includes ''trailer'', ''bmx'', ''bike'', ''train'', ''boat'', ''plane'', ''heli'', ''quad'', ''mtruck'' and ''car'' | + | |Type||string||Type of vehicle, which includes ''trailer'', ''bmx'', ''bike'', ''train'', ''boat'', ''plane'', ''heli'', ''quad'', ''mtruck'' and ''car'' |
|- | |- | ||
− | |HandlingID||Name corresponding to its handling data in the ''handling.cfg'' file. | + | |HandlingID||string||Name corresponding to its handling data in the ''handling.cfg'' file. |
|- | |- | ||
− | |GameName||Name corresponding to its [[GXT]] key, case sensitive and must be seven characters or less.<br>Invalid name will not show up in the game. | + | |GameName||string||Name corresponding to its [[GXT]] key, case sensitive and must be seven characters or less.<br>Invalid name will not show up in the game. |
|- | |- | ||
− | |Anims||Appropriate character animation | + | |Anims||string||Appropriate character animation |
|- | |- | ||
− | |Class||Class of the vehicle. | + | |Class||string||Class of the vehicle. |
* normal | * normal | ||
* poorfamily | * poorfamily | ||
Line 326: | Line 326: | ||
* ignore | * ignore | ||
|- | |- | ||
− | |Frequency||Frequency of the vehicle spawning randomly on the streets. | + | |Frequency||integer||Frequency of the vehicle spawning randomly on the streets. |
|- | |- | ||
− | |Flags||Unknown integer. | + | |Flags||integer||Unknown integer. |
|- | |- | ||
− | |Comprules||Component rules, alters how vehicle models' "extras" behave, [[#Comprules_3|see below]] for list | + | |Comprules||hex||Component rules, alters how vehicle models' "extras" behave, [[#Comprules_3|see below]] for list |
|- | |- | ||
− | |WheelID||Wheel index, needs to be -1 for vehicles to use wheel model defined in the vehicle's model (wheels.dff is no longer used) | + | |WheelID||integer||Wheel index, needs to be -1 for vehicles to use wheel model defined in the vehicle's model (wheels.dff is no longer used) |
|- | |- | ||
− | |WheelScale_Front||Scale of front wheels and collision models for types ''car'', ''trailer'', ''quad'', ''mtruck'', ''bmx'' and ''bike'' | + | |WheelScale_Front||float||Scale of front wheels and collision models for types ''car'', ''trailer'', ''quad'', ''mtruck'', ''bmx'' and ''bike'' |
|- | |- | ||
− | |WheelScale_Rear||Scale of rear wheels and collision models for types ''car'', ''trailer'', ''quad'', ''mtruck'', ''bmx'' and ''bike'' | + | |WheelScale_Rear||float||Scale of rear wheels and collision models for types ''car'', ''trailer'', ''quad'', ''mtruck'', ''bmx'' and ''bike'' |
|- | |- | ||
− | |Wheel Upgrade Class||The wheel set this vehicle relates to, the ids are equivalent to the ones defined in [[carmods.dat]] | + | |Wheel Upgrade Class||integer||The wheel set this vehicle relates to, the ids are equivalent to the ones defined in [[carmods.dat]] |
|} | |} | ||
Revision as of 09:51, 14 October 2020
Supported games: | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Brief description: | Used to define vehicles | |||||||||||||||
IDE Sections:
|
CARS is a section in the item definition file in GTA III, Vice City, San Andreas, and GTA IV. It is used to define vehicles and some their properties.
Contents
Format
Between GTA III and San Andreas, the class of a vehicle helps determine where it should spawn, with the help of hardcoded features and the script. The ignore class is special for its ability to prevent vehicles assigned to that class from spawning as a regular NPC vehicle in traffic. Peds can be assigned to drive classes of vehicle in the PEDS section of the IDE file.
GTA III
This section is mainly used in the .\data\default.ide
file. Each type of vehicle has its own format.
cars # type car Id, ModelName, TxdName, Type, HandlingId, GameName, Class, Frq, Lvl, Comprules, WheelModelId, WheelScale # type boat Id, ModelName, TxdName, Type, HandlingId, GameName, Class, Frq, Lvl, Comprules # type train Id, ModelName, TxdName, Type, HandlingId, GameName, Class, Frq, Lvl, Comprules # type heli Id, ModelName, TxdName, Type, HandlingId, GameName, Class, Frq, Lvl, Comprules # type plane Id, ModelName, TxdName, Type, HandlingId, GameName, Class, Frq, Lvl, Comprules, LODModel end
Identifier | Type | Description | |
---|---|---|---|
A | Id | integer | Unique object ID. |
B | ModelName | string | Name of the .dff model file without extension.
|
C | TxdName | string | Name of the .txd texture dictionary without extension.
|
D | Type | string | Type of vehicle, which includes car, boat, train, heli, plane, and bike. This data is related to hardcoded functions and must not be changed or else it might crash the game. The bike type is never used in the game but is documented here for sake of completion. |
E | HandlingId | string | Name corresponding to its handling data in the handling.cfg file.
|
F | GameName | string | Name corresponding to its GXT key, case sensitive and must be seven characters or less! Vehicles with an invalid name will show up as MODELNAME missing when entered |
G | Class | string | Class of the vehicle.
|
H | Frq | integer | Frequency of the vehicle spawning randomly on the streets. |
I | Lvl | integer | unknown |
J | Comprules | hex | Component rules, alters how vehicle models' "extras" behave, see below for list |
K |
|
integer | |
L |
|
float |
|
Comprules
This is a list of all non-zero values used in the column.
Non-Zero Value | Effect | Vehicle(s) |
---|---|---|
0x1f10 | Forces vehicle to always spawn with one of its first two extras. If a vehicle has more than two extras, one of the first two will always spawn and another extra also may spawn with either of the first two extras. Very rarely (likely due to a glitch) these vehicles can spawn without an extra. | Taxi, Hoods Rumpo XL |
0x2ff0 | When it is raining, vehicle will spawn with its first extra. Vehicle may also spawn with other extras (if present in the model) in addition to the first extra. | Stinger, Stallion |
Wheels
Wheel models are located in the ..\models\generic\wheels.DFF
file. Their textures are located in the ..\models\misc.txd
file. Just like the cars themselves they are defined inside the ..\data\default.ide
file by default. The following table shows the different wheels and their ID's.
ID | 160 | 161 | 162 | 163 | 164 | 165 | 166 |
---|---|---|---|---|---|---|---|
Image |
Vice City
By default all cars are defined inside the .\data\default.ide
file. From GTA III, type train becomes unused but bike is used.
cars # type car Id, ModelName, TxdName, Type, HandlingId, GameName, Anims, Class, Frq, Lvl, Comprules, WheelModelId, WheelScale # type boat Id, ModelName, TxdName, Type, HandlingId, GameName, Anims, Class, Frq, Lvl, Comprules # type heli Id, ModelName, TxdName, Type, HandlingId, GameName, Anims, Class, Frq, Lvl, Comprules # type plane Id, ModelName, TxdName, Type, HandlingId, GameName, Anims, Class, Frq, Lvl, Comprules, LODModel # type bike Id, ModelName, TxdName, Type, HandlingId, GameName, Anims, Class, Frq, Lvl, Comprules, SteeringAngle, WheelScale end
Identifier | Type | Description | |
---|---|---|---|
A | Id | integer | Unique object ID. |
B | ModelName | string | Name of the .dff model file without extension.
|
C | TxdName | string | Name of the .txd texture dictionary without extension.
|
D | Type | string | Type of vehicle, which includes car, boat, train, heli, plane, and bike. Flyable helicopters are of type car. The train type is never used in the game but is documented here for sake of completion. |
E | HandlingId | string | Name corresponding to its handling data in the handling.cfg file.
|
F | GameName | string | Name corresponding to its GXT key, case sensitive and must be seven characters or less. Invalid name will not show up in the game. |
G | Anims | string | Appropriate animation file mainly used on bikes. |
H | Class | string | Class of the vehicle.
|
I | Frq | integer | Frequency of the vehicle spawning randomly on the streets. |
J | Lvl | integer | unknown |
K | Comprules | hex | Component rules, alters how vehicle models' "extras" behave, see below for list |
L |
|
integer | |
M |
|
float |
|
Comprules
This is a list of all non-zero values used in the column.
Non-Zero Value | Vehicle(s) |
---|---|
0x1f10 | Taxi, Cabbie, Zebra Cab, Kaufman Cab |
0x2ff0 | Stinger, Stallion, Sabre, Sabre Turbo, Comet, Deluxo |
0x4fff | Flatbed, Hotring A, Hotring B, Bloodring Banger A, Bloodring Banger B |
0x30123345 | Caddy |
Wheels
The location of the definition files, models and textures are just the same as for GTA III. However there are some different textures and models. The following table shows all Vice City wheels and their ID's.
ID | 237 | 238 | 239 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | |
---|---|---|---|---|---|---|---|---|---|---|---|
Image | PC/PS2 | ||||||||||
Xbox |
San Andreas
By default all cars are defined inside the .\data\vehicles.ide
file.
cars # type car Id, ModelName, TxdName, Type, HandlingID, GameName, Anims, Class, Frequency, Flags, Comprules, WheelID, WheelScale_Front, WheelScale_Rear, Unknown_value # type boat Id, ModelName, TxdName, Type, HandlingID, GameName, Anims, Class, Frequency, Flags, Comprules end
Identifier | Description | |
---|---|---|
Id | integer | Unique model ID |
ModelName | string | Name of the .dff model file without extension.
|
TxdName | string | Name of the .txd texture dictionary without extension.
|
Type | string | Type of vehicle, which includes trailer, bmx, bike, train, boat, plane, heli, quad, mtruck and car |
HandlingID | string | Name corresponding to its handling data in the handling.cfg file. |
GameName | string | Name corresponding to its GXT key, case sensitive and must be seven characters or less. Invalid name will not show up in the game. |
Anims | string | Appropriate character animation |
Class | string | Class of the vehicle.
|
Frequency | integer | Frequency of the vehicle spawning randomly on the streets. |
Flags | integer | Unknown integer. |
Comprules | hex | Component rules, alters how vehicle models' "extras" behave, see below for list |
WheelID | integer | Wheel index, needs to be -1 for vehicles to use wheel model defined in the vehicle's model (wheels.dff is no longer used) |
WheelScale_Front | float | Scale of front wheels and collision models for types car, trailer, quad, mtruck, bmx and bike |
WheelScale_Rear | float | Scale of rear wheels and collision models for types car, trailer, quad, mtruck, bmx and bike |
Wheel Upgrade Class | integer | The wheel set this vehicle relates to, the ids are equivalent to the ones defined in carmods.dat |
Flags
According to the vehicles.ide file, flag 0x01 streams a vehicle out after it has been spawned once, and flag 0x02 whis is "used internally". There are 3 vehicles that use flag 0x01, none that use flag 0x02, and one that uses 0x07, which is not mentioned at all.
Non-Zero Value | Vehicle(s) |
---|---|
0x01 | Dumper, Mr. Whoopee, Pizzaboy |
0x07 | Huntley |
Comprules
This is a list of all non-zero values used in the column.
Non-Zero Value | Vehicle(s) |
---|---|
0x1012 | Tram |
0x1f10 | Taxi, Barracks Ol, Coach, Cabbie, Slamvan |
0x2ff0 | Sabre, Comet, Savanna, Broadway, Tornado |
0x3012 | Coast Guard |
0x3210 | Stallion |
0x3f01 | Reefer |
0x3f10 | Securicar |
0x4fff | Speeder, Tropic, Flatbed, Hotring Racer A, Hotring Racer B, Bloodring Banger, DFT30 |
0x1f341210 | NRG500 |
0x30123345 | Caddy |
0x3f341210 | FCR900, BF400 |
Wheels
Wheel models are now in the same model as the vehicle itself. The wheels.dff
and wheels.txd
are present but not used. If the "WheelID" is -1, the game will scale the wheel collision, but NOT the wheel model. If "WheelID" is 0, the game will scale the collision AND the wheel model, however this only works properly if the wheel model is set up properly before exporting.
GTA IV
By default all cars are defined inside the ..\common\data\vehicles.ide
file.
Identifier | Type | Description | |
---|---|---|---|
A | ModelName | string | Name of the .wdr model file without extension.
|
B | TxdName | string | Name of the .wtd texture dictionary without extension.
|
C | Type | string | Type of vehicle, which includes car, bike, boat, train, heli, and plane. |
D | HandlingId | string | Name corresponding to its handling data in the handling.dat file.
|
E | GameName | string | Name corresponding to its GXT key (changing this will also change the sound of the vehicle) |
F | Anims | string | Name of the animation used while entering and driving a vehicle from anim.img file.
|
G | Anims2 | string | Name of the secondary vehicle animation used from anim.img file.
|
H | Frq | integer | Frequency of the vehicle spawning randomly on the streets. |
I | MaxNum | integer | Maximum number of vehicles to exist at a time. |
J,K | WheelRadius | float[2] | |
L | DefDirtLevel | float | Dirt level of traffic vehicles that includes a range from set value to 1.0. Supported values range from 0.0 (clean) to 1.0 (dirty). |
M | LodMult | integer | |
N | Swankness | float | |
O | Flags | string |
|
See also
External link
- GTAForums: Component Rules explanation
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 |