Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Is there a way (that isn't manual) to link to every passage title?

I have a large Twine game, like 560 passages or something, and I'd like to create a list containing links to every passage on a single passage.

Is there a shortcut to doing this so I don't have to manually create links to each passage? I'm thinking of trying to figure out a script to extracting all the titles with Python, but I'm hoping for something simpler than that.

Thanks!

Comments

  • You need to state which Story Format you are using when you ask a question, as answers can be different for each one.

    a. SugarCube 1.x and 2.x:
    Passage List:
    <<for $i to 0, $keys to Object.keys(tale.passages); $i lt $keys.length; $i++>>\
    	<<set $title to tale.passages[$keys[$i]].title>>\
    	<<if not ($title is passage())>>\
    		<<print '[[' + $title + ']]'>>
    	<</if>>\
    <</for>>\
    <<unset $title>>
    <<unset $keys>>
    <<unset $i>>
    

    b. Harlowe and Snowman 2:
    Not that I know of.
  • If you're using Harlowe and you do end up wanting to scrape passage names out of your story file using a script, I've got an in-progress set of Python scripts that read and parse Harlowe story files.
Sign In or Register to comment.