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]
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


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.21.1.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

retro_data_structures-0.21.1-py3-none-any.whl (4.5 MB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for retro-data-structures-0.21.1.tar.gz
Algorithm Hash digest
SHA256 745e85a80f12e505c21ac1740a073fe383345096322a4f94936d0d1bf3ff87c1
MD5 8e74335ea1104b1688a8638ad8f9b299
BLAKE2b-256 ee7fe5e0db2026b377757e226b684343db7b363354bcf25a385c34cffaf23430

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for retro_data_structures-0.21.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ca77f9bcafe980239a100af0168414b58809fbd5d6a3d6c09c9b18783a2a2a62
MD5 49e410555ab0179f2e362f99308ae771
BLAKE2b-256 2e49e61fba05630dfdd16b68c6025ebded5c2f20d9d72154b1bd9328ba418c96

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