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]
  • [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.6.1.tar.gz (48.2 kB view details)

Uploaded Source

Built Distribution

retro_data_structures-0.6.1-py3-none-any.whl (49.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: retro-data-structures-0.6.1.tar.gz
  • Upload date:
  • Size: 48.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6

File hashes

Hashes for retro-data-structures-0.6.1.tar.gz
Algorithm Hash digest
SHA256 5a6687084f80933b2cec511586aaff1ec43aaa5b1acf76c7aeda8140afaa3ba8
MD5 cf3297ae794a49c6602d3ce1c9192a4b
BLAKE2b-256 30bd2e0d6644489cc5a00c3a0f217c679510d8ccf8fed338b9f621d8e3bdcad9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: retro_data_structures-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 49.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6

File hashes

Hashes for retro_data_structures-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29a6d82d90f3b915c6153a547b977c810e32e35039f79a1f2d9edecf6152f9f5
MD5 c453e23531695d3e579a0c4d5ec663e2
BLAKE2b-256 233f962356806d863d348c5bbbf71ecc5c9a644261539bc6edf9ec605a72dcb0

See more details on using hashes here.

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