In DQHD/DQII we’re making a few slight tweaks to the targeting engine.
- Bulldog Mode --> Target Specific
- Add “Eliminate Danger” target priority
I’d like to discuss these a bit here before I get to implementation.
Target Specific
Bulldog mode was always a bit of a hack to cover a gap in our targeting AI. When a defender is in “Bulldog Mode”, whenever they acquire a new target, they stick with it forever until that target either a) dies or b) goes out of range. This is meant to cover the case where you have set up the targeting scheme you need to target enemy X, but as a result of doing damage to X, or other enemies coming into range, the defender switches away from it. Bulldog mode “fixes” the problem, but is very micro-managey as you have to first ensure that your defender is targeting what you actually want, then switch on bulldog mode, and remember to switch it off again afterwards.
I think it makes sense to just replace Bulldog Mode with “target specific” instead – an interface that just says “HEY, TARGET THIS ONE OVER HERE.” I’m still working out the UI for it, but I imagine it works like this, you click ‘target specific’, then an interface not unlike placing the lightning spell comes up, and you click on the enemy you want. While hovering over enemies an outline will appear on the one your click would select, so it’s easier to narrow in when enemies get crowded. If necessary I can pop up a disambiguation selector if a particular square is REALLY packed. Anyways, you “paint” the selected enemy, and as long as you keep it painted your defender will target that enemy above all other targets until it dies or goes out of range. As a plus, if that enemy wanders back into range, you’ll start targeting it again (bulldog mode had no way to handle this).
Eliminate Danger
In my own playthroughs a pattern I reach for a lot is “kill all the enemies that are dangerous so I can keep my weak team members alive,” but the targeting tools don’t give me a way to say that directly. So I think a “target most dangerous” target priority makes sense. However, there’s multiple ways to implement this. For instance:
- Should it be a primary target option (First/Last/Strong/Weak/Fast), which are mutually exclusive?, or
- Should it be a secondary target option (Cheap/Effect/Chance/Specific/Boss), which are stackable modifiers?
The way targeting AI plays out is by comparing two enemies. If the primary logic is “first”, then between A and B, it picks the one closest to the end.
Secondary logic is a bit weird as it sort of mutates your attack logic – affecting which attacks to use and sort of presorting which enemies you’ll consider – Cheap makes you favor using lower-boost attacks to finish off an enemy if it looks like it will do the job, to save your big moves, Effect makes you spread out your status effects, Chance makes you avoid wasting attacks on enemies likely to dodge/resist them.
So it seems to me that “target dangerous” seems like more of a primary target than a secondary, but maybe it makes more sense as a secondary?
Next, how would “target dangerous” work in principle? There’s a few ways:
Target enemy with:
- highest threat (naive DPS stat)
- highest threat TO ME PERSONALLY (ie, Ketta ignores death worms about to kill Slak, focuses on slightly less lethal snake ghouls that can target her instead)
- highest threat, and…
- take enemy range into account
- take # of defenders actually in enemy’s range into account
- take # of defenders actually likely to be harmed into account (if def armor > enemy attack, they’re “safe”, etc)
- take # of defenders actually likely to be killed into account (if def is close to death add a strong weight)
- enemy itself closest to death. (So it’s better to finish off a 10-attack enemy NOW than pump some more damage into a big huge enemy with 11-attack that won’t die for a while).
Anyways, I don’t want it to get too complicated, as trying to make the algorithm do too much thinking can actually make it harder for the player to use effectively, but I think something like “kill all the really bad stuff before it kills my defenders” could be helpful.