In this article I explore the various parameters and ways to make them work to our advantage.

Setting some parameters to restrict their abilities was the first goal. Being able to take advantage of those building skills and turn it to my advantage was the second goal. That led me down this path of discovery.

In this article I try to pass on what I learned during this quest for knowledge. This exploration was triggered by my looking into AAAHogEx.

It makes total sense to want to harness an AI competitor’s abilities. AAAHogEx (often called “The Hog”) is widely considered the absolute smartest and most ruthless AI in the OpenTTD community. Its developer explicitly designed its pathfinding code to simulate an expert human playstyle, calculating complex industry supply chains and maximizing profit margins. [1, 2, 3, 4]

Because the default game menus are strictly limited when it comes to managing scripts, you can use hidden script parameters and specific tricks to turn AAAHogEx into your ultimate testing tool or helper.

Secret AI “Configure” Parameters

While OpenTTD does not let you remove AIs from the menu, you can radically change AAAHogEx’s behaviour before starting a game.

Go to the AI/Game Script Settings menu, select AAAHogEx, and click Configure. You can force its massive capabilities to work for you:

  • Restrict Cargo Types: If you want to handle lucrative freight networks yourself without the AI stealing your industries, you can use the settings to restrict AAAHogEx to Passengers and Mail only. It will generate massive networks between towns, increasing town growth and feeding passengers directly into your central hubs. [1, 2]
  • Control Vehicle Preferences: You can toggle its ability to use planes, trains, or ships. If you want it to build beautiful, aesthetic train lines but stay off your roads, you can disable its road vehicle permissions entirely. [1]
  • CPU and Speed Throttling: The Hog can build faster than a human can click. If you find it overwhelming, you can adjust its building delay and internal CPU time via these parameters to force it to play at a slower, more casual pace. [1]

Using “The Hog” to Build For You

If you want to use its elite engineering skills to your advantage, you can let AAAHogEx build a massively complex network, and then steal it using the takeover exploit:

  • Let AAAHogEx run for 10–20 years until it has built highly optimized, multi-million dollar train networks across the map.
  • Do a Hostile Takeover.
  • Keep what you want from the takeover and sell or remove the rest.

Quick Sandbox/ Balancing Settings

If you feel the menus are lacking for controlling them mid-game, you can adjust OpenTTD’s general sandbox options to handicap AAAHogEx:

  • Infrastructure Maintenance: In the game settings, turning Infrastructure Maintenance to High forces AAAHogEx to carefully budget its track layouts. This stops it from spamming long, ugly, unrealistic lines across the map because the financial penalty will bankrupt it. [1]
  • Exclusive Transport Rights: Turn this off in the settings to ensure that even if AAAHogEx builds a station right next to an industry, you are still legally allowed to drop your own tracks right next to it and take a cut of the profits. [1]

The Most Powerful Tool

Since you are exploring how AI competitors work, the developer console is the most powerful tool you can use. It allows you to bypass the restrictive UI menus and run a controlled testing lab.

Here is the complete blueprint of console commands to manipulate, debug, and fully control AI competitors in OpenTTD.

Spawning and Removing AIs

These commands let us inject or delete AIs instantly mid-game.

  • start_ai <AI_Name>
    Forces a specific AI script to spawn into the next available empty company slot. (Example: start_ai AdmiralAI).
  • stop_ai <company_number>
    Terminates the AI script running that company. It forces the company into instant bankruptcy, wiping out the AI and deleting all its vehicles and infrastructure.
  • list_ai
    Displays a list of all AI scripts currently installed on your computer. Use this to find the exact script name needed for the start_ai command.
  • rescan_ai
    Forces OpenTTD to scan your Linux AI directory for newly added .tar files without needing to restart the game.

Taking Over Infrastructure

If you want to seize control, steal tracks, or alter an AI’s assets, you must pivot between companies using these commands:

  • reset_company <company_number>
    Forcefully deletes the specified company slot from the map without stopping the underlying script engine. The AI will start over from scratch in its home city.
  • reload_ai <company_number>
    Kills the AI, resets its entire slot, and immediately reboots the script back to day one. Excellent for testing how an AI handles building out of a tight spot.
  • set gui.ai_developer_tools 1
    Unlocks the AI Debug Window in your main game menus. This lets you pause individual AI scripts, view their code execution logs, and see exactly what pathfinding calculations they are making.

Warning: Because stop_ai deletes everything, you have to use a “Hostile Takeover” trick to keep their infrastructure.

Setting Global AI Limits (Config Variables)

Instead of interactive commands, these variables adjust the engine rules for AIs. You can type these directly into the console to change settings on the fly:

  • set max_no_competitors <number>
    Changes the maximum limit of AI companies allowed on the map at one time. Set it to 0 to lock the map down.
  • set competitor_start_time <number>
    Sets the number of months the game waits before spawning the first AI competitor.
  • set min_competitor_start_time <number> and max_competitor_start_time
    Sets a random time frame (in months) for when new AIs are allowed to randomly drop into your map.

