Holzey Posted April 22, 2021 Share Posted April 22, 2021 Hello, i am making a mod with spells and i am trying to put the spell books into the players inventory but I dont know how to, I have looked around but i cant seem to find an answer Link to comment Share on other sites More sharing options...
dylbill Posted April 22, 2021 Share Posted April 22, 2021 What I usually do is make a new quest that's start game enabled. Then you can put a script on the quest that adds items when the mod is installed: Scriptname TM_QuestScript extends Quest Book Property SpellBookA Auto Book Property SpellBookB Auto Actor Property PlayerRef Auto Event OnInit() Utility.Wait(1) PlayerRef.AddItem(SpellBookA, 1) PlayerRef.AddItem(SpellBookB, 1) Self.Stop() ;Stop this quest. EndEventIf you have a lot of books or items to add, you can use a formlist instead. Make a new one in the creation kit under miscellaneous / formlists, then drag and drop the items you want to add into the list. The script would look like this: Scriptname TM_QuestScript extends Quest Formlist Property InstallItems Auto Actor Property PlayerRef Auto Event OnInit() Utility.Wait(1) PlayerRef.AddItem(InstallItems, 1) ;add 1 of each item in the InstallItems formlist to the player Self.Stop() ;Stop this quest. EndEventName the script something more unique. After compiling and attaching the script to your quest, make sure you fill your properties. If you're a beginner in scripting this is a good tutorial: http://www.cipscis.com/skyrim/tutorials/beginners.aspx Also to find more about script properties you can go here: http://tesalliance.org/forums/index.php?/topic/5039-class-2-properties/ Link to comment Share on other sites More sharing options...
IsharaMeradin Posted April 23, 2021 Share Posted April 23, 2021 There is a script free way of adding items to the player inventory. Create a quest. Add an alias pointing to the player. Add the items to the inventory section of the alias. When the quest is started the items will be added to the player's inventory. Sometimes it is not feasible to do it this way, but it is still a good idea to know that it is possible and how to do it. Link to comment Share on other sites More sharing options...
Recommended Posts