main/The Control System
The Control System Origins
TL;DR is located at the bottom of the post.
Note: All that is below is experimental and is NOT final. While this system WILL be implemented into Explodeathon Battlegrounds, there are aspects that may, and will, be changed.
The Problem With Tug of War
In my mind, there has always been a problem with Tug of War. The genre is largely based on luck. How can that be? You have to build units that counter the enemy units. Whoever does this better wins, right? Wrong. And I'll tell you why.
Where the Problem Comes From
The problem originates with the lack of micro. An infestor is a powerful unit because of its ability to root and deal damage to a large number of grouped up units. In a melee game, you control where this fungal growth is going to hit. If there is a thor running at you, followed by a group of 10 marines, even the least skilled players will most likely place their fungal growth on the marines.
But not in Tug of War. That infestor is going to root that thor, dealing no damage to those marines. As a result, the usefulness of the infestor drops dramatically when you cannot control where the fungal growth goes.
It Doesn't Stop There
The problem continues on past caster units, such as the high templar and ghost. In the most extreme example, we can look at aerial combat. A group of corruptors are travelling in front of a group of brood lords. No matter where you place your phoenix, vikings, or corruptors, your anti-air flyers will always attack the enemy corruptors, leaving the enemy brood lords alive to wreak havoc on your ground forces. With the addition of swarm guardians into Explodeathon Battlegrounds, this becomes even more of a problem.
It Keeps on Going!
This applies to every situation. Creepers (anti-light) focusing ultralisks, colossi attacking a single thor instead of an incoming group of marines, a phoenix grabbing a zergling with it's graviton beam. The list is endless! I am sure I am not the only one staring at my army thinking "If only there was a way for me to control my army. Or at least influence it."
The Solution
The solution is an elegant one. Each Spawner will have a set of "Profiles" that can be assigned to each of its abilities and attacks. Each profile will do a different thing. I will explain in detail below.
The Thought Process
This wasn't the first time I recognized this problem. It is what inspired the spawning system in Explodeathon Battlegrounds in the first place. I decided that, although it wouldn't solve all problems, allowing players to position their units in their army would at least allow some control of their army. At least then zerglings wouldn't be spawning in the back, while infestors spawn in the front.
It went well. Very well, actually. I got many positive reviews, and the game was very challenging. But... it wasn't enough. If an enemy built 1 ultralisk, it still rendered my infestor useless. Should an ultralisk hinder an infestor? Yes it should. Should it render it useless? No. No it should not.
So I started to think. I could add in my own AI for the infestor, high templar, etc. They would automatically focus smaller, more defenseless units. It worked very well. I was pleased with the results. But then I noticed a colossus attacking a single thor (the example I used above) while a group of marines destroyed it, unharmed. I thought to myself "I should add a smarter AI for the colossus, too! And for the siege tank! And for... everything!"
The Revelation
But then I realized something. Maybe my "perfect" AI wouldn't be ideal for every situation. Maybe someone would want their infestor to fungal growth the thor, allowing the marines to run ahead to be killed by banelings. Maybe my strategy isn't always the best one. Maybe, instead of me writing the AI, I should let the player write the AI!
The Final Solution
I spent a long time figuring out how to make the system work. There were so many variables, so many different play styles, and so many units. So the system had to incorporate everything. Luckily, it does.
The Control System Itself
The system has multiple parts to it. Each part serves a purpose, and allows more control over your army. It might be difficult to understand at first, but in the end, it allows almost perfect control over your army.
Basic Mode
For a new player, the system listed below may seem overwhelming, confusing, and just plain and simply undesirable. This is why the Control System starts out in "Basic Mode". Basic Mode takes standard, preset Profiles that can be selected. Examples would be "Target Squishies", "Target Casters", "Target <%50 health", "Target Armored", etc. These values will be viewed in an easy to view drop down menu. In the corner will be a large button: "Manage Profiles". This will allow access to the level control listed below.
The Parts to The Control
Part 1: The Scan Radius
The first value you set is the scan radius. When a unit is moving, it will continuously scan the area for potential targets. This will eliminate units as potential targets before the sorting even begins. (You wouldn't want a zergling trying to run into the back of an enemy's army, would you?)
Part 2: Validators
Validators are what make the Control System work. They are split into 4 types: Value Validators, Attribute Validators, Unit Validators (Experimental), and Specialized Validators.
Type 1: Value Validators
Value Validators are the most powerful type of validator. They take a property of a unit and compare it to a value. These validators are in the following format, with bold/italicised elements being variables. "Allegiance units with Property Logic Gate Value as Modifier".
- Allegiance: Allied or Enemy units. For abilities such as the medic heal and queen transfusion, you want the filters to apply to your own units, not enemies.
- Property: Whatever property of the unit you want to check. Some examples are Current Health, Max Health, Cost, etc.
- Whatever operation you want to apply to the Value. Examples would be Less Than, Less Than or Equal To, Equal To, Not Equal To, etc.
- Value: The value you want to check. Examples would be 50, 100, 1.3, etc. This can also be set to another unit property. For example, Caster Current Health, Caster Damage, etc etc.
- Modifier: Percent or Raw Value. This determines whether the Value is to be treated as a percent or a raw value. Examples would be 50 Percent, 650 Raw Value, etc etc. (Percent only applies to properties labeled as "Current")
Put them together, an example Value Validator would be "Enemy units with Current Health Less Than or Equal To 50 Percent". This would cause the validator to pick units that have 50% or less of their health remaining.
Type 2: Attribute Validators
Attribute Validators are a very simple form of validator, but are very useful. Take the Creeper for example. It deals significantly more damage to light units. Therefore, it makes sense that you would want the Creeper to prioritize light units. Attribute Validators allow this to happen.
The format for an Attribute Validator is "Allegiance units with Attribute attribute".
- Allegiance: Allied or enemy units. (Same as Value Validators)
- Attribute: Units picked must have this attribute
An example of an Attribute Validator would be "Allied units with Massive attribute". (Might be useful if you want your queens to focus on transfusing ultralisks)
Type 3: Unit Validators (Experimental)
Unit Validators are used if you want to prioritize a particular unit type. This is experimental, and may not be implemented in the final released version of the Control System. This section is here as a placeholder.
Type 5: Specialized Validators
Specialized Validators can filter common values of units that don't fit into a particular category.
They have 1 value. Some examples would be "Flying", "Ground", "Attacks Ground", "Attacks Air", "Suicidal", "Does AOE", etc etc. This list will grow over time.
Part 3: Sorting Final Target
Once the validators are run, there is a large chance that there are more than 1 unit that fits the description. In addition, multiple validators can be used to find a target. The Sorting System will allow for the proper target to be selected. There are 4 types of sorting available.
Sort 1: Distance
The Distance method will pick the closest unit with at least 1 of the validators being true, and select that unit as the target.
Sort 2: Hunter
The Hunter method will pick the closest unit of the first validator, and select that unit as the target. If there are no units that fit fit into the first validator, the same process is repeated with the second validator, then the third, and so on. This continues until a unit is found.
Sort 3: Majority Profiling
The Majority Profiling method will find the unit that matches the most of the validators listed, and pick that as the target. If there are more than 1 unit that have the most matching validators, the closest unit in that group is chosen as the target.
Sort 4: Linear Profiling
The Linear Profiling method will find the unit that maches the most of the validators listed, but will choose validators in a linear fashion. In other words, the first validator will be verified. All units that do not meet the first validator are removed as possibilities. Of these units, any that do not meet the second validator are removed. This goes on until there are no units that fit the currently testing validator. The method will then pick the closest unit out of the previous selection, and will pick that as the target.
Notes on Sorting
Each sorting method as a purpose. Hunter is ideal for when you list your priorities in order of priority. Distance is useful for when there is no difference in priority for each validator, you just want the closest target to be attacked. Majority Profiling is good for when you want as many of the validators to be true, and one validator does not have a priority over the next. Linear Profiling is good for when you have a priority order for your validators, but you want as many to be true as possible.
Examples of Uses:
- Distance: One of your units deals extra damage to both biological and light, so you want to target either biological or light, and don't prefer one over the other.
- Hunter: Your enemy has brood lords, swarm guardians, and corruptors. You want to take out he brood lords first, then swarm guardians, then corruptors. You don't care where they are, you just want them dead in that order.
- Majority Profiling: For more basic instructions. You want to target biological, units less than 50% health, and units with less than 80 max health. It will try to match all three, but if it can't and finds units that match 2, it will target the closest. (Better than Linear Profiling when your units will frequently try and attack units that are too far back in the enemy's army)
- Linear Profiling (Used properly, this is probably the most powerful sorting method): A good use for linear profiling is finding something close to a value. Setting up validators in the order "less than 60% health, greater than 20% health, less than 50% health, greater than 30% health, less than 40% health, greater than 33% health, less than 37% health" will try to find units as close to 35% health as possible. Another use would be when you have a set of validators that are more important than others, but you still want as many to be true as possible. For example, "Biological, less than 30 current health, move speed > 2.25". This would be good for archons. First it would select all biological units. Then units less than 30 current health. Then units with a move speed > 2.25. Aka, take out zealots. Prioritize dying zealots. Of those dying zealots, prioritize ones that are charging.
Final Notes and Estimated Release Date
I am working extremely hard to get this system released. The BETA should be released this Sunday (3/24), and assuming all goes well, the it will be released to the public on Monday (3/25).
If you are interested in helping test on Sunday, send me a PM and let me know!
TL;DR
I would recommend reading the post. It has lots of detail that isn't covered here.
Short Summary
Due to lack of control (and units doing stupid things) in Tug of War style maps, I have developed a system that will allow users to have an influence over which enemy units each of their own units attacks. In the building that spawns a particular unit, you can put forth priorities, and more specific AI commands. It starts out by giving basic options (Target Armored, Target <50 health, etc), but you can customize further.
For more information, refer to the above post.
Comments