Test conundrum

I have a Table of Emporium Services from which I ask my NPC Ganon about.
If I “walk” to the Emporium and ask Ganon about services, I get the proper response. However, if I run the test

test ganonin with "gonear emporium/...".

I get to the emporium but all the topics are not found. I don’t think it should make a difference whether I call the test or walk to the location.
Anyone know how this can be?
NOTE: The Emporium is in an extension, in case that makes a difference.

EDIT: I found two pieces of experimental data:
[1] If I GONEAR EMPORIUM, the ASK GANON ABOUT SERVICES gives I can’t see any such thing response. However, If I leave and come back (such as W.W.E.E), all works fine.
[2] If I GONEAR EMPORIUM without the test, it also does not work correctly, so we can rule out a problem with the TEST command.

If you SHOWME GANON immediately after the GONEAR, what location does it give?

1 Like

Yeah, I believe you’d mentioned in the other thread that you have several locations with similar names, so I’m wondering whether that’s what’s going on?

The player is definitely at the Emporium as expected, but it seems to matter how the player got there.

It does matter. The debugging commands take shortcuts that don’t reproduce all of the effects of things or the player moving normally. Try gonear-ing a room next to the Emporium and then entering the Emporium.

1 Like

But if you SHOWME GANON immediately after the GONEAR, what location does it give?

1 Like

This is a good question. Also, @Falsoon2 , could you please show us the table header and the first line of the Table of Emporium Services? And I presume you have an action rule to the effect of carry out asking ganon about [...]. Could we see it, too, please?

actually, could you also start a transcript and enter the commands actions and rules before you gonear the emporium and ask ganon about services and attach the transcript file to a reply here, please?

2 Likes

Will do–in two parts. The source code in this part with the two ways of getting to the Emporium, and the second part with the transcript(s).

[Actions are indicated vs answer expansions from Emporium Entrance.
Services are listing in order of Emporium marquee.]
Table of Emporium Services
Topic	Answer
"services" 	"services_action"               
"outfitting/adventuring"	"[description of sponsor_expansion]"
"buying" 	"buy_action"
"selling" 	"sell_action"
"equipment/provisions" or "outfitting gear"	"[description of equip_expansion]"
"expeditions/sponsoring/sponsors" 	"[description of sponsor_expansion]"
"appraisals/appraising" or "gem appraisals"	"appraisal_action"
"equipment appraisals"	"appraisal_action"
"banking"  	"[description of banking_answer]"
["accounts" or "a private account" 	"account_action"
"loans" 	"loan_action"	]


[Connects the answer token to the action.]
Instead of asking Ganon about a topic listed in the Table of Emporium Services in Emporium:
	if there is no topic entry:
		say "Not my business.";
	if answer entry is:
	-- "services_action": try servicing;
	-- "appraisal_action": follow the getItemForAppraisal Rule;
	-- "buy_action": follow the getItemToBuy rule;
	-- "sell stuff": follow the getItemToSell rule;
	-- "weaponsTbl": display "W E A P O N S" inventory from Table of Arms;
	-- "armorTbl": display "A R M O R" inventory from Table of Body Protection;
	-- "equipTbl": display "E Q U I P M E N T" inventory from Table of Goods;
	-- "job_action": follow the newjob rule; 
	-- otherwise: 
		say "[answer entry]";

Servicing is an action applying to nothing. 
Carry out servicing:
	say " I offer many services. Just say the right words: [line break]";
	say " --APPRAISE <something>: to find the value of something you have.[line break]";
	say " --SELL <something>: to get money in exchange for something you have.[line break]";
	say " --BUY <something>: to get something in exchange for its price. [line break]";
	say " --OPEN A SAVING ACCOUNT: to start an account for saving or retrieving your assets.[line break]";
	say " --DEPOSIT <something>: to store away assets for later retrieval.[line break]";
	say " --WITHDRAW <something>: to retrieve something that was previously deposited.[line break]";
	say " --WITHDRAW <money>: to retrieve some money that was previously deposited.[line break]";
	say " --LEND <money>: to get a short-term loan for some amount of money.[line break]";
	say "[paragraph break]";

The code above shows the Table, the Ask Ganon rule’ and the servicing action output when asking Ganon about servicing (as an example). I see the services list with the walking commands “NW.E.E” but do not with GONEAR EMPORIUM.

