When should you include extensions in extensions? (Inform 7)

+1 vote
142 views
asked Jun 15 in Authoring by bg (692 points)

If you're writing an extension and it includes some optional features A and B that make use of other extensions (C and D), but some people may not want to use features A and B, do you go ahead and include extensions C and D, or not? On one hand, you want things to work out of the box. On the other hand, if you're a game author who doesn't want features A and B, there's no good way (that I know of) to un-include C and D without modifying the including extension directly.

Or is this a case where feature B should really be in a separate little add-on extension that can be used with the main extension, and the add-on extension would include the necessary other extension (D)?

In this case the extensions "C" and "D" are Basic Screen Effects by Emily Short and Rewrite the Command Line by Ron Newcomb, if that makes a difference.

1 Answer

+1 vote
answered Jun 15 by Joseph Geipel (207 points)

ยง27.9 in the Documentation shows off a lot of the options you can use for having extensions interact with other extensions.

Notably for your case, you have the ability to make certain parts of the extension used only if another extension is included via a parenthetical after a heading:

Book 3 (for use with Basic Screen Effects by Emily Short)

This will make all of Book 3 (which may include Feature A) only be acknowledged if Basic Screen Effects is included. You can also cause the reverse effect by turning the "with" into a "without". If your added feature is deeply intwined in one of the extension's general rules, you can still use the parenthetical to get into that rule through tricks such as, say, defining a truth state differently within Book 3.

Using this, you can allow the author to not include Extension C if they don't need feature A or not include Extension D if they don't need Feature B. Whether this is a better idea than making a side extension is a matter of taste and your specific extension.

This site is now closed.
As of 1st November 2015, this site is a read-only archive. For more information see the intfiction forum post

Welcome to IF Answers, a site for questions and answers about Interactive Fiction.

Technical questions about interactive fiction development tools such as Inform, Twine, Quest, QuestKit, Squiffy, Adrift, TADS etc. are all on-topic here.

Non-technical questions about interactive fiction are also on-topic. These questions could be about general IF design, specific games, entering the IF Comp etc.
...