博德之门3v62026年10月12日 更新

Skynet

Version 6 Update I have gone about making a down system that actually affects enemies the same way it does affect the player. Presently if you knock an enemy down to 0 HP, they will experience death saving throws, just like the player, and then get back up if they succeed on their death saving throws. If you overhit them, overdamage them, then they will die instantly, similar to the downed 5e mod. I would also suggest that you should try to use this feature alongside DTO Codex of Might and Magic

Version 6 Update

I have gone about making a  down system that actually affects enemies the same way it does affect the player. Presently if you knock an enemy down to 0 HP, they will experience death saving throws, just like the player, and then get back up if they succeed on their death saving throws. If you overhit them, overdamage them, then they will die instantly, similar to the downed 5e mod.

I would also suggest that you should try to use this feature alongside DTO Codex of Might and Magic as it has a death door system where, if a player is downed twice, they die instantly, this should also affect the enemy. Though the way it applies to enemies isn't as compatible as I would like it to be, I did set up SE scripting to try to fix the issue but if you are continually still having issues between the down system and the death store system of DTO, then I did upload an edited version of DTO to GitHub in case of such a problem. That should fix it outright so just drag and drop it into the multi-tool. (I did not upload it here to Nexus as I'm not the mod creator of DTO but I will suggest it to the author to implement it into their own mod.)

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.

Normal Introduction

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: 

  • 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:

Properties cache -  isRanged, isMelee, isAoE, canTargetObjects, canTargetTerrain, ignoresVisionBlock, rangeMeters

Derived properties - isRanged, isMelee, isAoE, canTargetObjects, canTargetTerrain, ignoresVisionBlock, rangeMeters

**Multi-layer classification engine - **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

 

**Element categorization - ** fire/cold/lightning/poison/force/necro/physical/other from spell names

Style categorization — 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)

  • Continually side by side this is also the Environmental Awareness it continually runs; 
  • 3D distance — Euclidean distance with 3-position fallback chain (Ext.Entity → alternate entity → Osi.GetPosition)
  • Horizontal distance — 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)
  • Line of sight —  What every enemy can actually see.
  • High ground detection — Y-coordinate difference > 1.5 units (~5 feet) 
  • Surface detection — scans  for dangerous surfaces: Fire, Acid, Poison, Electrified, Hellfire, Web, Oil + mod surfaces (Bloodrage, Ectoplasm as I play with those mods)
  • Obstacle detection — walls, and doors ( need to expand this) and specifically scans for my Globes of Invulnerability , since that is an actual physical forcefield.
  • Target reachability — combines LOS + distance vs spell range + high-ground horizontal fallback for ranged spells.

Then is the Character Context Assessment;

  • Character snapshot — UUID, name, level, position, classes, passives, statuses, spells, key threats (stealth/Rogue detection)
  • Player party analysis — snapshots all player characters
  • Battlefield context — players on high ground, enemy clustering, average player height
  • Player threat analysis — concentration status, stealth-heavy party, low wisdom, recent control spells, dangerous passives (Rogue/Sneak/War/Paladin/Smite)
  • Enemy capabilities — strength from stats, jump/fly from spellbook, movement speed.
  • Ally/enemy count — determines outnumbered vs outnumbering status

