diff --git a/LCE/File Types/readme.md b/LCE/File Types/readme.md new file mode 100644 index 0000000..003fa3d --- /dev/null +++ b/LCE/File Types/readme.md @@ -0,0 +1,14 @@ +# LCE File Formats +Documentation on various LCE file formats. + +### Table of contents +1. [Saves](../Saving/) - The save format +2. [ARC](./ARC.md) - Used for storing game assets +3. [COL](./COL.md) - Used for storing colors used in-game (e.g biome colors) +4. [MSSCMP](./MSSCMP.md) - Used for storing BINK audio files +5. [THUMB](./THUMB.md) - Contains the world image, along with metadata such as the Seed +6. [Options](./Options.md) - Game settings +7. [GRF](./GRF.md) + +# Contributors +List of contributors can be found under [Team.md#Documentation](/Team.md#Documentation) \ No newline at end of file diff --git a/LCE/Game/readme.md b/LCE/Game/readme.md new file mode 100644 index 0000000..2256ed3 --- /dev/null +++ b/LCE/Game/readme.md @@ -0,0 +1,12 @@ +# LCE Game Mechanics/Misc +Documentation on game mechanics and other stuff that doesn't fit anywhere else. (e.g Strings, Biome IDs, etc) + +### Table of contents + +1. [Biome IDs](BiomeIDs.md) - All biomes in the game (as of Wii U Edition v688, uses "flattened" IDs) +2. [Colors](Colors.md) - Colors for biomes, textures, water, fog, etc. +3. [LimitStrings](LimitStrings.md) - Strings based around `The maximum number of X in a world has been reached.` +4. [BattleMapLocations](BattleMapLocations.md) + +# Contributors +List of contributors can be found under [Team.md#Documentation](/Team.md#Documentation) \ No newline at end of file diff --git a/LCE/Level/RegionFile.md b/LCE/Level/RegionFile.md index 9e9d186..004722e 100644 --- a/LCE/Level/RegionFile.md +++ b/LCE/Level/RegionFile.md @@ -1,32 +1,37 @@ -### MCR Structure +# MCR Structure The following Table gives you Important information the structure of a legacy edition mcr file: -| Name | Size (in bytes) | Description | -| :-:|:-:|:-:| -| [Locations](#locations) | 0x1000 (1024 ints) | Offsets of the chunks within the region file, as well as X,Y positioning -| Timestamps | 0x1000 (1024 ints) | Timestamps for the chunks found within the previous sector -| Chunks | variable | Chunks themselves, compressed with a different format per-console. -### Locations +| Name | Size (in bytes) | Description | +|--------------------------|:------------------:|---------------------------------------------------------------------------| +| [Locations](#locations) | 0x1000 (1024 ints) | Offsets of the chunks within the region file, as well as X,Y positioning | +| Timestamps | 0x1000 (1024 ints) | Timestamps for the chunks found within the previous sector | +| Chunks | variable | Chunks themselves, compressed with a different format per-console. | + +## Locations The locations in LCE seem to use a different format per endianness... #### Big Endian Equivalent to JE Regions -| Name | Size (in bytes) | Description | -| :-:|:-:|:-:| -| Offset | 0x03 (int24) | Offset of the chunk, to get the true offset you need to multiply by 4096. -| Size | 0x01 (byte) | Size of the chunk in 4096-byte sectors + +| Name | Size (in bytes) | Description | +|--------|:---------------:|---------------------------------------------------------------------------| +| Offset | 0x03 (int24) | Offset of the chunk, to get the true offset you need to multiply by 4096. | +| Size | 0x01 (byte) | Size of the chunk in 4096-byte sectors | + #### Little Endian -| Name | Size (in bytes) | Description | -| :-:|:-:|:-:| -| Size | 0x01 (byte) | Size of the chunk in 4096-byte sectors -| Offset | 0x03 (int24) | Offset of the chunk, to get the true offset you need to multiply by 4096. - -### Compressed chunk -Within the chunk header lies a 4-byte portion of data that dictates 2 flags and the compressed chunk size. -| Name | Size (in bits) | Description | -| :-:|:-:|:-:| -| RLE Flag | 1 | Flag for if to use RLE -| Unknown Flag | 1 | It is unknown what this flag is -| Compressed Size | 30 | Compressed chunk size, to get the actual size, you must AND it by `0x3FFFFFFF` -| Decompressed Size | 32 (4 bytes, uint) | Decompressed chunk size -| Compressed chunk | Variable (Compressed Size) | The rest of the chunk | + +| Name | Size (in bytes) | Description | +|--------|:---------------:|---------------------------------------------------------------------------| +| Size | 0x01 (byte) | Size of the chunk in 4096-byte sectors | +| Offset | 0x03 (int24) | Offset of the chunk, to get the true offset you need to multiply by 4096. | + +## Compressed Chunk +Chunks in LCE are double compressed, usually with the console's compression format + chunk specific RLE. + +| Name | Size (in bits) | Description | +|-------------------|:--------------------------:|--------------------------------------------------------------------------------| +| RLE Flag | 1 | Flag for if to use RLE | +| Unknown Flag | 1 | It is unknown what this flag is | +| Compressed Size | 30 | Compressed chunk size, to get the actual size, you must AND it by `0x3FFFFFFF` | +| Decompressed Size | 32 (u32) | Decompressed chunk size | +| Compressed chunk | Variable (Compressed Size) | The rest of the chunk | diff --git a/LCE/Saving/LCE Save File Versions.md b/LCE/Saving/LCE Save File Versions.md index eb6c358..70fcad5 100644 --- a/LCE/Saving/LCE Save File Versions.md +++ b/LCE/Saving/LCE Save File Versions.md @@ -1,24 +1,24 @@ ### Save Versions -| TU(s) | Minimum Version | Current Version | -| :-:|:-:|:-:| -| 0033-0035 | 0 | 1 | -| 0054-TU4 | 0 | 2 | -| TU5-TU8 | 0 | 3 | -| TU9-TU13 | 5 | 5 | -| TU14-TU16 | 6 | 6 | -| TU17-TU18 | 8 | 8 | -| TU19-TU35 | 9 | 9 | -| TU36-TU68 | 10 | 10 | -| TU69-1.95(PS4) | 11 | 11 | +| TU(s) | Minimum Version | Current Version | +|:--------------:|:---------------:|:---------------:| +| 0033-0035 | 0 | 1 | +| 0054-TU4 | 0 | 2 | +| TU5-TU8 | 0 | 3 | +| TU9-TU13 | 5 | 5 | +| TU14-TU16 | 6 | 6 | +| TU17-TU18 | 8 | 8 | +| TU19-TU35 | 9 | 9 | +| TU36-TU68 | 10 | 10 | +| TU69-1.95(PS4) | 11 | 11 | ### Notes -| TU(s) | Notes | -| :-:|:-:| -| 0033-0035 | This format differs from the one we see today, it has been documented [here](./Pre-Release%20Save%20Format.md) | -| 0054 | First version to have the same savegame format used in the latest version (as of the writing of this documentation) | -| TU9 | First version to have a "minimum version" that isn't 0, as well as skipping a number. (3-->5) | -| TU17 | Skips a number. (6-->8) | -| TU54 | Can no longer load version 1 saves, instead it generates a new world. | +| TU(s) | Notes | +|:----------:|---------------------------------------------------------------------------------------------------------------------| +| 0033-0035 | This format differs from the one we see today, it has been documented [here](./Pre-Release%20Save%20Format.md) | +| 0054 | First version to have the same savegame format used in the latest version (as of the writing of this documentation) | +| TU9 | First version to have a "minimum version" that isn't 0, as well as skipping a number. (3-->5) | +| TU17 | Skips a number. (6-->8) | +| TU54 | Can no longer load version 1 saves, instead it generates a new world. | > [!NOTE] > These tests were performed with an emulator, with one world generated per version, versions were sourced from Omniarchive, due to me using Codex-IPSA for this. diff --git a/LCE/Saving/Pre-Release Save Format.md b/LCE/Saving/Pre-Release Save Format.md index e8c6dbd..a46f972 100644 --- a/LCE/Saving/Pre-Release Save Format.md +++ b/LCE/Saving/Pre-Release Save Format.md @@ -10,26 +10,25 @@ - When upgraded, the timestamps of all the files are set to 0L. ### Save file structure -| Name | Size (in bytes) | Description | -|------|-----------------|-------------| -| Offset | 0x04 (uint) | Offset of [File Index](./Pre-Release%20Save%20Format.md#File-Index) -| Index Size | 0x04 (uint) | Size of File Index in bytes -| Minimum Version | 0x02 (ushort) | Minimum file version the LCE client has to support to load the save (might not be used in-game) -| Current Version | 0x02 (ushort) | Current version of the save file -| File Data | variable | bytes of each file contained inside the save -| [File Index](./Pre-Release%20Save%20Format.md#File-Index) | variable | Filenames, offsets within save, and size in bytes of files. +| Name | Size (in bytes) | Description | +|-----------------------------------------------------------|:---------------:|-------------------------------------------------------------------------------------------------| +| Offset | 0x04 (uint) | Offset of [File Index](./Pre-Release%20Save%20Format.md#File-Index) | +| Index Size | 0x04 (uint) | Size of File Index in bytes | +| Minimum Version | 0x02 (ushort) | Minimum file version the LCE client has to support to load the save (might not be used in-game) | +| Current Version | 0x02 (ushort) | Current version of the save file | +| File Data | variable | bytes of each file contained inside the save | +| [File Index](./Pre-Release%20Save%20Format.md#File-Index) | variable | Filenames, offsets within save, and size in bytes of files. | - > [!TIP] > You can get the file count by dividing the Index Size by 136 (e.g $`1360 / 136`$) ### File Index -| Name | Size (in bytes) | Description | -|------|-----------------|-------------| -| File Name | 0x80 | UTF16 UNIX-style path string to dictate the path of the file -| File Size | 0x04 (uint) | Size of file in bytes -| File Offset | 0x04 (uint) | Offset of file in bytes +| Name | Size (in bytes) | Description | +|-------------|:---------------:|--------------------------------------------------------------| +| File Name | 0x80 | UTF16 UNIX-style path string to dictate the path of the file | +| File Size | 0x04 (uint) | Size of file in bytes | +| File Offset | 0x04 (uint) | Offset of file in bytes | > [!WARNING] > There may be index data [at the end of NBT file data](https://github.com/user-attachments/assets/e44eea94-41a9-42cf-8386-f84ac9565cff) diff --git a/LCE/Saving/Split Saves.md b/LCE/Saving/Split Saves.md index ca70511..398b03d 100644 --- a/LCE/Saving/Split Saves.md +++ b/LCE/Saving/Split Saves.md @@ -18,7 +18,7 @@ Not much seems to be known about split saves, so some info may be inaccurate. Thanks to [UtterEvergreen1](https://github.com/UtterEvergreen1) for helping out and explaining this. ### Format -| Name | Size (in bytes) | Description | -| :-:|:-:|:-:| -| Decompressed Size | 0x04 (uint) | | -| Compressed Region | Variable | Compressed with what seems to be a special RLE that is only used for split saves. | +| Name | Size (in bytes) | Description | +|-------------------|:---------------:|-----------------------------------------------------------------------------------| +| Decompressed Size | 0x04 (uint) | | +| Compressed Region | Variable | Compressed with what seems to be a special RLE that is only used for split saves. | diff --git a/LCE/Saving/readme.md b/LCE/Saving/readme.md index b33e50e..5998795 100644 --- a/LCE/Saving/readme.md +++ b/LCE/Saving/readme.md @@ -13,13 +13,13 @@ If you're on a newer-gen console, specifically PS4, Xbox One, and Nintendo Switc Check out the Menu/Sidebar for other stuff not mentioned here. ### Save file names -| Console | Name | Example (if needed) | -|------|----|------| -| Xbox 360 (dat) | `savegame.dat` | | -| Xbox 360 (bin) | `Save{YYYY-MM-DD-HH-MM-SS}.bin` | `Save20230524072953.bin` | -| PS3 | `GAMEDATA` | | -| PS Vita | `GAMEDATA.bin` | | -| Wii U | `{numbers}` | `221122091644` | -| Xbox One | `GAMEDATA` | | -| PS4 | `GAMEDATA` | | -| Nintendo Switch | `{numbers}.dat` | `240408080958.dat` | \ No newline at end of file +| Console | Name | Example (if needed) | +|-----------------|---------------------------------|--------------------------| +| Xbox 360 (dat) | `savegame.dat` | | +| Xbox 360 (bin) | `Save{YYYY-MM-DD-HH-MM-SS}.bin` | `Save20230524072953.bin` | +| PS3 | `GAMEDATA` | | +| PS Vita | `GAMEDATA.bin` | | +| Wii U | `{numbers}` | `221122091644` | +| Xbox One | `GAMEDATA` | | +| PS4 | `GAMEDATA` | | +| Nintendo Switch | `{numbers}.dat` | `240408080958.dat` | \ No newline at end of file diff --git a/LCE/readme.md b/LCE/readme.md index c59d60e..45f9e17 100644 --- a/LCE/readme.md +++ b/LCE/readme.md @@ -4,8 +4,8 @@ Documentation about Minecraft: Legacy Console Edition related stuff. ### Table of contents 1. [Basic Information](./Basic%20Info.md) - Compression, endianness 2. [Saving](./Saving/) - Save file format, split saving, etc -3. [Level/World](./Level/) - Region, Chunk, level storage, etc -4. [File Types](./File%20Types/) - ARC, COL, GRF, MSSCMP, Options, THUMB +3. [File Types](./File%20Types/) - ARC, COL, GRF, MSSCMP, Options, THUMB +4. [Level/World](./Level/) - Region, Chunk, level storage, etc 5. [Game](./Game/) - Game mechanics and other stuff Check out the Menu/Sidebar for other stuff not mentioned here.