intfiction.org

The Interactive Fiction Community Forum
It is currently Sat May 18, 2013 12:48 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 15 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Tue Apr 17, 2012 10:01 am 
Offline

Joined: Sat Apr 02, 2011 9:19 am
Posts: 85
I feel like this is the most obvious question in the world, so I apologize if it's been asked a million times before, but I've done a fair amount of googling and searching within this forum and I haven't been able to find quite what I need.

All I want to do is change the wording of the default "You can't go that way." message. I don't want to change anything about the circumstances under which it appears; I just want it phrased differently. I thought I could do this with:
Code:
Instead of going nowhere, say "something something."

But that has additional undesired effects, i.e. if the player tries to go through a closed door, he just gets "something something" instead of automatically trying to open it or getting a message that there's a door in the way.

I then thought I could use Custom Library Messages to replace the message itself, but its documentation suggested that it's overkill for what I want to do and I should probably just use the more lightweight extension "Default Messages," which I looked up and found that it's no longer supported and has been replaced by "English," which had no documentation. When I got to the point where the Inform 7 documentation was telling me I should make a copy of English and put it into place using I6 template hacking, I figured I should probably take a step back and see what the forum suggests is actually the best way to do this.


Top
 Profile Send private message  
 
PostPosted: Tue Apr 17, 2012 10:22 am 
Offline
User avatar

Joined: Sat May 08, 2010 9:25 pm
Posts: 956
Location: The Seattle Massive
The simplest thing to do, I think, would be to replace the can't go that way rule.

