Appending more info after a message

I want to ask the player a question after an NPC has explained about expeditions sponsors. I’m not sure how to syntax this.
I looked into the “After printing the name of” rules, but not help.

Description of sponsor_expansion is "[first time] 'In some cases, the Guilds will ask to send someone on a mission. Sometimes they will even pay ahead of time, but that is a rare occurrence.' Ganon looks away for a moment as if thinking about syaing more, then looks back at you. He continues, 'You have to be special, someone they know, someone who has, well...more experience than you.'[only]".

After printing the description of sponsor_expansion:
	say "Were you interested in some work? (reply Y/N): ";
	if player consents:
		say "[description of get_job_posting]";
	otherwise:
		say "Okay, then.";

The descirption of job posting works fine, but I can’t get there.
Any suggestions?

If it helps, the description of sponsor expansion is printed after the player enters ask ganon about sponsors.

After asking Ganon about something

doesn’t seem to fit well either.

It might help if you included some compileable (or nearly compileable) code with your rough problem isolated. It’s difficult to tell how you’ve defined the “printing the description” activity from this.

That aside, I can pinpoint some issues:

  1. I don’t think that using “[first time]” is the way to go here. In fact, setting aside questions of practicality it seems to be having trouble with being expanded for comparison purposes. Once you remove that, it prints just fine. I’m personally not sure if anything about this has been fixed since this thread.
  2. Moreover, even if the description would print nothing my off-the-cuff testing shows you’d run into issues with all of that “Y/N” stuff still happening… probably because you did just finish the printing the description activity for sponsor_expansion.
  3. You spelled “saying” wrong at “as if thinking about syaing more“.

Is there a reason you’re using a printing the description activity for this and not putting it all in those after rules? This is just a quick mock-up to get the idea across, since I’m not entirely sure of your current architecture or what you want to do in the long run, but it seems to be roughly what your code would output if it worked? This would let players ask again if they said no the first time, though. Not sure if that’s desired or not.

Sponsor_expansion is a thing.
Get_job_posting is a thing.
Description of sponsor_expansion is "'In some cases, the Guilds will ask to send someone on a mission. Sometimes they will even pay ahead of time, but that is a rare occurrence.' Ganon looks away for a moment as if thinking about saying more, then looks back at you. He continues, 'You have to be special, someone they know, someone who has, well...more experience than you.'".
Description of get_job_posting is "Lovely!".

The Garden is a room.
Ganon is a person in the garden.

After asking Ganon about "sponsors" when the description of sponsor_expansion is not "":
	say "[description of sponsor_expansion][paragraph break]Were you interested in some work? (reply Y/N): ";
	if player consents:
		say "[line break][description of get_job_posting][line break]";
		now the description of sponsor_expansion is "";
	otherwise:
		say "Okay, then.";

Garden
You can see Ganon here.

>ask ganon about sponsors
“In some cases, the Guilds will ask to send someone on a mission. Sometimes they will even pay ahead of time, but that is a rare occurrence.” Ganon looks away for a moment as if thinking about saying more, then looks back at you. He continues, “You have to be special, someone they know, someone who has, well…more experience than you.”

Were you interested in some work? (reply Y/N): y

Lovely!

>ask ganon about sponsors
There is no reply.

It might be worth considering something like scenes for this. You would also want some output for subsequent attempts.

1 Like

YOU: It might help if you included some compileable (or nearly compileable) code with your rough problem isolated. It’s difficult to tell how you’ve defined the “printing the description” activity from this.
ME: That’s all the compilable code there is: some description text and the rule to print some more.

YOU: It’s difficult to tell how you’ve defined the “printing the description” activity from this.
ME: The definition is in the first line of code. It is merely text. It is invoked from a ASK GANON ABOUT table.

Re your point 3: I don’t see where I used the word saying or syaing.

Is there a reason you’re using a printing the description activity for this and not putting it all in those after rules?

I have a lot of instances where “after the description(s)” are printed, I ask the player about work or a job, etc. You are suggesting I make these texts ‘things’, and then I can use

After printing the name of sponsor_expansion:  
	say "Were you interested in some work? (reply Y/N): ";

It actually doesn’t print the name but the description of that thing, correct?

First off, I meant right here. Hope you don’t mind! I thought you might want to know since I caught it while making something to help with your problem!

Wait, have you defined a “printing the description of” activity?

(Oh, I wasn’t suggesting anything there. I just didn’t guess that you were using a table from your example.)

No, it would still print the name unless you put all of that in the name field. I made an after rule for “asking ganon about ‘sponsors’“. It takes effect under the right conditions, and since a successful after rule immediately cuts off the action you wouldn’t get the “no reply” message after it.

I’m not sure if there’s any basis for this, but I have a feeling that using if player consents in an activity rule is probably a very bad idea.

Besides that, printing the description is not a built-in activity. If you haven’t defined it elsewhere in the code, then it won’t do anything (presumably, won’t even compile).

Considering that you want to ask the question “after an NPC has explained”, I would think the logical place to put it is exactly where the NPC explains. So, where is that? What precisely causes the NPC to explain?

1 Like

Yeah, the reason I was asking whether the activity was defined is that it doesn’t exist by default. One example in the documentation (#337: Crusoe under §18.5. New activities) shows how to define an activity just like this (although I would agree with Celtic that you probably don’t need to tie this behaviour to printing the description itself). If you want to standardize this then action rules are a good way to do it anyways. This only really occurs player-side, after all.

(Although if it makes you feel any better, isn’t that kind of what the included “menu” extensions are vaguely about? Placing it around a printing activity might be another question, though. Overkill, so to speak.)

I did assume that printing the description was built-in because “after printing ” works so well in other places; like, after printing an item in inventory.

Why is putting if the player consents into a rule a bad idea? Where else would it go?

Although I have worked around this, I would like to know how to built a rule to print a description, but don’t know how to do that.

Thank you for catching that typo. It never saw it, even when I looked again for it. :confused:

I would like to create a printing the description activity, but don’t know how. I thought it was built-in.
I did associate these descriptions with things, and it did work. However, I have all these things related to a table. However, it did lead the way to a solution that works without having to print bare descriptions.

1 Like

I have many places where Ganon answers a question, and there are many answers that come from a table.After each of these answers, he asks the player a question. I was able to add the if the player consents code into a rule and change the table entry to trigger that rule.

Here is the final code. I print the description within a rule in which I ask the player a question.

This is the jobOffer rule:
	if player has jp1:
		say "[description of mission_overview][line break]";
		say "Does this sound interesting to you?[line break](Reply Y/N) ";
		if player consents:
			now the status of jp1 is accepted;
			say "[description of mission_accepted][line break] ";
		otherwise:	
			now the status of jp1 is denied;
			say " 'Well, okay. Just put the job posting back on the board in case others are interested.' ";
		update Table of Missions with status of jp1 for missionNbr of jp1;
	otherwise: [need the posting to proceed]
		say "[description of get_job_posting]";

In my table, I trigger this rule.The rule ask the player if he/she wants a particular mission. If yes, it is recorded in a missions log for status, and scoring later.

1 Like