Jump to content

script guru required for a stupid question


dwiss

Recommended Posts

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

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

it'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_-_ObjectReference

but 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_-_Actor

that 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

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 by dwiss
Link to comment
Share on other sites

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 by GrimyBunyip
Link to comment
Share on other sites

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

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

Cool, 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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...