• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Research: Extra Custom Names for Characters?

Giga Universe

Working on a tool.
121
Posts
16
Years
Here is a topic that I have been mildly interested in. The idea is to built a script that can be activated during the game play, that allows the player to provide a custom name for a reoccurring character. I built a script that uses a nickname Pokémon Script, and stores the name on one of the buffers. However, I encountered two problems. First, the string buffers 1-3 are commonly used, and therefore would overwrite your rivals names. Second, using the nickname Pokémon Script provides more than 7 characters for the name, and would be inconvenient in dialogue. So, maybe someone could build a mod on the nickname script to force it to store the text in the RAM, usable like a buffer, and force the nickname script to only allow 7 characters? Since I have no ASM experience (I understand basic concepts, but can't code), I cannot investigate this further...
 

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
Using buffers is definitely not a good idea, indeed. Also, since the naming special works for Pokémon only, it needs to be hacked to eventually implement a custom rival/etc. naming. Aside from that, having custom names requires some reserved memory area for them. I'm thinking of variables, as with 4 variables you have 8 bytes which means 7 letters + string terminator (0xFF). Then, to use the name you could use the bufferstring command pointing to the first chosen variable address. Even though I never tried using bufferstring with a RAM pointer, it should work fine theoretically.
 
Last edited:

Giga Universe

Working on a tool.
121
Posts
16
Years
Making progress. Using Hackmew's suggestion of using variables, which hold 2 characters each, I created a simple script, which uses setvars to set bytes to make up the word 'Giverse'.
Code:
#dynamic 0x800000

#org @start
setvar 0x8000 0xDDC1 'store the Gi
setvar 0x8001 0xD9EA 'store the ve
setvar 0x8002 0xE7E6 'store the rs
setvar 0x8003 0xFFD9 'store the e and the stop (0xFF)
bufferstring 0x1 0x020370B8 'buffer data located at 0x8000 - 0x8003
message @1 0x6
end

#org @1
= \v\h03
So, you can buffer a RAM address, it works perfectly. All that needs to be done is make an ASM routine that stores the chosen name to a variable, and then limit the choice of characters to 7.


EDIT:

Modified the above script. It copies text stored in buffer 1 directly from the RAM into the variable storage space. It has a custom nickname screen. But it does not limit to 7 characters. Right now, it shows a Bulbsaur instead of a Overworld, and says: "What will Balbasuar's nickname be?"
Code:
#dynamic 0x800000

#org @start
givepokemon 0x1 0x1 0x1 0x0 0x0 0x0
call 0x1A74EB
copybyte 0x020370B8 0x0202428c
copybyte 0x020370B9 0x0202428d
copybyte 0x020370BA 0x0202428e
copybyte 0x020370BB 0x0202428f
copybyte 0x020370BC 0x02024290
copybyte 0x020370BD 0x02024291
copybyte 0x020370BE 0x02024292
copybyte 0x020370BF 0x02024293
writebytetooffset 0xFF 0x020370C0
bufferstring 0x1 0x020370B8 'buffer data located at 0x8000 - 0x8003
message @1 0x6
special 0x0EF
end

#org @1
= Hello, my name is \v\h03!
 
Last edited:
Back
Top