Please login or register.

Login with username, password and session length
Hex editing Stuff & Basic Tutorial  (Read 21582 times)
Pages: [1] 2 3 4
Vanya [Posts: 3963]
  • View Profile
  • My Facebook
  • share
  • [July 28, 2008, 08:43:10 PM]
Hex editing Stuff & Basic Tutorial
« on: July 28, 2008, 08:43:10 PM »
Some hex editing tools and files.

If anyone has any general questions about hex editing I guess you can ask them here. I may post a tutorial in the future as well.
« Last Edit: January 31, 2010, 06:20:53 PM by Vanya »
    • Modding version: Other/Unknown
  • ¯\(°_0)/¯
    Vanya [Posts: 3963]
    • View Profile
    • My Facebook
    • share
    • [July 28, 2008, 08:45:45 PM]
    (No subject)
    « Reply #1 on: July 28, 2008, 08:45:45 PM »
    Some prelim stuff:

    OK. The very first thing you'd need to know is how hexadecimal numbers work.

    Decimal is the 10 digit system we normally use. (#1-9 and 0) "Hexa-" means 6. Therefore, a hexadecimal system used 10 + 6 digits to count.

    These are the hexa decimal digits:
    0 1 2 3 4 5 6 7 8 9 a b c d e f

    This means that when you count in hex instead of going from 09 to 10 you'd count 09, 0a, 0b, 0c, 0d, 0e, 0f, and then would come 10. It's a little hard to count this way at first, but you get used to it. Some people can even do math in hex. For those of us that can't there's the windows calculator.

    What this means to you for hex editing and programming is that the largest number you can fit into a single byte of info is FF. FF = 255. The first thing you'll notice about the data in a hex editor is that all the bytes are arranged in pairs of digits. Each pair is one byte. And for most simple hex editing you'll only be changing a byte or two.

    For example, in the Super Mario World ROM, if you go to a certain address you can change the speed of the fireballs he throws when he gets a fire flower. This is a single byte that is normally like 05, but if you change it to 0a it'll go twice as fast. This is because 5x2=10, but 10 in hexadecimal is 0a.

    The bin file is a file extracted from FFT. It contains a lot of data and text for the game's main menu. You can open any kind of file in a hex editor, this one just happens to be a binary file.

    The table file is needed for text editing. The one I included is specifically for FFT. Different files will have different tables depending on how the text is encoded. What it does is tell the hex editor to represent certain values as a certain character. Open the table file in a text editor to see the format.

    Important Things to Remember
    > When you hex edit text remember that there could be several duplicate blocks of text in the file you're editing.

    > Unless you're having problems with it, use FFTacText to make your changes. It's much easier.

    > The 2 *problem* files in FFTacText are 'Battle.BIN' and 'World.BIN'. Until FFTacText is perfected you're better off hex editing these. EDIT: The newest version of FFTacText seems to have these problems solved.

    More details
    Quote
    Quote
    00000000 || 88880680888806808888068088880680 || ................
    00000010 || 94880680948806809488068094880680 || ................

    The numbers all the way on the left, "00000000" and "00000010", are the starting addresses of those two lines.

    Like in any number system the leading 0's don't have to be typed. Thus, the offset of the first byte of each of those lines is "0x0" & "0x10". The "0x" tells you that we're talking about an offset. OK?
    Also, it can be written without the first 0 as in "x0" & "x10", but that isn't proper.

    The value stored at 0x0 is "$88". The value stored at 0x1 is also "$88".
    When writing a hex value you put a "$" in front of it or an "h" after it. Thus, $88 is the same as 88h, OK?

    So when I tell you that the skill animation at 0x2ce13 is 012c00. It means that the three bytes at that address are 01, 2c, and 00.

    In WinHex, you load battle.bin.
    Click on the 'Search' menu.
    Go down to 'Go To Offset' and click on it.
    The dialogue box that pops up has a space marked 'File Position'. In that space type "2ce13" and press enter.
    It will jump down to line '0002ce10' which will be highlighted, and the cursor will be on the number '01'.
    Next to it will be '2c', and next to that is '00'.
    Those 3 numbers are the skill animation value. If you change it to "$070000" the cure spell will make the caster use their weapon instead of the normal spellcast animation.
    Try it and see.
    « Last Edit: January 31, 2010, 06:22:17 PM by Vanya »
    • Modding version: Other/Unknown
  • ¯\(°_0)/¯
    trickstardude7
    • share
    • [July 30, 2008, 03:22:50 AM]
    (No subject)
    « Reply #2 on: July 30, 2008, 03:22:50 AM »
    Edit-

    nevermind this is easy thank you for the links and table :D
    « Last Edit: December 31, 1969, 11:00:00 PM by trickstardude7 »
    Cheetah [Posts: 3656]
    • View Profile
    • share
    • [July 30, 2008, 03:41:52 AM]
    (No subject)
    « Reply #3 on: July 30, 2008, 03:41:52 AM »
    Good info, thanks, I will hopefully use this in the future.
    « Last Edit: December 31, 1969, 11:00:00 PM by Cheetah »
    Current Projects:
    trickstardude7
    • share
    • [July 30, 2008, 04:16:07 AM]
    (No subject)
    « Reply #4 on: July 30, 2008, 04:16:07 AM »
    hm im going to try to find a method for psp i have nitepr and can search text but i need some way to implement the fft table in or else everything looks weird and no text im going to keep messing around with it
    « Last Edit: December 31, 1969, 11:00:00 PM by trickstardude7 »
    Vanya [Posts: 3963]
    • View Profile
    • My Facebook
    • share
    • [July 30, 2008, 04:27:26 AM]
    (No subject)
    « Reply #5 on: July 30, 2008, 04:27:26 AM »
    The PSP files should be using the same character encoding as the PSX version. If not I have a program you can use to build a table file. I'll post it tomorrow.
    « Last Edit: December 31, 1969, 11:00:00 PM by Vanya »
    • Modding version: Other/Unknown
  • ¯\(°_0)/¯
    trickstardude7
    • share
    • [July 30, 2008, 05:41:07 AM]
    (No subject)
    « Reply #6 on: July 30, 2008, 05:41:07 AM »
    Quote from: "Vanya"
    The PSP files should be using the same character encoding as the PSX version. If not I have a program you can use to build a table file. I'll post it tomorrow.
     o im dumb i was trying to edit in game i forgot to extract world.bin
    « Last Edit: December 31, 1969, 11:00:00 PM by trickstardude7 »
    Kenshin72 [Posts: 428]
    • View Profile
    • http://www.gamefaqs.com
    • share
    • [July 30, 2008, 06:20:31 AM]
    (No subject)
    « Reply #7 on: July 30, 2008, 06:20:31 AM »
    So using this I can change the 3 things I've always wanted to on the PSP?............*suspenseful pause*........................Skills Names, Job Names, and Skillset Names?
    « Last Edit: December 31, 1969, 11:00:00 PM by Kenshin72 »
    Vanya [Posts: 3963]
    • View Profile
    • My Facebook
    • share
    • [July 30, 2008, 02:23:09 PM]
    (No subject)
    « Reply #8 on: July 30, 2008, 02:23:09 PM »
    As long as the relevant files aren't compressed, you should be able to edit anything you want. Just remember that the text block has to remain the same length or shorter. Padding with zeros is fine, but don't spill over into the next section.

    It is possible to use empty space to put in more text, BUT you'd have to mess with pointers. And messing with pointers isn't easy or fun.
    « Last Edit: December 31, 1969, 11:00:00 PM by Vanya »
    • Modding version: Other/Unknown
  • ¯\(°_0)/¯
    Nagafen
    • share
    • [July 30, 2008, 02:25:03 PM]
    (No subject)
    « Reply #9 on: July 30, 2008, 02:25:03 PM »
    Heh... Thanks Vanya. I've pretty much edited all the Prologue text, and now I'm moving on to Chapter One. Thanks again.
    « Last Edit: December 31, 1969, 11:00:00 PM by Nagafen »
    Vanya [Posts: 3963]
    • View Profile
    • My Facebook
    • share
    • [July 30, 2008, 02:28:50 PM]
    (No subject)
    « Reply #10 on: July 30, 2008, 02:28:50 PM »
    :D
    « Last Edit: December 31, 1969, 11:00:00 PM by Vanya »
    • Modding version: Other/Unknown
  • ¯\(°_0)/¯
    Nagafen
    • share
    • [July 30, 2008, 02:33:40 PM]
    (No subject)
    « Reply #11 on: July 30, 2008, 02:33:40 PM »
    By the by.. how do I edit the White text that says "Orbonne Monastry" at the beggining, just before Ovelia's "God" bit? Is their any known way?
    « Last Edit: December 31, 1969, 11:00:00 PM by Nagafen »
    Vanya [Posts: 3963]
    • View Profile
    • My Facebook
    • share
    • [July 30, 2008, 02:41:40 PM]
    (No subject)
    « Reply #12 on: July 30, 2008, 02:41:40 PM »
    I *think* those are actually graphics. Don't know where they are, though. I think there was some thread somewhere about it. do a search for it. =)
    « Last Edit: December 31, 1969, 11:00:00 PM by Vanya »
    • Modding version: Other/Unknown
  • ¯\(°_0)/¯
    BeoulveBlack
    • share
    • [July 30, 2008, 02:42:34 PM]
    (No subject)
    « Reply #13 on: July 30, 2008, 02:42:34 PM »
    wow this is useful....thanks! now i can see my spelling errors as i go!

    one more thing: how do i edit the fft table, so that when i edit text, i can see the punctuation?
    « Last Edit: December 31, 1969, 11:00:00 PM by BeoulveBlack »
    Vanya [Posts: 3963]
    • View Profile
    • My Facebook
    • share
    • [July 30, 2008, 02:49:03 PM]
    (No subject)
    « Reply #14 on: July 30, 2008, 02:49:03 PM »
    Just use a text editor to open it. The format is simple.

    if 0A is the value used to represent the number 2 you type an entry that reads:

    0A=2

    Each entry has to be on it's own line. You'll see how it's done when you open the file. Check out this site for info on the character mapping: http://gomtuu.org/fft/trans/

    I suppose you could contact Gomtuu with more specific questions about the info on this site as he is a registered user here.

    Also, I'm attaching a table file utility you guys might find useful.
    « Last Edit: July 30, 2008, 02:52:28 PM by Vanya »
    • Modding version: Other/Unknown
  • ¯\(°_0)/¯
    Nagafen
    • share
    • [July 30, 2008, 02:51:03 PM]
    (No subject)
    « Reply #15 on: July 30, 2008, 02:51:03 PM »
    Ahh.. that's good. I was wondering why I coudn't see any of the punctuation.
    « Last Edit: December 31, 1969, 11:00:00 PM by Nagafen »
    Kenshin72 [Posts: 428]
    • View Profile
    • http://www.gamefaqs.com
    • share
    • [July 30, 2008, 03:01:41 PM]
    (No subject)
    « Reply #16 on: July 30, 2008, 03:01:41 PM »
    So Im trying to change a job name. Ramza's chapter two Squire class.
    Um... How do I know which hex digit is which letter?
    « Last Edit: December 31, 1969, 11:00:00 PM by Kenshin72 »
    Vanya [Posts: 3963]
    • View Profile
    • My Facebook
    • share
    • [July 30, 2008, 03:09:32 PM]
    (No subject)
    « Reply #17 on: July 30, 2008, 03:09:32 PM »
    You have to load the table file above along with the file you want to edit. =)
    « Last Edit: December 31, 1969, 11:00:00 PM by Vanya »
    • Modding version: Other/Unknown
  • ¯\(°_0)/¯
    Kenshin72 [Posts: 428]
    • View Profile
    • http://www.gamefaqs.com
    • share
    • [July 30, 2008, 03:28:53 PM]
    (No subject)
    « Reply #18 on: July 30, 2008, 03:28:53 PM »
    O!
    Thats the one you provided in the first post?
    « Last Edit: December 31, 1969, 11:00:00 PM by Kenshin72 »
    Nagafen
    • share
    • [July 30, 2008, 03:30:57 PM]
    (No subject)
    « Reply #19 on: July 30, 2008, 03:30:57 PM »
    Yep. It helps a lot. Trsut me, it got me through most of the Story Text in the Prologue/Chapter One.
    « Last Edit: December 31, 1969, 11:00:00 PM by Nagafen »
    Pages: [1] 2 3 4