L__M was the way I6 used to refer to any old library message, which were basically standard messages produced by Inform (including not only error messages but standard responses like “It is pitch dark, and you can’t see such a thing.” One of the big changes in the most recent versions of Inform 7 was to replace the old library message system with a system of responses, documented in §14.10 of Writing with Inform (the manual included with I7). This involved a total change in how those messages were handled in I6. So any update of an old extension that involved I6 replacement is going to have to change those library messages.
Some hopefully useful rambling follows:
Most of these extensions that have huge I6 extensions IME don’t actually make that many changes to the I6 template–they tend to work by copying out a big chunk of the I6 template and changing it in a few places. One time before I successfully updated an outdated extension basically by going through the compilation errors, finding the corresponding place in the new I6 template, and copying them back in. In some ways the hardest part was finding the new I6 template (the one posted online is the old one, unfortunately). On the Mac they seem to be found in Inform/Contents/Resources/Internal; I had to “Show Package Contents” on the Inform app (and have the Finder set to “View as List” rather than “View as Columns”) to get there. (Sorry if the stuff I’m saying there is obvious to someone with a much stronger software background than I have! For me, it took a while to figure out.)
Looking at the places where Undo Output Control does its replacements, it looks like we have to open up Parser.i6t–oh, that’s always fun to mess with–OutOfWorld.i6t, zmachine.i6t, and Glulx.i6t. (Well, technically for your own project you only have to do zmachine.i6t or Glulx.i6t if that’s the virtual machine you’re targeting, but it probably won’t be that much extra work.) Then we have to scout out the parts we need to change. We’ll want to copy out the parts of the new templates that need changing for the extension, make the appropriate changes, and include them back in.
Having the 6F95 templates that zarf linked handy is actually very helpful here, because we can compare them to the existing Undo Output Control code to see where Erik changed them, and then find the corresponding place in the new code to try to reproduce Erik’s change there.
So, for instance, here’s what Perform_Undo looked like in the old OutOfWorld.i6t template:
[ Perform_Undo;
#ifdef PREVENT_UNDO; L__M(##Miscellany, 70); return; #endif;
if (turns == 1) { L__M(##Miscellany, 11); return; }
if (undo_flag == 0) { L__M(##Miscellany, 6); return; }
if (undo_flag == 1) { L__M(##Miscellany, 7); return; }
if (VM_Undo() == 0) L__M(##Miscellany, 7);
];
Here’s Erik’s modification of it:
Include (-
[ Perform_Undo;
#ifdef PREVENT_UNDO;
if ( FollowRulebook( (+ report prevented undo rules +) ) && RulebookFailed()) {
L__M(##Miscellany, 70);
}
return;
#endif;
if (turns == 1) {
FollowRulebook ( (+ before nothing to be undone failure rules +) );
if ( FollowRulebook( (+ report nothing to be undone failure rules +) ) && RulebookFailed()) {
L__M(##Miscellany, 11);
}
FollowRulebook ( (+ after nothing to be undone failure rules +) );
return;
}
if (undo_flag == 0) {
FollowRulebook ( (+ before interpreter-undo-incapacity rules +) );
if ( FollowRulebook( (+ report interpreter-undo-incapacity rules +) ) && RulebookFailed()) {
L__M(##Miscellany, 6);
}
FollowRulebook ( (+ after interpreter-undo-incapacity rules +) );
return;
}
if (undo_flag == 1) {
FollowRulebook ( (+ before interpreter undo failure rules +) );
if ( FollowRulebook( (+ report interpreter undo failure rules +) ) && RulebookFailed()) {
L__M(##Miscellany, 7);
}
FollowRulebook ( (+ after interpreter undo failure rules +) );
return;
}
if ( (+ temporary undo suspension +) ) {FollowRulebook ( (+ report attempt to undo-while-disabled rules +) ); return;}
if (VM_Undo() == 0) {
FollowRulebook ( (+ before interpreter undo failure rules +) );
if ( FollowRulebook( (+ report interpreter undo failure rules +) ) && RulebookFailed()) {
L__M(##Miscellany, 7);
}
FollowRulebook ( (+ after interpreter undo failure rules +) );
}
];
-) instead of "Perform Undo" in "OutOfWorld.i6t".
Here’s the Perform_Undo from the currrent OutOfWorld.i6t:
[ Perform_Undo;
#ifdef PREVENT_UNDO; IMMEDIATELY_UNDO_RM('A'); new_line; return; #endif;
if (IterationsOfTurnSequence == 0) { IMMEDIATELY_UNDO_RM('B'); new_line; return; }
if (undo_flag == 0) { IMMEDIATELY_UNDO_RM('C'); new_line; return; }
if (undo_flag == 1) { IMMEDIATELY_UNDO_RM('D'); new_line; return; }
if (VM_Undo() == 0) { IMMEDIATELY_UNDO_RM('F'); new_line; }
];
Notice that the change from the old OutOfWorld.i6t is that L__M(##Miscellany, 70) is now IMMEDIATELY_UNDO_RM(‘A’), and so on; oh, and it looks like the variable “turns” got changed to “IterationsOfTurnSequence.” So my guess is that to update this we need to take Erik’s code and change those L__M calls and the “turns” variable:
Include (-
[ Perform_Undo;
#ifdef PREVENT_UNDO;
if ( FollowRulebook( (+ report prevented undo rules +) ) && RulebookFailed()) {
IMMEDIATELY_UNDO_RM('A');
}
return;
#endif;
if (IterationsOfTurnSequence == 1) {
FollowRulebook ( (+ before nothing to be undone failure rules +) );
if ( FollowRulebook( (+ report nothing to be undone failure rules +) ) && RulebookFailed()) {
IMMEDIATELY_UNDO_RM('B');;
}
FollowRulebook ( (+ after nothing to be undone failure rules +) );
return;
}
if (undo_flag == 0) {
FollowRulebook ( (+ before interpreter-undo-incapacity rules +) );
if ( FollowRulebook( (+ report interpreter-undo-incapacity rules +) ) && RulebookFailed()) {
IMMEDIATELY_UNDO_RM('C');;
}
FollowRulebook ( (+ after interpreter-undo-incapacity rules +) );
return;
}
if (undo_flag == 1) {
FollowRulebook ( (+ before interpreter undo failure rules +) );
if ( FollowRulebook( (+ report interpreter undo failure rules +) ) && RulebookFailed()) {
IMMEDIATELY_UNDO_RM('D');;
}
FollowRulebook ( (+ after interpreter undo failure rules +) );
return;
}
if ( (+ temporary undo suspension +) ) {FollowRulebook ( (+ report attempt to undo-while-disabled rules +) ); return;}
if (VM_Undo() == 0) {
FollowRulebook ( (+ before interpreter undo failure rules +) );
if ( FollowRulebook( (+ report interpreter undo failure rules +) ) && RulebookFailed()) {
IMMEDIATELY_UNDO_RM('F');;
}
FollowRulebook ( (+ after interpreter undo failure rules +) );
}
];
-) instead of "Perform Undo" in "OutOfWorld.i6t".
Now, I don’t know whether that will be enough. There may be other I6 changes that weren’t as simple as that to catch, and there may be other subtleties. Also, I make lots of copy-paste errors, so you should check my work above if something’s going wrong, and I don’t know why the “instead of” line says “Perform Undo” rather than “Perform_Undo” (though if it works, it works, obviously). And I really don’t know any I6 and definitely don’t know what’s going on with this extension.
But hopefully this will help you get started with the update!