Death of the “Old Share System”

In older versions of OpenTTD, you had to slowly buy 25% chunks of a company over several years, wait for it to grow old enough, and manually manage shares. The Hostile Takeover button completely replaces that system. If you have enough cash in your bank account, you can buy out an entire AI company instantly. [1, 2]

“Track Stealing” Strategy Changes

Previously, to steal an AI’s highly efficient infrastructure, you had to open the developer cheat menu (Ctrl + Alt + C), trick the game into thinking you were the AI, and force a merger.

Now, you can do this 100% legitimately within the standard UI:

  • Let AAAHogEx build its elite, optimized network over a decade or two.
  • Open the AI’s company profile window.
  • If you have enough capital, click the Hostile Takeover button.
  • The AI company will instantly dissolve. Every single track, station, and vehicle they owned is legally transferred to your main company. [1, 2, 4]

The Catch: The “Reborn” AI Issue

While Hostile Takeover lets you cleanly absorb AAAHogEx’s tracks, it handles the underlying AI script differently than the developer console: [1]

  • The Console Command (stop_ai) kills the script engine completely, ensuring that specific slot stays empty permanently.
  • The Hostile Takeover Button treats the purchase as a business transaction. It wipes out the current company, but because the script slot is still technically active, the game will usually spawn a brand new AI in its place about 6 months later. [1, 2]

Ultimate Legit Strategy in version 15+

To combine the power of the new Hostile Takeover button with total game control, use this sequence:

  • Open your AI Settings menu and set Max number of competitors to your desired number (e.g., 1 for AAAHogEx).
  • Play the game, out-earn AAAHogEx, and execute a Hostile Takeover to steal all its tracks legally.
  • Immediately after the takeover, open the console with ~ and type set max_no_competitors <number>. This changes the maximum limit of AI companies allowed on the map at one time. Set it to 0 to lock the map down.

By reducing the max limit to 0 right after buying them out, you block the engine from spawning a new competitor to replace the one you just swallowed up. You get to keep AAAHogEx’s massive infrastructure, and you are left completely alone on the map.

“All-Or-Nothing” Buyout

So it is an ‘all or nothing’ situation with latest versions of the game. No chances of just taking over the real system or just taking over the shipping portion. The new Hostile Takeover button is an all-or-nothing corporate buyout. When you click it, you absorb the entire company lock, stock, and barrel—every single train, truck, plane, ship, depot, station, and tile of track they own instantly becomes yours. You cannot pick and choose specific modes of transport during the transaction.

However, because OpenTTD gives you total freedom over your assets, you can easily turn this “all-or-nothing” buyout into a custom partial takeover immediately after you click the button.

Here is how you can use the game’s management tools to quickly strip away the parts of the AI you don’t want, leaving only the rail or shipping networks you actually care about:

The “Vaporize Vehicles” Trick

If you only want AAAHogEx’s beautifully engineered rail lines, but you do not want to manage their 400 chaotic trains or road vehicles:

  • Open the Vehicle List for the newly absorbed company.
  • Filter the list by the vehicle type you want to destroy (e.g., Road Vehicles).
  • Click the Manage Vehicles dropdown menu at the bottom of the list.
  • Select Sell All.
  • Every single one of those vehicles will instantly drive to the nearest depot and delete themselves, putting cash back into your bank account. You are left with pristine, empty tracks to run your own trains on.

Group Management Tool (Isolate Shipping)

If you only want to take over their maritime shipping routes and ignore their land infrastructure:

  • Open the Ships List right after the takeover.
  • Create a new vehicle Group and name it “AI Ships”.
  • Move all the absorbed ships into that group so you can easily manage their schedules, upgrades, and profits independently from your main fleet.
  • To get rid of the rest of the company, open the Trains, Planes, and Road Vehicles lists, and use the “Sell All” command to wipe them off the map.

Cleaning Up Leftover Land Infrastructure

Once you have sold off the unwanted vehicles (like trucks or planes), their leftover stations, roads, and airports will just sit empty.

  • To clear them quickly without manually bulldozing every tile, you can use the Clear Area tool (the bomb icon) drag-and-drop feature to wipe out whole chunks of abandoned AI infrastructure at once.
  • Note: If AAAHogEx built roads inside a town, you may have to fund local authority buildings or bribe the town council if they get angry about you bulldozing roads!

**Note: all of the console commands laid out earlier still work perfectly in OpenTTD 15.3.

Developer Console

The developer console operates independently of the graphical user interface. While the developers completely overhauled the visual buttons, menus, and added the Hostile Takeover feature, they left the underlying console engine intact.

You can still use them to bypass the “all-or-nothing” rule of the Hostile Takeover button. If you want to completely avoid buying out their entire fleet, you can use the classic console commands to target specific aspects of the AI:

Defeat the “All-or-Nothing” Limit

