Simple Chat V4

I’m wondering if somone expirienced with Simple chat could give me a little hand… I’ve got the basics of a conversation going, but I can’t seem to figure out how to make new things appear…

here’s my code thus far. My issue is that the new nodes don’t show up in the window for selection. The nodes that don’t show are chat-WhoHelped, and chat-NoIt’sFine…

[code]Tia is a woman in Tia’s House First Floor.

chat-hello-Tia, chat-NoIt’sFine, chat-WhoHelped, and chat-WhereAmI are chat nodes.

chat-NoIt’sFine is sc-inactive. chat-WhoHelped is sc-inactive.

Report giving text for chat-hello-Tia: instead say “Tia looks up surprised to see you”.
Carry out finding responses to chat-hello-Tia: link to chat-WhereAmI.

Instead of talking to Tia: run a conversation from chat-hello-Tia.

Report giving link to chat-WhereAmI: instead say "‘Where am I?’ ".
Report giving text for chat-WhereAmI: now EsherKnowsTia is true; now chat-WhereAmI is sc-inactive; now chat-NoIt’sFine is sc-active; now chat-WhoHelped is sc-active; instead say "Tia looks at Esher unblinking, and begins to speak. ‘don’t worry’ she says in a sympathetic tone. ‘I know you’re probably shaken, but I’m not going to hurt you. Last night when I came downstairs to get a drink the entire room filled with a bright white light. I was completely surprised! You fell out of the light, all the way from the ceiling to the floor! I didn’t know what to do. You wouldn’t wake up. I got someone from town to help carry you upstairs into the spare room. I hope you didn’t mind waking up there too much.’ ".

Report giving link to chat-NoIt’sFine: instead say "'No, it’s alright. ".
Report giving text for chat-NoIt’sFine: instead say “Harry sighs. ‘I’m never going to get rid of it.’”.
Carry out finding responses to chat-NoIt’sFine: try finding responses to chat-hello-Tia instead.
[/code]

Thanks.

:laughing: as you can see I’ve been cutting and pasting from the documentation as I go.

Here’s a revision I made adding a bit of code that was link to…I figured for sure that would fix the problem, but still the extra chat options aren’t popping up…

[code]Tia is a woman in Tia’s House First Floor.

chat-hello-Tia, chat-NoIt’sFine, chat-WhoHelped, and chat-WhereAmI are chat nodes.

chat-NoIt’sFine is sc-inactive. chat-WhoHelped is sc-inactive.

Report giving text for chat-hello-Tia: instead say “[if EsherKnowsTia is false]Tia looks up surprised to see you[else]Tia looks up at you, blinking beautifully[end if]”.
Carry out finding responses to chat-hello-Tia: link to chat-WhereAmI.

Instead of talking to Tia: run a conversation from chat-hello-Tia.

Report giving link to chat-WhereAmI: instead say "‘Where am I?’ ".
Report giving text for chat-WhereAmI: now EsherKnowsTia is true; now chat-WhereAmI is sc-inactive; now chat-NoIt’sFine is sc-active; now chat-WhoHelped is sc-active; link to chat-NoIt’sFine; link to chat-WhoHelped; instead say "Tia looks at Esher unblinking, and begins to speak. ‘don’t worry’ she says in a sympathetic tone. ‘I know you’re probably shaken, but I’m not going to hurt you. Last night when I came downstairs to get a drink the entire room filled with a bright white light. I was completely surprised! You fell out of the light, all the way from the ceiling to the floor! I didn’t know what to do. You wouldn’t wake up. I got someone from town to help carry you upstairs into the spare room. I hope you didn’t mind waking up there too much.’ ".

Report giving link to chat-NoIt’sFine: instead say “‘No, it’s alright. ".
Report giving text for chat-NoIt’sFine: instead say "Bla Blah Blah’”.
Carry out finding responses to chat-NoIt’sFine: try finding responses to chat-hello-Tia instead.

Report giving link to chat-WhoHelped: instead say “‘Who helped?. ".
Report giving text for chat-WhoHelped: instead say "Blah Blah Blah’”.
Carry out finding responses to chat-WhoHelped: try finding responses to chat-hello-Tia instead.[/code]

:laughing: :laughing: I must say. I almost blew up my computer with this one!

