Creating vehicles (GTA2)

The Beast GTS from Grand Theft Auto in GTA2, in various remaps and with dents.

Vehicles in GTA2 are 2D and consist of images (called 'sprites') that can be altered with smaller images ('deltas') to depict dents, doors, lights and other features. These images are stored in a style file (*.sty), which can be modified with a style editor like STY Tool or STYed.

Sprite

Vehicles can only be replaced; it is impossible to add more vehicles to a style file. Before you create a vehicle, you should decide which original vehicle you want to replace. Open the style file you want to change (wil-, ste- and bil.sty for the Downtown, Residential and Industrial District, respectively) with STY Tool and choose a car to replace. If you select this car by clicking on it, its width and height will be shown at the right (for example, the Rumbler is 56 x 64 pixels). These are the dimensions your new car should have.

Start your favourite graphics editing program and create a vehicle with the correct dimensions, but keep in mind you have to leave enough space at both sides to be able to add the door animations later. Instead of creating your own car, you can also use an existing image. In this tutorial the Beast GTS from Grand Theft Auto will be converted to GTA2.

Remaps

Most cars are available in various colours ('remaps'), but nevertheless each car only has one sprite. To create cars with different colours, the game switches the palette of the sprite: each remap has its own palette. To create a car that is available in multiple colours, you'll need to use the original palettes of GTA2. The palettes used for car remaps are numbered 31 and 168 through 202 in STY Tool, and 32 and 169 through 203 in STYed. De vehicles in the original style files use palette 31 (32), which is the default beige colour. This colour gives nice results in other rempas, but is very hard to do right. In this tutorial the blue palette 172 (173) is used, which is easier. The new car image must have the same colours as the palette. To do this, you'll need to export the palette which can only be done in STYed. Start STYed and open the style file with File > Open > Cars Only (you can use Cars + Tiles, but this takes more time). Select the palette you want to use in the bottom center panel of the editor ("pal 173" in this tutorial) and export this palette with File > Export > Export Palette. You can close STYed.

Adjusted for palette 172 (173).

Make sure your vehicle has about the same colour as the palette by adjusting the hue and saturation of the image with a graphics program. The image of the Beast GTS is very dark, so it must be made lighter. You'll now need a graphics editing program that supports palettes (*.pal files), like Paint Shop Pro. Open the image of your car with this program and convert the image to the palette you exported with STYed (in Paint Shop Pro, this can be done with Colors > Load palette). The image is modified and will only have the colors of the palette. If the result doesn't look good the image probably wasn't close enough to the colours of the palette before it was converted. To fix this, you could try to change the hue and saturation of the original image some more and converting it again. Keep in mind that black (#000000), as well as pink (#FF00FF) and some other colours will be invisible in-game! Save the image as an 8bit bitmap (*.bmp) when you are happy with the result.

Importing

The palette window, with palette 275 selected. The vehicle palettes can be seen on the left.

Go to STY Tool and select the vehicle you want to replace. Click on the button "import" and select your new vehicle. STY Tool will ask "Do you want to import palette for this image or just remap palindex to new palette?". Click "No", because we want to use one of the original palettes. A window with all available palettes will show up. Select palette 172 (note that the number is one less than in STYed!) and click "OK". Your new vehicle has been imported.

Deltas

To create the doors, dents, lights, etc. of your vehicle you have to create deltas. Deltas are additional images that can be added to the main sprite. All deltas of a car are stored in a single delta sheet, which can be found by clicking on the button "deltas" in STY Tool. A window will show up in which you'll see twenty versions of your car with the deltas of the original car. Click on "Car images only" to make the original deltas invisible and click "Export deltas" to export this image (this may result in an unusable file; manually add ".bmp" to the file name while exporting to fix this).

Open the delta image with a graphics editing program and create the following deltas:

  1. Dent behind left
  2. Dent behind right
  3. Dent front right
  4. Dent front left
  5. Unused (original vehicles have a dent in the roof here)
  6. Tail light right
  7. Head light right
  8. Driver door (almost closed)
  9. Driver door (slightly opened)
  10. Driver door (almost open)
  11. Driver door (open)
  12. Five posibilities:
    1. Backdoor (almost closed)
    2. Rear doors (almost closed)
    3. Pop up light (almost closed)
    4. Emergency light (Special Agent Car)
    5. NUMBER_GRAPHIC 0 (GT-A1)
  13. Five posibilities:
    1. Backdoor (slightly open)
    2. Rear doors (slightly open)
    3. Pop up light (slightly open)
    4. Emergency light (Special Agent Car)
    5. NUMBER_GRAPHIC 1 (GT-A1)
  14. Five posibilities:
    1. Backdoor (almost open)
    2. Rear doors (almost open)
    3. Pop up light (almost open)
    4. Emergency light (Special Agent Car)
    5. NUMBER_GRAPHIC 2 (GT-A1)
  15. Five posibilities:
    1. Backdoor (open)
    2. Rear doors (open)
    3. Pop up light (open)
    4. Emergency light (Special Agent Car)
    5. NUMBER_GRAPHIC 3 (GT-A1)
  16. Three posibilities:
    1. Emergency lights left
    2. Radar dish socket (TV Van)
    3. NUMBER_GRAPHIC 4 (GT-A1)
    4. Roof lights
  17. Two posibilities:
    1. Emergency lights
    2. NUMBER_GRAPHIC 5 (GT-A1)
  18. NUMBER_GRAPHIC 6 (GT-A1)
  19. NUMBER_GRAPHIC 7 (GT-A1)
  20. NUMBER_GRAPHIC 8 (GT-A1)
Delta sheet for the Beast GTS.

Make sure you only change what's needed to create the delta. If you make parts of the main sprite invisible (like a dent) you have to colour them black. All deltas are optional: if a delta is unneeded (like emergency lights for a normal car) you can leave the delta as it is.

Open the image in Paint Shop Pro or a similar program, load the palette and save the image as a 8bit bmp just like you did with the sprite. Select the vehicle in STY Tool, go to "deltas" and click on "Import deltas" to import your own deltas. Your vehicle now has proper dents, doors, etc. If the vehicle appears scrambled while showing the delta's the delta images aren't completely identical to the car (apart from the actual dents, etc.). Cut a plain vehicle image from the delta sheet to use as the main sprite for the car and import the images again to fix this.

When you're done, press "Save as" to save the changes to the style file.

Modding tutorials of Grand Theft Auto 2
Mapping Map Editor · Buildings · Roads · Water & animations · Slopes · Flat tiles · Collision info · Level edge · Zones · Putting a level ingame
Scripting Declarering: Main script · Script Compiler · Code lists · Commands · Vehicles · Objects · Sounds · Characters
Programming: IF · WHILE · COUNTERs · Subroutines · THREAD TRIGGERs · Kill Frenzies
Both Manual · Lighting · Car shops · Cranes & crushers · Gangs · Subway · Multiplayer levels
File types .gci · .gmp · .gxt · .mis · .mmp · .scr · .seq · .tmp · .sty
Other Texting · Physics · Creating vehicles · Terminology · Installing levels

Read in another language

This page is available in 1 language