NML:Snow line

From GRFSpecs
Revision as of 17:57, 11 May 2014 by Planetmaker (talk | contribs) (snow%...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Block Syntax

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): 50 snow%;
 }

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. The values can be any value between 0 and 255. 255 means 'no snow'; other values are scaled to the number of possible heightlevels of the map. Going in steps of 16 will mean that snowline makes large jumps if more heightlevels are used. If you use the unit 'snow%' then the values give the percentage of height levels not covered with snow and 0 snow% means snow everywhere and 100 snow% snow everywhere.

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.