[code]Tia is a woman in Tia’s House First Floor.

chat-HelloTia, chat-NoIt’sFine, chat-WhoHelped, chat-GoodBye and chat-WhereAmI are chat nodes.

chat-NoIt’sFine is sc-inactive. chat-WhoHelped is sc-inactive.

Report giving text for chat-HelloTia: instead say “[if EsherKnowsTia is false]Tia looks up surprised to see you[else]Tia looks up at you, blinking beautifully.[end if]”.
Carry out finding responses to chat-HelloTia: link to chat-WhereAmI.

Instead of talking to Tia: run a conversation from chat-HelloTia.

Report giving link to chat-WhereAmI: instead say "‘Where am I?’ ".
Report giving text for chat-WhereAmI: now EsherKnowsTia is true; now chat-WhereAmI is sc-inactive;
Carry out finding responses to chat-HelloTia: try finding responses to chat-HelloTia instead; now
chat-NoIt’sFine is sc-active; now chat-WhoHelped is sc-active; link to chat-NoIt’sFine; link to chat-WhoHelped; say "Tia looks at Esher unblinking, and begins to speak. ‘don’t worry’ she says in a sympathetic tone. ‘I know you’re probably shaken, but I’m not going to hurt you. Last night when I came downstairs to get a drink the entire room filled with a bright white light. I was completely surprised! You fell out of the light, all the way from the ceiling to the floor! I didn’t know what to do. You wouldn’t wake up, so I got someone from town to help carry you upstairs into the spare room. I hope you didn’t mind waking up there too much.’ ".

Report giving link to chat-NoIt’sFine: instead say “‘No, it’s alright. ".
Report giving text for chat-NoIt’sFine: instead say "Bla Blah Blah’”.
Carry out finding responses to chat-NoIt’sFine: try finding responses to chat-HelloTia instead.

Report giving link to chat-WhoHelped: instead say “‘Who helped?. ".
Report giving text for chat-WhoHelped: instead say "Blah Blah Blah’”.
Carry out finding responses to chat-WhoHelped: try finding responses to chat-HelloTia instead.[/code]

when I typed talk to Tia my screen filled with a bunch of crazy jargin like this…

The culprit is likely to be this piece of code:

 Carry out finding responses to chat-HelloTia: try finding responses to chat-HelloTia instead;

which goes into an infinite loop.

Hey, thanks. I got that fixed up, and things are working better now that I touched up a couple other things. Now I just need to figure out how the converation will be.

hmm. I’m getting a new kind of error, but it’s wierd.

[code]Tia is a woman in Tia’s House First Floor.

chat-HelloTia, chat-NoIt’sFine, chat-WhoHelped, chat-WhereAmI , chat-Tia-YouGoToBeKidding and chat-GoodBye are chat nodes.
chat-WhereAmI is sc-shown-once.
chat-NoIt’sFine is sc-inactive. chat-WhoHelped is sc-inactive. chat-Tia-YouGoToBeKidding is sc-inactive

Instead of talking to Tia: run a conversation from chat-HelloTia.

Report giving text for chat-HelloTia: instead say “[if EsherKnowsTia is false]Tia looks up surprised to see you[else]Tia looks up at you, blinking beautifully.[end if]”.
Carry out finding responses to chat-HelloTia: link to chat-WhereAmI.

Report giving link to chat-WhereAmI: instead say "‘Where am I?’ ".
Report giving text for chat-WhereAmI: now EsherKnowsTia is true;
Carry out finding responses to chat-WhereAmI: now
chat-NoIt’sFine is sc-active; now chat-WhoHelped is sc-active; link to chat-NoIt’sFine; link to chat-WhoHelped; instead say "Tia looks at Esher unblinking, and begins to speak. ‘don’t worry’ she says in a sympathetic tone. ‘I know you’re probably shaken, but I’m not going to hurt you. Last night when I came downstairs to get a drink the entire room filled with a bright white light. I was completely surprised! You fell out of the light, all the way from the ceiling to the floor! I didn’t know what to do. You wouldn’t wake up, so I got someone from town to help carry you upstairs into the spare room. I hope you didn’t mind waking up there too much.’ ".

