Difference between revisions of "Carcols.dat"

From GTAMods Wiki
Jump to navigation Jump to search
(I couldn't get GTA4 to run so I'm not sure about this.)
Line 27: Line 27:
  
 
Col section contain colour palette, the data is made of text lines, every line contains 3 numbers seperated with a comma ',' sign. The 3 numbers in a line specify the Red, Green and Blue component of that line's colour. With all three values, a colour is formed, and applied to a car. Each value is between 0 and 255, thus 256 options per value; a total of 16,777,216 different colour combinations possible.
 
Col section contain colour palette, the data is made of text lines, every line contains 3 numbers seperated with a comma ',' sign. The 3 numbers in a line specify the Red, Green and Blue component of that line's colour. With all three values, a colour is formed, and applied to a car. Each value is between 0 and 255, thus 256 options per value; a total of 16,777,216 different colour combinations possible.
 +
 +
In GTA4, the fourth and fifth column are used for the police scanner audio. The fourth column is the prefix. Avaliable prefixes are: -, bright, light, dark. The fifth column is the colour. Available colours are: Black, blue, brown, beige, graphite, green, grey, orange, pink, red, silver, white, yellow, GrottiRed, DewbaucheGreen.
  
 
Below are the colours available in an unedited carcols.dat file, numbered according to their respective lines.
 
Below are the colours available in an unedited carcols.dat file, numbered according to their respective lines.
Line 379: Line 381:
 
====GTA4====
 
====GTA4====
  
{| cellpadding="10" cellspacing="0"
+
{| cellpadding="7" cellspacing="0"
 
|-
 
|-
 
| style="background:rgb(10,10,10); color:#FFFFFF" align="center" | 0
 
| style="background:rgb(10,10,10); color:#FFFFFF" align="center" | 0
Line 464: Line 466:
 
| style="background:rgb(54,65,85); color:#FFFFFF" align="center" | 78
 
| style="background:rgb(54,65,85); color:#FFFFFF" align="center" | 78
 
| style="background:rgb(108,132,149); color:#FFFFFF" align="center" | 79
 
| style="background:rgb(108,132,149); color:#FFFFFF" align="center" | 79
 +
|-
 +
| style="background:rgb(77,93,96); color:#FFFFFF" align="center" | 80
 +
| style="background:rgb(64,108,143); color:#FFFFFF" align="center" | 81
 +
| style="background:rgb(19,69,115); color:#FFFFFF" align="center" | 82
 +
| style="background:rgb(16,80,130); color:#FFFFFF" align="center" | 83
 +
| style="background:rgb(56,86,148); color:#FFFFFF" align="center" | 84
 +
| style="background:rgb(0,28,50); color:#FFFFFF" align="center" | 85
 +
| style="background:rgb(89,110,135); color:#FFFFFF" align="center" | 86
 +
| style="background:rgb(34,52,87); color:#FFFFFF" align="center" | 87
 +
| style="background:rgb(32,32,44); color:#FFFFFF" align="center" | 88
 +
| style="background:rgb(245,137,15); color:#FFFFFF" align="center" | 89
 +
| style="background:rgb(145,115,71); color:#FFFFFF" align="center" | 90
 +
| style="background:rgb(142,140,70); color:#FFFFFF" align="center" | 91
 +
| style="background:rgb(170,173,142); color:#FFFFFF" align="center" | 92
 +
| style="background:rgb(174,155,127); color:#FFFFFF" align="center" | 93
 +
| style="background:rgb(150,129,108); color:#FFFFFF" align="center" | 94
 +
| style="background:rgb(122,117,96); color:#FFFFFF" align="center" | 95
 +
| style="background:rgb(157,152,114); color:#FFFFFF" align="center" | 96
 +
| style="background:rgb(152,149,134); color:#FFFFFF" align="center" | 97
 +
| style="background:rgb(156,141,113); color:#FFFFFF" align="center" | 98
 +
| style="background:rgb(105,30,59); color:#FFFFFF" align="center" | 99
 +
|-
 +
| style="background:rgb(114,42,63); color:#FFFFFF" align="center" | 100
 +
| style="background:rgb(124,27,68); color:#FFFFFF" align="center" | 101
 +
| style="background:rgb(34,25,24); color:#FFFFFF" align="center" | 102
 +
| style="background:rgb(127,105,86); color:#FFFFFF" align="center" | 103
 +
| style="background:rgb(71,53,50); color:#FFFFFF" align="center" | 104
 +
| style="background:rgb(105,88,83); color:#FFFFFF" align="center" | 105
 +
| style="background:rgb(98,68,40); color:#FFFFFF" align="center" | 106
 +
| style="background:rgb(125,98,86); color:#FFFFFF" align="center" | 107
 +
| style="background:rgb(170,157,132); color:#FFFFFF" align="center" | 108
 +
| style="background:rgb(123,113,94); color:#FFFFFF" align="center" | 109
 +
| style="background:rgb(171,146,118); color:#FFFFFF" align="center" | 110
 +
| style="background:rgb(99,92,90); color:#FFFFFF" align="center" | 111
 +
| style="background:rgb(201,201,201); color:#000000" align="center" | 112
 +
| style="background:rgb(214,218,214); color:#000000" align="center" | 113
 +
| style="background:rgb(159,157,148); color:#FFFFFF" align="center" | 114
 +
| style="background:rgb(147,163,150); color:#FFFFFF" align="center" | 115
 +
| style="background:rgb(156,156,152); color:#FFFFFF" align="center" | 116
 +
| style="background:rgb(167,162,143); color:#FFFFFF" align="center" | 117
 +
| style="background:rgb(15,106,137); color:#FFFFFF" align="center" | 118
 +
| style="background:rgb(161,153,131); color:#FFFFFF" align="center" | 119
 +
|-
 +
| style="background:rgb(163,173,198); color:#FFFFFF" align="center" | 120
 +
| style="background:rgb(155,139,128); color:#FFFFFF" align="center" | 121
 +
| style="background:rgb(132,148,171); color:#FFFFFF" align="center" | 122
 +
| style="background:rgb(158,164,171); color:#FFFFFF" align="center" | 123
 +
| style="background:rgb(134,68,110); color:#FFFFFF" align="center" | 124
 +
| style="background:rgb(226,6,6); color:#FFFFFF" align="center" | 125
 +
| style="background:rgb(71,120,60); color:#FFFFFF" align="center" | 126
 +
| style="background:rgb(215,142,16); color:#FFFFFF" align="center" | 127
 +
| style="background:rgb(42,119,161); color:#FFFFFF" align="center" | 128
 +
| style="background:rgb(66,31,33); color:#FFFFFF" align="center" | 129
 +
| style="background:rgb(111,103,95); color:#FFFFFF" align="center" | 130
 +
| style="background:rgb(252,38,0); color:#FFFFFF" align="center" | 131
 +
| style="background:rgb(252,109,0); color:#FFFFFF" align="center" | 132
 +
| style="background:rgb(255,255,255); color:#000000" align="center" | 133
 
|}
 
|}
  