It will then log every single fight you have had in the game as they happen and read from them (fight logs are stored in \AppData\Local\Larian Studios\Baldur's Gate 3\Script Extender\Skynet) profiling the player in a player_profile.json: 

  • Tracks across combats — saves to Skynet/player_profile.json
  • Spell frequency — which spells the player uses most
  • Element preference — which damage types the player favors
  • Style tracking — melee/ranged/summoner/caster/healer/controller tendencies
  • Dominant element/style — auto-detected from usage counts
  • Counter-recommendation engine — maps player style to counter-strategy:
  • Player melee → control (CC them)
  • Player ranged → aggressive (close distance)
  • Player summoner → AoE (clear summons)
  • Player caster → control (disrupt concentration)
  • Player healer → aggressive (burst damage)
  • Player controller → aggressive (pressure before CC lands)
  • Confidence gating — requires ≥2 combats + ≥3 actions in a category; full counter at 0.5 confidence, partial at 0.3
  • Element pivoting — avoids enemy's specialty element if the player has resistance/immunity to it
  • Profile updates on combat end + every 3 rounds during combat

And then it scores spells the enemies have at their Disposal;

  • Base damage, AoE potential, single target
  • Control vs concentrating players, anti-spam control, control vs groups
  • Self-buff (situational: +4 if closing gap, -10 otherwise)
  • Mobility (hazard/obstacle present: +8, already bypassing: -8, clear terrain: -5)
  • Summon, wildshape bonuses
  • Synergy bonuses (Conquest/Aura + control, Paladin + smite, Wizard + damage)
  • Stealth counter (+9 vs stealth-heavy parties with see/true/blind spells)
  • Concentration breaker (+5 vs concentrating players)
  • High ground punishment (+3 vs players on high ground)
  • AoE clustering bonus (+6 when players clustered)
  • Repeat avoidance (-3 per prior use this combat)
  • Hybrid bias (+2 for damage+control spells)
  • No reachable targets penalty (-25)
  • Reachable target bonus (+5), range fit bonus (+4)
  • AoE cluster bonus (+5 per additional player in radius)
  • Melee too far penalty (-15), ranged at distance bonus (+4)
  • Hazard penalties/bonuses (melee on hazard: -12, ranged on hazard: +6)
  • Obstacle scoring (force/eldritch vs Globe: +12, fire/force vs walls: +5)
  • Profile-based counter bonuses (based on the player profile)

It's Threat detection for which Target to attack is then more thorough as the this is a Best Target vs Nearest Target Situation:

  • Best target picker — scores each player by distance + AoE clustering + reachability; melee strongly prefers close, ranged less sensitive
  • Nearest player finder — returns closest living player by 3D distance

At times though when skynet is  giving the base Game AI back the control it will recommend archytypes to the base game AI still based on what it has determined (19 potential paths to recommend in total); 

  • Emergency low HP → heal or defensive
  • Allies need healing → healer
  • Outnumbered → summoner/control/defensive
  • Has summons → summoner
  • Globe active → aggressive/control/defensive
  • Surfaces blocking → defensive
  • Stealthed players → AoE/control/aggressive
  • Low ground → defensive
  • High ground → defensive (ranged + damage)
  • Clustered players → AoE
  • Players concentrating → control
  • Element specialty (fire+cold+cold/lightning+close/force+Globe)
  • Profile-based counter
  • General control
  • Outnumbering + close → aggressive
  • Damage-heavy → aggressive/defensive
  • Melee-heavy + close → aggressive
  • Default → defensive

But I want to be clear that most of the time in most fights it will Skynet which is in control as it continually will be suppressing the base game AI so everything is handled by skynet , even when enemies move or reposition.

For it's movement it considers:

  • Hazard-aware movement — scans path for fire/acid/poison/etc surfaces; finds safe alternatives via expanding ring search (8 directions, up to 6m radius)
  • Path hazard scanning — samples points along movement path at intervals, checks each for hazards
  • Safe position finder — expanding ring search from target position
  • Partial movement — if no safe full path exists, moves as close as possible before hazards
  • Free repositioning — uses no-action-cost movement to step 3-4m closer when a spell is barely out of horizontal range or melee range
  • Mobility spell classification — dash/sprint/teleport/fly/misty/shift/haste are mobility; jump/leap are jump (excluded due to ledge bugs)

So no more enemies running through Fire surface to attack the player.

EDGE CASES and Safety Measures

There are some edge cases I've had to consider for Skynet, things that I've made it not to bother with or to have precautions against, they are as follows:

  • UUID resolution — multi-method resolution (this is for the4 future incase some important NPC bugs out do to Skynet's controls) 
  • Repeat spell avoidance — -3 penalty per prior use this combat
  • Visible target check — if no player has LOS from enemy, release to base AI (Base game handles hidden/invisible party members as it's good enough here)
  • Desperate fallback — if no spells can reach any player AND no mobility exists, score ALL spells regardless of reachability (Panic Mode!!)
  • A****llied/ally analysis — outnumbered triggers defensive/summoner; outnumbering triggers aggressive

Compatibility

I presently have 1241 Mods installed for BG3, some from here, some from Mod.IO, some from other places and some I made for myself personally locally to minor tweak stuff.  But the fact it's compatible with everything isn't what's impressive, No.

It's the fact I finally got Cahoot Config that works through Absolute Laboratory to actually work with my Mod setup due to Skynet.

As normal I always mention in all the Mods I make, they are made primarily for myself, the most altuistic part of the whole experience is the fact I decide to share them but here the I'm deciding to share this mod is more selfish than not (more on that in a bit).

You see when I play games I like to play them hard, hellish and with a reasonable amount of difficulty, BG3 isn't really that difficult, definably when compared to the originals even with Mods (try play EET+SCS with no Save no Reload) , so before making this Mod I tried to play with Cahoot Config, downloaded every single dependency Cahoot mentioned in the dependency paks but I would have my game slow down to an unplayable pace, crash sometimes for whatever reason and crash if I tried to load a different save file after already having Absolute Laboratory load up the configuration fully.

So I gave up on the Mods (AL,Cahoot,UNSO,etc) and made Skynet, in making Skynet I tried to make my own CX Config factoring every single spell from every single spell mod I have, but even with Skynet it wouldn't work how I wanted and would crash with some specific NPCs being tried to play smart with Skynet and that CX config.

I then added a safety feature to Skynet that even if an NPC had 90+ spells applied to them (Yes my config did that) it would tone them down to 18 spells. This was the safety feature for spells I mentioned earlier in relation to enemies and the spells they carry.

It still didn't fix my issue with CX and my Config but I then decided to try Cahoot one more time for no apparent reason but to see what would happen and it started to run smoothly weirdly enough but with all the benefits Cahoot adds and the added Variance to Enemy spells.

Fights then actually became a challenge for me that I enjoyed as Skynet was in control.

So end all be all Skynet should be compatible with any and every mod you have as long as it's not an enemy AI mod (Skynet should just make those redundant) but just put it at the end of your load order anyway.

Future Plans

I did say releasing this mod is more selfish than it is not, so here's what it boils down to. I want Skynet to be as rugged an AI system as can be for my own play, but I obviously cannot test everyway to play as I play with my own style and I know skynet adapts to counter what I do but I want others to play with it and to see if there's someway someone plays that it doesn't counter. 

If you do find skynet doing something dumb, then ,mention it in the posts section so I can adjust the AI to factor that in and both learn from playstyles that involve that and counter them.

Besides that I do want further develop Skynet to factor in certain other mods like Grit and Glory and Additional Spell Interactions plus my own mods Damage Destruction and Consequential Wildshape but also if there if there is any other mod that adds combat depth you like the AI to factor them please let me know.

(I will in the far future want to also make the mod factor in Brawl  but that will be in the far future as I also want to make my own Brawl fork since Tinybike is done developing the Mod)

Dependencies

  • Script Extender
  • MCM Menu

Suggested Mods to install with

Damage Destruction

Consequential Wildshape 

Grit and Glory

Additional Spell Interactions

Absolute Laboratory +  Cahoot Config

Codex of Might & Magic  (definably gonna make Skynet factor this in Later)

An Actual Invulnurable Globe

Countdown to Ceremorphosis FIXED

来源与文件

  • 原作者:A Human
  • 原项目:Skynet
  • 文件:Skynet(ID:129947)
  • 来源上传者:JustAnotherHomoSapien

文件说明

Downed system for enemies fully functional.

前往 N 网打开所选文件。安装与下载要求以原作者及平台说明为准。

<!-- aoe-mods-source:nexusmods:baldursgate3:19315 -->

下载模块

共 1 个来源
立即下载推荐来源
前往下载