Difference between revisions of "Carcols.dat"
(rewriting section format) |
|||
Line 22: | Line 22: | ||
!Description | !Description | ||
|- | |- | ||
− | |<code>[[#col|col]]</code> ||{{Icon|t}} {{Icon|4}} ||Color | + | |<code>[[#col|col]]</code> ||{{Icon|t}} {{Icon|4}} ||Color table |
|- | |- | ||
− | |<code>[[#car|car]]</code> ||{{Icon|t}} {{Icon|4}} || | + | |<code>[[#car|car]]</code> ||{{Icon|t}} {{Icon|4}} ||Car color assignments |
|- | |- | ||
|<code>[[#car4|car4]]</code> ||{{Icon|SA}} {{Icon|4}} || | |<code>[[#car4|car4]]</code> ||{{Icon|SA}} {{Icon|4}} || | ||
Line 42: | Line 42: | ||
}} | }} | ||
− | {|class="wikitable center-col-1 center-col-2" style="width: 100%;" | + | {|class="wikitable center-col-1 center-col-2 center-col-3" style="width: 100%;" |
!style="width: 4em;" |{{Icon|t}} | !style="width: 4em;" |{{Icon|t}} | ||
!style="width: 2em;" |{{Icon|4}} | !style="width: 2em;" |{{Icon|4}} | ||
Line 49: | Line 49: | ||
!Description | !Description | ||
|- | |- | ||
− | |colspan="2" |A,B,C ||R, G, B ||integer[3] ||The color in [[wikipedia:RGB color model|RGB]]. | + | |colspan="2" |A,B,C ||R, G, B ||{{a|l}} |integer[3] ||The color in [[wikipedia:RGB color model|RGB]]. |
|- | |- | ||
− | | - ||D | | + | | - ||D ||Prefix ||string ||Police scanner prefix name: |
*- | *- | ||
*bright | *bright | ||
Line 57: | Line 57: | ||
*dark | *dark | ||
|- | |- | ||
− | | - ||E | | + | | - ||E ||Color ||string ||Police scanner color name: |
*black | *black | ||
*blue | *blue | ||
Line 75: | Line 75: | ||
|} | |} | ||
− | Below are the colours available in the default carcols.dat file, numbered according to their respective | + | Below are the colours available in the default carcols.dat file, numbered according to their respective entry. |
− | ==== | + | ====GTA III==== |
{| cellpadding="10" cellspacing="0" style="text-align: center;" | {| cellpadding="10" cellspacing="0" style="text-align: center;" | ||
|- | |- | ||
Line 181: | Line 181: | ||
|} | |} | ||
− | ==== | + | ====Vice City==== |
{| cellpadding="10" cellspacing="0" style="text-align: center;" | {| cellpadding="10" cellspacing="0" style="text-align: center;" | ||
|- | |- | ||
Line 285: | Line 285: | ||
|} | |} | ||
− | ==== | + | ====San Andreas==== |
{| cellpadding="7" cellspacing="0" style="text-align: center;" | {| cellpadding="7" cellspacing="0" style="text-align: center;" | ||
Line 424: | Line 424: | ||
|} | |} | ||
− | ==== | + | ====Vice City Stories==== |
{| cellpadding="10" cellspacing="0" style="text-align: center;" | {| cellpadding="10" cellspacing="0" style="text-align: center;" | ||
|- | |- | ||
Line 536: | Line 536: | ||
|} | |} | ||
− | ==== | + | ====GTA IV==== |
{| cellpadding="7" cellspacing="0" style="text-align: center;" | {| cellpadding="7" cellspacing="0" style="text-align: center;" | ||
Line 687: | Line 687: | ||
===car=== | ===car=== | ||
+ | {{Pre| | ||
+ | car | ||
+ | # III/VC/SA | ||
+ | ModelName, FirstColor1, SecondColor1, FirstColor2, SecondColor2, FirstColor3, SecondColor3, FirstColor4, SecondColor4, FirstColor5, SecondColor5, FirstColor6, SecondColor6, FirstColor7, SecondColor7, FirstColor8, SecondColor8 | ||
+ | # IV | ||
+ | ModelName, FirstColor1, SecondColor1, FirstColor2, SecondColor2, FirstColor3, SecondColor3, FirstColor4, SecondColor4, FirstColor5, SecondColor5, FirstColor6, SecondColor6, FirstColor7, SecondColor7, FirstColor8, SecondColor8, FirstColor9, SecondColor9, FirstColor10, SecondColor10, FirstColor11, SecondColor11, FirstColor12, SecondColor12, FirstColor13, SecondColor13, FirstColor14, SecondColor14, FirstColor15, SecondColor15, FirstColor16, SecondColor16, FirstColor17, SecondColor17, FirstColor18, SecondColor18, FirstColor19, SecondColor19, FirstColor20, SecondColor20, FirstColor21, SecondColor21, FirstColor22, SecondColor22, FirstColor23, SecondColor23, FirstColor24, SecondColor24 | ||
+ | end | ||
+ | }} | ||
− | + | {|class="wikitable center-col-1 center-col-2" style="width: 100%;" | |
− | + | !style="width: 3em;" |{{Icon|t}} {{Icon|4}} | |
− | + | !style="width: 12em;" |Identifier | |
− | + | !style="width: 6em;" |Type | |
− | + | !Description | |
− | + | |- | |
− | + | |A ||ModelName ||string ||Model name of vehicle. | |
− | + | |- | |
− | + | |B ||FirstColor1 ||integer ||First car color of first pair. The value represents the entry number in the <code>col</code> section starting with 0. | |
− | + | |- | |
− | + | |C ||SecondColor1 ||integer ||Second car color of first pair. The value represents the entry number in the <code>col</code> section starting with 0. | |
− | + | |- | |
+ | |D ||FirstColor2 ||integer ||First car color of second pair. | ||
+ | |- | ||
+ | |E ||SecondColor2 ||integer ||Second car color of second pair. | ||
+ | |} | ||
+ | Vehicles that spawn with a randomized color will choose a pair of colors for the vehicle model from this section. It is not required to fill all 8 or 24 pairs of colors for each model; the games will ignore unused pairs. It is not even required for a model to have an entry in this section; the games will default to the pair 0,0. | ||
===car3=== | ===car3=== |
Revision as of 05:19, 2 September 2017
carcols.dat is a file located in the data
folder from GTA 3 to San Andreas or the common\data
folder for GTA 4. The file contains a colour palette and numbers to associate them with specific cars. Cars may or may not have a colour palette.
Contents
Overview
Line comments are indicated by the character #
(number sign) and empty lines are allowed. They can be placed anywhere in the file. Each section starts with a section identifier indicating how the content of the section gets interpreted by the game. The identifier is followed by the definition entries. Each entry takes one line and every line follows a specific format. The end of any section is indicated by the terminating string end
. Both the section identifier and terminating string are case sensitive. Data are usually separated by the character ,
(comma) but can be separated by
(space). Extra tabs and spaces anywhere in the beginning of the line, between data, or after the data are omitted by the game and can be used to improve readability for human eyes.
Example
# line comment col # default style in col section 5,5,5 # valid style 5 5 5 # unread data end
Format
Section | Supported games | Description |
---|---|---|
col |
Color table | |
car |
Car color assignments | |
car4 |
||
car3 |
col
col # III/VC/SA R, G, B # IV R, G, B, Prefix, Color end
Identifier | Type | Description | ||
---|---|---|---|---|
A,B,C | R, G, B | integer[3] | The color in RGB. | |
- | D | Prefix | string | Police scanner prefix name:
|
- | E | Color | string | Police scanner color name:
|
Below are the colours available in the default carcols.dat file, numbered according to their respective entry.
GTA III
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 |
80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 |
Vice City
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 |
80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 |
San Andreas
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 |
80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |
100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 |
120 | 121 | 122 | 123 | 124 | 125 | 126 |
Vice City Stories
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 |
80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |
100 | 101 |
GTA IV
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 |
80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |
100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 |
120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 |
134, 135, 136 - TBoGT
car
car # III/VC/SA ModelName, FirstColor1, SecondColor1, FirstColor2, SecondColor2, FirstColor3, SecondColor3, FirstColor4, SecondColor4, FirstColor5, SecondColor5, FirstColor6, SecondColor6, FirstColor7, SecondColor7, FirstColor8, SecondColor8 # IV ModelName, FirstColor1, SecondColor1, FirstColor2, SecondColor2, FirstColor3, SecondColor3, FirstColor4, SecondColor4, FirstColor5, SecondColor5, FirstColor6, SecondColor6, FirstColor7, SecondColor7, FirstColor8, SecondColor8, FirstColor9, SecondColor9, FirstColor10, SecondColor10, FirstColor11, SecondColor11, FirstColor12, SecondColor12, FirstColor13, SecondColor13, FirstColor14, SecondColor14, FirstColor15, SecondColor15, FirstColor16, SecondColor16, FirstColor17, SecondColor17, FirstColor18, SecondColor18, FirstColor19, SecondColor19, FirstColor20, SecondColor20, FirstColor21, SecondColor21, FirstColor22, SecondColor22, FirstColor23, SecondColor23, FirstColor24, SecondColor24 end
Vehicles that spawn with a randomized color will choose a pair of colors for the vehicle model from this section. It is not required to fill all 8 or 24 pairs of colors for each model; the games will ignore unused pairs. It is not even required for a model to have an entry in this section; the games will default to the pair 0,0.
car3
Only used in GTA4, this section contains the same data as CAR section from previous games but has a third value, the specular colour.
car4
Included in GTASA, this section contains the same data as CAR section but has colours in sets of 4 instead of 2. These cars will need to have not only primary and secondary materials assigned within the dff, but also tertiary and quaternary materials. By default, only the Campervan, Cement Mixer and Squalo boat use 4 colours in the game.
In GTA4 the data is the same as in the CAR3 section but with a fourth value, the tertiary colour.
Adding new colours
This is incredibly simple. To begin with, you must come up with an RGB code that matches the colour you want a car to spawn as. As explained earlier, choose any number between 0 and 255 for each 3 values. If you choose 255,0,0 you will have the strongest red colour possible.
Now in the COL section, add a new line at the bottom, and give it a # number that follows on from the very last colour.
Make sure your new line does not have the same # number as any other line.
Once you have your new line ready, you can add a name for it on the right, similar to the other lines, but this is not necessary. You have now finished with the COL section.
Now we move onto the CAR and CAR4 sections. Find the vehicle you want your new colour(s) to apply to. This vehicle should already have one or more pairs assigned to it. You can either remove these, or add your new pair to the end. Whichever you choose will make no difference, but don't forget the last number of the car's line must not have a comma ending it.
A pair can also have the same colour in it twice, all this will do is match the primary and secondary colours together. Remember, many cars only make use of the primary colour in a pair - the dff model file will need editing if you want the secondary colour to function somewhere on a car. The secondary colour (and perhaps tertiary and quaternary if using CAR4) can be set to anything should the model not actually have any materials assigned to those values.
Note: In San Andreas, having more than 179 colors will crash the game.
Adding carcols functionality to your own model (ZModeler only)
This can be achieved simply using tags on the ends of your model's material names. You can force the game to apply the primary colour setting to a material by adding:
[prim]
to the end of the material name, separated by a space. Secondary is [sec], tertiary is [ter] and quaternary is [qua]. A model can have multiple materials using a specific data type.
Tool
- GTAGarage: X Car Colors Editor
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 |