Line 480: Line 539:
  
 
The game will randomly spawn cars with either data pair, but will never mix pairs together. You can have a lot more than two pairs for one car - the more pairs, the more variety of colours the car will have each time it spawns.
 
The game will randomly spawn cars with either data pair, but will never mix pairs together. You can have a lot more than two pairs for one car - the more pairs, the more variety of colours the car will have each time it spawns.
 +
 +
In GTA4, the third value is the specular colour.
  
 
===CAR4===
 
===CAR4===
  
Included in GTASA only, contains 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.
+
Included in GTASA, contains 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 fourth value is the tertiary colour.
  
 
==Adding new colours==
 
==Adding new colours==

Revision as of 07:06, 23 December 2008

Car Colours file (carcols.dat) contains a colour palette and numbers to associate them with specific cars. Cars may or may not have a colour palette.

Structure

The carcols.dat file is split up into two or three sections named "col", "car" and "car4" (car4 being only used in GTASA). Each section starts with a section identifier and ends with the keyword "end", both in a single line.

Comments in this file are done by using the numbersign "#" symbol at the start of the line.

Example:

# a comment!

COL
...
end

CAR
...
end

CAR4
...
end

COL

Col section contain colour palette, the data is made of text lines, every line contains 3 numbers seperated with a comma ',' sign. The 3 numbers in a line specify the Red, Green and Blue component of that line's colour. With all three values, a colour is formed, and applied to a car. Each value is between 0 and 255, thus 256 options per value; a total of 16,777,216 different colour combinations possible.

In GTA4, the fourth and fifth column are used for the police scanner audio. The fourth column is the prefix. Avaliable prefixes are: -, bright, light, dark. The fifth column is the colour. Available colours are: Black, blue, brown, beige, graphite, green, grey, orange, pink, red, silver, white, yellow, GrottiRed, DewbaucheGreen.

Below are the colours available in an unedited carcols.dat file, numbered according to their respective lines.

GTA3

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

GTAVC

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

GTASA

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

GTA4

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

CAR

The CAR section associates specific colours from the colour palette with cars. Data in a line is separated same as in COL section (with a comma ','). Every car has a line dedicated to it, followed by numbers which specify the car's colour pairs (2 colors per color pair - primary and secondary). For example, on a police car, the primary colour is black, and the secondary is white. Make the police car's numbers 2,0 and you'll have a blue and white police car.

Here is an example:

kuruma, 18,57, 5,6 

The game will interpret the data like this:

  • the colour pair data belongs to car 'kuruma'
  • numbers '18' and '57' are the first colour pair. 18 is the primary colour, 57 is the secondary. Let's say this is the Kuruma from GTA3, so we match these colours up to the GTA3 palettes above. The primary colour will be this red colour, and the secondary this blue colour.
  • numbers '5' and '6' are second colour pair. 5 is the primary colour, 6 is the secondary.

The game will randomly spawn cars with either data pair, but will never mix pairs together. You can have a lot more than two pairs for one car - the more pairs, the more variety of colours the car will have each time it spawns.

In GTA4, the third value is the specular colour.

CAR4

Included in GTASA, contains 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 fourth value is 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

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.