Quantcast

Jump to content

» «
Photo

Documenting GTA3/VC memory adresses

1,139 replies to this topic
Ben
  • Ben

    Retired

  • Members
  • Joined: 12 May 2005

#811

Posted 24 June 2006 - 02:23 AM

I've had a bit of a look through the topic, but I don't feel up to looking through 41 pages of posts at the moment. I've also tried searching, but the damn search engine won't let me search for "sfx" mad.gif.

Anyways, what I'd like to know is if anyone has come across any sort of table within the VC EXE which tells it which SFX sounds align with which particular SCM create_sound or play_sound numbers.

For example, 018D create_sound 0 at x y z plays sfx00470. Now I cheated and used one that was already known, but surely there must be something in the EXE which details this information.

If anyone has any information about this that might be helpful, I'd love to hear from you. Thanks in advance smile.gif.

AK-73
  • AK-73

    Hustler

  • Members
  • Joined: 31 Oct 2005

#812

Posted 30 June 2006 - 12:48 PM

(VC 1.0)

Contrary to popular belief wink.gif, weather seems to be scripted, not random.
There's an array of words, containing weather states:

0x699F64 weather table.

It is, I believe, 64 words long, 1 word per hour, for a total of 2 3/4 days. The entries are per the set_weather opcode (see opcode database).

Alex

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#813

Posted 04 July 2006 - 06:24 AM

vc 1.0

Amount of money you get for a "Good citizen bonus" (punching a criminal being chased by a cop)
byte - 0x489D79 - default $50

only changes amount of cash player receives, not the text. text is a simple gxt string (american.gxt: main / goodboy).

AK-73
  • AK-73

    Hustler

  • Members
  • Joined: 31 Oct 2005

#814

Posted 04 July 2006 - 01:52 PM Edited by AK-73, 07 July 2006 - 02:20 PM.

Cool.

You're gonnna love these...

VC 1.0, as usual

0x5B3DA6 instruction that loads the alpha for the sun glare effect on cars, the instruction goes: D905 7CFDA000 (FLD DOWRD PTR DS:[A0FD7C]).
Replace these bytes with D9EE 90909090 (FLDZ NOP NOP NOP NOP) to eliminate the effect.

Explanation: the alpha of the sun glare FX resides at 0xA0FD7C, it gets calculated at multiple places in the weather control proc, therefore it's easier to change the single instruction that loads the final value for rendering.



0x5B94E5 To make ped drivers panick like in GTA3, change from 03 to 02

Explanation: at +0x156 into an entry in the actor list reside the driver behaviour flags as per the opcode 00AF; at 0x155 however are the obstacle flags: 0 - stop before obstacle (possibly drive past after some time has passed), 1 - drive-thru (as per normal gun panic), 2 - drive past (as in GTA3 gun panic). I think the flag 4 exists too but I'm not sure, didn't get to check it out in detail. Seems to be no different from 0 though.

Alex

AK-73
  • AK-73

    Hustler

  • Members
  • Joined: 31 Oct 2005

#815

Posted 07 July 2006 - 02:33 PM

VC 1.0

694E08 - Walking (vs. Chatting) Gangers spawn likelihood, float, default value: 0.333 (for 33.3333%)
So if you don't like Gangers chatting in a circle, set float to 1.0f.


Related is the Gangers formation walk, where they follow a leader. If you want to eliminate that too without resorting to spawning only chatting Gangers, you have to change both the following values:

