Cristobot Posted December 23, 2020 Posted December 23, 2020 I've seen this done with Relationship Dialogue Overhaul, Amazing Follower Tweaks, Better Vampires, and many others... I want to have a spell added to the player's spell list when the mod loads. (I think I need a quest? But I'm not quite sure how to do this.) I have the Magic Effect and Spell created, but how can I automatically add it to the Player inventory? If there is a reference on this somewhere please point me to it. Thanks in advance!
maxarturo Posted December 23, 2020 Posted December 23, 2020 https://www.creationkit.com/index.php?title=OnPlayerLoadGame_-_Actorhttps://www.creationkit.com/index.php?title=OnInithttps://www.creationkit.com/index.php?title=AddSpell_-_Actor * I don't know how the mods you mentioned work, i've never looked at them and some i don't know them. Merry christmas.
dylbill Posted December 23, 2020 Posted December 23, 2020 How I do it, is put a script on a new quest that's start game enabled. Scriptname MyInitScript extends Quest Actor Property PlayerRef Auto Spell Property MySpell Auto Event OnInit() Utility.Wait(1) PlayerRef.AddSpell(MySpell) Utility.Wait(1) self.Stop() ;stops this quest EndEventName the script something more unique. Happy Modding!
Cristobot Posted December 23, 2020 Author Posted December 23, 2020 On 12/23/2020 at 5:29 PM, dylbill said: How I do it, is put a script on a new quest that's start game enabled. Scriptname MyInitScript extends Quest Actor Property PlayerRef Auto Spell Property MySpell Auto Event OnInit() Utility.Wait(1) PlayerRef.AddSpell(MySpell) Utility.Wait(1) self.Stop() ;stops this quest EndEventName the script something more unique. Happy Modding! I did as instructed and this worked in running on loading my mod! However, it didn't add my spell?Is anything wrong with this? Scriptname crbtAddEditNPCSpell extends Quest {Automatically adds spell on mod load} Actor Property PlayerRef Auto Spell Property crbtEditNPCInfo Auto Event OnInit() Utility.Wait(1) PlayerRef.AddSpell(crbtEditNPCInfo) Utility.Wait(1) self.Stop() ; stops this quest debug.messageBox("Added Edit NPC Info to Illusion list") EndEvent
dylbill Posted December 23, 2020 Posted December 23, 2020 Make sure you filled your properties. After attaching the script, click on properties and Auto Fill All, if your properties are named the same in the script as in the creation kit, they should be automatically filled.
Cristobot Posted December 23, 2020 Author Posted December 23, 2020 Thanks!It was my properties! Learning everyday!
Recommended Posts