Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Documenting GTA3/VC memory addresses


JernejL
 Share

Recommended Posts

(Colors were changed by altering the exe)

cool stuff, but you forgot the addresses for colors nervous.gif

 

Currently working on Top Down City Game, a classics top down game similar to GTA1 & GTA2: 

 

Thread Info: https://gtaforums.com/topic/911312-new-game-top-down-city/

Youtube channel: https://www.youtube.com/channel/UCxGfOh3ld7Xm-ic3KEMB6iA 

Discord: https://discord.gg/UXmDPzS - join #bridge channel 

Link to comment
Share on other sites

 

cool stuff, but you forgot the addresses for colors  nervous.gif

I wasn't sure if I should post them here, but if you think it's okay.. smile.gif

VC uses the function at 0x541570 to set colors, so it's easy to find adresses for other hardcoded adresses. The function for drawing the loading screen is located at 0x4A69D0.

 

The calls should look like that:

 

PUSH alphaPUSH bluePUSH greenPUSH redCALL gta-vc.00541570

I think ModelingMan explained it some pages before. I only list the offsets of the push instructions's values now, all bytes.

 

Border color (call @ 0x4A6ABF)

A 0x4A6A9F

B 0x4A6AB6

G 0x4A6AB8

R 0x4A6ABE

 

Background color (call @ 0x4A6B84)

A 0x4A6B77

B 0x4A6B7C

G 0x4A6B7E

R 0x4A6B80

 

Foreground color (call @ 0x4A6C37)

A 0x4A6C24

B 0x4A6C29

G 0x4A6C2E

R 0x4A6C33

 

 

 

I was bored: http://squiddy.marway.org/gta/screens/menu01.jpg

http://squiddy.marway.org/gta/mods/colors.txt

Edited by Squiddy
Link to comment
Share on other sites

Menu

0x68D07C (float) factor that influences the black border in the menu

Cursor Color (asm): 0x4A36D6

Cursor Shadow Color (asm): 0x4A35AA

 

Menu Title (the upper right text)

0x68D128 (float) y scale factor (for both)

0x68D114 (float) relative distance from the right

0x68D118 (float) relative distance from the top

Color (asm): 0x49E33F

 

Menu Title Shadow

0x68D130 (float) relative distance from the right

0x68D134 (float) relative distance from the top

Color (asm): 0x49E274

 

Misc

0x6971C4 (float) Alpha value of game text (includes the hud), set it higher than 255 to make it more transparent

 

Radio Station Display

0x6CD9C8 (float) absolute distance from the top

0x6CD9CC (float) shadow distance

0x6CD9B8 (float) y scale factor

0x6CD9C0 (float) x scale factor

0x6CD9C4 (float) word wrap (e.g. set it to 60 and mp3 player will be displayed in 2 lines)

0x7839C5 (byte) When switching the radio this will count to 0, then disable the display

Shadow Color (asm): 0x5FA1AF

Color1 (asm): 0x5FA223

Color2 (asm): 0x5FA248

Link to comment
Share on other sites

You could have saved a lot of time with this, Squiddy. Almost all the front-end color addresses are documented in LC launcher source.

Link to comment
Share on other sites

You could have saved a lot of time with this, Squiddy. Almost all the front-end color addresses are documented in LC launcher source.

Oh, I thought you only documented the hud related addresses.

Link to comment
Share on other sites

speaking of colors, i think im getting confused with the formats, theres no consistency.

 

the rgb values for police car lights, loading bar and such are Integers, 0-255 (0-ff) per channel (R, G, B, A )

the rgb values for headlights images* are Floats, 0.0-255.0**

and the rgb values i found for the world ambience are read as int from the timecycle.dat, and divided by 255, to get Floats, 0-1, which is directx standard for lighting and materials.

 

*found a bunch of headlight info, sorting, will post later.

**this was just bizzare. one of the headlight rgb values was 214. it wasn't scaled to 0-1, nor was it D6h, it was actually 214.0 float. i haven't seen lighting storeed in that format before.

Lurking..

Link to comment
Share on other sites

You could have saved a lot of time with this, Squiddy. Almost all the front-end color addresses are documented in LC launcher source.

Oh, I thought you only documented the hud related addresses.

They are not in GTAMemory anywhere. But the launcher modifies these addresses using WriteProcessMemory after in runs the game. But now that you mention it, it's beena long time since I uploaded the source code. Maybe the last one I uploaded didn't have them.

Link to comment
Share on other sites

They are not in GTAMemory anywhere. But the launcher modifies these addresses using WriteProcessMemory after in runs the game. But now that you mention it, it's beena long time since I uploaded the source code. Maybe the last one I uploaded didn't have them.

Sure, that's the way I modified them too. But do you really documented ALL colors? That's a hell of work. wow.gif

Link to comment
Share on other sites

