• 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?".
  • 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.

Tool: Text Hex Convert

Kakarot1212

Resident Programmer
562
Posts
10
Years
UPDATE!

Some highlights on the Version 2.1.0

Version 2.1.0:
  • Name changed from 'Text Hex Decoder' to 'Text Hex Convert'
  • Added support for Standard Hex Values
  • Added 'History' function
  • Added 'Other Form' functions that shows the other possible forms of the hex
  • Added update function
  • And further GUI improvement
 
137
Posts
10
Years
  • Age 35
  • Seen yesterday
I'm skeptical as to the need for a dedicated GUI for this, frankly.

Code:
[thomas@chansey ~/Documents/Projects/pkmn-macro]♣ python
Python 3.4.2 (default, Jan 12 2015, 11:38:40) 
[GCC 4.9.2 20141224 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import codecs, pokemon
>>> codecs.register(pokemon.getregentry)
>>> "Hello, Pokécommunity!".encode("pokemon")
b'\xc2\xd9\xe0\xe0\xe3\xb8\x00\xca\xe3\xdf\x1b\xd7\xe3\xe1\xe1\xe9\xe2\xdd\xe8\xed\xab'

Here. It's in the public domain. It's not the best mapping in the world, but it's not my fault - the encoding Gamefreak used doesn't map cleanly onto Unicode. For example, Unicode has separate codepoints for apostrophe (U+0027) and closing single quote (U+2019), but Gamefreak use 0xB4 as both. I didn't want my codec to be non-bijective, so I don't encode U+0027 as 0xB4, which leads to behaviour that may look odd.

Code:
>>> "RIVAL's NAME?".encode("pokemon") # U+0027 APOSTROPHE
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/thomas/Documents/Projects/pkmn-macro/pokemon.py", line 8, in encode
    return codecs.charmap_encode(input, errors, encoding_dict)
UnicodeEncodeError: 'charmap' codec can't encode character '\x27' in position 5: character maps to <undefined>
>>> "RIVAL's NAME?".encode("pokemon") # U+2019 RIGHT SINGLE QUOTATION MARK
b'\xcc\xc3\xd0\xbb\xc6\xb4\xe7\x00\xc8\xbb\xc7\xbf\xac'
>>> import unicodedata
>>> unicodedata.name("'")
'APOSTROPHE'
>>> unicodedata.name("'")
'RIGHT SINGLE QUOTATION MARK'

I also haven't added support for 0x53 through 0x59, because I'm not sure what the correct thing to do is. Use the private-use area? Decode e.g. 0x53 as U+1D3E U+1D0B?

The encoding of 0xFC through 0xFF is arbitrary and frankly not very good.
 

PokéMew1

Pokémon Fuchsia
484
Posts
10
Years
You're a true lifesaver for making this tool, saved me lots of time and frustration! Thank you!
 

Kakarot1212

Resident Programmer
562
Posts
10
Years
You're a true lifesaver for making this tool, saved me lots of time and frustration! Thank you!

I'm glad I can help :p

I'm skeptical as to the need for a dedicated GUI for this, frankly.

Code:
[thomas@chansey ~/Documents/Projects/pkmn-macro]? python
Python 3.4.2 (default, Jan 12 2015, 11:38:40) 
[GCC 4.9.2 20141224 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import codecs, pokemon
>>> codecs.register(pokemon.getregentry)
>>> "Hello, Pokécommunity!".encode("pokemon")
b'\xc2\xd9\xe0\xe0\xe3\xb8\x00\xca\xe3\xdf\x1b\xd7\xe3\xe1\xe1\xe9\xe2\xdd\xe8\xed\xab'

Here. It's in the public domain. It's not the best mapping in the world, but it's not my fault - the encoding Gamefreak used doesn't map cleanly onto Unicode. For example, Unicode has separate codepoints for apostrophe (U+0027) and closing single quote (U+2019), but Gamefreak use 0xB4 as both. I didn't want my codec to be non-bijective, so I don't encode U+0027 as 0xB4, which leads to behaviour that may look odd.

Code:
>>> "RIVAL's NAME?".encode("pokemon") # U+0027 APOSTROPHE
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/thomas/Documents/Projects/pkmn-macro/pokemon.py", line 8, in encode
    return codecs.charmap_encode(input, errors, encoding_dict)
UnicodeEncodeError: 'charmap' codec can't encode character '\x27' in position 5: character maps to <undefined>
>>> "RIVAL's NAME?".encode("pokemon") # U+2019 RIGHT SINGLE QUOTATION MARK
b'\xcc\xc3\xd0\xbb\xc6\xb4\xe7\x00\xc8\xbb\xc7\xbf\xac'
>>> import unicodedata
>>> unicodedata.name("'")
'APOSTROPHE'
>>> unicodedata.name("'")
'RIGHT SINGLE QUOTATION MARK'

I also haven't added support for 0x53 through 0x59, because I'm not sure what the correct thing to do is. Use the private-use area? Decode e.g. 0x53 as U+1D3E U+1D0B?

The encoding of 0xFC through 0xFF is arbitrary and frankly not very good.

Let me be blunt, the GUI is important because it simply makes work easier. Compare to what you made, my tool is easier to use right? You don't need to type lots of codes to make it work, just hit convert and your done! That alone save a lot of time. And it is less confusing compared to what you show. Let's take the example you gave:

Yours: "Hello, Pokécommunity!".encode("pokemon")
b'\xc2\xd9\xe0\xe0\xe3\xb8\x00\xca\xe3\xdf\x1b\xd7\xe3\xe1\xe1\xe9\xe2\xdd\xe8\xed\xab'
-> With this, you still need to remove the apostrophes, backslashes and the 'x' char to be inserted in the ROM, and that alone consumes a LOT of time. What if it is a whole lot of sentence?

Mine: Just type "Hello, Pokécommunity!" on the text field, hit convert and you get C2 D9 E0 E0 E3 B8 00 CA E3 DF 1B D7 E3 E1 E1 E9 E2 DD E8 ED AB, hit copy, paste on the ROM, done. Easy right?

Anyway, I know this can be done on Python this way, but I wanted to make more conventional one. Good luck on yours bro.
 

Le pug

Creator of Pokémon: Discovery / Fat Kid
870
Posts
10
Years
Great tool, a healthy alternative to quick fixes and secures the fate of A-Text in my eyes forever. Thanks for this awesome tool :]
 
40
Posts
9
Years
  • Age 29
  • Seen Apr 8, 2023
when will u update the link ? any plans ? i could really use this since im new to hacking and this looks fantastic.. ^^
 

Kakarot1212

Resident Programmer
562
Posts
10
Years
when will u update the link ? any plans ? i could really use this since im new to hacking and this looks fantastic.. ^^

You can find the src link on the tool itself though. It's in the 'About' section, but the file there is for the old version. Feel free to test it out until I release the latest one :p
 

Kakarot1212

Resident Programmer
562
Posts
10
Years
I'm just gonna throw it here.

UPDATED TO v2.1.1
Changes:
*No longer requires opening the ini file. Just make sure the ini files are in the ini folder.
*Some tweaks in the program

Thanks for using this tool. :)
 
7
Posts
4
Years
  • Age 34
  • Seen Oct 3, 2019
This has helped me out a few times already! Makes it easy to search for test via hex strings!
 
23
Posts
3
Years
  • Age 23
  • Seen Oct 28, 2021
You should add a Generation tab in which if you change it to Gen II,it changes to that or to get Gen IV if you want to.
 
Back
Top