1 Like

Here is a transcript. (I don’t really know how to do this, so I cut and pasted.)
What do you do? actions

Actions listing on.

What do you do? rules

Rules tracing now switched on. Type “rules off” to switch it off again, or “rules all” to include even rules which do not apply.

[Rule “parse command rule” applies.]

What do you do? gonear Emporium

[Rule “declare everything initially unmentioned rule” applies.]

[Rule “generate action rule” applies.]

[Rule “determine visibility ceiling rule” applies.]

[(1) looking]

[Rule “announce items from multiple object lists rule” applies.]

[Rule “set pronouns from items from multiple object lists rule” applies.]

[Rule “before stage rule” applies.]

[Rule “basic visibility rule” applies.]

[Rule “basic accessibility rule” applies.]

[Rule “carrying requirements rule” applies.]

[Rule “instead stage rule” applies.]

[Rule “requested actions require persuasion rule” applies.]

[Rule “carry out requested actions rule” applies.]

[Rule “descend to specific action-processing rule” applies.]

[Rule “work out details of specific action rule” applies.]

[Rule “investigate player’s awareness before action rule” applies.]

[Rule “player aware of his own actions rule” applies.]

[Rule “check stage rule” applies.]

[Rule “carry out stage rule” applies.]

[Rule “declare everything unmentioned rule” applies.]

[Rule “room description heading rule” applies.]

Ganon’s Emporium

[Rule “room description body text rule” applies.]

The room is filled with various kinds of equipment, all neatly organized and labeled: Armor, Weapons, Outfitting Gear, Provisions, and Miscellanea: anything an adventurer might need.

[Rule “room description paragraphs about objects rule” applies.]

[Rule “initialise locale description rule” applies.]

[Rule “find notable locale objects rule” applies.]

[Rule “standard notable locale objects rule” applies.]

[Rule “interesting locale paragraphs rule” applies.]

[Rule “don’t mention player’s supporter in room descriptions rule” applies.]

[Rule “don’t mention scenery in room descriptions rule” applies.]

[Rule “don’t mention undescribed items in room descriptions rule” applies.]

[Rule “set pronouns from items in room descriptions rule” applies.]

[Rule “offer items to writing a paragraph about rule” applies.]

[Rule “use initial appearance in room descriptions rule” applies.]

[Rule “describe what’s on scenery supporters in room descriptions rule” applies.]

[Rule “describe what’s on mentioned supporters in room descriptions rule” applies.]

[Rule “you-can-also-see rule” applies.]

[Rule “check new arrival rule” applies.]

[Rule “after stage rule” applies.]

[Rule “investigate player’s awareness after action rule” applies.]

[Rule “report stage rule” applies.]

[Rule “other people looking rule” applies.]

[Rule “last specific action-processing rule” applies.]

[(1) looking - succeeded]

[Rule “A first turn sequence rule” applies.]

[Rule “scene change machinery rule” applies.]

[Rule “every turn stage rule” applies.]

[Rule “timed events rule” applies.]

[Rule “advance time rule” applies.]

[Rule “update chronological records rule” applies.]

[Rule “A last turn sequence rule” applies.]

[Rule “scene change machinery rule” applies.]

[Rule “adjust light rule” applies.]

[Rule “note object acquisitions rule” applies.]

[Rule “notify score changes rule” applies.]

[Rule “parse command rule” applies.]

What do you do? ask Ganon about services

You can’t see any such thing.

NOTE that no rules were triggered after ask Ganon about services was entered. It kicked out on the word services, I assume?

1 Like

Here is a third set of actions/rules for walking to the Emporium. (I removed the sections for the intermediate rooms.)
What do you do? nw.e.e

[Rule “declare everything initially unmentioned rule” applies.]

[Rule “generate action rule” applies.]

[Rule “standard set going variables rule” applies.]

[going northwest]

[Rule “announce items from multiple object lists rule” applies.]

[Rule “set pronouns from items from multiple object lists rule” applies.]

[Rule “before stage rule” applies.]

[Rule “basic visibility rule” applies.]

[Rule “basic accessibility rule” applies.]

[Rule “carrying requirements rule” applies.]

[Rule “instead stage rule” applies.]

[Rule “requested actions require persuasion rule” applies.]

