Scripting a slight increase of skill OnRead event

Post » Wed Nov 30, 2016 3:49 am

I want to add a slight increase to the speechcraft skill whenever i read a book.


1) Besides adding a script to every book, is there a more efficient way to handle this? aside from hijacking a vanilla script?

(I'm using the bookcovers mod with the extension plugin that adds all the earlier TES books; so lots of books)




2) i'm a little confused on whether i should modify the base actor value or the current actor value; these aren't really explained well in the creationkit.com;


ideally i want a constant increment on every book that's read. so something like,


(site doesn't like my code; click on link)


http://pastebin.com/kDVMicS1




3) finally, how does the game handle doOnce out of local scope? is it like a static variable? i.e.,


will the game keep track of whether or not I've read a certain book by checking the variable? or does the psuedo-global / class level variable reset every time the game restarts?


for example:


int doOnce


Event OnRead

....

doOnce = 1

endEvent
User avatar
Sandeep Khatkar
 
Posts: 3364
Joined: Wed Jul 18, 2007 11:02 am

Return to V - Skyrim