CODE:
A prop is a kind of thing. Before doing something other than
examining a prop: say "You DEFINITELY don't need [the noun] for your
mission![line break]"; stop the action. A prop is scenery.
In the living room is a prop called an I-Mac. Understand "imac" and
"Imac" and "mac" and "email" and "desk" and "computer" and "macintosh"
as the I-Mac.
END CODE.
This used to give results like this:
>Take imac
You DEFINITELY don't need the I-Mac for your mission!
Now I get:
>Take imac
It's fixed in place.
Thanks for your help.
Biagio
I just tried your code (adding "The living room is a room." at the
beginning), and it behaves as you want, i.e.,
>take imac
You DEFINITELY don't need The I-Mac for your mission!
Perhaps something else is interfering?
-JDC
I've encountered a similar problem in my WIP (where instead of doing
anything except... used to work prior to 5T18 but now doesn't), but
I haven't been able to isolate it in a simple test case like the one
above (so I haven't felt able to submit a bug report).
So it does look like there may have been an undocumented (and
unintended) change in behaviour here, but one that only manifests
itself through some complex (and probably deeply unobvious)
interaction.
-- Eric
No, that part's all right. Prop was already defined as a kind of
thing. Scenery is an either-or property, not a kind.
I can't reproduce the bug either, or think of what would cause it. The
before rule isn't running for some reason - check the rules index or
use "actions" and "rules all" to see what's happening.
vw
I just replicated it. Looking at the rules index will baffle you -
the rule will be listed there but will never execute.
To isolate it, have 21 or more Instead rules, and any "Instead of
doing something except..." rules never apply. I will be submitting a
formal bug report shortly.
A workaround:
Instead of doing something other than examining to the widget, say
"Leave the widget alone."
Becomes
Instead of doing something to the widget:
if the current action is examining, continue the action;
otherwise, say "Leave the widget alone."
--Michael
> I just replicated it. Looking at the rules index will baffle you -
> the rule will be listed there but will never execute.
>
> To isolate it, have 21 or more Instead rules, and any "Instead of
> doing something except..." rules never apply. I will be submitting a
> formal bug report shortly.
Remarkable. Isn't it interesting how these bugs turn up? why 21? any
relationship there? Seems interesting that's all but I am mad like that.
Wow! This is all over my head so thank you all. I've tried using the
above construct as follows:
A prop is a kind of thing. A prop is scenery.
Instead of doing something to a prop:
if the current action is examining, continue the action;
otherwise, say "You DEFINITELY don't need [the noun] for your
romantic adventure![line break]";
However, I get this error:
You wrote 'otherwise, say "You DEFINITELY don't need [the nou [...] ur
romantic adventure![line break]"' : but this is a phrase which I
don't recognise, possibly because it is one you meant to define but
never got round to, or because the wording is wrong (see the
Phrasebook section of the Index to check). Alternatively, it may be
that the text immediately previous to this was a definition whose
ending, normally a full stop, is missing?
Am I missing something stupid?
Thanks,
Biagio
Not stupid, just easy to miss: eliminate the comma between
"otherwise" and "say" in the above code. Also, although it's not
necessary, I'd change that ending semicolon to a period (full stop).
[new code]
A prop is a kind of thing. A prop is scenery.
Instead of doing something to a prop:
if the current action is examining, continue the action;
otherwise say "You DEFINITELY don't need [the noun] for your
romantic adventure![line break]".
[/new code]
Skinny Mike
It looks like one of the optimization in 5T18 introduced the bug. When
an action-based rulebook has more than 20 rules, Inform compiles it in
a different form where the rules are (mostly) grouped by the action
they apply to, which is ordinarily a good thing since it means most of
the rules that don't apply can be skipped.
However, negated action rules like this are grouped incorrectly. The
rule "instead of doing something except examining" is grouped under
"examining", which is exactly what it *doesn't* apply to. So when
you're doing something other examining, the rule is skipped; and when
you are examining, the rule is considered, but then skipped anyway
because its condition doesn't apply.
You can work around the bug by commenting out line 283 in
Rulebooks.i6t (put a "!" in front of "if (ga ~= (-2) or action)
continue;"), although you'll lose the performance boost this feature
was meant to provide.
vw
That fixed it. Thank you all. I'm sure I'll have a few more of these
as I continue updating, but I really appreciate all the help so far.
Thanks,
Biagio
Really interesting. I never have sat down and looked at the templates
and should really see what is going on in them.
Anyway, thanks a lot for the explanation. I suspect this bug will be
relatively easy to fix though.
Best
-James-
Kudos for finding this out. I spent my whole afternoon a few weeks ago
just replicating the problem in a smallest code possible. The weird
behavior was a mystery to me (reading the I6 output did not help) when
I submitted the bug report; and you even have a workaround!
Pavel
> I just tried your code (adding "The living room is a room." at the
> beginning), and it behaves as you want,
yes, the same for me, this example worked as expected.