The Four-Eyed Guide to TADS 3 by David Welbourn index


TADS 3 Eye For The Inform 6 Guy: Properties

add_to_scope???
afterThing.afterAction (thing.t); Actor.afterAction (actor.t)
articleThing.aName() (en_us\en_us.t)

Both Inform 6 and TADS 3 try to guess which indefinite article ('a', 'an', or 'some') goes best in front of an object's name. Both know not to use an article if the object has a proper name. However, sometimes the library algorithms guess wrong, or you want to special handling, e.g.: 'your knife' instead of 'a knife'. So there has to be a way to override the default.

Inform 6 handles this with the article property:

Object hourglass "hourglass"
with name 'hourglass',
  article "an",
  ...
;

TADS 3, however, doesn't look for an article property, but a function that returns the entire indefinite noun phrase. So you override that instead:

hourglass: Thing 'hourglass' 'hourglass'
  aName() { return 'an ' + name; }
  ...
;
articlesnot applicable

Inform 6's articles property is only used when its article property isn't good enough; that is, when the game isn't written in English but some other language where a noun might need to use different articles depending on the role it plays in the sentence.

However, a TADS 3 author writing in German, say, wouldn't use the English module en_us.t, but a German module, probably called de.t. And instead of redefining aName() and theName(), as you would in English, you'd redefine other German specific properties, likely called einName(), einenNamen(), derName(), denNamen(), and so on.

beforeThing.beforeAction (thing.t); Actor.beforeAction (actor.t)
cant_goBasicLocation.cannotTravel(), .cannotGoThatWay(), .cannotGoThatWayInDark() (travel.t);
playerActionMessages.cannotGoThatWay, .cannotGoThatWayInDark (en_us\msg_neu.t)
capacityBulkLimiter.bulkCapacity, .maxSingleBulk (objects.t)
d_to.down
daemon???
describe???
descriptionThing.desc (thing.t)
door_dir???
door_to.destination ???
e_to.east
See d_to.
each_turn???
found_inclass BaseMultiLoc: object (objects.t)
BaseMultiLoc (objects.t)
  • MultiLoc (objects.t)
    • SenseConnector (sense.t)
      • DistanceConnector (sense.t)
  • MultiInstance (objects.t)
    • MultiFaceted (objects.t)
grammar???

in_to.in
See d_to.
initialThing.initDesc (thing.t)

inside_descriptionNestedRoom.roomDesc (travel.t)

invent???

lifeno direct equivalent

Inform 6's life property has no direct equivalent in TADS 3. In particular, the only obvious reason to use the life property instead of the before property is to take advantage of the default clause; in other words, life provides a mechanism for a default reaction for several related actions.

To mimic this in TADS 3, you'd want to modify the Actor class for each relevant action. For example, for the 'kiss' action:

dobjFor(Kiss) {
  action() {
    if (propDefined(&defaultLife, PropDefAny))
      defaultLife();
    else
      mainReport(&cannotKissActor);
  }
}

Then it's just a matter of defining the defaultLife property for every Actor you want to have a default behaviour for this group of actions.

list_togetherThing.listWith, .specialDescListWith (thing.t); class ListGroup (lister.t)
ListGroup (lister.t)
  • ListGroupCustom (lister.t)
  • ListGroupSorted (lister.t)
    • ListGroupParen (lister.t)
    • ListGroupPrefixSuffix (lister.t)
  • ListGroupEquivalent (lister.t)

In Inform 6, when you want to list items together, you need to set the list_together parameter in each object to the same value; that value can be a numerical value, a string value, or a function. In TADS 3, you need to set the listWith parameter in each object to a list of ListGroup objects, ordered from most general to most specific group.

As one example, suppose you want to list scrolls together. In Inform 6, you'd probably create a Scroll class:

class Scroll
with name 'scroll',
  list_together "scrolls",
;

In TADS 3, you'd also create a Scroll class, but also a scrollListGroup:

scrollListGroup: ListGroupParen
  showGroupCountName(lst) {
    countNameFrom(lst.length, 'scroll', 'scrolls');
  }
;

class Scroll: Readable
  listWith = [scrollListGroup]
;

n_to.north
See d_to.
name???
ne_to.northeast
See d_to.
number???
nw_to.northwest
See d_to.
ordersActor.obeyCommand, .actorAction (actor.t)
out_to.out
See d_to.
parse_name???
pluralThing.pluralName() (en_us\en_us.t)

Sometimes, Inform 6 needs to print a plural form of an object's name. This can occur with groups of identical objects (eg: "two gold coins") or when using the list_together property to group similar objects (eg: "three gems (an emerald, a ruby and a sapphire)"). In these cases, the Inform 6 author must set the plural property to "gold coins".

TADS 3's library has an algorithm (Thing.pluralNameFrom()) which tries to guess the plural name; the TADS 3 author can override its behavior, if necessary, via Thing.pluralName:

class Child: Actor 'child' 'child'
  pluralName = 'children'
;
react_after???
react_before???
s_to.south
See d_to.
se_to.southeast
See d_to.
short_name???
short_name_indef???
sw_to.southwest
See d_to.
time_left???
time_out???
u_to.up
See d_to.
w_to.west
See d_to.
when_closed
when_open
Thing.specialDesc (thing.t); BasicOpenable.isOpen() (objects.t)
when_off
when_on
Thing.specialDesc (thing.t); OnOffControl.isOn (objects.t)
with_keyLockableWithKey.keyList (objects.t)
"the list of objects that can serve as keys for this object"