Simple default-message changes

I’d like to do something that seems extremely simple: change a few of the standard messages to read more closely to those in old Infocom comes. These would apply throughout the game, and would never require any exceptions, special conditions, tense-changes, etc.

For instance:

You can see a frozen moonbeam here.

Would instead read as:

There is a frozen moonbeam here.

The attempt at picking up a piece of scenery would return “What a concept!” and so forth…it doesn’t seem as if I’d need an extension, considering that it was relatively simple in I6; so I’m hoping that there’s a way to do it from within the source.

I’ve scoured the manuals and documents, but the closest I’ve come is to encounter references to a list of rulebook names, supposedly found under a couple of the tabs above the source window (“Action” and a few others); but clicking on those tabs just gives me blank windows.

While I’m at it, I’d also like to remove the score from the banner and return any “score” input with “This game does not involve a score.”

Thanks so much for any assistance. I sure appreciate it.

Chris

For removing the score, simply add “no scoring” to your story options list up at the top. For example, my default story options are: “Use full-length room descriptions, American dialect, no scoring, and the serial comma.” (The available options are listed in 2.12 in the Documentation.) With “no scoring,” the message in response to “score” is “There is no score in this story.” To change that, of course, brings us to…

The easiest way to change the default messages is with an extension; I’ve found David Fisher’s Default Messages to be useful. It does seem like overkill, but changing library messages is known-complicated in I7. There doesn’t currently seem to exist a good list of which messages fire when, so unless you want to dig around in the Standard Rules for that, Default Messages is probably the way to go.

I understand. I suppose I’ll just try that extension. Thanks very much! I’m extremely grateful for the help.

There is a way, for most of the messages anyway, but each is done in a different way. The 19 or so parser errors use the “printing a parser error” activity; the individual actions use Check & Report rules, the former which would need to be rewritten in their entirety, etc.

David Fisher is trying to deprecate his message extensions, so I wrote a Default Messages extension that’s small and simple which should get the job done. You can get it here.

Also, I have a small request, if you wouldn’t mind too much.

At the last Seattle I-F group meeting, the subject of Inform’s default messages cropped up, specifically in response to Sarah Moyarati’s blog post which criticizes the confusion of voice in those messages, among other things. George Oliver hypothesized different genre-specific collections of default messages: just include them so messages like, “Must you draw attention to yourself?” would be, in a horror work for example, “Nothing benevolent heard you.”

If you do a serious job of re-creating the Infocom messages, could you release them as an extension? I think there would be some demand for it, and I think George’s idea of genre-specific messages that could be dropped in with minimal work is a very good idea (speaking as a player). If you would, your extension would look something like:

Original Infocom Default Messages by Chris Federico begins here.

"Restores the standard messages used in Infocom's games."

Include Default Messages by Ron Newcomb.

Table of custom library messages (continued)
library-action	library-message-id	library-message-text
taking action	11	"What a concept!"
[... and so on ...]

Original Infocom Default Messages ends here.

I’d love to be able to offer such a thing; I’ll do my very best to create something efficient, once I learn about how the extensions work to begin with. My programming experience thus far involves BASIC, 8-bit assembly (remember that?) and Inform 6 (along with numerous other “high level” tools that require interpretation – i.e. comparatively easy stuff like I6), so I don’t think that creating such a module is out of my scope, to use IF hyperbole…but I’ll have to really study up on the details, and I’m just beginning to learn I7. The elegance of the language, and its conformity to consistent grammar, have attracted me to it, after a few years’ break from writing IF.

I’m really looking forward to checking out each of these Default Messages extensions. Thank you!

I’d love seeing some genre-specific variant libraries. That would be pretty cool.

I was studying Emily Short’s source for Bronze, and some things that are only vaguely mentioned in the documentation clicked into place when I encountered her changes to the default messages. If one wants to alter just a few things in very simplex ways, wouldn’t this work:

The feather is a thing in the Courtyard. “There is a feather here.”

…and onward to the rest of the object’s information? Would “You can see…” be replaced with that message, as it is in Bronze (i.e. regarding the appearance of the helmet)? If this were done with each object in the story, it seems as if it might well work – unless I haven’t experimented enough to know why not, of course.

For the taking an object to simply return “Taken.” – wouldn’t something like this work, even if I haven’t gotten the syntax down verbatim yet:

Every turn while taking something, say “Taken.”

(Perhaps the “carrying out” variant would be better?)

Thanks again!

Well, taking an object already prints “Taken” by default, but if you want to change it to something else, there are several ways of accomplishing that. Using an every turn rule is not one of them. (Ok, one could craft an every turn rule with the proper conditions to achieve the desired effect, but even then it would be a bad idea for reasons beyond the scope of this post.) It looks like you edited your posted code slightly, but among other things this rule will still fire after the standard report taking rule has already fired, which means that after taking something, “Taken” prints twice.

