ElderOfScrolls Posted January 27, 2015 Share Posted January 27, 2015 (edited) I am working on creating a mod that, when you kill a dragon and absorb the dragon soul, one of your 3 stats are increased. I want to make an option menu pop up and you select Health Magicka Stamina and it is permanently increased by some number. My idea was that when you absorb a dragons soul your own dragon soul should become stronger. I have never done any successful scripting so I figured while I research how to make this I would put it out there and see if anyone has a link to a tutorial or some advice of their own. Currently looking into heromaster's stepsandLooking for the script that opens up the stat leveling option menu when your character levels up. T3ndo directed me to http://www.creationkit.com/UI_Script so I am trying to figure out how to understand and use these Dragon souls can be catched by the OnTrackedStatsEvent. The stat you are looking for is 'Dragon Souls Collected'.You don't need to change any base record from the vanilla game.Set up a quest, create an alias preferable the player, add a script and create an Event OnTrackedStatsEvent(string asStat, int aiStatValue).And why would you need a token for? This is not Fallout 3(:New Vegas) or Oblivion :wink: Right now I have a custom "blank" quest with a "blank" script and an alias with the playerRef. Looking through stuff I think I need to make my script in the alias not the quest, is this correct? I'm not really understanding how the quest alias system works, does anyone know of a good tutorial for activating scripts using a quest? Current Script Function SomeFunction() RegisterForTrackedStatsEvent() ; Before we can use OnTrackedStatsEvent we must register. ; Is this something that is needed for this or is it just for the tutorial purposes? Will something need to go in the "()" in the first 2 lines?EndFunctionEvent OnTrackedStatsEvent(string asStatFilter, int aiStatValue) if (asStatFilter == "Dragon Souls Collected") if (aiStatValue == 50) ; I think this 50 will become something like "player value + 1" I'm not sure about this part Debug.Trace("Player has bartered 50 times.") ; I believe this is where I will have my option menu lines endif endifendEvent Thank you in advance for any help. Edited February 1, 2015 by ElderOfScrolls Link to comment Share on other sites More sharing options...
cdcooley Posted January 27, 2015 Share Posted January 27, 2015 Try OnTrackedStatsEvent since dragon souls absorbed is one of the stats it reports. Create a quest script, register for tracked stats and in that event if it's a dragon soul event show your menu. Link to comment Share on other sites More sharing options...
ElderOfScrolls Posted January 27, 2015 Author Share Posted January 27, 2015 Try OnTrackedStatsEvent since dragon souls absorbed is one of the stats it reports. Create a quest script, register for tracked stats and in that event if it's a dragon soul event show your menu.How does the OnTrackedStatsEvent work? Does it simply report when a stat changes? Would it be affected by spending dragon souls or does it only count when a stat is increased? Link to comment Share on other sites More sharing options...
cdcooley Posted January 27, 2015 Share Posted January 27, 2015 I haven't tried it but I'm pretty sure it gets called when any of the stats that you can find displayed on the system menu. You would have to test it to be sure though. Link to comment Share on other sites More sharing options...
ElderOfScrolls Posted January 28, 2015 Author Share Posted January 28, 2015 I haven't tried it but I'm pretty sure it gets called when any of the stats that you can find displayed on the system menu. You would have to test it to be sure though.Thank you very much. I will keep this in mind when I'm working on my script. From what I've learned from my own research I think you are on target with this event. I will definitely have to test it but I think that's the one. Link to comment Share on other sites More sharing options...
lofgren Posted January 28, 2015 Share Posted January 28, 2015 Most stat increases do not actually trigger that event, unfortunately. I have no idea if dragon souls is one of the ones that works but just be aware it is not as reliable as one might assume. Link to comment Share on other sites More sharing options...
ElderOfScrolls Posted January 28, 2015 Author Share Posted January 28, 2015 I am considering simply adding an option menu script to the MQKillDragon quest. Would that cause any major issues with the game or mod compatibility? Link to comment Share on other sites More sharing options...
heromaster Posted January 29, 2015 Share Posted January 29, 2015 Dragon souls can be catched by the OnTrackedStatsEvent. The stat you are looking for is 'Dragon Souls Collected'. You don't need to change any base record from the vanilla game. Set up a quest, create an alias preferable the player, add a script and create an Event OnTrackedStatsEvent(string asStat, int aiStatValue). And why would you need a token for? This is not Fallout 3(:New Vegas) or Oblivion :wink: Link to comment Share on other sites More sharing options...
Terra Nova Posted January 29, 2015 Share Posted January 29, 2015 (edited) I am considering simply adding an option menu script to the MQKillDragon quest. Would that cause any major issues with the game or mod compatibility?It would probably conflict with the USKP. Edited January 29, 2015 by Terra Nova Link to comment Share on other sites More sharing options...
ElderOfScrolls Posted January 29, 2015 Author Share Posted January 29, 2015 (edited) Dragon souls can be catched by the OnTrackedStatsEvent. The stat you are looking for is 'Dragon Souls Collected'. You don't need to change any base record from the vanilla game. Set up a quest, create an alias preferable the player, add a script and create an Event OnTrackedStatsEvent(string asStat, int aiStatValue). And why would you need a token for? This is not Fallout 3(:New Vegas) or Oblivion :wink: Great thank you for your input. The token was part of the stuff that was on the creation kit wiki. I was looking at that when I posted this. What do you mean by creating an alias "preferable (to) the player"? Would the script go in the alias or the quest? Will the OnTrackedStatsEvent also take into account when a dragon soul is spent? I only want this option menu to open up after killing dragon and obtaining the soul. Edited January 29, 2015 by ElderOfScrolls Link to comment Share on other sites More sharing options...
Recommended Posts