These are the major points that I ran across when I was updating my extensions for 6L02, which I originally wrote up as a text file for circulation to people who got a prerelease build.
Apologies for the ugly formatting — email from various people has reminded me that this is needed, which is why I’m posting it inelegantly here right away, rather than more attractively elsewhere later. Tabs in particular are not preserved, but if you’re an experienced Inform extension writer you’re probably aware of where they’re needed. (Sorry.)
- Remove deprecated syntax. These have been deprecated for a long time, but are now actually truly gone. In particular:
- Procedural rules have to be removed. Depending on what you need to do, you will want to delist or make unavailable old rules; see sections 19.4-19.6 of the documentation for alternative syntax.
change (something) to (something)should now always be replaced by
now (something) is (something).
- Each piece of text output in a rule (but not in a phrase) needs to be labelled as a response, with labels such as (A), (B), (C), etc., starting anew at A for each new rule. See the documentation chapter on adaptive text and responses.
- Occasionally there is a phrase such as
say paragraph break.
It is not mandatory to do so, but if we wish these to be responsized, this needs to change to
say "[paragraph break]" (A).
say paragraph break (A).
is rejected by the compiler.
- All text needs to be made adaptive, using [We] and verb variations. See the documentation chapter on adaptive text and responses.
- The standard rules follow the principle that error messages addressing the player, as opposed to game text concerning the protagonist, stays in the second person singular: so, e.g., “You need to specify a noun”, not “[We] [need] to specify a noun”, which would turn into “He will need to specify a noun” or similar in other tenses.
- When a response is negative, it is good practice to include the “not” within the adaptive text. That is to say,
You are not able to reach that.
[We] [are not] able to reach that.
*[We] [are] not able to reach that.
The reason is that in future tense the former will correctly inflect as “We will not be able to reach that”, whereas the latter will incorrectly come out to “We will be not able to reach that”.
- Any “stop the action with…” lines need now instead to reproduce the response text of the relevant response, like this:
say "[text of print empty inventory rule response (A)]";
stop the action;
- If your extension relies on others, they will also presumably need to be updated for your extension to be fully functional in its new context.
- Declarations of local variables have become more exacting to prevent a certain type of error that was formerly possible. Therefore, in past extensions it was sometimes possible to say, e.g.:
if the pyre is lit:
let the poem be the funeral ode;
let the poem be the hymn.
Now, however, the compiler detects that the local variable poem is declared only conditionally and rejects it. Consequently we now need to write:
let the poem be the hymn;
if the pyre is lit:
now the poem is the funeral ode;
which has the same effect.
- The phrase “is an indexed text” can be removed where it appears; everything is now just “text”.
- Plurality often does not need to be included any more, since other options for adaptive text exist.
There is also an ongoing thread here in which
people are discussing what they’ve encountered in converting their code to 6L02, so if you have a particular problem, it may prove to be covered there.