Help with an auto-generating branching story outline

Twine Version: 2.3.14
Story Format: Sugarcube 2.34.1

Hey guys! Was wondering if you had any suggestions for this. I’m still fairly new to Twine and extremely noobish when it comes to coding.

Currently I’m working on a project that is just a static choose your own adventure story. No fancy mechanics or anything just a branching path story. The kind of stuff you’d find on places like writing.com in their interactive section.

The main reason i started making it is BECAUSE Writing.com became an absolute dumpster fire. But one major feature their website had that was really nice and helpful was a story chapter map that was auto-generated by the site that made it easy for people to be able to navigate longer threads and hop to the place they wanted to go. It looks something like this

I couldn’t immediately find anything when i looked but feel like I can’t be the only one that’s wanted something like this and wondered if anyone knows of a pre-existing, publicly available code that does something like this, or if someone might be able to suggest a way that a newer user might be able to implement it. If its not possible or too hard for someone of my current skill level I wont be surprised, lol.

Basically all i want it to do is be something that can auto-generate links as new passages are added and title the links automatically by the title of that passage chapter, and organize them into an expanding list like shown in the image. (as well as a way to exclude certain passages from being auto generated into this so it doesn’t try to put stuff like StoryMenu or StoryInit in the auto-generated outline)

Thoughts?

edit: Whoops, didnt mean to do that box lol

Please don’t put your post’s text in a code block like that. It kills the line wrapping and it looks like it broke your image link as well.

Unfortunately, without the image link, it’s hard to tell what you’re looking for.

Please edit your post so we can read it properly.

Thank you! :slight_smile:

Whoop my bad lol. somehow i didn’t even notice i did that on accident XD

You can add the bookmark tag to any passage. It will make a Jump to button appear in the UIBar, between the back and forward arrows. As soon as the reader has advanced further than such a tagged passage, the Jump to button will allow to go back to any already read bookmarked passage.
However I do not know any automated way to show the whole structure as your image shows. You’d probably have to make it all by yourself.

Thats actually helpful, if not for this situation in particular at least in general to know! I honestly hadn’t yet figured out how exactly tags worked, haha.

Which gives me an alternate idea.

is there a way to do something similar to that, but let the user set the bookmarks?

I know there’s the save function they can use, obviously. But that undoes everything back to the point they saved.

would there be a way to set it so that the user, as they’re playing the game can set those tag kind of bookmarks themselves? so instead of the bookmark button between the back/forward letting them go to the passages >I< tagged on the backend, it lets THEM choose what passages get bookmarked as they go thru them? That way they can make their own quick-nav menu, basically, as they’re going?

I’m not sure if I’m explaining that right. does that make sense?

I haven’t tested it, so here’s an idea.
In StoryInit you may create an array. In each passage you may present a button to add the name of the passage as a member of the array. In the UI side bar you may set a link to any member of the array with the StoryCaption passage.
However it would teleport the player character in the state it currently is back in the past.