[Rule “carry out requested actions rule” applies.]

[Rule “descend to specific action-processing rule” applies.]

[Rule “work out details of specific action rule” applies.]

[Rule “investigate player’s awareness before action rule” applies.]

[Rule “player aware of his own actions rule” applies.]

[Rule “check stage rule” applies.]

[Rule “can’t travel in what’s not a vehicle rule” applies.]

[Rule “can’t go through undescribed doors rule” applies.]

[Rule “can’t go through closed doors rule” applies.]

[Rule “determine map connection rule” applies.]

[Rule “can’t go that way rule” applies.]

[Rule “carry out stage rule” applies.]

[Rule “move player and vehicle rule” applies.]

[Rule “move floating objects rule” applies.]

[Rule “check light in new location rule” applies.]

[Rule “after stage rule” applies.]

[Rule “investigate player’s awareness after action rule” applies.]

[Rule “report stage rule” applies.]

[Rule “describe room gone into rule” applies.]

[Rule “determine visibility ceiling rule” applies.]

[Rule “work out details of specific action rule” applies.]

[Rule “investigate player’s awareness before action rule” applies.]

[Rule “player aware of his own actions rule” applies.]

[Rule “check stage rule” applies.]

[Rule “carry out stage rule” applies.]

[Rule “declare everything unmentioned rule” applies.]

[Rule “room description heading rule” applies.]

Town Centre

[going northwest - succeeded]

Outside Ganon’s Emporium
[going east]

[Rule “announce items from multiple object lists rule” applies.]

[Rule “set pronouns from items from multiple object lists rule” applies.]

[Rule “before stage rule” applies.]

[Rule “basic visibility rule” applies.]

[Rule “basic accessibility rule” applies.]

[Rule “carrying requirements rule” applies.]

[Rule “instead stage rule” applies.]

[Rule “requested actions require persuasion rule” applies.]

[Rule “carry out requested actions rule” applies.]

[Rule “descend to specific action-processing rule” applies.]

[Rule “work out details of specific action rule” applies.]

[Rule “investigate player’s awareness before action rule” applies.]

[Rule “player aware of his own actions rule” applies.]

[Rule “check stage rule” applies.]

[Rule “can’t travel in what’s not a vehicle rule” applies.]

[Rule “can’t go through undescribed doors rule” applies.]

[Rule “can’t go through closed doors rule” applies.]

[Rule “determine map connection rule” applies.]

[Rule “can’t go that way rule” applies.]

[Rule “carry out stage rule” applies.]

[Rule “move player and vehicle rule” applies.]

[Rule “move floating objects rule” applies.]

[Rule “check light in new location rule” applies.]

[Rule “after stage rule” applies.]

[Rule “After going to Emporium” applies.]

[Rule “determine visibility ceiling rule” applies.]

[(1) looking]

[Rule “announce items from multiple object lists rule” applies.]

[Rule “set pronouns from items from multiple object lists rule” applies.]

[Rule “before stage rule” applies.]

[Rule “basic visibility rule” applies.]

[Rule “basic accessibility rule” applies.]

[Rule “carrying requirements rule” applies.]

[Rule “instead stage rule” applies.]

[Rule “requested actions require persuasion rule” applies.]

[Rule “carry out requested actions rule” applies.]

[Rule “descend to specific action-processing rule” applies.]

[Rule “work out details of specific action rule” applies.]

[Rule “investigate player’s awareness before action rule” applies.]

[Rule “player aware of his own actions rule” applies.]

[Rule “check stage rule” applies.]

[Rule “carry out stage rule” applies.]

[Rule “declare everything unmentioned rule” applies.]

[Rule “room description heading rule” applies.]

Ganon’s Emporium

[Rule “room description body text rule” applies.]

The room is filled with various kinds of equipment, all neatly organized and labeled: Armor, Weapons, Outfitting Gear, Provisions, and Miscellanea: anything an adventurer might need.

[Rule “room description paragraphs about objects rule” applies.]

[Rule “initialise locale description rule” applies.]

[Rule “find notable locale objects rule” applies.]

[Rule “standard notable locale objects rule” applies.]

[Rule “interesting locale paragraphs rule” applies.]

[Rule “don’t mention player’s supporter in room descriptions rule” applies.]

[Rule “don’t mention scenery in room descriptions rule” applies.]

