Registrarse

[Otros] R | Physical/Special Split

Andrea

Usuario mítico
Good evening to all.
Today i would like to explain how to implement the physical/special split, a feature introduced in the IV generation that involves assigning the type of a move, physical or special, based on different criteria than previous generations.
In fact, until the III generation what discriminated a physical move from a special was the type (example: all the fight moves were physical, while all dark were special).
From the IV generation, each move is physical or special regardless of its type.

*NB: Before proceeding further, if you are not familiar with inserting asm routines, i suggest you to read some tutorial about it.

#1 - Tools needed
Before going into the insertion of the changes, it's necessary to define which tools we will need to arrive at the final result:
- HxD, available at the following link.
It will allow us to insert our compiled routines and make some hexadecimal changes necessary to "hook" our asm routines to the original code of the ROM.
- Compiler, available at the following link.
As you can imagine, we will need it to convert our ASM routines into a binary file "readable" from the ROM.

#2 - Some changes with Hex Editor
The first thing you need to do in order to implement this feature is open the rom with the Hex Editor.
Then make the following changes:
Go to 0x3BC9A and overwrite the bytes with 00 E0
Go to 0x3BCB4 and overwrite the bytes with 2E E7
Through these modifications, the behavior of the original routine is altered towards the pokemon who have as held item all those that increase the power of a move of a certain type (miracle seed, magnet, charcoal, etc...)
While before the routine control the type of move and based on latter the corresponding statistic, physical or special, was "boosted", now both statistics are increased.
This made sure that the move was boosted, regardless of its type.

