- 330
- Posts
- 11
- Years
- Seen Mar 29, 2024
Pokeruby & Pokeemerald Hackathon
What is it?
What is the theme?
How do I enter?
How do I submit my project?
How do I start?
How do I edit the game?
Map/Tileset Editing
Script Editing
Graphics Editing
Data/Text Editing
Common Issues
Dates: Friday, November 2nd - Friday, November 9th
Discussion/support can be found in the pret Discord server (https://discord.gg/6EuWgX9)
Discussion/support can be found in the pret Discord server (https://discord.gg/6EuWgX9)
What is it?
A hackathon is an event, typically lasting several days, in which a large number of people meet to engage in collaborative computer programming.
The purpose of this hackathon is for people to get their feet wet with ROM hacking using the Gen 3 decompilation projects. It will last 7 days. Participants may work independently or with a group of people.
Winners will be determined at the end of the event for several categories:
The purpose of this hackathon is for people to get their feet wet with ROM hacking using the Gen 3 decompilation projects. It will last 7 days. Participants may work independently or with a group of people.
Winners will be determined at the end of the event for several categories:
- Most fun to play
- Best technical feature
- Best graphical appeal
What is the theme?
The theme of this hackathon is Pokémon Gym. It's up to you what you want to do with that theme. For example, you could redesign an existing Gym, create a brand new Gym, create a Gym rematch system, create a Gym that adapts to your current team, etc...
The theme is only there to help guide ideas. It's perfectly acceptable to do something that doesn't adhere to the theme.
The theme is only there to help guide ideas. It's perfectly acceptable to do something that doesn't adhere to the theme.
How do I enter?
Reply to this post stating that you're entering as an individual or with a team, or direct message user @ShantyTown in the PC Discord server.
How do I submit my project?
Projects should be hosted on GitHub. An easy way to do this is to "fork" one of the three GitHub repositories linked below. If you've never used Git or GitHub before, take 30 minutes to go through GitHub's introduction guides:
Reply to this post with a link to the code and patch (optional), or direct message user @ShantyTown#6258 in the PC Discord server.
Reply to this post with a link to the code and patch (optional), or direct message user @ShantyTown#6258 in the PC Discord server.
How do I start?
A pokeruby hackathon template project has been created for convenience. Participants may simply use the regular pokeruby or pokeemerald projects, if desired. Both projects are found on GitHub and can be forked (see above):
Follow the exact instructions in INSTALL.md to setup your project. Please setup your project before the hackathon starts, in case you run into any installation issues. If you run into issues, you can find support in the Discord server.
Follow the exact instructions in INSTALL.md to setup your project. Please setup your project before the hackathon starts, in case you run into any installation issues. If you run into issues, you can find support in the Discord server.
How do I edit the game?
There are no tutorials for the decompilation projects at this time. Remember that every time you make a modification to the code or data, the ROM needs to be re-compiled using "make -j4", just like when you originally setup pokeruby or pokeemerald by following the instructions in "INSTALL.md".
Map/Tileset Editing
You can edit maps using a program called porymap. It supports most things that AdvanceMap supports, such as map editing, tileset editing, event editing, and connection editing. It can be found on GitHub in the Releases tab.
Script Editing
If you know how to script with XSE, then you already know how to script with pokeruby and pokeemerald. Scripts can be edited with any text editor. The command names are similar to XSE's, but there are some differences. The full list of commands can be found in data/script_cmd_table.inc, and more details about the commands are found in include/macros/event.inc.
Map scripts are found inside individual map directories. For example, data/maps/LittleRootTown/scripts.inc. The text for the scripts are found right next to the scripts in data/maps/LittleRootTown/text.inc. Note that it's valid to simply put text in the same file as scripts.
Once you've written a script, you would copy paste the script's label into the corresponding event in porymap (see map editing above).
Map scripts are found inside individual map directories. For example, data/maps/LittleRootTown/scripts.inc. The text for the scripts are found right next to the scripts in data/maps/LittleRootTown/text.inc. Note that it's valid to simply put text in the same file as scripts.
Once you've written a script, you would copy paste the script's label into the corresponding event in porymap (see map editing above).
Graphics Editing
The decompilation projects use indexed .png image files for graphics. To modify existing graphics, you would open the image in an image editor, such as GraphicsGale or Gimp, make modifications, and save over the original image. For many graphics, the palettes are generated from the indexed .png file itself. Other graphics share palettes, and you would need to modify the `.pal` file itself using a text editor, which is a very simple format containing a list RGB (red, green, blue) values.
Data/Text Editing
All of the data in the game can be edited using a text editor. Some data is found in the data/ directory, whereas other data is found in src/data/. If there is some data you can't find after searching, just ask someone.
Common Issues
When editing text, be careful when using the apostrophe character (') in words like "won't" or "let's". The correct character to use for that is '. For example, "won't" or "let's". You can simply copy-paste that character from here or the existing texts in project. Using a regular apostrophe character (') will cause an error like this:
-----
When adding a brand new .c file to the project, you will need to add new content to ld_script.txt. This is the linker script which specifies the order in which files will appear in the built ROM. If you're adding .c code, you must add an entry like this right after the other lines in the .text section:
If you're adding any readonly data (data that's prefaced with const) in the new .c file, you would need to add a line like this in the .rodata section:
An example of .rodata would be things like this:
Code:
data/maps/LittlerootTown/text.inc:4: error: unknown character U+27
make: *** [Makefile:157: build/ruby/data/event_scripts.o] Error 1
-----
When adding a brand new .c file to the project, you will need to add new content to ld_script.txt. This is the linker script which specifies the order in which files will appear in the built ROM. If you're adding .c code, you must add an entry like this right after the other lines in the .text section:
Code:
src/my_new_file.o(.text);
If you're adding any readonly data (data that's prefaced with const) in the new .c file, you would need to add a line like this in the .rodata section:
Code:
src/my_new_file.o(.rodata);
An example of .rodata would be things like this:
Code:
static const u16 sShortStreakPrizes[] =
{
ITEM_HP_UP,
ITEM_PROTEIN,
ITEM_IRON,
ITEM_CALCIUM,
ITEM_CARBOS,
ITEM_ZINC,
};
...
const struct WildPokemon PetalburgCity_WaterMons [] =
{
{20, 30, SPECIES_MARILL},
{10, 20, SPECIES_MARILL},
{30, 35, SPECIES_MARILL},
{5, 10, SPECIES_MARILL},
{5, 10, SPECIES_MARILL},
};
Last edited: