[i7] [solved] dynamic objects/conversation package issues

Hi guys,

I have a bit of trouble getting my dynamic objects to work nicely with Eric Eve’s conversation package. This is what I tried:

[code]“conversation trouble” by “bartax”

Include Conversation Package by Eric Eve.
Include Dynamic Objects by Jesse McGrew.

The basement is a room.
Ben is a person in the basement.
Pen is a kind of thing. “A pen.”
The red boiler plate pen is a pen. “A red pen.”
The printed name of red boiler plate pen is the “red pen”.
Understand “red pen” as Red boiler plate pen.
The player is in the basement.

Response for Ben when asked for “pen”:
say “‘Have a red pen!’”;
let the new red pen be a new object cloned from Red boiler plate pen;
move the new red pen to player.

Response for Ben when asked about pen:
say “‘Ah, that little pen! Not much I could tell you.’”.

test me with “ask ben for pen / ask pen about pen”.[/code]The output is:

I can examine it though:

Then I tried this (red pen is no longer created dynamically, but the boilerplate pen I used as creation template is now simply inside the room by itself):[code]“conversation trouble” by “bartax”

Include Conversation Package by Eric Eve.
Include Dynamic Objects by Jesse McGrew.

The basement is a room.
Ben is a person in the basement.
Pen is a kind of thing. “A pen.”
The red boiler plate pen is a pen. “A red pen.”
The printed name of red boiler plate pen is the “red pen”.
Understand “red pen” as Red boiler plate pen.
The player is in the basement.

Red boiler plate pen is in the basement.

Response for Ben when asked about pen:
say “‘Ah, that little pen! Not much I could tell you.’”.[/code]This works fine:

So how can I get dynamic objects to work with the Conversation Package nicely so the player can speak about them to NPCs?

Eric’s Conersation Framework only allows a player to ask NPCs about things known to the player. A thing is known if and only if the player has seen it or it has the property ‘familiar’. Things are ‘unfamiliar’ by default, so you have to define the red pen as familiar. Just try: The red boiler plate pen is a familiar pen.

Probably better to set the new red pen to “familiar” when you move it to the player, unless you want to be able to ask Ben about the pen before he gives you one.

Ok this works, thanks a lot everyone (new familiar line added right before move to player):

[code]“conversation trouble” by “bartax”

Include Conversation Package by Eric Eve.
Include Dynamic Objects by Jesse McGrew.

The basement is a room.
Ben is a person in the basement.
A Pen is a kind of thing. “A pen.”
The red boiler plate pen is a pen. “A red pen.”
The printed name of red boiler plate pen is the “red pen”.
Understand “red pen” as Red boiler plate pen.
The player is in the basement.

Response for Ben when asked for “pen”:
say “‘Have a red pen!’”;
let the new red pen be a new object cloned from Red boiler plate pen;
now the new red pen is familiar;
move the new red pen to player.

Response for Ben when asked about pen:
say “‘Ah, that little pen! Not much I could tell you.’”.

test me with “ask ben for pen / ask ben about pen”.[/code] :slight_smile:

Alternatively, if you didn’t feel like inserting “now the thing is familiar” statements all over your code whenever the player got handed something, you could fix the issue once and for all by including a rule like this:

Every turn (this is the I know what I have rule): now everything held is seen. This will ensure that anything the player carries (or wears) at the end of each turn automatically becomes seen (which is the stronger category of knowledge, beyond merely “familiar”, as defined by the Epistemology extension), if it wasn’t already.

You could also consider including something like the following rule, which will automatically make any thing whose name is mentioned familiar:

Before printing the name of an unfamiliar thing (called the item): now the item is familiar. However, this will only work if you change the dialogue to actually mention the item in a way that Inform will recognize as referring to it, e.g. as:

Response for Ben when asked for "pen": let the new red pen be a new object cloned from Red boiler plate pen; say "'Have a [new red pen]!'"; move the new red pen to player. You could even use both rules together, just to be extra sure that nothing the player should notice will escape their addition.

(Presumably, the reason the Epistemology extension doesn’t include rules like these by default is that they do have some performance cost, and the cost might possibly be noticeable in games with a huge number of objects. Or it might just be an oversight.)