Warzone2100 / warzone2100

Command the forces of The Project in a battle to rebuild the world after mankind has been nearly destroyed by nuclear missiles. A 100% free and open source real-time strategy game for Windows, macOS, Linux, BSD+
https://wz2100.net
GNU General Public License v2.0
3.19k stars 527 forks source link

alliance function unpredictable behavior #665

Open vaut opened 4 years ago

vaut commented 4 years ago

From the documentation, I expected that the function will only change the attitude from the enemy to an ally (can't attack and cooperative victory). But in the multiplayer behavior of a function, everything is different everywhere: "No Alliances" is the expected behavior. "Allow Alliances" - Becoming Collaborative Research "Locked Teams" - all buildings and units are visible. The fog of war does not turn off. Shared research. "Locked Teams, No Shared Research" - all buildings and units are visible. The fog of war does not turn off. Research are separate.

I would like to divide this into three unrelated functions:

Chewbakka-Wakka commented 4 days ago

I was going to test this with the AI, but it looks like none of them seem to handle this too well. Nexus + BoneC! have some code about this but it needs some work... note to self.

To be clear then, the only issue here is with "Allow Alliances" and how that works when you change state? I'll be trying to test this out.

Allies (do not attack) - Expected when allied, else back to hostile when changing state. (I'd expect.) Shared visibility - Expected when allied, else Shared vision to be revoked when changing state. (I'd expect.) Shared research - Now that is a big one, I'd have a button next to it to offer "Share technologies" after becoming allied. By default I'd say No Shared Research after becoming allied. - this being my opinion. Behavior TBC.