AI Version Upgrades

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
Baldy's Boss
Tycoon
Tycoon
Posts: 1396
Joined: 23 Feb 2014 22:02

AI Version Upgrades

Post by Baldy's Boss »

My old saves from 2011 generate error messages saying that the system can't find the specific VERSIONS of SimpleAI and Trans AI that were there when they were saved.Can't the system substitute a newer version of an AI a game was saved with rather than substituting another AI at random?
krinn
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 29 Dec 2010 19:36

Re: AI Version Upgrades

Post by krinn »

If the openttd version support (read: run) that newer AI version AND the newer AI version support loading that game version, it should do that itself

AI author code in their AI the minimal version they can load, if the newer version have that flag set a version higher than the one record in the savegame, openttd will consider that AI version as "not good for that savegame", and will look for other versions of the AI until it find one that have the ability to load that savegame.

It depend on the AI then, sometimes an AI version is use as transitional and can read says version 2 savegame, and record into a version 3. Some AI authors don't care about compatibility and doesn't offer such kind of layer and just drop any version 2 support.
Brumi
President
President
Posts: 920
Joined: 18 Jul 2009 17:54

Re: AI Version Upgrades

Post by Brumi »

SimpleAI is supposed to be fully backward compatibile even with version 1. Does the AI or the game break because of this? If so, I would be interested in seeing the savegame.
Baldy's Boss
Tycoon
Tycoon
Posts: 1396
Joined: 23 Feb 2014 22:02

Re: AI Version Upgrades

Post by Baldy's Boss »

The game loads a random alternative AI in place of each SimpleAI Version 4 or Trans AI 100307 it can't find.I downloaded both Simple and Trans from Online Content,I believe,rather than transferring what was on the older computer on which the games were saved.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: AI Version Upgrades

Post by Zuu »

Unfortunately it is a bit of mess in OpenTTD with saving of AI/Game Script IDs in save games. It save enough for loading your games, but not enough for computing the unique identifier used to get content from bananas. This is means that OpenTTD cannot offer you to download the missing AIs or missing Game Script.

Some year ago I have been looking a bit on improving this but have no complete solution. The sad part is that IIRC it will only work for save games created after the solution is merged into OpenTTD.


That said, if you downloaded the last Simple AI (go to AI settings and attempt to choose it for an AI slot to assure OpenTTD finds it), and it has the meta data setup so that it allows loading save games since first Simple AI version, it should load your game with the new Simple AI. If that doesn't work. Please upload your savegame here and we can have a look to see where it fails.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 5 guests