-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Remove the functionally redundant move grammar tables
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 and remove the following declarations:
- 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:
- static const u8 sText_AttackerUsedX[] = _("{B_ATK_NAME_WITH_PREFIX} \n{B_BUFF2}”)
+ 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.