Characters in GTA 2 Coding

To create characters for your missions, you need to use the following code. PLAYER_PED must be used initially to create the actual player, whilst CHAR_DATA is used to create AI charcters:

PLAYER_PED uniquename = ( X , Y , Z ) remap rotation

So, an example could be:

PLAYER_PED p1 = ( 127.5 , 127.5 , 2.0 ) 22 0

The following is used for AI charcters:

CHAR_DATA uniquename = ( X , Y , Z ) remap rotation occupation

Again, an example could be:

CHAR_DATA bigbossdude = ( 12.5 , 57.5 , 4.0 ) 12 270 CRIMINAL_TYPE1

The characters above will stand still. They run away if a gun is fired. The next section will first detail remaps and then how to add AI to them.

Remaps

Below is a list of every remap in GTA 2 from special police officers to ordinary civilians:

  1. Blue Police
  2. Green Police
  3. Red Police
  4. Yellow Police
  5. Khaki Police
  6. Red hair Redneck
  7. Blonde hair Redneck
  8. Scientist
  9. Zaibatsu
  10. Krishna
  11. Russian
  12. Loony
  13. Elvis
  14. Yakuza
  15. Fireman
  16. Green Shorts Ped
  17. Medic
  18. Mugger Remap
  19. Blue Dummy Remap
  20. Light Blue Dummy Remap
  21. T-Shirt & Shorts Dummy Remap
  22. Short Sleeved Shirt & Trousers Dummy Remap
  23. Prison Uniform
  24. Hulk (Normal)
  25. Hulk (Green)
  26. Default Player Ped
  27. Naked Dummy
  28. Blue shirt and jeans
  29. White shirt and jeans
  30. Lilac shirt and jeans
  31. Light red shirt and jeans
  32. Light red shirt and khaki shorts
  33. Blue shirt and blue shorts
  34. Yellow shirt and khaki shorts
  35. Light purple shirt and jeans
  36. Dark red shirt and turquoise trousers
  37. Dark green shirt and dark green trousers
  38. Brown shirt and jeans
  39. Brown shirt and brown trousers
  40. Dark purple shirt and brown trousers
  41. Dark purple shirt and light brown trousers
  42. Burgundy shirt and light brown trousers
  43. Short sleeve burgundy shirt and light brown trousers
  44. Short sleeve light burgundy shirt and light brown trousers
  45. Aqua shirt and jeans
  46. Yellow shirt and jeans
  47. Short sleeve dark green shirt and lilac trousers
  48. Light grey shirt and dark grey jeans
  49. Short sleeve grey/blue shirt and drak grey jeans
  50. Short sleeve light purple shirt and light grey trousers
  51. Purple shirt with light purple sleeves and light grey trousers
  52. Grey/green shirt and grey trousers
  53. Pink shirt and jeans

Changing Remaps

If you’ve played on the second city with one of the Redneck missions where you enter the prison, you actually change outfit. This is a simple command:

CHANGE_CHAR_REMAP ( character/player name , new remap )

Example code:

CHANGE_CHAR_REMAP ( p1 , 13 )

To make your character or player look like a civilian, just use the following code instead:

SET_CHAR_GRAPHIC_TYPE ( charactername , graphic type , remap )

Character name is self explanitory. Below are the available graphic types:

Value Description
DUMMY_GRAPHICRemap list in next topic.
EMERG_GRAPHICFor emergency characters like medics and cops.
GANG_GRAPHICA gang graphic, hardly used.

So an example could be:

SET_CHAR_GRAPHIC_TYPE ( dummy01 , DUMMY_GRAPHIC , 34 )

This also applies to things like medics and police so they look like the ones in game, and not larger version of them! The gang one shouldn’t really be used at all, as I’m pretty sure all characters have this as default.

SWAT Officer Remap

This was one of my best finds in GTA 2, and not even Rockstar or anyone else had used this in any major mission. This follows the same principle as above, only with a slight variation and similar to making default colour cars (-1 for the remap).

SET_CHAR_GRAPHIC_TYPE ( p1 , EMERG_GRAPHIC , -1 )

The -1 is very similar to cars by giving it a default graphic. If you do it to each of the graphic types, you’ll get these results:

Value Description
DUMMY_GRAPHICRoadblock tank driver (dark red shirt and green sleeves)
EMERG_GRAPHICSWAT character
GANG_GRAPHICZaibatsu

(Originally written by Chris “Pyro” Hockley and formatted by Ben “Cerbera” Millard with full permission.)