SpellLists - osirisOfGit/BG3_Absolutes_Laboratory GitHub Wiki
Dependency On: Level || Transient: No || Additive Behavior - All groups will be combined into one large pool, which will be pulled from randomly post-filter
This mutator is intended to enable heavily guided randomness in NPC's spell lists that can both mimic existing progression-based lists and include your own customizations
Keybind | Action |
---|---|
Shift + Left Click | Open the Inspector Popout |
Shift while hovering | Display the Inspector Popout |
Ctrl + Left Click | Select multiple spell icons (same source only: linked spells, manual spells, or sidebar spells). Ctrl + Left Click again to deselect |
Left Click (in middle section) | Change spell pool assignment (random/guaranteed/cast/blacklist) |
This is a separate window in which you can create your own Lists - Spell Lists are a dependency of many other mutators, as Spell Lists are to NPCs what Progressions are to Players. The reasoning here is that spells are the foundation of combat, and all other aspects of a character affect the effectiveness of those spells - Progressions allow players to choose and evolve their builds in accordance with their spells, but NPCs don't have that choice, so instead we choose what spells they do have, then relevant mutators act around those choices.
Lists contain the following:
- Sublists per Entity Level - Row #1 represents Entity Level 1
- Manually assigned spells - drag and drop from the browser sidebar (or Copy All in the Progression Browser) on the right to assign to any level. These can be moved to any level once assigned
- Progression-linked spells - linking a progression will form an association to that progression, meaning the spells don't actually get added to the List (unless set as Guaranteed); instead, the progression resource will be live queried when necessary, dynamically pulling all spells from it and processing them as though they were manually added.
- This means that you can't change what level a spell is assigned to, nor can you remove a spell from a list - you can blacklist them however, preventing them from being used.
- This is useful if you expect to add mods in the future that will add spells to a given progression and want to use them automatically, the same way a Player character would
- Spells in each sublist are broken up into:
- Guaranteed - Will always be assigned to the entity
- Randomized - Added to a random pool to be chosen by the Mutator - more below
- Cast On Level Load / Cast On Combat Start - as you'd expect, using
Osi.UseSpell
- Blacklist - Only for Progression-linked spells, excludes them from processing
Additionally, there is a section for Primary Abilities - this is used specifically in the context of Abilities Mutators - more details can be found in the tooltip.
Demo:
bg3_dx11_JmsfC92o2M.mp4
In the mutator itself, you can design multiple Spell List Groups, which are groups of Leveled Pools.

