Skip to content

shmocz/pyra2yr

Repository files navigation

pyra2yr

Python interface for ra2yrcpp.

Installation

Method 1: Install pre-built wheel using pip

Install a pre-built wheel:

pip install -U https://github.com/shmocz/pyra2yr/releases/download/v0.3.0/pyra2yr-0.3.0-py3-none-any.whl

Method 2: Install with poetry

TODO

Setup

Multi-game test environments are created with docker and require Docker Compose. Build the necessary images:

docker compose build

Download and extract ra2yrcpp to CnCNet data folder. Patch gamemd-spawn.exe according to instructions.

Usage

See pyra2yr/examples/basic_usage.py files for example usage.

Tests

In a suitable python environment, run:

python -m unittest

Various environment variables are accepted:

  • USE_SYRINGE if defined, use Syringe instead of legacy spawner. Assumes Syringe.exe is in game data folder.
  • USE_X11 (Linux only) Use host X server instead of VNC by exposing /tmp/.X11-unix to container.
  • X11_SOCKET (Linux only) is USE_X11 is defined alternative path to X server socket.

Note

Any value will enable a boolean setting, even values like no, False and n.

For example:

USE_SYRINGE=y USE_X11=y python -m unittest

About

Python bot API for Red Alert 2: Yuri's Revenge

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published