intfiction.org

The Interactive Fiction Community Forum
It is currently Mon Sep 24, 2018 5:22 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Sun May 04, 2014 7:56 pm 
Offline

Joined: Tue Mar 30, 2010 9:30 pm
Posts: 326
This topic is for discussions related to Small Kindnesses by Aaron Reed

_________________
Aaron Reed - Creating Interactive Fiction with Inform 7 - Smarter Parser


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Mar 17, 2018 8:56 am 
Offline

Joined: Tue Oct 24, 2017 6:38 pm
Posts: 49
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?

_________________
~ Gideon

Narrative Lines is not a game about games. The story unfolds in 2018.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Mar 17, 2018 9:47 am 
Offline

Joined: Mon Dec 15, 2014 9:15 am
Posts: 341
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.)


Last edited by jrb on Sat Mar 17, 2018 9:54 am, edited 1 time in total.

Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Mar 17, 2018 9:48 am 
Offline

Joined: Tue Oct 24, 2017 6:38 pm
Posts: 49
How would I define that in my source code?

_________________
~ Gideon

Narrative Lines is not a game about games. The story unfolds in 2018.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Mar 17, 2018 9:55 am 
Offline

Joined: Mon Dec 15, 2014 9:15 am
Posts: 341
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.
Code:
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.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Mar 17, 2018 6:43 pm 
Offline

Joined: Tue Oct 24, 2017 6:38 pm
Posts: 49
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!

_________________
~ Gideon

Narrative Lines is not a game about games. The story unfolds in 2018.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group