Skip to main content

Battle Logic Edits

Author(s): Lmaokai
Implementation & Research: HGSS Decompilation, Platinum Decompilation, HG Engine, Aero, Chritchy, DarmaniDan, Fantafaust, Lhea, Lmaokai, MeKomoATuPrima, Memory5ty7, MrHam88, Paille92, Shogo Kawada Fan, Yako


This page is a collation of hex edits to the battle logic in Generation IV Pokémon games. This primarily focuses on simpler aspects where only a single byte needs to be edited, such as Iron Fist's damage multiplier. Any hex editing offsets or files present on this page are for known good US versions of the relevant games.

These edits rely upon a basic understanding of hex editing and unpacking NARCs. An initial grounding in these subjects can be found in the following:

This information comes from tutorials, guides, and research shared via other means previously (within the Kingdom of DS Hacking! Discord server, pastebin, GitHub etc.), with some additional content and context added. Attribution should be given to the researchers and original tutorial writers, these are noted at the beginning of the relevant sections (and collectively at the top of this section).


Table of Contents


Statuses

Burn Damage

Sources and Credits: DarmaniDan, HG Engine, Plat Decomp, HG Decomp

Unpack the relevant NARC, open the specified file, and change the byte at the provided offset:

GameNARC to unpackFileOffsetVanilla Byte
HeartGold/SoulSilver/a/0/0/11_26.bin0x3008
Platinum/battle/skill/sub_seq.narcsub_seq_26.bin0x3008
Diamond/Pearl/battle/skill/sub_seq.narcsub_seq_26.bin0x3008

Burn damage in Gen IV is 1/8th of the Pokémon's max HP. The battle logic (more specifically, a battle subscript) calculates Burn damage by dividing the Pokémon's max HP by an explicitly defined value, in this case 8.

As an example, to change Burn damage from 1/8th of the Pokémon's max HP to 1/16th (matching Generation VII onwards), change the byte from 08 (8 in decimal) to 10 (16 in decimal). Make sure to pack the NARC after saving the file.


Paralysis Speed Reduction

Sources and Credits: Lmaokai, Plat Decomp (1, 2), HG Decomp (1, 2)

Open the relevant file and go to the provided offsets:

GameFileOffset (Battler 1)Vanilla ByteOffset (Battler 2)Vanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120x185CAB60x18776A4
PlatinumOverlay 160x17FCAB60x18176A4
Diamond/PearlOverlay 110x16EC6B60x1702CA4
You can also search for these bytes instead
Battler 1Battler 2
All GamesB6 08A4 08

Paralysis in Gen IV decreases the Pokémon's Speed by 75%. Unfortunately, this is not achieved by simply dividing the Pokémon's Speed by 4. The battle logic calculates the decreased Speed by performing logical shifts. More specifically, the Pokémon's normal Speed is taken as a binary value, and those bits are shifted to the right by 2 bits, resulting in the same effect as dividing the value by 4.

To illustrate, take a Pokémon with 100 Speed. In binary, that is represented as 0110 0100. Shifting the bits to the right by 1 bit results in 0011 0010, or 50 in decimal. Shifting the bits to the right by 1 bit once again (for a total of 2 shifts) results in 0001 1001, or 25 in decimal.

We can change the number of logical shifts from 2 to 1, effectively changing the reduction from 75% to 50% (matching Gen VII and VIII). To do so, change the following bytes at the two offsets provided above:

Battler 1Battler 2
B6 --> 76A4 --> 64

Sleep Duration

Sources and Credits: Yako, Plat Decomp, HG Decomp, HG Engine

Unpack the relevant NARC, open the specified file, and change the byte(s) at the provided offset(s):

