Thank you so much! I'm glad you enjoyed the twists and turns! The game mechanic is done using "persistent data," which is a type of scripting built into the game's engine, Ren'Py. I wrote a little bit about it in the game's behind-the-scenes document, but you can read about it in more detail in Ren'Py's documentation here. Hope this is what you're looking for, and thank you again for your comment! :)