53A3B0 - Change byte from 01 to 7F (vice compares # of to-be-spawned gangers with this number and if this number <= #gangers, then it proceeds with spawning gangers after the first ganger, the formation head; making it big enough thus prevents additional spawning in any case)
53A5F8 - Change byte from 03 to 00 (compares afterwards # of actually spawned gangers to this and if lower, it destoys the gangers or something like that)




AK-73
  • AK-73

    Hustler

  • Members
  • Joined: 31 Oct 2005

#816

Posted 19 July 2006 - 02:44 PM

Okay, this one is quite spectacular, especially at night along ocean drive:

(VC 1.0 still)

Activating 2dfx lights rain reflections:

4A657F - change the order of the two proc calls at that location. Instead of:
E8 6CCA0900 [call 0x542FF0]
E8 B7390200 [call 0x4C9F40]
make it:
E8 BC390200 [call 0x4C9F40]
E8 67CA0900 [call 0x542FF0].

I wanted to have this in Vice for quite some time but didn't know how until I recently drove across a transparent surface and noticed that the light reflections were already in-game. smile.gif Still took me quite some time to figure out how to get them actually rendered. The actual solution was much simpler than I thought. smile.gif

There's a slight problem with that however when you look backwards and then switch to another view, the front lights don't fade away quickly enough. If anyone would like to fix that, please post your findings. smile.gif

Another weather address is:
69A004 - This effects the spawn frequency of the rain particles or something like that. It's a float, default value is 0.5.

Alex


AK-73
  • AK-73

    Hustler

  • Members
  • Joined: 31 Oct 2005

#817

Posted 27 July 2006 - 06:07 PM

(VC 1.0)

Spawning and destruction ranges of vehicles:

Vehicle off-screen destruction:
0x687138 - destruct range for, I believe, off-screen vehicles, float, default 40.0f

Strangely enough, increasing this value seems to effect ped driver behaviour, as if the drive-thru flag had been set. To prevent this, there's an instruction at 0x425943 that needs to be changed which loads 0x687138 into the FPU. Change it to load 40.0f from a different memory location (I use provisionally 0x6876BC)


Vehicle spawning ranges:
vehicles only get spawned on a vehicle node if it is not further than a certain range from the player. This range is a sum of the above float 0x687138 and:

0x687D18 - vehicle spawn range summand, float, default is 70.0f for a total of 110.0f. If you let the sum become much greater than 110.0f, it will make traffic less dense (but you can try to assign negative values to this global). As soon as we find a way to increase vehicles and peds in-game this address might become even more valuable.


And finally back to destruction:
0x6871F8 - onscreen vehicle destruction range, float, 120.0f. This is the threshold where you see the vehicles fade away in the distance, never to come back.

Alex




AK-73
  • AK-73

    Hustler

  • Members
  • Joined: 31 Oct 2005

#818

Posted 27 July 2006 - 06:08 PM

(VC 1.0)

Spawning and destruction ranges of vehicles:

Vehicle off-screen destruction:
0x687138 - destruct range for, I believe, off-screen vehicles, float, default 40.0f

Strangely enough, increasing this value seems to effect ped driver behaviour, as if the drive-thru flag had been set. To prevent this, there's an instruction at 0x425943 that needs to be changed which loads 0x687138 into the FPU. Change it to load 40.0f from a different memory location (I use provisionally 0x6876BC)


Vehicle spawning ranges:
vehicles only get spawned on a vehicle node if it is not further than a certain range from the player. This range is a sum of the above float 0x687138 and:

0x687D18 - vehicle spawn range summand, float, default is 70.0f for a total of 110.0f. If you let the sum become much greater than 110.0f, it will make traffic less dense (but you can try to assign negative values to this global). As soon as we find a way to increase vehicles and peds in-game this address might become even more valuable.


And finally back to destruction:
0x6871F8 - onscreen vehicle destruction range, float, 120.0f. This is the threshold where you see the vehicles fade away in the distance, never to come back.

Alex




AK-73
  • AK-73

    Hustler

  • Members
  • Joined: 31 Oct 2005

#819

Posted 28 July 2006 - 02:17 PM Edited by AK-73, 28 July 2006 - 02:53 PM.

Perhaps you won't believe it but I think I got it. I stumbled across this one almost by accident yesterday evening after like 15 mins of searching: smile.gif

(VC 1.0)

0x686FCC - Spawned vehicle limiter, dword, default value 7. I have tried it together with the above spawning and destruction ranges and it works wonders.

Now increasing the limit allows for greater traffic, traffic jams, etc. However you might want to have normal traffic in other areas. To that end, there's two means: opcode 0152's density parameter and the last parameter of internal node lines in paths.ipl. The first is I believe an int that serves as second limiter to spawned vehicles (it's not just for gang vehicles but for all vehicles in the zone, that is it includes the vehicles influenced by the 04EC opcode) similar to the above address while the latter is used to make specific nodes spawn less vehicles. The last entry in a paths.ipl line is actually optional but if included it's supposed to be a float between 0.0 and 1.0. It gets internally converted to a byte value from 00 (no spawn) to 0F (always spawn when asked), just so you know that it's not a completely accurate *percentage* that you get. Don't know if this is already known, if not a moderator may want to update the path documentaion as well.

Alex

PS An addition: it seems as I have been wrong and rain light reflections have been in the game already. I didn't notice because I think it takes 3 consecutive rain entries in the weather table so that the middle hour gets rain reflections and that happens only once for 1 hour every 64 hours. So there might be a better fix than the one suggested: I'll see if I can make the reflection appear everytime it rains.

ModelingMan
  • ModelingMan

    Crackalacking!

  • Members
  • Joined: 23 Jan 2004

#820

Posted 28 July 2006 - 04:00 PM Edited by ModelingMan, 28 July 2006 - 04:06 PM.

Good work with all those offsets Alex. icon14.gif

Here's a few offsets (v1.0) which change the surface colour overlay:
0x006DDE08: Red
0x006DDE0C: Green
0x006DDE10: Blue

All are 4 byte real values which range from 0.0 to 1.0. As you'll see in these screenshots I was able to increase the value of blue to take that warm colour away from GTA:LC and make it look more like GTAIII:
user posted imageuser posted image

And here's the equivilent in GTAIII (v1.0):
0x00619458: Red
0x0061945C: Green
0x00619460: Blue

AK-73
  • AK-73

    Hustler

  • Members
  • Joined: 31 Oct 2005

#821

Posted 31 July 2006 - 05:34 PM

Okay, first of the new findings (VC 1.0):

After dealing with vehicles, it's now on to peds, it's a bit more complicated though:

Despawning of peds is dependent on three ranges:
0x694EBC seems to be outer limit, 65.0f
0x694EB0 another limit at 51.0f, I believe this is for peds that don't have bit3(#4) of the +153 byte in the actor block set, whatever that means
0x694EB4 and another range value 25.0f. I'm not sure for what kinds of peds which ranges are exactly for, perhaps this one is for off-screen peds, I don't know. (Please take note that this particular value also gets used in the spawning of peds, see below.)

(Gang models, btw, have their range reduced by 30.0f for those above tests.)
Just increase all ranges by say a 100.0 and it will work. The draw distance of peds remains limited but just because they seem to vanish it doesn't mean they get destructed, when you get closer again, it will be the same peds that get rendered again.

Spawning of peds:
There are two rings if you will in which peds get spawned, the outer is I believe for peds that get spawned in sight, appearing on-screen, the other is for peds getting spawned behind you, next to you and it's of closer range:
0x694EB4 The above value is the upper range for the inner, off-screen ring.
0x694ECC inner ring size, 10,0f by default. The lower value of the inner ring is thus upper inner ring range - inner ring size, that is: inner ring, lower = 25.0f -10.0f = 15.0f
0x694E78 outer ring upper limit, float (40f, I think, is default)
0x694DDC outer ring lower limit, float (50f)

Note: there are some multipliers applied to the *basic ranges* located at these addresses, which I don't understand as of yet, so the actual ring size/position fluctuates just a bit in the game but not too much.

Also:
0xA1069C currently maintained peds count, dword
0x694DC8 ped limit in the exterior, dword, default 0xF
0x694DCC ped limit in interiors, dowrd, default is something like 0x18 or 0x14, don't remember



QUOTE (ModelingMan @ Jul 28 2006, 16:00)
Good work with all those offsets Alex. icon14.gif

Here's a few offsets (v1.0) which change the surface colour overlay:
0x006DDE08: Red
0x006DDE0C: Green
0x006DDE10: Blue

All are 4 byte real values which range from 0.0 to 1.0. As you'll see in these screenshots I was able to increase the value of blue to take that warm colour away from GTA:LC and make it look more like GTAIII:


And here's the equivilent in GTAIII (v1.0):
0x00619458: Red
0x0061945C: Green
0x00619460: Blue


I think I've achieved a similar effect by manipulating a blue value in timecyc.dat. I didn't like the result because white wasn't true white anymore but had a bluish tint. I was hoping to eliminate that one and I guess that changing the overlay doesn't do that? (Not clear from the picture.)

Alex

PS How can I execute GTA3 in windowed mode? 3danalyze doesn't seem to work for me, is there something like the speedometer for GTA3?

evrcmasta
  • evrcmasta

    Player Hater

  • Members
  • Joined: 19 Apr 2006

#822

Posted 11 August 2006 - 08:08 AM

QUOTE (JernejL @ Jul 20 2004, 21:38)

code adress $004A72C0 - something awful

man i changed it! do you know how to fix it i alredy reinstalled my game and everything,

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#823

Posted 11 August 2006 - 09:23 PM

QUOTE (evrcmasta @ Aug 11 2006, 03:08)
QUOTE (JernejL @ Jul 20 2004, 21:38)

code adress $004A72C0 - something awful

man i changed it! do you know how to fix it i alredy reinstalled my game and everything,

what did it do exactly? im hesitant to risk reinstalling my VC to find out tounge.gif

.cuBe
  • .cuBe

    Bell-end

  • BUSTED!
  • Joined: 26 Jul 2006

#824

Posted 12 August 2006 - 04:31 AM

QUOTE (DexX @ Aug 11 2006, 21:23)
QUOTE (evrcmasta @ Aug 11 2006, 03:08)
QUOTE (JernejL @ Jul 20 2004, 21:38)

code adress $004A72C0 - something awful

man i changed it! do you know how to fix it i alredy reinstalled my game and everything,

what did it do exactly? im hesitant to risk reinstalling my VC to find out tounge.gif

Changing the value of 0x4A72C0 will obviously result in a crash due to the execution of flawed code; it's the start of a function which is called (at least) once per frame. There is no evidence of the function 'saving' changes made it, so a proper restart of the game should fix whatever issues you're having from the modification of it.

@evrcmasta: at what address is your game crashing at?

evrcmasta
  • evrcmasta

    Player Hater

  • Members
  • Joined: 19 Apr 2006

#825

Posted 19 August 2006 - 11:25 AM

thx for trying to fix my problems i found out whats waws wrong; it it saves corupted data to your save game then crashes so whenever you try to staret up the game it will crash couse of the courupted data. it would be a sick anticheat punishment!

JernejL
  • JernejL

    Big Homie

  • Members
  • Joined: 11 Mar 2002

#826

Posted 23 August 2006 - 11:07 AM

QUOTE (evrcmasta @ Aug 11 2006, 09:08)
QUOTE (JernejL @ Jul 20 2004, 21:38)

code adress $004A72C0 - something awful

man i changed it! do you know how to fix it i alredy reinstalled my game and everything,

Are you joking? i never posted that!

Craig Kostelecky
  • Craig Kostelecky

    GTA:LC Team Leader

  • The Connection
  • Joined: 28 Jan 2004

#827

Posted 05 September 2006 - 01:32 AM

Actually, you did. It was just over two years ago (in this post).

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#828

Posted 06 September 2006 - 04:59 PM

All kinds of direct 3d stuff!

Setting Renderstates:
4C1AC8 push 8
4C1ACA push 19h
4C1ACC call _RwD3D9SetRenderState ; D3DRS_ALPHAFUNC = 25

4C1D45 push 5
4C1D47 push 19h
4C1D49 call _RwD3D9SetRenderState ; D3DRS_ALPHAFUNC = 25

55D9C4 push 1
55D9C6 push 34h
55D9C8 call _RwD3D9SetRenderState ; D3DRS_STENCILENABLE = 52

55DD44 push 8
55DD46 push 38h
55DD48 call _RwD3D9SetRenderState ; D3DRS_STENCILFUNC = 56

55DD4F push 1
55DD51 push 39h
55DD53 call _RwD3D9SetRenderState ; D3DRS_STENCILREF = 57

55DD5A push 0FFFFFFFFh
55DD5C push 3Ah
55DD5E call _RwD3D9SetRenderState ; D3DRS_STENCILMASK = 58.

55DD65 push 0FFFFFFFFh
55DD67 push 3Bh
55DD69 call _RwD3D9SetRenderState ; D3DRS_STENCILWRITEMASK = 59

55DD70 push 1
55DD72 push 36h
55DD74 call _RwD3D9SetRenderState ; D3DRS_STENCILZFAIL = 54

55DD7B push 1
55DD7D push 35h
55DD7F call _RwD3D9SetRenderState ; D3DRS_STENCILFAIL = 53

55DD86 push 3
55DD88 push 37h
55DD8A call _RwD3D9SetRenderState ; D3DRS_STENCILPASS = 55

55DDDC push 3
55DDDE push 38h
55DDE0 call _RwD3D9SetRenderState ; D3DRS_STENCILFUNC = 56

55DDE7 push 1
55DDE9 push 37h
55DDEB call _RwD3D9SetRenderState ; D3DRS_STENCILPASS = 55

55E03B push 8
55E03D push 38h
55E03F call _RwD3D9SetRenderState ; D3DRS_STENCILFUNC = 56

55E046 push 1
55E048 push 39h
55E04A call _RwD3D9SetRenderState ; D3DRS_STENCILREF = 57

55E051 push 0FFFFFFFFh
55E053 push 3Ah
55E055 call _RwD3D9SetRenderState ; D3DRS_STENCILMASK = 58

55E05C push 0FFFFFFFFh
55E05E push 3Bh
55E060 call _RwD3D9SetRenderState ; D3DRS_STENCILWRITEMASK = 59

55E067 push 1
55E069 push 36h
55E06B call _RwD3D9SetRenderState ; D3DRS_STENCILZFAIL = 54

55E072 push 1
55E074 push 35h
55E076 call _RwD3D9SetRenderState ; D3DRS_STENCILFAIL = 53

55E07D push 3
55E07F push 37h
55E081 call _RwD3D9SetRenderState ; D3DRS_STENCILPASS = 55

55E1CA push 3
55E1CC push 38h
55E1CE call _RwD3D9SetRenderState ; D3DRS_STENCILFUNC = 56

55E1D5 push 1
55E1D7 push 37h
55E1D9 call _RwD3D9SetRenderState ; D3DRS_STENCILPASS = 55

55E22B push 0
55E22D push 34h
55E22F call _RwD3D9SetRenderState ; D3DRS_STENCILENABLE = 52

57FA7A push 5
57FA7C push 19h
57FA7E call _RwD3D9SetRenderState ; D3DRS_ALPHAFUNC = 25

57FA85 push 2
57FA87 push 18h
57FA89 call _RwD3D9SetRenderState ; D3DRS_ALPHAREF = 24

63E62E push 0
63E630 push 7
63E632 call _RwD3D9SetRenderState ; D3DRS_ZENABLE = 7

63E639 push 1
63E63B push 16h
63E63D call _RwD3D9SetRenderState ; D3DRS_CULLMODE = 22

63E65C push eax
63E65D push 7
63E65F call _RwD3D9SetRenderState ; D3DRS_ZENABLE = 7

63E66D push eax
63E66E push 16h
63E670 call _RwD3D9SetRenderState ; D3DRS_CULLMODE = 22

658733 push 5
658735 push 13h
658737 call _RwD3D9SetRenderState ; D3DRS_SRCBLEND = 19

65873C push 6
65873E push 14h
658740 call _RwD3D9SetRenderState ; D3DRS_DESTBLEND = 20

658745 push 5
658747 push 19h
658749 mov ds:dword_788000, 5
658753 mov ds:dword_788004, 6
65875D call _RwD3D9SetRenderState ; D3DRS_ALPHAFUNC = 25

658764 push esi
658765 push 18h
658767 call _RwD3D9SetRenderState ; D3DRS_ALPHAREF = 24

65876C push esi
65876D push 1Bh
65876F call _RwD3D9SetRenderState ; D3DRS_ALPHABLENDENABLE = 27

658774 push esi
658775 push 0Fh
658777 call _RwD3D9SetRenderState ; D3DRS_ALPHATESTENABLE = 15

65877C push esi
65877D push 89h
658782 mov ds:dword_787F20, esi
658788 mov ds:dword_787F24, esi
65878E call _RwD3D9SetRenderState ; D3DRS_LIGHTING = 137

658793 push 2
658795 push 16h
658797 call _RwD3D9SetRenderState ; D3DRS_CULLMODE = 22

6587CD push esi
6587CE push 91h
6587D3 call _RwD3D9SetRenderState ; D3DRS_DIFFUSEMATERIALSOURCE = 145

6587D8 push esi
6587D9 push 92h
6587DE call _RwD3D9SetRenderState ; D3DRS_SPECULARMATERIALSOURCE = 146

6587E6 push esi
6587E7 push 93h
6587EC call _RwD3D9SetRenderState ; D3DRS_AMBIENTMATERIALSOURCE = 147

6587F9 push edx
6587FA push 1Ah
6587FC call _RwD3D9SetRenderState ; D3DRS_DITHERENABLE = 26

658801 push esi
658802 push 1Dh
658804 call _RwD3D9SetRenderState ; D3DRS_SPECULARENABLE = 29

658809 push esi
65880A push 8Eh
65880F call _RwD3D9SetRenderState ; D3DRS_LOCALVIEWER = 142

658814 push 0FFFFFFFFh
658816 push 8Bh
65881B call _RwD3D9SetRenderState ; D3DRS_AMBIENT = 139

658820 push esi
658821 push 8Fh
658826 call _RwD3D9SetRenderState ; D3DRS_NORMALIZENORMALS = 143

658C8D push eax
658C8E push 38h
658C90 call _RwD3D9SetRenderState ; D3DRS_STENCILFUNC = 56

658C9B push ecx
658C9C push 39h
658C9E call _RwD3D9SetRenderState ; D3DRS_STENCILREF = 57

658CA9 push edx
658CAA push 3Ah
658CAC call _RwD3D9SetRenderState ; D3DRS_STENCILMASK = 58

658CB6 push eax
658CB7 push 3Bh
658CB9 call _RwD3D9SetRenderState ; D3DRS_STENCILWRITEMASK = 59

658DDC push edx
658DDD push 13h
658DDF call _RwD3D9SetRenderState ; D3DRS_SRCBLEND = 19

658DF0 push ecx
658DF1 push 14h
658DF3 call _RwD3D9SetRenderState ; D3DRS_DESTBLEND = 20

658DF8 push 5
658DFA push 19h
658DFC call _RwD3D9SetRenderState ; D3DRS_ALPHAFUNC = 25

658E01 push 0
658E03 push 18h
658E05 call _RwD3D9SetRenderState ; D3DRS_ALPHAREF = 24

658E17 push ebx
658E18 push 1Bh
658E1A call _RwD3D9SetRenderState ; D3DRS_ALPHABLENDENABLE = 27

658E22 push 0
658E24 push 1Bh
658E26 call _RwD3D9SetRenderState ; D3DRS_ALPHABLENDENABLE = 27

658E2B push 0
658E2D push 0Fh
658E2F call _RwD3D9SetRenderState ; D3DRS_ALPHATESTENABLE = 15

658E41 push 0
658E43 push 89h
658E48 call _RwD3D9SetRenderState ; D3DRS_LIGHTING = 137

658E5A push eax
658E5B push 16h
658E5D call _RwD3D9SetRenderState ; D3DRS_CULLMODE = 22

658E9B push 0
658E9D push 91h
658EA2 call _RwD3D9SetRenderState ; D3DRS_DIFFUSEMATERIALSOURCE = 145

658EA7 push 0
658EA9 push 92h
658EAE call _RwD3D9SetRenderState ; D3DRS_SPECULARMATERIALSOURCE = 146

658EB3 push 0
658EB5 push 93h
658EBA call _RwD3D9SetRenderState ; D3DRS_AMBIENTMATERIALSOURCE = 147

658EC7 push ecx
658EC8 push 1Ah
658ECA call _RwD3D9SetRenderState ; D3DRS_DITHERENABLE = 26

658ECF push 0
658ED1 push 1Dh
658ED3 call _RwD3D9SetRenderState ; D3DRS_SPECULARENABLE = 29

658ED8 push 0
658EDA push 8Eh
658EDF call _RwD3D9SetRenderState ; D3DRS_LOCALVIEWER = 142

658EE4 push 0FFFFFFFFh
658EE6 push 8Bh
658EEB call _RwD3D9SetRenderState ; D3DRS_AMBIENT = 139

658EF0 push 0
658EF2 push 8Fh
658EF7 call _RwD3D9SetRenderState ; D3DRS_NORMALIZENORMALS = 143

66C0C6 push 0
66C0C8 push 8Fh
66C0CD call _RwD3D9SetRenderState ; D3DRS_NORMALIZENORMALS = 143

6743DB push 0
6743DD push 91h
6743E2 call _RwD3D9SetRenderState ; D3DRS_DIFFUSEMATERIALSOURCE = 145

674490 push 0
674492 push 91h
674497 call _RwD3D9SetRenderState ; D3DRS_DIFFUSEMATERIALSOURCE = 145

674592 push 0
674594 push 91h
674599 call _RwD3D9SetRenderState ; D3DRS_DIFFUSEMATERIALSOURCE = 145

67482F push 0FFFFFFFFh
674831 push 3Ch
674833 call _RwD3D9SetRenderState ; D3DRS_TEXTUREFACTOR = 60

674D16 push 0
674D18 push 0Fh
674D1A call _RwD3D9SetRenderState ; D3DRS_ALPHATESTENABLE = 15

674D50 push eax
674D51 push 0Eh
674D53 call _RwD3D9GetRenderState ; D3DRS_ZWRITEENABLE = 14

674D58 push 0
674D5A push 0Eh
674D5C call _RwD3D9SetRenderState ; D3DRS_ZWRITEENABLE = 14

674D65 push ecx
674D66 push 1Ch
674D68 call _RwD3D9GetRenderState ; D3DRS_FOGENABLE = 28

674D7C push edx
674D7D push 22h
674D7F call _RwD3D9GetRenderState ; D3DRS_FOGCOLOR = 34

674D9D push 0FFFFFFFFh
674D9F push 22h
674DA1 call _RwD3D9SetRenderState ; D3DRS_FOGCOLOR = 34

674F7B push 0
674F7D push 91h
674F82 call _RwD3D9SetRenderState ; D3DRS_DIFFUSEMATERIALSOURCE = 145

67513F push edi
675140 push 3Ch
675142 call _RwD3D9SetRenderState ; D3DRS_TEXTUREFACTOR = 60

67535F push edx
675360 push 3Ch
675362 call _RwD3D9SetRenderState ; D3DRS_TEXTUREFACTOR = 60

6754A2 push 0
6754A4 push 89h
6754A9 call _RwD3D9SetRenderState ; D3DRS_LIGHTING = 137

6754AE push 0
6754B0 push 0Eh
6754B2 call _RwD3D9SetRenderState ; D3DRS_ZWRITEENABLE = 14

6754C6 push edx
6754C7 push 22h
6754C9 call _RwD3D9GetRenderState ; D3DRS_FOGCOLOR = 34

6754CE push 0
6754D0 push 22h
6754D2 call _RwD3D9SetRenderState ; D3DRS_FOGCOLOR = 34

675527 push ecx
675528 push 0Eh
67552A call _RwD3D9SetRenderState ; D3DRS_ZWRITEENABLE = 14

675533 push edx
675534 push 89h
675539 call _RwD3D9SetRenderState ; D3DRS_LIGHTING = 137

6757BD push 0
6757BF push 1Bh
6757C1 call _RwD3D9SetRenderState ; D3DRS_ALPHABLENDENABLE = 27

6757C6 push 0
6757C8 push 0Fh
6757CA call _RwD3D9SetRenderState ; D3DRS_ALPHATESTENABLE = 15

675955 push ecx
675956 push 1Bh
675958 call _RwD3D9SetRenderState ; D3DRS_ALPHABLENDENABLE = 27

675961 push edx
675962 push 0Fh
675964 call _RwD3D9SetRenderState ; D3DRS_ALPHATESTENABLE = 15

675997 push 0
675999 push 0Fh
67599B call _RwD3D9SetRenderState ; D3DRS_ALPHATESTENABLE = 15

6759FC push 1
6759FE push 0Fh
675A00 call _RwD3D9SetRenderState ; D3DRS_ALPHATESTENABLE = 15

675A1F push 0
675A21 push 0Eh
675A23 call _RwD3D9SetRenderState ; D3DRS_ZWRITEENABLE = 14

675A78 push eax
675A79 push 0Eh
675A7B call _RwD3D9SetRenderState ; D3DRS_ZWRITEENABLE = 14

67646E push 1
676470 push 8Dh
676475 call _RwD3D9SetRenderState ; D3DRS_COLORVERTEX = 141

67647E push 0
676480 push 8Dh
676485 call _RwD3D9SetRenderState ; D3DRS_COLORVERTEX = 141

67648A push 0
67648C push 94h
676491 call _RwD3D9SetRenderState ; D3DRS_EMISSIVEMATERIALSOURCE = 148

6764E1 push 1
6764E3 push 88h
6764E8 call _RwD3D9SetRenderState ; D3DRS_CLIPPING = 136

67651C push 0FF000000h
676521 push 3Ch
676523 call _RwD3D9SetRenderState ; D3DRS_TEXTUREFACTOR = 60

6773F3 push 0
6773F5 push 89h
6773FA call _RwD3D9SetRenderState ; D3DRS_LIGHTING = 137

6773FF push 0
677401 push 8Fh
677406 call _RwD3D9SetRenderState ; D3DRS_NORMALIZENORMALS = 143

677418 push 1
67741A push 88h
67741F call _RwD3D9SetRenderState ; D3DRS_CLIPPING = 136

678B5D push 1 ; affects building vertex colors, see below
678B5F push 8Dh
678B64 call _RwD3D9SetRenderState ; D3DRS_COLORVERTEX = 141 (buildings)

678B69 push 1
678B6B push 94h
678B70 call _RwD3D9SetRenderState ; D3DRS_EMISSIVEMATERIALSOURCE = 148

678B7A push 0
678B7C push 8Dh
678B81 call _RwD3D9SetRenderState ; D3DRS_COLORVERTEX = 141

678B86 push 0
678B88 push 94h
678B8D call _RwD3D9SetRenderState ; D3DRS_EMISSIVEMATERIALSOURCE = 148

678BBB push 0FF000000h
678BC0 push 3Ch
678BC2 call _RwD3D9SetRenderState ; D3DRS_TEXTUREFACTOR = 60

678BC7 push 0
678BC9 push 1Ah
678BCB call _RwD3D9SetRenderState ; D3DRS_DITHERENABLE = 26

678BD0 push 1
678BD2 push 9
678BD4 call _RwD3D9SetRenderState ; D3DRS_SHADEMODE = 9

678C27 push 1
678C29 push 88h
678C2E call _RwD3D9SetRenderState ; D3DRS_CLIPPING = 136

678D27 push 0
678D29 push 91h
678D2E call _RwD3D9SetRenderState ; D3DRS_DIFFUSEMATERIALSOURCE = 145

678DC2 push eax
678DC3 push 1Ah
678DC5 call _RwD3D9SetRenderState ; D3DRS_DITHERENABLE = 26

678DCE push ecx
678DCF push 9
678DD1 call _RwD3D9SetRenderState ; D3DRS_SHADEMODE = 9

679D1A push 0FFFFFFFFh
679D1C push 8Bh
679D21 call _RwD3D9SetRenderState ; D3DRS_AMBIENT = 139

679D2F push 0
679D31 push 8Bh
679D36 call _RwD3D9SetRenderState ; D3DRS_AMBIENT = 139

67A0A2 mov [esp+arg_4], 1
67A0AA mov [esp+arg_0], 89h
67A0B2 jmp _RwD3D9SetRenderState ; D3DRS_LIGHTING = 13

67A0B7 mov [esp+arg_4], 0
67A0BF mov [esp+arg_0], 89h
67A0C7 jmp _RwD3D9SetRenderState ; D3DRS_LIGHTING = 137

67B266 push 0
67B268 push 8Fh
67B26D call _RwD3D9SetRenderState ; D3DRS_NORMALIZENORMALS = 143

67BA72 push 0
67BA74 push 8Fh
67BA79 call _RwD3D9SetRenderState ; D3DRS_NORMALIZENORMALS = 143

How to read renderstate data:
The first push, is the value for the renderstate, and the second push, is the renderstate to set.

So, for the following lines;
678B5D push 1
678B5F push 8Dh
678B64 call _RwD3D9SetRenderState ; D3DRS_COLORVERTEX = 141 (buildings)

The renderstate is set to 8Dh, or 141. Renderstate types are enumerated, and we can use this doc
MSDN Doc on RenderStates
to find out that renderstate 141 is D3DRS_COLORVERTEX. Its boolean, so 0 for false, and 1 for true. the code is setting it to true. if we change the value to 0, D3DRS_COLORVERTEX will be false, and we'll disable vertex colors ingame. Simple.

Functions:
6582A0 _RwD3D9SetRenderState
6582F0 _RwD3D9GetRenderState
6592D0 __rwD3D9RenderStateSrcBlend
659320 __rwD3D9RenderStateDestBlend
659840 __rwD3D9RWGetRasterStage
679B60 __rwD3D9LightsGlobalEnable
679D50 __rwD3D9LightLocalEnable
659F70 __rwD3D9RenderStateStencilEnable
659FC0 __rwD3D9RenderStateStencilFail
65A0B0 __rwD3D9RenderStateStencilFunction
65A150 __rwD3D9RenderStateStencilFunctionMask
65A100 __rwD3D9RenderStateStencilFunctionRef
65A1A0 __rwD3D9RenderStateStencilFunctionWriteMask
65A010 __rwD3D9RenderStateStencilZFail
65A060 __rwD3D9RenderStateStencilPass
65A720 _rwD3D9RenderStateZWriteEnable
65A820 _rwD3D9RenderStateZTestEnable
65A920 _rwD3D9RenderStateShadeMode
65A9D0 _rwD3D9RenderStateCullMode
679FC0 __rwD3D9LightsEnable
660660 _RpLightSetRadius
660680 _RpLightSetColor
6606D0 _RpLightGetConeAngle

Other misc stuff:
675367 push 19h ; D3DTEXTUREOP
675371 push 1A
675379 push 2 ; controls blending of refmap on vehicles
67537B push 2 ; controls blending of refmap on vehicles
675383 push 3 ; controls blending of refmap on vehicles
675385 push 3 ; controls blending of refmap on vehicles
^all of the above the above are blending paramters for the reflection maps on vehicles. Seems to only affects materials that are set to use the primary body color

675394 push 7 ; this section, reflections for chrome
67539D push 2
67539F push 2
6753A8 push 3
^similar to the body reflections, but this one seems to affect other materials, most notably the chrome on vehicle bumpers

675114 push 5 ; vehicle vertex alpha sourceblend
67511B push 2 ; vehicle vertex alpha destblend

Directx Light, Structure
78A710 - int, light type. 3 is directional
78A714 - float3, direction
78A720 - float4, ambient color, ARGB
78A730 - float4, diffuse color, ARGB
78A740 - float4, specular color, ARGB
by default all colors are set to black, but the light IS used; set the diffuse color to 1.0,1.0,0.0,0.0 for a fully red light, illuminating all objects with normals. it might be possible, though untested, to use this light in the current "xbox" mod for vice city, as this light can be manipulated ingame for direction and color, unlike the existing method which is static.

Other:
6DDD30 db 2 ; alpha for sprites
6DDD3C db 5 ; obj alpha source
6DDD40 db 6 ; obj alpha des
6DDD74 db 2 ; texture filtering mode (everything)
6DDDA4 db 2 ; vehicle refmap texture filter

AK-73
  • AK-73

    Hustler

  • Members
  • Joined: 31 Oct 2005

#829

Posted 06 September 2006 - 05:50 PM

That's plenty of stuff to look through, dexx.

There's another graphics issue I have though:
In first person mode (*at least* in fps mode), the engine seems to not render faces that are too close to the camera. This is especially a problem if enemies get close enough for a fistfite. smile.gif
If anyone ever happens to find out how to change that (or the range of that), feel free to post your findings. :-)

Alex

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#830

Posted 09 September 2006 - 04:25 PM

Good news: I fixed the alpha issue in vice!
Bad news: it affects everything with an alpha channel!

0057FA7A push 5 ;D3DCMP_GREATER = 5
0057FA7C push 19h
0057FA7E call _RwD3D9SetRenderState ; D3DRS_ALPHAFUNC = 25 (map objects)
^sets up the alpha func..

0057FA85 push 2 ;ALPHAREF
0057FA87 push 18h
0057FA89 call _RwD3D9SetRenderState ; D3DRS_ALPHAREF = 24 (map objects)
^when blending, it compares it to the value @ 57fa85. the default value of 2, produces this result..
user posted image

with higher values (F0 seen here) producing smoother blending...
user posted image

There are are no other areas i can find that control alpha the way this does (well one for the menu, but i dont have it handy), but i figured id post it anyway, as this might be the closest its come to getting fixed. 80-A0 seem to work fairly well, while retaining some of the alpha. the main problem, is with the clouds which get pretty much erased, along with shadows from peds/vehicles/dynamic objects.

Cowpat
  • Cowpat

    web schmeb

  • Members
  • Joined: 12 Feb 2004

#831

Posted 11 September 2006 - 09:44 AM

QUOTE (DexX @ Sep 9 2006, 16:25)
Good news: I fixed the alpha issue in vice!
Bad news: it affects everything with an alpha channel!

Ha ha, that's amazing. You appear to have fixed one of the "features" of Vice. The alpha blending in Vice has always bugged me. I 'll bet the developers were well aware of the problems but just made the best of what they had. Well done!

Asm_Dasm
  • Asm_Dasm

    Player Hater

  • Members
  • Joined: 04 Oct 2006

#832

Posted 04 October 2006 - 11:24 PM

on put gtamodding I have found the list of the names function gta_vc.exe, but their there much little. If beside someone there is more full information of the names function, write please

xanser
  • xanser

    Player Hater

  • Members
  • Joined: 12 Sep 2006
  • None

#833

Posted 16 October 2006 - 06:19 AM Edited by xanser, 16 October 2006 - 06:21 AM.

To DexX:
Do you find any values from your list of functions which make better the graphic of gta like "xbox" besides your alpha of trees. Maybe you have some list of values...

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#834

Posted 16 October 2006 - 08:08 AM

QUOTE (xanser @ Oct 16 2006, 01:19)
To DexX:
Do you find any values from your list of functions which make better the graphic of gta like "xbox" besides your alpha of trees. Maybe you have some list of values...

...that i'm intentionally hiding? no. They substantially changed and added to the rendering code on the xbox version, code that simply does not exist on the pc version of the game. there are no "hidden values" or lists of data to make it look like the xbox version. its just not that simple. On the trees, i'm just changing a variable that is already there.

xanser
  • xanser

    Player Hater

  • Members
  • Joined: 12 Sep 2006
  • None

#835

Posted 16 November 2006 - 01:50 PM Edited by xanser, 06 December 2013 - 01:54 AM.

Pointer to police chopper 0x813D10. Enable second chopper 0xA10ADB.
choppersan7.th.jpg

 

I also found distance of visibility:

690220 - visibility in settings of screen, max default is 1.8.
69022C - appearance of LODs, max default is 300.0.


Teargas
  • Teargas

    Player Hater

  • Members
  • Joined: 10 Apr 2006

#836

Posted 03 December 2006 - 11:31 AM

Since you guys are finding all this cool stuff, why not finally solve the mystery of teargas removed code in gta_vc.exe

I've used a teargas mod for the PC called "super socialists tear gas mod" that replaces ur main.scm with one that enables the "teargas" pickup behind in the police station.

However, the problem is that even though the smoke does cause your game to run slow, the gas doesnt decrease your health and armor like its supposed to, so its only for looks, its not functional!!!

UPDATE: Also, something else I noticed about the Teargas on PC! The teargas does not kill "stationary" people in buildings.
eg 1: You cant kill the people dancing in the malibu like in the the ps2 version of Vice city.
2: you cant kill the shop attandents in stores or pizza stores!


Is there some way to enable it's damaging proterties so it acts excactly the same way as the PS2 version does?

sonka
  • sonka

    Player Hater

  • Members
  • Joined: 23 Dec 2006

#837

Posted 23 December 2006 - 10:38 AM

Hey! Does anyone know what is the memory address of the M16 in MTA(GTA3)? Or the rocket launcher? I've tried my moneytrainer in MTA, but it doesn't work, so I think the addresses are different in MTA(GTA3) and in GTA3.
10x!

jarjar
  • jarjar

    Boss

  • BUSTED!
  • Joined: 07 Aug 2005

#838

Posted 23 December 2006 - 10:45 AM

I thought memory hacking or cheating in any 'multiplayer' GTA game was against the rules, no?

sonka
  • sonka

    Player Hater

  • Members
  • Joined: 23 Dec 2006

#839

Posted 23 December 2006 - 01:52 PM

Well, yes, but I think the game would be more interesting if the other players had them too. And I don't want to be invincible, I/we just want to use m16 or bazooka. From a sight, yes, it is cheating.

jarjar
  • jarjar

    Boss

  • BUSTED!
  • Joined: 07 Aug 2005

#840

Posted 23 December 2006 - 01:58 PM

Okay, well GTANet doesn't support Multiplayer game cheating, so sorry, no help will be given.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users