If you want an AI’s infrastructure but absolutely refuse to inherit their vehicles or clog up your financial menus, the console still allows you to perform surgical operations:

  • stop_ai <company_slot>
    Still works perfectly. If you just want to clear an AI out of the way without paying a single dollar for a Hostile Takeover, this command kills the script and vaporizes their company instantly.
  • reload_ai <company_slot>
    Still the best tool for experimenting. If AAAHogEx builds a terrible network or gets stuck, you can force it to reset its entire company slot and start over without affecting your own game.
  • set gui.ai_developer_tools 1
    This is still fully active in Version 15.3. It remains the only way to open the real-time script logs to see exactly what AAAHogEx is calculating under the hood.

Some Example Scenarios

Here are a few scenarios where you should probably still use the console commands and not use the new Hostile Takeover option.

While the new Hostile Takeover feature is great for regular gameplay, the developer console is still the superior choice for experimenting, debugging, and testing AI limits.

Here are the specific scenarios where you should absolutely use the console commands instead of the Hostile Takeover option:

Benchmark/ “Stress Test” the AI

If you are treating OpenTTD as a sandbox to see how smart AAAHogEx truly is, the Hostile Takeover option completely defeats the purpose because it dissolves the company.

  • The Scenario: You want to see how AAAHogEx handles a sudden economic crash, or how it pathfinds out of a heavily congested mountain pass over 50 years.
  • Why use the Console: You can use set gui.ai_developer_tools 1 to open the scripting log and read its thought process in real-time. If it gets stuck, you can type reload_ai <slot> to instantly reset its company back to day one to see if it learns from its routing mistakes on the exact same map layout.

Financial Zero-Cost Purging

A Hostile Takeover is a legitimate corporate buyout that requires your company to have millions (or billions) of dollars in liquid cash to afford the AI’s valuation.

  • The Scenario: An AI has aggressively built tracks right through an area you planned to expand into, blocking your expansion, but your company is currently in heavy debt or early in the game.
  • Why use the Console: Typing stop_ai <slot> costs exactly $0. It acts as an instant administrative delete key, vaporizing the competing company and clearing the land for you immediately without affecting your company’s bank balance.

When You Want a “Clean Slate”

When you execute a Hostile Takeover, you inherit hundreds of vehicles, cluttered group lists, and messy infrastructure that you then have to manually filter and delete.

  • The Scenario: You want the AI gone immediately, and you have absolutely zero interest in keeping its vehicles, stations, or leftover tracks. You just want a clean map.
  • Why use the Console: Running stop_ai <slot> deletes the AI and instantly vaporizes all its assets from the map in one single frame. It completely bypasses the tedious chore of opening vehicle menus to click “Sell All” and using the demolition tool to clean up their ghost stations.

Forcing “Musical Chairs” for AI

The Hostile Takeover button only interacts with the company currently occupying that slot. It doesn’t let you swap out scripts on the fly.

  • The Scenario: You want to test how AAAHogEx performs against AdmiralAI on the exact same infrastructure setup.
  • Why use the Console: You can switch to the console, stop one AI script, and immediately use start_ai <New_AI_Name> to drop a completely different script into that exact same slot to see how a different coding logic handles the current map state.

Q & A

Q. What is the reload_ai <company_slot> – how do I know what slot number?

A. To find the correct slot number for the reload_ai command, you need to check the underlying index that OpenTTD assigns to that specific company [2].

The game UI usually shows company names (like “Logistics Inc.”) or player colors, but the console only reads numbers from 1 to 15 [1].

Here are the easiest ways to find the exact slot number in OpenTTD 15:

Method 1: The Quick Visual Check (Easiest)

  • Click the Company League button on the main toolbar (the icon looks like a trophy or a podium).
  • Look at the list of companies from top to bottom.
  • The very first company at the top (usually yours) is Slot 1. The second one down is Slot 2, the third is Slot 3, and so on.

Method 2: Check via the Face/Profile Window

  • Click on the AI company’s headquarters or open their company profile window.
  • Look at the manager’s face or the company title.
  • In the window title bar or the description, you will see a designation like “Company #2” or “Player 2”. That number is your slot ID.

Method 3: Use the Console Itself

If you want to be 100% accurate without guessing, you can query the game engine directly:

  • Press the tilde key (~) to open the console.
  • Type players or companies and press Enter.
  • The console will print a clean text list of every active entity on the map, showing the exact slot number right next to the AI script name (e.g., #2: AAAHogEx).

Example of Using the Command

Once you know that AAAHogEx is occupying Slot 3, you would open your console and type:
reload_ai 3

This will instantly force Company #3 to go completely bankrupt, wipe its tracks, reset its bank account, and reboot the AAAHogEx script from scratch in that exact same slot [2].

Share the Post:

Related Posts

Manual Tutorials

A set of tutorials varying in difficulty and skill level to assist in learning the concepts and techniques in a non- threatening manner.

Read More