I’m trying to alter the ‘describe what’s on scenery supporters in room descriptions rule’–and therefore other related rules–because I have an NPC that I want to be able to fully describe–even when sitting on furniture, for instance–whenever the player ‘looks’ or examines the supporter. This NPC is the only ‘thing’ that I want described in this way. I am trying various things with that rule but nothing seems to be panning out. I am planning to write a complicated initial appearance paragraph for the NPC to be printed instead of the usual ‘On the wood steps is Judith.’, for instance (and of course, including other items that are there, if any, saying ‘On the [holder of Judith] you see [list of things which are on the holder of Judith].)’
Do I need to abolish the above-mentioned rule, and then write a ‘rule for printing a locale paragraph about a scenery supporter’, like so–
[code]The describe what’s on scenery supporters in room descriptions rule does nothing.
Rule for writing a locale paragraph about a scenery supporter:
if the item described is not the holder of Judith:
say “On the [item described], you see [a list of things which are on the item described].”;
if Judith is marked for listing;
now Judith is not marked for listing;
if there is something on the holder of Judith:
say “Next to Judith, you can see [a list of things which are on the holder of Judith].”[/code]
Okay, just tried this, and am still getting ‘On the wood steps is Judith.’
By the way, ‘judithapp’ is the initial appearance paragraph of Judith.
Thanks for any help, of course I’ll continue to try other stuff.
I’d be inclined to cheat — instead of rewriting the look action, you could just remove the character from the supporter temporarily.
Judith_position is an object that varies. Judith_position is initially nothing.
Before looking in the presence of Judith when the holder of Judith is not a room:
now Judith_position is the holder of Judith;
move Judith to the location.
After looking in the presence of Judith:
if Judith_position is not nothing:
move Judith to Judith_position;
now Judith_position is nothing;
continue the action.
The initial appearance of Judith is "[if Judith_position is not nothing]Judith is on [the Judith_position].[else]Judith is here.[end if] (Etc.)".
Thanks, JRB, that makes a lot of sense, and I actually did something like that in one of my games (but not for looking). I guess I could do something similar for when the player examines the supporter that ‘Judith’ is ‘on’.
One other thing I didn’t think of was maybe I could disable that scenery supporters rule and just alter the body text of the room description with a substitution…?? My head was so buried in rules yesterday that I didn’t think of that. Maybe I was just wanting to see if I could replace the ‘On the …is/are…’ statement using only rules.
You know I just discovered what was wrong. I had forgotten that I had changed a value belonging to my NPC, such that [judithapp] would be altered to describe that value, and I had not yet written a paragraph reflecting that value, so the routine I had written to ‘say [judithapp]’ had been returning null string–saying nothing–whenever [judithapp] was called for, after she was moved to her settee. All that time, I had thought that I did not change that value yet, I was merely seeing if [judithapp] would print something after she went from standing in a room to sitting on a settee, then I would write something different for the value change. Here, finally, is something like what worked–
[code]A herposition is a kind of value. The herpositions are standface, sitdown.
The describe what’s on scenery supporters in room descriptions rule does nothing when the item described is the holder of Judith.
Rule for printing a locale paragraph about the holder of Judith:
if the holder of Judith is not a room:
say “[judithapp][paragraph break]”.
Definition: a thing is notjudith if it is not Judith.
Judith is here. Judith is a woman. “[judithapp]”. The description of Judith is “[juddesc]”. Judith has a herposition. The herposition of Judith is standface.
To say judithapp:
if the herposition of Judith is:
say “Judith is standing here, facing you, waiting for you to say something meaningful[period]”;
say “Judith is sitting here, on the [holder of Judith], staring at you expectantly[ellipsis]”;
if there is a notjudith thing on the holder of Judith:
if the holder of Judith is not a room:
say “[paragraph break]Next to Judith, on the [holder of Judith], you can see [a list of notjudith things which are on the holder of Judith][period]”.[/code]
Before, I had changed her position (herposition) from ‘standface’ to ‘sitdown’–but forgot to write an entry for ‘sitdown’, so [judithapp] was blank. Go figure.
Thanks a lot for your time, JRB.
Yes, that looks as though it should work very nicely.
I’m not sure you need the standface/sitdown flag, though—can’t you just check directly whether Judith is on the sofa or not?
There are actually quite a number of different ‘herpositions’, where how my NPC is positioned is crucial–that’s not the actual source code of the ‘game’. It’s kind of an experimental game that I am doing.
Have you checked out Postures by Emily Short?
(The description refers to “the player”, but it’s written to work for NPCs as well.)
Thanks, JRB–I’ll check it out.