Difference between revisions of "CARS (IDE Section)"

From GTAMods Wiki
Jump to navigation Jump to search
m (See also)
Line 1: Line 1:
{{cleanup-rewrite}}
+
{{Research}}
 
{{IdeSection
 
{{IdeSection
 
| name        = CARS
 
| name        = CARS
Line 7: Line 7:
 
'''CARS''' is a section in the [[item definition]] file. It is used to define vehicles and some their properties.
 
'''CARS''' is a section in the [[item definition]] file. It is used to define vehicles and some their properties.
  
==GTA III==
+
== Format ==
===Format===
+
 
This section is mainly used in the <code>default.ide</code> file. Each type of vehicle has its own format.
+
=== GTA III ===
 +
 
 +
This section is mainly used in the <code>../data/default.ide</code> file. Each type of vehicle has its own format.
  
 
''Car''
 
''Car''
Line 26: Line 28:
 
|<center>ID</center>||Unique model ID
 
|<center>ID</center>||Unique model ID
 
|-
 
|-
|<center>ModelName</center>||Name of the .dff [[model file]], without extension
+
|<center>ModelName</center>||Name of the <code>.dff</code> [[model file]] without extension.
 
|-
 
|-
|<center>TxdName</center>||Name of the .txd [[texture dictionary]], without extension
+
|<center>TxdName</center>||Name of the <code>.txd</code> [[texture dictionary]] without extension.
 
|-
 
|-
|<center>Type</center>||Type of vehicle, which includes ''car'', ''boat'', ''train'', and ''plane''<br>This data is related to hardcoded functions and must not be changed or else it might crash the game
+
|<center>Type</center>||Type of vehicle, which includes ''car'', ''boat'', ''train'', and ''plane''<br>This data is related to hardcoded functions and must not be changed or else it might crash the game.
 
|-
 
|-
 
|<center>HandlingID</center>||Name corresponding to its handling data in the [[handling.cfg]] file
 
|<center>HandlingID</center>||Name corresponding to its handling data in the [[handling.cfg]] file
Line 36: Line 38:
 
|<center>GameName</center>||Name corresponding to its [[GXT]] entry, case sensitive and must be seven characters or less!<br>Invalid name will show up as ''NAME missing''
 
|<center>GameName</center>||Name corresponding to its [[GXT]] entry, case sensitive and must be seven characters or less!<br>Invalid name will show up as ''NAME missing''
 
|-
 
|-
|<center>Class</center>||Class of the vehicle
+
|<center>Class</center>||Class of the vehicle (see [[CARS_(IDE_Section)#Vehicle_Classes|below]]).
 
|-
 
|-
|<center>Frequency</center>||Frequency of the vehicle spawning randomly on the streets
+
|<center>Frequency</center>||Frequency of the vehicle spawning randomly on the streets.
 
|-
 
|-
|<center>Level</center>||unknown
+
|<center>Level</center>||Unknown integer.
 
|-
 
|-
|<center>Comprules</center>||unknown
+
|<center>Comprules</center>||Unknown hexadecimal value.
 
|-
 
|-
|<center>WheelID</center>||ID number of wheel model<br>Only available for type ''car'', has no effect if used on type ''boat''
+
|<center>WheelID</center>||ID number of wheel model<br>Only available for type ''car'', has no effect if used on type ''boat''.
 
|-
 
|-
|<center>WheelScale</center>||Scale of wheel and [[Collision File|collision]] models, 1.0 for original size of wheel and collision models<br>Only available for type ''car'', has no effect if used on type ''boat''
+
|<center>WheelScale</center>||Scale of wheel and [[Collision File|collision]] models, 1.0 for original size of wheel and collision models<br>Only available for type ''car'', has no effect if used on type ''boat''.
 
|-
 
|-
|<center>LODModel</center>||ID number of LOD model, can be any valid vehicle model<br>Only available for type ''plane''
+
|<center>LODModel</center>||ID number of LOD model &ndash; can be any valid vehicle model<br>Only available for type ''plane''.
 
|}
 
|}
  
===Class===
+
==== Wheels ====
The class of a vehicle helps determines where a vehicle 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 a class of vehicle in the [[PEDS#Vehicle_Class|PEDS]] section of the IDE file. These are the classes that are available and used in the game.
 
  
*big
+
Wheel models are located in the <code>../models/generic/wheels.DFF</code> file. Their textures are located in the <code>../models/misc.txd</code> file. Just like the cars themselves they are defined inside the <code>../data/default.ide</code> file by default. The following table shows the different wheels and their ID's.
*executive
 
*ignore
 
*poorfamily
 
*richfamily
 
*special
 
*worker
 
  
===Wheels===
 
Wheel models are located in the <code>wheels.DFF</code> file in the <code>models\Generic</code> folder. Wheel textures are located in the <code>MISC.TXD</code> file in the <code>models</code> folder. Wheels are defined in the <code>default.ide</code> file.
 
 
{| {{prettytable}}
 
{| {{prettytable}}
 
!ID
 
!ID
Line 84: Line 77:
 
|}
 
|}
  
==Vice City==
+
=== Vice City ===
===Format===
+
 
This section is mainly used in the <code>default.ide</code> file. Each type of vehicle has its own format.
+
By default all cars are defined inside the <code>../data/default.ide</code> file. Unlike ''GTA III'' there are the types ''bike'' and ''heli'' but ''train'' is missing or unused.
  
 
''Car''
 
''Car''
Line 106: Line 99:
 
|<center>ID</center>||Unique model ID
 
|<center>ID</center>||Unique model ID
 
|-
 
|-
|<center>ModelName</center>||Name of the .dff [[model file]], without extension
+
|<center>ModelName</center>||Name of the <code>.dff</code> [[model file]] without extension.
 
|-
 
|-
|<center>TxdName</center>||Name of the .txd [[texture dictionary]], without extension
+
|<center>TxdName</center>||Name of the <code>.txd</code> [[texture dictionary]] without extension.
 
|-
 
|-
|<center>Type</center>||Type of vehicle, which includes ''car'', ''bike'', ''boat'', ''plane'', and ''heli''; flyable helicopters are type ''car''
+
|<center>Type</center>||Type of vehicle, which includes ''car'', ''bike'', ''boat'', ''plane'', and ''heli''. Flyable helicopters are of type ''car''.
 
|-
 
|-
 
|<center>HandlingID</center>||Name corresponding to its handling data in the [[handling.cfg]] file.
 
|<center>HandlingID</center>||Name corresponding to its handling data in the [[handling.cfg]] file.
 
|-
 
|-
|<center>GameName</center>||Name corresponding to its [[GXT]] entry, case sensitive and must be seven characters or less!<br>Invalid name will not show up in the game
+
|<center>GameName</center>||Name corresponding to its [[GXT]] entry, case sensitive and must be seven characters or less.<br>Invalid name will not show up in the game.
 
|-
 
|-
|<center>Anims</center>||Appropriate animation file mainly used on bikes
+
|<center>Anims</center>||Appropriate animation file mainly used on bikes.
 
|-
 
|-
|<center>Class</center>||Class of the vehicle
+
|<center>Class</center>||Class of the vehicle.
 
|-
 
|-
|<center>Frequency</center>||Frequency of the vehicle spawning randomly on the streets
+
|<center>Frequency</center>||Frequency of the vehicle spawning randomly on the streets.
 
|-
 
|-
|<center>Level</center>||unknown
+
|<center>Level</center>||Unknown integer.
 
|-
 
|-
|<center>Comprules</center>||unknown
+
|<center>Comprules</center>||Unknown hexadecimal value.
 
|-
 
|-
|<center>WheelID</center>||ID number of wheel model<br>Only available for type ''car'', has no effect if used on type ''boat''
+
|<center>WheelID</center>||ID number of wheel model<br>Only available for type ''car'', has no effect if used on type ''boat''.
 
|-
 
|-
|<center>WheelScale</center>||Scale of wheel and [[Collision File|collision]] models for type ''car'', scale of wheel collision model for type ''bike'', 1.0 for original size of wheel and collision models<br>Only available for types ''car'' and ''bike'', has no effect if used on type ''boat''
+
|<center>WheelScale</center>||Scale of wheel and [[Collision File|collision]] models for type ''car'', scale of wheel collision model for type ''bike'', 1.0 for original size of wheel and collision models<br>Only available for types ''car'' and ''bike'', has no effect if used on type ''boat''.
 
|-
 
|-
|<center>LODModel</center>||ID number of LOD model, can be any valid vehicle model<br>Only available for type ''plane''
+
|<center>LODModel</center>||ID number of LOD model &ndash; can be any valid vehicle model<br>Only available for type ''plane''.
 
|}
 
|}
  
===Class===
+
==== Wheels ====
The class of a vehicle helps determines where a vehicle 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 a class of vehicle in the [[PEDS#Vehicle_Class_2|PEDS]] section of the IDE file. These are the classes that are available and used in the game.
 
  
*big
+
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.
*executive
 
*ignore
 
*leisureboat
 
*moped
 
*motorbike
 
*normal
 
*poorfamily
 
*richfamily
 
*taxi
 
*worker
 
*workerboat
 
  
===Wheels===
 
Wheel models are located in the <code>wheels.DFF</code> file in the <code>models\generic</code> folder. Wheel textures are located in the <code>wheels.TXD</code> file in the <code>models\generic</code> folder. Wheels are defined in the <code>default.ide</code> file.
 
 
{| {{prettytable}}
 
{| {{prettytable}}
 
!ID
 
!ID
Line 176: Line 155:
 
|[[File:Wheel_smallcar.png|50px|wheel_smallcar]]
 
|[[File:Wheel_smallcar.png|50px|wheel_smallcar]]
 
|}
 
|}
 +
 +
=== San Andreas ===
 +
 +
{{Incomplete}}
 +
 +
=== GTA IV ===
 +
 +
{{Incomplete}}
 +
 +
== Vehicle Classes ==
 +
 +
The class of a vehicle helps determines where a vehicle 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 a class of vehicle in the [[PEDS#Vehicle_Class_2|PEDS]] section of the IDE file. The following table shows the classes that are available and used in the game.
 +
 +
{|{{Prettytable}} width="100%" class="collapsible"
 +
!width="120px"|Flag
 +
!width="100px"|Supported games
 +
!width="25%"|Binary
 +
!Description
 +
|-
 +
|<center>0</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 0000</code></center>||ignore
 +
|-
 +
|<center>1</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 0001</code></center>||normal
 +
|-
 +
|<center>2</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 0010</code></center>||poorfamily
 +
|-
 +
|<center>4</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 0100</code></center>||richfamily
 +
|-
 +
|<center>8</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 1000</code></center>||executive
 +
|-
 +
|<center>16</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0001 0000</code></center>||worker
 +
|-
 +
|<center>32</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0010 0000</code></center>||big
 +
|-
 +
|<center>64</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0100 0000</code></center>||taxi
 +
|-
 +
|<center>128</center>||<center>{{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 1000 0000</code></center>||moped
 +
|-
 +
|<center>256</center>||<center>{{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0001 0000 0000</code></center>||motorbike
 +
|-
 +
|<center>512</center>||<center>{{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0010 0000 0000</code></center>||leisureboat
 +
|-
 +
|<center>1024</center>||<center>{{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0100 0000 0000</code></center>||workerboat
 +
|-
 +
|<center>2048</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 1000 0000 0000</code></center>||bicycle
 +
|-
 +
|<center>4096</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0001 0000 0000 0000</code></center>||on foot
 +
|}
  
 
== See also ==
 
== See also ==
  
 
* [[Item definition]]
 
* [[Item definition]]
 +
* [[PEDS]]
 
* [[CARS (IPL Section)]]
 
* [[CARS (IPL Section)]]
 
* [[Vehicle ID List]]
 
* [[Vehicle ID List]]

Revision as of 07:34, 30 July 2010

CARS (IDE section)
Supported games:GTA III, GTA VC, GTA SA, GTA IV
Brief description:Used to define vehicles
IDE Sections:
2DFX AMAT ANIM CARS HIER HAND MLO OBJS
PATH PEDS TANM TOBJ TREE TXDP WEAP

CARS is a section in the item definition file. It is used to define vehicles and some their properties.

Format

GTA III

This section is mainly used in the ../data/default.ide file. Each type of vehicle has its own format.

Car

ID, ModelName, TxdName, Type, HandlingID, GameName, Class, Frequency, Level, Comprules, WheelID, WheelScale

Boat and Train

ID, ModelName, TxdName, Type, HandlingID, GameName, Class, Frequency, Level, Comprules

Plane

ID, ModelName, TxdName, Type, HandlingID, GameName, Class, Frequency, Level, Comprules, LODModel
Identifier Description
ID
Unique model ID
ModelName
Name of the .dff model file without extension.
TxdName
Name of the .txd texture dictionary without extension.
Type
Type of vehicle, which includes car, boat, train, and plane
This data is related to hardcoded functions and must not be changed or else it might crash the game.
HandlingID
Name corresponding to its handling data in the handling.cfg file
GameName
Name corresponding to its GXT entry, case sensitive and must be seven characters or less!
Invalid name will show up as NAME missing
Class
Class of the vehicle (see below).
Frequency
Frequency of the vehicle spawning randomly on the streets.
Level
Unknown integer.
Comprules
Unknown hexadecimal value.
WheelID
ID number of wheel model
Only available for type car, has no effect if used on type boat.
WheelScale
Scale of wheel and collision models, 1.0 for original size of wheel and collision models
Only available for type car, has no effect if used on type boat.
LODModel
ID number of LOD model – can be any valid vehicle model
Only available for type plane.

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 wheel_sport64 wheel_saloon64 wheel_lightvan64 wheel_classic64 wheel_alloy64 wheel_lighttruck64 wheel_smallcar64

Vice City

By default all cars are defined inside the ../data/default.ide file. Unlike GTA III there are the types bike and heli but train is missing or unused.

Car

ID, ModelName, TxdName, Type, HandlingID, GameName, Anims, Class, Frequency, Level, Comprules, WheelID, WheelScale

Bike

ID, ModelName, TxdName, Type, HandlingID, GameName, Anims, Class, Frequency, Level, Comprules, Unknown, WheelScale

Boat and Heli

ID, ModelName, TxdName, Type, HandlingID, GameName, Anims, Class, Frequency, Level, Comprules

Plane

ID, ModelName, TxdName, Type, HandlingID, GameName, Anims, Class, Frequency, Level, Comprules, LODModel
Identifier Description
ID
Unique model ID
ModelName
Name of the .dff model file without extension.
TxdName
Name of the .txd texture dictionary without extension.
Type
Type of vehicle, which includes car, bike, boat, plane, and heli. Flyable helicopters are of type car.
HandlingID
Name corresponding to its handling data in the handling.cfg file.
GameName
Name corresponding to its GXT entry, case sensitive and must be seven characters or less.
Invalid name will not show up in the game.
Anims
Appropriate animation file mainly used on bikes.
Class
Class of the vehicle.
Frequency
Frequency of the vehicle spawning randomly on the streets.
Level
Unknown integer.
Comprules
Unknown hexadecimal value.
WheelID
ID number of wheel model
Only available for type car, has no effect if used on type boat.
WheelScale
Scale of wheel and collision models for type car, scale of wheel collision model for type bike, 1.0 for original size of wheel and collision models
Only available for types car and bike, has no effect if used on type boat.
LODModel
ID number of LOD model – can be any valid vehicle model
Only available for type plane.

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 wheel_rim wheel_offroad wheel_truck wheel_sport wheel_saloon wheel_lightvan wheel_classic wheel_alloy wheel_lighttruck wheel_smallcar

San Andreas

This section is incomplete. You can help by fixing and expanding it.

GTA IV

This section is incomplete. You can help by fixing and expanding it.

Vehicle Classes

The class of a vehicle helps determines where a vehicle 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 a class of vehicle in the PEDS section of the IDE file. The following table shows the classes that are available and used in the game.

Flag Supported games Binary Description
0
GTA III Vice City San Andreas GTA IV
0000 0000 0000 0000 0000 0000
ignore
1
GTA III Vice City San Andreas GTA IV
0000 0000 0000 0000 0000 0001
normal
2
GTA III Vice City San Andreas GTA IV
0000 0000 0000 0000 0000 0010
poorfamily
4
GTA III Vice City San Andreas GTA IV
0000 0000 0000 0000 0000 0100
richfamily
8
GTA III Vice City San Andreas GTA IV
0000 0000 0000 0000 0000 1000
executive
16
GTA III Vice City San Andreas GTA IV
0000 0000 0000 0000 0001 0000
worker
32
GTA III Vice City San Andreas GTA IV
0000 0000 0000 0000 0010 0000
big
64
GTA III Vice City San Andreas GTA IV
0000 0000 0000 0000 0100 0000
taxi
128
Vice City San Andreas GTA IV
0000 0000 0000 0000 1000 0000
moped
256
Vice City San Andreas GTA IV
0000 0000 0000 0001 0000 0000
motorbike
512
Vice City San Andreas GTA IV
0000 0000 0000 0010 0000 0000
leisureboat
1024
Vice City San Andreas GTA IV
0000 0000 0000 0100 0000 0000
workerboat
2048
San Andreas GTA IV
0000 0000 0000 1000 0000 0000
bicycle
4096
San Andreas GTA IV
0000 0000 0001 0000 0000 0000
on foot

See also