freeciv / freeciv-web

Freeciv-web is an Open Source strategy game implemented in HTML5 and WebGL, which can be played online against other players, or in single player mode against AI opponents.
Other
2.02k stars 340 forks source link

Bug : Courthouse does not provide +1 free shield upkeep unit #706

Open ycaniou opened 1 year ago

ycaniou commented 1 year ago

Gouvernement is Republic. Courthouse is said to provide 1 free shield upkeep unit when you put the mouse on its icon in the worklist. Yet screenshot shows it's not the case: Courthouse_Upkeep

Server is 3.0.92-dev of freecivweb.org

rvid19 commented 1 year ago

@ycaniou Hmm... I'll take a look at this. Which ruleset are you using?

ycaniou commented 1 year ago

@rvid19 I use the default on https://www.freecivweb.org. So server is running 3.0.92-dev version, and ruleset si Classic+ (also written in /show all:metamessage)

rvid19 commented 1 year ago

@ycaniou https://github.com/freeciv/freeciv/blob/main/data/classic/effects.ruleset https://github.com/freeciv/freeciv/blob/main/data/classic/buildings.ruleset I couldn't find that the courthouse gives the upkeep bonus nor could I find that it says it does. I may be looking in the wrong ruleset. Any ideas?

ycaniou commented 1 year ago

@rvid19 I can only give you a screenshot of what says the description of the courthouse in the game: courtjouse

rvid19 commented 1 year ago

@ycaniou Thank you for the screenshot. :) I guess I was looking in the wrong ruleset. I thought https://github.com/freeciv/freeciv/blob/main/data/classic was for both Classic and Classic+ ruleset. On the other hand, I don't remember that's the description for courthouse in Classic/Classic+ last time I played, so it could be another ruleset, maybe. Or I'm remembering wrong. I'll look at the other rulesets just to make sure.

ycaniou commented 1 year ago

@rvid19 Honnestly, I was a bit surprised when I saw this in the description, but since I discovered freecivweb and this ruleset+settings.. -- And actually the default configuration is very nice to play :)

rvid19 commented 1 year ago

Personally I prefer Classic rather than Classic+. :) Maybe because it was the first I tried. I looked at all rulesets, even in https://github.com/Lexxie9952/freeciv-web and still can't find that text...

ycaniou commented 1 year ago

@rvid19 I was used to the default rules on desktop game, but the website settings make the game more fun from the beginning to my opinion.

I don't know the architecture of the code, if it relies on freeciv (C++) or not. But I was at least expecting to be able to grep some parts of the message, but even grep -r "upkeep" * in the root doesn't give much interesting results... Would it be possible that either the box in the screenshot is an image and not generated, or that things come from the freeciv code?

rvid19 commented 1 year ago

Those texts are in ruleset buildings data. I'm scanning on GitHub for that text. It must be somewhere...

rvid19 commented 1 year ago

@ycaniou I couldn't find that text on any repo on GitHub, nor the ruleset "Classic+". :( It may not be open-source for some reason, as the music at freecivweb.org is not open-source either.

ycaniou commented 1 year ago

@rvid19 That's odd concerning the ruleset, and that this modification appears without being actually implemented.. Many thanks.

rvid19 commented 1 year ago

@ycaniou Should we close the issue or ask a mantainer?

ycaniou commented 1 year ago

@rvid19 I just tried the Classic on freecivweb to have the description of Courthouses. It's indeed something in Classic+. I searched for "upkeep" from https://github.com/Lexxie9952/fcw.org-server and found https://github.com/Lexxie9952/fcw.org-server/blob/02f89a7b066ac8bc0981e23be9bad3323ddb38d5/freeciv/freeciv/data/mp2/README.mp2#L123 Line 135. Thus in https://github.com/Lexxie9952/fcw.org-server/blob/02f89a7b066ac8bc0981e23be9bad3323ddb38d5/freeciv/freeciv/data/mp2/buildings.ruleset we have L330+ "Provides law and order to support +1 unit free of upkeep"

Does this help?

rvid19 commented 1 year ago

@ycaniou Thank you. :) It helped. Are you sure you didn't try "Multiplayer 2 Caravel" and not "Classic+"? I'm investigating if mp2's courthouse doesn't work too.

rvid19 commented 1 year ago

I found out now that at https://github.com/Lexxie9952/fcw.org-server/blob/02f89a7b066ac8bc0981e23be9bad3323ddb38d5/freeciv/freeciv/data/mp2/effects.ruleset#L1734 the free upkeep effect is there.

ycaniou commented 1 year ago

@rvid19

Are you sure you didn't try "Multiplayer 2 Caravel" and not "Classic+"? I'm investigating if mp2's courthouse doesn't work too.

I don't know what is "Multiplayer 2 Caravel", and as written before, I used the default settings of a new game when connecting to freecivweb: it is written before starting that default ruleset is Classic+, a modernized version of Classic, and is also written in the metamessage variable obtained with /show all

the free upkeep effect is there. Then maybe Classic+ takes some ideas from mp2 but the dev has forgotten this paragraph?

Wouldn't this be a bug to report to Lexxie9952 with the URL of this issue?

rvid19 commented 1 year ago

@ycaniou

I don't know what is "Multiplayer 2 Caravel", and as written before, I used the default settings of a new game when connecting to freecivweb: it is written before starting that default ruleset is Classic+, a modernized version of Classic, and is also written in the metamessage variable obtained with /show all

Multiplayer 2 Caravel is a ruleset, like Classic+. If you didn't change any settings, you certainly used Classic+ then.

Wouldn't this be a bug to report to Lexxie9952 with the URL of this issue?

Yes we could ask Lexxie9952, but she hasn't been online since a few years I think.