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] | ✗ | ✗ |
MAPA | ✓ | ✗ | ✓ | ✗ | ✗ | ✗ |
CMDL | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ |
ANCS | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ |
ANIM | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ |
CSKR | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ |
CINF | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ |
PART | ✓ | ✓ | ✓ | ✓ | ✓ [1] | ✓ [1] |
HIER | - | - | ✓ | ✓ | - | - |
STRG | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
SAVW | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ |
- [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_gc import PAK_GC
def read_file(path):
with open(path, "rb") as f:
return f.read()
PAK_GC.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.26.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2251b3a42719152feb88051d5d567bcee88de26906e8d9bf921af28eeac35fb5 |
|
MD5 | 748e6d2863a6c5c883d3bf5ac4fc7d17 |
|
BLAKE2b-256 | 74f9f9eaf7533ec23174778f84b8cc543709ef650ca49e173a9468ee9d7ae3e3 |
Close
Hashes for retro_data_structures-0.26.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6d152b5e40c1a16459b4f8d360c4be6276ab6d3b916e34e68bc2d4f59507e3c |
|
MD5 | b487d204ff139f7f90c1baa5e990a797 |
|
BLAKE2b-256 | 133fee9cd72cb7292b2af5e2d8d0d333e82f0050d06eb4eb2ecce7664c9ff398 |