Coding

 Reply to this postStart new topic

[Memory] GTA SA HUD Addresses

Deji
post Nov 29 2010, 12:53 PM
Post #21


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



SANNY
0A8C: write_memory 0x58F492 size 1 value BASE_COLOUR_ID virtual_protect 1


But there are loads more addresses for HUD editing. You'd need to find others yourself to make full use of them. This requires IDA and listeners gta_sa.idb from the Sanny Builder website.


--------------------
Go to the top of the page
 
+Quote Post
Guest_Jeka_*
post Dec 22 2010, 08:02 PM
Post #22









Do you happen to know how to remove the black shadow(border) on Menu fonts, not menu title ? all the break is not found
Sorry in my english

This post has been edited by Jeka: Dec 22 2010, 08:07 PM
Go to the top of the page
 
+Quote Post
Silent
post Jan 2 2011, 07:20 PM
Post #23


The master of cut retort

Group Icon

Posts: 239
From: Warsaw, PL
Joined: 21-July 10



I was doing some tricks with Trip Skip feature, and that's my findings:

Trip Skip Icon posX

CODE
0x58A185 [dword]


Trip Skip Icon posY

CODE
0x58A1A7 [dword]


Trip Skip Icon offsetY

CODE
0x58A1B3 [dword]


Trip Skip Icon sizeX

CODE
0x58A1D7 [dword]


Trip Skip Icon sizeY

CODE
0x58A1C5 [dword]


Trip Skip Text posX

CODE
0x58A31B [dword]


Trip Skip Text posY

CODE
0x58A2D6 [dword]


Trip Skip Text offsetY

CODE
0x58A2E5 [dword]



All positions uses pointers to floats, so we have to trick it a bit more than just writemem.

I have used a thread memory to store new values. For example, to set new Trip Skip Icon posY via thread memory:

SANNY
0AC6: 0@ = label @_TripSkipIconY offset
0A8C: write_memory 0x58A1A7 size 4 value 0@ virtual_protect 1 // Trip Skip icon posY

:_TripSkipIconY
hex
    00 00 0C 42        // 35.0
end


I believe that it can be read from variable too:

SANNY
0007: 0@ = 35.0
0AC7: 1@ = var 0@ offset
0A8C: write_memory 0x58A1A7 size 4 value 1@ virtual_protect 1 // Trip Skip icon posY


However personally I prefer to store it in thread variable, so it won't be overwritten by accident.

I don't know if "offset" is named valid though. Both "posY" and "offsetY" addresses controls positions, I don't know how they're linked with each other yet.


Let's go futher...

Trip Skip Icon colors:

CODE
0x58A17F [byte] - R
0x58A174 [byte] - G
0x58A16F [byte] - B
0x58A16A [byte] - A


Trip Skip Text outline colors:

CODE
0x58A264 [byte] - R
0x58A262 [byte] - G
0x58A260 [byte] - B
0x58A25B [byte] - A


Unlike positions & scale, they aren't pointers. Means that you can just write desired value to them.

What about Trip Skip Text color? It uses Base Color ID smile.gif

Effect of modding these addresses in The '95 Story:



This post has been edited by Silent: Jan 2 2011, 07:35 PM
Go to the top of the page
 
+Quote Post
DK22
post Mar 19 2011, 10:53 AM
Post #24


Member

Posts: 197
From: Liberty City, Shoreside
Joined: 15-July 10



QUOTE
Health Bar Y Pos (Pointer)
0x58EE66 [dword]

SANNY
0AC6: 0@ = label @health_Y_pos offset
0A8C: 0@ 4 400.0 0
0A8C: 0x58EE66 4 0@ 1
...
:health_Y_pos
hex
    00000000
end

Crash when healthbar must be drawed.

UPD
Ok. It just need to add 2 bytes and then write it wink.gif

This post has been edited by DK22: Mar 19 2011, 04:59 PM
Go to the top of the page
 
+Quote Post
fastman92
post Apr 25 2011, 01:53 PM
Post #25


Trained Member

Posts: 77
Joined: 25-October 10



Removing HUD

This code stops HUD in GTA SA from being drawn, only radar can be enabled:

SANNY
:Remove_HUD
{
Description:
  Removes HUD
}

0A8C: write_memory 0x0058FBC4 size 4 value 0x90901AEB virtual_protect 1     // jmp 0058FBE0 (2) | nop (1) | nop (1)
0A8C: write_memory 0x0058FBC8 size 1 value 0x74909090 virtual_protect 1     // nop (1)
return


This post has been edited by fastman92: Apr 26 2011, 02:11 PM
Go to the top of the page
 
+Quote Post
fastman92
post Apr 26 2011, 01:48 PM
Post #26


Trained Member

Posts: 77
Joined: 25-October 10



Radar Main, X / Font Y size on texts
CODE
0x00858A10 [float]

Default value is 40.0 This adress is used for size of drawn texts and radar together. To modify radar position only you must modify ASM code of radar function which points to this adress.

Radar Main, Y
CODE
0x866B70 [float]


This post has been edited by fastman92: Apr 26 2011, 02:06 PM
Go to the top of the page
 
+Quote Post
DK22
post Apr 27 2011, 05:34 AM
Post #27


Member

Posts: 197
From: Liberty City, Shoreside
Joined: 15-July 10



Radar Main, X / Font Y size on texts
Hey when the constant uses in tow or more functions - then, it's better to hack function and leave this constant alone.
Go to the top of the page
 
+Quote Post
Silent
post May 1 2011, 12:36 PM
Post #28


The master of cut retort

Group Icon

Posts: 239
From: Warsaw, PL
Joined: 21-July 10



