elguapo1991 Posted July 4, 2014 Share Posted July 4, 2014 I'm trying to automatically add a custom perk to my character on game load. For some reason I can't get it to work at all. I'm a newbie at Papyrus so I'm sure i'm missing something simple but important. What I've done so far: - Created new quest. http://i.imgur.com/K9XKw6B.png - Added reference alias to the player for that quest. http://i.imgur.com/XDbr4Mg.png - Wrote script to check if player has perk already, if not give player perk. http://i.imgur.com/PpWKUpC.png - Attached script to player alias. http://i.imgur.com/epcSuhE.png The script doesn't even seem to run at all (the first message box never shows up. (I did compile all scripts and there were no failures). What do I need to fix to get this to work? Link to comment Share on other sites More sharing options...
Mattiewagg Posted July 4, 2014 Share Posted July 4, 2014 There is a note about OnPlayerGameLoad() on the Creation Kit Wiki and how it doesn't always work the first time. If you look at the second example on the OnPlayerGameLoad() page, it should show you what to do to make it call correctly. I believe you would replace the Maintenence function with a function that does what you want, and then call that function OnInit rather than the Maintenence function. Link to comment Share on other sites More sharing options...
Ceruulean Posted July 4, 2014 Share Posted July 4, 2014 Wait, don't you just check the "Run on Start Game Enabled" Checkbox under the quest data tab? Link to comment Share on other sites More sharing options...
Mattiewagg Posted July 4, 2014 Share Posted July 4, 2014 On 7/4/2014 at 3:21 AM, Ceruulean said: Wait, don't you just check the "Run on Start Game Enabled" Checkbox under the quest data tab? I had a look at the OnPlayerGameLoad function, and it looked like it doesn't always work the first time - in fact, it usually doesn't. So I'm not sure if that would fix it, but it seems like it wouldn't fix the "first time loaded" issue. Link to comment Share on other sites More sharing options...
lofgren Posted July 4, 2014 Share Posted July 4, 2014 If all you need to do is give yourself the perk, just put game.getplayer().addperk(theperk) in a startup stage of the quest, then shut the quest down. There's no need to run a script every time the game loads. Link to comment Share on other sites More sharing options...
EmeraldShadow Posted December 14, 2016 Share Posted December 14, 2016 I'm also trying to do this, but the links are dead. I would appreciate any help. Link to comment Share on other sites More sharing options...
Recommended Posts