Oblivionaddicted Posted February 22, 2017 Share Posted February 22, 2017 What looks complicated? You can hardly make a shorter script and easier to reproduce. To create the spells go in the magic menu, set your spell as a greater, lesser power or spell http://uesp.net/wiki/Oblivion:Magic_Overview Open the merchant's inventory (choose one who sells spells in the vanilla game or create one) drag and drop the spells in his inventory. Link to comment Share on other sites More sharing options...
Kolagon Posted February 23, 2017 Author Share Posted February 23, 2017 (edited) Uh... You mean spell list, I can't drag the spell into his inventory until I turn all of the 15 custom spells into tomes. And yes, it looks complicated to me as I don't understand it. Edited February 23, 2017 by Kolagon Link to comment Share on other sites More sharing options...
Surilindur Posted February 23, 2017 Share Posted February 23, 2017 If I remember correctly, it should be possible to open the "spells" tab of an NPC (base object) and drag-and-drop the spells/powers into that one, the same way as you can drag-and-drop perks/abilities to NPCs. If that helps. I think there was a spells tab somewhere... but I could be wrong, would not be the first time. :blush: As for whether an NPC will sell those spells... maybe. When I made a spell merchant (I suppose one can call them like that... :P), the NPC had to have a special class or something, or some flags ticked in his/her AI properties (the AI button in the NPC edit window) for any spells to appear for sale. Just like normal merchants. If you use an already existing NPC then there should not be any issues, at least in theory. And to elaborate on the Spell Tome script: you can just use one script for each tome. For example if you had two spells:YourPrefixSpellFastHealingYourPrefixSpellHealingHandsAnd two spell tomes:YourPrefixTomeFastHealingYourPrefixTomeHealingHandsWithout the use of OBSE, you could make one script for each tome (an object script would be the script type in the Construction Set script editor). I think a script with OnEquip block runs on the item itself and not the actor on which the item was equipped. In that case, you could use GetContainer to get the current container (the actor) and add the spell to that one (checking if the actor has the spell does not seem to be easy without OBSE). For the first tome maybe something like this: scriptname YourPrefixTomeFastHealingScript ; you can use a semicolon to write comments ; script for the fast healing spell tome ; this is a reference variable that points at game object/reference ref Container ; this is an OnEquip script block that runs when this item (the item this script ; is attached to) is equipped on something begin OnEquip ; GetContainer should return the current container, as in, the thing that has this ; item in its inventory - in this case, the actor that this was equipped on set Container to GetContainer ; AddSpell adds the spell to the actor Container.AddSpell YourPrefixSpellFastHealing ; the "end" defines the end of this script block endAnd for the second tome: scriptname YourPrefixTomeHealingHandsScript ; script for the healing hands spell tome ref Container begin OnEquip set Container to GetContainer Container.AddSpell YourPrefixSpellHealingHands endI have not tested those, but maybe they can give you an idea of how to go about trying to make the tomes happen. Hopefully that helps a bit. :thumbsup: Link to comment Share on other sites More sharing options...
Kolagon Posted February 23, 2017 Author Share Posted February 23, 2017 When you explained how to put the spell on the merchant, it did help, but when you went to explain how to turn it into a spell dome, I only ended up confused. What exactly am I suppose to edit or type in there?? I really don't get it... Link to comment Share on other sites More sharing options...
Surilindur Posted February 24, 2017 Share Posted February 24, 2017 If you have the spell and the corresponding spell tome item (a book, for example), you would need to create a new object script, add the necessary things in it, and attach the script to the book item. There should be plenty of items with scripts attached to them in the base game for reference. For example if you can find a book that, when opened, advances a quest, you could copy-paste the contents of the script on that book to your own script and change the quest advancement lines to lines that add the spell to whoever has equipped your book. The things above are examples of what a script attached to a spell tome could look like. They are identical, except for the comments in the first one, and different name as well as the spell to add. There shold be some sort of scripting tutorials in the Construction Set wiki somewhere, I think. At least some sort of scripting tutorials. Link to comment Share on other sites More sharing options...
Estevan14 Posted April 24, 2020 Share Posted April 24, 2020 (edited) nevermind Edited April 25, 2020 by Estevan14 Link to comment Share on other sites More sharing options...
Recommended Posts