Development
- Development milestones
- Suggested API changes
AI Programming
- API Documentation
- Introduction
- info.nut file
- main.nut file
- Basics
- Using the road pathfinder
- Using the rail pathfinder
- Saving / Loading data
- Things you need to know
- Squirrel
- Lists
- Coping with OTTD errors
- Trams
- AI Libraries
- Forum
- Forum FAQ
- AI Behavior
- ShortNames in use
AIs
All articles in NoAI categoryHere is a list of suggestions to extend/change the AI API. Please only add something to this list after it has been discussed in the NoAI subforum. Please note that not everything on this list is guaranteed to get in, it only means that the idea hasn't been directly rejected after the initial discussion. Also, some of these suggestions are good but might need a different name. In all cases this is open to implementation.
- ChangeServicingInterval
- Check vehicles/stations belonging to other companies
- AIEventVehicleHasVoidOrder (not sure if this is really needed)
- Get the annual maintenance cost of having transport mode at a station. http://www.tt-forums.net/viewtopic.php?p=857924#p857924
- Get the build cost of stations/depots/waypoints
- Get figures from the economy window for estimating how quickly the company will earn X amount of money
- AICompany.IsTownOwner(company_id) - So that you can determine if something is owned by a company or a town. http://www.tt-forums.net/viewtopic.php?p=862578#p862578
- AIVehicle.GetDirection(vehicle_id) http://www.tt-forums.net/viewtopic.php?p=874821#p874821
- AIStation.IsCargoAccepted
- AIEngine.GetWeightOfFullyLoaded(engine_id) http://www.tt-forums.net/viewtopic.php?p=886469#p886469
- AIMap::DistanceMin(TileIndex tile_from, TileIndex tile_to) http://www.tt-forums.net/viewtopic.php?p=887204#p887204
- I just got to the point in my AI where it started to transport goods to a town. At some point a message popped up that said the station no longer accepts goods and my trucks would run around without unloading. It would be very useful to get an Event for this that the AI can detect. http://www.tt-forums.net/viewtopic.php?p=890973#p890973 (several posts discussing this)
- If it was possible to get these value... (amount of cargo delivered to towns) http://www.tt-forums.net/viewtopic.php?p=895269#p895269
- AICompany.[Get/Set]PresidentFace(*company-id*, *newgrf-style-input*); (if you get what i mean, like what is stored in openttd.