Creating a macro system (ability to create commands that consist of compound actions)

Is it possible to create a system where:

  • user creates a compound command called “dispose of x”, that consists of two verbs within the game (“hold x” + “put x in trash” command that is inly valid when user is in same room as unlocked trashbin )
  • when user types “dispose of towel” in presence of trashbin, the towel item is automatically taken from inventory or room (if unencumbered), held, and put into the trashbin

Is there a game that allows users to create new commands, make the new command trigger multiple commands at once with either preset or enterable parameters?

Sure, that’s possible. Inform 7 supports regular expressions, which gives you a moderately powerful syntax for writing macros.

So the goal is for a user to say something like “macro dispose of (.*) = hold \1 then put \1 in trash”?

1 Like

There was some discussion of this idea last month: MUDish approach to playing IF

In general, it’s easier for the interpreter to provide a macro facility (for all games) than to implement the feature in game code. But the last time I tried this idea (admittedly, 25 years ago) it didn’t catch on – I think it was just too fussy for players to use.


Right – if you’re expecting a player to have to type TAKE X, PUT X IN TRASH CAN sufficiently often that you think they’d be willing to learn how a possibly-fiddly macro system works in order to automate the process, you’re probably better off just implementing DISPOSE OF X and letting the player know they can do that.

For some kinds of games – the MUDish/MMOish ones discussed in the other thread – I could see some level of player interest, I guess, but this is an area where it’s probably worth getting a mock-up in front of some testers and seeing how they’re engaging with the game and what, if any, kind of automation features would be useful, before jumping whole-hog into implementation.


Ideally, you can deal with common situations through what I guess I’d call “considerate” implementation. If there are prerequisite actions that don’t involve solving puzzles or mysteries, an author can automate them. The game can handle picking up the remote control for the TV, for instance, or closing the refrigerator door before the player walks away. A good question to ask testers might be: “is there anything you get tired of typing?”

I think making macros unnecessary is ideal, though some mechanics might make them appealing.

After a puzzle has been solved, its requisite actions can be automated too. Hadean Lands is really impressive example of this.


Very few games make you solve a puzzle more than once!

Heh, that’s true. It’s not a puzzle after its solved! I am a little annoyed that the best negative example I can think of is the DRM in Leather Goddesses of Phobos (clap, hop, kweepa). You pass the challenge fairly quickly, but you have to keep doing it the whole time I think? Those catacombs are big.

(LGOP only has one review at IFDB, which surprises me)