GameNARC to unpackFileOffset (Maximum Addend)Vanilla ByteOffset (Base # of Turns)Vanilla Byte
HeartGold/SoulSilver/a/0/0/11_18.bin0x264030x26802
Platinum/battle/skill/sub_seq.narcsub_seq_18.bin0x264030x26802
Diamond/Pearl/battle/skill/sub_seq.narcsub_seq_18.bin0x250030x25402

Sleep in Gen IV lasts 2-5 turns, but effectively prevents movement for 1-4 turns. The battle logic (more specifically, a battle subscript) calculates the number of turns through the following process:

  1. Generate a random number from zero to an explicitly defined value, in this case 3 (the 'Maximum Addend' or range)
  2. Add it to another explicitly defined value, in this case 2 (the base number of turns)

This results in (0 + 2), (1 + 2), (2 + 2), and (3 + 2) as possible outcomes for the number of sleep turns, which effectively prevents movement for 1, 2, 3, or 4 turns.

As an example, for HeartGold/SoulSilver and Platinum, to change Sleep to instead last 2-4 turns, effectively preventing movement for 1-3 turns, (matching Gen V onwards), change the byte at 0x264 from 03 (3 in decimal) to 02 (2 in decimal). This results in (0 + 2), (1 + 2), (2 + 2), as possible outcomes, effectively preventing movement for 1, 2, or 3 turns. Make sure to pack the NARC after saving the file.


Freeze Thaw Chance

Sources and Credits: Plat Decomp, HG Decomp

Open the relevant file and change the byte at the provided offset:

GameFileOffsetVanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120x13E1205
PlatinumOverlay 160x137EE05
Diamond/PearlOverlay 110x1299805
You can also search for these bytes instead
GameBytes
HeartGold/SoulSilver05 21 A7 F6
Platinum05 21 93 F6
Diamond/Pearl05 21 AB F6

A frozen Pokémon has a 20% chance of being thawed out on each of its turns in Gen IV. The battle logic calculates this chance through the following process:

  1. Divide a random number by an explicitly defined value, in this case 5
  2. Compare the remainder to 0
  3. If the remainder is not equal to 0, the Pokémon remains frozen
  4. If the remainder is equal to 0, then the Pokémon thaws out

Here is a table of bytes and the resulting thaw chance.

ByteResulting Thaw Chance
0520% (Vanilla)
0425%
0333%
0250%
01100%

Abilities

Iron Fist Damage Multiplier

Sources and Credits: MrHam88, Yako, Plat Decomp, HG Decomp

Open the relevant file and change the byte(s) at the provided offset(s):

GameFileOffset (Multiplier)Vanilla ByteOffset (Divisor)Vanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120x1FF440C0x1FF480A
PlatinumOverlay 160x1F94C0C0x1F9500A
Diamond/PearlOverlay 110x1E5200C0x1E5240A
You can also search for these bytes instead
Vanilla Bytes
All Games0C 20 60 43 0A 21

Iron Fist increases the power of effected punching moves by 20%. The battle logic calculates the increased damage by multiplying and dividing the move's power by explicitly defined values, in this case 12 and 10, respectively.

As an example, to change the boost from 20% to 50% (matching similar damage-boosting Abilities in later generations, such as Mega Launcher or Sharpness), change the byte at the multiplier offset from 0C (12 in decimal) to 0F (15 in decimal).


Pickup Activation Chance

Sources and Credits: Lhea, Aero, & DarmaniDan, Lmaokai, Plat Decomp, HG Decomp

Open the relevant file and change the byte at the provided offset:

GameFileOffsetVanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120xC8520A
PlatinumOverlay 160xC62A0A
Diamond/PearlOverlay 110xBCB20A
You can also search for these bytes instead
GameBytes
HeartGold/SoulSilver0A 21 AE F6 40
Platinum0A 21 9A F6 FE
Diamond/Pearl0A 21 B2 F6 04

Pickup has a 10% activation chance. The battle logic calculates this chance through the following process:

  1. Divide a random number by an explicitly defined value, in this case 10
  2. Compare the remainder to 0
  3. If the remainder is not equal to 0, then Pickup does not activate
  4. If the remainder is equal to 0, then Pickup activates

Here is a table of bytes and the resulting Pickup activation chance.

ByteResulting Activation Chance
0A10% (Vanilla)
0911%
0812.5%
0714%
0616.7%
0520%
0425%
0333%
0250%
01100%

Honey Gather Rate

Sources and Credits: Lmaokai, DarmaniDan, Plat Decomp (1, 2), HG Decomp (1, 2)

Honey Gather has a variable activation chance, starting at 5% if the Pokémon is between levels 1-10, and increasing by 5% every 10 levels, ending at a 50% chance at levels 91-100.

The battle logic calculates this chance through the following process:

  1. Get the Pokémon's level
  2. Depending on the Pokémon's level, pull a specific value from the Honey Gather Rate Table (see below)
  3. Divide a random number by an explicitly defined value, in this case 100
  4. Compare the remainder to the value pulled from the Honey Gather Rate Table
  5. If the remainder is greater than the value, then Honey Gather does not activate
  6. If the remainder is less than the value, then Honey Gather activates

Honey Gather Rate Table

Levels1-1011-2021-3031-4041-5051-6061-7071-8081-9091-100
Value5101520253035404550

Here are the offsets for the Honey Gather Rate Table:

GameFileOffset
HeartGold/SoulSilverDecompressed Overlay 120x35198
PlatinumOverlay 160x33974
Diamond/PearlOverlay 110x30B9C

You will see the following string of bytes that corresponds to the values of the Honey Gather Rate Table:

05 0A 0F 14 19 1E 23 28 2D 32

Given how the logic for Honey Gather works, the values in the table are effectively the literal rates for each level range respectively. As an example, if you wanted Honey Gather to have a 50% rate from levels 1-50, and a 100% rate from levels 51-100, then replace the ten bytes with the following:

32 32 32 32 32 64 64 64 64 64

Ice Body End-of-Turn HP Restoration

Sources and Credits: Lmaokai, DarmaniDan, Plat Decomp, HG Decomp

Open the relevant file and change the byte at the provided offset:

GameFileOffsetVanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120xA3F610
PlatinumOverlay 160xA1CE10
Diamond/PearlOverlay 110x985E10
You can also search for these bytes instead
GameBytes
HeartGold/SoulSilver10 21 11 F0 5E
Platinum10 21 11 F0 72
Diamond/Pearl10 21 10 F0 4E

Ice Body restores 1/16th of the Pokémon's max HP. The battle logic calculates the HP restoration amount by dividing the Pokémon's max HP by an explicitly defined value, in this case 16.

As an example, to change the HP restoration from 1/16th of the Pokémon's max HP to 1/10th, change the byte from 10 (16 in decimal) to 0A (10 in decimal).


Heatproof Burn Damage Reduction

Sources and Credits: Plat Decomp, HG Decomp

Unpack the relevant NARC, open the specified file, and change the byte at the provided offset:

GameNARC to unpackFileOffsetVanilla Byte
HeartGold/SoulSilver/a/0/0/11_26.bin0x5002
Platinum/battle/skill/sub_seq.narcsub_seq_26.bin0x5002
Diamond/Pearl/battle/skill/sub_seq.narcsub_seq_26.bin0x5002

Heatproof halves the normal damage done from the Burn status. The battle logic (more specifically, a battle subscript) calculates the reduced burn damage by dividing the normal burn damage by an explicitly defined value, in this case 2.

As an example, to change the divisor from 2 to 1 (effectively changing Heatproof to have no impact on burn damage), change the byte from 02 (2 in decimal) to 01 (1 in decimal). Alternatively, you can use a larger value to increase the reduction of burn damage (e.g. change the byte to 04 to divide the burn damage by 4). Make sure to pack the NARC after saving the file.


Quick Feet Speed Multiplier

Sources and Credits: Plat Decomp (1, 2), HG Decomp (1, 2)

Open the relevant file and go to the provided offsets:

GameFileOffset (Battler 1 Multiplier)Vanilla ByteOffset (Battler 1 Divisor)Vanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120x185AE0F0x185B20A
PlatinumOverlay 160x17FAE0F0x17FB20A
Diamond/PearlOverlay 110x16EAA0F0x16EAE0A
GameFileOffset (Battler 2 Multiplier)Vanilla ByteOffset (Battler 2 Divisor)Vanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120x1875A0F0x1875E0A
PlatinumOverlay 160x1815A0F0x1815E0A
Diamond/PearlOverlay 110x170100F0x170140A
You can also search for these bytes instead
GameBattler 1Battler 2
HeartGold/SoulSilver0F 20 70 43 0A 21 A2 F6 960F 20 60 43 0A 21 A2 F6 C0
Platinum0F 20 70 43 0A 21 8F F6 400F 20 60 43 0A 21 8E F6 6A
Diamond/Pearl0F 20 70 43 0A 21 A7 F6 0C0F 20 60 43 0A 21 A7 F6 5A

Quick Feet increases the Pokémon's Speed by 50%. The battle logic calculates the increased Speed by multiplying and dividing the Pokémon's Speed by explicitly defined values, in this case 15 and 10, respectively.

As an example, to change the boost from 50% to 70%, change the byte at the multiplier offsets for both battlers from 0F (15 in decimal) to 11 (17 in decimal).


Slow Start Stat-Reduction Duration

Sources and Credits: Chritchy, Plat Decomp (1, 2, 3, 4), HG Decomp (1, 2, 3, 4)

Open the relevant file and change the bytes at the provided offsets:

GameFileOffset 1Offset 2Offset 3Offset 4Vanilla Byte (All Offsets)
HeartGold/SoulSilverDecompressed Overlay 120x185E20x1878E0x1C2A80x1FA3805
PlatinumOverlay 160x17FE20x1818E0x1BCB00x1F44005
Diamond/PearlOverlay 110x16EDE0x170440x1AAA80x1E05005
You can also search for these bytes instead
Offset 1Offset 2Offset 3Offset 4
All Games05 28 00 DA 7605 28 00 DA 6405 28 0D05 28 03

Slow Start lasts for 5 turns whenever the Pokémon is switched into battle. As an example, to change the duration from 5 turns to 4, go to each offset listed and change the byte from 05 (5 in decimal) to 04 (4 in decimal).


Rain Dish End-of-Turn HP Restoration

Sources and Credits: Lhea, Plat Decomp, HG Decomp

Open the relevant file and change the byte at the provided offset:

GameFileOffsetVanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120xA46C10
PlatinumOverlay 160xA24410
Diamond/PearlOverlay 110x98D410
You can also search for these bytes instead
Vanilla Bytes
All Games10 21 80 59

Rain Dish restores 1/16th of the Pokémon's max HP. The battle logic calculates the HP restoration amount by dividing the Pokémon's max HP by an explicitly defined value, in this case 16.

As an example, to change the HP restoration from 1/16th of the Pokémon's max HP to 1/10th, change the byte from 10 (16 in decimal) to 0A (10 in decimal).


Reckless Damage Multiplier

Sources and Credits: Yako, Plat Decomp (1, 2, 3, 4, 5, 6), HGSS Decomp (1, 2, 3, 4, 5, 6)

Reckless increases the power of moves that have recoil or crash damage by 20%, except Struggle. The battle logic (more specifically, multiple move effect scripts) calculates the increased damage by multiplying the move's power by an explicitly defined value, in this case 12.

The multiplier value is explicitly defined across six individual move effect scripts that involve recoil or crash damage in the vanilla Pokémon games. This means six edits are required to effectively change Reckless' damage multiplier.

The divisor value is explicitly defined in the general battle logic overlay (i.e. Overlay 12 for HeartGold/SoulSilver, Overlay 16 for Platinum, and Overlay 11 for Diamond/Pearl), but is a general-use function that handles every case in which a move's power is modified.

Unpack the following NARCs, open the six specified files, and change the bytes at the provided offsets. Make sure to pack the NARC after saving all the files.

1) Move Effect Script 45: Crash Damage if Move Misses (Hi Jump Kick, Jump Kick)

