I was wondering how you would go about scripting a Book of Infinite Spells, as per the old AD&D magic item? My first attempt was to make it work like a scroll that would call a tag-based On Unacquire script when it was used. Unfortunately a charged item doesn't seem to call the tag-based scripts. My only other option then is to make it a Unique Power that runs a On Activate script when it is used, thereby possibly changing the page or making it vanish. The problem then is the description needs to be managed to list the current spell. Also the spell may be a ranged spell or a self-only spell, which function differently in terms of target selection. Is there a better way?
Thank you.
Book of Infinite Spells
Débuté par
rjshae
, sept. 27 2010 03:18
#1
Posté 27 septembre 2010 - 03:18
#2
Posté 27 septembre 2010 - 03:30
I would give the book two item properties. The first is a unique power (self only) and handles turning the pages. The second item property is the actual spell. In the onActivate script of the item (i.e. turning the page), you have to remove the second item property, and create a random new one (or destroy the book if you are on the last page). I think the most tricky bit is the possibility of turning the page while casting the spell. This should be possible by spellhooking: check whether the spell was cast from the book, determine if you have to turn the page, and if so, execute the onActivate script.
#3
Posté 27 septembre 2010 - 07:40
Interesting approach. I'll take a look. Thanks.





Retour en haut







