Mana points

Each spellbook costs a number of mana points.

The number of mana points you have is equal to 10 + 2 × INT + 2 × WIS (max 50). The number you regain per overnight rest is equal to INT/2 + WIS (max 15). Or maybe you regain all, yolo, idk.

Some spellbooks require a certain rank in Intelligence or Wisdom to be able to cast.

The spellbook will have details on how the spell works, and whether or not you have to roll for it. Each spell is complicated and chaotic (as they should be!).