Jump to content

How do I make spell tomes?


Kolagon

Recommended Posts

You will need a bit of scripting, to create or modify leveled lists and maybe create and add some containers in some cells, nothing very complicated.

 

To create tome spells, take a book matching your tastes, change its editor ID to whatever you want (preferably something including your nickname and in another language than english to decrease the risk of conflicts as much as possible). Replace the text.

 

Give it an object script like it:

 

ScriptName TheNameYouWantYourScriptToHave

 

Begin OnAdd Player

Activate

Player.addspell YourSpellEditorID

Endif

End

Link to comment
Share on other sites

With OBSE, it should also be possible to use one single script for all the tomes. One simple way to do it would probably be something like this (assuming the script runs on the book ref):

scriptname SomeSpellTomeScriptWithYourPrefix

ref Container
ref BaseObject

begin _OnEquip ; no actor limits - will run on every actor
    let Container := GetContainer ; returns the container the tome is in
    if eval !( Container.IsActor )
        return ; do nothing if equipped on something other than an actor (if at all possible)
    endif
    let BaseObject := GetBaseObject ; get the base object for this tome
    if ( BaseObject == YourFirstCustomSpellTomeObject ) ; if the tome is FirstTome...
        Container.AddSpell YourFirstCustomSpell ; ...then add FirstSpell
    elseif ( BaseObject == YourSecondCustomSpellTomeObject ) ; if the tome is SecondTome...
        Container.AddSpell YourSecondCustomSpell ; ...then add SecondSpell
    elseif ( BaseObject == YourThirdCustomSpellTomeObject ) ; ...
        Container.AddSpell YourThirdCustomSpell
    endif
end

But that one only works if GetBaseObject returns the base object of the spell tome. And it only makes sense to use that if someone wants to stuff everything in one script as opposed to writing one script for each tome. I have not tested that, either, so it really is just an idea. Maybe one day if you get that far in scripting, you could consider something like that.

 

The CS wiki can probably help you, at least the following pages I think:

http://cs.elderscrolls.com/index.php?title=List_of_Functions

http://cs.elderscrolls.com/index.php?title=OnEquip

http://cs.elderscrolls.com/index.php?title=AddSpell

 

Hopefully that helps a bit.

 

For adding to leveled lists, you could use the Construction Set itself. OBSE offers commands to add items to leveled lists, but making it work in a reasonable manner requires some scripting work. Adding the items to leveled lists in the Construction Set should be enough, assuming the people using your mod will be rebuild their Bashed Patches after adding your mod. You can check the Bashed Patch.esp with TES4Edit after rebuilding it to see if your leveled items were included in it. Actual in-game changes to vendor inventories and all that probably take some time, but I have no idea really. I mostly do scripting and the like. :blush:

Link to comment
Share on other sites

Oh jeeze, this sounds complicated. Basically, I recreated a lot of Skyrim's Destruction spells into Oblivion minus the Rune/Spray spells, nothing overwritten though. I might just add them to a merchant and let players buy them from said-merchant, I know they'll have a lot of fun, especially the Master spells that reachs up to 35 feet via exploding touch spells.

Edited by Kolagon
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...