Interactive Fiction Story Builder
Plan a choose-your-path story as boxes and arrows, add variables like courage or gold, then hand readers a single HTML file they can play anywhere.
ทำงานในเบราว์เซอร์ของคุณ ไฟล์ไม่ออกจากอุปกรณ์ ดูวิธีตรวจสอบ
…
วิธีทำ
- 1Name the story
Type the title and pick the start passage from the list.
- 2Add passages
Press + Passage, give it a name in the Name box and write the text.
- 3Connect them
Press + Link or type double square brackets around a target name; Create missing builds absent targets.
- 4Add state
Use + Set and + If / else to insert variable macros, then edit their names and values.
- 5Play-test
Press Play from start or Play from here and watch the Variables panel while you choose.
- 6Export
Download Playable HTML for readers, or Twee 3 and the Twine 2 archive for other tools.
เกี่ยวกับเครื่องมือนี้
Interactive fiction splits a story into passages and lets the reader choose which one comes next. Twine made this style popular because the author sees the whole story as a map: every passage is a box and every choice is an arrow. This builder works the same way inside your browser. Each passage has a name, tags and text. Inside the text you write links in double square brackets, either as the plain name of the next passage or as shown words followed by a vertical bar and the target name. The map draws an arrow for each link, colours the start passage with a green edge, outlines passages whose links point nowhere in red and fades passages that cannot be reached from the start. You can drag boxes into a tidy layout on a computer or a phone, or use the arrow buttons to nudge the selected one. Stories become more interesting once they remember things, so the editor understands a compact set of Harlowe-style macros: set a variable, test it with if, else-if and else, print a value, roll a random number, and check which passages the reader has already visited. A play-test panel runs the story right next to the editor and shows the current value of every variable after each passage, which makes it easy to find the choice that breaks a puzzle.
Macros you can use
- (set: $gold to 10) stores a value; (set: $gold to $gold - 2) changes it. Numbers, text in quotes, true and false are allowed. - (if: $gold is 10)[shown text] runs a hook only when the test passes. Chain (else-if: ...)[...] and (else:)[...] straight after it, or use (unless: ...)[...]. - Comparisons: is, is not, less and greater signs, plus and, or, not and contains. Arithmetic uses plus, minus, star and slash. - $gold on its own prints the value; (print: $gold * 2) prints a calculation. - (random: 1, 6) gives a whole number between the two limits, visits counts how often the current passage has been seen, and (history:) contains "Cellar" checks the path so far. - Two single quotes around words make them bold and two slashes make them italic in the played story.
Checking a story before you share it
The problems list reports links to passages that do not exist, passages that nothing links to, passages with no way out and duplicate names. Tag a passage with end when it is a deliberate ending so it is not flagged as a dead end. Create missing builds every absent passage at once, placed beside the passage that links to it. Renaming a passage rewrites every link that points to it, so you can tidy names late in the project without breaking choices.
Export formats
Playable HTML is one self-contained file with your story, a small player, a Back button, a Restart button and an automatic bookmark in the reader's browser. Upload it to itch.io, a personal site or send it by email. Twee 3 is the plain text source format used by Twine and command line compilers such as Tweego. The Twine 2 archive file can be imported into the Twine application through its library import. A project JSON file keeps everything, including passage positions.
Limits
This is not a full copy of the Harlowe story format: only the macros listed above run here, and there is no custom CSS, JavaScript, audio or timed text. Stories imported from Twine keep their text, tags and layout, but other macros show up as plain text in the play-test. Conditions are checked when a passage opens, the same way Harlowe does, so a variable changed later in a passage does not rewrite text that is already displayed.
ตัวอย่างพร้อมวิธีทำ
A short story has five passages. Start sets $lamp to false and $courage to 1. Cottage sets $lamp to true and adds 1 to courage, so a reader who searches first arrives at Stairs with courage 2 and sees the link to Top, while a reader who climbs straight away has courage 1 and only gets Turn back or a link to Fall. The stats show 5 passages, 7 links, 5 reachable, 1 tagged ending and 0 problems; the exported HTML file is under 20 KB.
สรุปสั้น ๆ
- หมวดหมู่: ข้อความและการเขียน
- ทำงานในเบราว์เซอร์ ไม่ต้องสมัคร ไม่ต้องอัปโหลด
- ข้อมูลที่คุณกรอกอยู่บนอุปกรณ์ของคุณ
- มีภาษาอังกฤษ
- ตรวจสอบเนื้อหาล่าสุด:
- แหล่งข้อมูลทางการ: Twine 2 HTML output and Twee 3 specifications (Interactive Fiction Technology Foundation)
คำถามที่พบบ่อย
Can I open my existing Twine stories?
Yes. Open a published Twine 2 HTML file, a Twine archive, or a Twee file. Passages, tags, positions and the start passage are read; macros outside the supported list stay in the text but do not run here.
Will the exported story run without this site?
Yes. The playable HTML contains the story and its own small engine, so it works offline and on any host that serves plain files.
Is it Harlowe compatible?
The syntax is a subset of Harlowe 3: links, set, if, else-if, else, unless, print and hooks behave the same, so a Twee export plays similarly in Twine with Harlowe selected.
How do I make an ending?
Write the final text without links and add the tag end. The counter of endings and the dead-end check both use that tag.
Is my story uploaded?
No. Editing, play-testing and export all run in your browser, and the draft is saved in this browser's local storage.
Can I undo a drag or a rename?
Yes. Undo and redo cover passage moves, renames, deletions and text edits, and work with Ctrl+Z and Ctrl+Shift+Z outside text boxes.
