One Night Stand: Part 7
My Stuff
Contact Me
Well, here we are, the moment you have all been waiting for, the final part of the tutorial.  Now, whether you have been waiting for this because you’ve actually been following along or because you’re just sick of the whole thing is another matter but this is it.  You already have enough ammunition to write a game but there are just a couple of other things I wanted to mention before we wrapped things up so let’s get to it.


Conversation with characters is one of the hardest things to handle in AIF.  Or I guess I should say that it is one of the hardest things to handle well.  There are just so many different variables involved and so many different ways you can mess things up.  Choosing the right kind of system for what you are trying to do is very important.  Earlier in this tutorial we discussed some of the different systems out there.  I am going to show you a simple way to do two of them.  When all is said and done, both of these are going to leave a lot to be desired but, once again, we are trying to keep things simple here.  Once you see how a basic system works you should be in a better position to see what needs to be done for what you’re trying to accomplish.  If you really want to focus on conversation I suggest checking out some of the conversational extensions on the Inform site.  There are some very good ones that allow a great deal of flexibility.

Talking To

The simplest system from both a writing and playing standpoint is where the player just types in “Talk to Lisa” and out comes the response.  Obviously, this is not only the simplest, but also he least detailed.  If conversation is going to play a large part in your game then this is not the one to use.  However, if conversation is relatively unimportant in the game then it could be a good way to go.  Inform does not have this action built in so the first thing we need to do is create it.

Talking to is an action applying to one thing.  Understand "talk to [person]" or "greet [person]" as talking to.

The first thing to notice is that the action we are defining is “talking to” and not “talking,” which will make the rules we write sound much more natural.  Once we have the action defined we simply write our rules in the same way we did for the sexual commands.

Instead of talking to lisa, say “You chat Lisa up about this and that.”

Everything we went over for the sexual commands apply here as well.  You can write different responses for each room, multiple responses, etc.  You can also have the response change for different circumstances.  For example, an obvious one here is that Lisa’s response to you would probably be very different before and after you fixed her computer.  If you have downloaded and looked at the sample game that I mentioned then you already know the way to handle tracking this change but for those of you who didn’t, here it is in a nutshell.  First we create a simple either/or property.

A thing is either broken or working.  A thing is usually working.  The computer is broken.

Remember that you can’t give a property to an individual object but have to give it to an entire ‘kind’ (in this case ‘thing’).  Once created, we can then specify that the computer is broken, then when we repair the computer we just add the following line at the end of the rule.

Now the computer is working.

And that’s it.  The computer is now broken before we repair it and working after so we can now refer to it in our rules like so:

Instead of talking to Lisa in the office when the computer is broken, say “She looks over at you and asks, ‘Do you think you'll be able to fix it?’

Giving her your warmest smile you respond, ‘Yes, no problem, it will just take me a few minutes.’”.

Instead of talking to lisa in the office, say “You ask her what she thinks about the weather but the lust in her eyes tells you she has other things on her mind.  ‘Never mind that.  Just get over here and fuck me.’".

You could, in theory, make a whole bunch of new properties like this to have your responses keep changing but in practice, if you were going to go to all that trouble then it’s probably best to just use a different system.

Asking About

This is probably the most widely used conversational system, although that is not to say that it is always used well.  In this system the player would type something like, “ask Lisa about computer” and the game would respond with whatever the author put in.  Telling is usually another option here as in, “tell Lisa about computer.”  Sometimes this would give a separate response and sometimes the same one.  For our purposes here we’ll assume that we want only one so the first thing to do is redirect any attempt to “tell” to “ask”.

Instead of telling someone about something, try asking the noun about it.

Then we would write all our rules like this:

Instead of asking Lisa about "computer", say "'I don't understand,' she says. 'It just won't power up at all."

And it wouldn’t matter if the player typed “ask” or “tell,” that is the response he will get.  The first thing to notice here is that we put the word computer in quotation marks.  “Computer”, in this case, is a topic and not the computer object that we have already defined.  This is something you have to keep in mind because, let’s say you gave the computer object the synonym of “CPU”.  The game will let you “examine CPU”, “repair CPU”, etc because it knows that “CPU” refers to the computer.  However, when the player tries “Ask Lisa about CPU” he will simply be told, “There is no reply.” This is because, even though we are using the same word, Inform sees the computer object and the computer topic as two separate things.  If you want to allow “CPU” to be used in conversation as well you need to rewrite that rule.

Instead of asking Lisa about "computer/CPU", say "'I don't understand,' she says. 'It just won't power up at all."

If you have a longer list of synonyms that you want to use with a topic it is sometimes easier to use a test substitution like the following.

Instead of asking lisa about "[tits]", say “’You have beautiful breasts Lisa.  Are they real?’ you ask.

Instead of slapping you as one might expect, Lisa just smiles and says, ‘If they weren't, don't you think I would have went with something a bit larger?’”.

