Extension bugs?

Hi! Brand new author here. i wanted some help coding some secret passageways, so i installed Hidden Items by Krister Fundin. But at compile time, the tool said there was a bug.

Then i tried Secret Doors by Andrew Owen, but same problem: the compiler threw an error.

i have completely gutted my file so that these extensions (and one room) are the only code, to make sure it was nothing i was doing.

Am i just using a newer version of the compiler (6M62) than these extensions can handle, or … what’s going on? i doubt the authors would release these extensions if they were buggy. (Although in Secret Doors, there are at least two lines that repeat the word “when,” so i am suspicious).

  • Ryan

Did you download these extensions from the Public Library, or from the inform7.com site? There’s been a sort of messy migration with the new versions of I7, but extensions installed through the IDE itself (look at the Extensions tab) should always be right for your I7 version.

Have you tried Easy Doors by Hanon Ondricek? I’ve used that for hidden doors many times. You should be able to get that through the IDE.

Jason

i can switch to something else, sure … but as a beginner, i have to say it’s frustrating when an extension uploaded by a “pro” doesn’t work. Debugging is one of the most daunting tasks to a newcomer (how do you fix something you just started using?) i tried pulling the lines directly from the Secret Doors by Andrew Owen source, and it produces a compile-time error:

“[code]test” by Some Author

Include Secret Doors by Andrew Owen.

The passage door is a secret door.
The passage door is west of the Big Cave and east of the Secret Passage.

The lever is a secret switch in the Big Cave.

The cave wall is scenery in the Big Cave.

Instead of searching or examining the cave wall:
now the lever is revealed;
say “In a gap between two rocks you discover a lever.”

Instead of pulling the lever which is revealed for the first time:
now the passage door is revealed;
now the passage door is open;
say “As you pull the lever, a secret door opens, revealing a secret passage!”[/code]

And the error:

So i guess, as a newcomer, i’m interested to know: 1. why upload an extension without testing it? And 2. Why, as a community, keep it uploaded?

It was tested, but with an earlier version of Inform. See Draconis’s comment above.

Yep, saw it … so i made sure to install it through the IDE (and it’s still broken). Complete outsider’s opinion here, but extensions that appear to come through “official” channels like that should be bug-free. If they’re not (and this one isn’t), they should be removed.

Gavin Lambert’s Secret Doors update appears to correct what was wrong, but they shouldn’t both be available to install.

I agree that it’s frustrating that the extensions on the inform7.com website aren’t properly labeled–it should be made clear on the website itself that these are the old extensions. But it wouldn’t be good to remove them completely, because for whatever reason sometimes people need to work with older versions of Inform and need those extensions.

Also, I think when Draconis said that extensions installed through the IDE should work he meant extensions installed through the Public Library tab of the IDE. Extensions that you download yourself and then open up in the IDE will show up in the IDE but aren’t guaranteed to work.

(not to beat a dead horse here, but after Draconis’s post, i did install using the Public Library tab in the IDE.)

I’ve had mostly the same experience. There seems to be little in the way of code to test the extensions, especially multiple ones interacting with each other. Running with the latest version of Inform 7, you have to spend a lot of time finding out which extensions are still working / best adapted.

I’m working on some of the Interpreters to get glulx working on Android - and it’s very frustrating to figure out what is ‘good code’ to test technical issues vs. what is considered old/outdated dead-end paths. I really wish there was a set of modern Inform 7 samples that specifically exercised the top 30 popular extensions. For example, the collaborative work from 2009 - Alabaster story, I really wish was maintained and put up as a technical demonstration with all the extensions working. We do have Counterfeit Monkey - but it doesn’t even compile without crashing Inform 7 right now on Linux!

Are you sure? I may be missing something, but I don’t see Secret Doors by Andrew Owen in the Public Library. I do see Secret Doors by Gavin Lambert, which appears to be the updated version. And there are various other door-related extensions by Emily, Zarf and HanonO.

In the Mac IDE, when I click the “Extensions” tab, I see three more tabs across the top-a house, “Definitions,” and “Public Library.” The house (“home,” I guess) contains every installed extension, even the ones I haven’t installed through the Public Library. Clicking on the Public Library tab gets the Public Library extensions, which should all be up to date.

Is it possible that you downloaded the Secret Doors extension from the Public Library, but your code still says “Include Secret Doors by Andrew Owen”? Inform needs both the extension name and author name to find an installed extension, so in this case you need to write “Include Secret Doors by Gavin Lambert” in order to make sure you have the updated extension.

Yep -that’s it: House/Library tab confusion. Thanks!

This sounds like a poorly written example, and the complier is looking for an object called “the lever which is revealed for the first time”. It’s possible you could correct this by changing that line to After pulling the lever for the first time: reveal the lever; say "You pull the secret lever!"

