Jump to content

CK How to check whether the player has a specific active effect or not?


Recommended Posts

Also for the purpose of knowledge I'll explain why the save was the problem. The script object while active is essentially baked into the save. You're able to change the script and have those changes take effect, but if you add new properties and fill them, those changes won't work on the save. Unless you manually set the properties via script, or the object resets (like stopping and starting a quest back up).

 

You'll find in your script logs that when it was calling GetValue and SetValue, a papyrus error was generating advising that the object your calling is a none value.

 

Edit

 

Pro tip for script developers. Have the Papyrus log file open when running the game to test. The file that represents the current/most recent game launch is Papyrus.0

 

I recommend a program like MTail to keep it open, and when you're testing in-game you'll see any papyrus errors from your script in real-time. Also handy to have debug.trace calls, since those don't get delayed like debug.notification.

 

Can confirm. I was noticing errors being thrown any time I removed a variable from a script, Papyrus complained about that. Best to clean up unneeded variables once a mod complete.

Link to comment
Share on other sites

Also for the purpose of knowledge I'll explain why the save was the problem. The script object while active is essentially baked into the save. You're able to change the script and have those changes take effect, but if you add new properties and fill them, those changes won't work on the save. Unless you manually set the properties via script, or the object resets (like stopping and starting a quest back up).

 

You'll find in your script logs that when it was calling GetValue and SetValue, a papyrus error was generating advising that the object your calling is a none value.

 

Edit

 

Pro tip for script developers. Have the Papyrus log file open when running the game to test. The file that represents the current/most recent game launch is Papyrus.0

 

I recommend a program like MTail to keep it open, and when you're testing in-game you'll see any papyrus errors from your script in real-time. Also handy to have debug.trace calls, since those don't get delayed like debug.notification.

Tks guys, you guys have been most helpful, I'll make sure to remember that in the future. I've also edited the ini file to make the game keep papyrus logs. In regards to cleaning saves, should I use Fallrim Tools then?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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