Skip to main content

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
  • [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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

retro-data-structures-0.9.0.tar.gz (5.8 MB view details)

Uploaded Source

Built Distribution

retro_data_structures-0.9.0-py3-none-any.whl (354.3 kB view details)

Uploaded Python 3

File details

Details for the file retro-data-structures-0.9.0.tar.gz.

File metadata

  • Download URL: retro-data-structures-0.9.0.tar.gz
  • Upload date:
  • Size: 5.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for retro-data-structures-0.9.0.tar.gz
Algorithm Hash digest
SHA256 d57b29a9c2678702fe9069da4ab0859f30baaa63952723669f0a173279d41cc5
MD5 1301eb54c976316740499c1678218978
BLAKE2b-256 95993fc33634a4abebfc4c59c9a4a2274b5672a2f14c64b176626a92a4ddf88b

See more details on using hashes here.

Provenance

File details

Details for the file retro_data_structures-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: retro_data_structures-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 354.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for retro_data_structures-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f487b5a7ec305e968c8ff376aba99c2939240dcf1b949d03f2bb84c56117d380
MD5 0645f9e52d6d6312d88c671bdb388389
BLAKE2b-256 d8cd905b447ad9b56972df44b386562167c64910182e28e1dcdf2ac9478e1616

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page