Understand "breasts/tits/boobs" or "her breasts/tits/boobs" as "[tits]".

Here we are substituting a whole list of synonyms for [tits].  This is especially helpful if there are going to be several rules involving them so that we only have to type them out once.  We haven’t talked all that much about “Understand” commands like this one.  You might not see the point of having both groups of the words that we have in the separate quotation marks but it is actually necessary.  The second set, “her breasts/tits/boobs” will match if the player types “her breasts”, “her tits”, or “her boobs.”  However, it will not match simply “tits” by itself (by themselves? Hmm) so you need the first set to cover that.

All this may seem like we are having to define everything twice, and in a way we are but it is often helpful to have these separate and it is very nice when it comes to defining topics that aren’t objects in the game.  If we wanted the player to be able to ask Lisa about love, sex, or the weather it would be extremely annoying to have to first create a “weather” object.  At any rate, in a nutshell, that’s the way to define topics and write the basic rules.  As with the rest of our rules, we are free to use restrictions so that different responses are given at different times.

Instead of asking Lisa about "computer/cpu" when the computer is broken, say "'I don't understand,' she says. 'It just won't power up at all."

Instead of asking Lisa about "computer/cpu", say "'Thank you so much for fixing it.  Now if there were only some way I could thank you properly.'"

Just to remind you, since the first rule is more specific it is the only one the player will see while the computer is broken.  Once the computer is fixed, Inform will automatically switch over to the second as the only remaining rule that fits.  If it helps to make things clearer for you, you could always spell out that the second rule is “when the computer is working” but it’s not necessary.  You can also use the if/begin/otherwise technique that we learned about last month to streamline things a bit.

Instead of asking Lisa about "sex":
    If the computer is broken begin;
    say "She doesn't want to talk about that until you have finished your work.";
    say "She licks her lips and says, ‘less talk, more action.’”;
    end if.

Now all that’s left is to figure out what the player is going to ask about and write rules that make sense for every topic at every possible time that every character can be asked about it.  Simplicity itself.  Like I said, good conversational systems are a lot of work.  But as I also mentioned, there are several good extensions out there that can help with some of the heavy lifting if you really want to focus on it in your game.


Before we wrap things up I wanted to be sure to add a little word on testing.  Although for the most part, authors nowadays recognize the need for testing, that is not to say that it is yet a universally accepted thing.  Do you need to test your game and have other people test it?  Yes, you do.  A. Bomire wrote an excellent three-part series way back in the first three issues of this newsletter extolling the virtues of Alpha and Beta testing and I highly recommend you read it.

You will be testing your game yourself (or alpha testing it) constantly as you go along but even once you have it done and can go all the way through the game without anything blowing up (unless it’s supposed to) you still need to let other people have a look at it.  Why?  Because you can’t possibly think of everything that people are going to try.  After all, you wrote the game so you know exactly what needs to been done and exactly when to do it to play the game and get all the goodies.  However, anyone else playing it will not have the benefit of your knowledge.  Something might make perfect sense to you but baffle anyone else trying to make his or her way through.

Tell your beta testers to be as detailed as possible, to tell you the things that seemed too hard (or easy), to tell you about spelling errors and grammar mistakes.  Also have them send you a transcript of their play through.  By reading through this you will see (without them having to explicitly tell you) the spots where they had trouble and the cool, “difficult” puzzles that you set up that they got past in about 3 seconds.

Finally, once you have all this great feedback, do something about it.  I’m not saying that every suggestion from your beta testers is something that needs to be changed but you should at least be considering it.  Trust me, it is much better to get a list from a couple of people and make the changes that are needed than to just release the game and suffer the curses of a frustrated community.


It’s been a long road.  Seven months of trying to convince you that I have some idea what I’m talking about.  Since that time I’ve gone from simple, mild-mannered community member, to newsletter staff member, to editor of said newsletter.  I still don’t know exactly how that happened to be honest with you.  I just read back over all six previous parts and what I found (in addition to a depressingly large number of typos) is that I believe I have accomplished my goals.  I freely admit that it got a bit more complicated and ran a bit longer than I was originally intending, but I think that if you have been following along, you now have the tools you need to write a game.

Coincidentally, the deadline for the mini-comp is a month and a half away, still plenty of time to write a game.  If you have enjoyed this tutorial at all, if you have gotten anything out of it, I can think of no better way to thank me than to write a game and let everyone enjoy your labor of love (or lust).

Even though this ends this tutorial, my offer to help with your game still stands (and will until I no longer answer to Purple Dragon).  If you need help along the way or with beta testing, just let me know.  I hope you’ve enjoyed the ride because I know I have and just before we go, let me remind you one last time to (say it with me) work hard, have fun, and think dirty thoughts.
Home | My Stuff | Resources | Links | Contact Me