[Rule “don’t mention undescribed items in room descriptions rule” applies.]

[Rule “set pronouns from items in room descriptions rule” applies.]

[Rule “offer items to writing a paragraph about rule” applies.]

[Rule “use initial appearance in room descriptions rule” applies.]

[Rule “describe what’s on scenery supporters in room descriptions rule” applies.]

[Rule “describe what’s on mentioned supporters in room descriptions rule” applies.]

[Rule “don’t mention player’s supporter in room descriptions rule” applies.]

[Rule “don’t mention scenery in room descriptions rule” applies.]

[Rule “don’t mention undescribed items in room descriptions rule” applies.]

[Rule “set pronouns from items in room descriptions rule” applies.]

[Rule “offer items to writing a paragraph about rule” applies.]

[Rule “use initial appearance in room descriptions rule” applies.]

[Rule “describe what’s on scenery supporters in room descriptions rule” applies.]

[Rule “describe what’s on mentioned supporters in room descriptions rule” applies.]

[Rule “you-can-also-see rule” applies.]

You can see Ganon here.

[Rule “check new arrival rule” applies.]

[Rule “after stage rule” applies.]

[Rule “investigate player’s awareness after action rule” applies.]

[Rule “report stage rule” applies.]

[Rule “other people looking rule” applies.]

[Rule “last specific action-processing rule” applies.]

[(1) looking - succeeded]

[going east - succeeded]

[Rule “A first turn sequence rule” applies.]

[Rule “scene change machinery rule” applies.]

[Rule “every turn stage rule” applies.]

[Rule “timed events rule” applies.]

[Rule “advance time rule” applies.]

[Rule “update chronological records rule” applies.]

[Rule “A last turn sequence rule” applies.]

[Rule “scene change machinery rule” applies.]

[Rule “adjust light rule” applies.]

[Rule “note object acquisitions rule” applies.]

[Rule “notify score changes rule” applies.]

[Rule “parse command rule” applies.]

What do you do? ask ganon about services

[Rule “declare everything initially unmentioned rule” applies.]

[Rule “generate action rule” applies.]

[asking Ganon about “services”]

[Rule “announce items from multiple object lists rule” applies.]

[Rule “set pronouns from items from multiple object lists rule” applies.]

[Rule “before stage rule” applies.]

[Rule “basic visibility rule” applies.]

[Rule “basic accessibility rule” applies.]

[Rule “access through barriers rule” applies.]

[Rule “carrying requirements rule” applies.]

[Rule “instead stage rule” applies.]

[Rule “Instead of asking Ganon about a topic listed in the Table of Emporium Services in Emporium” applies.]

[(1) servicing]

[Rule “announce items from multiple object lists rule” applies.]

[Rule “set pronouns from items from multiple object lists rule” applies.]

[Rule “before stage rule” applies.]

[Rule “basic visibility rule” applies.]

[Rule “basic accessibility rule” applies.]

[Rule “carrying requirements rule” applies.]

[Rule “instead stage rule” applies.]

[Rule “requested actions require persuasion rule” applies.]

[Rule “carry out requested actions rule” applies.]

[Rule “descend to specific action-processing rule” applies.]

[Rule “work out details of specific action rule” applies.]

[Rule “investigate player’s awareness before action rule” applies.]

[Rule “player aware of his own actions rule” applies.]

[Rule “check stage rule” applies.]

[Rule “carry out stage rule” applies.]

[Rule “Carry out servicing” applies.]

I offer many services. Just say the right words:

–APPRAISE : to find the value of something you have.

–SELL : to get money in exchange for something you have.

–BUY : to get something in exchange for its price.

–OPEN A SAVING ACCOUNT: to start an account for saving or retrieving your assets.

–DEPOSIT : to store away assets for later retrieval.

–WITHDRAW : to retrieve something that was previously deposited.

–WITHDRAW : to retrieve some money that was previously deposited.

–LEND : to get a short-term loan for some amount of money.

[Rule “after stage rule” applies.]

[Rule “investigate player’s awareness after action rule” applies.]

[Rule “report stage rule” applies.]

[Rule “last specific action-processing rule” applies.]

[(1) servicing - succeeded]

[asking Ganon about “services” - failed]

[Rule “A first turn sequence rule” applies.]

