intfiction.org

The Interactive Fiction Community Forum
It is currently Fri Nov 16, 2018 1:59 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Sun Aug 12, 2018 7:05 pm 
Offline

Joined: Wed Aug 13, 2008 11:39 am
Posts: 37
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"


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Aug 12, 2018 7:27 pm 
Offline
User avatar

Joined: Wed Oct 14, 2009 4:02 am
Posts: 2546
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: https://github.com/i7/extensions/blob/m ... rlinks.i7x


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Aug 12, 2018 9:46 pm 
Offline

Joined: Wed Nov 12, 2014 5:20 pm
Posts: 190
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.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Aug 12, 2018 11:54 pm 
Offline

Joined: Wed Aug 13, 2008 11:39 am
Posts: 37
Angstsmurf wrote:
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.

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.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Aug 13, 2018 4:17 am 
Offline

Joined: Wed Nov 12, 2014 5:20 pm
Posts: 190
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"


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Aug 13, 2018 9:47 am 
Offline

Joined: Wed Aug 13, 2008 11:39 am
Posts: 37
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.)

Code:
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]."



Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Aug 13, 2018 10:49 am 
Offline

Joined: Wed Nov 12, 2014 5:20 pm
Posts: 190
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.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Aug 16, 2018 12:56 pm 
Offline

Joined: Wed Aug 13, 2008 11:39 am
Posts: 37
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.)


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Aug 16, 2018 2:50 pm 
Offline

Joined: Wed Nov 12, 2014 5:20 pm
Posts: 190
Great to hear! Looking forward to trying it out.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Fri Aug 17, 2018 10:45 am 
Offline
User avatar

Joined: Sat Apr 10, 2010 8:40 pm
Posts: 141
Location: Washington, DC, USA
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


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group