- 3
- Posts
- 3
- Years
- Seen Nov 22, 2023
[pokeemerald] Increase Text Speed Beyond Fast
compared to newer games, text speed is a large part of what makes gen 3 feel slow. the game already prints 1 character per frame when the text speed is set to fast, so we are going to alter it to print more than one character per frame. we can also set the original "fast" speed to be our slowest speed. you can fine-tune the exact speed at each setting to your liking.
part 1: multiple characters per frame
Spoiler:
the entirety of this part happens in gflib/text.c.
in the function:Code:void RunTextPrinters(void)
Code:if (sTextPrinters[i].active) { u16 temp = RenderFont(&sTextPrinters[i]); [COLOR="Lime"]+ CopyWindowToVram(sTextPrinters[i].printerTemplate.windowId, 2);[/COLOR] switch (temp) { case RENDER_PRINT: [COLOR="Red"]- CopyWindowToVram(sTextPrinters[i].printerTemplate.windowId, 2);[/COLOR] case RENDER_UPDATE:
in the function:Code:u16 RenderText(struct TextPrinter *textPrinter)
...Code:s32 widthHelper; [COLOR="Lime"]+ u8 repeats;[/COLOR] switch (textPrinter->state)
...Code:textPrinter->delayCounter = textPrinter->textSpeed; [COLOR="Lime"]+ switch (GetPlayerTextSpeed()) + { + case OPTIONS_TEXT_SPEED_SLOW: + repeats = 1; + break; + case OPTIONS_TEXT_SPEED_MID: + repeats = 2; + break; + case OPTIONS_TEXT_SPEED_FAST: + repeats = 4; + break; + }[/COLOR] [COLOR="Lime"]+ do {[/COLOR] currChar = *textPrinter->printerTemplate.currentChar;
Code:textPrinter->printerTemplate.currentX += gCurGlyph.width; } [COLOR="Lime"]+ repeats--;[/COLOR] [COLOR="Lime"]+ } while (repeats > 0);[/COLOR] return RENDER_PRINT;
now text will be printed 2 characters per frame on mid speed, and 4 characters per frame on fast speed. if you'd like to change this, just change x in the lines that sayfor each text speed setting in the switch statement you added earlier.Code:repeats = x
part 2: changing slow and mid
Spoiler:
now that more than one character is being printed per frame, we might not want text speed slow and text speed mid to have delays of multiple frames every time they want to print a character. we can quite easily change how many frames the game waits before trying to print again, for each text speed setting. to do this, we go to src/menu.c.
findand simply change the number for each setting. in my case, i changed each number to 1, because i didn't want any time between each character or group of characters being printed.Code:static const u8 sTextSpeedFrameDelays[] =
by setting the frame delay of slow speed to be 1, and the repeats of slow speed to be 1 as well, it effectively works the same way as text speed fast originally did.
i hope you find this modification useful! i've only just added it to my hack today, and i've fixed a couple of bugs with it already. if any more pop up, i'll edit this post to fix them. if anyone else finds bugs with it, please let me know and i'll see what i can do.
Hi,
There are a few things that need to be defined from the rhh expansion in the vanilla code for Show Type Effectiveness In-Battle to work.
I was able to get it to work and the changes can be found in a commit on my repo's fork.