Is there any way to modify the color palettes of the GTA 1 peds?

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
Post Reply
Gui7814
Mugger
Mugger
Posts: 15
Joined: 05 Aug 2024, 17:45

Is there any way to modify the color palettes of the GTA 1 peds?

Post by Gui7814 »

I wanted to modify the palette of the peds in GTA 1 but I don't know how to do it, I think it's hardcoded because I swapped the style001.sty from GTA 1 to the style001.sty from GTA London, since in GTA London the peds have different palettes from GTA 1, I tested to see if this would change the palette from GTA 1 but it didn't change anything.
User avatar
JernejL
Hitman
Hitman
Posts: 151
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: Is there any way to modify the color palettes of the GTA 1 peds?

Post by JernejL »

In the file format documentation it tells how palette indexes are calculated and where they are stored. you can edit this in my g24 editor and in gtacars ( https://www.fifengr.com/gtacars/GTA_Cars.html ).

CityScape Data Structure (cds.doc) – Technical details of the GTA1 map format (.cmp) by DMA Design

my g24 editor those palettes are easy to find and edit, however some it is possible that character sprites for gta1 and london are same and you will need to edit palette data in g24 file directly.
Gui7814
Mugger
Mugger
Posts: 15
Joined: 05 Aug 2024, 17:45

Re: Is there any way to modify the color palettes of the GTA 1 peds?

Post by Gui7814 »

JernejL wrote: 08 Dec 2024, 16:26 In the file format documentation it tells how palette indexes are calculated and where they are stored. you can edit this in my g24 editor and in gtacars ( https://www.fifengr.com/gtacars/GTA_Cars.html ).

CityScape Data Structure (cds.doc) – Technical details of the GTA1 map format (.cmp) by DMA Design

my g24 editor those palettes are easy to find and edit, however some it is possible that character sprites for gta1 and london are same and you will need to edit palette data in g24 file directly.
It wasn't the sprite palette I was talking about, it was the peds' remap palette, those that differentiate some peds from others by the color of their clothes, skin, hair, etc... for example: cops and paramedics use the same sprite, but they use different palettes, and the player's sprite is the same regardless of which protagonist is chosen, what changes is the palette, and the problem is that apparently it's a hardcoded thing since as I said I changed the style001.g24 of GTA 1 for that of GTA London since GTA London uses different remap palettes for peds, and even so it didn't change anything in the peds' remap palette, I think the remap palette may be in the game's .exe codes since in addition to just changing the style001.g24 of GTA 1 for GTA London, I also changed all the data files of GTA 1 for GTA London, and even so the remap palette of the peds remained unchanged.
User avatar
JernejL
Hitman
Hitman
Posts: 151
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: Is there any way to modify the color palettes of the GTA 1 peds?

Post by JernejL »

That is what i was talking about. all those palettes are in the palettes section too.

Image

So, palettes follow in sequence: tiles, sprites, car remaps, pedesterian remaps, fonts.

pedestrian remaps also contain remaps for police (for medics, firemen) but i don't think sequence is known.
Gui7814
Mugger
Mugger
Posts: 15
Joined: 05 Aug 2024, 17:45

Re: Is there any way to modify the color palettes of the GTA 1 peds?

Post by Gui7814 »

JernejL wrote: 09 Dec 2024, 05:47 That is what i was talking about. all those palettes are in the palettes section too.

Image

So, palettes follow in sequence: tiles, sprites, car remaps, pedesterian remaps, fonts.

pedestrian remaps also contain remaps for police (for medics, firemen) but i don't think sequence is known.
How do I edit the peds' remap palettes through GTACars? I've used this program several times and I've never seen the option to edit the peds' remap palettes.
Gui7814
Mugger
Mugger
Posts: 15
Joined: 05 Aug 2024, 17:45

Re: Is there any way to modify the color palettes of the GTA 1 peds?

Post by Gui7814 »

I tried to use your g24 editor but it corrupts when saving after replacing the palette, when I enter the game and I'm in the map selector and click to go to the city corresponding to the style the game tries to load but gives the error "Error 35.49 car 0 unknown type: 255", I went to test if even importing the palette that I exported without modifying to see if it would be corrupted, I went to test it in the game and the same error happened.

I don't know if the version of your program that I downloaded has a problem, as I didn't find another version on the internet I downloaded it from this link here: https://gtamp.com/GTA2/gta1-gta2-tool-source-code.7z which contains the source code of your programs but also includes the compiled exe.
User avatar
JernejL
Hitman
Hitman
Posts: 151
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: Is there any way to modify the color palettes of the GTA 1 peds?

Post by JernejL »

how did you change the palettes? maybe there is something odd you made that cause it to not work?
Gui7814
Mugger
Mugger
Posts: 15
Joined: 05 Aug 2024, 17:45

Re: Is there any way to modify the color palettes of the GTA 1 peds?

Post by Gui7814 »

JernejL wrote: 12 Dec 2024, 19:43 how did you change the palettes? maybe there is something odd you made that cause it to not work?
1.png
When I open the corrupted .g24 that I saved, instead of sprites, these colored lines with a white background appear
2.png
But what would be the correct way to edit the palettes?
User avatar
JernejL
Hitman
Hitman
Posts: 151
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: Is there any way to modify the color palettes of the GTA 1 peds?

Post by JernejL »

that should be the right way. does the editor even open & save a file (without any change)?
Gui7814
Mugger
Mugger
Posts: 15
Joined: 05 Aug 2024, 17:45

Re: Is there any way to modify the color palettes of the GTA 1 peds?

Post by Gui7814 »

JernejL wrote: 13 Dec 2024, 07:05 that should be the right way. does the editor even open & save a file (without any change)?
Yes, when I save the .g24 file without making any changes it does not get corrupted and therefore the program opens the .g24 file normally.
Gui7814
Mugger
Mugger
Posts: 15
Joined: 05 Aug 2024, 17:45

Re: Is there any way to modify the color palettes of the GTA 1 peds?

Post by Gui7814 »

since I'm having problems with this program, could you tell me how to change the ped remap palettes in gtacars?
User avatar
JernejL
Hitman
Hitman
Posts: 151
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: Is there any way to modify the color palettes of the GTA 1 peds?

Post by JernejL »

Gui7814 wrote: 13 Dec 2024, 17:40 since I'm having problems with this program, could you tell me how to change the ped remap palettes in gtacars?
I don't think gtacars can even do this as it has no "direct" palette editor.

I might be able to eventually fix the g24 editor but i can't make any promises atm. because i can't get it to compile either.
User avatar
JernejL
Hitman
Hitman
Posts: 151
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: Is there any way to modify the color palettes of the GTA 1 peds?

Post by JernejL »

Found a old tool i made from 2002 that only edits palettes:

https://gtamp.com/tdc/clutedit.7z

if i see this correctly, you can do following:

open g24 file
export bmp
*edit pallete in bmp column
import bmp
image to clut (gets palettes from imported image and puts it internally into palette)
save (to g24 file)

There is also "palette importer" button you can use that will export a standard 8 bit palette bmp that can be edited and imported back in (it will import palette, not the image).

a bit complex but with a bit fiddling you should be able to edit palettes for ped remaps with this.

Out of curiosity, what are you up to with gta1? :)
Gui7814
Mugger
Mugger
Posts: 15
Joined: 05 Aug 2024, 17:45

Re: Is there any way to modify the color palettes of the GTA 1 peds?

Post by Gui7814 »

JernejL wrote: 19 Dec 2024, 06:40 Found a old tool i made from 2002 that only edits palettes:

https://gtamp.com/tdc/clutedit.7z

if i see this correctly, you can do following:

open g24 file
export bmp
*edit pallete in bmp column
import bmp
image to clut (gets palettes from imported image and puts it internally into palette)
save (to g24 file)

There is also "palette importer" button you can use that will export a standard 8 bit palette bmp that can be edited and imported back in (it will import palette, not the image).

a bit complex but with a bit fiddling you should be able to edit palettes for ped remaps with this.
I Used This Program But It Also Corrupts The .g24 File
JernejL wrote: 19 Dec 2024, 06:40 Out of curiosity, what are you up to with gta1? :)
I am recreating the GBC Port of GTA 1 on GTA 1 PC.
User avatar
JernejL
Hitman
Hitman
Posts: 151
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: Is there any way to modify the color palettes of the GTA 1 peds?

Post by JernejL »

This is super weird because this tool is very simple - it just goes to palette region and writes out new palette data section.

Maybe there is something modified in your g24 file that the program doesn't like (or calculates wrong location for palettes)?
any chance you can share it (can also send it privately)
Gui7814
Mugger
Mugger
Posts: 15
Joined: 05 Aug 2024, 17:45

Re: Is there any way to modify the color palettes of the GTA 1 peds?

Post by Gui7814 »

JernejL wrote: 24 Dec 2024, 06:55 This is super weird because this tool is very simple - it just goes to palette region and writes out new palette data section.

Maybe there is something modified in your g24 file that the program doesn't like (or calculates wrong location for palettes)?
any chance you can share it (can also send it privately)
I tested it on an unmodified .g24 file and the program still corrupted it.
Post Reply