I started something like this a while back, trying to create a PrC which uses gems to cast spells.
Basically what I came up with (high level):
- Set rarity for each spell
- Based on spell rarity, cost of gem to store spell.
- Gems values, based on type, Size, Cut, Quality
Compute costs of...