Yeah, pretty much every front end color had to be changed in LC to match GTA3 colors. The only one I can't find (and it's not really front-end) is the pink of the marker arrow.

Link to comment
Share on other sites

Yeah, pretty much every front end color had to be changed in LC to match GTA3 colors. The only one I can't find (and it's not really front-end) is the pink of the marker arrow.

someone around 10-15 pages back shown how to swap those radar icons,

maybe you should start looking for clues there.

 

Currently working on Top Down City Game, a classics top down game similar to GTA1 & GTA2: 

 

Thread Info: https://gtaforums.com/topic/911312-new-game-top-down-city/

Youtube channel: https://www.youtube.com/channel/UCxGfOh3ld7Xm-ic3KEMB6iA 

Discord: https://discord.gg/UXmDPzS - join #bridge channel 

Link to comment
Share on other sites

You could look at these calls, I'm pretty sure it's used for the arrow marker too.

http://squiddy.marway.org/gta/mods/colors.txt

Anyone has a main.scm with an arrow over an actor? I could look through the code later today.

 

I had no luck with that, but instead I did some additional research on the radar, many adresses has been found, but one for the x position is still missing.

 

0x869665 (BYTE) Set it to anything else than 0 and you get a display similar to the one from the map menu

0x68FD2C (FLOAT) Absolute distance from the left

0x68FD34 (FLOAT) Absolute distance from the bottom

Edited by Squiddy
Link to comment
Share on other sites

Here's another meun adress, this one is where the meun is (this editable)

 

 

0x869728

Decimal

00 - Stats

01 - Start Game

03 - Audio Setup

04 - Display

05 - Language

06 - Map

07 - InGame/ Starts New Game

08 - Load Game

09 - Delete Game

10 - "All unsaved progress..." Load Game

11 - "Proceed wit deleting..." Delete Game

12 - Goes to 01 - Start Game

13 - "Deleting Saved game. Please Wait..." then goes to 14

14 - "Delete Successful. Select OK to continue" "Ok" Delete Game

15 - Save Game List

16 - "Are you sure you want to save this game?"

17 - "Saving current game. Please wait...." Then goes to 18

18 - "Save Successful. Select OK to continue." "OK"

19 - "Ok" Saved Game, this is just a blank screen with no text

20 - "Warning! One or more cheats..." Cheat warning

21 - Player Skin Setup

26 - Controller Setup

27 - Options

29 - Main Meun

30 - RedeFine Controls

31 - Mouse Settings

32 - Resume

33 - "Greetings From Vice City" Then ends game

34 - "Greetings From Vice City" Then ends game

35+ - Blank Screen biggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gif

Edited by dustcrazy
Link to comment
Share on other sites

ModelingMan

Here is a list of functions that I've found. Some of the addresses might possibly be wrong since I need to compare ASM to MIPS. Also some of the parameters are incorrect...

 

Linkage!

 

Thanks to kyeman for giving me some info on how to do this smile.gif

Edited by ModelingMan

abstract_sig.png

Link to comment
Share on other sites

 

Here is a list of functions that I've found. Some of the addresses might possibly be wrong since I need to compare ASM to MIPS. Also some of the parameters are incorrect...

 

Linkage!

 

Thanks to kyeman for giving me some info on how to do this smile.gif

i love you inlove.gif

 

"useful" would be an understatement, as there is some stuff in there that i had no idea where to look for. enjoy the new star.

Lurking..

Link to comment
Share on other sites

 

Here is a list of functions that I've found. Some of the addresses might possibly be wrong since I need to compare ASM to MIPS. Also some of the parameters are incorrect...

 

Linkage!

 

Thanks to kyeman for giving me some info on how to do this smile.gif

excellent work indeed!!

 

btw, physicsapplyturnforce looks really suspiciously similar to this "game-standard" function here:

 

procedure Physics_AddForce(Obj: TTssObject; Dir, Orig: TD3DXVector3);

begin

with Obj do begin

if Dir.Y<>0 then Moment.X:=Moment.X-(Orig.Z-Dir.Z/Dir.Y*Orig.Y)*Dir.Y;

if Dir.Z<>0 then Moment.X:=Moment.X+(Orig.Y-Dir.Y/Dir.Z*Orig.Z)*Dir.Z;

 

if Dir.X<>0 then Moment.Y:=Moment.Y+(Orig.Z-Dir.Z/Dir.X*Orig.X)*Dir.X;

if Dir.Z<>0 then Moment.Y:=Moment.Y-(Orig.X-Dir.X/Dir.Z*Orig.Z)*Dir.Z;

 

if Dir.X<>0 then Moment.Z:=Moment.Z-(Orig.Y-Dir.Y/Dir.X*Orig.X)*Dir.X;

if Dir.Y<>0 then Moment.Z:=Moment.Z+(Orig.X-Dir.X/Dir.Y*Orig.Y)*Dir.Y;

 

if Dir.X<>0 then Force.X:=Force.X+Dir.X;

if Dir.Y<>0 then Force.Y:=Force.Y+Dir.Y;

if Dir.Z<>0 then Force.Z:=Force.Z+Dir.Z;

end;

end;

 

which can be seen in action here:

 

http://www.gtatools.com/tss/

 

btw, for everyone that wants to contribute more to this project, me

and smithers (luke) have setup a cool php script for gta memory

database management:

 

http://www.gtaconnection.net/gtamemory/

 

put it into good use, it has also neat feature like page-adress

bookmarks on database page, etc.. wink.gif

 

also, i'm fully open for suggestions / criticism about the gtamemory site project.

Currently working on Top Down City Game, a classics top down game similar to GTA1 & GTA2: 

 

Thread Info: https://gtaforums.com/topic/911312-new-game-top-down-city/

Youtube channel: https://www.youtube.com/channel/UCxGfOh3ld7Xm-ic3KEMB6iA 

Discord: https://discord.gg/UXmDPzS - join #bridge channel 

Link to comment
Share on other sites

random_download

The gtamemory project keeps putting a \ in whenever I type a ' symbol tounge.gif

Link to comment
Share on other sites

The gtamemory project keeps putting a \ in whenever I type a ' symbol tounge.gif

If the GTAModding project gets off the ground we could have a very nice place to put information about memory and various other things, but we'll have to wait a bit on that to see if it gets setup. The slash is just because stripslashes() isn't used, easy enough to fix, I'm sure it will be. May also be an idea to insist a few more fields are filled in.

 

and James, I love ya too. wink.gif

adam broke it.

Link to comment
Share on other sites

this memory address database is a frickin awesome idea.

 

i'm going to start making submissions, but i have a suggestion.. make the data easier to read! its a strain on my eyes trying to read the data from it, some tables are missing and text is not aligned right.. not bashing whoever made it, but please make it easier to read!!

 

modelingman, those functions rock - big props

Edited by !cMc! Jacob
Link to comment
Share on other sites

user posted image

 

Updated: http://www.gtaforums.com/index.php?showtop...dpost&p=2860103

 

Marker arrow colors

0x814070 BYTE red

0x814071 BYTE green

0x814072 BYTE blue

0x814073 BYTE alpha

 

0x814074 WORD up and down movement, set to 1 and the arrow stops moving

0x814076 WORD rotation speed

 

Marker arrow corona colors

0x699074 BYTE red

0x699075 BYTE green

0x699076 BYTE blue

 

0x7E4778 FLOAT corona size factor

 

Relating functions:

0x570BA0 C3dMarker::Render

(calls 0x570DA0 to render the arrow)

 

0x574790 CSpecialFX::Render

(calls C3dMarker::Render, CBulletTraces::Render (@0x5729F0) and some other functions)

 

0x4A6510 RenderEffects

