- Joined
- Nov 28, 2016
- Messages
- 1
I have been working on a certain project for some time now. The primary problem is AI.
Background---
ever played kodo tag in wc3? ever wonder why it was never ported over to sc2? well, it's because the AI works differently, and the 'bugs' exploited in that game, in order to create the experience we remember as kodo tag... those bugs don't exist in starcraft. I'm trying to make a working system that re-creates kodo tag, in its original form.
The Goal---
I want to have 3 unit groups:
when a unit from group 1 spawns (lets call this the 'attacker'), I need it to select a unit from group 2 (the 'target')move to that unit, and attack it. If the attacker encounters other units from group 2, before it reaches its target, it is allowed to temporarily acquire/chase/attack those units, but should return to attacking its original target shortly after.
If the attacker cannot reach its target , due to having its path blocked by structures, it will walk around those structures, rather than attacking them. If there is no way to walk around, the attacker will attack any structures which block its way, until a path is cleared--then it will return to pursuing its target.
Problems---
so far, I can :
I have tried several fixes, all of which have been trigger based.
I have looked over the AI editor, and it seems to be based primarily on timed events and attack waves. unless each attacker forms its own attack wave, I do not know how this could be made very useful. even then I am very uncertain of it.
------------------------------
If you have experience in AI based, Trigger based, or data based unit control, I would greatly appreciate any input you can offer.
Background---
ever played kodo tag in wc3? ever wonder why it was never ported over to sc2? well, it's because the AI works differently, and the 'bugs' exploited in that game, in order to create the experience we remember as kodo tag... those bugs don't exist in starcraft. I'm trying to make a working system that re-creates kodo tag, in its original form.
The Goal---
I want to have 3 unit groups:
- computer controlled units
- player controlled units (does not include structures)
- player's primary unit (subset of group 2)
when a unit from group 1 spawns (lets call this the 'attacker'), I need it to select a unit from group 2 (the 'target')move to that unit, and attack it. If the attacker encounters other units from group 2, before it reaches its target, it is allowed to temporarily acquire/chase/attack those units, but should return to attacking its original target shortly after.
If the attacker cannot reach its target , due to having its path blocked by structures, it will walk around those structures, rather than attacking them. If there is no way to walk around, the attacker will attack any structures which block its way, until a path is cleared--then it will return to pursuing its target.
Problems---
so far, I can :
- spawn attackers (triggers)
- assign targets to attackers (triggers: when unit is spawned, or becomes idle, issue order)
- have attackers ignore structures, but still acquire other units along their path (this is currently working, but is not 100%; data editor, variation of the 'harmless' buff, which i place on structures)
- cause the kodos to attack structures which block their path.
I have tried several fixes, all of which have been trigger based.
- the origional 'issue order' trigger{[issue order(attack) targeting point(position of unit) ]} is for most purposes very effective. The problem was that if the target is on a ledge, and all ramps to that ledge are blocked, the attackers simply move as close as they can to the target (congregating at the ledge) and do not seek out ramps leading onto the ledge.
- using the 'AI pathing cost' function in triggers to check when pathing to a particular unit is impossible (function returns -1 if no path is found). this can work...but causes 2 problems.
- when a single player boxes their units in with structures, all attackers begin attacking indiscriminately. (I have found a fix for this)
- this seems to cause many attackers to 'go idle'. they will stand in place, and fidget, but little else. inclusion of a 'when unit becomes idle' trigger does not seem to help in any way. (I have such a trigger, so that when a target is killed, a new target is chosen--it works very well, but when it includes 'AI pathing cost' it begins to fail. This 'when unit becomes idle' trigger also goes off when the attacker loses sight of a target, becomes rooted or stunned, etc.)[very serious problem]
- There have been other attempts made, including data-based attempts which would acquire new targets for attackers, etc, but only the two above have been highly profitable.
I have looked over the AI editor, and it seems to be based primarily on timed events and attack waves. unless each attacker forms its own attack wave, I do not know how this could be made very useful. even then I am very uncertain of it.
------------------------------
If you have experience in AI based, Trigger based, or data based unit control, I would greatly appreciate any input you can offer.