Inform6 Help Needed: adding me synonyms & status line errors

I’ve been making a game in inform6 with 6/11 lib, it is written in third person and I would like to add the characters name as a
synonym for ‘me/myself/self’. At the moment I have replaced ‘self’ but is this possible to do without editing the library?

Also I’m creating v5 and v6 varriants of the game but when I compile it for v6 some interpreters (Windows Frotz, sfrotz, maybe more)
don’t display the moves in the status line correctly it is stuck on -1 for some reason. It is counting the moves correctly as I displays fine
when I use the score verb. I’m guessing this is a bug in either the interpreters or the librarys v6 version of DrawStatusLine routine.
But I had a look at the routine and I couldn’t see anything obviously wrong with it.
(keep in mind this is my first project in inform so I’m not very experienced with inform programming)

It’s unlikely to be an interpreter bug, as in V6 there isn’t anything special about the status line: it’s just another V6 window from the interpreter’s point of view. Much more likely is something wrong with the 6/11 implementation of DrawStatusLine() especially as the library contains a V6 specific DrawStatusLine(), which has almost certainly not seen much testing or use, given how little used V6 is as a format.

To be honest, your best bet is to ignore V6: it’s not widely supported, and the screen model is annoyingly pixel based, which doesn’t work well with modern systems. If I have the time I’ll see if I can get a quick example to work (or not) with V6.

You can initialize the ME3__WD constant however you like; as long as it is a single dictionary word (a single word in single quotes) the parser will understand it. But, if you add a ME4__WD to the vocabulary , you’ll have to put it in together with the other ME*WD constants in ParseToken (Section C) and NounWord routines in the parserm.h library, for it to do any work.

Well the game is basically finished and the game contains optional graphics which is why I used v6 (I didn’t like or understand glulx much).
I tried to compile the inform demos with the v6 option but they don’t show the same problem so I’m not sure what’s wrong.

Felix: How do I initialize ME3__WD? as in what code would I use as anyway I’ve tried the compiler tells me I can’t use an already exsisting name.
Am I just being stupid and missing something really obvious.

Oh, when you said you’d replaced ‘self’, I thought you’d already done that.
There’s a list of constants including ME1__WD, ME2__WD, and ME3__WD in English.h. Just change «Constant ME3__WD = ‘self’ ;» in that very list to «Constant ME3__WD = ‘Ebenezer’ ;» or whatever. If I remember correctly, it has gotta be a single word, so you can’t set it to ‘Ebenezer Scrooge III’ for instance.

Ah right yes I have already done that but I was hoping there was a way to replace library constants in my story source file without modifying the library.
Like you can do with library routines or verbs.

I’m afraid not. :cry:

That’s odd oh well, thanks anyway.

After some back and forth by email, the status line bug has been figured out, and it seems worth recording it here, in case anyone else stumbles over it. It turned out not to be an interpreter bug in the end: it is an Inform library bug.

The problem only showed up when a Blorbed V6 game file was loaded into Frotz: if just the raw V6 game file was loaded, everything was fine. The difference in behaviour was tracked down to byte 1 of the game’s header, which holds various configuration flags. In V6, bit 1 of this byte is set by the interpreter if it thinks that graphics are available and not set if not, so Frotz set it only when the Blorb version of the game was loaded. Hacking the interpreter to unconditionally clear this bit made the bug go away.

Given that and a check of the Z-Machine specification, the bug starts making sense. Back in V3 and before, the interpreter is largely responsible for drawing the status line. In V3 only two sorts of status lines are supported: one showing score and moves, and one showing game time elapsed (for games like ‘Deadline’). Which one the game wants is determined by bit 1 of byte 1 in the header.

When Infocom moved to the V5 format, this bit in the header became redundant, as the screen model allowed the game to be in charge of the status line. However, Inform kept the convention that this bit was used to toggle the Inform library’s implementation of the status line between the score/moves mode and the time mode: this bit is read into the library variable sys_statusline_flag, which is then used to control the behaviour of DrawStatusLine(). Since Infocom didn’t assign any meaning to this bit for V5, this approach of Inform’s didn’t cause any problems.

However, when Infocom moved to the V6 format, they did re-use this bit, re-purposing it to mean whether the interpreter had found graphics data or not. Unfortunately, this wasn’t noticed when Inform 6’s library gained the minimal V6 support that it has: the V6 version of DrawStatusLine() doesn’t support the time mode, but having sys_statusline_flag not set to zero does cause a change in behaviour of DisplayStatus() in parserm.h, which is enough to cause the problems you see.

The correct solution is to edit the library to wrap the setting of sys_statusline_flag in InformLibrary.play() with conditionals so that it doesn’t happen for V6. The simpler solution that avoids changing the library is to just clear the variable in the game’s Initialise function, like so:

[ Initialise;
   sys_statusline_flag = 0;