
Skynet
I made this mod and unlike my other mods, this one I really really enjoyed finally getting it to work. It literally took me two attempts to get this to work, I made it the first time then after days o
I made this mod and unlike my other mods, this one I really really enjoyed finally getting it to work. It literally took me two attempts to get this to work, I made it the first time then after days of work, had to scrap everything and start all over again from the beginning and finally now it works.
Not yet complete, but it works.
I know of about a few Enemy AI mods in total and they generally devolve into "kill party member on the floor" or "attack lowest level person", honestly it's lame, lazy , repetitive not really that smart and worst of all it ends up busting a bunch of story scripted fights in how enemies behave.
So I want to walk through step by step how this mod works:
[list]
[*]Throughout a whole fight from start to end, there is a pulse of constant evaluation that continually runs it will check through all the spells every single enemy has (btw spells also include normal actions like just attacking normally, it's just internally everything in BG3 is a spell). Here's everything it factors for all spells:[/*]
[/list][b]Properties cache[/b] - isRanged, isMelee, isAoE, canTargetObjects, canTargetTerrain, ignoresVisionBlock, rangeMeters
[b]Derived properties -[/b] isRanged, isMelee, isAoE, canTargetObjects, canTargetTerrain, ignoresVisionBlock, rangeMeters
[b]Multi-layer classification engine - [/b]Classifies any spell into damage, control, utility, selfbuff, mobility, summon, wildshape, aoe, single:
Layer 1: Game data — VerbalIntent + SpellType + SpellSchool + SpellFlags
Layer 2: Name pattern recognition — ~120 damage keywords, ~50 control keywords, ~50 self-buff keywords, ~15 mobility keywords, ~15 summon keywords, ~8 wildshape keywords
[b]Element categorization - [/b] fire/cold/lightning/poison/force/necro/physical/other from spell names
[b]Style categorization[/b] — summon/heal/control/concentration/damage from spell names
I did all this and I'm mentioning all this here so you understand; because as you can probably assume from the title of the Mod itself, I wanted to make a Combat AI that actually understood what the spells actually do, like you a human (I'm assuming you're a Human reading this) understand what spells do and are when you read them and descriptions of spells, especially and necessarily for spells that are added by mods and have no base game reference to lean off of. (I am actually going to comeback to another point about mod added spells later)
[list]
[*]Continually side by side this is also the Environmental Awareness it continually runs; [/*]
[/list][list]
[*][b]3D distance[/b] — Euclidean distance with 3-position fallback chain (Ext.Entity → alternate entity → Osi.GetPosition)[/*]
[*][b]Horizontal distance[/b] — XZ-plane only (ignores height), used for high-ground range fallback (couldn't get direct control to operate enemies that are having a above height location to the player for direct control of enemies, so here it will fallback to base game AI, which seems just good enough for those situations)[/*]
[*][b]Li