If you specify multiple Spell List Groups that an entity is eligible for (see criteria below), one will be randomly chosen.
In each pool you'll define an Anchor level, which is the minimum level an entity must be to be eligible for that pool - that pool will apply to that entity up to level 30 or until the next anchor level in the group, whichever comes first.
For example, in the above screenshot there are two level pools - the way this is configured, any entity that is level 1-4 will be eligible for the first pool, and any that are level 5 or above are eligible for the second pool.
This approach allows you to simulate (optional) multiclassing - in the same example, you can see we defined both of our Death and Life Cleric spell lists - this does NOT mean the entity will receive both - rather, they will randomly recieve one of them.
The same assignment will happen at level 5, but with a bit of a twist - if the entity receives the same list they received at Level 1, they will continue with that spell list as normal; however, if they receive a different list, they'll start from that list at level 1.
For example, if the entity was assigned Death Cleric at level 1, they'd receive the spells from that list for levels 1-4.
If they're assigned Death Cleric again, they'll receive level 5 spells, and continue in that order.
If they're assigned Assassain, they'll only receive Assassain's level 1 spells at level 5, level 2 spells at level 6, and so on.
This means you could also set up a pool that dips into a multiclass and comes back out to continue the main progression by setting a third spell pool at level 7 for Death/Life cleric again - at that point, they'll continue with the last level they were at for that list, which in this case was level 5.
You can also see above that we have loose Spells defined outside of a spell list - these spells do not have randomized pools - instead, they're only Guaranteed, Cast On Combat Start, and Cast on Level Load. They're intended for two main use-cases:
- You don't want to assign entire lists to an NPC, maybe a boss, but want to supplement them with specific ones
- You want to assign an NPC a list, but want to ensure they have specific spells for their kit regardless of their list, i.e. giving an Underdark smuggler the Light spell
Any number of spells can be added here, but keep in mind that the game's AI can't handle large amounts of spells well - they tend to crash when reaching the 7-8+ range, depending on the AI archetype. Spells that are set as Cast on Combat Start/Level Load aren't added to the spellbook though, so you can safely add as many as you'd like
As mentioned in Spell List Designer, all Spell Lists have a randomized pool of spells each level - this not only allows a great degree of variety in NPCs when using wide-reaching selectors, but is also a major stability and performance feature.
BG3's AI doesn't handle having lots of choices well - there are some exceptions to this, but a guiding principle in your mutators should be to limit the amount of thinking the AI has to do to increase stability and performance (will require lots of experimenting, not all NPCs are built equal in this regard). Aiming for 6-7 total spells (not counting common actions) is generally a good target.
This setting will allow you to control how many of those random spells to give an NPC per level. Levels specified do not need to be consecutive - as shown above (which are the default values), you can specify only the levels that you want the number to change.
The default values set it up so that NPCs receive 2 spells at level 1 and 2 more at level 2 (4 total spells), 0 spells 3-4, 1 spell 5 + 6, so on, so forth. This allows you to tune your distribution to your spell list(s), focusing on the important spells depending on the target's level
Criteria are used to create generic mutations with guided Spell Group assignements - for example, say you wanted to assign all Goblin Booyaghs as either Shadow Sorcerors or Death Clerics, all Goblin Warriors as Fighters, and all Goblin Archers as Gloomstalkers. You could create 3 distinct mutations, but that increases mutation bloat for not great reasons - all those entities are goblins, so we should be able to process them together and keep our mutation set up relatively clean.
These criteria allow exactly that - by combining with a Race selector, you can set up 3 different Groups to accomplish that distribution by specifying the relevant criteria. These are best combined with Ability and Class mutators, but even by default should serve many usecases.
You can also choose what spells Lab will attempt to remove - this is not a guaranteed operation, as the game will often force spells from specific sources to be on the entity. The primary use-case so far is to remove spells assigned via the Template's Skill List, which are under SpellSet2 (which is also the sourceType Lab will assign its added spells)
Example
For example, True Soul Gut has the following in her template:
So this can be removed by selecting SpellSet2 from
Which is accomplished by removing them from the Template associated to her entity handle
bg3_dx11_DovIHMqdru.mp4
[DEBUG] (S) ==== Starting mutator Character Level (priority 5) ====
[DEBUG] (S) Base level above the player level is 3 (post XPReward calculation)
[DEBUG] (S) Adding a random value between 0 and 2 to the base value 3
[DEBUG] (S) Highest player level is 1
[DEBUG] (S) Changed level from 4 to 4
[DEBUG] (S) ==== Finished mutator Character Level in 2ms ====
[DEBUG] (S) ==== Starting mutator SpellList (priority 6) ====
[DEBUG] (S) Selected spellList Destructo (d4e2edc8-87c2-4ab2-beab-4e6e58bee1d6) for anchor level 1, using levels 1-2
[DEBUG] (S) Giving 2 random spells out of 0 from level 1
[DEBUG] (S) Giving 2 random spells out of 25 from level 2
[DEBUG] (S) Added spell Zone_BurningHands
[DEBUG] (S) Added spell Projectile_WitchBolt
[DEBUG] (S) Selected spellList New Spell List (444cbbe8-0159-424a-9e09-eafe2f1c6395) for anchor level 3, using levels 1-1
[DEBUG] (S) Used on level load spell Shout_ArmorOfAgathys
[DEBUG] (S) Skipping level 3 for random spell assignment due to configured size being 0
[DEBUG] (S) Selected spellList Destructo (d4e2edc8-87c2-4ab2-beab-4e6e58bee1d6) for anchor level 4, using levels 3-4
[DEBUG] (S) Skipping level 3 for random spell assignment due to configured size being 0
[DEBUG] (S) Skipping level 4 for random spell assignment due to configured size being 0
[DEBUG] (S) ==== Finished mutator SpellList in 0ms ====