//---------------------------------------------------------------
// MSG_CUSTOM.T
// by Greg Boettcher
// Version 2.1
// Released 18 November 2007
// Version 2.1 (very slight bug fix) released 23 Jun 2010
//
// Copyright 2006-2007 Greg Boettcher.
//
// This file is freeware. You may use it for any purpose without
// permission, but please credit me appropriately.
//
// My email address:
// <gregXatXgregboettcherXdotXcom>
//---------------------------------------------------------------
--------------------
ABOUT THIS EXTENSION
--------------------
With this file, you can change the standard TADS 3 messages in
any or all of the following ways:
1. You can deal with "smart quotes" as follows:
- sometimes use smart quotes (TADS 3.0.9 default)
- always use smart quotes (TADS 3.0.10+ default)
- never use smart quotes
2. You can deal with contractions as follows:
- sometimes use contractions (TADS 3 default)
- usually use contractions
- always use contractions
- or you can use contractions even less often than the
standard library does. Not recommended unless your
game's narrator and/or its NPCs are supposed to speak
like Lieutenant Commander Data of Star Trek.
3. You can, if you want, make the standard messages less formal
and more casual. If you do, then "appears" is replaced with
"seems"; "you see no" is replaced with "you don't see any"; etc.
4. You can make it so that when your TADS 3 project refers to
itself as "the story," this phrase is changed to any of the
following:
- "the story"
- "this story"
- "the game"
- "this game"
5. You can adjust the phrasing in cases where TADS 3 tells you
something "you must" do. You can do this in any of five ways,
exemplified as follows:
- "You must stand up before you can do that." (TADS 3 default)
- "You'll have to stand up before you can do that."
- "You'd have to stand up before you could do that."
- "You'll need to stand up before you can do that."
- "You'd need to stand up before you could do that."
These changes should work correctly even if you are doing
something unusual, such as putting your game in the past tense
or if your game is in the first person or third person.
Msg_custom.t should produce the exact same output as msg_neu.t
until you adjust its settings to suit your taste. Also, just to
be clear, all of its settings are independent of each other.
So you can certainly use it even if only one of its features
interests you.
Although I tested this extension quite thoroughly and it seems
relatively bug-free, it is very complicated, so I'm sure there
could be some bugs lurking in it. As such, I will need people's
help in reporting any and all bugs they may may find. While I
can't make any promises for the future, I at least *intend* to
maintain this file as needed.
-------------------------
HOW TO USE THIS EXTENSION
-------------------------
Put msg_custom.t into your project after the standard library
files, but before your own files. (And you do need to include
the standard library files. Msg_custom.t is not meant to
replace msg_neu.t or en_us.t.)
Then put something into your project that looks like this:
The above example sets each of the variables to their
default settings, and as such accomplishes nothing. But
you can adjust the values of each of those variables, as
described below in the "message variables" comments.
The TADS 3 library should respond accordingly.
For more details on how to do this for each of the individual
variables, see directly below in my "message variables"
comments.
Have fun! And by all means email me with any bugs you may
find.
modify libGlobal
// thisStoryNotTheStory:
// = sometimes "*The* story has never referred (T3 default)
// to any such footnote."
// "*This* story has no ABOUT
// information."
// = always "*This* story has never referred (my preference)
// to any such footnote."
// "*This* story has no ABOUT
// information."
// = never "*The* story has never referred
// to any such footnote."
// "*The* story has no ABOUT
// information."
thisStoryNotTheStory = sometimes
// gameNotStory:
// = nil "This story has no ABOUT information." (T3 default)
// = true "This game has no ABOUT information." (my preference)
gameNotStory = nil
// youMustPref: (when the game is in present tense)
// = youMust "You must stand up before (T3 default)
// you can do that."
// = youllHaveTo "You'll have to stand up before (my preference)
// you can do that."
// = youdHaveTo "You'd have to stand up before
// you could do that."
// = youllNeedTo "You'll need to stand up before
// you can do that."
// = youdNeedTo "You'd need to stand up before
// you could do that."
// youMustPref: (when the game is in past tense)
// = youMust "You had to stand up before (T3 default)
// you could do that."
// = youllHaveTo "You would have had to stand (my preference)
// OR youdHaveTo up before you can do that."
// = youllNeedTo "You needed to stand up before
// you could do that.
// = youdNeedTo "You would have needed to stand
// up before you could do that."
youMustPref = youMust
// useContractions:
// = always (always use contractions, even "YOU'VE DIED," etc.)
// = usually (my preference)
// = sometimes (T3 default)
// = seldom (narrator talks like Lt. Cmdr. Data)
// = never (narrator and all NPCs talk like Lt. Cmdr. Data)
useContractions = sometimes
// preferCasual:
// = nil "You *see no* box here." (T3 default)
// "Bob does not *appear* interested."
// [give a "must" example?]
// = true "You *don't see any* box here." (my preference)
// "Bob does not *seem* interested."
// [give a "must" example?]
preferCasual = nil
// useSmartQuotes:
// = always Replace: (my preference,
// (1) all double quotes, and TADS 3.0.10+
// (2) all single quotes, and default)
// (3) all apostrophes
// with
// (1) '<q>', '</q>',
// (2) '’', '‘', and
// (3) '’'.
// = sometimes (Default TADS 3.0.9 (TADS 3.0.9
// usage, using smart default)
// quotes only sometimes.)
// = never (Never use any smart
// quotes.)
useSmartQuotes = always
;
///////////////////////////////////////////////////////////
// MISC. MODIFICATIONS FOR TADS 3.0.8
///////////////////////////////////////////////////////////
// This extension was originally designed to run on games
// compiled with TADS 3.0.9+. With some modifications, however,
// we can make sure it works with 3.0.8 as well.
modify GameMainDef
usePastTense = nil
;
// In TADS 3.0.9, tSel() is defined as a macro rather than
// a function. I don't know why, but I can't help thinking
// that a function would work too, and would also provide
// a better across-the-board solution for all the files
// in a project.
#ifndef tSel
//#define tSel(presVal, pastVal) \
// (gameMain.usePastTense ? (pastVal) : (presVal))
tSel(presVal, pastVal) {
return (gameMain.usePastTense ? pastVal : presVal);
}
#endif
// I tried to append to langMessageBuilder.paramList_, but
// I found it more difficult than I expected. So I had to
// replace the list, rather than modify it.
modify langMessageBuilder
// I was wanted to append to this list, but I failed to
// find a way to make this happen before the list is
// processed. Therefore, I had to replace the entire list.
paramList_ =
[
// parameters that imply the actor as the target object
['you/he', &theName, 'actor', nil, true],
['you/she', &theName, 'actor', nil, true],
['you\'re/he\'s', &itIsContraction, 'actor', nil, true],
['you\'re/she\'s', &itIsContraction, 'actor', nil, true],
['you\'re', &itIsContraction, 'actor', nil, true],
['you/him', &theNameObj, 'actor', &itReflexive, nil],
['you/her', &theNameObj, 'actor', &itReflexive, nil],
['your/her', &theNamePossAdj, 'actor', nil, nil],
['your/his', &theNamePossAdj, 'actor', nil, nil],
['your', &theNamePossAdj, 'actor', nil, nil],
['yours/hers', &theNamePossNoun, 'actor', nil, nil],
['yours/his', &theNamePossNoun, 'actor', nil, nil],
['yours', &theNamePossNoun, 'actor', nil, nil],
['yourself/himself', &itReflexive, 'actor', nil, nil],
['yourself/herself', &itReflexive, 'actor', nil, nil],
['yourself', &itReflexive, 'actor', nil, nil],
// Verb 's' endings. In most cases, you should use 's/d', 's/ed',
// or 's/?ed' rather than 's', except in places where you know you
// will never need the past tense form, because 's' doesn't handle
// the past tense. Don't use 's/?ed' with a literal question
// mark; put a consonant in place of the question mark instead.
['s', &verbEndingS, nil, nil, true],
['s/d', &verbEndingSD, nil, nil, true],
['s/ed', &verbEndingSEd, nil, nil, true],
['s/?ed', &verbEndingSMessageBuilder_, nil, nil, true],
// note that we don't have its/his, because that leaves
// ambiguous whether we want an adjective or noun form - so we
// only use the feminine pronouns with these, to make the
// meaning unambiguous
['its/her', &itPossAdj, nil, nil, nil],
['its/hers', &itPossNoun, nil, nil, nil],
// The special invisible subject marker - this can be used to
// mark the subject in sentences that vary from the
// subject-verb-object structure that most English sentences
// take. The usual SVO structure allows the message builder to
// see the subject first in most sentences naturally, but in
// unusual sentence forms it is sometimes useful to be able to
// mark the subject explicitly. This doesn't actually result in
// any output; it's purely for marking the subject for our
// internal book-keeping.
//
// (The main reason the message builder wants to know the subject
// in the first place is so that it can use a reflexive pronoun
// if the same object ends up being used as a direct or indirect
// object: "you can't open yourself" rather than "you can't open
// you.")
['subj', &dummyName, nil, nil, true]
// The following just didn't work, so I resorted to replacing
// the entire set of values for langMessageBuilder.paramList_
//custMsgPreinit: PreinitObject
// execute() {
// langMessageBuilder.paramList_.append(
// ['n\'t', &ntAbbr, nil, nil, true],
// ['_not', &_not, nil, nil, true]
// );
// }
// execAfterMe = [adv3LibPreinit]
//;
modify Thing
thatIsContraction {
if (gameMain.usePastTense)
return thatNom + ' ' + verbToBe;
// From now on, we assume present tense.
else if (libGlobal.useContractions == seldom ||
libGlobal.useContractions == never) // Lt. Cmdr. Data scenario
return thatNom + ' ' + verbToBe;
else if (isPlural)
return thatNom + ' are';
else
return thatNom + custMsgObj.rsquoPlainStr + 's';
}
itIsContraction {
if (gameMain.usePastTense)
return itNom + ' ' + verbToBe; // "it was"/"they were"
// From now on, we assume present tense.
else if (libGlobal.useContractions == seldom ||
libGlobal.useContractions == never) // Lt. Cmdr. Data scenario
return itNom + ' ' + verbToBe; // "it is"/"they are"
else if (isPlural)
return itNom + custMsgObj.rsquoPlainStr + 're'; // "they're"
else
return itNom + custMsgObj.rsquoPlainStr + 's'; // "it's"
}
theNamePossAdj {
return theName +
(isPlural && theName.endsWith('s')
? custMsgObj.rsquoPlainStr
: custMsgObj.rsquoPlainStr + 's');
}
pluralNameFrom(str) {
local len;
local lastChar;
local lastPair;
if (isPlural)
return str;
//// The following will become part of TADS 3 in the version
//// that follows 3.0.9.
//if (rexMatch(patOfPhrase, str) != nil) {
// local ofSuffix;
// str = rexGroup(1)[3];
// ofSuffix = rexGroup(2)[3];
// return pluralNameFrom(str) + ofSuffix;
//}
len = str.length();
if (len == 0)
return '';
if (len == 1) {
if (rexMatch(patSingleApostropheS, str) != nil)
return str + custMsgObj.rsquoPlainStr + 's';
else
return str + 's';
}
lastChar = str.substr(len, 1);
lastPair = (len == 1 ? lastChar : str.substr(len - 1, 2));
if (rexMatch(patUpperOrDigit, lastChar) != nil)
return str + 's';
if (lastChar == '.')
return str + custMsgObj.rsquoPlainStr + 's';
if (rexMatch(patVowelY, lastPair) != nil)
return str.substr(1, len - 1) + 'ies';
if ('sxzh'.find(lastChar) != nil)
return str + 'es';
return str + 's';
}
nameIsnt {
if (libGlobal.useContractions == seldom ||
libGlobal.useContractions == never) // Lt. Cmdr. Data scenario
return nameIs + ' not';
else
return nameIs + 'n' + custMsgObj.rsquoPlainStr + 't';
}
nameIsNot {
if (libGlobal.useContractions == usually ||
libGlobal.useContractions == always)
return theName + ' ' + verbToBe + custMsgObj.ntAbbr;
else
return theName + ' ' + verbToBe + ' not';
}
verbCant() {
if (gameMain.usePastTense) {
if (libGlobal.useContractions != never &&
libGlobal.useContractions != seldom)
return 'couldn' + custMsgObj.rsquoPlainStr + 't';
else
return 'could not';
}
else { // use present tense
if (libGlobal.useContractions != never &&
libGlobal.useContractions != seldom)
return 'can' + custMsgObj.rsquoPlainStr + 't';
else
return 'cannot';
}
}
verbWont() {
if(gameMain.usePastTense) {
if (libGlobal.useContractions != never &&
libGlobal.useContractions != seldom)
return 'wouldn' + custMsgObj.rsquoPlainStr + 't';
else
return 'would not';
}
else { // use present tense
if (libGlobal.useContractions != never &&
libGlobal.useContractions != seldom)
return 'won' + custMsgObj.rsquoPlainStr + 't';
else
return 'will not';
}
}
verbCannot() {
if (gameMain.usePastTense) {
if (libGlobal.useContractions == usually ||
libGlobal.useContractions == always)
return 'couldn' + custMsgObj.rsquoPlainStr + 't';
else
return 'could not';
}
else { // use present tense
if (libGlobal.useContractions == usually ||
libGlobal.useContractions == always)
return 'can' + custMsgObj.rsquoPlainStr + 't';
else
return 'cannot';
}
}
// Presumably in all relevant cases
// Thing.nameWouldHaveTo is overridden by
// Actor.nameWouldHaveTo. But just in case...
nameWouldHaveTo {
if (libGlobal.youMustPref == youMust)
return theName + ' ' + verbMust;
else if (gameMain.usePastTense) {
if (libGlobal.youMustPref == youllNeedTo)
return theName + ' needed to';
if (libGlobal.youMustPref == youdNeedTo)
return theName + ' would have needed to';
else
return theName + ' would have had to';
}
else { // present tense
switch (libGlobal.youMustPref) {
case youllHaveTo: return theName + ' will have to';
case youdHaveTo: return theName + ' would have to';
case youllNeedTo: return theName + ' will need to';
case youdNeedTo: return theName + ' would need to';
default: return theName + ' ' + verbMust; // should never happen; covered above
}
}
}
// Use this when it makes no sense to use the subjective,
// so you want to, e.g., substitute "would" with "will".
nameWillHaveTo {
if (gameMain.usePastTense) {
switch (libGlobal.youMustPref) {
case youllHaveTo:
case youdHaveTo: return theName + ' had to';
case youllNeedTo:
case youdNeedTo: return theName + ' needed to';
default: return theName + ' had to';
}
}
// present tense
switch (libGlobal.youMustPref) {
case youllHaveTo:
case youdHaveTo: return theName + ' will have to';
case youllNeedTo:
case youdNeedTo: return theName + ' will need to';
default: return theName + ' must';
}
}
itCould {
if (gameMain.usePastTense
|| libGlobal.youMustPref == youdHaveTo
|| libGlobal.youMustPref == youdNeedTo)
return itNom + ' could';
else
return itNom + ' can';
}
nameSeesNo {
if (!libGlobal.preferCasual)
return theName + ' ' + verbToSee + ' no';
else
return nameDoes + custMsgObj.ntAbbr + ' see any';
}
hasNo {
if (!libGlobal.preferCasual)
return verbToHave + ' no';
else
return verbToDo + custMsgObj.ntAbbr + ' have any';
}
thatIsNot {
if (libGlobal.useContractions == usually ||
libGlobal.useContractions == always)
return thatIsnt;
else
return thatNom + ' ' + verbToBe + ' not';
}
thatIsnt {
if (libGlobal.useContractions == seldom ||
libGlobal.useContractions == never) {
return thatNom + ' ' + verbToBe + ' not';
}
// I prefer "That's not" to "That isn't." Therefore, do
// it that way whenever possible if libGlobal.useContractions
// is usually or always.
else if (libGlobal.useContractions == usually ||
libGlobal.useContractions == always) {
if (!isPlural && !gameMain.usePastTense)
return thatIsContraction + ' not'; // "that's not"
else
// "those aren't", "that wasn't", "those weren't"
return thatNom + ' ' + verbToBe + custMsgObj.ntAbbr;
}
else { // libGlobal.useContractions == sometimes (default)
return thatNom + ' ' + verbToBe + custMsgObj.ntAbbr;
}
}
_not() {
if (libGlobal.useContractions == usually ||
libGlobal.useContractions == always)
return 'n' + custMsgObj.rsquoPlainStr + 't';
else
return ' not';
}
ntAbbr() {
if (libGlobal.useContractions == seldom ||
libGlobal.useContractions == never)
return ' not';
else
return 'n' + custMsgObj.rsquoPlainStr + 't';
}
;
///////////////////////////////////////////////////////////
// ACTOR MODIFICATIONS
///////////////////////////////////////////////////////////
modify Actor
thatIsContraction {
if (libGlobal.useContractions == seldom ||
libGlobal.useContractions == never) // Lt. Cmdr. Data scenario
return thatNom + ' ' + verbToBe;
else
return thatNom +
tSel([custMsgObj.rsquoPlainStr + 'm',
custMsgObj.rsquoPlainStr + 're',
custMsgObj.rsquoPlainStr + 's',
custMsgObj.rsquoPlainStr + 're',
custMsgObj.rsquoPlainStr + 're',
' are'][conjugationSelector], ' ' + verbToBe);
}
itIsContraction {
if (libGlobal.useContractions == seldom ||
libGlobal.useContractions == never) // Lt. Cmdr. Data scenario
return itNom + ' ' + verbToBe;
else
return itNom +
tSel(custMsgObj.rsquoPlainStr +
['m',
're',
's',
're',
're',
're'][conjugationSelector], ' ' + verbToBe);
}
nameIs {
if (referralPerson == ThirdPerson)
return theName + ' ' + verbToBe;
else if (libGlobal.useContractions == usually ||
libGlobal.useContractions == always)
// Do thatIsContraction in order to get the proper contractions
// whenever appropriate.
return thatIsContraction;
else
return theName + ' ' + verbToBe;
}
nameIsnt {
if (libGlobal.useContractions == seldom ||
libGlobal.useContractions == never) // Lt. Cmdr. Data scenario
return nameIs + ' not';
// I think, e.g., "you're not" sounds more natural than "you aren't",
// so if the author picks my settings -- namely, if they set it so
// libGlobal.useContractions == usually -- then change this appropriately.
else if (libGlobal.useContractions == usually ||
libGlobal.useContractions == always)
return tSel(['I' + custMsgObj.rsquoPlainStr + 'm not',
'you' + custMsgObj.rsquoPlainStr + 're not',
nameIs + 'n' + custMsgObj.rsquoPlainStr + 't',
'we' + custMsgObj.rsquoPlainStr + 're not',
'you' + custMsgObj.rsquoPlainStr + 're not',
nameIs + 'n' + custMsgObj.rsquoPlainStr + 't'][conjugationSelector],
nameIs + 'n' + custMsgObj.rsquoPlainStr + 't');
else
return (conjugationSelector == 1 && !gameMain.usePastTense
? 'I' + custMsgObj.rsquoPlainStr + 'm not' : inherited);
}
nameIsNot {
if (libGlobal.useContractions == usually ||
libGlobal.useContractions == always)
return nameIsnt;
else
return theName + ' ' + verbToBe + ' not';
}
thatIsnt {
// This is complicated, but fortunately, whenever
// referralPerson is FirstPerson or SecondPerson,
// what we want is identical with nameIsnt, so that
// makes it easier.
if (referralPerson == FirstPerson ||
referralPerson == SecondPerson)
return nameIsnt;
// All remaining stuff is ThirdPerson.
else if (libGlobal.useContractions == seldom ||
libGlobal.useContractions == never)
return thatNom + ' ' + verbToBe + ' not';
// All remaining cases will do the contraction
// (and are in ThirdPerson).
else if (!isPlural && !gameMain.usePastTense)
// "that's not", "he's not", "she's not"
return thatNom + custMsgObj.sOrWasStr + ' not';
else
// "those aren't", "those weren't",
// "that wasn't", "he wasn't", "she wasn't"
return thatNom + ' ' + verbToBe + custMsgObj.ntAbbr;
}
// Commented out because this should be the same as Thing.thatIsNot
//thatIsNot {
// if (libGlobal.useContractions == usually ||
// libGlobal.useContractions == always)
// return thatIsnt;
// else
// return thatNom + ' ' + verbToBe + ' not';
//}
nameWouldHaveTo {
// Actor.nameWouldHaveTo is in large measure similar to
// Thing.nameWouldHaveTo...
if (libGlobal.youMustPref == youMust)
return theName + ' ' + verbMust;
else if (gameMain.usePastTense) {
if (libGlobal.youMustPref == youllNeedTo ||
libGlobal.youMustPref == youdNeedTo)
return theName + ' would have needed to';
else
return theName + ' would have had to';
}
// ... butActor.nameWouldHaveTo differs from
// Thing.nameWouldHaveTo in its use of contractions.
// The following are all present tense.
else if (referralPerson == 3) {
switch (libGlobal.youMustPref) {
case youllHaveTo: return theName + ' will have to';
case youdHaveTo: return theName + ' would have to';
case youllNeedTo: return theName + ' will need to';
case youdNeedTo: return theName + ' would need to';
default: return theName + ' ' + verbMust; // should never happen; covered above
}
}
// All other cases involve the use of a pronoun followed
// by a contraction.
else {
switch (libGlobal.youMustPref) {
case youllHaveTo: return theName + custMsgObj.rsquoStr + 'll have to';
case youdHaveTo: return theName + custMsgObj.rsquoStr + 'd have to';
case youllNeedTo: return theName + custMsgObj.rsquoStr + 'll need to';
case youdNeedTo: return theName + custMsgObj.rsquoStr + 'd need to';
default: return theName + ' ' + verbMust; // should never happen; covered above
}
}
}
// Use this when it makes no sense to use the subjective,
// so you want to, e.g., substitute "would" with "will".
nameWillHaveTo {
if (gameMain.usePastTense) {
switch (libGlobal.youMustPref) {
case youllHaveTo:
case youdHaveTo: return theName + ' had to';
case youllNeedTo:
case youdNeedTo: return theName + ' needed to';
default: return theName + ' had to';
}
}
// present tense
switch (libGlobal.youMustPref) {
case youllHaveTo:
case youdHaveTo:
if (referralPerson == 3)
return theName + ' will have to';
else
return theName + custMsgObj.rsquoStr + 'll have to';
case youllNeedTo:
case youdNeedTo:
if (referralPerson == 3)
return theName + ' will need to';
else
return theName + custMsgObj.rsquoStr + 'll need to';
default:
return theName + ' must';
}
}
// The following Actor modifications are to correct an inconsistency
// (a bug?) in the TADS 3.0.9 library, whereby 1st person plural
// comes out as "I" instead of "we" in some cases (even though
// 1st person plural does work in other cases). As of right now
// (the morning of April 8, 2006), I don't know whether this will
// be corrected in the T3 library, but I am correcting it here.
theName {
return (referralPerson == ThirdPerson
? inherited : itNom);
}
theNameObj {
return (referralPerson == ThirdPerson
? inherited : itObj);
}
theNamePossAdj {
return (referralPerson == ThirdPerson
? inherited : itPossAdj);
}
theNamePossNoun {
return (referralPerson == ThirdPerson
? inherited : itPossNoun);
}
aName {
return (referralPerson == ThirdPerson
? inherited : itNom);
}
aNameObj {
return (referralPerson == ThirdPerson
? inherited : itObj);
}
;
modify libMessages //superclass is MessageHelper
whomPronoun = 'whom'
offerOopsNote = true
commandLookAround = 'look around'
commandFullScore = 'full score'
announceRemappedAction(action) {
return '<./p0>\n<.assume>' + action.getParticiplePhrase()
+ '<./assume>\n';
}
announceImplicitAction(action, ctx) {
return ctx.buildImplicitAnnouncement(action.getImplicitPhrase(ctx));
}
silentImplicitAction(action, ctx) { return ''; }
announceMoveToBag(action, ctx) {
return ctx.buildImplicitAnnouncement(
action.getImplicitPhrase(ctx) + ' to make room');
}
showCredit(name, byline) { "<<name>> <<byline>>"; }
showVersion(name, version) { "<<name>> version <<version>>"; }
noAboutInfo {
"<.parser><<custMsgObj.ThisStoryStr>> has no
ABOUT information.<./parser> ";
// I was going to do it the following way, but decided I like
// the original best after all.
//"<.parser><<custMsgObj.ThisStoryStr>> ";
//if (!libGlobal.preferCasual)
// "has no";
//else
// "does<<custMsgObj.ntAbbr>> have any";
//" ABOUT information.<./parser> ";
}
showListState(state) { " (<<state>>)"; }
allInSameListState(lst, stateName)
{ " (<<lst.length() == 2 ? 'both' : 'all'>> <<stateName>>)"; }
distantThingDesc(obj) {
gMessageParams(obj);
"{It's obj} too far away to make out any detail. ";
}
obscuredThingDesc(obj, obs) {
gMessageParams(obj, obs);
"{You/he} {can\'t} make out any detail through {the obs/him}. ";
}
distantThingSoundDesc(obj)
{ "{You/he} {can\'t} hear any detail from this distance. "; }
obscuredThingSoundDesc(obj, obs) {
gMessageParams(obj, obs);
"{You/he} {can\'t} hear any detail through {the obs/him}. ";
}
distantThingSmellDesc(obj)
{ "{You/he} {can\'t} smell much at this distance. "; }
obscuredThingSmellDesc(obj, obs) {
gMessageParams(obj, obs);
"{You/he} {can\'t} smell much through {the obs/him}. ";
}
thingTasteDesc(obj) {
gMessageParams(obj);
"{It/he obj} taste{s/d} much as {you/he} would {|have}
expect{|ed}. ";
}
thingFeelDesc(obj) {
"{You/he} ";
if (!libGlobal.preferCasual)
"{feel[s actor]|felt} no";
else
"<<gActor.verbToDo>><<custMsgObj.ntAbbr>> feel any";
"thing out of the ordinary. ";
}
obscuredReadDesc(obj) {
gMessageParams(obj);
"{You/he} {can\'t} see {that obj/him} well enough to read
{it/him}. ";
}
dimReadDesc(obj) {
gMessageParams(obj);
"There<<custMsgObj.sOrWasStr>>
not enough light to read {that obj/him}. ";
}
litMatchDesc(obj) { "\^<<obj.nameIs>> lit. "; }
unlitMatchDesc(obj) { "\^<<obj.nameIs>> an ordinary match. "; }
litCandleDesc(obj) { "\^<<obj.nameIs>> lit. "; }
putDestContainer(obj) { return 'into ' + obj.theNameObj; }
putDestSurface(obj) { return 'onto ' + obj.theNameObj; }
putDestUnder(obj) { return 'under ' + obj.theNameObj; }
putDestBehind(obj) { return 'behind ' + obj.theNameObj; }
putDestFloor(obj) { return 'to ' + obj.theNameObj; }
listSepMiddle = ", "
listSepTwo = " and "
listSepEnd = ", and "
longListSepMiddle = "; "
longListSepTwo = ", and "
longListSepEnd = "; and "
showScoreMessage(points, maxPoints, turns) {
"In <<turns>> move<<turns == 1 ? '' : 's'>>,
<<libGlobal.useContractions == always
? 'you' + custMsgObj.rsquoPlainStr + 've' : 'you have'>>
scored <<points>> of a possible <<maxPoints>> point<<
maxPoints == 1 ? '' : 's'>>. ";
}
showScoreNoMaxMessage(points, turns) {
"In <<turns>> move<<turns == 1 ? '' : 's'>>,
<<libGlobal.useContractions == always
? 'you' + custMsgObj.rsquoPlainStr + 've' : 'you have'>>
scored <<points>> point<<points == 1 ? '' : 's'>>. ";
}
showScoreRankMessage(msg) { "This makes you <<msg>>. "; }
showFullScorePrefix = "Your score consists of:"
fullScoreItemPoints(points) {
"<<points>> point<<points == 1 ? '' : 's'>> for ";
}
firstScoreChange(delta) {
"<.commandsep><.notification><<
basicScoreChange(delta)>><./notification>
\n<.notification>If <<custMsgObj.youdStr>>
prefer not to be notified about
score changes in the future, type <<
aHref('notify off', 'NOTIFY OFF', 'Turn off score notifications')
>>.<./notification> ";
}
scoreChange(delta) {
"<.commandsep><.notification><<
basicScoreChange(delta)>><./notification> ";
}
basicScoreChange(delta) {
"Your <<aHref(commandFullScore, 'score', 'Show full score')>>
has just <<delta > 0 ? 'in' : 'de'>>creased by
<<spellInt(delta > 0 ? delta : -delta)>>
point<<delta is in (1, -1) ? '' : 's'>>.";
}
footnoteRef(num) {
local str;
str = '<sup>[<a href="footnote ' + num + '"><.a>';
str += num;
str += '<./a></a>]</sup>';
return str;
}
firstFootnote() {
"<.commandsep><.notification>A number in [square brackets] like
the one above refers to a footnote, which you can read by typing
FOOTNOTE followed by the number:
<<aHref('footnote 1', 'FOOTNOTE 1', 'Show footnote [1]')>>,
for example. Footnotes usually contain added background information
that might be interesting but is<<custMsgObj.ntAbbr>>
essential to the story.
If <<custMsgObj.youdStr>> prefer not to see footnotes at all,
you can control their appearance by typing
<<aHref('footnotes', 'FOOTNOTES',
'Control footnote appearance')>>.<./notification> ";
}
noSuchFootnote(num) {
"<.parser><<custMsgObj.TheStoryStr>> has never referred to any such
footnote.<./parser> ";
}
showFootnoteStatus(stat) {
"The current setting is FOOTNOTES ";
switch(stat)
{
case FootnotesOff:
"OFF, which hides all footnote references.
Type <<aHref('footnotes medium', 'FOOTNOTES MEDIUM',
'Set footnotes to Medium')>> to
show references to footnotes except those
<<custMsgObj.youveStr>>
already seen, or <<aHref('footnotes full', 'FOOTNOTES FULL',
'Set footnotes to Full')>>
to show all footnote references. ";
break;
case FootnotesMedium:
"MEDIUM, which shows references to unread footnotes, but
hides references to those <<custMsgObj.youveStr>>
already read. Type
<<aHref('footnotes off', 'FOOTNOTES OFF',
'Turn off footnotes')>> to hide
footnote references entirely, or <<aHref(
'footnotes full', 'FOOTNOTES FULL',
'Set footnotes to Full')>> to show every reference, even to
notes <<custMsgObj.youveStr>> already read. ";
break;
case FootnotesFull:
"FULL, which shows every footnote reference, even to
notes <<custMsgObj.youveStr>>
already read. Type <<aHref('footnotes medium',
'FOOTNOTES MEDIUM', 'Set footnotes to Medium')>> to show
only references to notes you
have<<custMsgObj.ntAbbr>> yet read, or
<<aHref('footnotes off', 'FOOTNOTES OFF', 'Turn off footnotes')>>
to hide footnote references entirely. ";
break;
}
}
acknowledgeFootnoteStatus(stat) {
"<.parser>The setting is now
<<shortFootnoteStatus(stat)>>.<./parser> ";
}
shortFootnoteStatus(stat) {
"FOOTNOTES <<
stat == FootnotesOff ? 'OFF'
: stat == FootnotesMedium ? 'MEDIUM'
: 'FULL' >>";
}
mainCommandPrompt(which) { "\b>"; }
parserErrorString(actor, msg) { say(msg); }
emptyCommandResponse = "<.parser>I beg your pardon?<./parser> "
invalidCommandToken(ch) {
"<.parser><<custMsgObj.TheStoryStr>>
does<<custMsgObj.ntAbbr>> know how to use the character
<<custMsgObj.lsquoStr>><<ch>><<custMsgObj.rsquoStr>>
in a command.<./parser> ";
}
commandResultsPrefix = '<.p0>'
commandInterruptionPrefix = '<.p>'
commandResultsSeparator = '<.p>'
complexResultsSeparator = '<.p>'
internalResultsSeparator = '<.p>'
commandResultsSuffix = ''
commandResultsEmpty =
('Nothing obvious happen' + tSel('s', 'ed') + '.<.p>')
intraCommandSeparator = '<.p>'
smellDescSeparator() {
"<.p>";
}
soundDescSeparator() {
"<.p>";
}
cannotTalkTo(targetActor, issuingActor) {
"\^<<targetActor.nameIs>> not something <<issuingActor.itNom>>
<<issuingActor.verbCan>> talk to. ";
}
alreadyTalkingTo(actor, greeter) {
"\^<<greeter.theName>> already <<greeter.verbToHave>>
<<actor.theNamePossAdj>> attention. ";
}
noTopicsNotTalking = "<.parser>{You're} not currently talking
to anyone.<./parser> "
oopsNote() {
if (offerOopsNote) {
"<.commandsep><.notification>If this was an accidental
misspelling, you can correct it by typing OOPS followed by the
corrected word now. Any time the <<custMsgObj.storyStr>> points out an unknown
word, you can correct a misspelling using OOPS as your next
command.<./notification> ";
libMessages.offerOopsNote = nil;
}
}
oopsOutOfContext = "<.parser>You can only use OOPS to correct
a misspelling immediately after the <<custMsgObj.storyStr>>
points out a word
it does<<custMsgObj.ntAbbr>> know.<./parser> "
oopsMissingWord = "<.parser>To use OOPS to correct a misspelling,
put the corrected word after OOPS, as in OOPS BOOK.<./parser> "
acknowledgeVerboseMode(verbose) {
if (verbose)
"<.parser>VERBOSE mode is now selected.<./parser> ";
else
"<.parser>TERSE mode is now selected.<./parser> ";
}
shortVerboseStatus(stat) { "<<stat ? 'VERBOSE' : 'TERSE'>> mode"; }
showNotifyStatus(stat) {
"<.parser>Score notifications are
currently <<stat ? 'on' : 'off'>>.<./parser> ";
}
shortNotifyStatus(stat) { "NOTIFY <<stat ? 'ON' : 'OFF'>>"; }
acknowledgeNotifyStatus(stat) {
"<.parser>Score notifications are now
<<stat ? 'on' : 'off'>>.<./parser> ";
}
// announceMultiActionObject() and announceAmbigActionObject()
// are handled differently in TADS 3.0.9 vs. TADS 3.0.10+,
// and furthermore we don't need to modify either version of
// either of those two methods. So just don't override them at all.
// TADS 3.0.9 methods:
//announceMultiActionObject(obj, whichObj, action) {
// return '<./p0>\n<.announceObj>' + obj.name
// + ':<./announceObj> <.p0>';
//}
//announceAmbigActionObject(obj, whichObj, action) {
// return '<.assume>' + obj.theNameObj + '<./assume>\n';
//}
// TADS 3.0.15 methods:
//announceMultiActionObject(obj, whichObj) {
// addReport(new MultiObjectAnnouncement(obj, whichObj, gAction));
//}
//announceAmbigActionObject(obj, whichObj) {
// addReport(new AmbigObjectAnnouncement(obj, whichObj, gAction));
//}
announceDefaultObject(obj, whichObj, action, resolvedAllObjects) {
return '<.assume>'
+ action.announceDefaultObject(obj, whichObj, resolvedAllObjects)
+ '<./assume>\n';
}
noCommandForAgain() {
"<.parser>There<<(libGlobal.useContractions == seldom ||
libGlobal.useContractions == never) ? ' is'
: custMsgObj.rsquoPlainStr + 's' >>
nothing to repeat.<./parser> ";
}
againCannotChangeActor() {
"<.parser>To repeat a command like
<<custMsgObj.ldquoStr>>turtle, go north,<<custMsgObj.rdquoStr>>
just say <<custMsgObj.ldquoStr>>again,<<custMsgObj.rdquoStr>> not
<<custMsgObj.ldquoStr>>turtle, again.<<custMsgObj.rdquoStr>><./parser> ";
}
againCannotTalkToTarget(issuer, target) {
"\^<<issuer.theName>> <<issuer.verbCannot>> repeat that command. ";
}
againNotPossible(issuer) {
"That command <<issuer.verbCannot>> be repeated now. ";
}
systemActionToNPC() {
"<.parser>This command cannot be directed to another
character in <<custMsgObj.theStoryStr>>.<./parser> ";
}
confirmQuit() {
"Do you really want to quit?\ (<<aHref('y', 'Y', 'Confirm quitting')
>> is affirmative) >\ ";
}
okayQuitting() { }
notTerminating() {
"<.parser>Continuing the <<custMsgObj.storyStr>>.<./parser> ";
}
confirmRestart() {
"Do you really want to start over?\ (<<aHref('Y', 'Y',
'Confirm restart')>> is affirmative) >\ ";
}
notRestarting() { "<.parser>Continuing the <<custMsgObj.storyStr>>.<./parser> "; }
showFinishMsg(msg) { "<.p>*** <<msg>>\ ***<.p>"; }
//finishDeathMsg = ('YOU'
// + tSel((libGlobal.useContractions == always
// ? custMsgObj.rsquoPlainStr + 'VE' : ' HAVE'), '')
// + ' DIED')
finishDeathMsg =
(gPlayerChar.theName.toUpper
+ tSel(
(libGlobal.useContractions == always
? (gPlayerChar.referralPerson != ThirdPerson ? '’VE' : ' HAVE')
: ' HAVE' )
, '')
+ ' DIED')
finishVictoryMsg = ('YOU'
+ tSel((libGlobal.useContractions == always
? custMsgObj.rsquoPlainStr + 'VE' : ' HAVE'), '')
+ ' WON')
finishFailureMsg = ('YOU'
+ tSel((libGlobal.useContractions == always
? custMsgObj.rsquoPlainStr + 'VE' : ' HAVE'), '')
+ ' FAILED')
finishGameOverMsg = 'GAME OVER'
getSavePrompt =
'Please select a file in which to save the current position'
getRestorePrompt = 'Please select the saved position file to restore'
saveOkay() { "<.parser>Saved.<./parser> "; }
saveCanceled() { "<.parser>Canceled.<./parser> "; }
saveFailed(exc) {
"<.parser>Failed; your computer might be running low
on disk space, or you might not have the necessary permissions
to write this file.<./parser> ";
}
noteMainRestore() { "<.parser>Restoring saved game...<./parser>\n"; }
restoreOkay() { "<.parser>Restored.<./parser> "; }
restoreCanceled() { "<.parser>Canceled.<./parser> "; }
restoreInvalidFile() {
"<.parser>Failed: this is not a valid saved
position file.<./parser> ";
}
restoreCorruptedFile() {
"<.parser>Failed: this saved state file appears to be
corrupted. This can occur if the file was modified by another
program, or the file was copied between computers in a non-binary
transfer mode, or the physical media storing the file were
damaged.<./parser> ";
}
restoreInvalidMatch() {
"<.parser>Failed: the file was not saved by
<<custMsgObj.thisStoryStr>>
(or was saved by an incompatible version of
<<custMsgObj.theStoryStr>>).<./parser> ";
}
restoreFailed(exc) {
"<.parser>Failed: the position could not be
restored.<./parser> ";
}
filePromptFailed() {
"<.parser>A system error occurred asking for a filename.
Your computer might be running low on memory, or might have a
configuration problem.<./parser> ";
}
pausePrompt() {
"<.parser><<custMsgObj.TheStoryStr>> is now paused. Please press
the space bar when you are ready to resume the
<<custMsgObj.storyStr>>, or
press the <<custMsgObj.lsquoPlainStr>>S<<custMsgObj.rsquoPlainStr>>
key to save the current position.<./parser><.p>";
}
pauseSaving() {
"<.parser>Saving the <<custMsgObj.storyStr>>...<./parser><.p>";
}
pauseEnded() {
"<.parser>Resuming the <<custMsgObj.storyStr>>.<./parser> ";
}
inputScriptOkay(fname) {
"<.parser>Reading commands from
<<custMsgObj.ldquoStr>><<fname.htmlify()
>><<custMsgObj.rdquoStr>>...<./parser>\n ";
}
getScriptingPrompt = 'Please select a name for the new script file'
scriptingOkay() {
"<.parser>Text will now be saved to the script file.
Type <<aHref('script off', 'SCRIPT OFF', 'Turn off scripting')>> to
discontinue scripting.<./parser> ";
}
scriptingCanceled = "<.parser>Canceled.<./parser> "
scriptOffOkay = "<.parser>Scripting ended.<./parser> "
scriptOffIgnored = "<.parser>No script is currently being
recorded.<./parser> "
getRecordingPrompt = 'Please select a name for the new command log file'
recordingOkay = "<.parser>Commands will now be recorded. Type
<<aHref('record off', 'RECORD OFF',
'Turn off recording')>>
to stop recording commands.<.parser> "
recordingCanceled = "<.parser>Canceled.<./parser> "
recordOffOkay = "<.parser>Command recording ended.<./parser> "
recordOffIgnored = "<.parser>No command recording is currently being
made.<./parser> "
getReplayPrompt = 'Please select the command log file to replay'
replayCanceled = "<.parser>Canceled.<./parser> "
undoOkay(actor, cmd) {
"<.parser>Taking back one turn: <<custMsgObj.ldquoStr>>";
if (actor != nil)
"<<actor>>, ";
"<<cmd>><<custMsgObj.rdquoStr>>.<./parser><.p>";
}
undoFailed() {
"<.parser>No more undo information is
available.<./parser> ";
}
noteWithScript = "<.parser>Comment recorded.<./parser> "
noteWithoutScript = "<.parser>Comment <b>not</b> recorded.<./parser> "
noteWithoutScriptWarning = "<.parser>Comment <b>not</b> recorded.
Use <<aHref('script', 'SCRIPT', 'Begin saving the transcript')
>> if you want to start recording the transcript.<./parser> "
// noteAccepted is only for TADS 3.0.9 and earlier
noteAccepted = "<.parser>Noted.<./parser> "
// noteWithoutNote is only for TADS 3.0.9 and earlier
noteWithoutNote = "<.p><.notification>You can enter notes into the
transcript by typing NOTE followed by any text you wish to enter
as your note. NOTE without any message text is fine, too, in
case you simply want to call attention to something immediately
preceding in the transcript.<./notification> "
// For the sake of reference, here is the TADS 3.0.9 version of
// noteWithoutScript:
//noteWithoutScript = "<.p><.notification>Note that the transcript
// is<<custMsgObj.ntAbbr>>
// currently being recorded. NOTE is usually used to provide feedback
// to the author by putting a comment in the transcript, so it's most
// useful when you're saving the transcript to a file. If you want
// to start saving the transcript, please type <<
// aHref('script', 'SCRIPT', 'Begin saving the transcript')
// >>.<./notification> "
invalidFinishOption(resp) {
"\bThat is<<custMsgObj.ntAbbr>> one of the options. ";
}
exitsOnOffOkay(stat, look) {
if (stat && look)
"<.parser>The list of exits will now be shown in both
the status line and in each room description.<./parser> ";
else if (!stat && !look)
"<.parser>The list of exits will no longer be shown in
either the status line or room description.<./parser> ";
else
"<.parser>The list of exits <<stat ? 'will' : 'will not'>> be
shown in the status line, and
<<look ? 'will' : 'wo' + custMsgObj.ntAbbr>>
be included in room descriptions.<./parser> ";
}
explainExitsOnOff =
"<.p><.notification>You can control the exit listings with the
EXITS command.
<<aHref('exits status', 'EXITS STATUS',
'Turn on status line exit listings')>> shows the exit
list in the status line,
<<aHref('exits look', 'EXITS LOOK',
'List exits in room descriptions')>>
shows a full exit list in each room description,
<<aHref('exits on', 'EXITS ON', 'Turn on all exit lists')>>
shows both, and
<<aHref('exits off', 'EXITS OFF', 'Turn off all exit lists')>>
turns off both kinds of exit lists.<./notification> "
currentExitsSettings(statusLine, roomDesc) {
"EXITS ";
if (statusLine && roomDesc)
"ON";
else if (statusLine)
"STATUSLINE";
else if (roomDesc)
"LOOK";
else
"OFF";
}
hintsDisabled = '<.parser>Hints are now disabled.<./parser> '
sorryHintsDisabled () {
return '<.parser>Sorry, but hints have been disabled
for this session, as you requested. If '
+ custMsgObj.youveStr + ' changed your mind, '
+ custMsgObj.youllStr + ' have to save your
current position, exit the TADS interpreter,
and start a new interpreter session.<./parser> ';
}
hintsNotPresent = '<.parser>Sorry, ' + custMsgObj.thisStoryStr
+ ' does' + custMsgObj.ntAbbr
+ ' have any built-in hints.<./parser> '
currentlyNoHints = '<.parser>Sorry, no hints are currently available.
Please check back later.<./parser> '
showHintWarning =
"<.notification>Warning: Some people do<<custMsgObj.ntAbbr>>
like built-in hints, since the temptation to ask for help
prematurely can become overwhelming when hints are so close
at hand. If <<custMsgObj.youreStr>> worried that your willpower
<<(libGlobal.useContractions == seldom
|| libGlobal.useContractions == never)
? 'will not' : 'won' + custMsgObj.rsquoPlainStr + 't' >>
hold up, you can disable hints for the
rest of this session by typing <<aHref('hints off', 'HINTS OFF')
>>. If you still want to see the hints now, type
<<aHref('hint', 'HINT')>>.<./notification> "
hintsDone = '<.parser>Done.<./parser> '
commandNotPresent = "<.parser>That command is<<custMsgObj.ntAbbr>>
needed in <<custMsgObj.thisStoryStr>>.<./parser> "
scoreNotPresent = "<.parser><<custMsgObj.ThisStoryStr>>
does<<custMsgObj.ntAbbr>> use scoring.<./parser> "
mentionFullScore = "<.p><.notification>To see a detailed accounting
of your score, type <<
aHref('full score', 'FULL SCORE') >>.<./notification> "
// These methods causes errors when compiled with older versions
// of TADS 3. Furthermore, we don't need to change them. So don't.
//savedDefaults() {
// "<.parser>Your current settings have been stored as the
// default settings for new games. The saved settings are: ";
// settingsUI.showAll();
// ". Most newer games will apply these settings automatically
// whenever you start (or RESTART) the game, but note that older
// games will not.<./parser> ";
//}
//restoredDefaults() {
// "<.parser>The saved default settings have been put into
// effect. The new settings are: ";
// settingsUI.showAll();
// ".<./parser> ";
//}
settingsItemSeparator = "; "
defaultsFileNotSupported = "<.parser>Sorry, but the version of the
TADS interpreter <<custMsgObj.youreStr>> using
does<<custMsgObj.ntAbbr>> support saving or
restoring defaults. You must install a more recent version
in order to use this feature.<./parser> "
defaultsFileWriteError = "<.parser>An error occurred writing
the default settings file. The defaults have not been
saved. You might be out of disk space, or you might not
have the necessary permissions to write the file.<./parser> "
menuKeyList = [
['q'],
['p', '[left]', '[bksp]', '[esc]'],
['u', '[up]'],
['d', '[down]'],
['ENTER', '\n', '[right]', ' ']
]
prevMenuLink = '<font size=-1>Previous</font>'
nextMenuTopicLink = '<font size=-1>Next</font>'
textMenuMainPrompt(keylist) {
"\bSelect a topic number, or press
<<custMsgObj.lsquoStr>><<
keylist[M_PREV][1]>><<custMsgObj.rsquoStr>>
for the previous menu or
<<custMsgObj.lsquoStr>><<
keylist[M_QUIT][1]>><<custMsgObj.rsquoStr>>
to quit:\ ";
}
textMenuTopicPrompt() {
"\bPress the space bar to display the next line,
<<custMsgObj.lsquoStr>><b>P</b><<custMsgObj.rsquoStr>>
to go to the previous menu, or
<<custMsgObj.lsquoStr>><b>Q</b><<custMsgObj.rsquoStr>>
to quit.\b";
}
menuTopicProgress(cur, tot) { " [<<cur>>/<<tot>>]"; }
menuTopicListEnd = '[The End]'
menuLongTopicEnd = '[The End]'
menuInstructions(keylist, prevLink) {
"<tab align=right ><b>\^<<keylist[M_QUIT][1]>></b>=Quit <b>\^<<
keylist[M_PREV][1]>></b>=Previous Menu<br>
<<prevLink != nil ? aHrefAlt('previous', prevLink, '') : ''>>
<tab align=right ><b>\^<<keylist[M_UP][1]>></b>=Up <b>\^<<
keylist[M_DOWN][1]>></b>=Down <b>\^<<
keylist[M_SEL][1]>></b>=Select<br>";
}
menuNextChapter(keylist, title, hrefNext, hrefUp) {
"Next: <a href='<<hrefNext>>'><<title>></a>;
<b>\^<<keylist[M_PREV][1]>></b>=<a href='<<hrefUp>>'>Menu</a>";
}
cannotReachObject(obj) {
"{You/he} {cannot} reach <<obj.theNameObj>>. ";
}
cannotReachContents(obj, loc) {
gMessageParams(obj, loc);
return '{You/he} {cannot} reach {the obj/him} through '
+ '{the loc/him}. ';
}
cannotReachOutside(obj, loc) {
gMessageParams(obj, loc);
return '{You/he} {cannot} reach {the obj/him} through '
+ '{the loc/him}. ';
}
soundIsFromWithin(obj, loc) {
"\^<<obj.theName>>
<<custMsgObj.appearStr>><<obj.verbEndingSEd>> to be
coming from inside <<loc.theNameObj>>. ";
}
soundIsFromWithout(obj, loc) {
"\^<<obj.theName>>
<<custMsgObj.appearStr>><<obj.verbEndingSEd>> to be
coming from outside <<loc.theNameObj>>. ";
}
smellIsFromWithin(obj, loc) {
"\^<<obj.theName>>
<<custMsgObj.appearStr>><<obj.verbEndingSEd>> to be
coming from inside <<loc.theNameObj>>. ";
}
smellIsFromWithout(obj, loc) {
"\^<<obj.theName>>
<<custMsgObj.appearStr>><<obj.verbEndingSEd>> to be
coming from outside <<loc.theNameObj>>. ";
}
pcDesc(actor) {
"\^<<actor.theName>> look<<actor.verbEndingSEd>> the same
as usual. ";
}
roomActorStatus(actor) {
if (actor.posture != standing)
" (<<actor.posture.participle>>)";
}
actorInRoomStatus(actor, room)
{ " (<<actor.posture.participle>> <<room.actorInName>>)"; }
roomDarkName = 'In the dark'
roomDarkDesc = "It<<custMsgObj.sOrWasStr>> pitch black. "
roomActorHereDesc(actor) {
"\^<<actor.nameIs>> <<actor.posture.participle>>
<<tSel('here', 'there')>>. ";
}
roomActorThereDesc(actor) {
"\^<<actor.nameIs>> <<actor.posture.participle>> nearby. ";
}
actorInRoom(actor, cont) {
"\^<<actor.nameIs>> <<actor.posture.participle>>
<<cont.actorInName>>. ";
}
actorInRoomPosture(actor, room) {
"\^<<actor.itIs>> <<actor.posture.participle>>
<<room.actorInName>>. ";
}
roomActorPostureDesc(actor) {
if (actor.posture != standing)
"\^<<actor.itIs>> <<actor.posture.participle>>. ";
}
actorInRemoteRoom(actor, room, pov) {
"\^<<actor.nameIs>> <<actor.posture.participle>>
<<room.inRoomName(pov)>>. ";
}
actorInRemoteNestedRoom(actor, inner, outer, pov) {
"\^<<actor.nameIs>> <<outer.inRoomName(pov)>>,
<<actor.posture.participle>> <<inner.actorInName>>. ";
}
actorInGroupPrefix(posture, cont, lst) { "\^"; }
actorInGroupSuffix(posture, cont, lst) {
" <<lst.length() == 1 ? tSel('is', 'was') : tSel('are', 'were')>>
<<posture.participle>> <<cont.actorInName>>. ";
}
actorInRemoteGroupPrefix(pov, posture, cont, remote, lst) { "\^"; }
actorInRemoteGroupSuffix(pov, posture, cont, remote, lst) {
" <<lst.length() == 1 ? tSel('is', 'was') : tSel('are', 'were')>>
<<remote.inRoomName(pov)>>, <<posture.participle>>
<<cont.actorInName>>. ";
}
actorHereGroupPrefix(posture, lst) { "\^"; }
actorHereGroupSuffix(posture, lst) {
" <<lst.length() == 1 ? tSel('is', 'was') : tSel('are', 'were')>>
<<posture.participle>> <<tSel('here', 'there')>>. ";
}
actorThereGroupPrefix(pov, posture, remote, lst) { "\^"; }
actorThereGroupSuffix(pov, posture, remote, lst) {
" <<lst.length() == 1 ? tSel('is', 'was') : tSel('are', 'were')>>
<<posture.participle>> <<remote.inRoomName(pov)>>. ";
}
sayArriving(traveler) {
"\^<<traveler.travelerName(true)>> enter<<traveler.verbEndingSEd>>
<<traveler.travelerLocName>>. ";
}
sayDeparting(traveler) {
"\^<<traveler.travelerName(nil)>> <<traveler.verbToLeave>>
<<traveler.travelerLocName>>. ";
}
sayArrivingLocally(traveler, dest) {
"\^<<traveler.travelerName(true)>> enter<<traveler.verbEndingSEd>>
<<traveler.travelerLocName>>. ";
}
sayDepartingLocally(traveler, dest)
{
"\^<<traveler.travelerName(true)>> <<traveler.verbToLeave>>
<<traveler.travelerLocName>>. ";
}
sayTravelingRemotely(traveler, dest)
{
"\^<<traveler.travelerName(true)>> <<traveler.verbToGo>> to
<<traveler.travelerLocName>>. ";
}
sayArrivingDir(traveler, dirName) {
"\^<<traveler.travelerName(true)>> enter<<traveler.verbEndingSEd>>
<<traveler.travelerRemoteLocName>> from the <<dirName>>. ";
}
sayDepartingDir(traveler, dirName) {
local nm = traveler.travelerRemoteLocName;
"\^<<traveler.travelerName(nil)>> <<traveler.verbToLeave>>
to the <<dirName>><<nm != '' ? ' from ' + nm : ''>>. ";
}
sayArrivingShipDir(traveler, dirName) {
"\^<<traveler.travelerName(true)>> enter<<traveler.verbEndingSEd>>
<<traveler.travelerRemoteLocName>> from <<dirName>>. ";
}
sayDepartingShipDir(traveler, dirName) {
local nm = traveler.travelerRemoteLocName;
"\^<<traveler.travelerName(nil)>> <<traveler.verbToLeave>>
to <<dirName>><<nm != '' ? ' from ' + nm : ''>>. ";
}
sayDepartingAft(traveler) {
local nm = traveler.travelerRemoteLocName;
"\^<<traveler.travelerName(nil)>> <<traveler.verbToGo>>
aft<<nm != '' ? ' from ' + nm : ''>>. ";
}
sayDepartingFore(traveler) {
local nm = traveler.travelerRemoteLocName;
"\^<<traveler.travelerName(nil)>> <<traveler.verbToGo>>
forward<<nm != '' ? ' from ' + nm : ''>>. ";
}
notOnboardShip = "That direction {is|was}<<custMsgObj.ntAbbr>>
meaningful {|t}here. "
sayDepartingThroughPassage(traveler, passage) {
"\^<<traveler.travelerName(nil)>> <<traveler.verbToLeave>>
<<traveler.travelerRemoteLocName>> through <<passage.theNameObj>>. ";
}
sayArrivingThroughPassage(traveler, passage) {
"\^<<traveler.travelerName(true)>> enter<<traveler.verbEndingSEd>>
<<traveler.travelerRemoteLocName>> through <<passage.theNameObj>>. ";
}
sayDepartingViaPath(traveler, passage) {
"\^<<traveler.travelerName(nil)>> <<traveler.verbToLeave>>
<<traveler.travelerRemoteLocName>> via <<passage.theNameObj>>. ";
}
sayArrivingViaPath(traveler, passage) {
"\^<<traveler.travelerName(true)>> enter<<traveler.verbEndingSEd>>
<<traveler.travelerRemoteLocName>> via <<passage.theNameObj>>. ";
}
sayDepartingUpStairs(traveler, stairs) {
"\^<<traveler.travelerName(nil)>> <<traveler.verbToGo>>
up <<stairs.theNameObj>>. ";
}
sayDepartingDownStairs(traveler, stairs) {
"\^<<traveler.travelerName(nil)>> <<traveler.verbToGo>>
down <<stairs.theNameObj>>. ";
}
sayArrivingUpStairs(traveler, stairs) {
local nm = traveler.travelerRemoteLocName;
"\^<<traveler.travelerName(true)>> <<traveler.verbToCome>>
up <<stairs.theNameObj>><<nm != '' ? ' to ' + nm : ''>>. ";
}
sayArrivingDownStairs(traveler, stairs) {
local nm = traveler.travelerRemoteLocName;
"\^<<traveler.travelerName(true)>> <<traveler.verbToCome>>
down <<stairs.theNameObj>><<nm != '' ? ' to ' + nm : ''>>. ";
}
sayDepartingWith(traveler, lead) {
"\^<<traveler.travelerName(nil)>> <<traveler.verbToCome>>
with <<lead.theNameObj>>. ";
}
sayDepartingWithGuide(guide, lead) {
"\^<<lead.theName>> let<<tSel(lead.verbEndingS, '')>>
<<guide.theNameObj>> lead the way. ";
}
sayOpenDoorRemotely(door, stat) {
"Someone <<stat ? 'open' + tSel('s', 'ed')
: 'close' + tSel('s', 'd')>>
<<door.theNameObj>> from the other side. ";
}
openMsg(obj) { return 'open'; }
closedMsg(obj) { return 'closed'; }
currentlyOpen = '{It\'s dobj} currently open. '
currentlyClosed = '{It\'s dobj} currently closed. '
openStatusMsg(obj) { return obj.itIsContraction + ' ' + obj.openDesc; }
lockedMsg(obj) { return 'locked'; }
unlockedMsg(obj) { return 'unlocked'; }
currentlyLocked = '{It\'s dobj} currently locked. '
currentlyUnlocked = '{It\'s dobj} currently unlocked. '
onMsg(obj) { return 'on'; }
offMsg(obj) { return 'off'; }
matchBurnedOut(obj) {
gMessageParams(obj);
"{The obj/he} finish{es/ed} burning, and disappear{s/ed} into a
cloud of ash. ";
}
candleBurnedOut(obj) {
gMessageParams(obj);
"{The obj/he} burn{s/ed} down too far to stay lit, and {goes}
out. ";
}
objBurnedOut(obj) {
gMessageParams(obj);
"{The obj/he} {goes} out. ";
}
;
modify playerMessages // superclass = libMessages
commandNotUnderstood(actor) {
"<.parser><<custMsgObj.TheStoryStr>> does<<custMsgObj.ntAbbr>>
understand that command.<./parser> ";
}
specialTopicInactive(actor) {
"<.parser>That command <<custMsgObj.cantStr>> be used
right now.<./parser> ";
}
//noMatch(actor, action, txt) { action.noMatch(self, actor, txt); }
noMatchCannotSee(actor, txt)
{ "\^<<gActor.nameSeesNo>> <<txt>> {|t}here. "; }
noMatchNotAware(actor, txt) {
"\^<<gActor.nameIsNot>> aware of any <<txt>> {|t}here. ";
}
//"cannot" is permitted here, because it feels right to me
//in this case.
allNotAllowed(actor) {
//"<.parser><q>All</q> <<custMsgObj.cannotStr>> be used with that verb.<./parser> ";
"<.parser><<custMsgObj.ldquoStr>>All<<custMsgObj.rdquoStr>>
<<(libGlobal.useContractions == usually ||
libGlobal.useContractions == always)
? 'can' + custMsgObj.rsquoPlainStr + 't'
: 'cannot'>>
be used with that verb.<./parser> ";
}
noMatchForAll(actor) {
"<.parser>\^<<gActor.nameSeesNo>>thing suitable {|t}here.<./parser> ";
}
noMatchForAllBut(actor) {
"<.parser>\^<<gActor.nameSeesNo>>thing else
{|t}here.<./parser> ";
}
noMatchForListBut(actor) { noMatchForAllBut(actor); }
noMatchForPronoun(actor, typ, pronounWord) {
"<.parser>The word
<<custMsgObj.ldquoStr>><<pronounWord>><<custMsgObj.rdquoStr>>
does<<custMsgObj.ntAbbr>> refer to anything right now.<./parser> ";
}
askMissingObject(actor, action, which) {
reportQuestion('<.parser>\^' + action.whatObj(which)
+ ' do you want '
+ (actor.referralPerson == ThirdPerson
? actor.theName : '')
+ ' to '
+ action.getQuestionInf(which) + '?<./parser> ');
}
missingObject(actor, action, which) {
"<.parser>";
switch (libGlobal.youMustPref) {
case youllHaveTo:
case youdHaveTo: "You<<custMsgObj.rsquoPlainStr>>ll have"; break;
case youllNeedTo:
case youdNeedTo: "You<<custMsgObj.rsquoPlainStr>>ll need"; break;
default: "You need"; break;
}
" to be more specific
about <<action.whatObj(which)>> you want
<<actor.referralPerson == ThirdPerson ? actor.theName : ''>>
to <<action.getQuestionInf(which)>>.<./parser> ";
}
askMissingLiteral(actor, action, which) {
askMissingObject(actor, action, which);
}
missingLiteral(actor, action, which) {
"<.parser>Please be more specific
about <<action.whatObj(which)>> to
<<action.getQuestionInf(which)>>. Try, for example,
<<action.getQuestionInf(which)>>
<<custMsgObj.ldquoStr>>something<<custMsgObj.rdquoStr>>.<./parser> ";
}
reflexiveNotAllowed(actor, typ, pronounWord) {
"<.parser><<custMsgObj.TheStoryStr>>
does<<custMsgObj.ntAbbr>> understand how to use the word
<<custMsgObj.ldquoStr>><<pronounWord>><<custMsgObj.rdquoStr>>
like that.<./parser> ";
}
wrongReflexive(actor, typ, pronounWord) {
"<.parser><<custMsgObj.TheStoryStr>>
does<<custMsgObj.ntAbbr>> understand what the word
<<custMsgObj.ldquoStr>><<pronounWord>><<custMsgObj.rdquoStr>>
refers to.<./parser> ";
}
noMatchForPossessive(actor, owner, txt) {
"<.parser>\^<<owner.nameDoes>>
not <<custMsgObj.appearStr>> to have any such thing.<./parser> ";
}
noMatchForPluralPossessive(actor, txt) {
"<.parser>\^They <<tSel('do', 'did')>> not
<<custMsgObj.appearStr>> to have any such
thing.<./parser> ";
}
noMatchForLocation(actor, loc, txt) {
"<.parser>\^<<actor.nameSeesNo>>
<<loc.childInName(txt)>>.<./parser> ";
}
nothingInLocation(actor, loc) {
"<.parser>\^<<actor.nameSees>>
<<loc.childInName('nothing unusual')>>.<./parser> ";
}
noMatchDisambig(actor, origPhrase, disambigResponse) {
"<.parser>That
was not
one of the choices. ";
}
emptyNounPhrase(actor) {
"<.parser>You seem to have left out some words.<./parser> ";
}
zeroQuantity(actor, txt) {
"<.parser>\^<<actor.theName>> <<actor.verbCant>> do that to zero of
something.<./parser> ";
}
insufficientQuantity(actor, txt, matchList, requiredNum) {
"<.parser>\^<<actor.nameDoes>><<custMsgObj.ntAbbr>> see that many
<<txt>> <<tSel('here', 'there')>>.<./parser> ";
}
uniqueObjectRequired(actor, txt, matchList) {
"<.parser>You <<custMsgObj.cantStr>> use multiple
objects there.<./parser> ";
}
singleObjectRequired(actor, txt) {
"<.parser>Multiple objects are<<custMsgObj.ntAbbr>> allowed with that
command.<./parser> ";
}
disambigOrdinalOutOfRange(actor, ordinalWord, originalText) {
"<.parser>There <<custMsgObj.wereNotStr>> that many choices. ";
}
askDisambig(actor, originalText, matchList, fullMatchList,
requiredNum, askingAgain, dist)
{
reportQuestion('');
if (!askingAgain)
"<.parser>";
if (requiredNum == 1) {
if (askingAgain)
"Which did you mean,
<<askDisambigList(matchList, fullMatchList, nil, dist)>>?";
else
"Which <<originalText>> do you mean,
<<askDisambigList(matchList, fullMatchList, nil, dist)>>?";
}
else {
if (askingAgain)
"Which <<spellInt(requiredNum)>> (of
<<askDisambigList(matchList, fullMatchList, true, dist)>>)
did you mean?";
else
"Which <<spellInt(requiredNum)>>
(of <<askDisambigList(matchList, fullMatchList,
true, dist)>>) do you mean?";
}
"<./parser> ";
}
ambiguousNounPhrase(actor, originalText, matchList, fullMatchList) {
"<.parser><<custMsgObj.TheStoryStr>> does<<custMsgObj.ntAbbr>> know which
<<originalText>> you mean.<./parser> ";
}
missingActor(actor) {
"<.parser>You must be more specific about <<
whomPronoun>> you want<<tSel('', 'ed')>> to address.<./parser> ";
}
singleActorRequired(actor) {
"<.parser>You can only address one person at a time.<./parser> ";
}
cannotChangeActor() {
"<.parser>You <<custMsgObj.cannotStr>> address more than one
character on a single command line in
<<custMsgObj.thisStoryStr>>.<./parser> ";
}
askUnknownWord(actor, txt) {
"<.parser>The word
<<custMsgObj.ldquoStr>><<txt>><<custMsgObj.rdquoStr>>
is<<custMsgObj._not>> necessary in
<<custMsgObj.thisStoryStr>>.<./parser> ";
oopsNote();
}
wordIsUnknown(actor, txt) {
"<.parser><<custMsgObj.TheStoryStr>> does<<custMsgObj.ntAbbr>> understand that
command.<./parser> ";
}
refuseCommandBusy(targetActor, issuingActor) {
"\^<<targetActor.nameIs>> busy. ";
}
cannotAddressMultiple(actor) {
"<.parser>\^<<actor.theName>> <<actor.verbCannot>> address
multiple people at once.<./parser> ";
}
explainCancelCommandLine() {
}
;
modify npcMessages // superclass = playerMessages
commandNotHeard(actor) {
"\^<<actor.nameDoes>><<custMsgObj._not>> respond. ";
}
noMatchCannotSee(actor, txt)
{ "\^<<actor.nameSees>> no <<txt>>. "; }
noMatchNotAware(actor, txt)
{ "\^<<actor.nameIsNot>> aware of any <<txt>>. "; }
noMatchForAll(actor) {
"<.parser>\^<<actor.nameDoes>><<custMsgObj.ntAbbr>> see anything
suitable.<./parser> ";
}
noMatchForAllBut(actor) {
"<.parser>\^<<actor.nameSeesNo>>thing
else.<./parser> ";
}
insufficientQuantity(actor, txt, matchList, requiredNum) {
"<.parser>\^<<actor.nameDoes>><<custMsgObj.ntAbbr>> see that many
<<txt>>.<./parser> ";
}
ambiguousNounPhrase(actor, originalText, matchList, fullMatchList) {
"<.parser>\^<<actor.nameDoes>><<custMsgObj.ntAbbr>> know which
<<originalText>> you mean<<tSel('', 't')>>.<./parser> ";
}
askMissingObject(actor, action, which) {
reportQuestion('<.parser>\^' + action.whatObj(which)
+ ' do you want ' + actor.theNameObj + ' to '
+ action.getQuestionInf(which) + '?<./parser> ');
}
missingObject(actor, action, which) {
"<.parser>You must be more specific
about <<action.whatObj(which)>> you want <<actor.theNameObj>> to
<<action.getQuestionInf(which)>>.<./parser> ";
}
missingLiteral(actor, action, which) {
"<.parser>You must be more specific about <<action.whatObj(which)>>
you want <<actor.theNameObj>> to <<action.getQuestionInf(which)>>.
For example: <<actor.theName>>, <<action.getQuestionInf(which)>>
<<custMsgObj.ldquoStr>>something<<custMsgObj.rdquoStr>>.<./parser> ";
}
;
// This default implementation simply doesn't report deferred errors at
// all.