I7 beginner here: currently trying to customize the usual “Taken.” My first attempts were:
Report an actor taking (this is the report taking rule):
If the actor is the player, say “(You take the [bold type][noun][roman type].)” (A).
The report taking rule response (A) is the phrase “(You take the [bold type][noun][roman type].)”
But neither worked. The second one seems closer, but Inform has a problem with the brackets inside the message that I can’t seem to figure out. How would I make this work?
The name of the rule is “standard report taking rule”, and you don’t need that “the phrase” there:
The standard report taking rule response (A) is "(You take the [bold type][noun][roman type].)"
The debugging command responses is very useful for finding out the names you need.
(Also, that response will give you an awkward message if the player takes a proper-named object. That won’t be an issue if there aren’t any, but it’s something you should keep in mind.)
Related question: how would I go about making a custom message for taking a specific item for the first time, or automatically getting an item as a result of taking another item (e.g., “As you take the box, a single coin falls out into your hand.”)?
Carry out taking the box for the first time:
now the player is carrying the single coin;
Report taking the box for the first time:
say "As you take the box, a single coin falls out into your hand.";
or:
Report taking the box for the first time:
say "As you take the box, a single coin falls out into your hand.";
now the player is carrying the single coin;
Note that if you use a report rule both the custom message and the standard taking message will be displayed. If you want to avoid that, you can either stop the action there, or use an after rule instead. Similarly, that carry out rule won’t actually prevent the box from getting picked up.
Thank you for that clarification. So that’s how I would proceed:
Report taking the box for the first time:
say "As you take the box, a single coin falls out into your hand.";
now the player is carrying the single coin;
stop the action.
That still won’t stop the box from being picked up, since report rules are only checked after carry out rules. If you want to do that, the simplest way would simply be to use an instead rule, but you could also put a rule succeeds in that carry out rule.
(Of course, this is all assuming that we even want the player not to take the box in the first place, which probably isn’t what OP wants. Given that message, I’d expect the box to be picked up too.)