What you need is a rule that fires after the taken action has been successfully executed (which happens in the carry out taking rules), but before it has been reported (which happens in the report taking rules). As illustrated in ch. 12.2 – “How actions are processed,” there is an entire rulebook sandwiched between those two – the after rules. Also, as implied in ch. 7.5. – “After rules,” when an after rule fires, the report rules are ignored altogether, so you don’t have to worry about double messages. This is the easiest way to change the standard messages for successful actions and presumably the reason why it is recommended. Here I’ve changed the standard message from “Taken” to “Ok”:After taking: say "Ok.".Now (just to confuse you more :slight_smile: ) unlike the check / carry out / report rules which are separated by individual action, the after rules (as well as “before” and “instead”) are shared by all the actions. This basically means that before / instead / after rules can get unwieldy if you have quite a few of them. For this reason, there are several I7 authors – myself included – who avoid them when possible. The method I would generally use get the same effect as the above is:First report taking: say "Ok."; rule succeeds.The word “first” here tells inform to put that rule first in the report taking rules and the phrase “rule succeeds” tells inform, “We’re done here so there’s no need to check any of the other report taking rules” – effectively removing the standard report taking rule from the picture. Also, you could do this:First report taking: say "Ok." instead.The word “instead” in this context achieves the same result as “rule succeeds”, although they do not mean the same thing.

As you can see, understanding the order of the basic rulebooks is pretty critical to achieving even simple tasks in I7. For this, the index is indispensable, which brings me to the next point. You mentioned blank panels in the index – a common complaint which I don’t think is clearly addressed in the docs. The index is based on the latest successfully compiled version of the current project; it always starts out blank. What I always do when beginning a new project is create one room only and hit go to compile it. Now I’ll have an index to work with as I program. Also, by default this index is “cleaned” (erased) every time you exit inform. In windows, this option can be changed under Edit–>Preferences. Just uncheck the box that says “Also clean out index files” (this is how mine is set).

Hope that helps.

Edited to add: In my case, that’s unpublished authors.

Oops! That’s a bit embarrassing. In my brain, the sentence communicated “other than ‘Taken.’,” but my typing wasn’t properly notified. :slight_smile:

Wow. That is extremely helpful information about the order of processing – I truly appreciate your taking the time to explain that. I’m clearly going to have to go over and over the process by which rules are carried out until I know it like the back of…well, I6, rather than just assuming that everything has “this particular bit of code to worry about, and that’s it” – there’s clearly a lot of spider-web influence between everything Inform does, and the importance of learning why things happen the way they do has finally sunk in.

That explains it! I was a bit worried that (don’t laugh) my version wasn’t working right or something.

Thanks SO much for the help, guys. It’s definitely made my learning experience a heck of a lot more enjoyable! Now I’m excited to get back to the source window. Comprehension is such a relieving door to kick in…:slight_smile:

Since you fellow IFanatics have been so graciously helpful thus far, I suppose it couldn’t hurt to pose this one: No “Instead of,” “When” or “Understand” instruction I’ve been playing with seems to be able to do the hopefully simple thing below, and I’ve really searched through the Syntax text, as well as the three main docs (including the Handbook), to get some sort of clue as to what sort of instructions I should even begin experimenting with.

drop all

None at all are available!

[Hoping instead for:]

You’re not carrying anything.

I know it seems like a trivial thing; perhaps I’m just a bit over the line in the thrill-of-writing-my-own-Infocom-sounding-story department. :slight_smile:

Thanks again for any help.

[Edit: Typed “Infocom” too quickly, rendering a misspelling. Which figures, in light of the context. :slight_smile:]

Take a look at the Custom Library Messages extension by David Fisher. (You’re looking at changing LibMsg .) There’s a lighter weight extension by the same author that does the same thing, I think.

ISTM you probably want to make sure that you don’t wind up saying “You aren’t carrying anything” when you try “take all” in a room with no objects, as well.

Okay; it’s clear that I can’t continue avoiding the use of an extension for these changes. :slight_smile:

Thanks very much for the advice!

Well, you could avoid using an extension–but the extension route is much easier than intervening in every rule that you want to change. You might have a look at Ron Newcomb’s new Default Messages extension, which is very lightweight.

–Erik

Anything’s possible, of course, but it’s easy to miss cases. Changing the library messages is much less prone to unfortunate errors.

Understood, and thank you. I guess I’ll have to let go of some of that old-programming “Can’t I just change the guts?” mindset! I suppose that tends to work against the whole principle of I7 being such an easy to understand language, rhetoric-wise.

Considering that the extension was written by Mr. Newcomb himself, the prospect of using it is certainly much less daunting than, for instance, things that might just cause even more complications than one has started out with (one’s usual experience with extensions and modules). I won’t put off experimenting with this one any further!