How to use HexEdit (Informative, not inquisitive)
Moderator: Halo Moderators
How to use HexEdit (Informative, not inquisitive)
It has come to my attention that a few people here do not know how to use HexEdit, so I have taken this opportunity to write a small, yet informative tutorial, since it does not seem to have been done before.
So here it is.
--------------
Okay, first things first. The best Hex Editor I have found is called HexEdit, and you can find it here. If you have some other Hex Editor, I advise you get rid of it and use HexEdit instead, since this tutorial does not cover other Hex Editors.
The tools in HexEdit are pretty basic. When you open a map file, you should see three distinct columns, with very many characters and numbers. On the far left side is a list of addresses. Addresses are always eight characters long. These addresses are in hex (I advise you read this, so you have a solid understanding of how hex works), and relate to the position in the file where the line starts.
If you read that page, you'd know that address 00000010 is the line which starts at byte 16 (Since A, B, C, D, E, and F come before 10 in the hexidecimal numeric system). 00000020 starts at byte 32...etc.
These addresses are very useful in hex, since they are much shorter than they would be if you expressed them in decimal (This only applies to large numbers; for example, 3,184,935 in decimal is only 309,927 in hex -- but I dont want to confuse you, so I wont go into that).
By pressing command+J, you can "jump" to any part of the file, instantly. Just select the "Entry type" (decimal or hex -- since we're using hex editors, I'd keep the "hex" button selected), type in the address, click "GO," and you're off!
---
The next column holds all of the Hex Code. In this column, Hex Bytes are in pairs, and coordinate with ASCII codes (Again, I advise you to read this, since it will minimize the amount of questions you might want to ask).
You will also notice something strange about this column. Unlike the Hex Address column, each row of this column is split into four equal parts, each having 4 hex bytes (8 characters in total), which are split by spaces. There are 4 dividing lines in this column, each having 4 hex bytes, since hex, as you may have guessed if you read the article I posted above, is a numeric system based on 16 (And what's four times four?).
Also, most things in the map file (Object tags and whatnot) are divisible by four, which makes it fairly easy to edit with a Hex Editor.
And finally, the third and last column, is ASCII. Since this column is filled with characters your keyboard may not be able to generate, I'd advise you to stick with editing the hex part. This column is more of a reference to what you're editing, and can be useful from time to time.
The very top of the screen has an info bar. You should see "Len: $xxxxxxxx | Type/Creator: xxxx/xxxx | Sel: $xxxxxxxx:xxxxxxxx / $xxxxxxxx."
Len is file length, in hex by default (but you can change it to decimal by going to Options, and then selecting Use Decimal Addresses).
Type/Creator is pretty self explanatory.
Sel is a bit confusing at first. The first eight numbers after "Sel:" (the one on the left side of the colon; $xxxxxxxx:xxxxxxxx) show your current position in the map file, and the second row of 8 numbers will only differ from the first numbers if you have part of the file selected. In this case, these numbers show where your selection ends. For example, if you have the first four ASCII characters selected, Sel: will look something like this: Sel: $00000000:00000004 . The number after the frontslash shows how many bytes you have selected within the file. Get it?
And again, all of these numbers will appear in decimal if you go to Options and select Use Decimal Addresses.
So there it is. My small, yet hopefully helpful tutorial on how to use HexEdit. I hope this is enough to help some people get started. I'm not going into tags or metas or anything right now, since I believe this should be enough, and there are many topics in this forum and others which do go into that.
Have fun, and I hope someone's learned something from this.
~Deox
So here it is.
--------------
Okay, first things first. The best Hex Editor I have found is called HexEdit, and you can find it here. If you have some other Hex Editor, I advise you get rid of it and use HexEdit instead, since this tutorial does not cover other Hex Editors.
The tools in HexEdit are pretty basic. When you open a map file, you should see three distinct columns, with very many characters and numbers. On the far left side is a list of addresses. Addresses are always eight characters long. These addresses are in hex (I advise you read this, so you have a solid understanding of how hex works), and relate to the position in the file where the line starts.
If you read that page, you'd know that address 00000010 is the line which starts at byte 16 (Since A, B, C, D, E, and F come before 10 in the hexidecimal numeric system). 00000020 starts at byte 32...etc.
These addresses are very useful in hex, since they are much shorter than they would be if you expressed them in decimal (This only applies to large numbers; for example, 3,184,935 in decimal is only 309,927 in hex -- but I dont want to confuse you, so I wont go into that).
By pressing command+J, you can "jump" to any part of the file, instantly. Just select the "Entry type" (decimal or hex -- since we're using hex editors, I'd keep the "hex" button selected), type in the address, click "GO," and you're off!
---
The next column holds all of the Hex Code. In this column, Hex Bytes are in pairs, and coordinate with ASCII codes (Again, I advise you to read this, since it will minimize the amount of questions you might want to ask).
You will also notice something strange about this column. Unlike the Hex Address column, each row of this column is split into four equal parts, each having 4 hex bytes (8 characters in total), which are split by spaces. There are 4 dividing lines in this column, each having 4 hex bytes, since hex, as you may have guessed if you read the article I posted above, is a numeric system based on 16 (And what's four times four?).
Also, most things in the map file (Object tags and whatnot) are divisible by four, which makes it fairly easy to edit with a Hex Editor.
And finally, the third and last column, is ASCII. Since this column is filled with characters your keyboard may not be able to generate, I'd advise you to stick with editing the hex part. This column is more of a reference to what you're editing, and can be useful from time to time.
The very top of the screen has an info bar. You should see "Len: $xxxxxxxx | Type/Creator: xxxx/xxxx | Sel: $xxxxxxxx:xxxxxxxx / $xxxxxxxx."
Len is file length, in hex by default (but you can change it to decimal by going to Options, and then selecting Use Decimal Addresses).
Type/Creator is pretty self explanatory.
Sel is a bit confusing at first. The first eight numbers after "Sel:" (the one on the left side of the colon; $xxxxxxxx:xxxxxxxx) show your current position in the map file, and the second row of 8 numbers will only differ from the first numbers if you have part of the file selected. In this case, these numbers show where your selection ends. For example, if you have the first four ASCII characters selected, Sel: will look something like this: Sel: $00000000:00000004 . The number after the frontslash shows how many bytes you have selected within the file. Get it?
And again, all of these numbers will appear in decimal if you go to Options and select Use Decimal Addresses.
So there it is. My small, yet hopefully helpful tutorial on how to use HexEdit. I hope this is enough to help some people get started. I'm not going into tags or metas or anything right now, since I believe this should be enough, and there are many topics in this forum and others which do go into that.
Have fun, and I hope someone's learned something from this.
~Deox
Last edited by Deox on Fri Apr 21, 2006 3:00 pm, edited 1 time in total.
Nice one. Now how will I spend my time when I don't see anymore "I CAN'T FIGURE OUT HEX EDITING !!!@!" posts.
Kansas....Like Paris Hilton: White, Flat, and Easy to Enter. -- Conan O'Brien
Masturbation is like procrastination, they're both great until you realize your screwing yourself.
MGM Discord | MGM Chat
Masturbation is like procrastination, they're both great until you realize your screwing yourself.
MGM Discord | MGM Chat
Re: How to use HexEdit (Informative, not inquisitive)
I have to note that hex editors are very similar in the basics. The address/hex/ASCII view is universal. I have yet to find a hex editor that can't jump to a specific address. It's the more advanced things where they differ. Say, HexEditor doesn't allow in-place replacing or adding/removing things (I think this is a common feature though), but it can do conversions to many different formats and back, which may be more convenient for you.
Addresses aren't always 32 bits (although many do fit), and in my opinion a hex editor that limits itself to 32 bit addresses is broken. Files (and addresses) can be 4 GiB and larger, and currently 64 bit addresses are often used by the OS. And that's what hex editors should be using.Deox wrote:On the far left side is a list of addresses. Addresses are always eight characters long.
I think it's more important that the hex system is more suited to representing computer types. A hex digit has 16 combinations, and log2(16)=4. Since 4 is an integer, bit stuffing is very straightforward. Also, today most computers use 8 bit bytes (octets). And because 8/4=2, 2 hex digits can represent an octet exactly as 00-FF. It would need 8/log2(10) (NOT an integer) decimal digits, leaving 256-999 unusable.Deox wrote:These addresses are very useful in hex, since they are much shorter than they would be if you expressed them in decimal (This only applies to large numbers; for example, 3,184,935 in decimal is only 309,927 in hex -- but I dont want to confuse you, so I wont go into that).
There's no reason not to use decimal if you have to. Hex is most common for the reasons I gave above, and why it's called a hex editor, but in the end it's just an editor that offers raw access to a file.Deox wrote:By pressing command+J, you can "jump" to any part of the file, instantly. Just select the "Entry type" (decimal or hex -- since we're using hex editors, I'd keep the "hex" button selected), type in the address, click "GO," and you're off!
They're grouped because humans are better at locating things in uniform groups. A nice effect is that aligned 32-bit things will always fit between dividers, and data of different size can also fit in a nice way. The length of the line is 16 to align it with hex addresses, and of course also data. All nibbles but the lowest will tell you the line (noticed that the low nibble in the address column is always zero?), and the low nibble tells where something is located on the line.Deox wrote:You will also notice something strange about this column. Unlike the Hex Address column, each row of this column is split into four equal parts, each having 4 hex bytes (8 characters in total), which are split by spaces. There are 4 dividing lines in this column, each having 4 hex bytes, since hex, as you may have guessed if you read the article I posted above, is a numeric system based on 16 (And what's four times four?).
As its name implies, you can edit data in ASCII there. If you're editing things that are to be interpreted as numbers, it won't be very usable, but it can make editing anything ASCII-like more convenient.Deox wrote:And finally, the third and last column, is ASCII. Since this column is filled with characters your keyboard may not be able to generate, I'd advise you to stick with editing the hex part. This column is more of a reference to what you're editing, and can be useful from time to time.
Re: How to use HexEdit (Informative, not inquisitive)
Thank you for taking the time to correct areas where I may have been incorrect. I tried to do the best I could, but you are obviously a more experienced modder (and now I see it's not just modding...do you have some experience in either programming or computer science?) and know more about how things work than I do - I respect you for this.Jonathan wrote:...stuff...
So yeah.
~Deox
-
- Newbie
- Posts: 30
- Joined: Mon Apr 03, 2006 2:05 pm
well, if you want another version of basic hex editing try this. This knowledge is crutial to modding.
http://www.campaigncreations.org/development/hex.shtml
http://www.campaigncreations.org/development/hex.shtml
-
- SEAL
- Posts: 642
- Joined: Fri Feb 03, 2006 6:13 pm
- Location: Rep'n the 863! Winter Haven, FL!
ive worked...
ive worked so hard on Hex and every time i change a code and turn on Halo Trial it either kicks me off or doesn't load the map. i am really getting mad and want to MOD. can you guys PLEASE HELP ME.
-
- Operative
- Posts: 189
- Joined: Sat Mar 11, 2006 12:12 pm
- Location: I forgot......can you give me a hint?
-
- Operative
- Posts: 189
- Joined: Sat Mar 11, 2006 12:12 pm
- Location: I forgot......can you give me a hint?
so where do u get the codes?
so where do u get the codes? lets say i wanna delete a car what numbers and letters do i delete?
where is the ascii code sheet for halo demo modding?
where is the ascii code sheet for halo demo modding?
Who is online
Users browsing this forum: No registered users and 52 guests