Even though the lever is “secret” and can’t be seen, the player won’t know about it until they search, or if they’ve played the game before. That’s why you’d also reveal the lever if the player knows to pull it without searching.

Also

I don’t think “switch” is a kind of thing Inform knows implicitly. It knows “switch” as an action SWITCH [something] [ON/OFF]. You could use “device” which is a thing that can be switched on and off and recognizes PULL and PUSH automatically but doesn’t really work like a lever and will annoyingly declare itself “switched on” or “switched off”. Or

A thing can be pullable. A thing can be pushable. The lever is a thing in Big Cave. It is fixed in place. It is secret. It is pullable. It is pushable.

No problem!

The fix is just to change “the lever which is revealed” to “the revealed lever,” which is what Gavin Lambert’s updated extension does:

Instead of pulling the revealed lever for the first time: now the passage door is revealed; now the passage door is open; say "As you pull the lever, a secret door opens, revealing a secret passage!"

The documentation explains why you need “revealed”:

This happens because the lever really is present even before it’s revealed, so “pull lever” will get processed as the action of pulling the lever; what Secret Doors does is to intercept this action and mimic the error message you get when you try to act on something that isn’t there. This mechanic can interfere with “for the first time” stuff and also with things involving the turn sequence, I think; when you interact with something unrevealed it takes a turn and the Every Turn rules run, when you interact with something that’s not there a turn doesn’t pass. So it’s important to be careful about this.

(Honestly I’m not sure why it would be necessary to have a switch be secret instead of just keeping it off-stage until it’s revealed.)

Perhaps if you’ve installed it for standard doors which can’t be moved during play people just use it for other stuff too?

Hanon–Yeah, I see your point, and there’s some appeal to handling things the same way in the source code, but it also seems to me that the extension is a bit kludgey and it might be better to avoid using the kludge when you don’t have to. Anyway, caveat… er, whatever the Latin for “Inform authors who want to include the extension in their project” is. Emily would know.

Here’s a pedantic illustration of my point about the Every Turn rules. I modified the example in the extension documentation in order to add an object (the pebble) that gets moved on-stage when the lever gets pulled, and to add an Every Turn rule that prints a message every time it runs:

[spoiler][code]“Secret Cave Passage” by Gavin Lambert

Include Secret Doors by Gavin Lambert.

Big Cave is a room. “You’re not sure how you ended up here, but you’re surrounded on all sides by slightly damp rock. Fortunately the walls seem to contain faintly glowing moss, so there’s enough light to see by.”
The faintly glowing moss is scenery in the Big Cave. “It glows just barely enough to make out your surroundings.”

Secret Passage is a room. “For being so close to a cave, this passage is surprisingly well built and is lit by standard electrical bulbs. Unfortunately it also appears to be blocked by rubble not too far from the entrance; you can’t seem to proceed any further.”
The rubble is scenery in the Secret Passage. “It looks completely impassable.”

The passage door is an unopenable secret door. “It’s fairly unassuming. You’d never have known it was there until it opened.”
It is west of the Big Cave and east of the Secret Passage.

The hidden lever is a secret switch in the Big Cave. “Nestled almost invisibly between two rocks in the cave wall. [if the passage door is revealed]It has been pulled downwards.[otherwise]It points invitingly upwards.[end if]”

The cave wall is scenery in the Big Cave. “Nothing else more interesting presents itself. Just more glowing moss.”
Understand “damp rock” or “rock” as the cave wall.

Instead of searching or examining the cave wall for the first time:
now the lever is revealed;
say “As you examine the cave wall, in a gap between two rocks you discover a lever.”

There is a pebble.

Instead of pulling or pushing the revealed lever:
if the passage door is revealed:
say “You don’t have any desire to close the passage again.”;
otherwise:
now the passage door is revealed;
now the passage door is open;
say “A secret door opens with a rumble, revealing a secret passage in the west wall! Also a pebble falls from the ceiling.”;
now the pebble is in the Big Cave.

Test me with “w / x pebble/ x door / pull lever / x wall / pull lever / x pebble/ w”

Every turn: say “A turn passes!”[/code][/spoiler]

And you can see that examining the unrevealed stuff and examining the off-stage pebble both yield “you can’t see any such thing,” but examining the unrevealed stuff runs the Every Turn rules and examining the off-stage pebble doesn’t:

I know this an old thread, but I just ran into this myself while trying to compile one of my old games in 6M62. I was able to fix the Hidden Items (Version 2) extension by changing a single line in the “To hide (T - a thing):” section.

From this:

change the original location of T to the holder of T;

to this:

now the original location of T is the holder of T;

Hope that helps anyone else who might run into the problem.

1 Like