NML:Snow line

From GRFSpecs
Revision as of 14:21, 21 August 2011 by FooBar (talk | contribs) (content of nml r1625)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The snowline is specified by a snowline statement. See the example below:

 snowline (linear) {
 	day_of_year(2,  1):  2;
 	day_of_year(11, 1):  4;
 	177: 29;
 	day_of_year(10, 1): 29;
 }

It starts with the snowline keyword followed by the mode. It contains a number of <day-of-the-year> : <height> pairs. These define the height of the snowline at that day in the year. The day of the year value is actually an integer from 1 up to and including 365, so you may also define a day as a number. Heights run from 2 (for snow everywhere) to 29, although 17 is already sufficient to remove all traces of snow from the game.

For the days not listed, the program computes a height. It can do that in two modes, namely in equal mode and in linear mode (last line of text in the example). In equal mode, the height of the snow is the same as the day before, unless the day is listed in the snowline statement. In linear mode, the height of the snowline gets linearly interpolated between two heights specified in the statement. In both cases, note that days `wrap around' at the end of the year, to get the snow height of January 1st (if not listed in the statement), the last specified height of the year is used in the calculation.