Battle Arcade - PokemonSanFran/pokeemerald GitHub Wiki
Introduction
This branch allows developers to add the Battle Arcade to their pokeemerald decompilation projects.
The Battle Arcade is a battle facility challenge introduced in Pokémon Platinum that takes place in the Battle Frontier. The goal is for challengers to win seven consecutive battles while getting randomly assigned effects to their or the enemy's party.
This is not a 1:1 recreation of the Battle Arcade. The goal was able re-imagine the Battle Arcade as a Battle Facility in pokeemerald, adhering to the common conventions of pokeemerald while retaining the original spirit of the battle mode.
Features
Duplicate Items Allowed
The Battle Facilities in pokeemerald typically enforce Item Clause, but this restriction is removed when registering for the Battle Arcade. Players will receive their items back at the end of the challenge.
Game Board
User Interface
The Game Board returns, with all of the same functionality from Generation 4.
Events
Most* of the events from Generation 4 return, and function exactly as they did in Generation 4. Events last for the same duration as they do in Generation 4 (one battle or one challenge).
Snow Overworld
The Hail effect from the Game Board works by setting the Snow overworld effect. This effect is broken in vanilla pokeemerald, but a fix has been implemented.
Minimally Invasive
Most of the functions used for the Battle Arcade minimally interact with the existing scripts for the Battle Frontier, in order to reduce conflicts and help developers more easily integrate the branch in their code base. It is possible for a developer to replace an existing facility with the Battle Arcade, as opposed to a standalone facility as it is now.
Symbols
- After winning
ARCADE_SILVER_BATTLE_NUMBER(default 21) battles in a row, the player receivesFLAG_ARCADE_SILVER_PRINT. - After winning
ARCADE_GOLD_BATTLE_NUMBER(default 49) battles in a row, the player receivesFLAG_ARCADE_GOLD_PRINT. - For each of the aforementioned milestones, the
Pike QueenArcade Star Dahlia will challenge the player.
Optional
Maps / Scripts
This branch comes with the scripts required for the entire facility to work. Optionally, the developer can pull the battle_arcade_maps branch, which features the Lobby and Battle Room (copied from the Battle Pike). .pory files are also included for developers that utilize poryscript.
Fog / Trick Room
The Battle Arcade has two events for creating a Fog event and starting the battle with Trick Room. These do not exist in pokeemerald and therefore are disabled from ever being generated.
If the developer is using pokeemerald-expansion, these will be automatically enabled. (VAR_STARTING_STATUS must be defined for Trick Room to work.) Developers using a custom implementation of Trick Room or Fog can manually enable these by removing the checks for RHH_EXPANSION.
Changes from Generation 4
Level Scaling
There is no level scaling.
- In the Level 50 mode, all enemies are Level 50.
- In the Open Level mode, enemies will either be the same as the player's highest level Pokémon in their party OR Level 60, whichever is higher.
Installation
These instructions assume that you can build pokeemerald, have a basic understanding of C, and are familiar with using the in-game scripting language. If you do not, please watch the tutorials series from Team Aqua's Hideout.
If you would like the version of this branch that comes with maps, replace battle_arcade with battle_arcade_maps in all following instructions.
git merge (recommended)
From the root directory of your project, run the following commands in your terminal program of choice:
git remote add psf-emerald https://github.com/PokemonSanFran/pokeemerald/ # This adds our team's `pokeemerald` branch as a remote repo.
git pull psf-emerald battle_arcade # This pulls in the battle_arcade feature branch
Manual merge
If your project is:
- Too far behind
pokeemerald - Using a different base (pokeemerald-expansion or pokefirered)
- Some other reason that I can't think of
You can manually implement the features using the diff between this branch and vanilla pokeemerald as a guide. You will need to manually edit or create each of these files in your project to properly recreate the feature.
Warnings
Saveblock2 space
The Battle Arcade consumes 2 variables, 2 flags, and 34 bytes of space on gSaveblock2.
- Two variables for storing the item / berry that is given to the player or enemy for the "Give Item / Berry" event. This is generated at the beginning of a challenge and remains the same for the entirety of the challenge.
- Two flags to indicate that the player has achieved the Silver and Gold Prints.
CursorDatastores the speed at which the cursor moves, the position of the cursor at the end of the last game, and the mode of the cursor. These are generated at the end of every game and need to persist until the beginning of the next game. They are reset at the beginning of a challenge.
struct CursorData
{
u8 speed:3; // 3 bits
u8 position:5; // 5 bits
bool8 isRandom; // 1 bit
}__attribute__((packed));
// 2 bytes total
struct CursorData gameCursor; // 2 bytes (have to round up)
// FRONTIER_MODE_COUNT is 4
// FRONTIER_LVL_MODE_COUNT is 2
// u16 is 2 bytes
// FRONTIER_MODE_COUNT * FRONTIER_LVL_MODE_COUNT * u16 = 16 bytes
u16 arcadeWinStreaks[FRONTIER_MODE_COUNT][FRONTIER_LVL_MODE_COUNT]; // 16 bytes
u16 arcadeRecordWinStreaks[FRONTIER_MODE_COUNT][FRONTIER_LVL_MODE_COUNT]; // 16 bytes
// 34 bytes total
Usage
Script Dependency
⚠️ If you pull the battle_arcade branch, this feature will not work out of the box. ⚠️
data/scripts/battle_arcade_battle.incanddata/scripts/battle_arcade_registration.inchave all of the functions for the Battle Arcade to work, but all of the calls to map specific scripts have been commented out. You will need to manually re-enable them.- To start a Battle Arcade challenge, run the script
BattleArcade_Registration_EventScript_Attendant. - To check the Battle Arcade records, run the script
BattleArcade_Registration_EventScript_AskModeResultsBoard.
- To start a Battle Arcade challenge, run the script
data/maps/BattleArcade_BattleRoom/scripts.inchas the mapscripts that are required to go in the arena of the Battle Room of the Battle Arcade.
All aforementioned directories contain .pory files are also included for developers that utilize poryscript.
Unfinished Functionality
I will happily accept a pull request to add missing functionality. Please reach out if you'd like to collaborate! I am pkmnsnfrn on Discord.
Link Multi Battles
Generation 4 allows players to participate in the Battle Arcade with another human on a separate Nintendo DS system. The branch currently contains all of the text required for Link Multis, and some of the required registration scripts.
Overworld Effects
The original Battle Arcade plays an overworld animation for the impacted participant during an event, and shows that effect on a monitor.
CRT Scanlines
The Game Board has an effect where scanlines appear, as if the board was being viewed on a CRT display.
Support
Frequently Asked Questions (FAQ)
n/a
Other Questions
If you have read all of the documentation here and still have questions, please ask a good question in the pokeemerald channel of the pret Discord server. You can tag pkmnsnfrn and we will try to help if we can.
Donations
If you got some use out of this feature, please consider donating. We are currently not taking any donations, so please donate to some of our favorite charities.
- Centre for Effective Altruism USA Inc.
- Doctors Without Borders, USA
- The Climate Reality Project
- First Nations Development Institute
Contributors
Magpie
- Discovered Performance Points
Joggel | Aereon | PCG | The Chef
- Playtested and found bugs
Kurausukun
- Translated and interpreted how Platinum's Battle Arcade worked
mystic magnetism
- Created all sprites and backgrounds adapted from Platinum
Pawkkie
- Tested and reviewed documentation
CHANGELOG
All changes to this project will be documented in this section. The format is based on Keep a Changelog, and this project tries to adhere to Semantic Versioning.
Unreleased
n/a