< >
Hello, guest! Please log in or register.

The PokéCommunity

Go Back     The PokéCommunity Forums > ROM Hacking > Research & Development Development Longer names

Notices

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
Research & Development programs in this forum are subject to moderator approval before they are displayed.

Reply Post Reply
 
Thread Tools
  #1    
Old July 18th, 2015 (6:58 AM). Edited July 18th, 2015 by Touched.
Touched's Avatar
Touched Touched is offline
Resident ASMAGICIAN
 
Join Date: Jul 2014
Gender: Male
Posts: 446
Introduction
It came to my attention that some Gen VI items names are too long to fit into the 13 characters allocated by the Generation III games, Mega Stones in particular. So I thought, "Why not hack the limit?".
This basically works by having the first word of an item be 0xFFFFFFFF, and the next word being a pointer to the new, longer name. This makes it backwards compatible with the old item table (Only longer items need be repointed) and compatible with tools (They'll show a blank name due to the first character being 0xFF). This method should work for any other names I try to extend, but I'm kicking things off with items.

Table of Name Lengths
I tried to make this as accurate as possible. If you notice anything that is incorrect, please comment with an example name (and the new length). This will be used as a target for any adjustments.

Category
Current Limit
Gen VI Max
Gen VI Example
New Limit

Items
12
15
Weakness Policy
17

Pokemon
10
12
Nickname
-

Moves
12
16
Precipice Blades
-

Abilities
12
14
Primordial Sea
-

Longer Item Names
This hack just changes the code. The tilemap for the status screen needs to be altered to fit the code changes, but I'll just post offsets for the tiles and tilemap in the hope that some kind soul changes the tilemap and posts the hex for it here (hint hint).
Spoiler:

Step 1: Insert and hook
Code:
.align 2
.thumb

@ 00 4A 10 47 XX + 1 XX XX 08 at 0x09A8D0 (0809A8D0 via r2)
hook_name:
    add r0, r1

    @ Item name is 14 bytes long, we can use this for other data
    @ Check if first word is 0xFFFFFFFF
    ldr r1, [r0]
    add r1, #1
    bcc return

    @ First word was 0xFFFFFFFF, second word is therefore a pointer
    @ to the real item name
    ldr r0, [r0, #4]
return:    
    pop {pc}
Step 2: Fixing the bag strings

Put B2 00 94 1B E4 00 A4 1B at both 0x108450 and 0x10848E.

Step 3: Making the bag allocate more space

Write DD 03 00 00 at 0x108420

Step 4: Making the mart have larger strings (and malloc more)

Put 0x12 at 0x09B1DE, 0x09B1A4 and 0x09B1FA

Step 5: Changing the x position of the held item name in the status screen

Put 6 at 0x137056 (or whatever position you want, really).

Step 6: Fix Gender Issue

Write 1A 33 00 00 at 0x134540 and then assemble and hook:
Code:
.align 2
.thumb
    
    @ 00 4B 18 47 XX + 1 XX XX 08 at 0x13704C (0813704C via r3)
hook_name:
    str r4, [sp, #0x4]
    add r7, #0x8
    ldr r3, =0x3308
    add r1, r3
    str r1, [sp, #0x8]
    ldr r3, return
    bx r3
    
.align 2
return: .word 0x08137054 + 1
The maximum name length is now technically 17, but 16 looks better imo. Here are some screens of what it looks like. See below for how "POTIONPOTIONPOTIO" (17 characters) ends up being right next to the "x" or the currency symbol, which looks strange.



The status screen looks terrible, because the tilemap is bad. The tilemap for the first page is at 0x135B34. I'll find the tiles later.
EDIT: Fixed last letter of long items overwriting the gender symbol.
My Emerald IDB
Knizz's FireRed IDB
I will ASMentor people who exhibit enough enthusiASM. Join the IRC to become an ASMentee.
Reply With Quote

Relevant Advertising!

  #2    
Old July 18th, 2015 (7:58 AM).
Sky High's Avatar
Sky High Sky High is offline
I rebel.
 
Join Date: Feb 2014
Location: Shiganshina District, Wall Maria
Gender: Male
Nature: Adamant
Posts: 381
Wow! This is really I wanted to see. I have been always wondering if we can extend the limit of names. Will you also do it for Pokemon, Moves, and Abilities as well?
Reply With Quote
  #3    
Old July 18th, 2015 (8:29 AM).
Touched's Avatar
Touched Touched is offline
Resident ASMAGICIAN
 
Join Date: Jul 2014
Gender: Male
Posts: 446
Quote:
Originally Posted by Sky High View Post
Wow! This is really I wanted to see. I have been always wondering if we can extend the limit of names. Will you also do it for Pokemon, Moves, and Abilities as well?
I will definitely investigate them. Some of them (like Pokemon) aren't exactly feasible due to the number of restrictions on space. But abilities should be fairly easy. Moves might also be a challenge due to the sheer number of interfaces they appear in (Bag, Move Deleter/Reminder, Status screen, Battle, etc.). But items weren't as hard as I expected to be, so who knows?
My Emerald IDB
Knizz's FireRed IDB
I will ASMentor people who exhibit enough enthusiASM. Join the IRC to become an ASMentee.
Reply With Quote
  #4    
Old July 18th, 2015 (9:23 AM).
daniilS's Avatar
daniilS daniilS is offline
busy trying to do stuff not done yet
 
Join Date: Aug 2013
Age: 16
Gender: Male
Posts: 409
Here's an image to replace the one at 0xE9A460 so that item names look okay in the status screen: https://www.dropbox.com/s/r18n26nv3cc9bhy/%40.bmp?dl=0 You need to use 1A for the x position with this.
Reply With Quote
  #5    
Old July 18th, 2015 (2:24 PM).
Z-nogyroP Z-nogyroP is offline
 
Join Date: May 2014
Gender: Male
Posts: 42
Oh, hey, I've wanted something like this for a while!

I can't really help because I have absolutely no idea how to ASM, but I do want to point out that, while Fletchinder is the longest Pokemon name and has 11 characters, I'm pretty sure the limit is actually 12, because that's how many characters you can write while nicknaming something.
Reply With Quote
  #6    
Old July 18th, 2015 (2:29 PM).
Touched's Avatar
Touched Touched is offline
Resident ASMAGICIAN
 
Join Date: Jul 2014
Gender: Male
Posts: 446
Quote:
Originally Posted by Z-nogyroP View Post
Oh, hey, I've wanted something like this for a while!

I can't really help because I have absolutely no idea how to ASM, but I do want to point out that, while Fletchinder is the longest Pokemon name and has 11 characters, I'm pretty sure the limit is actually 12, because that's how many characters you can write while nicknaming something.
I don't doubt that it is more. Project Pokemon says it's actually closer to 23 characters, but if the nickname interface gives 12 spaces, then that's probably the maximum that it will ever go. Thanks for that information; I'll change it in the table.
My Emerald IDB
Knizz's FireRed IDB
I will ASMentor people who exhibit enough enthusiASM. Join the IRC to become an ASMentee.
Reply With Quote
  #7    
Old July 19th, 2015 (3:25 AM).
FamiliaWerneck's Avatar
FamiliaWerneck FamiliaWerneck is offline
 
Join Date: May 2015
Location: São Paulo, Brasil
Gender: Male
Posts: 268
What about your character name?
Never could use my first name, 'cause it's only 7 digit long...
Possible to change its limit too?
My Main Team:


Reply With Quote
  #8    
Old July 19th, 2015 (5:45 AM).
Touched's Avatar
Touched Touched is offline
Resident ASMAGICIAN
 
Join Date: Jul 2014
Gender: Male
Posts: 446
Quote:
Originally Posted by FamiliaWerneck View Post
What about your character name?
Never could use my first name, 'cause it's only 7 digit long...
Possible to change its limit too?
The OT Name is stored in the Pokemon Data, which means we are limited by that for length. Since there is limited space in that structure, we could only get about 2 characters extra. However, I want to use that space for longer Pokemon Names, so I don't think this is going to happen.
My Emerald IDB
Knizz's FireRed IDB
I will ASMentor people who exhibit enough enthusiASM. Join the IRC to become an ASMentee.
Reply With Quote
  #9    
Old July 19th, 2015 (6:40 AM).
Sky High's Avatar
Sky High Sky High is offline
I rebel.
 
Join Date: Feb 2014
Location: Shiganshina District, Wall Maria
Gender: Male
Nature: Adamant
Posts: 381
Quote:
Originally Posted by Touched View Post
I will definitely investigate them. Some of them (like Pokemon) aren't exactly feasible due to the number of restrictions on space. But abilities should be fairly easy. Moves might also be a challenge due to the sheer number of interfaces they appear in (Bag, Move Deleter/Reminder, Status screen, Battle, etc.). But items weren't as hard as I expected to be, so who knows?
Yeah! Items are very easy. I bet Abilities and Moves will come first before Pokemon. You might wanna change the "naming" part and it would be too hard. Oh! Adjusting Pokemon names might also ruin saves at all (unless planned to move them). Forgot to tell also if you would be able to adjust the limit of Player (and Rival, for FR) names. Oh dang! That would be also a ruination to save data.
Reply With Quote
  #10    
Old July 19th, 2015 (6:50 AM).
FamiliaWerneck's Avatar
FamiliaWerneck FamiliaWerneck is offline
 
Join Date: May 2015
Location: São Paulo, Brasil
Gender: Male
Posts: 268
Quote:
Originally Posted by Touched View Post
The OT Name is stored in the Pokemon Data, which means we are limited by that for length. Since there is limited space in that structure, we could only get about 2 characters extra. However, I want to use that space for longer Pokemon Names, so I don't think this is going to happen.
No problem, just wondering if that was possible. Thanks Touched!
My Main Team:


Reply With Quote
  #11    
Old July 19th, 2015 (5:13 PM).
Criminon's Avatar
Criminon Criminon is offline
Pokemon: Aqua Blue
 
Join Date: Aug 2012
Gender: Male
Posts: 203
This is fantastic. With this change, does it effect editors? Or will they still save the same amount as before? Not quite sure if it makes it go down to a certain # of characters because there is no room or because its programmed that way.
FC: 3582 - 9598 - 9978. Add me!
Reply With Quote
  #12    
Old July 19th, 2015 (5:36 PM).
Joexv's Avatar
Joexv Joexv is online now
The True XV
Silver Tier
 
Join Date: Oct 2012
Location: Oregon
Age: 18
Gender: Male
Nature: Quiet
Posts: 945
Send a message via Skype™ to Joexv
Quote:
Originally Posted by Criminon View Post
This is fantastic. With this change, does it effect editors? Or will they still save the same amount as before? Not quite sure if it makes it go down to a certain # of characters because there is no room or because its programmed that way.
This will psyduck up editors big time. So depending on how Touched does the Pokemon name adjustment, it may break all editors that dont support different name lengths. Im an idito I was thinking of the Pokemon in RAM, lol. No it will mess up editors unless they support changing of name length. G3HS supports this. Idk if G3T does though. It might. I dont remember....

Although moves, abilities and items probably will only have part of their names cut off.
Jesus Christ is my Savior
Bros with Percy
NEWS: Pokemon: A New Dawn in production...

Reply With Quote
  #13    
Old July 19th, 2015 (6:52 PM).
Criminon's Avatar
Criminon Criminon is offline
Pokemon: Aqua Blue
 
Join Date: Aug 2012
Gender: Male
Posts: 203
Quote:
Originally Posted by joexv View Post
This will psyduck up editors big time. So depending on how Touched does the Pokemon name adjustment, it may break all editors that dont support different name lengths. Im an idito I was thinking of the Pokemon in RAM, lol. No it will mess up editors unless they support changing of name length. G3HS supports this. Idk if G3T does though. It might. I dont remember....

Although moves, abilities and items probably will only have part of their names cut off.
That's what I was afraid of. I'm hoping it just does the later vs not working at all. Would be a shame having to do all of those last minute. Regardless, very cool that we have this feature now. Would be nice to see it incorporated into G3HS.
FC: 3582 - 9598 - 9978. Add me!
Reply With Quote
  #14    
Old July 20th, 2015 (1:09 PM).
Touched's Avatar
Touched Touched is offline
Resident ASMAGICIAN
 
Join Date: Jul 2014
Gender: Male
Posts: 446
Quote:
Originally Posted by Criminon View Post
That's what I was afraid of. I'm hoping it just does the later vs not working at all. Would be a shame having to do all of those last minute. Regardless, very cool that we have this feature now. Would be nice to see it incorporated into G3HS.
Longer names won't work in tools at all because the first byte is 0xFF (the string terminating character), and will be like this for all of the length adjustment hacks. This should show up as a blank string on most tools. However, the other items (or other names in the future) will be exactly the same and thus will still work in tools. This means that you'll probably have to hex edit the names you want to be longer, but that shouldn't be too much of an issue since it will only be a few names that don't fit into this limit.
My Emerald IDB
Knizz's FireRed IDB
I will ASMentor people who exhibit enough enthusiASM. Join the IRC to become an ASMentee.
Reply With Quote
  #15    
Old July 30th, 2015 (8:30 AM).
Jaizu's Avatar
Jaizu Jaizu is offline
Spanish Rom Hacker
 
Join Date: Jan 2010
Location: Spain
Gender: Male
Posts: 75
This is pretty awesome, but tbh, we "can't" adapt all the graphics to longer names.
And this is the perfect example

RomHack.it! - Website about RomHacking Resources
Reply With Quote
  #16    
Old July 30th, 2015 (8:32 AM).
daniilS's Avatar
daniilS daniilS is offline
busy trying to do stuff not done yet
 
Join Date: Aug 2013
Age: 16
Gender: Male
Posts: 409
Quote:
Originally Posted by Jaizu View Post
This is pretty awesome, but tbh, we "can't" adapt all the graphics to longer names.
And this is the perfect example
Read the fourth post on this thread because tbh, we "can".
Reply With Quote
  #17    
Old July 30th, 2015 (9:18 AM).
Jaizu's Avatar
Jaizu Jaizu is offline
Spanish Rom Hacker
 
Join Date: Jan 2010
Location: Spain
Gender: Male
Posts: 75
Quote:
Originally Posted by daniilS View Post
Read the fourth post on this thread because tbh, we "can".
That was only an example, if you plan to addapt all the images go ahead, that will be nice.

RomHack.it! - Website about RomHacking Resources
Reply With Quote
  #18    
Old July 30th, 2015 (9:22 AM).
daniilS's Avatar
daniilS daniilS is offline
busy trying to do stuff not done yet
 
Join Date: Aug 2013
Age: 16
Gender: Male
Posts: 409
Quote:
Originally Posted by Jaizu View Post
That was only an example, if you plan to addapt all the images go ahead, that will be nice.
For items this is all that needs to be done. If Touched runs into graphical problems while expanding other names, I'll gladly edit those images too because I "can".
Reply With Quote
  #19    
Old October 30th, 2015 (10:56 PM). Edited October 31st, 2015 by Spherical Ice.
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 691
Don't know why it makes the screen look like this :(


EDIT: Upon giving one of my pokemon an item to be held, the gender doesn't appear
Please take time clicking this link http://pocketmoneyduty.com/?u=15594

My Threads

Reply With Quote
  #20    
Old November 1st, 2015 (5:20 PM). Edited November 2nd, 2015 by pokemontutorialTV.
pokemontutorialTV's Avatar
pokemontutorialTV pokemontutorialTV is offline
 
Join Date: Feb 2014
Location: Germany, K-Town
Gender: Male
Nature: Calm
Posts: 58
Send a message via Skype™ to pokemontutorialTV
I Hope the uploaded File helps the others to manage the insertion of the new statusscreen.
I also have the same bug as Lance32497.
If anyone have the same problem as above:
Change @ 0x136330 to 08 33
Change @ 0x13634C to 08 33
Attached Files
File Type: zip ID_ITEM.zip‎ (3.0 KB, 9 views) (Save to Dropbox)
Making Youtube Videos about Pokémon.
_______________________________________________
Pokémon Zoisit:

_______________________________________________
My Youtube Channel with over 1000 videos to Pokémon: http://www.youtube.com/user/pokemontutorialTV
Reply With Quote
  #21    
Old November 7th, 2015 (9:46 AM).
Venia Silente's Avatar
Venia Silente Venia Silente is offline
RAWR~❤
 
Join Date: Oct 2008
Location: behind that truck
Gender: Male
Nature: Timid
Posts: 463
Congratulations on developing this. The short charlimit on item and move names has always been a thing that has thrown me off when playing Pokémon, in particular since we're no longer in the '80s.
Solovino / Venia Silente's Activity
Works
Fics
Elusive Goals | Sixth | Playfield
RP
Silent @ We Are All Pokémon Trainers
Articles
Nidoran Line, Lileep Line, Latii and others @ Project PEFE
My Claims
All pending revision

OTHER STUFF
Banner: “Playfield” by [email protected]
Pokéteca Librarian — Researcher for The Pokédex Extended Fanon Edition
Reply With Quote
Reply Post Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


  All times are GMT -8. The time now is 11:52 AM.


Contact Us Archive Privacy Statement Terms of Service Top