• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Preventing the abuse of an alliance system

Status
Not open for further replies.
Level 4
Joined
Jan 27, 2008
Messages
72
So, there's a map with a simple alliance system.

Player A types -ally (color) to ally another person.

The other person has to type -ally (color of player a) to fully establish the alliance.

One of these players could type -war (color of player) to break the alliance, causing both players to unally each other.

With this system, however, there exists an exploit which has come to be called "war/allying." This system allows one player to be allied to another, while his ally is not allied to him. This allows players to feed each other without worrying about hostiles until they find that the time is right to ally once again.

My question is, how would you go about eliminating this exploit, without locking in alliances?

Any ideas?

Thanks,
 
Level 9
Joined
Jul 10, 2011
Messages
562
he means that there are player A and player B...they play together but they train each other by doing the following :

player A types -ally player B so the units of player A wont attack the units of player B but player B's units attack player A's units and so he can train his own units.

you understand?
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Possible solution:
When player A types -ally player b, a dialog is displayed to play B saying "Player A wants to ally", options being Yes or No.
To prevent spam/abuse, limit to one request per minute, or text confirmation.

Better yet
The system as you have it right now, except that the alliances are only set when both players seal the alliance. That is, alliance is not set on the -ally command, but rather using a trigger system that detects both players trying to ally each other.
 
Level 18
Joined
Jun 15, 2012
Messages
498
The most intelligent think you can do, is keeping the standard -ally [player] command, and, to prevent abusing, add a trigger that makes the two players unallied if one attacks the other
(by using this method you shall edit the splash targets of units like mortairs to "enemy", so players won't attack theyr allies accidentally)
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,190
You keep both players hostile until they both agree to an allience. This removes the third state where hostility is one directional. You should time out allience requests after a period of time to prevent players forgeting one was in place from early in a session and the enemy abusing that.

For example...
  1. Player 0 (Red by default) and Player 1 (Blue by default) are hostile to each other.
  2. Player 0 wants to end the war so types "-ally blue".
  3. Player 0 and Player 1 are still hostile to each other and both of their units continue fighting each other.
  4. Player 1 agrees that violence is not the answer to winning the game so types "-ally red".
  5. Player 0 and Player 1 are now allied to each other and all their units will not longer fight each other.

Alternativly the following could occur.
  1. Player 0 (Red by default) and Player 1 (Blue by default) are hostile to each other.
  2. Player 0 wants to end the war so types "-ally blue".
  3. Player 0 and Player 1 are still hostile to each other and both of their units continue fighting each other.
  4. Player 1 is a noob and wants to remain being hostile.
  5. Player 0 and Player 1 are still hostile to each other and both of their units continue fighting each other.
  6. 2 minutes later the offer from Player 0 for an allience expires.
  7. Player 1 is nearly defeated so trys to ally his way out by typing "-ally red".
  8. Player 0 and Player 1 are still hostile to each other as the orignal offer expired and Player 0 kills Player 1 for being such a noob.
 
Level 4
Joined
Jan 27, 2008
Messages
72
what about just allying the 2 players when both wrote the ally command....if not both wrote it they stay aggressive to each other.

Better yet
The system as you have it right now, except that the alliances are only set when both players seal the alliance. That is, alliance is not set on the -ally command, but rather using a trigger system that detects both players trying to ally each other.

You keep both players hostile until they both agree to an allience.

This is probably the ideal solution, but the problem is that such a thing seems way too complicated to make. Is it even possible using GUI?

The most intelligent think you can do, is keeping the standard -ally [player] command, and, to prevent abusing, add a trigger that makes the two players unallied if one attacks the other
(by using this method you shall edit the splash targets of units like mortairs to "enemy", so players won't attack theyr allies accidentally)

This was actually implemented a few versions ago, but like you mentioned, it caused a mess and made allies randomly unally each in the middle of battles due to splash damage.

What do you mean by editing the splash targets of units like mortars? There's an option like that? Where?

Thanks,
 
Level 18
Joined
Jun 15, 2012
Messages
498
This was actually implemented a few versions ago, but like you mentioned, it caused a mess and made allies randomly unally each in the middle of battles due to splash damage.
What do you mean by editing the splash targets of units like mortars? There's an option like that? Where?

Thanks,

Go on the unit editor, attack 1 - Targets area of effect
there you can choose between the unit categories (vulnerable, invulnerable, trees, structures, ground..)
and you select, for example, ground, buildings, trees, ENEMY
this way splash won't hurt allied units
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,190
This is probably the ideal solution, but the problem is that such a thing seems way too complicated to make. Is it even possible using GUI?
Prety sure it is... Try keeping track of allience offers using a boolean array. Using mathematics you make it a 2D array so each player has an index for each player. Forget about the wasted index along the diagonal (players cannot ally themselves) as that will have no impact on performance.

When a player allies another player, you fill the apropiate space on the grid. If the corosponding place for the other player is also set then they both have agreed to ally and thus you can ally them both. If not then do not change any diplomatics. When war is declared you clear the players allience to each other in the array and then change alliences for both players to hostile.

For the expiring system you could iterate through the entire array clearing partial alliences 2 minutes after the last allience offer was sent. Yes not strictly threaded for each allience offer but is better than nothing.
 
Status
Not open for further replies.
Top