Inform Library 6/12 and Inform 6.33.1 for Unix go beta

I’m not sure what you’re saying

Me either, sorry.
I can call directly RunRoutines (obj, prop), but i can’t call RunRoutines (obj, prop) via PrintOrRun(obj, prop).
It does not matter, thank you.

In library 6/12 (parserm.h), use of LanguageCommand is not documented anywhere.

[ PrintCommand from i k spacing_flag;
    #Ifdef LanguageCommand;
    LanguageCommand(from);
    i = k = spacing_flag = 0;   ! suppress warning
    #Ifnot;
    [...]
    #Endif; ! LanguageCommand
];

Can i use it ?

LanguageCommand must have crept in from the old 2006 CVS repo. I suspect it has something to do with translating the Library to other languages. I’ll dig through the commit messages and see what’s up.

Yes, it is. We need it to translate library (in French), to reconstruct incomplete sentences:

> take
What do you want to take ?
!LanguageLM()->Miscellany: 48/49 -> "What do you want to" -> Printcommand()->LanguageCommand()-> "take ?"

In french it is quite complicated :

> prendre
Que voulez-vous prendre ?
>parler
À qui voulez-vous parler ?

(It gives headache: Que, Qui, À qui, Où, Dans quoi, Sur quoi, Sur qui, De quoi, De qui, Avec quoi , etc.)

It is, I imagine, a matter of associating a “complement direct” to the verb. When you create a noun, you have to specify a “gender”, as it were. So when you create a verb, you have to specify whether it goes with “Que”, “À qui”, etc.

A hassle, yeah. On the plus side, once you do this with all verbs in the Standard Rules, the ones Inform comes with, it becomes more manageable.

hi,
can we have the value of noun as a parameter (x1) of the function L__M(##Miscellany, 32) like

L__M(##Miscellany, 24, l), we need it to translate in French:[code]In english.h:
[ LanguageLM n x1;
	[..]
	Miscellany: switch (n) {
                [..]
		24: "You can't talk to ", (the) x1, ".";
                32: CSubjectIsnt(actor,false); " holding that!";
	}
];

In parserm.h:

if (etype == NOTHELD_PE) {  L__M(##Miscellany, 32); oops_from=saved_oops; }

X1 is nothing, because token in grammar is held and is not as parameter of the function: we need it!
In French for “You aren’t holding that!”, we say:
singular: l’
“Vous ne l’avez pas sur vous.”
plural: les
“Vous ne les avez pas sur vous.”

I’m not clear on exactly what you want changed. As-is, the parameters of L__M are act, n, x1, and x2.

Sorry,
i just need the third parameter in L__M(##Miscellany, 32)
In parserm.h:
Not:
if (etype == NOTHELD_PE) { L__M(##Miscellany, 32); oops_from=saved_oops; }
But:
if (etype == NOTHELD_PE) { L__M(##Miscellany, 32, Object); oops_from=saved_oops; }

I need to know in “LanguageLM n x1->Miscellany 32:” the Object that triggered the error NOTHELD_PE. Here, the Object it’s the apple :

Include "parser.h"; Include "verblib.h";

Object room "Room"
with description "Room" has light;

Object apple "apple" room
	with name 'apple', before_implicit 3;

[ Initialise;
	!no_implicit_actions = true;
        location = room;
];
Include "grammar.h";
Release 1 / Serial number 140804 / Inform v6.33 Library 6/12-beta1 S
Room
You can see an apple here.
>give apple
(to yourself)
You aren't holding that!
>

In DEBUG mode, the meta verb : ‘showdict’ ‘dict’ * ->ShowDict, displays twice the verb !?Constant DEBUG; Include "parser.h"; Include "verblib.h"; Object room "Room" with description "Room" has light; [ Initialise; location = room; ]; Include "grammar.h";

Now, we can use the dict_par3 flag:

Maybe we can see with the DEBUG >dict if this flag is set :

[code]Constant DICT_TEST $01;
Dictionary ‘above’ 0 DICT_TEST;

dict
above --> noun 1 (the value of flag or something else that tells us that the flag dict_par3 is set.)[/code]Good luck.

How does this change work for your Miscellany 32 problem? github.com/DavidGriffith/inform … 43910ce3aa

I see how that’s being generated, but I don’t know why that would be desirable. The DICT/SHOWDICT verb first appeared in github.com/DavidGriffith/inform … 06fb31549d, which was from the old 2006 CVS repo. Would someone who knows why ShowDicSub() was written that way please comment?

This does not work, noun is nothing so x1 is nothing. But it seems to work with results–>2: if (etype == NOTHELD_PE) { L__M(##Miscellany, 32, results-->2); oops_from=saved_oops; } (results–>n is used, lowest in the code, with error: if (etype == NOTHING_PE) {[…]}
I don’t know if it works in every situation where Miscellany 32 is called!?

Oops! This does not work with Burn, Dig, Lock & Unlock, because held is second, so it’s results–>3 not–>2.Verb 'burn' 'light' * noun -> Burn * noun 'with' held -> Burn;may be the solution is: if (etype == NOTHELD_PE) { L__M(##Miscellany, 32, results-->2, results-->3); oops_from=saved_oops; } And we arange things with x1 and x2 in Miscellany 32 !?

In library 6/12, you changed the grammar of the verb Fill:

In library 6/11:
Verb 'fill'
    * noun                                  -> Fill;
In library 6/12:
Verb 'fill'
    * noun 'from' noun                      -> Fill;[/code]may be it will be better to combine the two: [code]Verb 'fill'
    * noun                                  -> Fill;
    * noun 'from' noun                      -> Fill;[/code]sometimes (more often than not?) the second word is clear:
> fill the flower vase

I see. How would the language header file then access these parameters?

[code]parserm.h:
if (etype == NOTHELD_PE) { L__M(##Miscellany, 32, results–>2, results–>3); oops_from=saved_oops; }

english.h (french.h):
[ les_l o;
if (o has pluralname)
print "les “;
else
print “l’”;
];
[ LanguageLM n x1 x2;
[…]
Miscellany: switch (n) {
[…]
32:
if (action_to_be == ##Burn or ##Dig or ##Lock or ##Unlock) {
@push x2;
@pull x1;
}
CSubjectIsnt(actor,false);” ne ", (les_l) x1, “avez pas sur vous !”;
}
];
!(action_to_be or verb_word == ‘burn’ or ‘dig’, etc.)
! And in French we have to adapt “avez pas sur vous !” to the subject; but it’s another matter![/code]For English, it’s: Burn, Dig, Lock, Unlock, but for other language order of the grammar can be different (held can be in x1 or x2) , thus concerned verbs can be different:[code]if (etype == NOTHELD_PE) { L__M(##Miscellany, 32, results–>2, results–>3); oops_from=saved_oops; }

Miscellany 32: CSubjectIsnt(actor,false); " holding that!";
[/code]It’s great, and every language adapts Miscellany 32 for himself.

I’m a bit unclear on how results–>2 and results–>3 are supposed to be populated. I tried playing with your suggested changes to parserm.h by doing this with english.h:

32: CSubjectIsnt(actor,false); " holding ", (the) x1, ".";

But I keep getting “You aren’t holding the nothing.”. I could have sworn this worked when I passed noun as L__M()'s third parameter, which is why I committed that to the repo, but now neither of these work.

The original default response “But there’s no water here to carry.” struck me as nonsensical because there are other things with which one might want to fill a container. I’ll put back the old noun-only meaning and added a new default message. It’ll now reply with something like “There isn’t anything obvious with which to fill the lamp.”. This should take care of both situations.

For me, it works well with all verbs that have held in their grammar. How you triggers the call to the Miscellany 32 in your game code ? Me, i need to use before_implicit 3.[code]Include “parser.h”; Include “verblib.h”;

Object room “Room” with description “Room” has light;

Object bob “Bob” room
with name ‘bob’
has animate male proper;

Object apple “apple” room
with name ‘apple’,
before_implicit 3,
has edible;

Object box “box” room
with
name ‘box’,
with_key key,
before_implicit 3,
has container openable lockable;

Object key “key” room
with name ‘key’,
before_implicit 3;

[ Initialise; location = room; ];
Include “grammar.h”;[/code]english.h: 32: print "x1 = ", (name) x1, " x2 = ", (name) x2, "^"; parserm.h: if (etype == NOTHELD_PE) { L__M(##Miscellany, 32, results-->2, results-->3); oops_from=saved_oops; }[spoiler]Start of a transcript of
Release 1 / Serial number 140807 / Inform v6.33 Library 6/12-beta1 S
Standard interpreter 1.0 (1F) / Library serial number 140724

blow apple
x1 = apple x2 = nothing

burn apple with key
x1 = apple x2 = key

dig apple with key
x1 = apple x2 = key

give apple to bob
x1 = apple x2 = Bob

lock box with key
x1 = box x2 = key

put on apple
x1 = apple x2 = key

remove key
x1 = key x2 = key

show bob apple
x1 = apple x2 = Bob

unlock box with key
x1 = box x2 = key

wear apple
x1 = apple x2 = key

unscript

End of transcript.[/spoiler]

Okay. I see now. This business with before_implicit looks messy.

I believe that i find the solution for Miscellany 32:

if (etype == NOTHELD_PE) {  L__M(##Miscellany, 32, not_holding); oops_from=saved_oops; }

Start of a transcript of
Release 1 / Serial number 140807 / Inform v6.33 Library 6/12-beta1 S
Standard interpreter 1.0 (1F) / Library serial number 140724

blow apple
x1 = apple

burn apple with key
x1 = key

dig apple with key
x1 = key

give apple to bob
x1 = apple

lock box with key
x1 = key

put on apple
x1 = apple

remove key
x1 = key

show bob apple
x1 = apple

unlock box with key
x1 = key

wear apple
x1 = apple

unscript

End of transcript.

In english.h, you use (nop) instead of (string), in this case (only string), has it an interest?

[ nop x; x = x; ];      ! print rule to absorb unwanted return value
[ SupportObj obj s1 s2;
    if (obj has supporter)          print (string) s1;
    else                            print (string) s2;
];
[ PluralObj obj s1 s2 past;
    if (player.narrative_tense == PAST_TENSE) {
        print (string) past;
        return;
    }
    if (obj has pluralname)         print (string) s1;
    else                            print (string) s2;
];
"(getting ", (nop) SupportObj(x1,"off","out of"), (the) x1, ")";
CSubjectCant(actor,true); " since ", (the) x1, " ", (nop) PluralObj(x1,"lead","leads","led"), "nowhere.";
[ SupportObj obj s1 s2;
    if (obj has supporter) return s1;
    return s2;
];
[ PluralObj obj s1 s2 past;
    if (player.narrative_tense == PAST_TENSE) return past;
    if (obj has pluralname) return s1;
    return s2;
];
"(getting ", (string) SupportObj(x1,"off","out of"), (the) x1, ")";
CSubjectCant(actor,true); " since ", (the) x1, " ", (string) PluralObj(x1,"lead","leads","led"), "nowhere.";