From b120b6f7888bb3e6633e32792f7bf76821282020 Mon Sep 17 00:00:00 2001 From: Josh <32826900+ShinyDragonHunter@users.noreply.github.com> Date: Sat, 31 Oct 2020 01:04:56 +0000 Subject: Created Remove the functionally redundant move grammar tables (markdown) --- ...e-functionally-redundant-move-grammar-tables.md | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Remove-the-functionally-redundant-move-grammar-tables.md diff --git a/Remove-the-functionally-redundant-move-grammar-tables.md b/Remove-the-functionally-redundant-move-grammar-tables.md new file mode 100644 index 0000000..ecad6c7 --- /dev/null +++ b/Remove-the-functionally-redundant-move-grammar-tables.md @@ -0,0 +1,26 @@ +In the Japanese releases, there are five ways to say "POKéMON used MOVE!": + +* "POKéMONの MOVE つかった!" ("POKéMON used MOVE!") +* "POKéMONの MOVEした!" ("POKéMON did MOVE!") +* "POKéMONの MOVE した!" ("POKéMON did MOVE!" for long move names) +* "POKéMONの MOVE こうげき!" ("POKéMON's MOVE attack!") +* "POKéMONの MOVE!" ("POKéMON's MOVE!") + + +These are all redundant in the English localization and all the strings have been translated to just “!”. +This tutorial will show you how to remove them, which saves space and simplifies the code. + +Open [src/battle_message.c](https://github.com/pret/pokeemerald/blob/master/src/battle_message.c) and remove the following declarations: +```c +static void ChooseMoveUsedParticle +static void ChooseTypeOfMoveUsedString +``` +In the same file, look for the functions: `sGrammarMoveUsedTable`, `ChooseMoveUsedParticle` and `ChooseTypeOfMoveUsedString` and remove them completely. + +In the function `BufferStringBattle` in src/battle_message.c, remove `ChooseMoveUsedParticle(gBattleTextBuff1);` and `ChooseTypeOfMoveUsedString(gBattleTextBuff2);` + +And finally, change `sText_AttackerUsedX` and add an exclamation mark at the end of the string like so: +```c +static const u8 sText_AttackerUsedX[] = _("{B_ATK_NAME_WITH_PREFIX} \n{B_BUFF2}!”) +``` +And that’s it! You have now removed the move grammar tables and functions and also made it easier on resources because now the game won’t go through multiple functions just to print a single exclamation mark present in 5 different text strings. \ No newline at end of file -- cgit v1.2.3