Report giving link to chat-NoIt’sFine: instead say "'No, it’s alright. ".
Report giving text for chat-NoIt’sFine: instead say “Tia looks at you and says ‘Good, I was hoping you wouldn’t be to surprised, what happened anyway?’”.
Carry out finding responses to chat-NoIt’sFine: try finding responses to chat-HelloTia instead.

Report giving link to chat-WhoHelped: instead say "'Who helped?. ".
Report giving text for chat-WhoHelped: instead say “Tia looks at you and says ‘I got chopper the town’s wood cutter to help. He’s big and strong. He was the first person I could think of that would be able to carry you upstairs.’”.
Carry out finding responses to chat-WhoHelped: try finding responses to chat-HelloTia instead.[/code]

When I type talk to Tia the conversation starts…but when I press the first and only option available at the start of the conversation I get this error, but yet, it still works, lol…

as you can see the conversation carries on, but that error will look bad in the game. I’m not sure what’s causing it…

First your rule “report giving text for chat-WereAmI” runs (and sets EsherKnowsTia to true).
Then a report giving text rule defined in the extension also runs (and produces the error message).
That is because report rules do not stop the action. By default ALL the report rules for a given action run one after another.
However, you can easily stop an action short by adding the word “instead” to the body of your rule. Try this:

Report giving text for chat-WhereAmI: instead now EsherKnowsTia is true; or this:

Report giving text for chat-WhereAmI: now EsherKnowsTia is true; stop the action.

oops. I was just about to come on here, and say that I found a solution to that error. I had the code ordered wrong. I had to change that whole section to…

Report giving link to chat-WhereAmI: instead say "'Where am I?' ". Report giving text for chat-WhereAmI: instead say "Tia looks at Esher unblinking, and begins to speak. 'don't worry' she says in a sympathetic tone. 'I know you're probably shaken, but I'm not going to hurt you. Last night when I came downstairs to get a drink the entire room filled with a bright white light. I was completely surprised! You fell out of the light, all the way from the ceiling to the floor! I didn't know what to do. You wouldn't wake up, so I got someone from town to help carry you upstairs into the spare room. I hope you didn't mind waking up there too much.' "; Carry out finding responses to chat-WhereAmI: now EsherKnowsTia is true; now chat-NoIt'sFine is sc-active; now chat-WhoHelped is sc-active; link to chat-NoIt'sFine; link to chat-WhoHelped;

that fixed that, but I still have a bug in my conversation that I can’t quite pinpoint yet. The entirety of my code is a bit messy, and will need to be tidied up, but this what I have so far…

[code]Tia is a woman in Tia’s House First Floor.

chat-HelloTia, chat-NoIt’sFine, chat-WhoHelped, chat-WhereAmI , chat-Tia-WhoAreYou, chat-TiaI’mNotSure, chat-TiaChatAgain and chat-GoodBye are chat nodes.

chat-WhereAmI is sc-shown-once.

chat-NoIt’sFine is sc-inactive. chat-WhoHelped is sc-inactive. chat-TiaI’mNotSure is sc-inactive.

Instead of talking to Tia: run a conversation from chat-HelloTia.

Report giving text for chat-HelloTia: instead say “[if EsherKnowsTia is false]Tia looks up surprised to see you[else]Tia looks up at you, blinking beautifully.[end if]”.
Carry out finding responses to chat-HelloTia: link to chat-WhereAmI; link to chat-Tia-WhoAreYou.

Report giving link to chat-WhereAmI: instead say "‘Where am I?’ ".
Report giving text for chat-WhereAmI: instead say "Tia looks at Esher unblinking, and begins to speak. ‘don’t worry’ she says in a sympathetic tone. ‘I know you’re probably shaken, but I’m not going to hurt you. Last night when I came downstairs to get a drink the entire room filled with a bright white light. I was completely surprised! You fell out of the light, all the way from the ceiling to the floor! I didn’t know what to do. You wouldn’t wake up, so I got someone from town to help carry you upstairs into the spare room. I hope you didn’t mind waking up there too much.’ ";
Carry out finding responses to chat-WhereAmI: now EsherKnowsTia is true; now chat-NoIt’sFine is sc-active; now chat-WhoHelped is sc-active; link to chat-NoIt’sFine; link to chat-WhoHelped;

