Oberlus wrote: ↑Mon Nov 16, 2020 8:01 am
If I got this right, RULE_NUM_COMBAT_ROUNDS is not declared in default/scripting/game_rules.focs.txt, but in the backend:
Is there a reason to not have all game rules in the same file or to need to recompile FreeOrion if one wants to change that value?
Rules used in C++ should be declared in C++.
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Couldn't the same be done for number of bouts per combat turn?
I suppose it's mistake because even if someone fully rewrite game content scripts C++ code should be usable still.
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
o01eg wrote: ↑Mon Nov 16, 2020 11:23 am
I suppose it's mistake because even if someone fully rewrite game content scripts C++ code should be usable still.
If I understand you correctly, it's a mistake that those two rules are added only in C++ code instead of in the game_rules.focs.txt file, and so I could make a PR about it, am I right?
For example, we have RULE_ENABLE_ALLIED_REPAIR in game_rules.focs.txt but RULE_THRESHOLD_HUMAN_PLAYER_WIN, RULE_ONLY_ALLIANCE_WIN, RULE_ALLOW_CONCEDE, RULE_CONCEDE_COLONIES_THRESHOLD in MultiplayerCommon.cpp.
Do you envision any problem from moving them all to the focs file?
o01eg wrote: ↑Mon Nov 16, 2020 11:23 am
I suppose it's mistake because even if someone fully rewrite game content scripts C++ code should be usable still.
If I understand you correctly, it's a mistake that those two rules are added only in C++ code instead of in the game_rules.focs.txt file, and so I could make a PR about it, am I right?
The opposite: if a rule is referenced in C++, it needs to / should be defined in C++ and does not need to be also defined in game_rules.focs.txt. If a rule is defined in game_rules.focs.txt and not in C++, but is used in C++, that's a potential bug and the rule should be moved into C++ and removed from game_rules.focs.txt