GameNARC to unpackFileOffsetVanilla Byte
HeartGold/SoulSilver/a/0/3/00_45.bin0x200C
Platinum/battle/skill/be_seq.narcbe_seq_45.bin0x200C
Diamond/Pearl/battle/skill/be_seq.narcbe_seq_45.bin0x200C

2) Move Effect Script 48: 25% Recoil Damage (Take Down, Submission)

GameNARC to unpackFileOffsetVanilla Byte
HeartGold/SoulSilver/a/0/3/00_48.bin0x200C
Platinum/battle/skill/be_seq.narcbe_seq_48.bin0x200C
Diamond/Pearl/battle/skill/be_seq.narcbe_seq_48.bin0x200C

3) Move Effect Script 198: 33% Recoil Damage (Double-Edge, Brave Bird, Wood Hammer)

GameNARC to unpackFileOffsetVanilla Byte
HeartGold/SoulSilver/a/0/3/00_198.bin0x200C
Platinum/battle/skill/be_seq.narcbe_seq_198.bin0x200C
Diamond/Pearl/battle/skill/be_seq.narcbe_seq_198.bin0x200C

4) Move Effect Script 253: 33% Recoil Damage, Chance to Burn, and Thaws the User (Flare Blitz)

GameNARC to unpackFileOffsetVanilla Byte
HeartGold/SoulSilver/a/0/3/00_253.bin0x200C
Platinum/battle/skill/be_seq.narcbe_seq_253.bin0x200C
Diamond/Pearl/battle/skill/be_seq.narcbe_seq_253.bin0x200C