#3 - Update the table
After open the rom with HxD, go to 0x1FB138 and past those byte:
00 28 00 64 23 00 00 00 33 00 00 00 2B 32 01 64 19 00 00 00 33 00 00 00 1D 0F 00 55 0A 00 00 00 33 00 00 00 1D 12 00 55 0F 00 00 00 33 00 00 00 00 50 00 55 14 00 00 00 33 00 00 00 22 28 00 64 14 64 00 00 32 00 00 00 04 4B 0A 64 0F 0A 00 00 13 00 00 00 05 4B 0F 64 0F 0A 00 00 13 00 00 00 06 4B 0D 64 0F 0A 00 00 13 00 00 00 00 28 00 64 23 00 00 00 33 00 00 00 00 37 00 64 1E 00 00 00 33 00 00 00 26 01 00 1E 05 00 00 00 13 00 00 00 27 50 00 64 0A 00 08 00 32 00 01 00 32 00 00 00 1E 00 10 00 08 00 02 00 00 32 00 5F 1E 00 00 00 33 00 00 00 95 28 02 64 23 00 00 00 32 00 01 00 00 3C 02 64 23 00 00 00 33 00 00 00 1C 00 00 64 14 00 00 FA 12 00 02 00 9B 46 02 5F 0F 00 00 00 33 00 00 00 2A 0F 00 4B 14 64 00 00 33 00 00 00 00 50 00 4B 14 00 00 00 33 00 00 00 00 23 0C 64 0A 00 00 00 33 00 00 00 96 41 00 64 14 1E 00 00 13 00 00 00 2C 1E 01 64 1E 00 00 00 33 00 00 00 00 78 00 4B 05 00 00 00 33 00 00 00 2D 46 01 5F 19 00 00 00 33 00 00 00 1F 3C 01 55 0F 1E 00 00 33 00 00 00 17 00 04 64 0F 00 00 00 16 00 02 00 1F 46 00 64 0F 1E 00 00 13 00 00 00 00 41 00 64 19 00 00 00 33 00 00 00 1D 0F 00 55 14 00 00 00 33 00 00 00 26 01 00 1E 05 00 00 00 13 00 00 00 00 23 00 5F 23 00 00 00 33 00 00 00 06 55 00 64 0F 1E 00 00 13 00 00 00 2A 0F 00 55 14 64 00 00 33 00 00 00 30 5A 00 55 14 00 00 00 33 00 00 00 1B 5A 00 64 14 64 04 00 33 00 00 00 C6 78 00 64 0F 00 00 00 33 00 00 00 13 00 00 64 1E 00 08 00 16 00 02 00 02 0F 03 64 23 1E 00 00 12 00 00 00 4D 19 06 64 14 14 00 00 12 00 00 00 1D 0E 06 55 14 00 00 00 32 00 00 00 13 00 00 64 1E 00 08 00 16 00 02 00 1F 3C 11 64 19 1E 00 00 13 00 00 00 12 00 00 64 28 00 08 00 16 00 02 00 1C 00 00 64 14 00 00 FA 12 00 02 00 01 00 00 37 0F 00 00 00 16 00 02 00 31 00 00 37 14 00 00 00 16 00 02 00 82 01 00 5A 14 00 00 00 32 00 01 00 56 00 00 37 14 00 00 00 12 00 02 00 45 28 03 64 1E 0A 08 00 12 00 01 00 04 28 0A 64 19 0A 00 00 12 00 01 00 04 5F 0A 64 0F 0A 00 00 12 00 01 00 2E 00 0F 00 1E 00 10 00 08 00 02 00 00 28 0B 64 19 00 00 00 32 00 01 00 00 78 0B 50 05 00 00 00 32 00 01 00 00 5F 0B 64 0F 00 08 00 32 00 01 00 05 5F 0F 64 0A 0A 00 00 12 00 01 00 05 78 0F 46 05 0A 08 00 12 00 01 00 4C 41 0E 64 14 0A 00 00 12 00 01 00 46 41 0B 64 14 0A 00 00 12 00 01 00 44 41 0F 64 14 0A 00 00 12 00 01 00 50 96 00 5A 05 00 00 00 32 00 01 00 00 23 02 64 23 00 00 00 33 00 00 00 00 50 02 64 14 00 00 00 33 00 00 00 30 50 01 50 19 00 00 00 33 00 00 00 C4 01 01 64 14 00 00 00 33 00 00 00 59 01 01 64 14 00 01 FB 11 00 00 00 57 01 01 64 14 00 00 00 33 00 00 00 00 50 00 64 0F 00 00 00 33 00 00 00 03 14 0C 64 14 00 00 00 12 00 01 00 03 28 0C 64 0A 00 00 00 12 00 01 00 54 00 0C 5A 0A 00 00 00 16 00 02 00 0D 00 00 00 28 00 10 00 08 00 02 00 2B 37 0C 5F 19 00 08 00 32 00 00 00 97 78 0C 64 0A 00 00 00 32 00 01 00 42 00 03 4B 23 00 00 00 16 00 02 00 43 00 0C 4B 1E 00 00 00 16 00 02 00 01 00 0C 4B 0F 00 00 00 16 00 02 00 1B 46 0C 64 14 64 04 00 33 00 01 00 14 00 06 5F 28 00 08 00 16 00 02 00 29 01 10 64 0A 00 00 00 32 00 01 00 2A 0F 0A 46 0F 64 00 00 32 00 01 00 06 28 0D 64 1E 0A 00 00 12 00 01 00 06 5F 0D 64 0F 0A 00 00 12 00 01 00 43 00 0D 64 14 00 00 00 16 00 02 00 98 78 0D 46 0A 1E 00 00 12 00 01 00 00 32 05 5A 0F 00 00 00 32 00 00 00 93 64 04 64 0A 00 20 00 32 00 00 00 26 01 04 1E 05 00 00 00 12 00 00 00 9B 3C 04 64 0A 00 00 00 33 00 00 00 21 00 03 55 0A 64 00 00 16 00 02 00 4C 32 0E 64 19 0A 00 00 12 00 01 00 48 5A 0E 64 0A 0A 00 00 12 00 01 00 01 00 0E 3C 14 00 00 00 16 00 02 00 0A 00 0E 00 28 00 10 00 08 00 02 00 34 00 0E 00 1E 00 10 00 08 00 02 00 67 28 00 64 1E 00 00 01 33 00 00 00 51 14 00 64 14 00 00 00 33 00 00 00 99 00 0E 00 14 00 10 00 00 00 02 00 57 01 07 64 0F 00 00 00 32 00 01 00 52 00 00 64 0A 00 00 00 02 00 02 00 3B 00 00 55 28 00 00 00 16 00 02 00 10 00 00 00 0F 00 10 00 08 00 02 00 20 00 00 00 14 00 10 00 08 00 02 00 0B 00 00 00 1E 00 10 00 08 00 02 00 6C 00 00 00 14 00 10 00 08 00 02 00 17 00 00 64 14 00 00 00 16 00 02 00 31 00 07 64 0A 00 00 00 16 00 02 00 0B 00 0B 00 28 00 10 00 08 00 02 00 9C 00 00 00 28 00 10 00 08 00 02 00 33 00 0E 00 1E 00 10 00 08 00 02 00 23 00 0E 00 1E 00 10 00 08 00 02 00 19 00 0F 00 1E 00 10 00 02 00 02 00 41 00 0E 00 14 00 10 00 08 00 02 00 2F 00 00 00 1E 00 10 00 08 00 02 00 1A 01 00 64 0A 00 10 00 23 00 00 00 53 00 00 00 0A 00 01 00 00 00 02 00 09 00 02 00 14 00 01 00 00 00 02 00 07 C8 00 64 05 00 20 00 32 00 00 00 00 64 00 4B 0A 00 00 00 32 00 00 00 06 14 07 64 1E 1E 00 00 13 00 00 00 02 14 03 46 14 28 00 00 12 00 01 00 02 41 03 64 14 1E 00 00 12 00 01 00 1F 41 04 55 14 0A 00 00 12 00 00 00 04 78 0A 55 05 0A 00 00 12 00 01 00 00 50 0B 64 0F 00 00 00 33 00 00 00 2A 23 0B 4B 0A 64 00 00 33 00 00 00 11 3C 00 00 14 00 08 00 32 00 01 00 91 64 00 64 0F 00 00 00 33 00 00 00 1D 14 00 64 0F 00 00 00 32 00 00 00 46 0A 00 64 23 0A 00 00 13 00 00 00 36 00 0E 00 14 00 10 00 08 00 02 00 17 00 0E 50 0F 00 00 00 16 00 02 00 9D 00 00 64 0A 00 10 00 18 00 02 00 2D 55 01 5A 14 00 00 00 33 00 00 00 43 00 00 4B 1E 00 00 00 16 00 02 00 08 64 0E 64 0F 00 00 00 12 00 01 00 42 00 03 37 28 00 00 00 16 00 02 00 1D 0F 00 55 14 00 00 00 32 00 00 00 03 14 06 64 0F 00 00 00 13 00 00 00 01 00 00 4B 0A 00 00 00 16 00 02 00 4B 8C 02 5A 05 1E 00 00 32 00 00 00 39 00 00 00 0A 00 00 00 00 00 02 00 46 14 0B 64 1E 0A 08 00 12 00 01 00 4C 46 00 64 0A 14 00 00 13 00 00 00 01 00 0C 64 0F 00 00 00 16 00 02 00 17 00 00 46 14 00 00 00 16 00 02 00 58 01 0E 50 0F 00 00 00 32 00 01 00 55 00 00 00 28 00 10 00 00 00 02 00 33 00 03 00 28 00 10 00 08 00 02 00 2B 5A 0B 55 0A 00 00 00 33 00 00 00 07 FA 00 64 05 00 20 00 32 00 00 00 1D 12 00 50 0F 00 00 00 33 00 00 00 2C 32 04 5A 0A 00 00 00 32 00 00 00 25 00 0E 00 0A 00 10 00 08 00 02 00 1F 4B 05 5A 0A 1E 08 00 12 00 00 00 1F 50 00 5A 0F 0A 00 00 13 00 00 00 0A 00 00 00 1E 00 10 00 08 00 02 00 1E 00 00 00 1E 00 10 00 00 00 02 00 24 50 00 64 0A 14 00 00 12 00 01 00 28 01 00 5A 0A 00 00 00 13 00 00 00 2B 46 00 64 14 00 00 00 33 00 00 00 4F 00 00 00 0A 00 10 00 08 00 02 00 30 32 00 64 01 00 00 00 33 00 00 00 5F 00 00 00 01 00 00 00 00 00 02 00 68 0A 01 5A 0A 00 00 00 33 00 00 00 69 28 11 64 0A 64 00 00 13 00 00 00 6A 00 06 64 0A 00 00 00 16 00 02 00 5E 00 00 64 05 00 00 00 12 00 02 00 6B 00 07 64 0F 00 00 00 12 00 02 00 7D 3C 0A 64 19 0A 00 00 13 00 00 00 5C 28 00 64 0F 1E 00 00 32 00 01 00 6D 00 09 00 0A 00 00 00 00 00 02 00 63 01 00 64 0F 00 00 00 33 00 00 00 5D 00 00 64 1E 00 10 00 00 00 02 00 2B 64 02 5F 05 00 00 00 32 00 01 00 3C 00 0C 55 28 00 00 00 16 00 02 00 63 01 01 64 0F 00 00 00 33 00 00 00 64 00 07 64 0A 00 00 00 12 00 02 00 05 28 0F 64 19 0A 08 00 12 00 01 00 6F 00 00 00 0A 00 10 03 00 00 02 00 67 28 01 64 1E 00 00 01 33 00 00 00 3C 00 00 5A 0A 00 00 00 16 00 02 00 11 3C 11 00 14 00 00 00 32 00 00 00 31 00 00 4B 0A 00 00 00 16 00 02 00 8E 00 00 00 0A 00 10 00 08 00 02 00 02 5A 03 64 0A 1E 00 00 12 00 01 00 49 14 04 64 0A 64 00 00 12 00 01 00 49 41 0B 55 0A 32 00 00 12 00 01 00 70 00 04 00 14 00 40 00 00 00 02 00 06 64 0D 32 05 64 00 00 12 00 01 00 71 00 00 64 28 00 00 00 12 00 02 00 62 00 07 00 05 00 10 00 00 00 02 00 72 00 00 00 05 00 10 00 00 00 02 00 46 37 0F 5F 0F 64 08 00 12 00 01 00 6F 00 01 00 05 00 10 03 00 00 02 00 1D 19 04 50 0A 00 00 00 32 00 00 00 5E 00 00 64 05 00 00 00 12 00 02 00 1B 5A 10 64 0F 64 04 00 33 00 00 00 73 00 05 00 0A 00 10 00 00 00 02 00 03 3C 0C 64 05 00 00 00 12 00 01 00 74 00 00 00 0A 00 10 03 00 00 02 00 3A 00 00 64 14 00 00 00 16 00 02 00 75 1E 05 5A 14 00 00 00 33 00 00 00 65 28 00 64 28 00 00 00 33 00 00 00 76 00 00 5A 0F 64 00 00 16 00 02 00 9D 00 00 00 0A 00 10 00 0A 00 02 00 06 41 0D 64 14 1E 00 00 13 00 00 00 77 0A 06 5F 14 00 00 00 33 00 00 00 8A 46 08 5A 19 0A 00 00 33 00 00 00 6A 00 00 64 05 00 00 00 16 00 02 00 78 00 00 64 0F 00 00 00 16 00 02 00 61 00 00 00 0A 00 01 00 00 00 02 00 66 00 00 00 05 00 10 00 08 00 02 00 79 01 00 64 14 00 00 00 33 00 00 00 7A 01 00 5A 0F 00 00 00 12 00 00 00 7B 01 00 64 14 00 00 00 33 00 00 00 7C 00 00 00 19 00 10 00 08 00 02 00 5B 00 00 64 14 00 00 00 12 00 02 00 7D 64 0A 5F 05 32 00 00 12 00 00 00 7E 01 04 64 1E 00 20 00 32 00 00 00 4C 64 01 32 05 64 00 00 13 00 00 00 00 78 06 55 0A 00 00 00 33 00 00 00 06 3C 10 64 14 1E 00 00 32 00 01 00 7F 00 00 00 28 00 10 00 00 00 02 00 5A 00 00 64 05 00 00 00 12 00 02 00 80 28 11 64 14 00 00 00 13 00 00 00 81 14 00 64 28 00 00 00 33 00 00 00 18 00 00 64 14 00 08 00 16 00 02 00 45 64 08 4B 0F 1E 00 00 13 00 00 00 8B 32 08 5F 23 0A 00 00 13 00 00 00 4E 46 01 64 0A 00 00 FF 33 00 00 00 84 00 00 00 05 00 10 00 08 00 02 00 85 00 0C 00 05 00 10 00 08 00 02 00 86 00 00 00 05 00 10 00 08 00 02 00 87 01 00 64 0F 00 00 00 32 00 01 00 2B 64 01 50 05 00 00 00 33 00 00 00 92 28 10 64 14 14 08 00 32 00 01 00 88 00 0B 00 05 00 10 00 00 00 02 00 89 00 0A 00 05 00 10 00 00 00 02 00 48 50 11 64 0F 14 00 00 13 00 00 00 90 01 0E 64 14 00 01 FB 10 00 01 00 8F 00 00 00 0A 00 00 00 08 00 02 00 67 50 00 64 05 00 00 01 33 00 00 00 8C 3C 05 64 05 0A 00 00 13 00 01 00 48 50 07 64 0F 14 00 00 12 00 01 00 94 50 0E 5A 0F 00 00 00 00 00 01 00 45 14 01 64 0F 32 00 00 13 00 00 00 2A 0F 0B 46 0F 64 00 00 32 00 01 00 9A 0A 11 64 0A 00 00 00 32 00 00 00 9E 28 00 64 0A 00 00 01 12 00 00 00 9F 32 00 64 0A 64 04 00 32 00 01 00 A0 00 00 00 0A 00 10 00 08 00 02 00 A1 64 00 64 0A 00 00 00 22 00 01 00 A2 00 00 00 0A 00 10 00 08 00 02 00 04 64 0A 5A 0A 0A 08 00 12 00 01 00 A4 00 0F 00 0A 00 10 00 02 00 02 00 A5 00 11 64 0F 00 00 00 12 00 02 00 A6 00 11 64 0F 00 00 00 16 00 02 00 A7 00 0A 4B 0F 00 00 00 16 00 02 00 A8 00 11 64 0A 00 00 00 12 00 02 00 A9 46 00 64 14 00 00 00 13 00 00 00 AA 96 01 64 14 00 00 FD 03 00 00 00 AB 3C 00 64 0A 00 00 00 13 00 00 00 AC 00 00 64 14 00 10 03 00 00 02 00 AD 00 00 00 14 00 01 00 00 00 02 00 AE 00 0D 64 14 00 10 00 08 00 02 00 AF 00 11 64 14 00 00 00 02 00 02 00 B0 00 00 64 14 00 10 05 00 00 02 00 B1 00 0E 64 0A 00 00 00 12 00 02 00 B2 00 0E 64 0A 00 00 00 00 00 02 00 B3 00 00 64 0A 00 10 00 02 00 02 00 B4 00 00 64 14 00 01 00 00 00 02 00 B5 00 0C 64 14 00 10 00 08 00 02 00 B6 78 01 64 05 00 00 00 13 00 00 00 B7 00 0E 64 0F 00 01 04 00 00 02 00 B8 00 00 64 0A 00 10 00 00 00 02 00 B9 3C 01 64 0A 00 00 FC 33 00 00 00 BA 4B 01 64 0F 00 00 00 33 00 00 00 BB 00 00 64 0A 00 00 00 16 00 02 00 BC 14 11 64 14 64 00 00 13 00 00 00 BD 01 00 64 05 00 00 00 33 00 00 00 BE 96 0A 64 05 00 08 00 32 00 01 00 BF 00 0E 64 0A 00 00 00 12 00 02 00 C0 00 0E 64 0A 00 10 00 02 00 02 00 C1 00 00 64 14 00 10 00 08 00 02 00 C2 00 07 64 05 00 10 00 12 00 02 00 C3 00 11 64 0A 00 01 04 00 00 02 00 C5 46 00 64 14 1E 00 00 12 00 00 00 9B 3C 0B 64 0A 00 00 00 33 00 00 00 1D 0F 01 64 14 00 00 00 33 00 00 00 D5 00 00 64 14 00 10 00 08 00 02 00 35 00 06 64 14 00 10 00 08 00 02 00 48 46 0E 64 05 32 00 00 12 00 01 00 47 46 0E 64 05 32 00 00 12 00 01 00 3A 00 02 64 0F 00 00 00 16 00 02 00 C7 00 00 64 14 00 20 00 02 00 02 00 C8 55 0A 5A 0A 0A 00 00 13 00 00 00 C9 00 04 64 0F 00 10 00 00 00 02 00 75 1E 0F 5A 14 00 00 00 33 00 00 00 96 3C 0C 64 0F 1E 00 00 13 00 00 00 20 00 00 64 0A 00 10 00 08 00 02 00 00 5A 00 64 0A 00 08 00 12 00 01 00 CA 32 03 64 0F 1E 00 00 13 00 00 00 45 4B 00 5F 0A 32 00 00 13 00 00 00 50 96 0A 5A 05 00 00 00 32 00 01 00 50 96 0B 5A 05 00 00 00 32 00 01 00 8B 64 08 55 0A 14 00 00 33 00 00 00 96 1E 07 64 0F 1E 00 00 13 00 00 00 CB 32 00 64 0A 00 00 00 32 00 01 00 66 00 0C 00 05 00 10 00 08 00 02 00 3E 00 11 64 14 00 00 00 16 00 02 00 2B 37 02 5F 19 00 08 00 32 00 01 00 CC 8C 0A 5A 05 64 00 00 33 00 01 00 71 00 00 64 28 00 00 00 12 00 02 00 46 32 05 50 0A 64 00 00 12 00 00 00 8C 3C 06 64 05 0A 00 00 32 00 01 00 3E 00 08 55 28 00 00 00 16 00 02 00 01 00 0C 37 0F 00 00 00 16 00 02 00 CD 00 00 64 14 00 00 00 36 00 02 00 CE 00 0E 00 14 00 10 00 08 00 02 00 BE 96 0B 64 05 00 08 00 12 00 01 00 4C 4B 06 64 0F 0A 00 00 32 00 01 00 11 3C 07 00 14 00 00 00 33 00 00 00 96 50 0E 64 1E 0A 00 00 12 00 01 00 CF 55 01 5A 0F 00 00 00 33 00 00 00 2A 0F 04 46 0F 64 00 00 32 00 00 00 26 01 0F 1E 05 00 00 00 12 00 01 00 49 5F 0B 55 0A 1E 08 00 32 00 01 00 1D 0A 0C 64 1E 00 00 00 32 00 00 00 11 3C 02 00 14 00 00 00 33 00 00 00 1D 0A 0F 64 1E 00 00 00 32 00 00 00 33 00 08 00 0F 00 10 00 08 00 02 00 6A 00 00 64 05 00 00 00 16 00 02 00 0A 00 00 00 28 00 10 00 08 00 02 00 00 50 10 64 0F 00 00 00 33 00 00 00 50 96 0C 5A 05 00 00 00 32 00 01 00 D0 00 01 00 14 00 10 00 08 00 01 00 9B 55 02 55 05 1E 00 00 33 00 00 00 46 37 04 5F 0F 64 00 00 32 00 01 00 D1 32 03 64 19 0A 00 00 33 00 00 00 69 28 00 64 28 64 00 00 12 00 00 00 C6 78 0D 64 0F 00 00 00 33 00 00 00 11 3C 0C 00 14 00 00 00 32 00 01 00 D2 00 0B 64 0F 00 10 00 00 00 02 00 D3 00 0E 00 14 00 10 00 08 00 02 00 2B 46 0C 64 0F 00 00 00 33 00 00 00 D4 00 10 00 14 00 10 00 08 00 02 00 1D 19 05 50 0A 00 00 00 32 00 00 00 11 3C 0D 00 14 00 00 00 32 00 01 00 4C 3C 0B 64 14 14 00 00 32 00 01 00 94 78 08 55 05 00 00 00 00 00 01 00 CC 8C 0E 5A 05 64 00 00 32 00 01 00
It is important to use the CTRL+B combination to perform data overwriting and not an addition.
Before continuing, it's necessary to explain how this change allows the classification of moves as physical or special.
The rom contains a table of moves, in which for each a space of 0xC bytes is prepared, for a total of 0x1098 bytes.
By default, the eleventh byte of each entry is unused and set to 0.
Through this modification, the eleventh byte is used to discriminate whether a move is physical (0), special (1) or status(2).

Another method to change the type of move (physical or special) is to use a specific tool such as, for example, G3T.

#4 - ASM routines and general explanations
The only routine we're going to use in these implementations is the following:
.THUMB
.ALIGN 2

LDR R1, = 0x02024BE6
LDRH R1, [R1]

MOV R0, #0xC
MUL R1, R0
LDR R0, = 0x081FB12C
ADD R0, R0, R1

LDRB R0, [R0, #10]

CMP R0, #0
BEQ PHYSICAL

LDR R0, = 0x0803C132+1
BX R0

PHYSICAL:
LDR R0, = 0x0803BFC4+1
BX R0
After compiling the routine in a free offset, you need to make a change with the Hex Editor:
Go to 0x3BFBC and overwrite the bytes with 00490847XXXXXX08.
Instead of the XX, will be entered the offset of previous routine + 1 and in Little Endian format (example: 08123456 -> 57 34 12 08).
The routine is very simple:
After reading the index of the move that will be used, it will be multiplied with the value 0xC and the result will be added to the offset 0x1FB12C.
This calculation allows us to identify the offset of the move entry within the table in the rom.
Subsequently, the eleventh byte of the table entry is read, the one used previously used to discriminate the type of move.
Based on the value read, the execution of the code will be redirected to the corresponding physical or special damage calculation branch.

#5 - Alternative method
Another method by which this implementation can be done is the following:
03BA94: 80 7A
03BFBE: 00 29
03BFC0: 00 D0
03C124: 02 2E
03C126: 00 DB
03C12C: 01 28
03C12E: 00 D0
Through HxD, go to the offsets shown in the left column and overwrite the bytes with the values in the right column.
I would like to thank Kurasukun who allowed me, through his pokeemerald disassembly guide, to terminate this implementation even for ruby.
 
Última edición:

Samu

Miembro insignia
Miembro insignia
Re: [RUBY] Physical/Special Split

This has been around for a while I'm afraid :( (at least for english roms). I just hope you didn't lost much time in this one.
Also, in case you dind't know, the 11th byte of each move data (which represents the move's category) can be easily changed using several tools such as "Gen3Tools" (again, I just hope u didn't changed all moves 1 by 1 in hex). Please consider to update the post with this info, to avoid a new guy losing too much time in something he doesn't really need to.
 

Andrea

Usuario mítico
Respuesta: Re: [RUBY] Physical/Special Split

This has been around for a while I'm afraid :( (at least for english roms). I just hope you didn't lost much time in this one.
Also, in case you dind't know, the 11th byte of each move data (which represents the move's category) can be easily changed using several tools such as "Gen3Tools" (again, I just hope u didn't changed all moves 1 by 1 in hex). Please consider to update the post with this info, to avoid a new guy losing too much time in something he doesn't really need to.
I was aware that this implementation had been developed for some time, but only on firered and emerald!
I'm pretty sure that there is no patch for the ruby to implement the PSS, that's why i wrote a guide about it!
If i'm remember correctly, only ChaosRush publishes a guide with a patch for ruby, but it was removed due to some problems with the battle system.
Anyway, thanks so much for the suggestions, as soon as i have some time i'll update the guide!
 

Samu

Miembro insignia
Miembro insignia
Re: Respuesta: Re: [RUBY] Physical/Special Split

I was aware that this implementation had been developed for some time, but only on firered and emerald!
I'm pretty sure that there is no patch for the ruby to implement the PSS, that's why i wrote a guide about it!
If i'm remember correctly, only ChaosRush publishes a guide with a patch for ruby, but it was removed due to some problems with the battle system.
Anyway, thanks so much for the suggestions, as soon as i have some time i'll update the guide!
It was also done for ruby (don't really know if its here or in pokeco), I can tell you this 100%. I was in Hoenn Adventures dev team (wich was realeased a year ago), and that game runs the split in ruby. That system was implemented 2 to 3 years ago.

I don't know if the system implemented was the ChaosRush patch tho, since it was done way before I joined the team hahhaha.

Anyways, its fine.
 

Versekr Dark

Usuario mítico
Re: Respuesta: Re: [RUBY] Physical/Special Split

Yo uso este.

03BA94: 80 7A
03BFBE: 00 29
03BFC0: 00 D0
03C124: 02 2E
03C126: 00 DB
03C12C: 01 28
03C12E: 00 D0
 
Última edición:
Arriba