diff options
author | SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> | 2021-12-29 19:14:35 -0800 |
---|---|---|
committer | SonikkuA-DatH <58025603+SonikkuA-DatH@users.noreply.github.com> | 2021-12-29 19:14:35 -0800 |
commit | 1682f5939dd998dc167da9898c730046ffadf26b (patch) | |
tree | ee39c459cf54b647fe6650cbe3484f0791f96c4e | |
parent | a9532e4e3bf2365fc880524e0ffa77536ef1f053 (diff) |
Adding relevant information for disabling disabled anims
-rw-r--r-- | Forcing-Battle-Animations-for-Major-Battles.md | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Forcing-Battle-Animations-for-Major-Battles.md b/Forcing-Battle-Animations-for-Major-Battles.md new file mode 100644 index 0000000..0d0b179 --- /dev/null +++ b/Forcing-Battle-Animations-for-Major-Battles.md @@ -0,0 +1,47 @@ +Caveat: this is for scripted events. Battles triggered by a trainer seeing you causes glitches if one tries editing their script +As such, this is for trainers using `trainerbattle_no_intro` + +--- +Remember how in Pokemon RGB, fighting the rival champion forced battle anims on, even if you set it off before? Which made the fight seem more special? + +Despite this not appearing in later gens for some reason, we can add it back! + +First, make a new var (or recycle an unused on) to use for setting a value in [include/constants/vars.h](https://github.com/pret/pokeemerald/blob/master/include/constants/vars.h) + +```diff +#define VAR_ROXANNE_CALL_STEP_COUNTER 0x40F4 +#define VAR_SCOTT_BF_CALL_STEP_COUNTER 0x40F5 +#define VAR_RIVAL_RAYQUAZA_CALL_STEP_COUNTER 0x40F6 +-#define VAR_UNUSED_0x40F7 0x40F7 // Unused Var ++#define VAR_FORCEANIM 0x40F7 +``` + +In scripting, we'll use this to determine when we want to force Battle anims on + +In [src/battle_main.c](https://github.com/pret/pokeemerald/blob/master/src/battle_main.c) , in `static void BattleStartClearSetData(void)`, tweak this... + +```diff +-if (!(gBattleTypeFlags & BATTLE_TYPE_LINK) && gSaveBlock2Ptr->optionsBattleSceneOff == TRUE) ++if (!(gBattleTypeFlags & BATTLE_TYPE_LINK) && gSaveBlock2Ptr->optionsBattleSceneOff == TRUE && VarGet(VAR_FORCEANIM) != 1) +``` + +So now the variable actually matters + +But wait, you might ask. What if I lose those important fights? +No worry, in [src/overworld.c](https://github.com/pret/pokeemerald/blob/master/src/overworld.c) just go to `void DoWhiteOut(void)` and add a varset before warping, like so + +```diff +void DoWhiteOut(void) +{ + ScriptContext2_RunNewScript(EventScript_WhiteOut); + SetMoney(&gSaveBlock1Ptr->money, GetMoney(&gSaveBlock1Ptr->money) / 2); ++ VarSet(VAR_FORCEANIM, 0); + HealPlayerParty(); + Overworld_ResetStateAfterWhiteOut(); + SetWarpDestinationToLastHealLocation(); + WarpIntoMap(); +} +``` + +And you're done, functionality wise! +Just edit your event scripts to set and unset the variable (for when you win) for the important trainer, and you're set [like soo...](https://i.imgur.com/nnQtpUv.mp4)
\ No newline at end of file |