5) Move Effect Script 262: 33% Recoil Damage and Chance to Paralyze (Volt Tackle)

GameNARC to unpackFileOffsetVanilla Byte
HeartGold/SoulSilver/a/0/3/00_262.bin0x200C
Platinum/battle/skill/be_seq.narcbe_seq_262.bin0x200C
Diamond/Pearl/battle/skill/be_seq.narcbe_seq_262.bin0x200C

6) Move Effect Script 269: 50% Recoil Damage (Head Smash)

GameNARC to unpackFileOffsetVanilla Byte
HeartGold/SoulSilver/a/0/3/00_269.bin0x200C
Platinum/battle/skill/be_seq.narcbe_seq_269.bin0x200C
Diamond/Pearl/battle/skill/be_seq.narcbe_seq_269.bin0x200C

Rivalry Damage Multipliers

Sources and Credits: MeKomoATuPrima, Plat Decomp, HG Decomp

Open the relevant file and go to the provided offsets:

GameFileOffset (Same Gender Multiplier)Vanilla ByteOffset (Same Gender Divisor)Vanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120x1FF007D0x1FF0464
PlatinumOverlay 160x1F9087D0x1F90C64
Diamond/PearlOverlay 110x1E4DC7D0x1E4E064
GameFileOffset (Opposite Gender Multiplier)Vanilla ByteOffset (Opposite Gender Divisor)Vanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120x1FF264B0x1FF2A64
PlatinumOverlay 160x1F92E4B0x1F93264
Diamond/PearlOverlay 110x1E5024B0x1E50664
You can also search for these bytes instead
GameSame GenderOpposite Gender
HeartGold/SoulSilver7D 20 60 43 64 21 9B F6 E84B 20 60 43 64
Platinum7D 20 60 43 64 21 87 F6 8E4B 20 60 43 64
Diamond/Pearl7D 20 60 43 64 21 A0 F6 EE4B 20 60 43 64

Rivalry increases the power of moves by 25% if the target and the user have the same gender. The battle logic calculates the increased damage by multiplying and dividing the move's power by explicitly defined values, in this case 125 (7D in hexadecimal) and 100 (64 in hexadecimal), respectively.

Rivalry reduces the power of moves by 25% if the target and the user have opposite genders. The battle logic calculates the reduced damage by multiplying and dividing the move's power by explicitly defined values, in this case 75 (4B in hexadecimal) and 100 (64 in hexadecimal), respectively.


Items

Leftovers End-of-Turn HP Restoration

Sources and Credits: Lhea, Plat Decomp, HG Decomp

Open the relevant file and change the byte at the provided offset:

GameFileOffset (Leftovers)Vanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120x1D50810
PlatinumOverlay 160x1CF1010
Diamond/PearlOverlay 110x1BD2C10
You can also search for these bytes instead
GameBytes
HeartGold/SoulSilver10 21 FE F7 D5
Platinum10 21 FE F7 D1
Diamond/Pearl10 21 FE F7 E7

Leftovers (specifically the item held effect assigned to Leftovers in vanilla Pokémon games) restores 1/16th of the Pokémon's max HP. HP restoration for this item held effect is determined in the battle logic instead of the item's properties (meaning changing those values in DSPRE's Item Editor has no impact), and is calculated by dividing the Pokémon's max HP by an explicitly defined value, in this case 16.

As an example, to change end-of-turn HP restoration from 1/16th of the Pokémon's max HP to a whopping 1/2th (for testing purposes, of course), change the byte from 10 (16 in decimal) to 02 (2 in decimal).


Black Sludge End-of-Turn HP Restoration

Sources and Credits: Lhea, Plat Decomp, HG Decomp

Open the relevant file and change the byte at the provided offset:

GameFileOffset (Black Sludge)Vanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120x1D54810
PlatinumOverlay 160x1CF5010
Diamond/PearlOverlay 110x1BD6C10
You can also search for these bytes instead
GameBytes
HeartGold/SoulSilver10 21 FE F7 B5
Platinum10 21 FE F7 B1
Diamond/Pearl10 21 FE F7 C7

Black Sludge (specifically the item held effect assigned to Black Sludge in vanilla Pokémon games) restores 1/16th of a Poison-Type Pokémon's max HP. HP restoration for this item held effect is determined in the battle logic instead of the item's properties (meaning changing those values in DSPRE's Item Editor has no impact), and is calculated by dividing the Pokémon's max HP by an explicitly defined value, in this case 16.

As an example, to change end-of-turn HP restoration from 1/16th of the Pokémon's max HP to 1/10th, change the byte from 10 (16 in decimal) to 0A (10 in decimal).


Black Sludge End-of-Turn Damage for Non-Poison Types

Sources and Credits: Lhea, Plat Decomp, HG Decomp

Open the relevant file and change the byte at the provided offset:

GameFileOffsetVanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120x1D57008
PlatinumOverlay 160x1CF7808
Diamond/PearlOverlay 110x1BD9408
You can also search for these bytes instead
Vanilla Bytes
All Games08 21 FE F7

Black Sludge (specifically the item held effect assigned to Black Sludge in vanilla Pokémon games) damages 1/8th of a non-Poison-Type Pokémon's max HP. Damage for this item held effect is determined in the battle logic instead of the item's properties, and is calculated by dividing the Pokémon's max HP by an explicitly defined value, in this case 8.

As an example, to change the end-of-turn damage from 1/8th of the Pokémon's max HP to 1/16th, change the byte from 08 (8 in decimal) to 10 (16 in decimal).


X Attack, X Defense, X Special, X Sp. Def, X Speed, and X Accuracy Stat Stage Boosts

Sources and Credits: Plat Decomp, HG Decomp

Open the relevant file and go to the provided offsets:

GameFileOffset (X Attack)Offset (X Defense)Offset (X Special)Offset (X Sp. Def)Offset (X Speed)Offset (X Accuracy)Vanilla Byte (All Offsets)
HeartGold/SoulSilverDecompressed Overlay 120x372A0x37680x37A60x37E40x38220x386001
PlatinumOverlay 160x35960x35D40x36120x36500x368E0x36CC01
Diamond/PearlOverlay 110x317A0x31B80x31F60x32340x32720x32B001
You can also search for these bytes instead
GameBytes (6 results)
HeartGold/SoulSilver01 23 14 F0
Platinum01 23 14 F0
Diamond/Pearl01 23 13 F0

The item properties assigned to X Attack, X Defense, X Special, X Sp. Def, X Speed, and X Accuracy in Gen IV enable them to be used from the bag during battle to raise the Pokémon's respective stat by 1 stage.

As an example, to change the effect to raise the Pokémon's respective state by 2 stages (matching Gen VII onwards), change the byte from 01 to 02.


Move Effects

Aqua Ring End-of-Turn HP Restoration

Sources and Credits: Lhea, Fantafaust, Lmaokai, Plat Decomp, HG Decomp

Open the relevant file and change the byte at the provided offset:

GameFileOffsetVanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120x1257A10
PlatinumOverlay 160x11FB210
Diamond/PearlOverlay 110x1125210
You can also search for these bytes instead
GameBytes
HeartGold/SoulSilver10 21 09 F0 9C
Platinum10 21 09 F0 80
Diamond/Pearl10 21 08 F0 54

The move effect assigned to Aqua Ring restores 1/16th of the Pokémon's max HP. The battle logic calculates the HP restoration amount for this move effect by dividing the Pokémon's max HP by an explicitly defined value, in this case 16.

As an example, to change the HP restoration from 1/16th of the Pokémon's max HP to 1/10th, change the byte from 10 (16 in decimal) to 0A (10 in decimal).


Binding Moves End-of-Turn Damage

Sources and Credits: MrHam88, Lhea, Paille92, Lmaokai, Plat Decomp, HG Decomp

Open the relevant file and change the byte at the provided offset:

GameFileOffsetVanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120x1285210
PlatinumOverlay 160x1228A10
Diamond/PearlOverlay 110x1152810
You can also search for these bytes instead
GameBytes
HeartGold/SoulSilver10 21 09 F0 30
Platinum10 21 09 F0 14
Diamond/Pearl10 21 08 F0 E9

The move effect assigned to binding moves such as Bind, Fire Spin, and Whirlpool, deals 1/16th of the Pokémon's max HP. The battle logic calculates the damage for this move effect by dividing the Pokémon's max HP by an explicitly defined value, in this case 16.

As an example, to change the damage from 1/16th of the Pokémon's max HP to 1/8th (matching Gen VI onwards), change the byte from 10 (16 in decimal) to 08 (8 in decimal).


Binding Moves Duration

Sources and Credits: MrHam88, Yako & DarmaniDan, Plat Decomp, HG Decomp

Unpack the relevant NARC, open the specified file, and change the byte(s) at the provided offset(s):

GameNARC to unpackFileOffset (Maximum Addend)Vanilla ByteOffset (Base # of Turns)Vanilla Byte
HeartGold/SoulSilver/a/0/0/11_58.bin0x38030x3C03
Platinum/battle/skill/sub_seq.narcsub_seq_58.bin0x38030x3C03
Diamond/Pearl/battle/skill/sub_seq.narcsub_seq_58.bin0x38030x3C03

The move effect assigned to binding moves such as Bind, Fire Spin, and Whirlpool, lasts 3-6 turns in Gen IV, but effectively traps and deals damage for 2-5 turns. The battle logic (more specifically, a battle subscript) calculates the total number of turns through the following process:

  1. Generate a random number from zero to an explicitly defined value, in this case 3 (the 'Maximum Addend' or range)
  2. Add it to another explicitly defined value, in this case 3 (the base number of turns)

This results in (0 + 3), (1 + 3), (2 + 3), and (3 + 3) as possible outcomes for the number of turns, which effectively traps and deals damage for 2, 3, 4, or 5 turns.

As an example, to change the duration to instead last 5-6 turns (effectively lasting for 4-5 turns, matching Gen V onwards)

  1. Change the byte at 0x38 from 3 (3 in decimal) to 01 (1 in decimal)
  2. Change the byte at 0x3C from 3 (3 in decimal) to 05 (5 in decimal)

This results in (0 + 5) and (1 + 5) as possible outcomes, effectively lasting for 4 or 5 turns. Make sure to pack the NARC after saving the file.

Another example, but to fix the duration to always be 3 effective turns

  1. Change the byte at 0x38 from 3 (3 in decimal) to 00 (0 in decimal)
  2. Change the byte at 0x3C from 3 (3 in decimal) to 04 (4 in decimal)

Later in the same file contains the logic for Grip Claw (specifically the item held effect assigned to Grip Claw in vanilla Pokémon games) causing binding moves to always last a certain number of turns.

GameOffset (Grip Claw Duration)Vanilla Byte
HeartGold/SoulSilver0x6006
Platinum0x6006
Diamond/Pearl0x6006

As an example, to change Grip Claw to cause binding moves to always last for 6 effective turns, change the byte at 0x60 from 06 (6 in decimal) to 07 (7 in decimal). Make sure to pack the NARC after saving the file.

warning

The forced Grip Claw duration cannot be changed to a value greater than 07.


Magnitude Move Power

Sources and Credits: Plat Decomp (1, 2), HG Decomp (1, 2)

Open the relevant file and go to the provided offsets:

GameFileOffset (Magnitude 4)Vanilla ByteOffset (Magnitude 5)Vanilla ByteOffset (Magnitude 6)Vanilla ByteOffset (Magnitude 7)Vanilla ByteOffset (Magnitude 8)Vanilla ByteOffset (Magnitude 9)Vanilla ByteOffset (Magnitude 10)Vanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120xA89A0A0xA8AA1E0xA8BA320xA8CA460xA8DA5A0xA8EA6E0xA8F496
PlatinumOverlay 160xA6720A0xA6821E0xA692320xA6A2460xA6B25A0xA6C26E0xA6CC96
Diamond/PearlOverlay 110x9CFA0A0x9D0A1E0x9D1A320x9D2A460x9D3A5A0x9D4A6E0x9D5496
You can also search for these bytes instead
Magnitude 4 BytesMagnitude 5 BytesMagnitude 6 BytesMagnitude 7 BytesMagnitude 8 BytesMagnitude 9 BytesMagnitude 10 Bytes
All Games0A 22 621E 22 6232 22 6246 22 625A 22 626E 22 6296 22 62

The move effect assigned to Magnitude has a varying move power based on randomly selected "magnitude" level. The battle logic first determines the "magnitude" level, then provides the explicitly defined move power associated with each "magnitude" level.

Magnitude LevelVanilla PowerVanilla Byte
4100A
5301E
65032
77046
8905A
91106E
1015096

Additionally, the trainer AI may simulate a Magnitude roll depending on assigned AI flags. This is handled in a different overlay with a separate set of explicitly defined values.

GameFileOffset (Magnitude 4)Offset (Magnitude 5)Offset (Magnitude 6)Offset (Magnitude 7)Offset (Magnitude 8)Offset (Magnitude 9)Offset (Magnitude 10)
HeartGold/SoulSilverDecompressed Overlay 100x351C0x35240x352C0x35340x353C0x35440x3548
PlatinumOverlay 140x351C0x35240x352C0x35340x353C0x35440x3548
Diamond/PearlOverlay 160x1BCBC0x1BCC40x1BCCC0x1BCD40x1BCDC0x1BCE40x1BCE8
You can also search for these bytes instead
Magnitude 4 BytesMagnitude 5 BytesMagnitude 6 BytesMagnitude 7 BytesMagnitude 8 BytesMagnitude 9 BytesMagnitude 10 Bytes
All Games0A 24 14 E01E 24 10 E032 24 0C E046 24 08 E05A 24 04 E06E 24 00 E096 24 00 27 22

Gyro Ball Move Power Calculation Multiplier

Sources and Credits: Plat Decomp (1, 2), HG Decomp (1, 2)

Open the relevant file and go to the provided offsets:

GameFileOffsetVanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120xBEAA19
PlatinumOverlay 160xBC8219
Diamond/PearlOverlay 110xB31619
You can also search for these bytes instead
Bytes
All Games19 20 50

The move effect assigned to Gyro Ball has a varying move power based on the user's Speed compared to the target's Speed. The battle logic calculates the move's power by dividing the target's Speed by the user's Speed, then multiplying the result by an explicitly defined value, in this case 25 (19 in hexadecimal). Increasing this value will increase the calculated power (but is still restricted by the maximum power cap of 150).

Additionally, the trainer AI may calculate Gyro Ball's power depending on assigned AI flags. This is handled in a different overlay.

GameFileOffset
HeartGold/SoulSilverDecompressed Overlay 100x347C
PlatinumOverlay 140x347C
Diamond/PearlOverlay 160x1BC20

Flail and Reversal Move Power

Sources and Credits: Plat Decomp (1, 2), HG Decomp (1, 2)

The move effect assigned to Flail and Reversal has a varying move power based on the user's current HP compared to its max HP. The battle logic calculates the move's power in two parts. First, the user's current HP is divided by its max HP, then multiplied by an explicitly defined value, in this case 64 (40 in hexadecimal). Second, the result is compared to a table that provides an explicitly defined move power.

From Gen V onwards, the multiplier was changed from 64 to 48, with the ratios likely changed as well (see Pokemon Database for Gen V+ ratios).

If you change the multiplier in the initial calculation, you will need to change the ratio(s) in the table. Otherwise, the intended move power may not be returned.

Flail/Reversal Calculation Multiplier

Open the relevant file and change the byte at the provided offset:

GameFileOffsetVanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120x97A440
PlatinumOverlay 160x957C40
Diamond/PearlOverlay 110x8C1840
You can also search for these bytes instead
GameBytes
HeartGold/SoulSilver40 22 26
Platinum40 22 47
Diamond/Pearl40 22 43

Flail/Reversal Power Table

Open the relevant file and go the provided offset:

GameFileOffset
HeartGold/SoulSilverDecompressed Overlay 120x34A40
PlatinumOverlay 160x33444
Diamond/PearlOverlay 110x3067C
Vanilla Bytes
All Games01 C8 05 96 0C 64 15 50 2A 28 40 14

Here is the table of the HP ratio (based on the vanilla multiplier of 64) to Move Power.

Ratio (N)Vanilla ByteMove PowerVanilla Byte
N ≤ 101200C8
1 < N ≤ 50515096
5 < N ≤ 120C10064
12 < N ≤ 21158050
21 < N ≤ 422A4028
42 < N ≤ 64402014

Weather

Hail End-of-Turn Damage for Non-Ice Types

Sources and Credits: Lmaokai, Plat Decomp, HG Decomp

Open the relevant file and change the byte at the provided offset:

GameFileOffsetVanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120xA42C10
PlatinumOverlay 160xA20410
Diamond/PearlOverlay 110x989410
You can also search for these bytes instead
GameBytes
HeartGold/SoulSilver10 21 11 F0 43
Platinum10 21 11 F0 57
Diamond/Pearl10 21 10 F0 33

Hail damages 1/16th of a non-Ice-Type Pokémon's max HP. The battle logic calculates this damage by dividing the Pokémon's max HP by an explicitly defined value, in this case 16.

As an example, to change Hail damage from 1/16th of the Pokémon's max HP to 1/12th, change the byte from 10 (16 in decimal) to 0C (12 in decimal).


Remove Hail End-of-Turn Damage

Sources and Credits: Plat Decomp, HG Decomp

Open the relevant file and go to the provided offset:

GameFileOffsetVanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120xA40616 D0
PlatinumOverlay 160xA1DE16 D0
Diamond/PearlOverlay 110x986E16 D0
You can also search for these bytes instead
Bytes
All Games16 D0 0F 2F

At this location, the battle logic checks if the Pokémon's first type is Ice, then if the second type is Ice, then if the ability is Snow Cloak to skip applying Hail damage to the Pokémon. Replacing 16 D0 with 16 E0 at this offset changes the first check from a conditional branch to an unconditional branch, which will effectively skip applying Hail damage to all Pokémon (mirroring the Snow weather that replaces Hail in Gen IX onwards).


Miscellaneous

Critical Hit Rate

Sources and Credits: Lhea, Plat Decomp, HG Decomp

Open the relevant file and go to the provided offset:

GameFileOffset
HeartGold/SoulSilverDecompressed Overlay 120x35288
PlatinumOverlay 160x33A60
Diamond/PearlOverlay 110x30C84

The battle logic calculates the chance of a critical hit by using a certain value as a divisor, pulled from a table based on the Pokémon's critical hit ratio stage. For example, in Gen IV, if an attacking Pokémon has a critical hit ratio stage of +2, then the chance of a critical hit rate is 1/4.

Here is a table of the vanilla bytes, as well as bytes that match the changes in Gen VI and Gen VII onwards.

BytesResulting Critical Hit Chance per Stage
Gen IV10 08 04 03 02[1/16] [1/8] [1/4] [1/3] [1/2]
Gen VI10 08 02 01 01[1/16] [1/8] [1/2] [1] [1]
Gen VII+18 08 02 01 01[1/24] [1/8] [1/2] [1] [1]

Bug Fixes

Fire Fang vs Wonder Guard

Sources and Credits: Lhea, Shogo Kawada Fan

Open the relevant file and change the byte at the provided offset:

GameFileOffsetVanilla Byte
HeartGold/SoulSilverDecompressed Overlay 120x20BCC11
PlatinumOverlay 160x205D411
Diamond/PearlOverlay 110x1F16011
You can also search for these bytes instead
Vanilla Bytes
All Games11 32 93 42

Fire Fang (specifically the move effect assigned to only Fire Fang) is able to hit through Wonder Guard, even if the target does not have a weakness to Fire-Type moves. More information about the bug can be found on Bulbapedia or searching Fire Fang Wonder Guard on the Kingdom of DS Hacking Discord.

To fix the issue, change the byte from 11 to 10.


Trainer AI Water Immunity Check vs Dry Skin

Sources and Credits: Memory5ty7, DarmaniDan, Lhea, Plat Decomp

Open the relevant file and change the byte at the provided offset:

GameFileOffsetVanilla Byte
HeartGold/SoulSilverDecompressed Overlay 100x4DB41A
PlatinumOverlay 140x4DAC1A
Diamond/PearlOverlay 160x1DA7C1A
You can also search for these bytes instead
Vanilla Bytes
All Games1A 00 00 00 26 00 00 00

The Trainer AI performs two checks when considering whether the opposing Pokémon is immune to Water-Type moves. The first check considers Water Absorb, but the second check mistakenly considers Levitate instead of Dry Skin. In practice, this means that (1) a Trainer's Pokémon won't use Water-Type moves if it knows that the opposing Pokémon has Levitate, and (2) a Trainer's Pokémon may repeatedly use a Water-Type move against an opposing Pokémon with Dry Skin.

To fix the issue, change the byte from 1A (26 in decimal, Levitate's ID) to 57 (87 in decimal, Dry Skin's ID).