Spellchecking

Twine Version: 2.6

I just realised that Twine 2 spellchecks the text for passage names. Go to an existing passage, click “Rename”, and the text in that box will have a wavy red line under it if the word is not recognised.

But the passage text does not!

Why is that?

1 Like

Well, I would guess that twine won’t really care what you put into the passage text
if you have a link like: [[Toilet|5723478]], it only makes sure that 5723478 is available as a passage.
The Text is only for the User to understand where he Is going, or what action he is taking.

If you want your link to be the same as your passage name you can always just do [[Toilet]].

This spellcheck is important as if you have misspelt a passage name it could end up to half your game not working/missing.

If you want to spellcheck the normal text you can go to Build -> Proof and then you will get an HTML file that only contains displayed text on every Passage, you could go paste that into any other ordinary spell checker and it does its magic.

The reason why twine doesn’t have a normal spellchecker is to probably avoid having squiggly red lines under the text that a spellchecker doesn’t understand like:

$pie
<<macros>>
document.getElementById("??").innerHTML = "10";

I would far rather see squiggly red lines under both links and misspelt words than not.

How about the option to toggle it on and off?

I appreciate there is an export function, but it is a pain in the neck to actually use with a sizeable game because of the hassle of finding the passage.

Not to be the person who pops up any time someone is complaining about the Twine editor to say “have you considered Tweego?” but… if you use Tweego, you can write in a traditional code editor that either has spellcheck or can have spellcheck extensions installed. (I use Visual Studio Code with the Spell Right extension, which can also be told to ignore code when spellchecking and just look at the actual text.)

3 Likes

I second on the Tweego option. And if you don’t want to lose the mapping feature, there’s still the Twee 3 Language Tool extension, which allows you to place your passages like you would on Twine.

3 Likes

You didn’t state which release of the Twine 2.x application you are using, “Web-browser based” or “Electron based Installable”, and that can affect if a spell checker is available.

If you are using the Web-browser based release than it is your web-browser that is doing the spellchecking, and generally the web-browser is making use of the spellchecking feature of the Operating System you have, and that in turn is generally making use of any word-processing like application that is installed on the machine.

If you are using the Electron based Installable release then it is the Electron framework itself that makes spellchecking possible.

note: On Windows and Linux the Electron framework’s spellchecker functionality is powered by Hunspell, which initially needs to download the required dictionary files from a Google CDN, which can’t happen on a machine that isn’t connected to the internet.

To further complication the matter both of the above releases use the CodeMirror component to implement the “editor” functionality of the Passage Editor (and the JavaScript & Stylesheet editors). So that component’s own spellchecking capabilities can affect the availability of spellchecking within the Passage Editor.

As you can see making spellchecking consistently available is a complex thing in something like the Twine 2.x application, and in some use-cases not everything is within the control of the application’s Developer.
eg. If the Author’s machine doesn’t have a word-processor like application installed then spellchecking might not be possible in the Web-browser based release.

2 Likes