Location Images by Emily Short

I’ve moved your post into the specific topic for “Location Images”. Read it over and see if it helps out.

If I recall correctly, the extension downloaded from the Inform website is not the latest version, which is obtained from the Public Library inside the Inform IDE. Also, the version numbers might be wrong, which may require opening your extensions folder and physically deleting it before updating from the library.

Thanks. I found and installed the latest version. Now I get this error:

Problem. I am reading the sentence ‘The room illustration is Figure of fruit’ as saying that a thing called ‘room illustration’ is a value, but this makes no sense to me - it would be like saying ‘the chair is 10’.

How do I fix this? Thanks.

I was able to fix the bug by replacing room illustration with room-illustration. But I’m supposed to get a window that displays the image right? That’s not happening.

Do you have the image in the Figures folder which should be under the Materials folder?

Screenshot 2018-10-18 23.26.07.png

Thanks. Yes, it’s there. I can display the image using

when play begins:
display Figure of fruit.

So there’s no issue with the image itself.

This is my entire code right now:

"Tutorial" by Ameet Sharma

Include Location Images by Emily Short.

Figure of fruit is the file "fruit.png".

Frosty Ground is a room. The room-illustration is Figure of fruit. 

Shaded Area is west of Frosty Ground. 

Seems to work fine here.

EDIT: Does not work in any interpreter other than the Mac IDE, though.

At a quick test (on MacOS), it works in Lectrote and the (unreleased) Gargoyle.

Tested on Windows: works with the current Windows Inform 7 and the release Blorb works with Windows Glulxe, too.

Yeah, sorry, now it works here too. No idea what I did wrong.

Thanks everyone for testing. I appreciate it. Not sure what is wrong on my end. I’m using Inform 7 on Windows 10. I’ll try reinstalling.

That’s my setup also.

So you’re seeing an image when the file runs?

Yes. The first thing I would suggest is that, after building the game, go to the Index tab, then the Contents page, then scroll down until you get to section 4 (“Figures”). That should show whether Inform found your picture in the right place.

Thanks. Yes, the image is there.

I get the feeling that the Location Images extension is not installed properly. Because I can make the image display using

when play begins:
display Figure of fruit.


The room-illustration is Figure of fruit.

does not work for me.

I’ve attached a screenshot of my extensions, in the Index/Contents page.

Does this look right?

The version I have in my library is Simple Graphical Window v 9/160121
The previous poster who fixed the issue deleted all their extensions, then used the Library in the Inform7 IDE to re-download all of them.
You may not need to go that far; try opening your extensions folder and remove Simple Graphical Window, close and re-open Inform to make sure it’s no longer there, then go into the Extensions>Library and tell it to download the extension. You should get the “official” updated version.
It’s possible if you downloaded it from the Inform 7 website or any other location, you got a modified version possibly based on an older build of I7. If the version number you have is higher than what’s in the library, I believe Inform will resist updating it.
Sometimes people will modify extensions for a specific purpose and make that available if it fills a need.

Just checked, library versions are:
INSTALLED Location Images by Emily Short (Version 1). Allows the author to set per-room images and show these as the player moves from room to room. Requires Simple Graphical Window by Emily Short.
(Click here to review or discuss Location Images at the IFF)

INSTALLED Simple Graphical Window by Emily Short (Version 9/160121). Provides a graphics window in the upper part of the screen, in which the author can place images; with provision for scaling, tiling, or centering images automatically, as well as setting a background color. Extension requires Glulx Entry Points Version 7.
(Click here to review or discuss Simple Graphical Window at the IFF)

No, that looks all wrong. What I get (all extensions from the Public Library) is below. Those versions of extensions you have look to have come from the “Friends of Inform 7” GitHub page, which contains experimental and work-in-progress extensions: for example, the Public Library version of “Simple Graphical Window” does not need “Flexible Windows”. You don’t want to be using those versions without knowing exactly what you’re doing.

You want to delete all the extensions you’ve installed, and then get them again from the Public Library (on the Extensions Tab).

Thanks everyone. I will delete my extensions and reinstall as suggested.

Hello, I know I’m bringing back this thread from the dead, but I have a question. I’m using Location Images, but I was wondering if there is a way I can overlay characters on the location picture? (Such as having a JPG background, and then a transparent png on top.) I’m thinking of adding something like when you look at an inventory item have it overlay on the window, or when a person is in them room, they show up. (Even better when they talk, have them emote)

1 Like

I’ve not used Location Images personally, but I do not believe that extension and Glulx, whether played in an interpreter or in a browser, is set up to do layered image effects like a Visual Novel or move an icon around a static map image, or throw inventory image windows separately.

This might be something that would be more feasible using Vorple and CSS/JS possibly?

1 Like

@hal You can draw a transparent image on top of another. To draw over the location image, you have to draw another image after the location is drawn. A simple way to do this is to replace the current graphics drawing rule.

Here’s a working example:

Include Location Images by Emily Short.

Before starting the virtual machine:
	now the current graphics drawing rule is the draw location with an overlay rule;

Figure of kitchen is the file "kitchen.png".
Figure of bedroom is the file "bedroom.png".
Figure of overlay is the file "image_with_transparency.png".

The Kitchen is a room.
The room-illustration is figure of kitchen.

The bedroom is north of the kitchen.
The room-illustration is figure of bedroom.

This is the draw location with an overlay rule:
	clear the graphics window;
	draw the room-illustration of the location in the graphics window;
	draw the figure of overlay in the graphics window;