- Notifications
You must be signed in to change notification settings - Fork0
Move items between Pokemon in party menu in FR.
License
Zeturic/bpre-move-item
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Black and White 2 introduced a feature where you can move items directly between two Pokémon in your party from within the party menu, rather than having to use the bag as middle man. This ports that feature to FR ROMs.
Seehere for the prequisites and help in installing them.
Open your terminal to whatever folder you want to download this repo into. Then, do the following to download the repo and build the included tools:
$ git clone https://github.com/Zeturic/bpre-move-item.git$cd bpre-move-item
Copy your ROM to this directory and rename itrom.gba
.
Every cursor option in the party menu (SUMMARY
,TAKE
,CUT
, etc) has an associated entry insCursorOptions
. We're adding a new cursor option,MOVE
, so we'll need to repointsCursorOptions
and add the new entry. However, we can't just repoint it the normal way. Repointing it and adding the entry forMENU
at the end would cause it to treatMENU
as a field move, causing some weird bugs.
Repointing it properly is somewhat involved, sorepoint-cursor-options.asm
is included to do it for you. You'll need to modify it slightly, however.
Openrepoint-cursor-options.asm
in the text editor of your choice.
Modify the definition offree_space
. The table will be repointed to wherever you specify, so make sure it's actually free space in your ROM. Look for0x100
bytes of free space from a word aligned address (read: an address ending in0
,4
,8
, orC
).
By default, FR has12
field moves. If you've previously expanded them - for example, to add Rock Climb - update the definition ofNUM_FIELD_MOVE_CURSOR_OPTIONS
.
Once you're done modifying it, save it and return to the terminal and run:
$ make repoint-cursor-options
Your ROM will be modified in place, and it'll give you output describing what it did. It'll also give you a value forMENU_MOVE_ITEM
, though it should always be0x12
.
Unlike in the previous step, the build system is smart enough to find enough free space on its own.
However, if you want the code to be inserted at a particular address, you can specify it by updating the definition ofSTART_AT
inconfig.mk
; if the given address is acceptable (i.e. is word-aligned and has enough bytes of free space), it will be inserted there. Otherwise, it will just useSTART_AT
to determine where in the ROM it should start looking for free space.
If you want to edit the strings involved in this feature - for example, to decapitalizeMOVE
toMove
- they can be found and modified insrc/strings.c
.
Once you're ready, run the following to build the project:
make
Also unlike the previous step, this won't actually modifyrom.gba
, instead your output will be intest.gba
. Naturally, test it in an emulator.
The project structure and some of the build tools are frompokeemerald.