Alright, continuing on from my last one, I have another question regarding Sugarcube! I'd like to make a system using Sugarcube that allows the player to access a "Character Sheet" passage from any point in the story, without having to worry about forgetting to write a "Character Sheet" link in every single passage (Which would also make my story map an absolute mess). How would I go about doing this?
As an bonus question, would there be any way for me to exclude certain passages from having the character sheet link? For instance, my story has a few passages dedicated to actually setting up the character, and they might run into problems if they attempt to access their character sheet -before- they've made their character, so how would I go about making sure that link only shows up after the player's confirmed their character, and then shows up in every passage after that?
Comments
1. There is a Special Passage named StoryMenu which can be used to add your own menu items to the side-bar. Create a StoryMenu passage and add a markup link like the following to it.
2. You can use a Boolean variable to track if you have finished creating the character or not, and then use that variable to determine if the Character Sheet link should be displayed or not.
2a. You can initialise the variable in another special passage named StoryInit, this is where you should initialise all the variables you plan to use in your story. 2b. You can use an <<if>> macro to check the current value of the variable, replace the markup link in step 1. with the following. 2c. Change the value of the variable to true in the first passage after the ones related to setting up the character, and the b]Character Sheet[/b] link should magically appear.
3. Potential Future question and answer:
If your Character Sheet is actually made up of a Parent passage and has markup links to one or more Child passages you will end up wanting to know how to return the reader directly to the last non-Character-Sheet related passage they were viewing.
This comment in the If statement, comparing previous() .... thread explains how to create a Return markup link that knows how to do return the reader to the last non-menu based passage.
Thank you as well, Claretta, though I do quite like the sidebar in the Sugarcube format so it's perfectly fine as it is. I was hoping I could get the link to the character sheet into the sidebar and the StoryMenu special passage has helped with that!