Code Monkey home page Code Monkey logo

bpre-move-item's Introduction

Move Item

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.

Build Instructions

See here for the prequisites and help in installing them.

Cloning the repo

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

Adding your ROM

Copy your ROM to this directory and rename it rom.gba.

Repointing sCursorOptions

Every cursor option in the party menu (SUMMARY, TAKE, CUT, etc) has an associated entry in sCursorOptions. We're adding a new cursor option, MOVE, so we'll need to repoint sCursorOptions and add the new entry. However, we can't just repoint it the normal way. Repointing it and adding the entry for MENU at the end would cause it to treat MENU as a field move, causing some weird bugs.

Repointing it properly is somewhat involved, so repoint-cursor-options.asm is included to do it for you. You'll need to modify it slightly, however.

Open repoint-cursor-options.asm in the text editor of your choice.

Modify the definition of free_space. The table will be repointed to wherever you specify, so make sure it's actually free space in your ROM. Look for 0x100 bytes of free space from a word aligned address (read: an address ending in 0, 4, 8, or C).

By default, FR has 12 field moves. If you've previously expanded them - for example, to add Rock Climb - update the definition of NUM_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 for MENU_MOVE_ITEM, though it should always be 0x12.

Building the project itself

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 of START_AT in config.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 use START_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 decapitalize MOVE to Move - they can be found and modified in src/strings.c.

Once you're ready, run the following to build the project:

make

Also unlike the previous step, this won't actually modify rom.gba, instead your output will be in test.gba. Naturally, test it in an emulator.

Credits

The project structure and some of the build tools are from pokeemerald.

bpre-move-item's People

Contributors

zeturic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bpre-move-item's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.