Thread: [Resource] ROM Hacking Resources
View Single Post
Old February 10th, 2013 (8:47 AM).
Noossab Blue's Avatar
Noossab Blue Noossab Blue is offline
    Join Date: Dec 2012
    Location: USA
    Gender: Female
    Nature: Quirky
    Posts: 240
    Since this patch can hardly be called a "hack" I'm going to post it here.

    This FR patch allows you to randomize each starter choice from a predetermined list. The default is each of the first three generations' starters, but with a little bit of scripting knowledge you can change or expand the list to fit your needs.

    This is not the same as a randomizer, which randomizes the starters but then is the same each time. The randomization is built into the game, meaning every time you play/reset, the starter choices will be different.

    Here is the patch.

    It uses the space between CFF000 and CFF600 or so, and changes the pokeball scripts in Oak's lab as well as gary's to work around the randomization.

    And here are some brief instructions on how to edit the pokeball scripts to make the list whatever you like (uses XSE 1.1.1):
    #dynamic 0x800000
    #org 0xCFF000
    setvar 0x4001 0x0
    checkflag 0x200
    if 0x0 call 0x8CFF040 <-if you want to use more than 3 in the list, change this to @starter (or whatever)
    copyvar 0x4002 0x5000
    setvar 0x4003 0x4
    setvar 0x4004 0x7
    compare 0x4055 0x3
    if 0x4 goto 0x8169DE4
    compare 0x4055 0x2
    if 0x1 goto 0x8CFF08D
    msgbox 0x818EA19 MSG_KEEPOPEN '"Those are POKé BALLS.\nThey contai..."

    #org 0xCFF040 <-If you want to use more than 3 in the list, change this to @starter as well (or whatever you used previously)
    random 0x3 <-change this to however many options you want
    copyvar 0x8008 LASTRESULT
    compare 0x8008 0x0
    if 0x1 call 0x8CFF06E
    compare 0x8008 0x1
    if 0x1 call 0x8CFF075
    compare 0x8008 0x2 <-Copy these two lines, replacing 0x2 with 0x3, 0x4 and so on until you have as many choices as you want
    if 0x1 call 0x8CFF07C <-Change the pointer each time to @1, @2, and so on
    setflag 0x200 <-Paste the new lines before this

    #org 0x169DE4
    msgbox 0x818EA45 MSG_KEEPOPEN '"That's PROF. OAK's last POKéMON."

    #org 0xCFF08D
    applymovement 0x4 0x81A75EF
    waitmovement 0x0
    showpokepic 0x4002 0xA 0x3
    textcolor 0x0
    bufferpokemon 0x0 0x4002
    compare 0x4001 0x0
    if 0x1 goto 0x8169C14
    compare 0x4001 0x1
    if 0x1 goto 0x8169C33
    compare 0x4001 0x2
    if 0x1 goto 0x8169C52

    #org 0xCFF06E <- Copy the next 3 lines as many times as you added to the previous section and paste it just below the return. Change the pointer to @1, @2, and so on
    setvar 0x5000 0x1 <-Change the 0x1 to the hex number of whatever pokemon you want to be available in the new list items (See this)

    #org 0xCFF075
    setvar 0x5000 0x98

    #org 0xCFF07C
    setvar 0x5000 0x115
    IGN: Anna/Noossab Blue
    3DS FC: 3196 3609 8450

    Thanks to SilverGrey for the awesome banner! Click to see!
    Current as of 1/31/14: I updated again!