hyperlinks and glulx entry points

Hi, all. So, the core thin I am interested in doing is using hyperlinks and something like Flexible Windows in Glulx at the same time. The latest version of Flexible Windows, which I got from the extensions github, requires a version of Glulx Entry Points that is newer (10/160919) than the one that the built-in one (10/140425). So far so good.

There’s a couple different extensions to do hyperlinks – Basic Hyperlinks by Emily Short and Inline Hyperlinks by Erik Temple (and Daniel Stelzer). The extensions work if I use them with the older version of Glulx Entry Points, but not with the newer Glulx Entry Points. The way that it fails is that the links appear, but if you click on them nothing happens.

I’ve been able to reproduce the problem all the way down to the example (swapping in and out the version of Glulx Entry Points in the folder). Any thoughts either on the problem or what I could do to be able to work around it.

[code]Include Basic Hyperlinks by Emily Short.

Your apartment is a room. A widget is a thing in your apartment.

The printed name of widget is “[set link 1]widget[end link]”

Table of Hyperlink Glulx Replacement Commands (continued)
linknum replacement
1 “take widget”[/code]

Yeah sorry for the sad state the extensions are all in. You could try this extension, but I can’t remember if it’s actually up to date: github.com/i7/extensions/blob/m … rlinks.i7x

Most of the extensions used in Counterfeit Monkey are too modified to use directly in other projects, but by taking the Glulx Entry Points from the Emily Short folder and Glk Events, Glk Object Recovery and Glulx Definitions from the Dannii Willis folder, you should be able to get Basic Hyperlinks to work. At least your example code seems to work for me.

It will still have the problem with extra line breaks discussed here, though.

This worked. I also took the Flexible Windows extension from the Counterfeit Monkey folders and they all seemed to work together. Thanks!

If you open up a second window and put text with a hyperlink in it, that hyperlink doesn’t work, but I think that’s a different (and maybe insuperable) matter.

It seems that Basic Hyperlinks assumes that the links are in the main window. But Inline Hyperlinks and the Hyperlinks extension that Dannii linked to should work with separate windows. This works for me, if only in one window:

[code]Include Flexible Windows by Jon Ingold.
Include Hyperlinks by Dannii Willis.

Your apartment is a room. A widget is a thing in your apartment.

The printed name of widget is “[link 1]widget[end link]”

Table of Glulx Hyperlink Replacement Commands (continued)
link ID (number) replacement (text)
1 “take widget”[/code]

Hmm. Interesting. I can get it to work with Dannii’s Hyperlinks extension but NOT with the Inline Hyperlinks extension. (The links from Inline Hyperlinks work in the main window only.) I don’t know if this is because of something small in Dannii’s code that could easily be added to Inline Hyperlinks, or something more fundamental.

(I like the way that inline hyperlinks works more than having to have a separate table, but maybe I can make a wrapper for Hyperlinks to mimic that part of Inline Hyperlinks.)

Your apartment is a room.

A widget is a thing.  A widget is here.  

Include Flexible Windows by Jon Ingold.
Include Hyperlinks by Dannii Willis.
Include Rewrite the Command Line by Ron Newcomb.
[Include Inline Hyperlinks by Daniel Stelzer.]

The other window is a text buffer g-window spawned by the main window.
The position of the other window is g-placebelow.
The measurement of the other window is 20.

When play begins:
	open the other window.

Rule for refreshing the other window:
	say "[other-window-text]".
	
Every turn:
	refresh the other window.

	
[FOR DANNII]

The printed name of the widget is "[link 1]widget[end link]".
	
Table of Glulx Hyperlink Replacement Commands (continued)
link ID (number)	replacement (text)
1	"take widget"

[
FOR INLINE HYPERLINKS

To say other-window-text:
	say "This text also talks about the [printed name of the widget]."
	
The printed name of the widget is "[link]widget[as]take widget[end link]".
]

To say other-window-text:
	say "This text also talks about the [printed name of the widget]."

Yeah, sorry, Inline Hyperlinks only supports hyperlinks in the main window or the status window. It shouldn’t be too hard to combine the best parts of these extensions, but it isn’t trivial either.

I think I was able to splice the two extensions together. If I play with a bit more to convince myself it works, I’ll submit it as My First Inform Extension. (With due credit to the I7 giants on which my splicing stands.)

Great to hear! Looking forward to trying it out.

If you’d be content to have your game played via web browser, how about vorple? Take a look at the the core extension plus vorple hyperlinks.

  • Jack