Swearing obscenely (at Inform 7)

This morning I decided to tackle the problem of this false, inappropriate, and irrelevant obscenity:

“Real adventurers do not use such language.”

Now I know I could just replace the library message, but I think my WIP is just scatological enough to provide distinct responses to requests to defecate, copulate, or just f*** something up. So my first step was to look for what command words I need to modify.

I looked in the index under “swearing obscenely,” and I was informed:

Really?

On top of that, I don’t believe the index page for any action ever provides synonyms for command words used in the typed commands. For example, the page for attacking:

…does not mention the synonyms listed on the “commands A-Z” page:

That’s bad enough, but I can’t even find obscene words in the Commands A-Z page. If it’s so important to prevent authors from inadvertently seeing these words, they ought to be simply hidden, with an option to reveal them. Or perhaps even better, if the IDE is smart enough to know whether it “cares to tell you about a word,” it could at least describe them as the F-word, the S-word, etc.

Is there some way to find out what they all are, and how they are parsed?

Yes, the list should be shown or those actions removed from the standard library altogether; I’m leaning towards the latter solution. You can find the grammar in the Standard Library:

Understand "bother" as swearing mildly. Understand the commands "curses", "drat" and "darn" as "bother". Understand "shit" as swearing obscenely. Understand the commands "fuck" and "damn" as "shit".

Actually, you won’t find this list even in the pdf for the Standard Rules but have to look at the very text file used for the Standard Rules extension!

Synonyms introduced by the statement

Understand the commands "x" and "y" as "z".

for some or no reason, never go into the index.
(Drat!)
I think there was a uservoice request to change that, too …

That sounds like the best solution to me.

It’s bizarre that even swearing mildly is censored. But it was a relief to find these in the Standard Rules. I was beginning to fear that the words were stored in encrypted form deep in the bowels of I6…

There was a thread about this awhile back. Inform is used in educational environments, so the list cannot be shown, but such words are commonly typed in by players…

Right - which is why Juhana’s solution makes sense. “That’s not a verb I recognize” is a perfectly reasonable response to profanity. It’s the half-supported, half-hidden nature of swearing obscenely that makes it obnoxious for authors.

inform7.uservoice.com/forums/573 … -the-index

Edit: Oh, uh, Juhana posted that already.

Okay, I have hunted every which way I can think of… where is this page? I thought I had downloaded all of the texts and manuals, and I can’t find anything like this. Well, the Syntax guide seems to have it all, but not in an easy to read format.

It sure would be nice to have as a reference…

It’s a “virtual” page. You find it under the Actions Index in the Index part of the Inform IDE.

Ahhhhh yes… I had seen this before. So I will just copy this out into a doc for printing. I am the type that prefers paper for a reference. But for a quick look… to figure out where a command comes from (standard or extension), and one button click (well, two) to unlist rules, this will be very handy.

Thanks for jogging my memory! I need to spend more time in the index.

Well, I’m done ranting now, but I have a technical question.

Regarding the “I only understood you as far as wanting to fuck” problem: Is it possible to have a grammar line swallow up text and throw it away? It seems that the compiler complains if I put a “[text]” token into a grammar line for an action that doesn’t take a topic. This solution (which also creates a grammar line to prevent “screw [someone]” from redirecting to turning) seems a little awkward:

[code]Masturbating is an action applying to nothing.

Check masturbating:
say “Your body is no longer capable of performing sexual acts, and attempts to do them invariably result in violent acts instead.”;
stop the action.

Copulating is an action applying to one topic.

Understand “copulate” as copulating. Understand “copulate [text]” as copulating.

Understand the commands “shag” and “sex” as “copulate”.

Understand “fuck” and “fuck [text]” as copulating.

Check copulating:
instead try masturbating.

[Prevent “screw person” from redirecting to the turning action]

Copulating with is an action applying to one thing.

Understand the command “screw” as something new.

Understand “screw [someone]” as copulating with.

Understand “screw [something]” as turning.

Understand “screw [text]” as copulating.

Check copulating with:
instead try masturbating.
[/code]

I think you can try something like this (untested, and may not match the particular actions you’re defining):

Copulating is an action applying to nothing. Understand "copulate" as copulating. Copulating-with-text is an action applying to one topic. Understand "copulate [text]" as copulating-with-text. Instead of copulating-with-text: try copulating.

Yeah, I now use the ‘Understand (verb) [text]’ trick all the time to prevent the parser giving stock error messages when people type additional garbage or stuff that doesn’t match the kind of second noun that is actually sought.

I suppose I would have tried something like

Rule for printing a parser error when the latest parser error is the only understood as far as error:
	if the current action is swearing obscenely and (the player's command includes "fuck" or the player's command includes "screw"):
		instead say "Your body is no longer capable of performing sexual acts, and attempts to do them invariably result in violent acts instead."
		
Check turning something when the player's command includes "screw":
	if the noun is a person: 
		try swearing obscenely;
		stop the action.

Don’t think that works – if there’s a parser error, then the current action doesn’t get changed from “waiting.” If you try this:

Rule for printing a parser error when the latest parser error is the only understood as far as error: if the current action is swearing obscenely and (the player's command includes "fuck" or the player's command includes "screw"): instead say "Your body is no longer capable of performing sexual acts, and attempts to do them invariably result in violent acts instead."; otherwise: say "I only understood you as far as wanting to perform [the current action]."

then “fuck you” yields “I only understood you as far as wanting to perform waiting.”

UPDATE: You can use the action_to_be trick, I guess:

[code]To decide which action name is the action to be: (- action_to_be -).

Rule for printing a parser error when the latest parser error is the only understood as far as error and the action to be is the swearing obscenely action and (the player’s command includes “fuck” or the player’s command includes “screw”):
instead say “Your body is no longer capable of performing sexual acts, and attempts to do them invariably result in violent acts instead.”[/code]

I’m pretty satisfied now that the solution I came up with is about as clean as it can be. I made a few changes: “Copulating with” is the main action, which actually prints the refusal message. Text-copulating got renamed “Sexually cursing” and it redirects to copulating with yourself. Which of course makes masturbating redundant, so it was removed.

I also remembered that you can throw extra tokens into an “understand … as a mistake” line, so I’ve used that in other places where I want a [text] token.

Aha! That’s good to know. Thanks for pointing it out.

Yet still, don’t forget that “damn” also means to put curse upon something, which may be used by some games or stories, for instance when there’s a priest involved and you have to damn the dragon to stop it from killing you… Or something like that. So this can’t really be ruled offensive by default. IMHO, “damn” is a mild-to-subHeavy curse.

That’s a good argument for removing it from the Standard Library completely.

Mm, no, it isn’t.

I’m not arguing for keeping it in. But saying that it might have to be changed in a game about a priest? That sort of argument can be levelled against every single verb. It should not be a criterion for building the standard library.