The warlock stuff like that invocation and pact of the tome all uses variables that start with a "c" - which means they are "class" fields, variables and tables and expect in those cases the warlock class
Trying to modify or adapt them is likely to fail on non-warlocks or cause weird effects because the warlock method of adding spells is completely different from the rest of the classes.
I would suggest looking at the feat Magic Initiate and the associated configurable. The configurable is what actually sets up a new tab and spell selection lists and would allow for not using Charisma.
|