I've been meaning to put together in in-depth post for Shining Force 2's AI systems. This has been slow going primarily because November each year means I put aside all other work to concentrate on NaNoWriMo. This post will eventually be amended as I learn more about the game's AI but for now here are some notes.
1.) If an enemy unit is placed on an impassable tile they cannot leave said tile despite their movement range flashing on their turn. May be useful for perma-rooting specific units. (exception: when a unit who has a Healing Rain is triggered to use said item)
2.) Agility of 128+ results in roll-over and two turns. The game uses BASE Agility when calculating the agility bonus from Boost causing units with 128+ AGI to gain no speed benefit from the spell because their AGI has already been modified for their in battle speed. (To figure out this value take the base agility and subtract 127.)
This is probably the reason why the AI cannot use Boost in Shining Force 2 and Shining Force CD.
3.) Giving a player character enough of an AGI boost off of equipped items to push them over 128 causes their turn order calculation to bug dropping them out of many successive rotations. The root cause of this bug is not understood but it eventually corrects itself as units on the field die and drop out of the rotation.
4.) When the AI is doing damage checks to see what it should use to attack with, when seeking to destroy a unit, the target's resistances are NOT taken into account. The AI can thus be tricked into using magic on a highly resistant target and effectively wasting turns and MP.
5.) If the battle condition is set kill Monster Unit #0 and said monster is a triggered spawn the battle will end on the first enemy turn because the game can't tell the difference between 'dead' and 'waiting to spawn.'
6.) The AI can only parse one entry in its spell list when searching for a spell of a certain type to use. This means if several direct-damage spells are in its list it only uses whatever is listed first. The same is true for healing spells. Thus the AI cannot benefit from knowing both Heal and Aura.
7.) Related to entry 6 above, the AI will not use the spell effect for an item in its inventory unless the item is equipped and then it is limited to what it could use as spells. (For example, if an enemy had an item with the effect of Boost it can't use that effect because Boost is not something the AI understands how to cast.)
8.)AI 15 seems to trigger automatically once it detects enemies within 1.5x to 2.0x its movement range irrespective of other triggers. For example, Cameela on the Nazca Plain would consistently switch from patrol to seek mode once a Force member got within 2x her movement range despite her trigger region remaining un-breached. Got this sorted out, disregard.
9.) When the AI is trying to heal itself and has multiple levels of a heal spell available to it, the first thing it checks is the amount of health the intended recipient has lost which it then compares to each successive effectiveness value for the spell it intends to cast starting with the highest level. The AI will then try to cast the most powerful spell it can - the one that most closely matches the health loss without going over (provided the healer has enough MP). The range of the spell is only considered after power and then only if the caster is not adjacent to the intended target. This means that if the target has lost enough health that the AI tries to cast a Heal with sufficient power but not enough range healing can be prevented by blocking the healer from moving into range. The AI will never consider that it could cast a weaker heal with longer range. It would only do so if it didn't have enough MP to cast the stronger spell.
10.) As a corollary with point 9 above, the AI only ever considers one target at a time when trying to heal. Monster #0 is the highest priority recipient of healing. If multiple targets are healed in one casting it is a function solely of being close enough to the intended target and not because the AI makes any consideration of heal efficiency.
11.) Healing Rains are the only healing item the AI can use. One will be used only if one of two conditions are met. It will be used if the unit carrying the Rain detects that Monster #0 is at half health or less. It will also be used if the unit carrying it is at half health or less and has completely depleted their MP. Using it moves the user one step to the right as a hardcoded action that bypasses collision checks. The unit may step out of bounds or into another unit. Doing so disables collision with said enemy unit until they move into a valid space.
1.) If an enemy unit is placed on an impassable tile they cannot leave said tile despite their movement range flashing on their turn. May be useful for perma-rooting specific units. (exception: when a unit who has a Healing Rain is triggered to use said item)
2.) Agility of 128+ results in roll-over and two turns. The game uses BASE Agility when calculating the agility bonus from Boost causing units with 128+ AGI to gain no speed benefit from the spell because their AGI has already been modified for their in battle speed. (To figure out this value take the base agility and subtract 127.)
This is probably the reason why the AI cannot use Boost in Shining Force 2 and Shining Force CD.
3.) Giving a player character enough of an AGI boost off of equipped items to push them over 128 causes their turn order calculation to bug dropping them out of many successive rotations. The root cause of this bug is not understood but it eventually corrects itself as units on the field die and drop out of the rotation.
4.) When the AI is doing damage checks to see what it should use to attack with, when seeking to destroy a unit, the target's resistances are NOT taken into account. The AI can thus be tricked into using magic on a highly resistant target and effectively wasting turns and MP.
5.) If the battle condition is set kill Monster Unit #0 and said monster is a triggered spawn the battle will end on the first enemy turn because the game can't tell the difference between 'dead' and 'waiting to spawn.'
6.) The AI can only parse one entry in its spell list when searching for a spell of a certain type to use. This means if several direct-damage spells are in its list it only uses whatever is listed first. The same is true for healing spells. Thus the AI cannot benefit from knowing both Heal and Aura.
7.) Related to entry 6 above, the AI will not use the spell effect for an item in its inventory unless the item is equipped and then it is limited to what it could use as spells. (For example, if an enemy had an item with the effect of Boost it can't use that effect because Boost is not something the AI understands how to cast.)
8.)
9.) When the AI is trying to heal itself and has multiple levels of a heal spell available to it, the first thing it checks is the amount of health the intended recipient has lost which it then compares to each successive effectiveness value for the spell it intends to cast starting with the highest level. The AI will then try to cast the most powerful spell it can - the one that most closely matches the health loss without going over (provided the healer has enough MP). The range of the spell is only considered after power and then only if the caster is not adjacent to the intended target. This means that if the target has lost enough health that the AI tries to cast a Heal with sufficient power but not enough range healing can be prevented by blocking the healer from moving into range. The AI will never consider that it could cast a weaker heal with longer range. It would only do so if it didn't have enough MP to cast the stronger spell.
10.) As a corollary with point 9 above, the AI only ever considers one target at a time when trying to heal. Monster #0 is the highest priority recipient of healing. If multiple targets are healed in one casting it is a function solely of being close enough to the intended target and not because the AI makes any consideration of heal efficiency.
11.) Healing Rains are the only healing item the AI can use. One will be used only if one of two conditions are met. It will be used if the unit carrying the Rain detects that Monster #0 is at half health or less. It will also be used if the unit carrying it is at half health or less and has completely depleted their MP. Using it moves the user one step to the right as a hardcoded action that bypasses collision checks. The unit may step out of bounds or into another unit. Doing so disables collision with said enemy unit until they move into a valid space.
◾ Tags:
(no subject)
How did NaNoWriMo go for you this year?
(no subject)