Question about basic accessibility rules

Hi all - sorry about what I’m sure is a dumb question, but I’ve been digging at this for hours now with little to show for it.

Long story short: I’m trying to introduce a nice little action for testing called summon that simply brings a character to the current location. Seems simple enough, right?

[code]
Summoning is an action applying to one thing. Understand “summon [any person]” as summoning.

Carry out summoning:
Say “[the noun] appears through a sudden fog.”;
now the noun is in location of the player.[/code]

This…doesn’t work so well. It spits back a “You cannot reach into {the room the character specified is in}” message. I understand that in older versions of Inform I could have gotten around this with a procedural rule to ignore the basic accessibility rule, but that doesn’t work anymore. I tried adding the following:

[code]This is the summon-aware accessibility rule:
if summoning, allow access.

The summon-aware accessibility rule is listed before the basic accessibility rule in the action-processing rules.[/code]

but now all that happens is that trying to summon a character (e.g. “summon bob”) does nothing and results in an empty prompt.

I feel like I’m just on the verge of getting this sorted out (I’m really new at this) but after banging my head against it for this long I figured it would be worth asking for help.

The problem is:

Summoning is an action applying to one thing.

“one thing” without any qualifiers means that the thing must be touchable by the actor. You can remove this constraint by instead defining the action as applying to “one visible thing”. See §12.17.

Summoning Circle is a room.

Alice is a woman.
Bob is a man.
The ball is a thing.

Summoning is an action applying to one visible thing. 
Understand "summon [any thing]" as summoning.

Check summoning when the noun is not a person:
	instead say "[We] [can] only summon a living creature."

Check summoning when the location of the noun is the location:
	instead say "[The noun] [are] already here."

Carry out summoning:
	now the noun is in the location.
	
To appear is a verb.
Report summoning:
	say "[The noun] [appear] through a sudden fog."
	
Test me with "summon alice / l / summon alice / summon me / summon ball / summon bob / l".

Thank you! I knew it was something simple like that!

This does however kind of undermine what I thought I understood of the “visible” tag - I was assuming that “visible” meant “in the same location if not touchable” and had in fact attempted to define summoning as affecting one invisible thing, one nonvisible thing, one untouchable thing - all kinds of negative versions of the visible/touchable/carried spectrum from the manual. What does Visible apply to then - just tangible things that aren’t in darkness?

Thanks again!

“Visible” means “anything in scope” (usually, anything the actor can see). But then the “[any thing]” token means that everything is in scope. The function of “visible” here is just to turn off the “needs to be touched” requirement.

I forgot to mention: there is already such an action called ABSTRACT. Try ABSTRACT BOB in the test program that I posted. For more on the available debugging commands, see §24.3 and §24.4.

By the way, if you want more fine-grained control over the accessibility rules, the way to do it is probably with a basic accessibility rules rule for reaching [EDIT: Gah, sorry, the initial thing I wrote made no sense]:

Rule for reaching inside when summoning: allow access. [or whatever other conditions you want to put on it]

Part of the reason that procedural rules were eliminated may have been that it’s better to write rules like this than to mess around with procedural rules to turn off the accessibility rule. (Procedural rules were very computationally expensive, for one thing.)

More specifically, you can steal anything in the game (including stuff you wouldn’t normally be able to pick up) using PURLOIN:

PURLOIN LOST KEY
PURLOIN BOB THE HOBO

Will put them in your inventory.

ABSTRACT lets you move stuff to places other than your inventory no matter the location or destination:

ABSTRACT BOB THE HOBO TO BACK ROOM
ABSTRACT BREAD TO OVEN

(These of course only work in the IDE (and possibly a “release for testing”) but not in normally released games.)

Wow everyone, thanks for all the help and info! I really appreciate the explanations - after a couple hours in the manual it can all start to run together a bit.

These are built-in rules? I’ve been writing my own into the Not For Release section this whole time! (I call them SUDO GOTO and APT-GET though.)

I was also surprised by them when I found out. I think it should be properly documented; I’m not sure that it is.

They’re documented in section 24.4 of Writing w/ Inform.

Yes they are. I don’t know why I said that. Never mind.

I think the testing commands weren’t documented in Writing with Inform (or at least not much) before 6L02, that might be why you were confused.

The period when I really used Inform, and really read the manual through more than once, WAS before 6L02, so I’ll take that explanation. :slight_smile: Cheers!