Construct file definitions for the Retro Studios game engine files
Project description
Retro-data-structures
Construct type definitions for Retro Studios game
Format | Prime 1 (Read) | Prime 1 (Write) | Prime 2 (Read) | Prime 2 (Write) | Prime 3 (Read) | Prime 3 (Write) |
---|---|---|---|---|---|---|
PAK | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ |
MLVL | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ |
MREA | ✗ | ✗ | ✓ | ✗ [2] | ✗ | ✗ |
CMDL | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ |
ANCS | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ |
ANIM | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ |
CSKR | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ |
CINF | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ |
PART | ✓ | ✓ | ✓ | ✓ | ✓ [1] | ✓ [1] |
- [1] All existing files parse, but not checked if exhaustive for what the game supports.
- [2] Missing re-calculation of how sections are split between blocks.
Example Usage
from retro_data_structures.formats.pak import PAK
def read_file(path):
with open(path, "rb") as f:
return f.read()
PAK.build_file({
'named_resources': [
{"asset": {"type": 'TXTR', "id": 201335801}, "name": 'TXTR_ElevatorIcon_1'},
{"asset": {"type": 'TXTR', "id": 239414538}, "name": 'TXTR_ElevatorIcon'},
{"asset": {"type": 'TXTR', "id": 564256465}, "name": 'TXTR_QuaterCurve'},
{"asset": {"type": 'TXTR', "id": 568030977}, "name": 'TXTR_SaveStationIcon_1'},
],
'resources': [
{
"asset": {"type": 'TXTR', "id": 201335801},
"compressed": 1,
"contents": {"value": read_file("ElevatorIcon_1.TXTR")},
},
{
"asset": {"type": 'TXTR', "id": 201335801},
"compressed": 1,
"contents": {"value": read_file("ElevatorIcon.TXTR")},
},
{
"asset": {"type": 'TXTR', "id": 201335801},
"compressed": 1,
"contents": {"value": read_file("QuaterCurve.TXTR")},
},
{
"asset": {"type": 'TXTR', "id": 201335801},
"compressed": 1,
"contents": {"value": read_file("SaveStationIcon_1.TXTR")},
},
]
}, "Game.pak")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file retro-data-structures-0.3.0.tar.gz
.
File metadata
- Download URL: retro-data-structures-0.3.0.tar.gz
- Upload date:
- Size: 43.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a7e555e85860e1ab5e2574e96aa235228393bd536ed8a3336cb0b9a337c7b9a |
|
MD5 | 79e78c4260259cee14bd7daceaab8ba8 |
|
BLAKE2b-256 | abfd42f7df890ffb523bd767759424db98470ff964cb5b1e2c4e7534f4b8d482 |
File details
Details for the file retro_data_structures-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: retro_data_structures-0.3.0-py3-none-any.whl
- Upload date:
- Size: 43.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 851a72ad4ee44be7df6dcfbd8152673bf09dc1854ea6a787405645e1f43ceb22 |
|
MD5 | 5a6b316b9bc61d5740683279ca68e3a0 |
|
BLAKE2b-256 | 78e163df3f441d318610b0782833b1b53b99e89898e681e25b6a62e1de68e485 |