[Freeciv-tickets] [freeciv] #44179: PLAYER_DEFAULT_SCIENCE_RATE=100 leaks into game start in govs not allowing it

Back to archive index
OSDN Ticket System norep****@osdn*****
Sat Mar 26 04:49:07 JST 2022


#44179: PLAYER_DEFAULT_SCIENCE_RATE=100 leaks into game start in govs not allowing it

  Open Date: 2022-03-24 23:18
Last Update: 2022-03-25 21:49

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/44179
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44179

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2022-03-25 21:49 Updated by: cazfi

Comment:

Reply To cazfi
The problem is likely in get_player_maxrate() returning 100 when it cannot determine correct value to return. In a typical ruleset where rates are property of the government, that might happen when attempt to clip rates is done before player's government is initialized.
Going through all the cases, I found any place where that would be an issue in freeciv.org code. Nor have I managed to reproduce any such problems with any test setups (except the separate savegame loading bug)
However, looking at FCW code there's our old friend, attach_longturn_player(). That at least has one obvious bug resulting in illegal tax rates, as it just flags former (possibly cheating) AI player to a human one. Well, there's more that it fails to do. Likely just replacing the set_as_human() call with player_set_under_human_control() works.

---------------------------------------------------------------------
Ticket Status:

      Reporter: lexxie9952
         Owner: (None)
          Type: Bugs
        Status: Open
      Priority: 5 - Medium
     MileStone: (None)
     Component: (None)
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

This happened in a Team-Game where the GM/admin did a custom setup because of filling the game with players registering for it into teams.
The GM selected a scenario map with x number of players in their starting positions, as unassigned players. As the sign-ups for the teams were filled, the GM manually converted the unassigned players into usernames of humans, so that they'd take over that nation on first login. Then the players, in Despotism, inherited a science rate of 100% -- which was never checked nor caught by the server. They were able to keep this rate for multiple turns until the bug was discovered.
At FCW, for now we just did a solution but not true bug fix. We changed PLAYER_DEFAULT_SCIENCE_RATE to 60 and PLAYER_DEFAULT_TAX_RATE to 40 (which it should probably be regardless.)  
However, it's conceivable in some rulesets that those rates would still be illegal in a starting government and thus this bug would still remain.


-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/44179
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44179



More information about the Freeciv-tickets mailing list
Back to archive index