More hyperlink help

Greetings all,
The latest hyperlink question. I am changing directions a bit and stripping ou graphics for now in my project but I will still have a right hand window with some text hyperlinks to execute commands. The direction command hyperlinks work fine. I have also written code to set the player’s attitude and that executes through its hyperlinks fine. All of these commands are executed from the table suggested in Flexible Windows.

Table of Glulx Hyperlink Replacement Commands (continued)
link ID	replacement 
1		"hostile" 
2		"neutral"
3		"pleasant"
4		"nw"
5		"n"
6		"ne"
7		"w"
8		"e"
9		"sw"
10		"s"
11		"se"

The code to execute the first three commands (attitude changers) is this (it works too)

[code]Understand “set attitude [approach]” or “set [approach]” or “[approach]” as setting attitude. Setting attitude is an action applying to one approach.

Carry out setting attitude:
now the attitude of the player is the approach understood.
Report setting attitude:
say “Now your attitude to others is [attitude of the player].” [/code]

Now I’d like to implement a go to room directly function (to cut down on repetitive typing) and execute it with a hyperlink in the side window.

I have two separate problems.

  1. When I try to add the command in my “Table of Glulx Hyperlink Replacement Commands (continued)”
Table of Glulx Hyperlink Replacement Commands (continued)
link ID	replacement 
12		"go to Your Farm"

and have the following carry out code

[code]Understand “go to [any room]” as moving to. Moving to is an action applying to one thing.

Carry out moving to:
say “you have traveled to [noun]”;
move the player to the noun;[/code]

It compiles but the game gives this response when the hyperlink is clicked

go to Your Farm
that noun did not make sense in this context.

  1. Okay so though I’d rather use the table for simplicity’s sake, in step two I tried to write out the hyperlink rule. So I deleted the line from the table of Glulx commands and went with this new code

Hyperlink processing rule when the current hyperlink ID is 12: try moving to Your Farm;

the carry out code remained the same.
OKAY now it does execute and put the player back at the room Your Farm. But now the command prompt and cursor disappear from the main window.

I tried adding this line

Tried, instead to add this line

No avail. So Ideally I’d like the table version in #1 to work but I’d settle for writing out the rules for these hyperlinks individually if I can get the loss of focus on the main window fixed.

Thanks as always – as you probably know I am new to your community and I have been pretty overwhelmed at the quick and outstanding solutions.
Jeremiah McCall

BTW - just in case my sincere thanks for help aren’t enough, this is part of project I am working on with a center at Ohio State University to finally get into leveraging Interactive Fiction tools for historical simulation/education purposes. My name is Jeremiah McCall and I do a fair amount of work on simulation games in high school history (my book Gaming the Past just came out this May). So, for what it’s worth, all your help is, I hope, going to a good purpose.

Your root difficulty actually has nothing to do with hyperlinks. Instead, the issue is the name of the room “Your Farm”: the player won’t be able to successfully type “GO TO YOUR FARM” any more than she can click on a hyperlink that issues that command. This is arguably a bug, though of course the player would probably prefer to type “MY FARM” in any case.

Anyway, if you change the command in the table to “GO TO FARM”, it should work just fine.


Much obliged as always, Erik. It’s funny; I was thinking today after I sent the post that “Your Farm” was both a horrible name and an not the best pronoun for the game character – but I didn’t (and probably should have) realized it upset Inform too. Everything is working; thanks.