• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Development: [FR] Gen. 6 Exp All - Updated tutorial with data from all sources

3
Posts
7
Years
    • Seen Nov 19, 2023
    Exp. All via remodel of Exp. Share
    FireRed USA Version 1.0

    This tutorial shows how to add Gen. 6 Exp. All system to Fire Red and attach it to a key item that enables or disables it. It is based on existing tutorials with the few errors or bugs patched and puts together various pieces of info to have it grouped in one single tutorial.
    For the purpose of this tutorial the item will be the Exp. Share.

    This tutorial is aimed for users with little to no knowledge of AM or HexEditing.

    The first thing you need to do is find around 420 bytes of free space. Not all is needed but it is better to be safe than sorry. You can do this with a Free Space Finder tool, HexManiacAdvanced or simply by scrolling down to almost the bottom of ROM in a HexEditor and finding a bunch of FF.

    In your favorite Hex Editor go to the first address of the free space, in my case F6 88 40, and copy paste the following:
    Code:
    28 68 01 1C 53 31 08 78 07 B4 11 48 11 4A 0E B4 00 F0 1D F8 0E BC 01 28 15 D1 07 BC 78 B4 0E 4E 33 78 0E 4C 64 25 5D 43 64 5D 06 2C 01 D0 01 22 00 E0 00 22 01 33 06 2B 00 D1 00 23 33 80 78 BC 04 B4 07 4A 10 47 07 BC 01 22 02 40 F8 E7 10 47 00 02 00 00 D1 E6 06 08 B8 F0 02 02 97 42 02 02 D1 1C 02 08

    This a compiled ASM routine that is actually doing the Exp All. This was compiled using the flag 0x200 and variable 0x4000, if you wish to use different ones please follow the links in credits to see more in depth how it works.

    Now take that address, F6 88 40, and save it in notepad, we are going to use it in the following instructions:

    Go to 0x08021C3A and overwrite with
    Code:
    01 21
    Go to 0x08021D70 and write
    Code:
    01 20
    Go to 0x08021CC6 and write the following:
    Code:
    C0 46 00 4A 10 47 [XX+1 XX XX 08] 04 BC
    Where XX XX XX is the reversed address + 1 so in my case:
    Code:
    F6 88 40 + 1 -> F6 88 41 -> 41 88 F6 -> C0 46 00 4A 10 47 41 88 F6 08 04 BC

    Ok great so now the game HAS the Exp All system and it is activated by setting the flag 0x200. If at this point you feel confident enough to go and create an NPC or menu option that sets and clears this flag please go ahead, it is the best way of learning.

    Now how to make it so Exp Share does this?

    First we will use a script that handles clearing and setting the flag with a Yes/No box, find the next empty address after the previous code, I used F6 88 C0, and insert the following:
    Code:
    6A 5A 0F 00 F5 88 F6 08 09 05 21 0D 80 01 00 06 01 DD 88 F6 08 06 00 E9 88 F6 08 6C 02 29 00 02 0F 00 06 89 F6 08 09 06 02 2A 00 02 0F 00 18 89 F6 08 09 06 02 BF E2 D5 D6 E0 D9 00 BF EC E4 AD 00 BB E0 E0 AC FF BF EC E4 AD 00 BB E0 E0 00 BF E2 D5 D6 E0 D9 D8 AD FF BF EC E4 AD 00 BB E0 E0 00 BE DD E7 D5 D6 E0 D9 D8 AD

    Now we will make it so this function can be called by an item thanks to Lunos research, we first reverse the address we got before, so F6 88 C0 becomes C0 88 F6, and then we replace XX XX XX in the following with it:
    Code:
    10 B5 04 1C 78 46 13 30 0C 49 08 60 20 1C 0C 49 00 F0 10 F8 10 BC 01 BC 00 47 10 B5 04 1C 0A 48 05 49 00 F0 07 F8 20 1C 06 49 00 F0 03 F8 10 BC 01 BC 00 47 08 47 C0 46 E5 9A 06 08 98 99 03 02 3D 10 0A 08 09 75 07 08 [B]XX XX XX[/B] 08​
    In my case it became:
    Code:
    10 B5 04 1C 78 46 13 30 0C 49 08 60 20 1C 0C 49 00 F0 10 F8 10 BC 01 BC 00 47 10 B5 04 1C 0A 48 05 49 00 F0 07 F8 20 1C 06 49 00 F0 03 F8 10 BC 01 BC 00 47 08 47 C0 46 E5 9A 06 08 98 99 03 02 3D 10 0A 08 09 75 07 08 [B]C0 88 F6[/B] 08​

    Now we grab the next empty space area, for me it was F6 89 90, and we insert the above there. Please note, I left some empty space between each of these insertions in case mistakes were made or in case in the future i wanted to edit the scripts, you don't have to do the same.

    And now for the last touch we can use a basic HexEditor, or the Item Manager tool, or HexManiacAvance.
    • Basic HexEditor
      Spoiler:
    • Item Manager
      Spoiler:
    • HexManiacAdvance
      Spoiler:

    After this everything should be working fine. I recommend giving the Exp Share via Oak or some other way, personally I just leave it in PC at start of game.

    If you have any questions feel free to post them here but please note that:
    - This was made simply to recompile info that was spread about, the original creators of these scripts are probably better sources of info in their respective threads.
    - This was made for FIRE RED not leaf green or emerald or anything else AND for the US version, I sadly do not have time to review all info for those and will not be able to offer much help for those.

    Credits to most of the work of this tutorial go to Samu, Lunos and BluRose as well as users in their respective threads:
    - https://whackahack.com/foro/threads/e-exp-all.53691/
    - https://whackahack.com/foro/threads/e-fr-r-activar-un-script-usando-un-objeto.37043/

    Changelog:
    Spoiler:
     
    Last edited:
    4
    Posts
    2
    Years
    • Seen Dec 1, 2022
    This code here kept giving me an error.
    6A 5A 0F 00 F5 88 F6 08 09 05 21 0D 80 01 00 06 01 DD 88 F6 08 06 00 E9 88 F6 08 6C 02 29 00 02 0F 00 06 89 F6 08 09 06 02 2A 00 02 0F 00 18 89 F6 08 09 06 02 BF E2 D5 D6 E0 D9 00 BF EC E4 AD 00 BB E0 E0 AC FF BF EC E4 AD 00 BB E0 E0 00 BF E2 D5 D6 E0 D9 D8 AD FF BF EC E4 AD 00 BB E0 E0 00 BE DD E7 D5 D6 E0 D9 D8 AD

    But I used Dark Gyarados' script as reference, compiled it in XSE and got it working.
    #dynamic 0xXXXXXX //offset for this script, example above was F688C0
    #org @start
    checkflag 0x200
    if 0x0 goto @turnon
    goto @turnoff

    #org @turnon
    setflag 0x200
    sound 0x2
    msgbox @display1 0x4
    closeonkeypress
    release
    end

    #org @turnoff
    clearflag 0x200
    sound 0x3
    msgbox @display2 0x4
    closeonkeypress
    release
    end

    #org @display1
    = The EXP. SHARE was turned on.

    #org @display2
    = The EXP. SHARE was turned off.

    I hope this helps someone who runs into a similar issue. Thanks for the great reference, Mixone!

    Question: Do you know how to limit the exp gain displayed? Instead having something like, "the rest of the party gained exp from exp share."

    And if you know how to have only participating mons get the full 100% while bench gets 50% -- would be helpful.
     
    Last edited:
    3
    Posts
    7
    Years
    • Seen Nov 19, 2023
    Haven't looked into the "the rest got exp" in binary sadly, I have done it in decomps though, it is much easier
     
    4
    Posts
    2
    Years
    • Seen Dec 1, 2022
    Agreed. Making changes to the battle scripts in a FR decomp should, in theory, achieve this. Unfortunate, tho, is that not alot of tutorials are being published for FR decomps.
     
    Back
    Top