-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some protection measures for a players alliances #2266
Conversation
In games with complex alliance systems, declaring war can have unintended consequences. To protect the user from cancelling alliances by accident: * When declaring war would result in an alliance being cancelled, require the user to cancel the alliance first. * When declaring war would force one of your team mates to cancel an existing alliance, require this alliance to be cancelled first. AI is a special case: * The behaviour of AI players wanting to declare war has not changed. * If the player wanting to declare war has AI players in their team, they will break alliances as needed to make the war declaration possible. Reasoning: While you can speak with your human teammates, you can't coordinate war preparations on team level with them. Cease-fires running out, might still break alliances. While here: Fix a comment.
If a cease-fire runs out and this would break existing alliances, extend the cease-fire without player intervention. The idea is, that the common allies convince the parties of the cease-fire to extend the pact. If one of the parties is an AI, the old behavior will be used unchanged. AI doesn't know how to cancel alliances to enter war if desired, and might get caught in an eternal cease-fire. The number of turns the cease-fire will be extended is defined as `TURNS_EXTEND_CEASEFIRE` in `server/diplhand.h` and is currently set to `1`.
On Discord at least one voice was cast against these changes: https://discord.com/channels/378908274113904641/857286127165112370/1225396755789512715 In the previous PR, there was still a discussion about whether casus belli still had to be handled in a special way. This discussion was still ongoing and started here: #2239 (comment) |
I've likely missed the messages about this, sorry. What was the conclusion of the revert-or-fix discussion? This doesn't seem to be a revert, but a fix in a different way than #2239? Missing some context before reviewing |
As part of beta.1 blabber was kind enough to revert an earlier patch. He also closed the PR that was supposed to "fix" the patch. This PR includes the original + fixes. I think we should look at setting up a game or something to test this out. |
Might be good for some LTX game? |
I was leaning more towards something small to do a really good edge case test of varying scenarios. Something short and to the point. Kind of like an autogame, but with humans. |
We could use Sketlux' Soviet Revolution scenario for that. It has many players that should naturally ally and many players that won't even meet. |
I've been playing with this on a local game off and on for the past few weeks. It seems to work as expected. Merging. |
Documents the changed behavior in diplomatic relations introduced by longturn#2266.
Documents the changed behavior in diplomatic relations introduced by #2266.
This is a follow-up PR for #2214 and #2239.
Closes #2177.
In games with complex alliance systems, declaring war can have unintended consequences. To protect the user from cancelling alliances by accident: