"That isn't available." hardcoded message in I7?

I got this message error because I was trying to access an object that was not there in the current state of the world. Something like this:

Instead of stabbing the door: try stabbing the poster instead.

Now Imagine the poster is not part of the door yet, the parser gives the following message error:

That isn't available.

Well, the problem is that that message seems hardcoded (maybe I’m wrong) so people could not customise it.

But the main problem is that, then, that message could not be customised for other languages, so it appears in my Spanish game. Maybe I should submit a bug…

Regards.

1 Like

If you go to File->Open Extension->Graham Nelson->Standard Rules, you’ll be able to poke around and find where messages like that are defined. I found this:

The access through barriers rule translates into I6 as
	"ACCESS_THROUGH_BARRIERS_R" with
	"[regarding the noun][Those] [aren't] available." (A).

Which I copied into my testing program and turned into this:

Instead of attacking Billy The Orc:
	Try attacking the gopher.
	
The access through barriers rule translates into I6 as
	"ACCESS_THROUGH_BARRIERS_R" with
	"[noun] no está disponible" (A).

The gopher is an animal. The description is "A furry little beast!". The gopher is nowhere.

Office is a Room. The description is "Just a simple, normal, office...". The player is here.

Billy The Orc is a man in the office. "He drools a bit over his fangs and glares at you".

There may be a more elegant and less sledge-hammery way of doing this, but this appears to work. Output:

Office
Just a simple, normal, office...

You can see Billy The Orc here.

>punch billy
gopher no está disponible
1 Like

Thanks! This is great, because now I could update the Spanish extension.

1 Like

Fantastic :slight_smile: Glad to help :slight_smile:

1 Like

Since it’s a response, the easier way is this.

The access through barriers rule response (A) is "This should be in Spanish, but I don't know Spanish."
1 Like

You can also find these responses without opening the Standard Rules, by typing “RESPONSES ALL” at your game’s command prompt… which gives you a truly unwieldy text dump, but you can ctrl-F through it for “available” (or whatever other key word you can find that isn’t adaptive text).

1 Like

Yeah, I copied them all into a file called “standard responses.txt” that I always have open in Notepad++ (put your favorite editor here) while I’m working in Inform.

The really tricky situations are when unwanted stray punctuation marks or whatever somehow find their way in from the standard rules even after the text is changed.

1 Like

Yeah, punctuation marks tend to be hard coded. If you want to change those you have to substitute in a new rule, generally.

1 Like

I’m running into this problem right now. I have a widget that becomes part of a doodad at some point, and then you need to fidget the widget (or the doodad) to progress.

I don’t think anyone would try to fidget the doodad before being prompted, because it’s not a standard action, but it’s possible, and if they do, they’ll get the “That isn’t available” response. I’d like to disable this entirely, or redirect fidgeting the doodad to the responses I have customized for the fidgeting action (which is currently an “Instead of fidgeting” rule because apparently I can’t learn). Is there a way to do this?

2 Likes

This message is printed if you use “try…” to cause an action that’s physically impossible for some reason, and Inform can’t come up with a better explanation of why it’s impossible (usually because the thing you’re trying to access is off-stage—otherwise it’ll say “you can’t reach into [wherever]”).

The easiest solution is to find the rule that’s trying something impossible, and add a condition to it, so it doesn’t try that action unless the thing is on-stage.

4 Likes

(Well, strictly speaking not just “try”. But normally the parser keeps you from attempting any actions that are impossible in this particular way. You can also make this happen if an Understand line with “[any thing]” tries to touch something off-stage, but why would you do that?)

2 Likes

Thanks! That was really helpful advice and it was clear where the problem was (it WAS a “try”),and it’s fixed now with a condition.

Oh, the joy of knowing how many more things like this await me in my Inform adventures!

3 Likes