(calls some render functions:

CSpecialFX::Render

CShadows::RenderStaticShadows (@0x56C690)

CShadows::RenderStoredShadows (@0x56CC40)

CRubbish::Render (@0x567F20)

CCoronas::Render (@0x543500)

CParticle::Render (@0x5608C0)

 

Vice city set's those values every time a marker is created, so it's currently no real solution. I'll look for a better way

Edited by Squiddy
Link to comment
Share on other sites

{DBC}Lance

 

Marker arrow corona colors

0x699074 BYTE red

0x699075 BYTE green

0x699076 BYTE blue

what do you mean with corona? if it's difficult to explain, could you post another screen? cool.gif

Link to comment
Share on other sites

I mean that glow around the arrow.

 

00570F2A |. 8A4424 28 MOV AL,BYTE PTR SS:[ESP+28]

00570F2E 8845 58 MOV BYTE PTR SS:[EBP+58],AL

00570F31 8A4424 2C MOV AL,BYTE PTR SS:[ESP+2C]

00570F35 |. 8845 59 MOV BYTE PTR SS:[EBP+59],AL

00570F38 |. 8A4424 30 MOV AL,BYTE PTR SS:[ESP+30]

00570F3C |. 8845 5A MOV BYTE PTR SS:[EBP+5A],AL

00570F3F |. 8A4424 34 MOV AL,BYTE PTR SS:[ESP+34]

00570F43 |. 8845 5B MOV BYTE PTR SS:[EBP+5B],AL

 

These instructions seem to rest the color of the arrow when a new one is created, I've got no idea now how to change it, as I didn't found the responsible operations on the stack yet.

Link to comment
Share on other sites

user posted image

 

Marker arrow colors

0x814070 BYTE red

0x814071 BYTE green

0x814072 BYTE blue

0x814073 BYTE alpha

 

0x814074 WORD up and down movement, set to 1 and the arrow stops moving

0x814076 WORD rotation speed

 

Marker arrow corona colors

0x699074 BYTE red

0x699075 BYTE green

0x699076 BYTE blue

 

0x7E4778 FLOAT corona size factor

 

Relating functions:

0x570BA0 C3dMarker::Render

(calls 0x570DA0 to render the arrow)

 

0x574790 CSpecialFX::Render

(calls C3dMarker::Render, CBulletTraces::Render (@0x5729F0) and some other functions)

 

0x4A6510 RenderEffects

(calls some render functions:

CSpecialFX::Render

CShadows::RenderStaticShadows (@0x56C690)

CShadows::RenderStoredShadows (@0x56CC40)

CRubbish::Render (@0x567F20)

CCoronas::Render (@0x543500)

CParticle::Render (@0x5608C0)

 

Vice city set's those values every time a marker is created, so it's currently no real solution. I'll look for a better way

why don't you just edit the \models\generic\arrow.dff?

 

cool stuff about all those function addresses being posted lately, really

good work, i wish i knew some MIPS assembler too blush.gif

 

Currently working on Top Down City Game, a classics top down game similar to GTA1 & GTA2: 

 

Thread Info: https://gtaforums.com/topic/911312-new-game-top-down-city/

Youtube channel: https://www.youtube.com/channel/UCxGfOh3ld7Xm-ic3KEMB6iA 

Discord: https://discord.gg/UXmDPzS - join #bridge channel 

Link to comment
Share on other sites

why don't you just edit the \models\generic\arrow.dff?

I'm sure if it would work this way, the LC mod would have done it, but AFAIK they didn't. VC sets up a material for the arrow, so modifying it might not work.

 

Permanent color change

 

Nop out these instructions:

0x570F2E 8845 58 MOV BYTE PTR SS:[EBP+58],AL

0x570F35 8845 59 MOV BYTE PTR SS:[EBP+59],AL

0x570F3C 8845 5A MOV BYTE PTR SS:[EBP+5A],AL

0x570F43 8845 5B MOV BYTE PTR SS:[EBP+5B],AL

0x570F4A 66:8945 5C MOV WORD PTR SS:[EBP+5C],AX

0x570F59 66:8945 5E MOV WORD PTR SS:[EBP+5E],AX

 

Change these adresses (game code):

Marker red: 0x570CD7 (byte)

Marker green: 0x570CDE (byte)

Marker blue: 0x570CE5 (byte)

Marker alpha: 0x570CEC (byte)

Marker up/down speed: 0x570CF4 (word)

Marker rotation speed: 0x570CFD (word)

 

 

Link to comment
Share on other sites

Great, Squiddy, thanks! It seems that the contents of al register are arguments 4, 5, 6, 7 to sub_570E90. And in turn, this procedure takes arguments 5, 6, 7, 8 from sub_570340. I think playing around with pushes starting at 0x5708CB will also produce the desired effect.

Link to comment
Share on other sites

i've been toying with the idea of adding bullet holes to the game, and most of it should be possible through the directx hook, but one major factor eludes me; the last ...."position"...that a bullet hit. it IS stored somewhere, bullets make sparks when they hit a surface, and where those sparks are created, i need to know. Suggestions or ideas anyone?

Lurking..

Link to comment
Share on other sites

Weapons related adresses are for 1.1, which probably means -8 for 1.0:

 

Weapon Info - 0x782A14. This is an array of 37 structures each of size 100. The game stores here the data read from weapon.dat. The fields of the structure are follow very closely the columns of weapon.dat.

 

Shot Info - 0x781710. Array of 100 structures each of size 44. Not sure how it is used by the game.

 

Explosion - 0x780C88. Array of 48 structures each of size 56. Each structure holds information about explosions.

 

Projectile Info - 0x7DB890. Array of 32 structures each of size 28. Holds information about projectiles (stuff like hunter missiles I assume). Position stored at offset 0x10 of each structure.

 

Bullet Info - 0x77FB58. Array of 100 structures each of size 44. Probably what ashdexx is looking for. The position is possibly stored at offset 0x10 of each structure.

Link to comment
Share on other sites

i've been toying with the idea of adding bullet holes to the game, and most of it should be possible through the directx hook, but one major factor eludes me; the last ...."position"...that a bullet hit. it IS stored somewhere, bullets make sparks when they hit a surface, and where those sparks are created, i need to know. Suggestions or ideas anyone?

wow.gifwow.gif LOL this would be pretty cool. We could finnialy have paintball guns (YES, i still have the modele i made)

Link to comment
Share on other sites

Ok, here is arrow color:

0x68F95C - red

0x68F95D - green

0x68F95E - blue

 

And here is sphere color (the sphere you walk in to start a mission):

0x68F958 - red

0x68F959 - green

0x68F95A - blue

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.