Report giving link to chat-NoIt’sFine: instead say "'No, it’s alright. ".
Report giving text for chat-NoIt’sFine: now chat-TiaI’mNotSure is sc-active; link to chat-TiaI’mNotSure; instead say “Tia looks at you and says ‘Good, I was hoping you wouldn’t be to surprised, what happened anyway?’”;
Carry out finding responses to chat-NoIt’sFine: try finding responses to chat-HelloTia instead; link to chat-Tia-WhoAreYou.

Report giving link to chat-WhoHelped: instead say "'Who helped?. ".
Report giving text for chat-WhoHelped: instead say “Tia looks at you and says ‘I got chopper the town’s wood cutter to help. He’s big and strong. He was the first person I could think of that would be able to carry you upstairs.’”;
Carry out finding responses to chat-WhoHelped: try finding responses to chat-HelloTia instead; link to chat-Tia-WhoAreYou.

Report giving link to chat-Tia-WhoAreYou: instead say “Who are you?”.
Report giving text for chat-Tia-WhoAreYou: instead say “Tia looks away for a brief moment then returns to Esher’s gaze, saying 'I’m Tia, of Kileaf. I’m the flower girl here. What happened to you anyway?”; now chat-TiaI’mNotSure is sc-active; now EsherKnowsTia is true;
Carry out finding responses to chat-Tia-WhoAreYou: try finding responses to chat-HelloTia instead; now chat-TiaI’mNotSure is sc-active; link to chat-TiaI’mNotSure.

Report giving link to chat-TiaI’mNotSure: instead say “I’m not sure.”
Report giving text for chat-TiaI’mNotSure: instead say “Esher looked up at Tia and said ‘I’m not sure. I was on the light, the lighthouse back home, and all of a sudden I was surrounded by a bright white light.’ he paused for a moment and added ‘I must have fallen off, or drifted.’ he paused a moment then asked ‘Where’s Kileaf anyway, in Celius?’”;
carry out finding responses to chat-TiaI’mNotSure: try finding responses to chat-HelloTia instead.[/code]

the new bug is coming from this section here…

[code]Report giving link to chat-Tia-WhoAreYou: instead say “Who are you?”.
Report giving text for chat-Tia-WhoAreYou: instead say “Tia looks away for a brief moment then returns to Esher’s gaze, saying 'I’m Tia, of Kileaf. I’m the flower girl here. What happened to you anyway?”; now chat-TiaI’mNotSure is sc-active; now EsherKnowsTia is true;
Carry out finding responses to chat-Tia-WhoAreYou: try finding responses to chat-HelloTia instead; now chat-TiaI’mNotSure is sc-active; link to chat-TiaI’mNotSure.

Report giving link to chat-TiaI’mNotSure: instead say “I’m not sure.”
Report giving text for chat-TiaI’mNotSure: instead say “Esher looked up at Tia and said ‘I’m not sure. I was on the light, the lighthouse back home, and all of a sudden I was surrounded by a bright white light.’ he paused for a moment and added ‘I must have fallen off, or drifted.’ he paused a moment then asked ‘Where’s Kileaf anyway, in Celius?’”;
carry out finding responses to chat-TiaI’mNotSure: try finding responses to chat-HelloTia instead.[/code]

when the player gets to choose option who are you the answer is dissplayed, and then that’s all the player can choose…for some reason it’s not linking to “I’m not sure.” That option never appears, and now all the player can do is choose 1 over, and over…which is “who are you.”

It’s the “insteads” that are fooling you.

An “instead” first or last on a line means (more or less) the same as a “stop the action;” after that line.

So, when Inform gets to a line that begins or ends with “instead”, it executes that line and then calls it a day, considering itself done with processing player actions for that turn.

So this:

Carry out finding responses to chat-Tia-WhoAreYou: try finding responses to chat-HelloTia instead; now chat-TiaI'mNotSure is sc-active; link to chat-TiaI'mNotSure.
only ever gets as far as this:

Carry out finding responses to chat-Tia-WhoAreYou: try finding responses to chat-HelloTia instead;
It stops short after “instead”.

You can move the “instead” to that last line of the rule instead (or – since the extensions default carry out finding responses rule actually does nothing – you can just skip the “instead” completely; the extension will not by default print any error message in this case, though it does that in the case of the report giving link to rulebook.)

