Difference between revisions of "042F"

From GTAMods Wiki
Jump to navigation Jump to search
(page updates + extended stats simplified)
m
 
Line 1: Line 1:
{{Icon|3}} {{Icon|VC}} '''REGISTER_HIGHEST_SCORE'''
+
{{OpCode
<hr />
+
| games      = {{Icon|3}} {{Icon|VC}}
'''Description'''
+
| command    = REGISTER_HIGHEST_SCORE
: Records high record stats
+
| description = Records high record stats
'''Syntax'''
+
| syntax1    = 042F: register_highest_int_stat [''int1''] to [''int2'']
: 042F: register_highest_int_stat [''int1''] to [''int2'']
+
| p1t        = [''int1'']
'''Parameter'''
+
| p1d        = Stat id
: [''int1'']
+
| p2t        = [''int2'']
:: Stat ID
+
| p2d        = Integer value
: [''int2'']
+
}}
:: Integer value
 
  
 
This opcode saves the highest value to almost any stat in the game. The stat can only be overwritten by a value larger than the previously saved value. The value set with this opcode is saved in [[Saves (GTA 3)#Block 17: Stats|block 17 of the save file]] in GTA III and [[Saves (GTA VC)#Block 19: Stats|block 19]] in Vice City. This opcode is a no operation in San Andreas.  
 
This opcode saves the highest value to almost any stat in the game. The stat can only be overwritten by a value larger than the previously saved value. The value set with this opcode is saved in [[Saves (GTA 3)#Block 17: Stats|block 17 of the save file]] in GTA III and [[Saves (GTA VC)#Block 19: Stats|block 19]] in Vice City. This opcode is a no operation in San Andreas.  
Line 15: Line 14:
 
== List of stats ==
 
== List of stats ==
 
These are all the stats that were used in the original script.
 
These are all the stats that were used in the original script.
{| class="wikitable"
+
{|class="wikitable center-col-1"
! ID || GTA III || Vice City
+
!Id ||{{Icon|3}} ||{{Icon|VC}}
 
|-
 
|-
| 0 || Bling-bling Scramble || Highest score for Shooter
+
|0 ||Bling-bling Scramble ||Highest score for Shooter
 
|-
 
|-
| 1 || Diablo Destruction || Best Percentage of hits for Shooter
+
|1 ||Diablo Destruction ||Best Percentage of hits for Shooter
 
|-
 
|-
| 2 || Mafia Massacre || Number of drug deals made
+
|2 ||Mafia Massacre ||Number of drug deals made
 
|-
 
|-
| 3 || Casino Calamity ||
+
|3 ||Casino Calamity ||
 
|-
 
|-
| 4 || Rumpo Wrecker ||
+
|4 ||Rumpo Wrecker ||
 
|}
 
|}
  
Line 36: Line 35:
 
* Subtract the memory address with 0x8622B0.
 
* Subtract the memory address with 0x8622B0.
 
* Divide the difference by 4.
 
* Divide the difference by 4.
The resulting value is used as the stat ID for this opcode. For example, the following line sets the "Hospital visits" stat to 10:
+
The resulting value is used as the stat id for this opcode. For example, the following line sets the "Hospital visits" stat to 10:
<syntaxhighlight lang="scm">
+
{{Pre|class=sb-code|1=
042F: 131659 10
+
042F: <span class="m">131659</span> <span class="m">10</span>
</syntaxhighlight>
+
}}
  
 
For Vice City v1.0, these are the steps to edit most stats:
 
For Vice City v1.0, these are the steps to edit most stats:
Line 45: Line 44:
 
* Subtract the memory address with 0x9B6E20.
 
* Subtract the memory address with 0x9B6E20.
 
* Divide the difference by 4.
 
* Divide the difference by 4.
The resulting value is used as the stat ID for this opcode. For example, the following line sets the "Hospital visits" stat to 10:
+
The resulting value is used as the stat id for this opcode. For example, the following line sets the "Hospital visits" stat to 10:
<syntaxhighlight lang="scm">
+
{{Pre|class=sb-code|1=
042F: -67264 10
+
042F: -<span class="m">67264</span> <span class="m">10</span>
</syntaxhighlight>
+
}}
  
 
== See also ==
 
== See also ==
* [[042E]], register lowest int stat
+
* {{Icon|t}} [[042E]], register lowest int stat
  
 
== Keywords ==
 
== Keywords ==
 
record, add, stat, statistics
 
record, add, stat, statistics
 
[[Category:OpCodes]]
 

Latest revision as of 03:09, 13 April 2017

GTA III Vice City REGISTER_HIGHEST_SCORE


Description
Records high record stats
Syntax
042F: register_highest_int_stat [int1] to [int2]
Parameter
[int1]
Stat id
[int2]
Integer value

This opcode saves the highest value to almost any stat in the game. The stat can only be overwritten by a value larger than the previously saved value. The value set with this opcode is saved in block 17 of the save file in GTA III and block 19 in Vice City. This opcode is a no operation in San Andreas.

List of stats

These are all the stats that were used in the original script.

Id GTA III Vice City
0 Bling-bling Scramble Highest score for Shooter
1 Diablo Destruction Best Percentage of hits for Shooter
2 Mafia Massacre Number of drug deals made
3 Casino Calamity
4 Rumpo Wrecker

Extended stats

Using a similar exploit here for San Andreas, almost all stats can be edited using this technique for GTA III and Vice City. The second parameter accepts floating-point values for stats that require it.

For GTA III v1.0, these are the steps to edit most stats:

The resulting value is used as the stat id for this opcode. For example, the following line sets the "Hospital visits" stat to 10:

042F: 131659 10

For Vice City v1.0, these are the steps to edit most stats:

The resulting value is used as the stat id for this opcode. For example, the following line sets the "Hospital visits" stat to 10:

042F: -67264 10

See also

  • GTA III Vice City San Andreas 042E, register lowest int stat

Keywords

record, add, stat, statistics