Mod that instantly adds an itemspellpower...

Post » Thu Jun 20, 2013 2:04 pm

Hi,

I have created a minor mod - everything works fine until I want to add my spell by other means than a SpellTome. How can I make a mod add a spell to player when launched?

Thanks :)

User avatar
adam holden
 
Posts: 3339
Joined: Tue Jun 19, 2007 9:34 pm

Post » Thu Jun 20, 2013 9:01 am

You would need an activator to trigger a script that has a player.addspell xxxx command in it, xxxx being the formid of the spell or effect.

Not sure if you need the offset as the script resides in the mod it is calling the effect from.

User avatar
Shelby McDonald
 
Posts: 3497
Joined: Sat Jan 13, 2007 2:29 pm

Post » Thu Jun 20, 2013 7:16 am

Create a quest. Check start game enabled. Create a quest stage (right click and select new log entry or something like that for the papyrus fragment to work). Make sure that quest stage is checked to be the start up stage. In the papyrus fragment, enter a semicolon and hit OK to exit the quest window (this will generate your quest script). Go back to your script, edit the properties and add your spell/item/whatever. Then type your fragment and it should look something like

Game.GetPlayer().AddSpell(YourSpell)Stop()

When the game launches for the first time, the quest will launch, add all the spells/items in your script, and then close down when it's finished.

User avatar
Claire Lynham
 
Posts: 3432
Joined: Mon Feb 12, 2007 9:42 am

Post » Thu Jun 20, 2013 12:18 pm

Thanks for the quick reply.

I like both the ideas, but when I tried to realize the quest one, my Skyrim does not seem to add the quest to my quest list. It is not necessary to start a new game, is it?

User avatar
Maddy Paul
 
Posts: 3430
Joined: Wed Feb 14, 2007 4:20 pm

Post » Thu Jun 20, 2013 2:51 pm

You will need to generate an SEQ file before the quest will work - just one of CK's little oddities.

User avatar
Nick Swan
 
Posts: 3511
Joined: Sat Dec 01, 2007 1:34 pm

Post » Thu Jun 20, 2013 3:01 pm

Oh, thanks - hopefully it will work :) I'll let you know how it turns out

User avatar
Shirley BEltran
 
Posts: 3450
Joined: Wed Jul 26, 2006 4:14 pm


Return to V - Skyrim