[I7] Upper Case game (SOLVED)


Is there a way to change all output text in a game into upper case without changing manually every response the parser can give? Like a sort of uber command at the beginning?

This will change all the standard library responses.

When play begins:
	repeat with R running through responses:
		now R is "[text of R]" in upper case.

But a few special things (like default indefinite articles) need to be set by hand for each object. You also need to define your objects in all caps.

Thanks a lot! Yes, I supposed so for the text I write, but saves me a lot of time anyway!

Unfortunately, this doesn’t seem to work. What could be wrong? The syntax looks correct.

It works for errors, but not for (afaik) the default X ME response. Are those a different kind of response? Apart from the player’s looks are there any other you know of?

Thanks everybody :slight_smile:

“As good-looking as ever” isn’t a library response, but the default description of yourself. Here’s its description in the Standard Rules:

The description of yourself is usually "As good-looking as ever."

I don’t know if there’s anything else like this.

Unfortunately, I don’t think the solution works for responses that have substitutions in them. The when play begins rule will evaluate the substitution to “nothing,” and then that’s what you get when you print the message, because this appears to fix the text. Like this:

[code]LAB is a room. TAYLOR is a person in LAB.

When play begins:
repeat with R running through responses:
now R is “[text of R]” in upper case.[/code]


Here’s a version, presented with great trepidation, that uses Text Capture:

[code]Include Text Capture by Eric Eve.
Use maximum capture buffer length of at least 5000.

After reading a command:
start capturing text.

When play begins:
start capturing text; [so the stuff that gets printed before the first command prompt will also get printed in upper case]
now the command prompt is “[print buffer in upper case]>”.

To say print buffer in upper case:
stop capturing text;
let old output be the substituted form of “[captured text]”;
let new output be old output in upper case;
say new output.

Lab is a room. Taylor is a person in Lab.[/code]

One note is that this eliminates the styles that you ordinarily get–the stuff that would appear in boldface in ordinary text doesn’t appear in boldface here. Another note is that the “before reading a command” rules don’t run (as far as I can tell) before disambiguation prompts, but the “after reading a command” rules do, so text capturing should work there.

The final thing to note is that sneaking instructions like the one I used to print the text into the command prompt is something I do when I don’t know exactly what’s going on, and should be treated gingerly.

You could try the solutions mentioned here. This glulx only solution as mentioned by eu is particularly simple to implement.

[code]Include (- [ uppercase_filter character; glk_put_char_uni(glk_char_to_upper(character)); ]; -).

To force uppercase: (- @setiosys 1 uppercase_filter; -).

A startup rule (this is the always force uppercase rule): force uppercase.[/code]

Hope this helps.

It’s perfectly possible, though tedious, to create a set of replacement responses that are all upper-case. Start with the output of RESPONSES ALL and start whacking at it with a text editor.

Should be sufficient to upper-case the entire file and then change the colons (between (X) and the first quote) to “is”. I leave this as a text-editor regexp exercise.

Awesome, people.

Although, when you see what I’m doing with it you will probably ban my ip from this forum :slight_smile:

You’d have to get more than just the responses, though. If you do this:

The parser error internal rule response (E) is "[WE] [CAN'T] SEE ANY SUCH THING."

then you get:

because the pronouns and verb conjugations aren’t uppercased. You might be able to take care of this by uppercasing things in the English extension–that’d work for pronouns but I’m not at all sure that you can easily force verbs to conjugate in uppercase. And at this point we’re getting from “tedious” to “extremely tedious.”

climbingstars’s solution seems like a good one to me–and it should avoid any issues of missing an obscure bit of lowercase text somewhere in a corner. (I noticed that the announce items from multiple object lists rule text isn’t a response, although if you’ve named all your objects in uppercase it wouldn’t be a problem.)

climbingstars’ solution seems perfect. Thanks everybody for the help!



Lol! Indeed!

import all code (and resources) to word, use the … isn’t it shift+F3 to change cases? and then export back to code and voila: a broken mess - this probably won’t work but this would be my first try at things.