[Rule “scene change machinery rule” applies.]

[Rule “every turn stage rule” applies.]

[Rule “timed events rule” applies.]

[Rule “advance time rule” applies.]

[Rule “update chronological records rule” applies.]

[Rule “A last turn sequence rule” applies.]

[Rule “scene change machinery rule” applies.]

[Rule “adjust light rule” applies.]

[Rule “note object acquisitions rule” applies.]

[Rule “notify score changes rule” applies.]

[Rule “parse command rule” applies.]

1 Like

What happens if you SHOWME GANON right after the GONEAR? What location does it list?

It gives what one would expect.

What do you do? gonear emporium

Ganon’s Emporium

The room is filled with various kinds of equipment, all neatly organized and labeled: Armor, Weapons, Outfitting Gear, Provisions, and Miscellanea: anything an adventurer might need.

What do you do? showme ganon

Ganon - man

location: in Outside Ganon’s Emporium

unlit, inedible, portable; transparent, male; singular-named, proper-named

description: "He is a stout man who looks like he could give any fighter a run for his money. He is greying at the temples, which may reflect his experience in bartering deals and spotting cheaters.

"

initial appearance: none

weight: 0.0

cost: 0.0

Qty: 0

carrying capacity: 100

printed name: “Ganon”

printed plural name: “men”

indefinite article: none

list grouping key: none

What do you do?

Aha, so Ganon remains in the Outside location. I’m guessing you have some code that moves him between rooms—either explicitly, or implicitly using backdrops. What triggers that code?

2 Likes

When the player goes to the Emporium, then Ganon follows him/her in.

[Move Ganon into Emporium with player.]
After going to Emporium:
	now Ganon is in Emporium;
	try looking;

At the end of the test phrase, both Ganon and the player are in the Emporium. Right?

Yep, that would do it. If you use GONEAR to enter the Emporium, there’s no actual “going” action happening, so this rule never fires.

3 Likes

Do you have a suggestion on how to fix that?
I have “nw/e/e” in my test script but I’d prefer “gonear Emporium/ etc.” for my tests, especially if it is a long way to the room being tested.

The easiest answer is to just to put GONEAR OUTSIDE GANON’S EMPORIUM/E in your test code. Alternately, I guess you could change the after going rule to a before looking (in the Emporium) rule, since that’d trigger in both situations. In general, though, I think it’s a best practice to make sure your testing mirrors how a player will experience the game as closely as possible, rather than messing with your game to make the shortcut commands no player will ever use deliver a smoother experience (since it’s very possible for this to go the other way, and introduce a bug that won’t show up in your tests, but will show up when a player does things the normal way).

3 Likes

The thing that moves Ganon is an after going rule, but when you gonear there isn’t any going action. And gonear, like the other debugging commands isn’t a real action. As soon as the generate action rule runs and the game knows it’s processing gonear it sets the player’s location to the destination with the I6 PlayerTo routine, which automatically does a look action. In effect, it’s very close to the the player having already been in that location at the start of the turn and then issuing a look command.*

So you can’t rely on anything that depends on going to try to guarantee Ganon will be there if use of gonear is a consideration. In fact, it might be easier to keep it out of action-processing altogether. Hey, scenes’ rules happen outside of action-processing.

lab is room.
emporium is room.
outside-emporium is room. printed name is "Outside Emporium".
ganon is person in outside-emporium.
outside-emporium is east of emporium.

Emporiation is a recurring scene.
Emporiation begins when the location is emporium.
Emporiation ends when the location is not emporium.

when emporiation begins: try ganon going west.
when emporiation ends: try ganon going east.

test me with "gonear emporium / x ganon"

This code will make Ganon follow the player into and out of the Emporium as the player goes (conventionally, via going) between outside-emporium and emporium but also makes Ganon enter the Emporium subsequent to the looking action triggered by gonear. (As written, it assumes Ganon will never be anywhere but those two locations; if that’s not true, changes would be necessary.)

* A distinction is that unless the player is in darkness, the room they’re in will always already be visited by the time they see a command prompt.

2 Likes

I6 had a hook (the room’s initial property) which was run whenever the player entered a room, even by teleportation or debug command.

Occasionally I remember that this was dropped from I7, and I should make a list of situations where we miss it. But I have not done a good job of this.

3 Likes