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
  • [1] File offsets must be changed manually
  • [2] Missing re-calculation of how sections are split between blocks.

Example Usage

from retro_data_structures.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.1.0.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

retro_data_structures-0.1.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: retro-data-structures-0.1.0.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for retro-data-structures-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b71570fc1e66f580fdb30aafc80b7dce113a146771002600749a98d3a840d2a5
MD5 5a8a6662034f9d36f64012ded5da8832
BLAKE2b-256 9dd7dc9071dcadde1f47579f46941562c036ae051a38a88374b6383d470afe55

See more details on using hashes here.

File details

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

File metadata

  • Download URL: retro_data_structures-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for retro_data_structures-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3978fe41c575a36d035577824372275d95798bbce318d151314ea3310e195c63
MD5 92f356cdc67c66b1705012323d270a8f
BLAKE2b-256 afce24efd35b0d2a38863f26e1169a9f40d293c386f0b4a809548b2338f59b22

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