so i am designing an ai for my follower mod, and she has to recognize enemies. an easier way to accomplish this is if i were to be able to easily separate complex enemies from simple ones. complex enemies are basically the humanoids: can have different armors, spells, weapons, etc. simple enemies are beasts, dragons, animals, etc, that all are pretty much the same and only differ by level.
here's my current strategy, but i am hoping there are improvements you can think of:
every enemy in combat is hit by a spell with three magic effects, but only one goes through depending on the conditions that help differentiate them. the first checks to see if the enemy is labeled unique, the second is intended to check for all complex enemies, and the third everything else (basic enemies). While checking for unique is a single condition function, checking for complex enemies is far more robust, and i'd rather the game not have to plow through all these conditions for every enemy in combat:
conditions for complex enemy (current iteration)
HasMagicEffect(_a2_INTLidentifyFFunique) = false ANDGetIsPlayableRace = true ORGetIsRace(DraugrRace) = true OR GetIsRace(DraugrMagicRace) = true OR GetIsRace(ElderRace) OR = true OR GetIsRace(ElderRaceVampire) = true OR GetIsRace(FalmerRace) = true ORGetIsRace(ArgonianRaceVampire) = true ORGetIsRace(BretonRaceVampire) = true ORGetIsRace(DarkElfRaceVampire) = true ORGetIsRace(HighElfRaceVampire) = true ORGetIsRace(ImperialRaceVampire) = true ORGetIsRace(KhajitRaceVampire) = true ORGetIsRace(NordRaceVampire) = true ORGetIsRace(OrcRaceVampire) = true ORGetIsRace(RedguardRaceVampire) = true ORGetIsRace(WoodElfRaceVampire) = true ORGetIsRace(FalmerRace) = true OR
A couple things to note about this list:
- Things might be unintentionally omitted. I don't know if children need to be accounted for as complex enemies, though I'm guessing people may have modded them in such a way that they become hostile (do they even have animations for combat?); I may have forgotten a few enemy types that can be complex (I'm pretty sure the hags are basic enemies)
- I don't think there's any other way to account for all types of vampires, but I'm all ears. This kind of depends on the extend to which objects I can check keywords, because I believe the magic effect is run on the actor, and the actors that are of the vampire races do not comprehensively have the vampire keyword. If there is a way to check the keywords on the race in a way that's less demanding than all these races, please let me know.
I'll go into more detail about how I'm identifying enemies beyond this in a bit, but I have to run off for now.
I very much appreciate any insight you can provide.