Here's the original thing in the Standard Rules:
Code:
Check an actor going (this is the can't go that way rule):
  if the room gone to is nothing:
    if the door gone through is nothing, stop the action with library message going action number 2 for the room gone from;
stop the action with library message going action number 6 for the door gone through;


Last edited by maga on Tue Apr 17, 2012 10:25 am, edited 1 time in total.

Top
 Profile Send private message  
 
PostPosted: Tue Apr 17, 2012 10:24 am 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 2127
Location: Burlington, VT
I think it's Default Messages by David Fisher that's out of date; if you want to go the extension route instead of just replacing the you can't go that way rule, you could use Default Messages by Ron Newcomb.

ETA 2: I also think that the "English" extension that the document for David Fisher's extension mentions isn't the current extension, but one that will be in an Inform Release Yet To Come.


Top
 Profile Send private message  
 
PostPosted: Tue Apr 17, 2012 10:46 am 
Offline

Joined: Sat Apr 02, 2011 9:19 am
Posts: 85
matt w wrote:
I think it's Default Messages by David Fisher that's out of date; if you want to go the extension route instead of just replacing the you can't go that way rule, you could use Default Messages by Ron Newcomb.

ETA 2: I also think that the "English" extension that the document for David Fisher's extension mentions isn't the current extension, but one that will be in an Inform Release Yet To Come.

Ah, how very confusing. Thanks; Default Messages by Ron Newcomb looks like it will do what I need if I don't end up just replacing the rule.

Which rulebook is the can't go that way rule in, or more importantly, how can I find out that information for myself?

[Edit: I managed to find out by telling the Inform IDE to unlist it for me.]


Top
 Profile Send private message  
 
PostPosted: Tue Apr 17, 2012 12:00 pm 
Offline

Joined: Sat Apr 02, 2011 9:19 am
Posts: 85
maga wrote:
The simplest thing to do, I think, would be to replace the can't go that way rule.

I tried replacing it with:
Code:
Check an actor going (this is the revised can't go that way rule):
   if the room gone to is nothing:
      if the door gone through is nothing:
         say "something something.";
         stop the action;
   stop the action with library message going action number 6 for the door gone through;

... but now I just get
Quote:
[Rule "revised can't go that way rule" applies.]
You can't, since nothing
[** Programming error: tried to test "has" or "hasnt" of nothing **]
leads nowhere.
[going north - failed the revised can't go that way rule]

whenever I try to go anywhere. So I think I'm probably just going to give up and use Default Messages.


Top
 Profile Send private message  
 
PostPosted: Tue Apr 17, 2012 12:11 pm 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 2127
Location: Burlington, VT
shammack wrote:
maga wrote:
The simplest thing to do, I think, would be to replace the can't go that way rule.

I tried replacing it with:
Code:
Check an actor going (this is the revised can't go that way rule):
   if the room gone to is nothing:
      if the door gone through is nothing:
         say "something something.";
         stop the action;
   stop the action with library message going action number 6 for the door gone through;

... but now I just get
Quote:
[Rule "revised can't go that way rule" applies.]
You can't, since nothing
[** Programming error: tried to test "has" or "hasnt" of nothing **]
leads nowhere.
[going north - failed the revised can't go that way rule]

whenever I try to go anywhere. So I think I'm probably just going to give up and use Default Messages.


The bottom line ("stop the action with library message...") should be one tab stop deeper; as it is, it triggers whenever you try to go in any direction (unless "something something" has triggered, stopping the action).


Top
 Profile Send private message  
 
PostPosted: Tue Apr 17, 2012 12:15 pm 
Offline
User avatar

Joined: Sat May 08, 2010 9:25 pm
Posts: 956
Location: The Seattle Massive
Yeah, sorry, I just typed that out from a different computer rather than copy/pasting, which of course messed up the tabs. (I generally use begin/end rather than tabs, for just this sort of reason.)


Top
 Profile Send private message  
 
PostPosted: Tue Apr 17, 2012 4:38 pm 
Offline

Joined: Wed Feb 29, 2012 2:00 pm
Posts: 672
Try this.

Code:
"Test"

Check going (this is the new can't go that way rule):
if the room gone to is nothing, say "You channel your will power to summon a path in that direction. Sadly, nothing happens: you can't go that way." instead.

The new can't go that way rule is listed instead of the can't go that way rule in the check going rulebook.

The Testing Room is A Room. The testing door is a door. The Testing Door is north of The Testing Room.

Test me with "n / s".


Replacing the standard is the most efficient way of changing the message here. The standard rule is a little more complex in order to give a different message when there is a door leading to nowhere rather than just a blank connection. I've actually done this replacement in games I've written as I find that the default message is not very helpful, although I replace this message with an exit listing so the player knows which exits are valid.

maga wrote:
Yeah, sorry, I just typed that out from a different computer rather than copy/pasting, which of course messed up the tabs. (I generally use begin/end rather than tabs, for just this sort of reason.)


I find that it's easier to see when something begins and something ends using the begin/end syntax.

_________________
"Will you stop breaking the fourth wall? It's costing me an absolute fortune to replace it!"


Top
 Profile Send private message  
 
PostPosted: Tue Apr 17, 2012 4:55 pm 
Offline

Joined: Wed Jan 19, 2011 3:36 pm
Posts: 99
climbingstars wrote:
maga wrote:
Yeah, sorry, I just typed that out from a different computer rather than copy/pasting, which of course messed up the tabs. (I generally use begin/end rather than tabs, for just this sort of reason.)


I find that it's easier to see when something begins and something ends using the begin/end syntax.


As a C++ programmer who has barely any experience with Python... I prefer the Pythonesque syntax because "begin" and "end" are just too long and ugly.

On topic: You don't need to replace the rule if you use the extension. They are alternative ways of doing (basically) the same thing.


Top
 Profile Send private message  
 
PostPosted: Tue Apr 17, 2012 5:01 pm 
Offline

Joined: Sat Apr 02, 2011 9:19 am
Posts: 85
NYKevin wrote:
I prefer the Pythonesque syntax because "begin" and "end" are just too long and ugly.

Agreed.

Quote:
On topic: You don't need to replace the rule if you use the extension. They are alternative ways of doing (basically) the same thing.

I know, but the extension also includes a lot of other stuff I don't need, and I'm trying to be economical here. (Yes, I realize that's a somewhat ridiculous thing to worry about when writing a text adventure in this day and age.)


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] 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