dwiss Posted March 30, 2013 Share Posted March 30, 2013 As i am a bit at wits end here i have to post the question and hope for an answer: Is it possible via the normal papyrus scripting/skse scripting to store information about how often something has been done by the player character? like reading books, visiting certain places etc? I am not talking about a single session here but throughout the life time of a char. I would need a functionality like this for my mod but i am not certain if that can be done at all. Thank you in advance for any pointers for this Link to comment Share on other sites More sharing options...
GrimyBunyip Posted March 30, 2013 Share Posted March 30, 2013 As i am a bit at wits end here i have to post the question and hope for an answer: Is it possible via the normal papyrus scripting/skse scripting to store information about how often something has been done by the player character? like reading books, visiting certain places etc? I am not talking about a single session here but throughout the life time of a char. I would need a functionality like this for my mod but i am not certain if that can be done at all. Thank you in advance for any pointers for thisit's possible to record data. It's just a matter of figuring out how to set up events to detect when you enter a new location or read a book. for books there is something called:http://www.creationkit.com/OnRead_-_ObjectReferencebut the problem is you'd need to attach this script to every book in the game, is either tedious and prone to compatibility issues, or you'd need to use skyproc. For entering a new location:http://www.creationkit.com/OnLocationChange_-_Actorthat will run each time you enter a new location, telling you where you were and where you are now.so that should be fairly straightforward. Ideally you should attach this script via a quest, as opposed to directly attaching it to the player, to avoid compatibility issues. Link to comment Share on other sites More sharing options...
dwiss Posted March 30, 2013 Author Share Posted March 30, 2013 (edited) You are my savior Grimy - i think you just pointed me to the right direction. In my specific case the book part is the more important step 1 actually. But i do believe there must be an easier way actually as i just remembered that there is a status actually counting already which i totally forgot about. Now i just have to find out how to grab that value - its the one in 'General stats' when you call up the system menu i was thinking of.Would that be GetPCmiscstat or something like that? Edited March 30, 2013 by dwiss Link to comment Share on other sites More sharing options...
GrimyBunyip Posted March 30, 2013 Share Posted March 30, 2013 (edited) You are my savior Grimy - i think you just pointed me to the right direction. In my specific case the book part is the more important step 1 actually. But i do believe there must be an easier way actually as i just remembered that there is a status actually counting already which i totally forgot about. Now i just have to find out how to grab that value - its the one in 'General stats' when you call up the system menu i was thinking of.Would that be GetPCmiscstat or something like that?getpcmiscstat is a console command.I'm not 100% sure how you'd use that through a papyrus script.there isn't a global variable for books read either. so *shrug* Edited March 30, 2013 by GrimyBunyip Link to comment Share on other sites More sharing options...
dwiss Posted March 30, 2013 Author Share Posted March 30, 2013 I found the solution - and its not even as complicated as i thought originally. Would be something like this : if (Game.QueryStat("Books read") == 5) then ... I was looking at the wrong places - this is a part of the game-script which i totally overlooked earlier. So the value is already stored in a variable that i can use and set triggers on etc Link to comment Share on other sites More sharing options...
GrimyBunyip Posted March 30, 2013 Share Posted March 30, 2013 I found the solution - and its not even as complicated as i thought originally. Would be something like this : if (Game.QueryStat("Books read") == 5) then ... I was looking at the wrong places - this is a part of the game-script which i totally overlooked earlier. So the value is already stored in a variable that i can use and set triggers on etcCool, I didn't know it was a game script.I figured it would have been under debug since it was also a console code. the more you know right? :P Link to comment Share on other sites More sharing options...
dwiss Posted March 30, 2013 Author Share Posted March 30, 2013 Wouldnt have searched there without your pointer though - so kudos from me! My entire framework just became soooo much easier - yeah Link to comment Share on other sites More sharing options...
dwiss Posted March 30, 2013 Author Share Posted March 30, 2013 I just looked at your mods list - your tweaker mod looks great - going to test that right away! Link to comment Share on other sites More sharing options...
Recommended Posts