Description
The interface colors, are hardcoded, so this means you'll have to hack the GTA SA.exe while the game is running, there are ways of changing them, even still.
I do not recommend any of this to the newbie scripter, as it changes the memory, something a newbie scripter, should not try...
If you have no knowledge in RGB(A) then I suggest you read this first: http://en.wikipedia.org/wiki/RGB_color_model
way1, first take an address for the HUD:
- Code:
//............................Health(red things)
0006: 7@ = 0xBAB22C
0006: 8@ = 0xBAB22D
0006: 9@ = 0xBAB22E
//............................
//............................Armour/Clock/WB Text(white things)
0006: 7@ = 0xBAB23C
0006: 8@ = 0xBAB23D
0006: 9@ = 0xBAB23E
//............................
//............................Money/Car enter text(green things)
0006: 7@ = 0xBAB230
0006: 8@ = 0xBAB231
0006: 9@ = 0xBAB232
//............................
//............................Wanted Level Stars
0006: 7@ = 0xBAB244
0006: 8@ = 0xBAB245
0006: 9@ = 0xBAB246
//............................
//............................Zone text/Bars
0006: 7@ = 0xBAB238
0006: 8@ = 0xBAB239
0006: 9@ = 0xBAB23A
//............................
Now write to these address(the first is R value, the second G, then the third B),
so if you write for the first line below value to FF, and the other two 00 then that will make it red.
As stated the, first parameter of the opcode below is the address, the third is the color value.
So in the example below, that will make the HUD(with the address yo chosen)blue, because the R value is set 0, the G to 0 as well, but the B is
set to FF(255) so it makes it as blue as possible.
- Code:
0A8C: write_memory 7@ size 4 value 0 virtual_protect 0 // R
0A8C: write_memory 8@ size 4 value 0 virtual_protect 0 // G
0A8C: write_memory 9@ size 4 value 0xFF virtual_protect 0 // B
way2, take a address again, for example, I'm going to use the health bar address, RGB addresses, this way is the complex method.
- Code:
7@ = 0xBAB22C // R addresses
8@ = 0xBAB22D // G addresses
9@ = 0xBAB22E // B addresses
Choose the RGB value:
- Code:
0006: 10@ = 0 // red value is 0
0006: 11@ = 0 // green value is 0
0006: 12@ = 255 // blue value is 255
0050: gosub @COLOR_1075 // gosub to the color injector
0a93: end_custom_thread
This is the main thing of all the code, the inject pointer:
- Code:
:COLOR_1075
0085: 0@ = 7@ // (int)
0085: 2@ = 10@ // (int)
0006: 3@ = 1
0050: gosub @COLOR_1167
0085: 0@ = 8@ // (int)
0085: 2@ = 11@ // (int)
0006: 3@ = 1
0050: gosub @COLOR_1167
0085: 0@ = 9@ // (int)
0085: 2@ = 12@ // (int)
0006: 3@ = 1
0050: gosub @COLOR_1167
0051: return
:COLOR_1167
0085: 5@ = 0@ // (int)
0016: 0@ /= 4
0012: 0@ *= 4
0062: 5@ -= 0@ // (int)
0050: gosub @COLOR_1317
0012: 3@ *= 8
0012: 5@ *= 8
000E: 3@ -= 1
0006: 6@ = 0
:COLOR_1232
00D6: if
08B6: test 2@ bit 6@
004D: jump_if_false @COLOR_1266
08BF: set 1@ bit 5@
0002: jump @COLOR_1274
:COLOR_1266
08C5: clear 1@ bit 5@
:COLOR_1274
000A: 5@ += 1
000A: 6@ += 1
001D: 6@ > 3@ // (int)
004D: jump_if_false @COLOR_1232
008A: &0(0@,1i) = 1@ // (int)
0051: return
:COLOR_1317
000E: 0@ -= 0xA49960
0016: 0@ /= 4
008B: 1@ = &0(0@,1i) // (int)
0051: return
Now this way, this way is very short, this way does not use the R, G, B addresses, it uses the health bar color address(RGBA) here is an example:
- Code:
0@ = 362035
&0(0@,1i) = 0xFF0000FF
Alpha (FF), then Blue (00), then Green (00), then Red (FF).
- Code:
0@ = 362035 // health bar
&0(0@,1i) = 0xFFFF6300
0@ = 362036 // hud.money
&0(0@,1i) = 0xFF00FFF0
0@ = 362038 // SA fonts
&0(0@,1i) = 0xFF0C0CFF
0@ = 362039 // GTA3 fonts
&0(0@,1i) = 0xFF3BB847
0@ = 362040 // fonts.menubackground
&0(0@,1i) = 0xFFFF0000
0@ = 362041 // maplines
&0(0@,1i) = 0xFF00FFF0
Sphere color hacking
The sphere changing, works a little different, note; that the last parameter should be set to 1.
- Code:
0A8C: write_memory 0x00725BD0 size 4 value 0x00{}BA66 virtual_protect 1 // R
0A8C: write_memory 0x00725BCC size 4 value 0x00{}B966 virtual_protect 1 // G
0A8C: write_memory 0x00725BD5 size 4 value 0xFF{}B866 virtual_protect 1 // B
The value before, the {} brackets are color value, so for example, in the third opcode, value the color value is FF(255)
R is set to 0 in that example, so is G set to 0, so using them opcodes above in a script, will change the sphere color to blue.
Comments, or questions are welcome.
This is for getting the perfect color you want, if you do not wanna do it in your head: