SpellLists - osirisOfGit/BG3_Absolutes_Laboratory GitHub Wiki

Spell List Mutators

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

Spell List Designer

Mutator

In the mutator itself, you can design multiple Spell List Groups, which are groups of Leveled Pools.

Spell Groups and Leveled Pools overview

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.

Spell Lists

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.

Loose Spells

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:

  1. You don't want to assign entire lists to an NPC, maybe a boss, but want to supplement them with specific ones
  2. 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

Group Settings

Amount Of Random Spells To Give Per Level

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.

Screenshot of the Amount of Random Spels To Give Per Level Setting in IMGUI

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

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.

Image of Criteria Section in IMGUI

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.

Spell Sources + Spells to Remove

⚠️ **GitHub.com Fallback** ⚠️