Installation Guide
Relevant source files
The following files were used as context for generating this wiki page:
Trans AI (or Trans) is an artificial intelligence designed for OpenTTD that manages transportation networks involving buses, trucks, trams, aircraft, and ships. This guide provides technical instructions for installing the AI through various methods, ranging from standard in-game downloads to manual source code configuration for developers.
The installation process varies based on the user's role: players typically use the integrated content service, while contributors interact directly with the source repository and external AI libraries.
Sources: README.md:1-5, README.md:15-17
Installation Methods
There are three primary workflows for installing Trans AI into an OpenTTD environment.
1. In-Game Download (Bananas)
This is the recommended method for standard players. It utilizes the OpenTTD content service, referred to as "Bananas," to retrieve stable versions.
- Launch OpenTTD and navigate to Check Online Content.
- Search for "Trans AI" within the AI category.
- Select the entry and click Download.
Sources: README.md:21-26
2. Manual Release Installation
For users seeking the latest development features without cloning the repository, pre-packaged builds are available via GitHub. These builds follow a rolling release model where version numbers are formatted as YYMMDD.
- Download the
.tarfile from the GitHub Releases page. - Locate the OpenTTD
aidirectory on the local file system. - Place the
Trans-AI-[version].tarfile directly into the directory. Note that the file should not be extracted.
Sources: README.md:28-34, README.md:52-55
3. Source Code Cloning (For Developers)
Developers intending to contribute to the codebase should clone the repository directly into the specific OpenTTD AI directory corresponding to their operating system.
| Operating System | AI Directory Path |
|---|---|
| Linux | $(HOME)/.openttd/ai |
| macOS | $(HOME)/Documents/OpenTTD/ai |
| Windows | C:\Users\<username>\Documents\OpenTTD\ai |
Sources: README.md:36-43
Technical Dependencies
Trans AI relies on external libraries to provide core functionality. These must be manually placed in the ../ai/library folder if the AI is installed via source cloning.
| Library Name | Purpose | Download Source |
|---|---|---|
| AI Library - Common | Core utilities | AILibCommon-2.tar.gz |
| AI Library - List | Data structure management | AILibList-3.tar.gz |
| AI Library - String | String manipulation | AILib.String-2.tar.gz |
Sources: README.md:45-50
Build and Versioning Logic
The project employs an automated build system and specific versioning logic to manage development and production builds.
Automated Build Pipeline
The build process has transitioned from manual scripts to an automated GitHub Actions workflow.
The workflow is defined in .github/workflows/rolling-release.yml.
Sources: README.md:60-61
Version Overriding
When the repository is cloned directly, the version number in the info.nut file is set to a date far in the future. This architectural choice ensures that the local development version takes precedence over any version downloaded from the "Bananas" content service within the OpenTTD engine.
Sources: README.md:55-57
Licensing and Contributions
Trans AI is distributed under the GNU General Public License version 2.0. This license governs all files within the repository.
- License File:
license.txt - Contribution Requirement: Contributors must agree to license their code under the GNU GPL v2.
- Warranty: The software is provided "AS IS" without warranty of any kind, as per the GPL v2 preamble.
Sources: license.txt:1-15, README.md:63-66
Summary
The installation of Trans AI supports both end-users via the Bananas service and developers via direct repository cloning. Successful installation requires adherence to specific directory structures (the ai folder) and the inclusion of mandatory AI libraries (Common, List, and String). Developers must be aware of the info.nut versioning strategy which prioritizes local code for testing purposes.