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.
“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?
“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.)
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.