Couple of questions about how to use the language.

Hey guys! This is my first post here, I’m sorry if these questions have already been covered in the forum somewhere, but I’ve been given the assignment to start (and finish) this game by Monday. Needless to say, I’m trying to learn as much as it as I can as quickly as I can.

I just had a couple questions about how to do certain things. So, part of this game is having the player give certain responses to an actor, and then going through different rooms based on which response he gives. I’m attempting to do this using locked doors–the actor will give a key to the player based on the response. Is there any more efficient way of accomplishing this? It seems like I should be able to have a door unlock based on the phrase used by either the player or the actor.

Second, is there any way to put a time stop using inform 7? Part of the idea is to have only one decision a day occur, but that’s completely optional, as I am using inform 7 definitively.

Thanks so much for your time and patience, I’m sure I’ll have other questions as I get further along this code. Fortunately I have Thursday-Sunday free!

I can’t help feeling that whoever gave you this assignment is being rather unreasonable. Or at least, overly optimistic. But you gotta do what you gotta do. Maybe I’m over-reacting because I like to put such a lot of detail into my games. Truth is, you can do this as a basic assignment in a pretty simple way.

Either approach will work. My Inform is incredibly rusty, but let’s see … maybe I can whip something up. On the other hand, that would be doing your assignment for you, wouldn’t it?

It’s not clear to me what you’re asking about. What do you mean by “put a time stop”? What do you mean by “have only one decision a day occur”?

Yeah, that’s kind of what I thought, what having programming history gets me into…

I would rather not have anyone do the tcode for me, but if there is an easier method than what I’m proposing, I would appreciate a helpful hint as to what that might be.

The second question–the way the game works is you talk with an individual, make a decision, and then based on that decision move to different areas of the game, where you have to make other decisions. I want to stop players from playing through too quickly–that is to say, set a certain amount of time between when they make a decision, and when they can make the next one. Is that posisble?

There are usually lots of methods in IF. In general terms … if I were given this assignment, I would (a) create a map with all of the rooms that will be needed and doors between the rooms, (b) make the doors lockable and locked, © figure out exactly what actions will unlock the doors, and then (d) implement those actions.

With respect to talking to another character as part of the desired actions, I recommend that you download and install the extension Conversation Responses by Eric Eve. This will allow you to write rules such as this:

Response of Darren when asked about the brass key: if Darren carries the brass key: say "'It's just an old key. Here, you want it? Take it.'"; now the player carries the brass key; otherwise: say "'Dude, I already gave you that.'"

Do you mean real-time delays or delays of a number of turns? Two entirely different beasts. I’ve never used real-time delays, but there are a couple of extensions on the Inform site that may help. Looks like Real-Time Delays by Erik Temple might do what you have in mind.

If you’re talking about a delay of a number of turns, you might want to implement some scenes. Start a scene when the oak door is unlocked for the first time, end that scene five turns later, and write a rule that prevents certain actions from being performed while that scene is happening.

Thanks guys! This has been really helpful.I’ve gotten the map running well, and some basic definitions in place.

I downloaded the extension, and I input this code to test it generally:

Response of Darren when asked about the brass key:
if Darren carries the brass key:
say “‘It’s just an old key. Here, you want it? Take it.’”;
now the player carries the brass key;
say “‘Dude, I already gave you that.’”

but I keep getting the response back:

Problem: You wrote ‘Response of Darren when asked about the brass key’ : but the punctuation here ‘:’ makes me think this should be a definition of a phrase and it doesn’t begin as it should.

I’m so confused, especially because other I uses if statements before other colons, and I seem to not have issues with them. Any ideas on what’s going wrong here?

Did you install and include the extension? If you want to use an extension, after you download it you have to open it up and hit the “install” button. Then when you want to use it in one of your programs you write, at the beginning of your program:

Include Conversation Responses by Eric Eve.

There are some built-in extensions that you don’t have to download and install, but you still have to include them if you want to use them.

Hm, I tried hitting install and then adding the code, but it’s not reading. I keep getting this response:

You wrote ‘Include Conversation Framework by Eric Eve’ : but I can’t find that extension, which seems not to be installed.

I’ve tried every variation on Conversation Framework + Conversation Responses, but I keep getting the same error. It’s also read by the program as I can go to the add extension part and it will bring up Conversation Responses, but it’s still not reading. Is there anything really dumb I’m not doing (copy pasting the whole code in, maybe)?

Conversations Responses depends on Conversation Framework. So, you need to have both of them installed.
You only need to include Conversation Responses, though, since it automatically includes the extension it depends on.

Thanks guys! It’s all coming together now, I feel like this might be doable :slight_smile:.

Is there a relatively painless way to reset a room after the player leaves it? Just like a simple when statement followed by a new description?

You can do this:

After going a direction from the hallway: [your reset stuff goes here, such as "now the ball is on the table"]; continue the action.

There are almost certainly ways to be more systemic about the resetting stuff, such as defining “home” locations/states for things. But if you have just a few things to reset, it is probably faster just to do it by hand.