Skip to main content

Interact with OpenRCT2 from python!

Project description

pyrct2

Python client for OpenRCT2. Launches the game in headless mode, connects to the openrct2-bridge plugin over TCP, and sends game actions.

Setup

pip install pyrct2
pyrct2 setup

setup finds your OpenRCT2 installation and installs the bridge plugin. Requires OpenRCT2 to be installed.

Usage

from pyrct2.client import RCT2

# Launch a headless game and send commands
with RCT2.launch("path/to/scenario.SC6") as game:
    game.get_status()
    game.execute("ridecreate", {"rideType": 1, "rideObject": 0, "colour1": 5, "colour2": 10})
    game.advance_ticks(100)

# Or connect to an already-running instance
with RCT2.connect() as game:
    game.get_status()

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

pyrct2-0.1.0.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyrct2-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file pyrct2-0.1.0.tar.gz.

File metadata

  • Download URL: pyrct2-0.1.0.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyrct2-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2420f8bb61fbf47718f70aa22325e44bb66c2f1a0795bf46b9b05cb99063fb73
MD5 ff0ccb22bdcbfa0fccef4c8fbaf82c7f
BLAKE2b-256 5cef589c4fca365748ebc3dbac9be3ae375f25e001809ade66d23b557b825af0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrct2-0.1.0.tar.gz:

Publisher: publish.yml on MaukWM/pyrct2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: pyrct2-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyrct2-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eddbd7d6a19b49b158c609fdc24633a052ace52a18ff1b395d782bff6af8b1e7
MD5 25e109b6baa562fa3b278da5454539de
BLAKE2b-256 1385916e09a950f1f07306c4b2ec72e421086006b26f3fda6a8ed1e26fb54d14

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrct2-0.1.0-py3-none-any.whl:

Publisher: publish.yml on MaukWM/pyrct2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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