Is the [text] token supposed to accept ""?

Still a beginner!

In §17.21. Understanding mistakes:


Understand "act" as a mistake ("To join the actors, you have to adopt a role in the play! Try PLAY HAMLET or similar.") when the location is the Garden Theatre.

That still has the drawback that the command “act hamlet” will not be recognised: so the final version we want is probably

Understand "act [text]" as a mistake ("To join the actors, you have to adopt a role in the play! Try PLAY HAMLET or similar.") when the location is the Garden Theatre.

since the “[text]” part will soak up any words the player types (or none), meaning that any command at all whose first word is “act” will be matched.

But the “(or none)” part doesn’t seem to be true. When I paste

Understand "act [text]" as a mistake ("To join the actors, you have to adopt a role in the play! Try PLAY HAMLET or similar.")

into my source, I get this:

>act hamlet
To join the actors, you have to adopt a role in the play! Try PLAY HAMLET or similar.

>act
I didn't understand that sentence.

It’s the same when I try “act[text]” without a space.

Is it the documentation or is it me?

Unfortunately I don’t believe this is documented. But all parsing in Inform happens on the word level: every parser token (*) has to match one or more words, or it’s not a match. So act and act [text] will never match the same input.

(*) There’s one weird exception: you can write word/-- to match either the literal "word" or nothing at all. This was added just for convenience to deal with English prepositions, and isn’t a regular, systematic part of the parser.

Thank you for confirming. That’s what I thought, since that’s how it seems to behave. Pretty strange for the manual to claim otherwise in this one place.

You could just create those actions you want to block and INSTEAD the heck out of them (or do more creative stuff).

The Wicked Stage is a room.

Acting out is an action applying to one thing. Understand "act [any thing]" and "recite [any thing]" and "act out [any thing]" and "perform [any thing]" as acting out.

Acting generically is an action applying to nothing. Understand "act" and "emote" and "soliloquize" as acting generically. 

Playing is an action applying to one thing. Understand "play [something]" as playing. 

Instead of playing something:
	say "You first need years of training to play [the noun]."
	
Instead of acting generically:
	say "You're the understudy. Stop that at once."
	
Instead of acting out something:
	say "[The noun] perhaps isn't the best vehicle for this venue."
	
Hamlet is a backdrop. It is everywhere.

The Vagina Monologues is a backdrop. It is everywhere.

The fake boulder is a backdrop. It is everywhere.

Wicked Stage

act

You’re the understudy. Stop that at once.

play Hamlet

You first need years of training to play Hamlet.

perform the vagina monologues

The Vagina Monologues perhaps isn’t the best vehicle for this venue.

play me

You first need years of training to play yourself.

play boulder

You first need years of training to play the fake boulder.

play second fiddle

You can’t see any such thing

I’d, of course, go crazy making kinds of backdrops (playscripts, characters, inappropriate scripts) to respond better, but that’s the general idea.

A work is a kind of backdrop.
An musical is a kind of work. A musical has a text called reason.
Instead of performing a musical:
      say "[The reason of the noun]"
Carousel is a musical. It is everywhere. The reason is "Please don't."
1 Like

That’s actually how I’ve been proceeding — defining lots of actions just for the purpose of colorfully blocking them. The “understand as a mistake” construction seems pretty limiting; I just wanted to know how to use it as intended.

Seems like the Writing With Inform example ought to just be

Understand "act" and "act [text]" as a mistake ("Try PLAY HAMLET... or even better, don't.").

Right?

But I agree that it’s definitely better to get more specific, at least in relation to actions that are plausibly relevant to the story. And your way is certainly safer when it comes to making sure the player can never, under any circumstances, perform Carousel.

1 Like