Files
openttd-client/docker
kovagoadi 2eea541158
All checks were successful
Continuous Integration / lint-and-security (pull_request) Successful in 22s
Continuous Integration / tests-and-coverage (pull_request) Successful in 24s
Add scheduled dispatch support (edit + authoritative view)
Editing (game port, OpenTTDClient): a core of JGRPP's scheduled dispatch
DoCommands — set_scheduled_dispatch (enable/disable), add/remove schedule,
add/remove/clear slots, and set duration/start date. Adds the command IDs
to protocol.py.

Viewing (admin, OpenTTDAdminClient.get_dispatch): the GameScript API has no
dispatch support, so a new server patch (docker/patches/0002-*) adds
read-only GSOrder.GetScheduledDispatch* / IsScheduledDispatchEnabled
getters, an AdminBridge GameScript get_dispatch handler exposes them, and
get_dispatch() returns the live schedules and slots (mirrors get_timetable).

Note: set_dispatch_start_date values are normalised by the engine relative
to current game time, so they read back offset from the requested value.

Includes unit + e2e tests, a demo in main.py, and protocol/timetable docs.
The AdminBridge GameScript and the patched OpenTTD-patches clone live
outside this repo; the 0002 patch file is the durable source for the latter.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 22:56:37 +02:00
..
2026-07-23 20:59:28 +02:00
2026-07-23 20:59:28 +02:00

OpenTTD JGRPP Docker Server

This setup builds OpenTTD with the JGR Patch Pack (JGRPP) from source and runs it in a Docker container.

Getting Started

  1. Build and start the server:

    docker-compose up -d --build
    
  2. Accessing the console:

    docker exec -it openttd-jgrpp openttd -D
    

    (Actually, the server runs in dedicated mode. You can view logs with:)

    docker-compose logs -f
    
  3. Configuration: The configuration is stored in config/openttd.cfg. The default password is set to asd.

  4. Save Games: Save games are stored in config/save/.

JGRPP Source

The source code is cloned from the jgrpp branch of https://github.com/JGRennison/OpenTTD-patches (currently at tag jgrpp-0.71.1) and carries local patches from patches/ — see patches/README.md. After a fresh clone of the source, apply them with git -C OpenTTD-patches am ../patches/*.patch before building.

To update the server to a newer JGRPP version:

  1. Update the OpenTTD-patches directory:
    cd OpenTTD-patches && git pull && cd ..
    
  2. Reapply (rebase if needed) the local patches from patches/.
  3. Rebuild the image:
    docker-compose up -d --build