Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000312Documentation, Examples, and Web SiteWriting with Informpublic2010-09-29 13:042010-10-29 09:23
ReporterRon Newcomb 
Assigned Tograham 
PrioritynormalSeveritymildReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSWindowsOS VersionXP
Product Version6E72 
Target VersionFixed in Version6F95 
Summary0000312: Default behavior of "printing the name" activity is not fully explained
DescriptionThe line of code

     The printed name of the player is "Bob".

compiles but has no effect. The lines

     Bob is a person. The player is Bob. The printed name of Bob is "Bob".

still have no effect. The lines

    Bob is a person. The printed name of the player is "Bob". The printed name of Bob is "Bob". When play begins, now the player is Bob.

still have no effect. What does have an effect is

    Rule for printing the name of the player: say the printed name of the player.

has an effect but shouldn't, because saying the printed name of something is the default behavior of the printing the name activity. This line should be perfectly redundant.
Minimal Source Text To Reproduce
Bob is a person. The printed name of the player is "Bob". The printed name of Bob is "Bob".  
When play begins, now the player is Bob.

The spotlight is a room.
Additional InformationThe default behavior of the printing the name activity, otherwise known as STANDARD_NAME_PRINTING_R, contains this paragraph of code:

if (obj == player) {
if (indef_mode == NULL && caps_mode) print (string) YOU__TX;
else print (string) YOURSELF__TX;
return;
}

Solution to the above problem: remove this paragraph of code from STANDARD_NAME_PRINTING_R, and put it into a function of its own, such as

[ PrintYouOryourself;
if (indef_mode == NULL && caps_mode) print (string) YOU__TX;
else print (string) YOURSELF__TX;
];

And then set selfobj.shortname to it, possibly from POSITION_PLAYER_IN_MODEL_R if not at compile-time. This will preserve the default (and long-standing) Inform behavior of printing You/yourself for the player if the author doesn't intervene as well as cure the above inconsistencies when the author does wish to intervene.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000635)
jmcgrew (administrator)
2010-09-29 15:12

I'm reclassifying this as a documentation bug. Displaying the printed name is not the only default behavior of the "printing the name" activity: as you point out, it has a special case for the player that isn't mentioned in the documentation for that activity.

Also, when the player changes during the game, the printed names are switched around as well (see the ChangePlayer routine). Even if the "printing the name" activity were changed, the printed name you set still wouldn't be shown after changing the player to someone else.
(0000637)
Ron Newcomb (reporter)
2010-09-29 18:24

Though I (now) understand the need for ChangePlayer to carry the second-person pronouns to their new home, typically when an author asserts the player's printed name property to something, it is those same-said pronouns that are being targeted for removal. If my proposed solution does not function correctly, well, it is hardly the first time. I aimed for the equivalent of something like,

    The printed name of the player is usually "[if caps_mode][YOU__TX][else][YOURSELF__TX]".

which could have been nullified by a similar statement sans the "usually". Or however such a thing is put into effect.

Regardless, I maintain that it is no mere documentation bug for assertions to silently fail.
(0000638)
jmcgrew (administrator)
2010-09-29 18:46

The assertion isn't silently failing. The printed name property of the player is set correctly; it just isn't displayed, because the special case code for printing the player's name doesn't use that property.
(0000641)
graham (administrator)
2010-09-30 14:13

I've amended the documentation so that the relevant para reads:

2. The default behaviour. For items other than the current player, the "printed name" property is printed out; but for the current player, "you" or "yourself" is printed. (That doesn't necessarily mean that the "printed name" of the player is never used. Suppose there are two people, Alice and Bob, and the narrative switches between them: when Alice is the player, she appears as "yourself" but Bob is "Bob"; but when Bob is the player, he is "yourself" and Alice is "Alice".)

- Issue History
Date Modified Username Field Change
2010-09-29 13:04 Ron Newcomb New Issue
2010-09-29 15:12 jmcgrew Note Added: 0000635
2010-09-29 15:12 jmcgrew Project Core Inform => Documentation, Examples, and Web Site
2010-09-29 15:13 jmcgrew Severity serious => mild
2010-09-29 15:13 jmcgrew Status new => confirmed
2010-09-29 15:13 jmcgrew Category Assertions and creations => Writing with Inform
2010-09-29 15:13 jmcgrew Summary The printed name of the player ... does nothing. => Default behavior of "printing the name" activity is not fully explained
2010-09-29 18:24 Ron Newcomb Note Added: 0000637
2010-09-29 18:46 jmcgrew Note Added: 0000638
2010-09-30 14:13 graham Note Added: 0000641
2010-09-30 14:13 graham Status confirmed => resolved
2010-09-30 14:13 graham Resolution open => fixed
2010-09-30 14:13 graham Assigned To => graham
2010-10-29 09:23 jmcgrew Fixed in Version => 6F95
2010-10-29 09:23 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker