In Generation 3 onwards, most battle texts don't require the player to click A. That's not the case in Generation 2, as most battle texts require prompts which the player must press A. Thus, players tend to spam it after making a move. This tutorial aims to remove prompts for most battle texts by making the game scroll through them automatically. ## Contents 1. [Add new charmap constants](#1-add-new-charmap-constants) 2. [Define new macros for autoprompts](#2-define-new-macros-for-autoprompts) 3. [Make functions for the new macros](#3-make-functions-for-the-new-macros) 4. [Edit battle text to not require prompts](#4-edit-battle-text-to-not-require-prompts) ## 1. Add new charmap constants We first need to edit [charmap.asm](../blob/master/charmap.asm) to make the autoprompts possible. Each control character is assigned to a 2 hex digit. There are a lot of unassigned hex digits, thus we can use some of them. ```diff ... charmap "<_CONT>", $4b ; implements "" + ; While "" this is used in sharply rose or sharply fell stat texts, this will be + ; adjusted to give the player time to read. charmap "", $4c charmap "", $4e charmap "", $4f charmap "@", $50 ; string terminator charmap "", $51 charmap "", $52 ; wPlayerName charmap "", $53 ; wRivalName charmap "#", $54 ; "POKé" charmap "", $55 charmap "<……>", $56 ; "……" charmap "", $57 charmap "", $58 charmap "", $59 charmap "", $5a charmap "", $5b ; "PC" charmap "", $5c ; "TM" charmap "", $5d ; "TRAINER" charmap "", $5e ; "ROCKET" charmap "", $5f + charmap "", $60 + charmap "", $61 ... ``` ## 2. Define new macros for autoprompts Next, we edit [macros/scripts/text.asm](../blob/master/macros/scripts/text.asm) to add new macros that we'll be using for autoprompts. ```diff text EQUS "db TX_START," ; Start writing text. next EQUS "db \"\"," ; Move a line down. line EQUS "db \"\"," ; Start writing at the bottom line. page EQUS "db \"@\"," ; Start a new Pokédex page. para EQUS "db \"\"," ; Start a new paragraph. + autopara EQUS "db \"\"," ; Automatically start a new paragraph. cont EQUS "db \"\"," ; Scroll to the next line. + scroll EQUS "db \"\"," ; Scroll to the next line, pausing shortly. done EQUS "db \"\"" ; End a text box. + autodone EQUS "db \"\"" ; Automatically ends a text box. prompt EQUS "db \"\"" ; Prompt the player to end a text box (initiating some other event). ``` ## 3. Make functions for the new macros We then edit [home/text.asm](../blob/master/home/text.asm) and make functions for the new constants. ```diff dict "", MobileScriptChar dict "", LineChar dict "", NextLineChar dict "", CarriageReturnChar dict "", NullChar - dict "", _ContTextNoPause + dict "", _ContTextPauseShort dict "<_CONT>", _ContText dict "", Paragraph + dict "", AutoParagraph dict "", PrintMomsName ... dict "", LineFeedChar dict "", ContText dict "<……>", SixDotsChar dict "", DoneText + dict "", AutoDoneText dict "", PromptText dict "", PlacePKMN dict "", PlacePOKE ... _ContTextNoPause:: push de call TextScroll call TextScroll hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2 pop de jp NextChar +_ContTextPauseShort:: + push de + call TextScroll + call TextScroll + hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2 + ld c, 5 + call DelayFrames + pop de + jp NextChar ... Paragraph:: push de ld a, [wLinkMode] cp LINK_COLOSSEUM jr z, .linkbattle cp LINK_MOBILE jr z, .linkbattle call LoadBlinkingCursor .linkbattle call Text_WaitBGMap call PromptButton hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY lb bc, TEXTBOX_INNERH - 1, TEXTBOX_INNERW call ClearBox call UnloadBlinkingCursor ld c, 20 call DelayFrames hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY pop de jp NextChar +AutoParagraph:: + push de + call Text_WaitBGMap + ld c, 10 + call DelayFrames + hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + lb bc, TEXTBOX_INNERH - 1, TEXTBOX_INNERW + call ClearBox + ld c, 20 + call DelayFrames + hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + pop de + jp NextChar ... DoneText:: pop hl ld de, .stop dec de ret .stop: text_end +AutoDoneText:: + call Text_WaitBGMap + ld c, 20 + call DelayFrames + jr DoneText ``` ## 4. Edit battle text to not require prompts Edit [data/text/common_1.asm](../blob/master/data/text/common_1.asm) for the withdraw battle text: ```diff _EnemyWithdrewText:: text "" line "withdrew" - cont "@" + scroll "@" text_ram wEnemyMonNickname text "!" - prompt + autodone _EnemyUsedOnText:: text "" line "used @" text_ram wMonOrItemNameBuffer text_start - cont "on @" + scroll "on @" text_ram wEnemyMonNick text "!" - prompt + autodone ``` Also, edit [data/text/battle.asm](../blob/master/data/text/battle.asm). Since the text is disorganized, just remember to edit the text related to type effectiveness, residual damage, item use, weather status, and more. Make sure to avoid editing fainting and EXP prompts. Feel free to edit the file by replacing the following macros: 1. `cont` to `scroll` 2. `para` to `autopara` 3. `done` to `autodone`. That's it! You've made most battle texts have autoprompts! If you want to have an idea how it'd look like in action, you can watch [this video](https://www.youtube.com/watch?v=tfD33KcVu2M) or [this video](https://www.youtube.com/watch?v=Vl_1iRCSYUw).