Article icon - Xenoblade Chronicles 2.svg
Article icon - Torna The Golden Country.svg
This article's title is unofficial.

AI (XC2)

From Xeno Series Wiki
Jump to navigation Jump to search
For other articles titled "AI", see AI (disambiguation).

The combat of Xenoblade Chronicles 2 and Torna ~ The Golden Country uses AI to determine party member and enemy behaviour. Each playable character besides the player-controlled one, and each enemy, uses a script which sets their current action (possibly probabilistically) depending upon the current state of battle.

Overview[edit]

Each playable character has their own AI behaviour which often differs from that of other playable characters. Multiple enemies often share the same AI script. However, two enemies may have different behaviour even when using the same script, e.g. if it has instructions that are conditional on the user's level.

AI determines the user's movement (including where and when they position themselves around their opponent, and when they run to pick up HP Potions), their use of Driver Arts/Vanguard Arts/enemy Arts, and when they perform Blade Switches/Vanguard Switches. It does not affect party member use of Specials, which are fully controlled by the player both in and out of Chain Attacks.

While each party member has a given AI script, the exact actions the script instructs them to take are dependent upon many factors:

  • The Weapon the character is currently using, and (if relevant) the Driver Arts they have equipped;
  • The character's current HP, that of their allies, and that of the enemy;
  • Whether the character is currently in the cancel window of an auto-attack;
  • The distance between the character and the enemy, and whether they are at the enemy's front, side, or back;
  • The status of any Driver Combos or Blade Combos on the enemy;
  • The number of enemies in battle, and the number which are currently aggroing the character;
  • The Class of the character.

Example[edit]

The full AI scripts are complicated and not easy to display. The following is an example of a small section of Rex's AI, written in pseudocode: how he decides which Driver Art to use when wielding the Aegis Sword.

if Rex's HP is below 50% AND enemy's HP is above 15% AND Rex has aggro:
	AggroRisk = True
else:
	AggroRisk = False

if enemy is suffering from Break and Anchor Shot is available:
	use Anchor Shot
else if any party member is below 50% HP and Anchor Shot is available:
	30% probability to use Anchor Shot
else if AggroRisk = False and Rolling Smash is available:
	50% probability to use Rolling Smash
else if Rex is at enemy's back, AggroRisk = False, and Sword Bash is available:
	use Sword Bash
else if Sword Bash is available:
	10% probability to use Sword Bash
else if Rex is at enemy's side, AggroRisk = False, and Double Spinning Edge is available:
	use Double Spinning Edge
else if Double Spinning Edge is available:
	10% probability to use Double Spinning Edge

Party member AI[edit]

Wiki icon - Incomplete.svg This page or section is incomplete.
In other words, yes we know it's unfinished; we just didn't want to leave it blank in the meantime. You can help complete it.
The editor who added this tag elaborates: Each party member will probably need their own subpages

Blade Switching[edit]

The priority with which AI-controlled Drivers in Xenoblade Chronicles 2 switch between Blades is as follows.

Drivers with a Class with "healing Blade switch AI" (i.e. those with at least two Blades, of which at least 50% are HLR role) will switch to (or stay on) a Blade with a healing Art when any party member is below 30% HP.

Otherwise, Drivers will switch to prioritise Blade Combos and/or Driver Combos. The following are aspects which can potentially cause a Driver to choose a particular Blade over another:

  • Driver Combo: The chosen Blade can continue the current Driver Combo, or start one if none is active. This takes into account enemy immunities. Active Blades do not count if the Driver Combo-inflicting Art is less than 70% recharged.
  • Direct Blade Combo: The chosen Blade is of an element which can immediately continue the current Blade Combo.
  • Indirect Blade Combo: The chosen Blade is of an element which cannot immediately continue the current Blade Combo, but may be able to later if the combo advances in an appropriate way. This applies to all Blades if no Blade Combo is active.
  • New Blade Combo: The chosen Blade is of an element which can continue a Blade Combo via a path such that the resulting element orb is not already on the enemy.
  • Old Blade Combo: The chosen Blade is of an element which can only continue the Blade Combo down a path that repeats an element orb currently on the enemy.
  • Cooldown: The chosen Blade is not the current Blade, and the current Blade has all Driver Arts on cooldown.
  • Time: The chosen Blade is not the current Blade, and the current Blade has been active for at least 15 seconds. (The check has a 1% chance to be acted upon every second.)
  • Slot: The chosen Blade is in a lower slot of the Equip Blades menu.

Male Drivers (Rex, Tora, and Zeke) use the following priority system, switching to whatever Blade satisfies the highest condition (or the next-highest in case of a tie, and so on):

  1. New direct Blade Combo AND Driver Combo
  2. Old direct Blade Combo AND Driver Combo
  3. Driver Combo
  4. New direct Blade Combo
  5. Cooldown
  6. Old direct Blade Combo
  7. Time
  8. New indirect Blade Combo
  9. Old indirect Blade Combo
  10. Slot

Female Drivers (Nia and Mòrag) use the following priority system:

  1. New direct Blade Combo AND Driver Combo
  2. New direct Blade Combo
  3. Old direct Blade Combo AND Driver Combo
  4. Old direct Blade Combo
  5. New indirect Blade Combo
  6. Old indirect Blade Combo
  7. Cooldown
  8. Driver Combo
  9. Time
  10. Slot

In short: Female Drivers prioritise switching for Blade Combos, and male Drivers prioritise switching for Driver Combos.

Other notes[edit]

  • Tora's AI has him use most Arts with 50% probability. This includes all of his Driver Combo Arts; therefore, while he will always switch to a Poppi form which can continue a Driver Combo (due to the Blade Switching priorities given above), there is no way to guarantee that he will actually use the relevant Driver Art to continue the combo if he is not being player-controlled.

Enemy AI[edit]

Wiki icon - Incomplete.svg This page or section is incomplete.
In other words, yes we know it's unfinished; we just didn't want to leave it blank in the meantime. You can help complete it.
The editor who added this tag elaborates: Best way to represent this is unclear