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

Khaos's Hex Tutorial

KhaosKnight

The 1 and only Khaotic Hacker
355
Posts
16
Years
  • Seen May 28, 2015
Welcome to my Tutorial you may already know me but for those of you who don't I am Khaosknight1, this tut may not be needed but I have seen allot of questions in the Help threads regarding what the pokes numbers are for their scripts...so lets begin.


ToC
1. Hex Explanation
2. Hex's usage in Scripting
3. Simple Conversion
-----3.2 Manual Converion
4. List of Pokes
5. Binary Explanation
6. Closing Statements


1. Hex Explanation

Ok let me start off by explaining what Hexadecimal Numbers are:

Hex (for short) is a method of counting numbers with a base of 16.
Code:
[COLOR=black][FONT=Tahoma]0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F....[/FONT][/COLOR]

There are Decimal numbers (which is what most are accustomed to using) then there are Hexadecimal numbers, Hex numbers are commonly used in electronic and computer programing. Since each hexadecimal digit represents four binary digits it is a compact and easily translated shorthand to express values The symbol A in hex has the same value as 10 in Dec., but in Hex the value 10 is the same value as 16, many programs and programmers use hexadecimal numbers.

So here is the basic Dec. numbers with their Hex equivalents

Code:
[COLOR=black][FONT=Tahoma]Dec - Hex[/FONT][/COLOR]
 
0  -  0
[COLOR=black][FONT=Tahoma]1  -  1[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]2  -  2[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]3  -  3[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]4  -  4[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]5  -  5[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]6  -  6[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]7  -  7[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]8  -  8[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]9  -  9[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]10 - A[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]11 - B[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]12 - C[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]13 - D[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]14 - E[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]15 - F[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]16 - 10[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]17 - 11[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]18 - 12[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]19 - 13[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]20 - 14[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]21 - 15[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]22 - 16[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]23 - 17[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]24 - 18[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]25 - 19[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]26 - 1A[/FONT][/COLOR]
[COLOR=black][FONT=Tahoma]27 - 1B[/FONT][/COLOR]
 
[COLOR=black][FONT=Tahoma]and so on...[/FONT][/COLOR]


2. Hex's Usage in Scripting


Ok almost every value you imput when scripting wil be in Hex. (Though you can imput values in Dec but i cant remember how:P). But anyway do you remember when you first scripted a givepokemon script. Course ya do! Lets say you want a level 15 Vulpix. So you imputed it like this:

Code:
givepokemon 0x37 0x15 0x0 0x0 0x0

Ok no that it is compiled, you test it. Hmm? i didnt get a level 15 Vulpix, i got a level 21 Golduck. Why? in scripting that command took your values as hex values and Golducks number is 37 in Hex(#55 in Dec) and 21 is 15 in Hex. So to fix it you have to Hex Vulpix's value and the number 15, so we get...

Code:
givepokemon 0x25 0xF 0x0 0x0 0x0

kay now test that...Yay we got our Vulpix!!!

I may expand on this in the Future...


3. Simple Conversion

Ok so what if you are working a Give Kyogre script, his national number is 382, well you don't want to have to count that high so here is a method of converting Dec. to Hex the almost everyone can do...

First open MS Calculator

it should look like this...


MS-Calculator-Animation.gif


You can't do any conversion with that so you want to click the "view" tab, then click "Scientific" and now you should have this...


windows_calculator.jpg



Now to do the conversion all you have to do is punch in Kyogre's National Number which is 382...then click the empty circle next to the word "hex" it should convert 382 to 17E which is Kyogres National Dex number in hex.

3.2. Manual Conversion

Coming Soon!!!!

4. List of Pokes

Ok since some are too lazy to go find the National Numbers I will post them here. Just take the number to the corresponding poke then follow the method above.

1 - 151 (Bulbasaur - Mew) Kanto

Spoiler:


152 - 251(Chikorita - Celebi) Johto

Spoiler:


252 - 386(Treecko - Deoxys) Hoenn

Spoiler:


387 - 493(Turtwig - Arceus) Sinnoh

Spoiler:


5. Binary Explanation
Coming Soon!!!

6.Closing Statement
Ok there you go, i may update this in the future but for now it covers the basic concept. I plan to add an explanation on Binary numbers if needed. And if its really needed i will cover Octadecimal as well. Meh, just to cover all the conversions the MS Calculator can do, but i dont see that happening.
 
Last edited by a moderator:

Thrace

@tion
1,048
Posts
16
Years
  • Age 33
  • Seen Oct 2, 2016
Oh cool, this should be good for the beginner hackers. Those "what is celebi's number in hex?" questions are really annoying. :P

I agree with the above poster this is very basic. Maybe you could include manual decimal to hex conversion and vice versa. A more in-depth explanation on what hex is and how it is used in hacking would be good also.
 

KhaosKnight

The 1 and only Khaotic Hacker
355
Posts
16
Years
  • Seen May 28, 2015
Oh cool, this should be good for the beginner hackers. Those "what is celebi's number in hex?" questions are really annoying. :P

I agree with the above poster this is very basic. Maybe you could include manual decimal to hex conversion and vice versa. A more in-depth explanation on what hex is and how it is used in hacking would be good also.

That is the next step, but right now i have to learn the end-and-out of Hex too, i became familiar with Hex while i hacked the Action Replay. and after i made this tut i studied Binary.

But right now i just wanted to get this out there for the people taht cant read another tut or use the calculator
 

<~F.M.P~>

I got you whistling Blue Box!
577
Posts
17
Years
Can you also hex edit the colors of the flames in fire red version on the title screen like this?
I also think this is a little off topic...sorry about that.
 

KhaosKnight

The 1 and only Khaotic Hacker
355
Posts
16
Years
  • Seen May 28, 2015
Can you also hex edit the colors of the flames in fire red version on the title screen like this?
I also think this is a little off topic...sorry about that.

Im not sure what you mean...sorry :D

You're the best! Now I know how to make a Jirachi event!
The dec->hex conversion will be an invaluable resource!

Glad i could be of assistance!
 
4
Posts
15
Years
  • Seen Jul 31, 2011
Hey, do you know how can I find the trainer's in the Hex Editor? x_x i just can't find them, if you know could you tell me? XD thx ( in fire red )
 
Back
Top