A StoryFormat for Twine for Print viable Interactive Fiction.
Primitive allows authors to read paper-ready Interactive Fiction stories, while being able to keep track of player choices.
Primtive allows you to test and export your Twine story by clicking the extremely prominent Test HTML
, Export HTML
, and Export EPUB
buttons.
Once the Primitive StoryFormat is installed, you must tag a passage with the Start
special tag:
:: First Story Passage [start]
This should be your first story passage that occurs after the introduction of your story. This will allow Primitive to use this passage to begin crawling through all passages that are able to be reached from this first passage.
If you want to use NBSV (nullable boolean state variables) im your story, you will need to initial them in a :: StoryVariables
special passage. Simply place one variable per line.
:: StoryVariables
VariableOne
VariableTwo
SpecialMonkeyVariable
All variable start as null
. Be sure to <<set>>
your variables to your deserible value in your first passage if you want them to begin as a different value.
WIP: Need to reintegrate.
You can link from one passage to another with the following syntax:
- a)
[[Passage Links]]
=>Passage Links (turn to 6)
- b)
[[display text->Passage Link]]
=>display text (turn to 6)
- c)
[[Passage Link<-display text]]
=>display text (turn to 6)
- d)
[[->Passage Link]]
=>(turn to 6)
- e)
[[Passage Link<-]]
=>(turn to 6)
- e)
[[#->Passage Link]]
=>6
- g)
[[Passage Link<-#]]
=>6
WIP: Currently putting title instead of passage number.
You can make your own passage title by assigning a link-affixes
in your :: StoryConfig
:
:: StoryConfig
{
"link-affixes" : {
"turnto": "Turn to %n"
}
}
The key
, in this case, turnto
sets the code that you write into your passages. Primitive will turn the code into a custom passage link, replacing it with Turn to Passage 23
.
WIP: Need to ascertain <<set>>
within control flow macros.
You can <<set>>
your variables to change them from their previous value to their new value. You may assign a value of true
, false
, or null
, to your NBSV.
:: ExamplePassage
<<set SpecialMonkeyVariable true>>
<<set VariableTwo null>>
<<Set VariableOne false>>
WIP: Need to ascertain <<unset>>
within control flow macros.
You may also <<unset>>
your variable to change it to null
.
:: ExamplePassage
<<unset SpecialMonkeyVariable>>
You can use several control macros along with your variables to control which text to display in your passages.
For example:
:: Example Passage
Testing text5 - else if:
<<if truevar>>
Base True.
<<elseif anothervar>>
Else if true.
<<else>>
Nothing was true.
<<endif>>
Postendif text.
This passage will automatically split into multiple passages on generation:
:: Generated Example Passage One [truevar true]
Testing text5 - else if:
Base True.
Postendif text.
:: Example Passage Passage Two [truevar false, anothervar true]
Testing text5 - else if:
Else if true.
Postendif text.
:: Example Passage Three [truevar false, anothervar false]
Testing text5 - else if:
Nothing was true.
Postendif text.
Based on the variables that have been set, Primitive will automatically send the reader to the correct version of the passage! This is the whole point of Primitive!
Local Install for Tweego
See Tweego's Documentation for more information.
Local Install for Twine 2.x
- Download the current version of Primitive from the Releases.
- Extract the archive to a safe location on your computer and make note of the path to it. Make sure to keep the files together if you move them out of the included directory.
- Launch Twine 2.x.
- Click on the
Formats
link in the Twine 2 sidebar. - In the dialog that opens, click on the
Add a New Format
tab. - Finally, paste a file URL to the
format.js
file, based upon the path from step #2, into the textbox and click the+Add
button.
- To Hituro for guidance, suggestions, ambition, and more in the creation of Primitive.
- To Sophie Houlden's WritingFantasy StoryFormat for inspiring this StoryFormat and the boundaries of this StoryFormat.
- To TME for specific help in regards to creating any StoryFormat, and as well as in the creation of Primitive.
- To Greyelf for guidance in the creation of Primitive.
- To MCD for guidance in the creation of Primitive.
- A special thank you to TME for creating Tweego, which provides a CLI for authors to compile Twee documents.
- To TME's SugarCube StoryFormat for inspiration on Macros.
- And to the Twine Specifications for specificational reasons.