Yexo's last feature: Loading the last available AI version

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Post Reply
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Yexo's last feature: Loading the last available AI version

Post by Zuu »

While if we as AI authors have made our job good users shouldn't notice thing change I think it is good to announce it here in the NoAI forum.

What this all is about is r18944 which change the AI loading a bit so instead of taking the AI version used in a savegame it will take the AI version with the highest version number that still says that it can load the savegame.

This makes it even more important that every AI author sticks to integer versions in info.nut. Otherwise my guess is that that string will be parsed into an integer and eg "10.78" will become just 10. IIRC if two AIs report the same version only one of them will be loaded, and exactly how that decision works I don't know. Even if OpenTTD would load all AIs the scanner code would then just pick the first AI with the highest integer version that can load the savegame.


As of what I can see the only way to force using a specific version is now to in the console type: (but I'll happily be corrected if there are other ways I've missed in my review of the changes that Yexo made)

Code: Select all

start_ai <ai name>.<ai version>
(apart from removing higher AI versions from the OpenTTD search path)


Lastly I'd like to thank Yexo for implementing this feature.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
fanioz
Transport Coordinator
Transport Coordinator
Posts: 320
Joined: 19 Dec 2008 05:03
Location: Indonesia
Contact:

Re: Yexo's last feature: Loading the last available AI version

Post by fanioz »

Thats great, is that undocumented feature yet ?
Attachments
cmd.png
cmd.png (4.32 KiB) Viewed 914 times
Correct me If I am wrong - PM me if my English was bad :D

**[OpenTTD AI]** Image
***[NewGRF] *** Image
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 5 guests