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:
[[Passage Links]]
=> Passage Links (turn to 6)
[[display text->Passage Link]]
=> display text (turn to 6)
[[Passage Link<-display text]]
=> display text (turn to 6)
[[->Passage Link]]
=> (turn to 6)
[[Passage Link<-]]
=> (turn to 6)
[[#->Passage Link]]
=> 6
[[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!
See Tweego's Documentation for more information.
Formats
link in the Twine 2 sidebar.Add a New Format
tab.format.js
file, based upon the path from step #2, into the textbox and click the +Add
button.