What exactly triggers Levers?
As the title suggests I've been playing the game and digging through the files, but so far failed to pinpoint the specific actions that assign values to futureLevers parameters in the save file.
The most elusive are the "lastfollower" and "lastbook".
My last playthrough I ended up with Valciane and the 3rd volume of The Locksmith's dream even though none of those were the last I obtained. For Valciane an argument could be made that she was the last follower I spoke to and healed after an injury, but the book is really out of place as it was not interacted with last in literally any possible way I can think of.
So the question is, if anyone has a good idea, what the triggers are or where in the files I could find the script which assigns them.