How to add Spells to Spell Vendors sale list

Post » Sat Feb 19, 2011 2:00 am

Can you tell me how to add a custom spell to a NPC Vendor's sale list in the Construction Set for Oblivion. I want to add it to Calindil of Mystic Emporium's sale list.
User avatar
Teghan Harris
 
Posts: 3370
Joined: Mon Mar 05, 2007 1:31 pm

Post » Sat Feb 19, 2011 2:22 am

Can you tell me how to add a custom spell to a NPC Vendor's sale list in the Construction Set for Oblivion. I want to add it to Calindil of Mystic Emporium's sale list.

The fastest way to do that would be to add it to his spell list, but that will create conflicts with other mods that do the same. The best way to do it is with a Quest script. To do that:

1. Make a quest.
Click on the Q icon above the Object Window (3rd icon from the right). Right click in the list and select 'new'. Give your quest a name (I'll use MySpellAddQuest01 for now). Set the priority to 1, click OK and close the window.

2. Make the Quest script.
Click on the pencil icon above the Object Window (farthest right icon). Click on Script and select 'New'. Click on the dropdown box that says 'Object' and select 'Quest'. Now pot this script in:

scn SpellAdd01ScriptBegin GameModeCalindilRef.addspell SpellIDStopQuest MySpellAddQuest01end


Save the script and close the script editor window. Now re-open the quest you made in step one and select the above script, click OK and close. That will add the spells to Calindil without creating conflicts with other mods. If you'd like to look at some mods that already do this, check out my http://www.tesnexus.com/downloads/file.php?id=27918, http://www.tesnexus.com/downloads/file.php?id=23411 and http://www.tesnexus.com/downloads/file.php?id=33828 mods. All three add spells to existing vendors in that manner.
User avatar
Chad Holloway
 
Posts: 3388
Joined: Wed Nov 21, 2007 5:21 am

Post » Fri Feb 18, 2011 10:40 pm

The fastest way to do that would be to add it to his spell list, but that will create conflicts with other mods that do the same. The best way to do it is with a Quest script. To do that:

1. Make a quest.
Click on the Q icon above the Object Window (3rd icon from the right). Right click in the list and select 'new'. Give your quest a name (I'll use MySpellAddQuest01 for now). Set the priority to 1, click OK and close the window.

2. Make the Quest script.
Click on the pencil icon above the Object Window (farthest right icon). Click on Script and select 'New'. Click on the dropdown box that says 'Object' and select 'Quest'. Now pot this script in:

scn SpellAdd01ScriptBegin GameModeCalindilRef.addspell SpellIDStopQuest MySpellAddQuest01end


Save the script and close the script editor window. Now re-open the quest you made in step one and select the above script, click OK and close. That will add the spells to Calindil without creating conflicts with other mods. If you'd like to look at some mods that already do this, check out my http://www.tesnexus.com/downloads/file.php?id=27918, http://www.tesnexus.com/downloads/file.php?id=23411 and http://www.tesnexus.com/downloads/file.php?id=33828 mods. All three add spells to existing vendors in that manner.


Thanks Vyper that helps a lot dude.
User avatar
Wayne Cole
 
Posts: 3369
Joined: Sat May 26, 2007 5:22 am

Post » Sat Feb 19, 2011 12:47 am

Thanks Vyper that helps a lot dude.

You're welcome. :D I'm glad I was able to help.
User avatar
dean Cutler
 
Posts: 3411
Joined: Wed Jul 18, 2007 7:29 am


Return to IV - Oblivion