Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use last AI that support savegame instead of exactly the same version as in the save #3232

Closed
DorpsGek opened this issue Sep 24, 2009 · 2 comments
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Zuu opened the ticket and wrote:

Today:

Which AI and what version of that AI was used is saved in the savegames. Then when a user loads that savegame OpenTTD will use the same AI version even if the user have downloaded a newer AI. The only case OpenTTD will use the newer AI version is when the user explicitly specify that by removing all tar files/folders with the AI version that is recorded in the save game. (there are some corner cases missing in the description)

The idea:

When a savegame is loaded, take the AI version that returns the highest version ( GetVersion() ) but also supports savegames by the AI version recorded in the savegame. ( MinVersionToLoad() )

Benefits:

Users and AI developers will not have to remove all old instances of an AI in the AI search path in order to upgrade the AI in a savegame.

Optionally a advanced setting could be included to preserve the current behaviour. But in that case I propose that the new behaviour should be the default value.

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/3232
@DorpsGek
Copy link
Member Author

Zuu wrote:

From a user perspective the best option might be to pop up a window when you load a game asking once for each AI script/program (not instance) if it should be upgraded. However from a code wise perspective, while I have neither looked at the NoAI code nor the general save/load code but since these parts really don't involve a lot of user interaction today I would not be surprised if the current design make it really hard to let the user decide a few things in the middle of the save/load. In this case also requiring that some of the tasks in the beginning being completed before you know if/what to ask the user.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3232#comment6740

@DorpsGek
Copy link
Member Author

Yexo closed the ticket.

Reason for closing: Implemented

In r18944


This comment was imported from FlySpray: https://bugs.openttd.org/task/3232

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) enhancement component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant