Project

General

Profile

Bug #734380

Wrong cost of small wonders displayed when using a 2.5.10 client with an older than 2.5.10 server

Added by Ark An about 1 year ago. Updated 12 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

When checking for the price of a small wonder, the client erroneously display a cost of 2 gold per shield while the server will take twice this amount from your treasury if you actually buy it.


Related issues

Related to Freeciv - Bug #706727: Small Wonders buy cost doubledClosed

Related to Freeciv - Feature #736810: 2.5: add optional capability "cheaper_small_wonders" to signal fix for bug #706727 (incompletely)Closed

History

#1 Updated by Ark An about 1 year ago

When checking for the price of a small wonder, the client erroneously displays a cost of 2 gold per shield while the server will take twice this amount from your treasury if you actually buy it.

#2 Updated by Jacob Nevins about 1 year ago

  • Related to Bug #706727: Small Wonders buy cost doubled added

#3 Updated by Jacob Nevins about 1 year ago

This is caused by the fix for bug #706727. The client and server both think they know what buildings cost via common/improvement.c, but disagree.

What we probably should have done is added a new network capability allowing the client to detect whether the server had this fix, and adapt accordingly.

It's too late now; even if we add it now, a new client won't be able to distinguish a 2.5.10 server from 2.5.9-or-earlier. The only way I can think of to fix it is an explicit version number / string check. I don't recall Freeciv ever having that before. (If we do this, I think we should still add the capability.)

This is quite a frustrating bug if you run into it. It probably is worth fixing.

(The same problem will occur across 2.5.0-beta1 / beta2 client / server. But that's a beta, so I don't care.)

#4 Updated by Jacob Nevins 12 months ago

  • Target version set to 2.5.11

The only way I can think of to fix it is an explicit version number / string check.

My implicit assumption here was that the server would send a version number to the client that we could switch on. But now I come to look, I don't think that's the case, at least not in machine-readable form. The only way I see to do that is to grovel it out of a chat message of the form "Welcome to the Freeciv version 2.5.10 Server running at foovax port 5557." which seems too grim to be worth doing.

Perhaps the least worst thing is to add a "cheaper_small_wonders" capability to 2.5.11 client and server in the obvious way. This would lead to the following compatibility matrix:

C \ S   -9  10 11-
-2.5.9       -   -
2.5.10   +        
2.5.11-      -    

where "+" means player is charged more than they were told (quite annoying), and "-" means player is charged less than they were told (less annoying IMO).

In this case, the only bad interaction of a new client with an old server would be with a 2.5.10 server, and that's an undercharge. (Made a bit more annoying by 2.5.10 almost certainly being the server version that will be in Ubuntu 18.04LTS.)

#5 Updated by Marko Lindqvist 12 months ago

Jacob Nevins wrote:

In this case, the only bad interaction of a new client with an old server would be with a 2.5.10 server, and that's an undercharge. (Made a bit more annoying by 2.5.10 almost certainly being the server version that will be in Ubuntu 18.04LTS.)

I think I would prefer "doing nothing" over this. Servers older than 2.5.10 are already getting rare meaning the original issue is diminishing, but breaking things between 2.5.10 and 2.5.11 would mean we get the problem back. For instance, this bug was first seen on longturn server, and I think their latest game already uses 2.5.10 (at least http://forum.longturn.org/viewtopic.php?pid=7676#p7676 claims that LT41 is not affected by the original bug)

Could be a good idea still to add the capability string, currently without any related checks, just in case we want to start checking it later (when 2.5.10 is no longer so prominently used server version)

#6 Updated by Jacob Nevins 12 months ago

  • Related to Feature #736810: 2.5: add optional capability "cheaper_small_wonders" to signal fix for bug #706727 (incompletely) added

#7 Updated by Jacob Nevins 12 months ago

Could be a good idea still to add the capability string, currently without any related checks, just in case we want to start checking it later (when 2.5.10 is no longer so prominently used server version)

-> feature #736810

#8 Updated by Jacob Nevins 12 months ago

  • Target version deleted (2.5.11)

#9 Updated by Marko Lindqvist 12 months ago

Marko Lindqvist wrote:

I think their latest game already uses 2.5.10 (at least http://forum.longturn.org/viewtopic.php?pid=7676#p7676 claims that LT41 is not affected by the original bug)

That has since been edited to say that LT41 IS affected.

Also available in: Atom PDF