Epic Spells are granted by the feats, named the same as the spell.
I think if you have the feat, and have the required spellcraft for the spell, then you gain access to it.
Using nwnx_funcs - to do in-game modifications to feat lists, I have managed to give myself hellball at level 20 etc, as long as I met the spellcraft requirement, it would appear.