Feedback:User/Erasculio/If and Then clauses for AI

From Guild Wars Wiki
Jump to navigationJump to search

While I'm not fond of copying features from other games, this one has already been copied recently, so... Final Fantasy XII introduced a system for giving commands to AI controlled party members called "gambits", which has been blatantly copied in Dragon Age: Origins.

The system gives a player lines in which to set the behavior of a character, with an "If..." clause and a "Then..." clause. There are multiple possibilities for each clause, allowing a great range of strategies.

Let's say, for example, I have a NPC character called Lina under my control. I want her to heal anyone in the party who has been hurt with a spell called Dwayna's Tears. I would then go to the proper menu, and set:

If: party member below < 50% health
Then: use spell - Dwayna's Tears

Let's say I have a NPC character called Eve, who has a spell called Vampiric Bond which steals health from an enemy. Since it heals Eve, I want her to use it when her health is a bit low, so I would set the clauses:

If: enemy (self with health < 90%)
Then: use spell - Vampiric Bond

Let's say I have a NPC character called Mhenlo, who has a spell called Frozen Ground, which slows down all adjacent enemies. I want him to use it when he's surrounded, so I would set the clauses:

If: surrounded by at least 2 enemies
Then: use spell - Frozen Ground

Let's say I have a NPC character called Devona, who's my second tank; I want her to attack the same target I'm attacking, so I would set the clauses:

If: target of main character
Then: attack

Here's a screenshot showing how Dragon Age deals with this menu. Each line is done in numeric order, so the NPC looks at condition 1, if it's not true it looks at condition 2, and so on until a condition is true. If when executing the command in line 3 the condition in line 1 becomes true, the NPC would stop and follow the command from line 1 instead.

We still don't know if we will have a single companion, a system of henchmen or no AI at all in GW2, but if we have at least one AI controlled companion to our characters, a system like this could make handling such AI much easier for us. This system has also been used in two popular games (FF XII and Dragon Age), so some players would already be familiar with it.