[I6] Issue with Swedish Inform

So I’ve been playing around with SwInform, and I notice something right away: the library by Fredrik Ramsberg implements the common conventions of one-letter abbreviations for the elementary commands. However, some of them don’t work. Interestingly enough, going by some of the compiled examples on Fredrik’s page, they may never have worked. Despite this

Verb 'undersök' 'x//' * noun -> Examine;

clearly being in SwedishG.h, typing ‘x [whatever]’ isn’t recognized, while SwInform’s redefining of “l” from “look” to mean “inventory” apparently works fine. The same issue is however true for the “wait” command (now “w”).

I’m confused why this should be. There seems to be no obvious culprit, nor do I understand how the issue has gone unremarked upon for several years now. Does anyone have an idea of what’s happening here?

I downloaded the swedish_inform.zip file that you linked and extended the included bas.inf test program to include an examinable object:

!% +language_name=Swedish
Include "SweAlpha"; ! *MÅSTE* inte inkluderas, men det rekommenderas starkt

Constant Story      "Spelnamnet";
Constant Headline   "^En övning i interaktiv fiktion.^";

Include "Parser";
Include "VerbLib";
Include "SweRout";
Include "SwedishG";

Object Rum1 "Rummet"
  with description "Skriv rumsbeskrivningen här.",
  has light;

Object -> Svard "svärd"
  with name 'svärd' 'svard' 'elvish',
       description "En Elvish svärd av stor antiken.";

[Initialise ;
  location=Rum1;
  "^^^Text som ska skrivas ut när spelet börjar.^^";
];

I successfully compiled it out of the box with lib 6/11. (SwInform requires some changes to compile with the current lib 6/12.)

The results when I run it with Gargoyle on Mac OS X 10.6.8 (using Bocfel as a backend) are:

which is the same behavior that you’ve reported: x , w, and z don’t work, while l does work.

However, the results when I run it with Unix Frotz on the same machine are:

Ignoring the Unicode problems, we can see that, running with frotz, x and l both work, while w doesn’t work for wait, but z does.

Looking at SwedishG.h, we see:

Verb 'vänta' 'z//'
                *                                           -> Wait;

and no reference to ‘w//’ in the file.

If we add ‘w//’ to the grammar line (without removing ‘z//’) and recompile, we get:

with frotz, and:

with Gargoyle.

So, to summarize: l and w (when defined) work with both terps, while x and z work with frotz and not with Gargoyle.

After thinking about this for a bit, it occurred to me that the issue was probably with Bocfel’s abbreviations feature that expands commands like x that weren’t present in early Infocom games.

We can disable this feature by editing the garglk.ini config file to pass the -x (disable_abbreviations) option to Bocfel when it launches bas2.z5 (while leaving other games like Zork I alone):

# Zcode game types
[ *.z3 *.z4 *.z5 *.z6 *.z7 *.z8 *.zlb *.zblorb ]
terp bocfel 

[bas2.z5]
terp bocfel -x

With abbreviations disabled, the issue is resolved:

Oh wow, thank you! I had noticed that a long while ago and always wondered why that never worked. Glad there is at least a local fix!

Wow vlaviano, that’s some impressive sleuthing. Thank you.

Bocfel could check whether the words exist in the dictionary before converting them.

Actually looking at bocfel more, it should only apply to Z-Machine versions 1-4. Wouldn’t this Swedish inform be compiling to version 5 at least?

I have noticed the problem on my games, which are .z5 files compiled with I6, if that helps :slight_smile: