FBI

Free supporter

Male
Unknown Island
Seen 2 Weeks Ago
Posted December 17th, 2019
1,910 posts
7.8 Years
My intro text editor edits the default names...
I think he wants to set a default name while skipping the intro. If you skip the intro via ASM, the default name is left as 0s aka blank.

Setting a static name to the player



Well, this is beyond simple, lol. I'll keep my post the same format though, because first post :3

How to insert:

Before you begin to insert the routine, there are a few steps. Firstly player names are limited to 8 characters with the eighth character = 0xFF.
Convert the static name you want from ascii to hex. For OP, he wanted Jesse and James which convert into:
C4 D9 E7 E7 D9 FF FF FF - Jesse
C4 D5 E1 D9 E7 FF FF FF -James
Note that if all eight bytes don't get used, you should pad them with "FF" in your hex editor.
Now insert the 8 byte names into some free space in your ROM via hex editor and write down the pointers.

Now copy the following routine into a text editor:
Spoiler:

.text
.align 2
.thumb
.thumb_func

main:
	push {r0-r2, lr}
	ldr r0, .Name
	ldr r0, [r0]
	add r1, r0, #0x1
	ldrb r1, [r1]
	cmp r1, #0x1 @girl
	beq Girl
	ldr r1, .CustomNameBoy
	ldr r2, [r1]
	add r1, r1, #0x4
	ldr r1, [r1]
	str r2, [r0]
	add r0, r0, #0x4
	str r1, [r0]
	pop {r0-r2, pc}

Girl:
	ldr r1, .CustomNameGirl
	ldr r2, [r1]
	add r1, r1, #0x4
	ldr r1, [r1]
	str r2, [r0]
	add r0, r0, #0x4
	str r1, [r0]
	pop {r0-r2, pc}


.align 2
.Name:
	.word 0x300500C

.CustomNameBoy:
	.word [email protected] to boy name

.CustomNameGirl:
	.word [email protected] to girl name


You'll notice that I have the lines:
.CustomNameBoy:
	.word [email protected] to boy name

.CustomNameGirl:
	.word [email protected] to girl name
Change the [email protected] text to 0x[offset you inserted]. No need to add one.
After you've done that compile and insert into free space.

Usage:
You must callasm to the routine, and depending on the Player's gender it will set their name. To have their name inserted before the player starts playing the game, create a level script which calls this routine. If you don't know how, ask in a relevant thread (not here).
...