OpenTTD NoAI API
Data Structures
Documentation can differ from the API in your binaries!
The NoAI/OpenTTD version which match this documentation is 1.9.0
For a changelog: ChangeLog
Latest binaries: http://www.openttd.org/download-trunk
Here are the data structures with brief descriptions:
 CAIAccountingClass that keeps track of the costs, so you can request how much a block of commands did cost in total
 CAIAirportClass that handles all airport related functions
 CAIBaseClass that handles some basic functions
 CAIBaseStationBase class for stations and waypoints
 CAIBridgeClass that handles all bridge related functions
 CAIBridgeListCreate a list of bridges types
 CAIBridgeList_LengthCreate a list of bridges types that can be built on a specific length
 CAICargoClass that handles all cargo related functions
 CAICargoListCreates a list of cargoes that can be produced in the current game
 CAICargoList_IndustryAcceptingCreates a list of cargoes that the given industry accepts
 CAICargoList_IndustryProducingCreates a list of cargoes that the given industry can produce
 CAICargoList_StationAcceptingCreates a list of cargoes that the given station accepts
 CAICompanyClass that handles all company related functions
 CAIControllerThe Controller, the class each AI should extend
 CAIDateClass that handles all date related (calculation) functions
 CAIDepotListCreates a list of the locations of the depots (and hangars) of which you are the owner
 CAIEngineClass that handles all engine related functions
 CAIEngineListCreate a list of engines based on a vehicle type
 CAIErrorClass that handles all error related functions
 CAIEventClass that handles all event related functions
 CAIEventAircraftDestTooFarEvent AircraftDestTooFar, indicating the next destination of an aircraft is too far away
 CAIEventCompanyAskMergerEvent Company Ask Merger, indicating a company can be bought (cheaply) by you
 CAIEventCompanyBankruptEvent Company Bankrupt, indicating a company has gone bankrupt
 CAIEventCompanyInTroubleEvent Company In Trouble, indicating a company is in trouble and might go bankrupt soon
 CAIEventCompanyMergerEvent Company Merger, indicating a company has been bought by another company
 CAIEventCompanyNewEvent Company New, indicating a new company has been created
 CAIEventCompanyTownBase class for events involving a town and a company
 CAIEventControllerClass that handles all event related functions
 CAIEventDisasterZeppelinerClearedEvent Disaster Zeppeliner Cleared, indicating a previously crashed zeppeliner has been removed, and the airport is operating again
 CAIEventDisasterZeppelinerCrashedEvent Disaster Zeppeliner Crashed, indicating a zeppeliner has crashed on an airport and is blocking the runway
 CAIEventEngineAvailableEvent Engine Available, indicating a new engine is available
 CAIEventEnginePreviewEvent Engine Preview, indicating a manufacturer offer you to test a new engine
 CAIEventExclusiveTransportRightsEvent Exclusive Transport Rights, indicating that company bought exclusive transport rights in a town
 CAIEventIndustryCloseEvent Industry Close, indicating an industry is going to be closed
 CAIEventIndustryOpenEvent Industry Open, indicating a new industry has been created
 CAIEventRoadReconstructionEvent Road Reconstruction, indicating that company triggered road reconstructions in a town
 CAIEventStationFirstVehicleEvent Station First Vehicle, indicating a station has been visited by a vehicle for the first time
 CAIEventSubsidyAwardedEvent Subsidy Awarded, indicating a subsidy is awarded to some company
 CAIEventSubsidyExpiredEvent Subsidy Expired, indicating a route that was once subsidized no longer is
 CAIEventSubsidyOfferEvent Subsidy Offered, indicating someone offered a subsidy
 CAIEventSubsidyOfferExpiredEvent Subsidy Offer Expired, indicating a subsidy will no longer be awarded
 CAIEventTownFoundedEvent Town Founded, indicating a new town has been created
 CAIEventVehicleCrashedEvent Vehicle Crash, indicating a vehicle of yours is crashed
 CAIEventVehicleLostEvent Vehicle Lost, indicating a vehicle can't find its way to its destination
 CAIEventVehicleUnprofitableEvent Vehicle Unprofitable, indicating a vehicle lost money last year
 CAIEventVehicleWaitingInDepotEvent VehicleWaitingInDepot, indicating a vehicle has arrived a depot and is now waiting there
 CAIExecModeClass to switch current mode to Execute Mode
 CAIGameSettingsClass that handles all game settings related functions
 CAIGroupClass that handles all group related functions
 CAIGroupListCreates a list of groups of which you are the owner
 CAIIndustryClass that handles all industry related functions
 CAIIndustryListCreates a list of industries that are currently on the map
 CAIIndustryList_CargoAcceptingCreates a list of industries that accepts a given cargo
 CAIIndustryList_CargoProducingCreates a list of industries that can produce a given cargo
 CAIIndustryTypeClass that handles all industry-type related functions
 CAIIndustryTypeListCreates a list of valid industry types
 CAIInfo'Abstract' class of the AIs use to register themselves
 CAIInfrastructureClass that handles all company infrastructure related functions
 CAIListClass that creates a list which can keep item/value pairs, which you can walk
 CAILogClass that handles all log related functions
 CAIMapClass that handles all map related functions
 CAIMarineClass that handles all marine related functions
 CAIOrderClass that handles all order related functions
 CAIRailClass that handles all rail related functions
 CAIRailTypeListCreates a list of all available railtypes
 CAIRoadClass that handles all road related functions
 CAISignClass that handles all sign related functions
 CAISignListCreate a list of signs your company has created
 CAIStationClass that handles all station related functions
 CAIStationListCreates a list of stations of which you are the owner
 CAIStationList_CargoCreates a list of stations associated with cargo at a station
 CAIStationList_CargoPlannedCreates a list of stations associated with cargo planned to pass a station
 CAIStationList_CargoPlannedByFromCreates a list of origin stations of cargo planned to pass a station, with the monthly amounts of cargo planned for each of those origin stations as values
 CAIStationList_CargoPlannedByViaCreates a list of next hops of cargo planned to pass a station, with the monthly amounts of cargo planned for each of those next hops as values
 CAIStationList_CargoPlannedFromByViaCreates a list of next hops of cargo planned to pass a station and originating from another station, with the monthly amounts of cargo planned for each of those next hops as values
 CAIStationList_CargoPlannedViaByFromCreates a list of origin stations of cargo planned to pass a station going via another station, with the monthly amounts of cargo planned for each of those origin stations as values
 CAIStationList_CargoWaitingCreates a list of stations associated with cargo waiting at a station
 CAIStationList_CargoWaitingByFromCreates a list of origin stations of waiting cargo at a station, with the amounts of cargo waiting from each of those origin stations as values
 CAIStationList_CargoWaitingByViaCreates a list of next hops of waiting cargo at a station, with the amounts of cargo waiting for each of those next hops as values
 CAIStationList_CargoWaitingFromByViaCreates a list of next hops of waiting cargo from a specific station at another station, with the amounts of cargo waiting for each of those next hops as values
 CAIStationList_CargoWaitingViaByFromCreates a list of origin stations of cargo waiting at a station for a transfer via another station, with the amounts of cargo waiting from each of those origin stations as values
 CAIStationList_VehicleCreates a list of stations which the vehicle has in its orders
 CAISubsidyClass that handles all subsidy related functions
 CAISubsidyListCreates a list of all current subsidies
 CAITestModeClass to switch current mode to Test Mode
 CAITileClass that handles all tile related functions
 CAITileListCreates an empty list, in which you can add tiles
 CAITileList_IndustryAcceptingCreates a list of tiles that will accept cargo for the given industry
 CAITileList_IndustryProducingCreates a list of tiles which the industry checks to see if a station is there to receive cargo produced by this industry
 CAITileList_StationTypeCreates a list of tiles which have the requested StationType of the StationID
 CAITownClass that handles all town related functions
 CAITownEffectListCreates a list of all TownEffects known in the game
 CAITownListCreates a list of towns that are currently on the map
 CAITunnelClass that handles all tunnel related functions
 CAIVehicleClass that handles all vehicle related functions
 CAIVehicleListCreates a list of vehicles of which you are the owner
 CAIVehicleList_DefaultGroupCreates a list of vehicles that are in the default group
 CAIVehicleList_DepotCreates a list of vehicles that have orders to a given depot
 CAIVehicleList_GroupCreates a list of vehicles that are in a group
 CAIVehicleList_SharedOrdersCreates a list of vehicles that share orders
 CAIVehicleList_StationCreates a list of vehicles that have orders to a given station
 CAIWaypointClass that handles all waypoint related functions
 CAIWaypointListCreates a list of waypoints of which you are the owner
 CAIWaypointList_VehicleCreates a list of waypoints which the vehicle has in its orders