V1.4: 1. Updated the Create Savegame.dat script, faster & better. 2. Updated the Decrypt script, to work with the above changes. 3. Batch files, have been optimized & cleaned up. 4. I included an Empty save.dat. Use this to import different works region files. 5. I included my script to compress Region chunks & aluigi (guy who makes QuickBMS) script to extract region chunks. (The above is for the advanced user, batches found in the Batches folder, place in the main directory) There shouldn't be any more things I need to do for the extraction & creation side.
Update 4: region replacment example. First chunk replaced. Second stage, though for some reason everything get pointed east :-\
curious, is there currently any way to import/reinject the extracted .dat files back into the main .mcr files?
Not currently, I do it manually :-( I wanted to get the compression done correctly. This is on my todo list (next up)
If you decompress both the PC and XBOX versions....do the file parts match up? Are the structures of the decompressed objects completely different? If you want someone to test that, I would need Xmemcompression and... (insert other compression of PC map here) correct? Can you give me a quick breakdown of each compression system? I'll have a look and see what i can put together as I am not interested in modifying an xbox file to reinsert back into the xbox, merely to extract my maps off of hte xbox and succcessfully import them into PC. I am interested in helping so that one day i can pull some of my favorite builds out of the xbox
Its nearly the same just the xbox uses FF as a kind of shortcut to having loads of 0000000. after blocks -> 8000 - this is the first block will be 07 depending on what type of world you have it will be bigger or smaller, this is a flatland chunk column. 0703 0302 FF7B 00 The way the xbox works is better than the PC in that it only has the values for blocks used. So 0703 0302 are bedrock - dirt x2 - grass block followed by the FF then hight in reverse, goes from 7F to 00 - 127 to 0. so. 07030302FF7B00 <- separator fills the rest of the blocks in that column. is the same as 0703030200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 <- separator. the Xbox reads PC block & data sections, but other parts are different. Also the xbox files are in a different order. you could take the first block values up to FF & check how many there are then null the rest replacing FF** with 00 upto 127, but then you need to recompress to Zlib & not looked into that. It, would be harder to put xbox onto PC as of now. OK, Xbox chunks are in a random order :-@ but I have that covered. Well I need to create 729 * 4 new chunk files, with the correct chunk order. Update, bellow is correct, but MCEdit is the one that puts chunks in order. This is how the xbox should be ordered, but its not. Code: r.0.0.mcr - total of 729 xPos FF 0300 to 0000 001A zPos FF 0300 to 0000 001A r.0.-1.mcr - total of 729 xPos FF 0300 to 0000 001A zPos FF 02E5 to FF 03FF r.-1.0.mcr - total of 729 xPos FF 02E5 to FF 03FF zPos FF 0300 to 0000 001A r.-1.-1.mcr - total of 729 xPos FF 02E5 to FF 03FF zPos FF 02E5 to FF 03FF This is how the PC is ordered. Code: r.0.0.mcr - total of 729 xPos 0000 0000 to 0000 001A zPos 0000 0000 to 0000 001A r.0.-1.mcr - total of 729 xPos 0000 0000 to 0000 001A zPos FFFF FFE5 to FFFF FFFF r.-1.0.mcr - total of 729 xPos FFFF FFE5 to FFFF FFFF zPos 0000 0000 to 0000 001A r.-1.-1.mcr - total of 729 xPos FFFF FFE5 to FFFF FFFF zPos FFFF FFE5 to FFFF FFFF
So we would need hash maps and arrays of opcode-esque handlers. Man, this is similiar to how the Nintendo Dolphin was finally emulated to PC. Ok, so basically each FF block represents the seperator until the end of the column. Does this only and always occur as the end of the data set or is it interspersed throughout the dataset?
It's found through out the data, its used on blocks, data, xzpos, blockslight & skylight sections. There could be more haven't really looked. Just leave this here ;-) I can import worlds now. Still have to get skylight to import correctly :-( or it looks strange, like under water oO is clear as day lol Now there are limitation, if the world has 729 chunks it imports fine, if it has more then the problem start :-@ as the index at the start of the MCR file doesn't match that of the chunk locations, so would need to make one from scratch, but that would be impossible for me. As I have no way of knowing what chunk is what.
is it safe to assume 1.5 will have the import function? or is it still kind of buggy aside from the skylight issue your having?
1.5 yes, but that isn't soon. I can import everything bar tileentites & skylight, not sure why skylight isn't working though :-@ When I'm finished it will hopefully be a 1 click & wait scenario, to convert PC to Xbox. As of right now it takes just over 2 mins to convert one region file & I do it a mad way lol if I new C language it would be quicker & less messy. It will include a PC save with the correct map size & an xbox save with matching chunk ids. But I need 50000 subscribers on YouTube first ;-) Last part is a joke
sounds great, cant wait for the pc to xbox function. its such a pain having to manually put each chunk back into the mcr files. but at least its something! great progress so far, keep up the great work.
Here is the tileentitie for mobspawners. insert after the this. (change the last byte to match the number of entities, so if you add on you would change it to 01) Code: 09000C54696C65456E7469746965730A00000000 MobSpawner Entity Hex. (you will need to adjust the name length if you change the id. ie, zombie to enderdragon you would change 0006 to 000B followed by "456E646572447261676F6E" EnderDragon. Code: 0800026964000A4D6F62537061776E65720300017900000015080008456E74697479496400065A6F6D62696503000178FF02B10300017AFF02DC02000544656C6179001402000D4D6178537061776E44656C6179032002000A537061776E436F756E74000402000D4D696E537061776E44656C617900C800
I have + rep you in just about every post in this thread. I'm very happy with your progress thus far and have been keeping up with everything. I have woke up and fell asleep hoping for more progress with your program. I have been working on a map for 6 months and can't wait to run my map thru Mcedit. Thank you
WHAT???? Foiled again. I noted you have a Pes 2012 PS3-PC to xbox converter. I wont be able to change my file type to pc format? Only import pc maps?
Rocky, thank you for your work on this tool! I've been doing some experimentation with the using NTB Explorer to edit my player data (adding enchantments and such), and I'm having difficulty re-compressing the savegame file - the batch file seems to run but the output file contains the original version of my save, not a modded version. Here's the process I've been following: Pulled savegame.dat from the xbox and moved into Extractor directory Dragged savegame.dat onto "Extract Save Data.bat" - which created the "savegame" folder Added an enchantment to the first item in my inventory using NTB Explorer - which increased the size of my player data file With the original "savegame.dat" and the "savegame" folder with my modified player data in the Extractor directory, I dragged the savegame.dat file onto "Create Savegame.dat.bat" The batch file runs and creates the "savegame Output" folder containing the savegame.dat file, but that file contains the original version of my player data, not the modified version. If I'm doing something wrong, please let me know, or if this sounds like a bug, let me know if there's something I can do to assist.
use the empty save.dat to import into instead of your original just copy your hole folder into the Empty Save folder & overwrite.
Thank you for the pointer - I tried this a few different ways on different saves but it never seemed to work - the player data file in the output savegame.dat seemed to get corrupted or truncated in some fashion (although the rest of the data seemed to work). As you instructed, after modding editing my player data in NBT Explorer, I copied all of the files from my modified "savegame" folder into the extracted "Empty Save" folder, replacing all files with the same name. Since this was a newly created world, the "r.0.-1.mcr" and "r.-1.-1.mcr" files from the original extraction of the "Empty Save.dat" file remained, as did the "00000000000000000000.dat" player data file in the "players" folder (my own player data file 16140932926077429833.dat was copied into that folder). After dragging the "Empty Save.dat" file onto the "Create Savegame.dat.bat" to generate the new (modified) savegame.dat file, I extracted the save data from the modified savegame.dat file as a verification. It appeared to contain everything except the player data when I viewed it in NBT Explorer - but there were no players included. When I looked at the player data file in the "players" folder, it was only 508 bytes - less than the 3,141 bytes of my original and seemingly identical to the player data file from the empty save. I tried renaming my player data file to match the original empty save player data file, and/or just having it be the only file in that folder, but the result didn't change - the player data in the output file was always empty when I re-extracted it. You mentioned that the compressor requires that the replacement files be equal to or smaller than the files in the empty save - could that be related since the empty file's player data file is so small? Let me know if I can assist, or if you think this might be a no-go for player data, and thanks for trying to help!