Author Topic: Alliance changing system  (Read 968 times)

MirceaKitsune

  • Technician
  • ****
  • Posts: 147
    • View Profile
Alliance changing system
« on: 19 May 2013, 22:09:53 »
I've been thinking about this feature for a bit. It would be one of the nicest new abilities to add, and should be possible to implement if player teams can be changed during a game. This is how I believe it should work:

The ability to change alliances should be a game option, possibly disabled by default. When enabled, a menu (opened by a keybind) presents the player with a GUI listing all players (including them self). They can select any players from that list, while another selector specifies the team in which he suggests moving (more on that below). There should also be a text field where the player optionally writes why they want the team change. Lastly, when the player is done he presses ok and the proposal is sent to all players involved (more on that below).

The menu can be used to do one of two things: Go to another team, or ask someone else to join yours. The menu should assume which you are doing by the team you selected (if it points to your current team it means you're inviting, if not it means you want to leave there). When you want to join a different team, you can select either just yourself or yourself plus other players (be they enemies or allies). When you want to bring a player to your team, you can only select enemy players. Once the player presses OK, all players involved get notified and must express their approval (either in chat or a menu popping up). That includes the players you selected to invite / leave with, as well as all players in the team you are inviting to / leaving to. The change only happens if everyone votes "yes".

To better explain what I had in mind, here are some examples of how it would be used. Given the following initial setup, and considering we are Player 1:

Player 1 = Team 1
Player 2 = Team 1
Player 3 = Team 2
Player 4 = Team 2
Player 5 = Team 3

Example 1: Players 1 and 2 aren't doing too well. Players 3 & 4 are more powerful but could use some extra help. In order to survive, Player 1 considers betraying 2 and joining 3 & 4, so he launches the proposal of joining Team 2. Players 3 & 4 who compose this team are informed, and need to vote whether they agree or not. If both do, Player 1 becomes part of Team 2. In this circumstance, Player 1 could have also invited Player 5 with him, and if 5 also additionally agreed both of them would have went to Team 2.

Example 2: Players 1, 2 and 5 are very weakened, while Player 4 is very powerful. Players 1 & 2 can no longer afford to fight 5 as well, and neither can 5. So Player 1 proposes that Player 5 joins his team, and 5 is asked to vote if he wants to or not. Player 2 is must also vote since he's part of Team 1 where 5 is being invited. If both votes are positive, the transition is done. Additionally, considering that Player 3 was willing to betray 4 for whatever reason, the proposal could have been that players 5 and 3 both joined Team 1 (3, 5 and 2 would all have to vote if they agree).

Example 3: Player 1 has grown very powerful and all other players are weak. He's actually so powerful that he no longer wants any allies. Although the game started with 3 teams, he makes the proposal of becoming part of a new team (Team 4) so he may separate from everyone. Such would require no vote from anyone else since it involves Player 1 alone. Optionally, Player 1 could have invited any of the other players (2, 3, 4 and / or 5) to come with him to the new team.

Example 4: Player 1 is being attacked by Players 3 & 4. He's losing and near the point of being destroyed. Before the enemy's units get to his last castle, he asks to surrender, by telling players 3 & 4 he wants to join them. If 3 & 4 feel like taking 1 as an ally instead of finishing him off, they accept. Player 1 becomes part of their team and the units from 3 & 4 automatically stop the attack.

I think this ability would add more feel, strategy and realism to MegaGlest. What led me to think of this were historical movies I occasionally seen recently... about how nations went to wars, established alliances, surrendered when there was no other choice, etc. Only downside is that this could cause imbalance, as weaker players would try to join the stronger ones. Then again, that's how many weak nations survived throughout history, so this would only add more realism. What do you think? Can this be done in MG anytime soon?

filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
Re: Alliance changing system
« Reply #1 on: 19 May 2013, 23:18:33 »
This feature already exists.

It is very rarely triggered by the admins of the battle, because betrayal and change teams during the battle spoils the game.
Besides, many most playable maps have arranged allies close to each other, so what if someone changes the team and then live up to 10 seconds.

.. but in my opinion something like that:
Quote
...all players involved get notified and must express their approval (either in chat or a menu popping up). That includes the players you selected to invite / leave with, as well as all players in the team you are inviting to / leaving to. The change only happens if everyone votes "yes"...
maybe could improve this feature and then admins would like to use it more frequently.


MirceaKitsune

  • Technician
  • ****
  • Posts: 147
    • View Profile
Re: Alliance changing system
« Reply #2 on: 20 May 2013, 00:24:09 »
Nice... had no idea it already exists. So it's an admin only option I take it? That means changing teams in real time is possible, and all that would be needed is the code for the menu and voting.

I know it could spoil the game in some cases, hence why I suggested disabled by default. If someone wants to play for the sake of fair game and competition, this will surely be off. My idea would prolly be useful for those who want to play the full possibility, realistic, and I guess diplomatic way. That can be really fun too, and I'd love games where the player can also use change of alliances to find their way to victory.

The way maps are designed could be a problem. This would work best on maps where all players are distanced from each other. But I think this once again adds more to the challenge; If you're placed near a powerful ally, you'd have a hard time if you betray him, so better think twice. Then again, if the player you're next to is really weak compared to you and you feel like being traitorous, it might not bother you.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Alliance changing system
« Reply #3 on: 20 May 2013, 02:54:51 »
The code is all there, each member of the team votes if the player can change to their team. Try it out.

MirceaKitsune

  • Technician
  • ****
  • Posts: 147
    • View Profile
Re: Alliance changing system
« Reply #4 on: 20 May 2013, 10:37:27 »
The code is all there, each member of the team votes if the player can change to their team. Try it out.

Found it. I had to enable "Advanced" in the game setup screen to see the option. Gave it a try and it's really awesome... just what I was hoping for. Lovely work :D

Just one question: Does the AI know to utilize this too, or is it only useful in multiplayer? So far the AI seems to know whether to accept or deny your request. But if an AI player is on the verge of losing, will it offer to join your team? And could an allied AI attempt to betray you if the other team is better?

MirceaKitsune

  • Technician
  • ****
  • Posts: 147
    • View Profile
Re: Alliance changing system
« Reply #5 on: 30 September 2013, 19:27:28 »
Sorry for reviving an older thread, but I wanted to suggest one more thing: Can the AI be taught to utilize this system please? It seems CPU players have some knowledge on when to accept a player transferring to their team. But I never get any requests from an enemy CPU to join me, nor do any allied players ever betray me. At least in single player I would like to see this.

It should be easy for an AI to evaluate the situation every few minutes and act in consequence. If his allies are weak compared to his foes and also not positioned close to him (as such would mean instant conflict), an AI should seek an alliance with other teams. All the same, the AI should only accept an alliance when it feels it's too weak to take on its enemies, rather than doing so blindly.