Well, "hex editing" is a vaguely generic term. Designing an editor requires hex editing in order to figure out what number does what. Using Wiz8 as an example, if I look in the save game file, I can try and figure out where it stores the values for str, int, pie, etc. Once I've got that figured out, I know where to read and write for the editor.
The only "trick" about hex editing is "hex" (or hexadecimal). As you may suspect from the root "hex", hexadecimal is a base 16 number system. The numbers (and they are numbers in this system) a, b, c, d, e and f are introduced. Converting from hexadecimal to decimal isn't that hard. You simply multiply it out much the same as you would for decimal.
Take the number 542 for example. The number can be read in expanded form as:
5 x 100 + 4 x 10 + 2 x 1
Let's convert the number "a7" from hexadecimal to decimal. We use the same system.
a x 16 + 7 x 1 = 167
We multipled by 16 because it's a base 16 number system, of course.
Taking the previous number of 542, but I'll introduce an easier "trick":
5 x (16^2) + 4 x (16^1) + 2 x (16^0) = 1346
As you can see, each column simply increases the exponential power of 16. You could easily continue this system to any number of digits you need.
This concludes the lesson for the day. [img]smile.gif[/img]
O.R.
|