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] |
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 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.15.2.tar.gz
.
File metadata
- Download URL: retro-data-structures-0.15.2.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 871571129d48d9c37b58b6c80a69e0d9adc7c561724e2f4e4ea473445a3e20f2 |
|
MD5 | fdf9da604df6a26be4deee58518e9fdd |
|
BLAKE2b-256 | 2cda4297f955f9d771e61067d23df8219fd6b7ccb36352c9a7b51b44d9899ec4 |
File details
Details for the file retro_data_structures-0.15.2-py3-none-any.whl
.
File metadata
- Download URL: retro_data_structures-0.15.2-py3-none-any.whl
- Upload date:
- Size: 3.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60d267072bb9cb274d8a7de49b48ca10e7d6fb0bd00e0c4450918e7d03a06f54 |
|
MD5 | c30c4335362d90a16f305d2b12b06429 |
|
BLAKE2b-256 | 9e9093d29dc2454a2f9b9ddc80933e78fc503b9020f6c98658988dfa79b9bd8b |