How can I auto create passages based on the name of it's root passage?

If you are requesting technical assistance with Twine, please specify:
Twine Version:2.4
Story Format: Sugarcube

I am trying to auto create a bunch of passages based on the name of the source passage. E.g. 
rootnameofpassage Hotel
rootnameofpassage Prison
rootnameofpassage Bank

Where rootname could be the name of a town. Each Hotel, Prison and Bank in each town has something different to offer.

The only way I know of to auto-create passages is to write a link inside a passage like [[Hotel|rootnameofpassage-hotel]] and that will create a link out to a passage called “rootnameofpassage-hotel”.

If you create all those links in the passage, you’ll have the next passages created for you.

1 Like

I sometimes use the fill handle in Excel or LibreOffice Calc to generate text.

If you highlight several cells and drag the black handle, it will repeat the pattern.


Then you can copy the cells into a notepad document. In notepad, use “find and replace” to replace the tab separators with spaces.

Finally, copy and paste the text into a Twine passage, and the program will offer to create the passages (as @HanonO noted).

1 Like