View Single Post
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old October 7th, 2021, 04:19 AM
The lines you highlight in red only control the number of spells or cantrips known at a given level, not the slots.

Slots are determined by the caster helper:

perform focus.assign[Helper.3rdCaster]


This is all baked in the base code so you need to pick a caster type that is closest to the number of slots you want and start from there. The types are: WarlocCast, FullCaster, HalfCaster, or 3rdCaster

Look at the Boon of High Magic - it adds a single 9th level spell slot with the line:

hero.childfound[SlotHold9].field[MaxAllow].value += 1

You can see that SlotHold9 is the container for 9th level spells on a character. This means you'll have to write a script that runs and checks for caster level and then adds and removes to all 9 of the SlotHold values. It's a lot of work for anything more than a 1/3rd caster like the eldritch knight.

For warlocks, the code is slightly different.

hero.childfound[SlotHoldWa].field[MaxAllow].value += 1

Since warlocks only have a single spell slot pool, it's a bit easier to modify this part of their spellcasting.

Hope that gets you started.
dungeonguru is offline   #2 Reply With Quote