Skyrim Special Edition
0 of 0

File information

Last updated

Original upload

Created by

Parapets

Uploaded by

Parapets

Virus scan

Safe to use

About this mod

API to allow mods to implement custom behavior when the player uses spell tomes, disabling the vanilla behavior of simply eating the book and instantly learning the spell.

Requirements
Permissions and credits
Mirrors
Changelogs
Overview
This is an API that allows mods to implement custom behavior when the player uses spell tomes.

Your scripts can register for the spell tome event using any of these provided scripts:

DEST_FormExt.psc:
Spoiler:  
Show

Scriptname DEST_FormExt Hidden

Function RegisterForSpellTomeReadEvent(Form akForm) global native

Function UnregisterForSpellTomeReadEvent(Form akForm) global native

Event OnSpellTomeRead(Book akBook, Spell akSpell, ObjectReference akContainer)
EndEvent


DEST_AliasExt.psc:
Spoiler:  
Show

Scriptname DEST_AliasExt Hidden

Function RegisterForSpellTomeReadEvent(Alias akAlias) global native

Function UnregisterForSpellTomeReadEvent(Alias akAlias) global native

Event OnSpellTomeRead(Book akBook, Spell akSpell, ObjectReference akContainer)
EndEvent


DEST_ActiveMagicEffectExt.psc:
Spoiler:  
Show

Scriptname DEST_ActiveMagicEffectExt Hidden

Function RegisterForSpellTomeReadEvent(ActiveMagicEffect akEffect) global native

Function UnregisterForSpellTomeReadEvent(ActiveMagicEffect akEffect) global native

Event OnSpellTomeRead(Book akBook, Spell akSpell, ObjectReference akContainer)
EndEvent


An example implementation is included in the download (DontEatSpellTomes.esp and DEST_PlayerSpellLearningScript.psc). It simply registers the Papyrus event and teaches the spell to the player like in vanilla, but it does not remove the book. However, the commented out code in the script shows how the book could still be removed if we wanted to.

Frequently Asked Questions
Q: The example is a functional mod, right? Why do you call it an example?
A: In short, it's not balanced. Keeping the spell tomes allows you to sell them back to merchants, so you can save money. It's a fine mod if you have self-control and only wish to keep your tomes around in a collection.