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
Close
Hashes for retro-data-structures-0.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2fabe16381a7e1c936372f6e0d05ade2b6b588e9d9fff69af35ad5d42f193db |
|
MD5 | 41276bf555bfb8d95116b22e7f12c1c4 |
|
BLAKE2b-256 | cec70072563df0da55732ee180551017bf1d2c82e06ccdfb824eb56130ee3e4b |
Close
Hashes for retro_data_structures-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5eb9c22d5d540d986c9af6d898419c88aad25a2ee5facf2618aa48d7c7393fac |
|
MD5 | a2257ba8f8b3aed78464c334a1dcf51f |
|
BLAKE2b-256 | 3bfd09ac4f5d0cb659f77b4573c319e0a222a4eef2ddb9921898ad1f0dbdfd1b |