Change the default Player and Rival names - pret/pokecrystal GitHub Wiki

This tutorial describes how to change the default names for the Player and Rival.

This is a very simple edit, and is really more about just finding the relevant code.

Contents

  1. PLAYER: Changing the default name choices upon New Game
  2. PLAYER: Changing the default option when no name is typed in
  3. RIVAL: Changing the default option when no name is typed in

1. PLAYER: Changing the default name choices upon New Game

Simply edit the file data/player_names.asm. We'll use the forenames of the male and female Ghostbusters as an example:

 ChrisNameMenuHeader:
	db MENU_BACKUP_TILES ; flags
	menu_coords 0, 0, 10, TEXTBOX_Y - 1
	dw .MaleNames
	db 1 ; ????
	db 0 ; default option
; ...

	db "NEW NAME@"
MalePlayerNameArray:
-	db "CHRIS@"
-	db "MAT@"
-	db "ALLAN@"
-	db "JON@"
+       db "PETER@"
+       db "RAY@"
+       db "EGON@"
+       db "WINSTON@"
	db 2 ; displacement
	db " NAME @" ; title

; ...

	db "NEW NAME@"
FemalePlayerNameArray:
-	db "KRIS@"
-	db "AMANDA@"
-	db "JUANA@"
-	db "JODI@"
+       db "ERIN@"
+       db "ABBY@"
+       db "JILLIAN@"
+       db "PATTY@"
	db 2 ; displacement
	db " NAME @" ; title

2. PLAYER: Changing the default option when no name is typed in

Currently, if you select the option to type in your own Player name but leave the option blank, the name defaults to CHRIS (Male) or KRIS (Female).

This can be edited in engine/menus/intro_menu.asm:

; ...

NamePlayer:
	farcall MovePlayerPicRight
	farcall ShowPlayerNamingChoices
	ld a, [wMenuCursorY]
	dec a

; ...

	jr z, .Male
	ld de, .Kris
.Male:
	call InitName
	ret

.Chris:
-	db "CHRIS@@@@@@"
+       db "PETER@@@@@@"
.Kris:
-	db "KRIS@@@@@@@"
+       db "ERIN@@@@@@@"

; ...

3. RIVAL: Changing the default option when no name is typed in

Similarly to the Player, the Rival is called SILVER if the naming screen is left blank.

Let's name him after the Ghostbusters villain WALTER as an example. Edit engine/events/specials.asm:

; ...

NameRival:
	ld b, NAME_RIVAL
	ld de, wRivalName
	farcall _NamingScreen
-	; default to "SILVER"
+       ; default to "WALTER"
	ld hl, wRivalName
	ld de, .default
	call InitName
	ret

.default
-	db "SILVER@"
+       db "WALTER@"

; ...

That's all that is needed!