1 |
In this tutorial I'm going to explain the hex format used in Jedi Knight flag systems.
2 |
You should've seen "0x1" type of numbers during editing. This is just in hexadecimal(16) format, while what we usually use is the decimal(10) format.
The "0x" in front of it is to just tell the engine that it's in (16) format. I'll tell how to add and subtract those formatted numbers, so you can modify the flag in any way.
3 |
While (10) format uses numbers 0-9 to display all numbers, (16) format uses 0-9 and a-f to display all the numbers needed.
A little conversion here. Corresponds at the same lines.
Decimal | Hexadecimal |
0 to 9 | 0 to 9 |
10 | a |
11 | b |
12 | c |
13 | d |
14 | e |
15 | f |
16 | 10 |
17 | 11 |
18 | 12 |
25 | 19 |
26 | 1a |
27 | 1b |
28 | 1c |
29 | 1d |
30 | 1e |
4 |
Addition and subtraction are easy. Just like in decimal format, just above 10 are in letters and into new digit after 16. The point is to just add each digits from the lower ones. If the addition goes over 16 just add 1 to the next digit as in decimal format.
Examples :
0x1 + 0x4 = 0x5
0x5 + 0x6 = 0xb
0xa + 0x6 = 0x10
0x1a0 + 0xabc = 0xc5c
0xdf8 - 0x9c9 = 0x42f
5 |
Note : The quickest way of calculating this without a hassle is to get out your windows calculator, go to "view" and change the calculator into scientific mode. Press "Hex" on top and type in what you want and do calculations. (Don't type in "0x" =) )A - F are located just below the numbers.
The flags are just hexadecimal integers.
Presented by MILLENNIUM