diff options
-rw-r--r-- | Infinitely-reusable-TMs.md | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/Infinitely-reusable-TMs.md b/Infinitely-reusable-TMs.md new file mode 100644 index 0000000..6294b18 --- /dev/null +++ b/Infinitely-reusable-TMs.md @@ -0,0 +1,57 @@ +Credit to paccy for this tutorial in the Simple Modifications Pokecommunity thread. + +This tutorial will make all TMs infinitely reusable, unholdable by Pokemon, unsellable to shops, and also removes the number from appearing in the Bag. + +## Contents +1. [Don't consume TMs on use](#1-dont-consumes-tms-on-use) +2. [Treat TMs as HMs in the bag](#2-treat-tms-as-hms-in-the-bag) + +## 1. Don't consume TMs on use +Edit [src/party_menu.c](../blob/master/src/party_menu.c): +```diff +static void Task_LearnedMove(u8 taskId) +{ + struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; + s16 *move = &gPartyMenu.data1; + u16 item = gSpecialVar_ItemId; + + if (move[1] == 0) + { + AdjustFriendship(mon, FRIENDSHIP_EVENT_LEARN_TMHM); +- if (item < ITEM_HM01_CUT) +- RemoveBagItem(item, 1); + } + GetMonNickname(mon, gStringVar1); + StringCopy(gStringVar2, gMoveNames[move[0]]); + StringExpandPlaceholders(gStringVar4, gText_PkmnLearnedMove3); + DisplayPartyMenuMessage(gStringVar4, TRUE); + schedule_bg_copy_tilemap_to_vram(2); + gTasks[taskId].func = Task_DoLearnedMoveFanfareAfterText; +} +``` + +## 2. Treat TMs as HMs in the bag +This will mean TMs in the bag cannot be held and will not display the quantity next to the name. + +Edit [src/data/items.h](../blob/master/src/data/items.h): +```diff + [ITEM_TM01_FOCUS_PUNCH] = + { + .name = _("TM01"), + .itemId = ITEM_TM01_FOCUS_PUNCH, + .price = 3000, + .description = sTM01Desc, ++ .importance = 1, + .pocket = POCKET_TM_HM, + .type = 1, + .fieldUseFunc = ItemUseOutOfBattle_TMHM, + .secondaryId = 0, + }, +``` +You will need to repeat the above for every TM. + +And that's it! + + + +Notes: Pokemon will replenish their PP if a TM move is forgotten and relearned.
\ No newline at end of file |