Hex editing minecraft Help

thedevil5600 Mar 29, 2013

  1. th

    thedevil5600 Newbie
    0/47

    Joined:
    Oct 16, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Console:
    Xbox
    Anyone help on step 5 can't figure it out can someone explain more please. Also to help i added my file at step 5, if that helps View attachment Stuck at step 5.rar
    The TUT i followed is below-Plus if anyone makes a vid i will be so so so great-full.

    The goal of this tutorial is to show you how to extract files out of your savegame.dat file. These files (particularly "level.dat" and the individual player files) can be opened up in NBTExplorer, allowing you to alter your inventory and change the time of day and weather of your world. It's also possible to extract the region files, but I believe the Xbox 360 format of these files uses a different type of compression, and are incompatible with typical Minecraft PC tools.

    Part 1 - 360Revolution
    Using the USB Explorer in 360Revolution, extract the Minecraft save file to your computer. Next, open that file (it should have a .bin extension) using the 360Revolution Package Manager, and extract the "savegame.dat" file.

    Part 2 - Fairchild's Minecraft 360 Compression Toolkit
    Use fairchild's compression toolkit to decompress your savegame.dat file. If you are unsure where to get this tool, it is the "minecraft.exe" that comes bundled with the Minecraft 360 Save Editor (found here).

    Usage: minecraft.exe -d savegame.dat savegame-decompressed.dat

    Part 3 - Find the offset for the Index
    For the next few parts you will need a hex editor. I recommend the freeware editor HxD.
    Open the decompressed "savegame-decompressed.dat" in your hex editor of choice. So far, I've uncovered a number of things about this file. First, the first 4 bytes of the file are an offset to an "index" that occurs at the end of the file, and the next 4 bytes indicates how many files are in it. For example, my save begins with "00 D6 64 69" followed by "00 00 00 10", meaning the index begins at offset D66469, and references 16 files (10 in hex -> 16 in decimal).

    Part 4 - Extract the Index
    Once you have the offset from part 3, open the Search menu and select Goto (or press Ctrl+G). Enter your offset in the box that pops up (D66469 for me), and choose Hex and Begin for the other options. Press OK, and you will be at the very beginning of the Index. From this point on until the end of the file is the full index. I recommend selecting all of it, then cut and paste it into a new file.

    Part 5 - Reading the Index
    With the index copied to a new file, go to the View menu, and change "Bytes per row" to 144. This will stretch HxD out quite a bit, and make it easier to tell each line apart, as each file will have its own row. So far the only useful files to edit are the level.dat, or the players/########.dat files. Your players save file will be your Xbox Profile ID, converted from hex to decimal. Once you've decided which file to extract, we need to figure out the offset and length of the file. Within the same row as the file name, the 4 bytes following the name (80-83) are the length of the file. The next 4 bytes (84-87) are the offset. For my level.dat file, the length was "00 00 00 DC" (decimal 220) and the offset was "00 A7 B0 0C".

    Part 6 - Extract your file
    Switch back to the "savegame-decompressed.dat" tab in HxD, and open the Select Block window (Edit->Select Block, or Ctrl+E on your keyboard). Enter your offset and length from part 5, choose Hex, and press OK. Now copy this chunk, and paste it into another new file. I recommend saving it with the original name to keep things straight if you extract multiple files. Additionally, before you continue to the next step, close the tab for the file you're trying to edit to prevent issues in part 6.

    Part 7 - Edit the extracted file in NBTExplorer
    Open NBTExplorer (found here), and open the folder that you've been working in. It should recognize your index.dat and [player ID].dat files automatically, and give you a tree-view of their contents. In the level.dat file, it's possible to adjust the time on the map, turn rain on and off, adjust the spawn point for new players, or check the seed of the map. (Fun fact: the seed used for the tutorial level was 1171544198849424676). For player files, you can edit your health (max is 32,767), edit your inventory (nested sections with 4 values, Quantity, Slot number, Damage, and Quantity). For tools/weapons it is possible to make them invincible by setting damage to a high negative value (not recommended for armor, as it appears to cause a glitch where you are killed in one hit, and never respawn). To max out the quantity of an item, set it to -1 and you'll get stacks of 255 in-game. For a list of ID numbers and possible numbers, check out the Minecraft wiki entry here.

    Part 8 - Starting to put it back together
    Once you've finished modifying your file in NBTExplorer and saved it, open it back up in HxD. Press Ctrl+A to select the full contents of the file, and copy them. Switch back to the "savegame-decompressed.dat" tab and select the original block for your file (follow the first half of step 6 to select the Offset/Length). Next, press Ctrl+V to paste, and it will overwrite your selection with the contents that you've edited.

    Part 9 - Fixing the Index
    Now, chances are, when you edited your files, the length of the file will have changed. If the file you were working with was the last one in the "savegame-decompressed.dat", then skip this part. If not, we have a little more work to do. Switch to the tab in HxD where we pasted the Index earlier. Using parts 5 & 6 of this tutorial as a guide, locate and change the length of the file you were working on. Now we need to adjust the offsets of the rest of the files that follow. Using a calculator, add the offset and the length of the file you were working on, and use the result as the offset for the next file. Then add the length of that file to get the offset for the next-next file. Repeat until you've reached the bottom of the index. Note: Combine the offset and length of the last file mentioned in the index to get the new offset for the index.

    Part 10 - Put the Index back
    Copy the full contents of the Index, and paste it at the very end of "savegame-decompressed.dat". If you did not get to skip Part 9, be sure to update the offset for the index at the very beginning of the file (the first 4 bytes mentioned in Part 3). Save the file, and we are almost done!

    Part 11 - Re-compress
    Using fairchild's compression toolkit from Part 2, re-compress the file.

    Usage: minecraft.exe -c savegame-decompressed.dat savegame.dat

    Part 12 - Back to 360Revolution
    Using the Package Manager feature, open the original *.bin file for your save. Replace the "savegame.dat" file with the one we've been working on. Finally, click "Rehash and Resign", then transfer the completed *.bin file to your memory card.

    Part 13 - Just kidding about this part, you're actually done!
    Hopefully this tutorial wasn't too difficult for you. Perhaps if someone reading this has skills in programming, you can take this method and write a tool to do the dirty-work of parts 3-10 and output all the files at once?
     
  2. klusterfk

    klusterfk Newbie
    0/47

    Joined:
    Jun 25, 2012
    Messages:
    60
    Likes Received:
    24
    Trophy Points:
    0
    Gender:
    Male
    Console:
    Xbox
    ill take a look at it, btw what exactly are you trying to do? are you trying to edit a player file? or the level.dat? need a little more info on what your trying to do before i can help.
     
  3. ke

    kensta11 Newbie
    0/47

    Joined:
    Jul 26, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Console:
    Xbox
    most likely he is trying to mod the enchantment level most people use hxd for that
     

Share This Page

Close