okay, I see what you’re saying. I’m glad that come up, because I’m sure that would have been the dawning of many trip ups, not knowing that. Thanks again :slight_smile:

The whole rulebooks thing is a little confusing at first.

The most used rulebooks to do with actions are (in the order they are run through by Inform):

  1. Before
  2. Instead
  3. Check
  4. Carry out
  5. After
  6. Report

Instead and after rules by default stop the action:
that is, writing an instead or after rule (unless it explicitly tells the game to “continue the action;”) means that no more rules concerning that action will be considered.
The other rulebooks do not stop the action by default.

Thanks, I’m learning quite a lot from you guys. I was able to progress the story quite a bit…make some actions that worked without getting helpm, except they’re simple…

I got the player to have to go to sleep before having a second conversation with tia, and being able to leave her house, but I can’t quite seem to get the last conversation piece to link to the conversation…

[code]chat-TiaWhatsWrong is a chat node. chat-TiaWhatAreYouGoingToDo is a chat node. chat-TiaTalkToTiaMore is a chat node.
chat-TiaWhatsWrong is sc-inactive. chat-TiaWhatAreYouGoingToDo is sc-inactive. chat-TiaTalkToTiaMore is sc-active.

Report giving link to chat-TiaWhatsWrong: instead say “what’s wrong!?”.
Report giving text for chat-TiaWhatsWrong: instead say “I was upstairs when all of a sudden I heard some rustling downstairs. I came down to check it out, and to my surprise an imp was taking off with some of my flowers! I chased it through the kitchen a bit, and finally out the door.”.
carry out finding responses to chat-TiaWhatsWrong: now chat-TiaWhatsWrong is sc-inactive; now chat-TiaWhatAreYouGoingToDo is sc-active; link to chat-TiaWhatAreYouGoingToDo; try finding responses to chat-HelloTia instead.

Report giving link to chat-TiaWhatAreYouGoingToDo: instead say “What are you going to do?”.
Report giving text for chat-TiaWhatAreYouGoingToDo: instead say “Tia looks at you plainly and says ‘nothing. It’s not the first time this has happened here in town. The imp has actually been causing quite a disturbance within the village lately. We know that he’s coming from within the kraven forest, because people have seen him retreat there after being chased away by some of the villagers.’”.
carry out finding responses to chat-TiaWhatsWrong: link to chat-TiaTalkToTiaMore; now chat-TiaTalkToTiaMore is sc-active; try finding responses to chat-HelloTia instead.

Report giving link to chat-TiaTalkToTiaMore: instead say “Talk to tia more.”.
Report giving text for chat-TiaTalkToTiaMore: instead say “Tia, and Esher carried on a conversation that went well into the the morning’s day. ‘You should probably go explore town Tia said. It might be a good idea for you to get to know some people, and possibly find some answers you may be looking for.’ she then sighed ‘I doubt you’ll find any information too useful though. It is a small village tucked in the back of the kingdoms forest.’ Esher though about it for a moment, and spoke in agreement ‘You’re right. If I want to get out of here I’ve got to start somewhere…’”.
carry out finding responses to chat-TiaTalkToTiaMore: now CanLeaveTia’s is true; try finding responses to chat-HelloTia instead.[/code]

for some reason talk to Tia more doesn’t come up in the options to pick from…I’ve looked over the code, but I can’t figure out why…It looks right to me, lol.

:laughing: anyone? hope I can find the bug in this, haven’t been able to work on the game for awhile.

You have two ‘Carry out finding responses to chat-TiaWhatsWrong’ rules. Only the first runs (since it ends with an “instead”.)
I guess the second one was meant to be rather a ‘Carry out finding responses to chat-TiaWhatAreYouGoingToDo’ rule. (Probably you copy-pasted code and forgot to change the name of the chat-node.)

So change

carry out finding responses to chat-TiaWhatsWrong: link to chat-TiaTalkToTiaMore; now chat-TiaTalkToTiaMore is sc-active;  try finding responses to chat-HelloTia instead.

to

carry out finding responses to chat-TiaWhatAreYouGoingToDo: link to chat-TiaTalkToTiaMore; now chat-TiaTalkToTiaMore is sc-active;  try finding responses to chat-HelloTia instead.