Using <img> tags in Quest

+1 vote
41 views
asked Mar 22 in Authoring by Alex (486 points)
recategorized Mar 27 by Alex

(This question originally asked by The Pixie on the textadventures forum)

While we can use the picture script command, I was wondering if I can put HTML "img" tags in text. I had a look at what the picture script command actually does, and it uses "img" tags, like this:

<img src="quest://local/flower.jpg?c=93347006">
<img src="quest://local/flower.jpg?c=93347124">
<img src="quest://local/flower.jpg?c=93347180">
<img src="quest://local/flower.jpg?c=93347183">

These were all for the same thing (looking at an item), performed twice in a play through, two separate plays through. So what is that number? It seems to increase every time. Even if you close Quest, then start it up again this number is remembered and increased, though not be the same amount each time.

It is not required offline, but it is online, and it does seem to matter what it is. So how do I get it? And what does it do?

1 Answer

0 votes
answered Mar 22 by Alex (486 points)
You can't use quest:// URLs in the browser - that's specific to the desktop version. This is why you must use the GetFileURL function to get the URL to your images, as it will always return the correct URL for the current player.

The ?c stuff is a "cache buster" to prevent the browser fetching the image from cache. It's just a number based on the current time (can't remember off the top of my head, but it'll be something like the number of milliseconds since some particular date).
This site is now closed.
As of 1st November 2015, this site is a read-only archive. For more information see the intfiction forum post

Welcome to IF Answers, a site for questions and answers about Interactive Fiction.

Technical questions about interactive fiction development tools such as Inform, Twine, Quest, QuestKit, Squiffy, Adrift, TADS etc. are all on-topic here.

Non-technical questions about interactive fiction are also on-topic. These questions could be about general IF design, specific games, entering the IF Comp etc.
...