Advertiser Content

Tool Text Hex Convert

Started by Kakarot1212 July 4th, 2014 10:21 AM
  • 10870 views
  • 30 replies

Kakarot1212

Resident Programmer

Male
Phillipines
Seen August 6th, 2019
Posted May 15th, 2019
562 posts
5.9 Years
UPDATE PEOPLE! {XD}

Text Hex DecoderConvert Version 2.1.1



What the heck is this tool?



This "poorly-made" tool converts Text values to Hex value, and vice-versa. And it is now written in VB.NET! After I decided to part ways with Java. For example if you want to change the game's battle messages,(see smeargles' tutorial HERE) you can use this tool to aid you in converting text values to hex values, and again, vice-versa. And now added support to standard hex!

If you're familiar with hex, converting is just a piece of cake for you. But what if not? Try to look at this:

Let's try to convert the string, "Hello world" for example. Now, how the heck can we convert this to hex? Take note that every letter has it's corresponding Hex equivalent. You can look at this list if you want:
Spoiler:

Pokemon MSG Hex Values
Spoiler:

00= (space)
01=À
02=Á
03=Â
04=Ç
05=È
06=É
07=Ê
08=Ë
09=Ì
0B=Î
0C=Ï
0D=Ò
0E=Ó
0F=Ô
10=Œ
11=Ù
12=Ú
13=Û
14=Ñ
15=ß
16=à
17=á
19=ç
1A=è
1B=é
1C=ê
1D=ë
1E=ì
20=î
21=ï
22=ò
23=ó
24=ô
25=œ
26=ù
27=ú
28=û
29=ñ
2A=º
2B=ª
2D=&
2E=+
34=[Lv]
35==
36=;
51=¿
52=¡
53=[pk]
54=[mn]
55=[po]
56=[ké]
57=[bl]
58=[oc]
59=[k]
5A=Í
5B=%
5C=(
5D=)
68=â
6F=í
79=[U]
7A=[D]
7B=[L]
7C=[R]
85=<
86=>
A1=0
A2=1
A3=2
A4=3
A5=4
A6=5
A7=6
A8=7
A9=8
AA=9
AB=!
AC=?
AD=.
AE=-
AF=·
B0=[.]
B1=[""]
B2=""
B3=[']
B4='
B5=[m]
B6=[f]
B7=[$]
B8=,
B9=[x]
BA=/
BB=A
BC=B
BD=C
BE=D
BF=E
C0=F
C1=G
C2=H
C3=I
C4=J
C5=K
C6=L
C7=M
C8=N
C9=O
CA=P
CB=Q
CC=R
CD=S
CE=T
CF=U
D0=V
D1=W
D2=X
D3=Y
D4=Z
D5=a
D6=b
D7=c
D8=d
D9=e
DA=f
DB=g
DC=h
DD=i
DE=j
DF=k
E0=l
E1=m
E2=n
E3=o
E4=p
E5=q
E6=r
E7=s
E8=t
E9=u
EA=v
EB=w
EC=x
ED=y
EE=z
EF=[>]
F0=:
F1=Ä
F2=Ö
F3=Ü
F4=ä
F5=ö
F6=ü
F7=[u]
F8=[d]
F9=[l]


Standard Hex Values
Spoiler:

20=(space)
61=a
62=b
63=c
64=d
65=e
66=f
67=g
68=h
69=i
6a=j
6b=k
6c=l
6d=m
6e=n
6f=o
70=p
71=q
72=r
73=s
74=t
75=u
76=v
77=w
78=x
79=y
7a=z
41=A
42=B
43=C
44=D
45=E
46=F
47=G
48=H
49=I
4a=J
4b=K
4c=L
4d=M
4e=N
4f=O
50=P
51=Q
52=R
53=S
54=T
55=U
56=V
57=W
58=X
59=Y
5a=Z
7e=~
60=`
21=!
40=@
23=#
24=$
25=%
5e=^
26=&
2a=*
28=(
29=)
2d=-
5f=_
2b=+
2c=,
2e=.
2f=/
3a=:
3b=;
3c=<
3e=>
3f=?
5b=[
5c=\
5d=]
7b={
7c=|
7d=}


Now, did you find yourself a pretty hard time looking for its hex equivalent?
Worry not anymore cause this is the aim of this tool. To help minimize the work for you.
Just input the text/hex you want to convert, push the convert button, and VIOLA! piece of cake, ain't it?

Screenshots



Spoiler:

You can ignore the first though xD
Old Screens
Spoiler:





New Screens
Spoiler:

Standard Hex support

Some improvement on tools section

Some improvements on the help section

Other forms function

History function




Bugs


This tool cannot convert specific characters yet, for "Text - Hex" only. They are as
follows:
  • [pk], [mn], [po], [k], [ké], [bl], [oc], [U], [D]
    [L], [R], [.], [""], "", ['], [m], [f], [$], [x], [>]
    [u], [d], [l]

Future Plans

  • Add a "Hex to Text" feature DONE!
  • Improve GUI DONE!
  • Ability to directly open a ROM and change its battle messages
    directly
  • Fix all bugs - Getting there
  • And a lot more, I hope.


Changelog


Spoiler:
Version 1:
  • Major release
Version 1.1:
  • Fixed major and minor bugs
  • Added changelog
Version 2.0:
  • Added Hex to Text Feature
  • GUI Improved
  • Now written in VB.NET
  • Open source!
  • And lots more
Version 2.1.0:
  • Name changed from 'Text Hex Decoder' to 'Text Hex Convert'
  • Added support for Standard Hex Values
  • Added 'History' function
  • Addded 'Other Form' functions that shows the other possible forms of the hex
  • Added update function
  • And further GUI improvement

Version 2.1.1:
  • No longer requires opening the ini file. Just make sure the ini files are in the ini folder.
  • Some tweaks in the program


Download


Spoiler:
Version 1 [JAVA] (old, has bug)
Version 1.1 [JAVA]
Version 2.1.1 (latest release)


Source Code


Link is in the tool, in the about section.


If you want to test the older versions, you would want to download Java 6 or higher since the v1 and v1.1 are both written in Java.


Enjoy!

-Kakarot1212

Danny0317

Fluorite's back, brah

Age 19
Male
Seen May 6th, 2019
Posted March 11th, 2017
1,070 posts
6.3 Years
Why has no one commented on this yet? This is great, this can be really helpful for decapitalization, instead of having to use Advance-Text and then compare roms in a hex editor. Good job!

machomuu

Lize is my Inazuma Eleven DO NOT DISRESPECT.

Male
Americalanavania
Online now
Posted June 26th, 2019
10,404 posts
11.4 Years
Agreed, this is pretty awesome. This is a great tool to ween people off of A-Text and change things that would otherwise be left untouched due to lack of hex editing knowledge. I'm interested to see how this will develop.
Lize stands for:
L - Love
I - Of
Z - My
E - Life
Eternally bound, eternally paired, eternally Dutch. Say hi to her will ya? It'll be the best decision you make today. Promise.

Tlachtli

Crit happens.

Age 28
Male
Faraway place
Seen May 14th, 2019
Posted June 15th, 2017
267 posts
7.6 Years
I'll definitely be giving this a try, writing in hex directly is a PITA {XD}
Pokemon Sigma Σmerald:
(now under management by DraconianWing)

A Gen 3 remake de-make, featuring many new encounters and Gen VI mechanics

Kakarot1212

Resident Programmer

Male
Phillipines
Seen August 6th, 2019
Posted May 15th, 2019
562 posts
5.9 Years
WOW! ^_^ Thanks for all the awesome comments guys! I will try to develop this tool to make it more powerful. :D

Danny0317

Fluorite's back, brah

Age 19
Male
Seen May 6th, 2019
Posted March 11th, 2017
1,070 posts
6.3 Years
Sometimes the tool doesn't work, like right now, I put STORAGE and it gave me CD CE C9 CC BB C1 BF and that's fine, but now I put Storage and it gives me CD E8 E6 D5 DB D9. It happens commonly so please fix :D

Kakarot1212

Resident Programmer

Male
Phillipines
Seen August 6th, 2019
Posted May 15th, 2019
562 posts
5.9 Years
Sometimes the tool doesn't work, like right now, I put STORAGE and it gave me CD CE C9 CC BB C1 BF and that's fine, but now I put Storage and it gives me CD E8 E6 D5 DB D9. It happens commonly so please fix :D
That's just normal. Because the hex equivalent of BIG letter and small letters are different. Like BIG letter 'O' is C9 and small letter 'o' is E6 . ^_^

Danny0317

Fluorite's back, brah

Age 19
Male
Seen May 6th, 2019
Posted March 11th, 2017
1,070 posts
6.3 Years
That's just normal. Because the hex equivalent of BIG letter and small letters are different. Like BIG letter 'O' is C9 and small letter 'o' is E6 . ^_^
I know about that, it's the number of Hex characters that are appearing xD

Kakarot1212

Resident Programmer

Male
Phillipines
Seen August 6th, 2019
Posted May 15th, 2019
562 posts
5.9 Years
I know about that, it's the number of Hex characters that are appearing xD
Ooohhh, you should have said earlier sorry about that. I'll go and fix this. Thanks for reporting :)
EDIT: In addition to that, what other particular word(s) does this same error occur at?

Damn. Sure wish I came across this tool earlier. Would have saved me a tonne of time.
EDIT: Seems to not insert the line breaks (FE in hex.)
Yeah, it currently don't work at the moment. Please insert it manually for the meantime. I'll add this when school ♥♥♥♥s are done. ;)

Danny0317

Fluorite's back, brah

Age 19
Male
Seen May 6th, 2019
Posted March 11th, 2017
1,070 posts
6.3 Years
Ooohhh, you should have said earlier sorry about that. I'll go and fix this. Thanks for reporting :)
EDIT: In addition to that, what other particular word(s) does this same error occur at?
Not sure. Sometimes it just happens randomly, I don't think it depends on the words. Good luck in fixing this, it really has helped a lot ^^

Kakarot1212

Resident Programmer

Male
Phillipines
Seen August 6th, 2019
Posted May 15th, 2019
562 posts
5.9 Years
Not sure. Sometimes it just happens randomly, I don't think it depends on the words. Good luck in fixing this, it really has helped a lot ^^
It was not able to translate the small 'o' in Dark Sneasal's case. When I type 'o' it gives a blank output. This is the problem. There might be more characters missed. Otherwise, the tool is very convenient
Yeah, sorry about that guys. It was a heck a lot of carelessness of me that I miscoded the small 'o' to big 'O'. BTW it is fixed now. Thanks for reporting :)

Kakarot1212

Resident Programmer

Male
Phillipines
Seen August 6th, 2019
Posted May 15th, 2019
562 posts
5.9 Years
Very Nice tool,
I did have a private tool similar to this, but I never got the hex to text feature working properly. I look forward to seeing that implemented :).
Yeah, it really gives me aches at the moment, but I'll work on it when exams are done. :D

Percy

Male
Asia
Seen 5 Hours Ago
Posted 5 Hours Ago
I can't open it, it says
Spoiler:
! Text Hex Decoder v2.0.zip: The archive is either in unknown format or damaged

Kakarot1212

Resident Programmer

Male
Phillipines
Seen August 6th, 2019
Posted May 15th, 2019
562 posts
5.9 Years
I can't open it, it says
Spoiler:
! Text Hex Decoder v2.0.zip: The archive is either in unknown format or damaged
Link fixed! Please try to download it again. :)

Kakarot1212

Resident Programmer

Male
Phillipines
Seen August 6th, 2019
Posted May 15th, 2019
562 posts
5.9 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

Kakarot1212

Resident Programmer

Male
Phillipines
Seen August 6th, 2019
Posted May 15th, 2019
562 posts
5.9 Years
Very Nice tool,
I did have a private tool similar to this, but I never got the hex to text feature working properly. I look forward to seeing that implemented :).
I managed do it somehow ^_^

ThomasWinwood

Male
Seen 3 Weeks Ago
Posted July 26th, 2019
80 posts
5.8 Years
I'm skeptical as to the need for a dedicated GUI for this, frankly.

[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.

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

Kakarot1212

Resident Programmer

Male
Phillipines
Seen August 6th, 2019
Posted May 15th, 2019
562 posts
5.9 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.

[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.

>>> "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.
Advertiser Content