Legend of the Diamondstalker
Magic’s mechanics are unchanged from the d20/Pathfinder RPG rules.
Spell energy is drawn from the Medium, which distributes an essentially limitless supply of power. Doing so isn’t trivial, however, and a caster’s soul, body and mind can only handle so much energy a day.
The Medium was originally devised as a technological solution for power distribution, not as a facilitator of magic. The interface that enables a living creature to interact with the Medium is known as the Soul. As a byproduct, that soul contains an imprint of the creature’s basic form, and can be used to ‘resurrect’ a creature with a remarkably small margin of error.
When a creature dies, its soul would normally die with it, but the [[Deities | gods] have introduced a measure into the Medium that cuts off the soul from the body at the time of death, enabling the creature’s essence to be preserved.
Effectively, this means that creatures without a soul cannot cast spells. Many creatures never evolved souls on their own, but again, the gods intervened. In order to increase the number of magic-capable souls they could harvest, they introduced a measure into the Medium that constructed souls for all sentient creatures, whether they could use them or not. The measure essentially failed in its goals. While all sentient creatures now possessed a soul, most never exercised their connection to the medium (most probably couldn’t have if they tried), and their ability to draw power was pitiful when compared next to a powerful wizard or sorcerer.
The gods needed to encourage people to use magic. On top of that, they needed to convince them to commit their souls to a particular god before they died. This resulted in a system of divine representatives, wherein clerics and paladins would swear undying loyalty to a god in exchange for divine aid in drawing and using power from the Medium. This served a dual purpose of advancing a god’s agenda by proxy, while also ‘ripening’ the soul of the divine representative for the eventual ‘harvest’.
Please note that this is a very cynical overview. Keep in mind most of this developed concurrently with the cold war.