Found loads of HUD addresses while recreating III HUD in SA, I might post it all here sometime.

However, one thing wasn't posted here yet definitely.

Make Wanted Level stars show all the time

Like it was in VC or III. Just NOP 2 bytes at 0x58DD1B to do this.



It sux.
Go to the top of the page
 
+Quote Post
DK22
post May 1 2011, 05:02 PM
Post #29


Member

Posts: 197
From: Liberty City, Shoreside
Joined: 15-July 10



Disable radiostation name:
SANNY
0A8C: 0x507035 5 0x90 true

Radiostation name Scale

SANNY
{$CLEO .cs}

0AC6: 0@ = label @label offset
0A8C: 0@ 4 2.0 false // RadioName Text Scale Y
0A8C: 0x4E9F22 4 0@ true
inc(0@, 4)
0A8C: 0@ 4 3.0 false // RadioName Text Scale X
0A8C: 0x4E9F38 4 0@ true
0a93:

:label
hex
    00000000 00000000
end


This post has been edited by DK22: May 1 2011, 05:40 PM
Go to the top of the page
 
+Quote Post
fastman92
post Jun 22 2011, 03:35 PM
Post #30


Trained Member

Posts: 77
Joined: 25-October 10



Can you find where is X size of font displayed in menu. It will be size of one char displayed in menu, float.
I think you should search it in function 0x00718A10 which is calculation Y size of char to display too.

Y size of char is on 0x858A10 and is used in that function by 00718D12 - fmul dword ptr [00858A10]
Value of X size should be somewhere in this function, but i can`t find it.
Next thing which might be needed is distance between characters in menu. When i modify 0x0085950C [float] (default value 32.0) and make it bigger, the distance changes, but X size of chars is little bigger.
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Sep 5 2012, 01:56 PM
Post #31


Member

Posts: 130
From: Germany
Joined: 24-March 12



Deji can you help me what can i use to return Default Hud color ??


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Deji
post Sep 5 2012, 04:29 PM
Post #32


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



QUOTE (Michael.Knight1 @ Sep 5 2012, 02:56 PM) *
Deji can you help me what can i use to return Default Hud color ??


First page, last post...
http://gtagmodding.com/forums/index.php...post&p=1222


--------------------
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Sep 5 2012, 05:04 PM
Post #33


Member

Posts: 130
From: Germany
Joined: 24-March 12



Thanks You thumbsup.gif

P.S : I Tryed to make menu for changing hud color but i has a problem .
the color who work just is Blue who you post it at the first .

Example :

CODE
0006: 0@ = 0xBAB22C // Green Color
0A90: 1@ = 4 * 0   // Health Bar
005A: 0@ += 1@
0A8C: write_memory 0@ size 4 value 0xB4191DFF virtual_protect 0


I don't show the health bar ??

This post has been edited by Michael.Knight1: Sep 5 2012, 05:26 PM


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Deji
post Sep 5 2012, 06:35 PM
Post #34


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



Reverse the order of the hex bytes. The order on the table is RGBA, but number units go from right-to-left:
0006: 0@ = 0xBAB22C // Green Color
0A90: 1@ = 4 * 0   // Health Bar
005A: 0@ += 1@
0A8C: write_memory 0@ size 4 value 0xFF1D19B4 virtual_protect 0


--------------------
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Sep 5 2012, 07:06 PM
Post #35


Member

Posts: 130
From: Germany
Joined: 24-March 12



ok , the red is work but no any other color on the table work as the green ??
can you help me how can i use hex color ??
i don't know how to find this color code type ??

This post has been edited by Michael.Knight1: Sep 5 2012, 07:08 PM


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Sep 30 2012, 05:15 PM
Post #36


Member

Posts: 130
From: Germany
Joined: 24-March 12



Deji i need help , the colors which you add on the table won't work for me pinch.gif
What i sould put here
CODE
0006: 0@ = 0xBAB22C

And here
CODE
0A8C: write_memory 0@ size 4 value 0xFF994400 virtual_protect 0

I Need to know where sould i put the colors and where i can find them whistling.gif


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Oct 12 2012, 06:42 PM
Post #37


Member

Posts: 130
From: Germany
Joined: 24-March 12



BUMP .

Deji , please help me about the colors unsure.gif
I Don't know how , where should i put the color ID / Address and where i find them because i tryed but


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Deji
post Oct 12 2012, 07:46 PM
Post #38


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



I have no idea what you're saying, you need to explain preferably using better english and post the code that's not working.


--------------------
Go to the top of the page
 
+Quote Post
Sidewalk Surfer
post Oct 15 2012, 05:13 AM
Post #39


Newbie In Training

Posts: 16
From: NYC USA
Joined: 29-December 09



Michael.Knight1, are you having trouble creating a color or are you not able to find the address of a color you want to change?


--------------------
Whoa dude! Mr. Turtle is my father.
Go to the top of the page
 
+Quote Post
Michael.Knight1
post Oct 19 2012, 05:49 PM
Post #40


Member

Posts: 130
From: Germany
Joined: 24-March 12



QUOTE (Sidewalk Surfer @ Oct 15 2012, 06:13 AM) *
Michael.Knight1, are you having trouble creating a color or are you not able to find the address of a color you want to change?

I am not able to find the address of a color thumbsup.gif


--------------------
Michael Knight A shadowy flight into the dangerous world of a man who does not exist.
Michael Knight, a young loner on a crusade to champion the cause of the innocent, the helpless, the powerless, in a world of criminals who operate above the law.
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

4 User(s) are reading this topic (4 Guests and 0 Anonymous Users)
0 Members: