Alright, I've got about 6 years worth of rust on my scripting skills.
I think I know how to do what I want, but I'd like a second opinion(or ten) on whether I'm going in the right direction or even possibly overcomplicating it.
So what I'm trying to accomplish is a cell phone item. When that item is used it directs the player to a home page for the phone. From there they can access various contacts with npcs they have met in the game. From those contacts they can then view text message convos that have happened previously in the game or attempt to call the npc.
What I've done so far is base the phone script off the codex script(Only difference is the iscodex variable is isphone in my script). I have that functioning properly. So the player can access the phone, use it, then return to the story exactly where they were no problem. I've also got the script working to show contacts for what npcs the player has met and hide the ones they haven't.
What I need an opinion on going forward is the two scripts for calling the NPCs and reading the past text messages.
My idea for the phone call script is to keep the actual phone call conversation within the "codex" so that it does not effect the player's place in the game. I'd set up a variable for each NPC that can be tripped from 0 to 1 if the player is located on a page where I want them to be capable of calling a certain npc to trigger an interaction with that NPC. The script would also read which page the player is on to calculate which interaction it sends them to. I can do that simply enough, but I want to make sure I'm being efficient.
Now for the one where I know I'm not being efficient. The previous text message conversations. I don't plan on having a ton of them in the story, but I do want to have a dialogue system so that the conversations are based on player choice. And I need the text messages to show up in the correct order and the correct choice of dialogue the player went with. I know how to do it in theory, but the way I know to make it work involves an unholy amount of variables. Literally a variable for every text to account for which option the player chose. Then script the page to show the correct text based on those variables. I'm willing to do that, but if anyone knows a simpler way you'll be my hero for all of eternity.
(If anyone wants to have a look at how it works I set up a storygame just for script testing that I'd be happy to show if you let me know. I just haven't finished the scripting for some of it yet)