Inform 7 Home Page / Documentation
§15.12. Making the verb "to weigh"
So now we can invent notations for weight. We could, for instance, write:
Weight is a kind of value. 1kg specifies a weight. Every thing has a weight.
And that allows us to write:
The lead pig is in the Salt Mine. The weight of the lead pig is 45kg.
But nobody would say it that way: they'd say "The lead pig weighs 45kg." So what we really need to complete our setup is a verb "to weigh".
We have already created new verbs, but none of those methods are quite convenient for this. We want to relate something tangible (the lead pig) to something intangible (45kg), and there's no convenient relation to express this; if we set it up as a condition, we'd get something we couldn't assert, only test. Instead, we'll do something different this time:
The verb to weigh means the weight property.
Previous definitions like this ended "means the ... relation", rather than "means the ... property", but the idea is the same. The meaning of "X weighs Y" is that the weight property of X is equal to Y. So we can now write:
A thing usually weighs 1kg. The lead pig weighs 45kg.
something weighing 20kg
if three things weigh 5kg, ...
And as we saw in the chapter on Descriptions, we can also set up adjectives, comparatives and superlatives:
Definition: A thing is heavy if its weight is 20kg or more.
which creates "heavy", "heavier" and "heaviest".
|Start of Chapter 15: Numbers and Equations|
|Back to §15.11. Named notations|
|Onward to §15.13. The Metric Units extension|
The following is not a very sophisticated approach, because it does not allow for weight to accumulate: if we put a gold ingot into a paper bag, then put the bag on the balance platform, only the bag's weight will register. But it will do for a first try.
A blackboard is in the Weighbridge. "A blackboard propped against one wall reads: '122/10 is [122 divided by 10] remainder [remainder after dividing 122 by 10]; 122kg/10kg is [122kg divided by 10kg] remainder [remainder after dividing 122kg by 10kg]; 122kg/10 is [122kg divided by 10] remainder [remainder after dividing 122kg by 10].'" The blackboard weighs 10kg.
The balance platform is a supporter in the Weighbridge. "The balance platform is 10m by 8m, giving it an area of [10m multiplied by 8m], currently weighing [the list of things on the platform]. The scale alongside reads: [total weight of things on the platform]. [if two things are on the platform]Average weight is: [the total weight of things on the platform divided by the number of things on the platform]. Heaviest item is [the heaviest thing on the platform], at [weight of the heaviest thing on the platform]. Lightest item is [the lightest thing on the platform], at [weight of the lightest thing on the platform].[otherwise]It seems to be able to weigh several things at once."
Lead Cuts Paper
The following shows the kind of "realism" rules which could be introduced using weights. Not entirely realistic: we do not bother to rupture containers out of the player's sight.
A container has a weight called breaking strain. The breaking strain of a container is usually 50kg. Definition: A container is bursting if the total weight of things in it is greater than its breaking strain.
Every turn when a container (called the sack) held by someone visible (called the chump) is bursting:
say "[The sack] splits and breaks under the weight! [if the player is the chump]You discard[otherwise][The chump] discards[end if] its ruined remains, looking miserably down at [the list of things in the sack] on the floor.";
now all of the things in the sack are in the location;
now the sack is nowhere.