FS#6383 - Bananas: "Select upgrade" for content tries to download old versions

Attached to Project: OpenTTD
Opened by Moriarty (Moriarty) - Sunday, 25 October 2015, 08:48 GMT
Last edited by andythenorth (andythenorth) - Wednesday, 23 August 2017, 07:59 GMT
Type Bug
Category Core
Status Confirmed
Assigned To No-one
Operating System All
Severity Very Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No



A number of NewGRF's and other content on the bananas system have poor version numbers and this means players are downloading and using the wrong versions.

- I have the North American Renewal Set 2.5 and 2.51 installed. Yet when I click "select upgrade", OTTD selects version 2.03.

- Industrial Stations renewal 1.0.2 wants to "upgrade" to 0.8.1

- ab8 Aviators Aircraft Set 2.0 and 2.21 want to upgrade to 1.81

- OpenGFX+ Landscape 1.1.2 wants to upgrade to 0.2.3


I'd suggest there are two problems here:

a) Old versions remaining on Bananas. I'd suggest only allowing one version of any given NewGRF/content to be active on bananas at any given time.

b) The version system using by bananas is inadequate. Possible solution - utilise semantic versioning ( or some other sort of consistent versioning system for upgrades and require that all uploaded content adhere to it. And/or Flag if an uploaded version has a "lower" number than the current version.

For bonus confusion, if I download say the "upgrade" 0.2.3 OpenGFX+ Landscape, in the NewGRF Settings, only 1.1.2 shows. So that part of the game is able to correctly handle the versioning, it's the download client that fails.
This task depends upon

Comment by Ingo von Borstel (planetmaker) - Monday, 02 November 2015, 15:18 GMT
I don't quite follow, nor can I reproduce your observation.

Are you sure you didn't try to download NewGRFs when you entered the download dialogue via the load savegame dialogue or when joining a server which need *those exact versions*?

How is the versioning of the NewGRFs you cite anything but the semantic versioning?

Yes, however, there are two systems in place which determine 'new content': one on the server, one by the client:

OpenTTD iteself allows NewGRFs to define an integer version which does not need to be sequential. What values are assigned there is up to the author, but the highest value will be interpreted as the newest version by OpenTTD - a system which generally works well. This version is used to show the NewGRFs available ingame

OpenTTD's content server offers as update always the newest uploaded version, if the client doesn't have that very same version already. Thus an update may not necessarily reflect the newest version as given by the NewGRF itself. But that then is the *concious choice* of the NewGRF author. It's their responsibility to upload only newer contentent than previous versions to bananas.
Comment by Airbus (Airbus) - Tuesday, 26 January 2016, 09:05 GMT
I must say I had exactly same problem with updating NewGRF. Try selecting ECS packages of version 1.2, downloading them, and then selecting "Add upgrades". For me it selected versions 1.1.2. Version 1.2 is dated at 2012, version 1.1.2 is dated at 2009-2010. Maybe it had to do with bigger number of digits in version, i.e. 12 versus 112.
Comment by andythenorth (andythenorth) - Wednesday, 23 August 2017, 07:54 GMT
I can't repro the case by Airbus. I have ECS Agricultural Vector 1.1.2, I select upgrades, it offers 1.2. I have ECS Basic II Vector 1.2, I select upgrades, no upgrade is offered.

I repro two of the cases by Moriarty:
- I have ISR 1.0.2, I select upgrades, no upgrade is offered.
- I have NARS 2.5.1. I select upgrades, 2.0.3 is offered (as an additional download, not replacing the 2.5.1 grf).
- I have OpenGFX+ Landscape 1.1.2, I select upgrades, no upgrade is offered.
- I have AV8 2.2.1, I select upgrades, 1.81 is offered (as an additional download, not replacing the 1.81 grf).

I've attached screenshots showing NARS and AV8 grf properties. All downloaded via bananas. NARS 203 lacks a version in action 14. But AV8 provides A14 version in both cases.

Wondering if it's a manifestation of FS#6377? But eh, could be completely unrelated.