This topic is for discussions related to Small Kindnesses by Aaron Reed
I tried substituting the chapters ‘Chapter - Show valid directions after going nowhere’ and ‘Chapter - Implement Use verb for common actions’ in my source code, but I got a compiler error. What should I do? I don’t want to make an extension just for this specific purpose, but is there a better way to package things like this up? Would going the way of Counterfeit Monkey by making extensions for every major part of the game work?
Have you noticed that in Small Kindnesses, Section - Listing Exits is part of Chapter - Show valid directions after going nowhere? The replacement chapter in your code will need to include that section too, or else the listing exits action won’t be defined anywhere.
(The headings hierarchy is Volume > Book > Part > Chapter > Section.)
How would I define that in my source code?
Just copy the section into your code, at the end of the replacement chapter. No need to do anything else. You’re basically just recreating it as a section of your own new chapter.
Chapter - New valid directions (in place of Chapter - Show valid directions after going nowhere in Small Kindnesses by Aaron Reed) (Your replacement code) Section - Listing Exits (for use without Keyword Interface by Aaron Reed) Definition: a direction is viable if the room it from the location is a room. Listing exits is an action out of world applying to nothing. Understand "exits" as listing exits. The listing exits action has a number called the count of exits. Carry out listing exits (this is the Small Kindnesses count exits rule): now count of exits is the number of viable directions. Report listing exits when count of exits is 0 (this is the Small Kindnesses report on no exits rule): say "In fact, [we] [can't see] any obvious exits." (A) Report listing exits when count of exits is 1 (this is the Small Kindnesses report on one exit rule): say "The only way to go [are] [list of viable directions]." (A) Report listing exits when count of exits > 1 (this is the Small Kindnesses report on exits rule): say "From here, [we] [can go] [list of viable directions]." (A)
Of course, you don’t really need the extension-speak here, such as the section heading, or the adaptive text substitutions, or the response labels. You just need the definition and details for “listing exits” to be in your code somewhere.
Okay, cool. I didn’t want the exits command to exist in my code or the exits to be listed anywhere other than the room descriptions (plus, the plot of my game doesn’t allow for the parser to be forgiving in this specific regard). I added the section heading and now it works how I intended it to! Thanks again!