mirror of https://github.com/pret/pokeemerald.git
Page:
Pushing B When Asked To Stop Learning Move Will Cancel Teaching The Move
Pages
Ability Switcher via special
Add A PokeVial Item
Add Ability to Avoid Battle Damage in Debug Menu
Add Ability to Swap Bikes Whenever
Add Choice Specs Scarf hold item effects
Add Description Submenu
Add Difficulty Mode
Add In‐Cart Rumble
Add Nuzlocke Challenge
Add PC Access in PokeNav
Add Physical Special Split
Add Sleep Mode
Add Thief Ball
Add a EV IV Stat Editor UI
Add a debug menu
Adding Multi region Support
Adding Support for Connectivity with Other Hacks Whilst Maintaining Connectivity with Vanilla
Adding Time Based Encounters
Adding Walking Animations to All NPCs
Adding a New Trainer Class
Adding a New Trainer Front Picture
Adding a Pokémon Type & Disabling the Mystery Type
Adding new event object or overworld sprites
All Trees Permanently Get Cut
Allow All Pokemon to Evolve Without Trading
Allow Both Latios and Latias Appear.
Allow Feebas to be caught on any Valid Fishing Spot in Route 119 rather than only Three
Allow Jumping Over Ledges with Acro Bike
Allow Move Relearner to Teach Moves that Pre Evolutions Know
Allow Running From Trainer Battles
Allow running indoors
Amulet Coin Effects If Anyone In Party is Holding It
Automatically make the keyboard switch to lowercase after the first character
Better White Out Money Calculation
Button Press to Skip Copyright Screen
Chain Fishing
Change Enemy Trainer Parties Depending on Difficulty
Change Someone's PC to Lanette's PC from the Start of the Game
Change Starter Pokémon
Change Time Based Evolution Times
Change initial PC items
Changing the Battle Music Depending on the Opponent
Colored stats by nature in summary screen
Converting to FR Tilesets
Custom Battle Mugshots
Custom Border Dimensions
Debugging using gdb (Windows, WSL2, Visual Studio Code mGBA)
Debugging using printf
Disable Bag Use In Battle
Disable Catching Pokemon
Disable Pokémon animation on Birch's intro Pokémon
Disabling Union Room check when entering Pokémon Centers
Dynamic Trade Names
Dynamic overworld palette system
Enable the Reset RTC Feature
Enable trade with FRLG without beating the game
Expanding The Metatile Count
Extra save space with three lines of code
Faster HP Drain
Feature Branches
Fish Will Now Always Get on Hook
Fix AI's Switch In Battle
Fix Snow Weather
Fixing the aspect ratio of the Pokémon logo on the title screen
Forcing Battle Animations for Major Battles
Full Screen Start Menu by Archie and Mudskip
Gen 6 Exp Share
Gen 6 style Exp. Share Alternative Option
Get Match Calls Only If Caller Wants a Rematch
Get Rid of Battery Run Dry Error Message
Get Rid of Pokemon Disobeying You
Holding Select Allows For A Second Register Item
Home
How the Game Works
How to Support Savefile Backwards Compatibility
How to add a new Pokémon species
How to add a new ability
How to add a new region map
How to create a new regular trainer battle
How to delete a map
Implement Missing Text Function RESET_FONT
Implementing Catch EXP
Implementing ipatix's High Quality Audio Mixer
Implementing the “textcolor” script command from FRLG and give object events their own text colour
Improve Partner Battle Code
Improve the Loading of Battle Terrain
Improving the WaitForVBlank function
Increase money limit
Infinite TM usage
Instead of Asking to Stop learning a New Move, You'll be Asked to Continue Learning
Item Automatically Goes to PC if Bag is Full
Keep the Camera from Making Waves
LGPE Style Bonus Premier Balls
Learn moves upon evolution
List Menu Text Coloring
Make Cleanse Tag Avoid All Wild Encounters and Usable If Held By Anyone in Your Party; Make PokeDoll Do the Same for Trainers Seeing You
Make Daycare Faster at Leveling Pokémon
Make Key Items That Cannot Be Used In The Field Not Show A Use or Register Option
Make L Button Be Turbo A When L=A Option Is Set
Make Ledge Jumps Check Collision
Make Move Relearner Teach Egg Moves With A Flag
Make Multiple Secret Bases
Make Norman's Slaking Have Ability Intimidate
Make Pokemon Not Heal When Going into PC
Make Pokemon that Require a Fateful Encounter to be Legal to Always Be Set to Legal
Make space for EWRAM Data for Summary screen
Make the Bag Able to Hold 120 Items Instead of 30
Make the Person in the Intro Match the the Save File
Map Based Trainer Battle Music
Move Item
Multipage Options Menu
Name Rater Allows Traded Pokemon to be Renamed
New Birch's Briefcase With Fully Custom Starters by Archie and Mudskip
New Custom Menu Border Themes (Basic)
New Main Menu UI With Mugshot by Archie and Mudskip
New Options Plus ‐ Multipage Options Menu with Faster Text, HP‐EXP Bar Speeds and Metric
Nickname your Pokémon from the party menu
Not showing dex entries until getting the Pokédex
Omnidirectional Jump
Optimization ‐ Remove Expensive and Redundant `BuildColorMaps()` Function
Option to Skip Copyright and Intro
Overview: Items and their Effects
Overview: The Party Menu
Overview∶ The Game Loop
Overview∶ The Task System
Per Shop\Mart Item Prices
Plural Giveitem
Pokecenters Disregard Eggs
Prompt for reusing Repels
Push B in wild battle moves to Run
Push B to Toggle Running Shoes
Pushing B When Asked To Stop Learning Move Will Cancel Teaching The Move
Quickly Run from a Battle by Holding Right While the Wild Pokémon's Name Appears
Raise Odds of Catching a Pokemon by Pressing B When the Ball Shakes
Random Info, Tips, and Tricks
Reflections
Remove 'Select' Sound From Specific Map Events
Remove Warp Fadescreen
Remove badge boosts
Remove the backup save file
Remove the extra save confirmation
Remove the functionally redundant move grammar tables
Removing the Animation Affines
Repeated Field Medicine Use
Reuse filler save space for Variables and Flags
Revert Brendan May Sprites to Ruby Sapphire
Set Metatile IDs From Another Map
Set Up Item Balls on a Map Without Needing New Scripts
Shifting to Pokémon Already in Battle Exits the Shift Menu
Shiny Creation With a Flag
Shop Items By Badge Count
Show IVs EVs in Summary Screen
Show Species That You're Switching For in the Party Menu
Show Type Effectiveness In Battle Using Pre Existing Function and Disable in Option Menu
Show a throbber animation while the game is saving
Shuckle makes Berry Juice
Something doesn't work I need help etc.
Spawn Invisible Player
Speedy Nurse Joy
Spinda Second Frame Spot Addition
Stair Warps
Supplementary Scripting Macros
Surfing Dismount Ground Effects
Temporarily Replace Player or Enemy Party Pokemon
The Basics of Scripting
Toggle Trainer Sight
Trainer Backsprite Editing
Trainer Class Based Poké Balls
Trainer Scripts
Trainers No Longer Spin to Face You Right As You Pass Them
Trigger Map Scripts By Flag
Triple layer metatiles
Tutorials
Tweaking the count of health beeps
Uniquely Shuffle Array
Update Sitrus Berry's effect to Gen 4 standard
Use HMs Without Any Pokemon in your Party Knowing Them
Useful Modding Tools
Useful Scripting Specials
Why You Should (Almost) Always Be Using 32‐Bit Variables in Your Code
Why should I use this over binary hacking
3
Pushing B When Asked To Stop Learning Move Will Cancel Teaching The Move
voloved edited this page 2023-01-21 13:48:57 -05:00
Table of Contents
- Change the logic when learning a move in battle after leveling up:
- Change logic for learning new move in party menu (such as using TMs or levelling up with Rare Candy):
- Change logic for Move Relearner:
- Change logic at evolution scene where a move is learned right after evolving (including during trades):
By devolov
Goal: It's annoying that when you press B when you don't want to learn a move, it asks you if you want to stop learning and if you press B again, it'll loop through asking again. This change in logic will cause pressing B when you don't want to learn a new move to give up on teaching it.
Change the logic when learning a move in battle after leveling up:
------------------------- src/battle_script_commands.c -------------------------
index 69dade961..93a0e90f1 100644
@@ -5540,9 +5540,9 @@ static void Cmd_yesnoboxstoplearningmove(void)
}
else if (JOY_NEW(B_BUTTON))
{
PlaySE(SE_SELECT);
- gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
+ gBattlescriptCurrInstr += 5;
HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR);
}
break;
}
Change logic for learning new move in party menu (such as using TMs or levelling up with Rare Candy):
------------------------------- src/party_menu.c -------------------------------
index a887592a0..58761d36c 100755
@@ -4959,8 +4959,11 @@ static void Task_HandleStopLearningMoveYesNoInput(u8 taskId)
struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId];
switch (Menu_ProcessInputNoWrapClearOnChoose())
{
+ case MENU_B_PRESSED:
+ PlaySE(SE_SELECT);
+ // fallthrough
case 0:
GetMonNickname(mon, gStringVar1);
StringCopy(gStringVar2, gMoveNames[gPartyMenu.data1]);
StringExpandPlaceholders(gStringVar4, gText_MoveNotLearned);
@@ -4975,11 +4978,8 @@ static void Task_HandleStopLearningMoveYesNoInput(u8 taskId)
gSpecialVar_Result = FALSE;
gTasks[taskId].func = Task_ClosePartyMenuAfterText;
}
break;
- case MENU_B_PRESSED:
- PlaySE(SE_SELECT);
- // fallthrough
case 1:
GetMonNickname(mon, gStringVar1);
StringCopy(gStringVar2, gMoveNames[gPartyMenu.data1]);
DisplayLearnMoveMessage(gText_PkmnNeedsToReplaceMove);
Change logic for Move Relearner:
----------------------------- src/move_relearner.c -----------------------------
index 3c8b06a78..2e28fb44e 100644
@@ -607,13 +607,13 @@ static void DoMoveRelearnerMain(void)
case MENU_STATE_CONFIRM_STOP_TEACHING:
{
s8 selection = Menu_ProcessInputNoWrapClearOnChoose();
- if (selection == 0)
+ if (selection == MENU_B_PRESSED || selection == 0)
{
sMoveRelearnerStruct->state = MENU_STATE_CHOOSE_SETUP_STATE;
}
- else if (selection == MENU_B_PRESSED || selection == 1)
+ else if (selection == 1)
{
// What's the point? It gets set to MENU_STATE_PRINT_TRYING_TO_LEARN_PROMPT, anyway.
if (sMoveRelearnerMenuSate.showContestInfo == FALSE)
{
Change logic at evolution scene where a move is learned right after evolving (including during trades):
---------------------------- src/evolution_scene.c ----------------------------
index 2fabcb426..5586bf198 100644
@@ -163,8 +163,9 @@ static void CB2_BeginEvolutionScene(void)
#define tLearnMoveYesState data[7]
#define tLearnMoveNoState data[8]
#define tEvoWasStopped data[9]
#define tPartyId data[10]
+#define tStopLearningMove data[11]
#define TASK_BIT_CAN_STOP (1 << 0)
#define TASK_BIT_LEARN_MOVE (1 << 7)
@@ -296,8 +297,9 @@ void EvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, bool8 canStopEvo, u
gTasks[id].tCanStop = canStopEvo;
gTasks[id].tLearnsFirstMove = TRUE;
gTasks[id].tEvoWasStopped = FALSE;
gTasks[id].tPartyId = partyId;
+ gTasks[id].tStopLearningMove = FALSE;
memcpy(&sEvoStructPtr->savedPalette, &gPlttBufferUnfaded[0x20], sizeof(sEvoStructPtr->savedPalette));
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_BG_ALL_ON | DISPCNT_OBJ_1D_MAP);
@@ -510,8 +512,9 @@ void TradeEvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, u8 preEvoSprit
gTasks[id].tPostEvoSpecies = postEvoSpecies;
gTasks[id].tLearnsFirstMove = TRUE;
gTasks[id].tEvoWasStopped = FALSE;
gTasks[id].tPartyId = partyId;
+ gTasks[id].tStopLearningMove = FALSE;
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
gBattle_BG1_X = 0;
@@ -873,8 +876,9 @@ static void Task_EvolutionScene(u8 taskId)
// "{mon} is trying to learn {move}"
BufferMoveToLearnIntoBattleTextBuff2();
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE1 - BATTLESTRINGS_TABLE_START]);
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
+ gTasks[taskId].tStopLearningMove = FALSE;
gTasks[taskId].tLearnMoveState++;
}
break;
case MVSTATE_INTRO_MSG_2:
@@ -948,9 +952,16 @@ static void Task_EvolutionScene(u8 taskId)
{
// Equivalent to selecting NO
HandleBattleWindow(YESNOBOX_X_Y, WINDOW_CLEAR);
PlaySE(SE_SELECT);
- gTasks[taskId].tLearnMoveState = gTasks[taskId].tLearnMoveNoState;
+ if (gTasks[taskId].tStopLearningMove){
+ gTasks[taskId].tLearnMoveState = gTasks[taskId].tLearnMoveYesState;
+ if (gTasks[taskId].tLearnMoveState == MVSTATE_SHOW_MOVE_SELECT)
+ BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
+ }
+ else{
+ gTasks[taskId].tLearnMoveState = gTasks[taskId].tLearnMoveNoState;
+ }
}
break;
case MVSTATE_SHOW_MOVE_SELECT:
if (!gPaletteFade.active)
@@ -1007,15 +1018,17 @@ static void Task_EvolutionScene(u8 taskId)
break;
case MVSTATE_ASK_CANCEL:
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_STOPLEARNINGMOVE - BATTLESTRINGS_TABLE_START]);
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
+ gTasks[taskId].tStopLearningMove = TRUE;
gTasks[taskId].tLearnMoveYesState = MVSTATE_CANCEL;
gTasks[taskId].tLearnMoveNoState = MVSTATE_INTRO_MSG_1;
gTasks[taskId].tLearnMoveState = MVSTATE_PRINT_YES_NO;
break;
case MVSTATE_CANCEL:
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_DIDNOTLEARNMOVE - BATTLESTRINGS_TABLE_START]);
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
+ gTasks[taskId].tStopLearningMove = FALSE;
gTasks[taskId].tState = EVOSTATE_TRY_LEARN_MOVE;
break;
case MVSTATE_RETRY_AFTER_HM:
if (!IsTextPrinterActive(0) && !IsSEPlaying())
@@ -1265,8 +1278,9 @@ static void Task_TradeEvolutionScene(u8 taskId)
// "{mon} is trying to learn {move}"
BufferMoveToLearnIntoBattleTextBuff2();
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE1 - BATTLESTRINGS_TABLE_START]);
DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1);
+ gTasks[taskId].tStopLearningMove = FALSE;
gTasks[taskId].tLearnMoveState++;
}
break;
case T_MVSTATE_INTRO_MSG_2:
@@ -1298,9 +1312,13 @@ static void Task_TradeEvolutionScene(u8 taskId)
sEvoCursorPos = 0;
}
break;
case T_MVSTATE_HANDLE_YES_NO:
- switch (Menu_ProcessInputNoWrapClearOnChoose())
+ var = Menu_ProcessInputNoWrapClearOnChoose();
+ if (var == MENU_B_PRESSED){
+ var = !gTasks[taskId].tStopLearningMove;
+ }
+ switch (var)
{
case 0: // YES
sEvoCursorPos = 0;
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_EMPTYSTRING3 - BATTLESTRINGS_TABLE_START]);
@@ -1309,9 +1327,8 @@ static void Task_TradeEvolutionScene(u8 taskId)
if (gTasks[taskId].tLearnMoveState == T_MVSTATE_SHOW_MOVE_SELECT)
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
break;
case 1: // NO
- case MENU_B_PRESSED:
sEvoCursorPos = 1;
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_EMPTYSTRING3 - BATTLESTRINGS_TABLE_START]);
DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1);
gTasks[taskId].tLearnMoveState = gTasks[taskId].tLearnMoveNoState;
@@ -1377,15 +1394,17 @@ static void Task_TradeEvolutionScene(u8 taskId)
break;
case T_MVSTATE_ASK_CANCEL:
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_STOPLEARNINGMOVE - BATTLESTRINGS_TABLE_START]);
DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1);
+ gTasks[taskId].tStopLearningMove = TRUE;
gTasks[taskId].tLearnMoveYesState = T_MVSTATE_CANCEL;
gTasks[taskId].tLearnMoveNoState = T_MVSTATE_INTRO_MSG_1;
gTasks[taskId].tLearnMoveState = T_MVSTATE_PRINT_YES_NO;
break;
case T_MVSTATE_CANCEL:
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_DIDNOTLEARNMOVE - BATTLESTRINGS_TABLE_START]);
DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1);
+ gTasks[taskId].tStopLearningMove = FALSE;
gTasks[taskId].tState = T_EVOSTATE_TRY_LEARN_MOVE;
break;
case T_MVSTATE_RETRY_AFTER_HM:
if (!IsTextPrinterActive(0) && !IsSEPlaying())
@@ -1406,8 +1425,9 @@ static void Task_TradeEvolutionScene(u8 taskId)
#undef tLearnMoveYesState
#undef tLearnMoveNoState
#undef tEvoWasStopped
#undef tPartyId
+#undef tStopLearningMove
static void EvoDummyFunc(void)
{
}