Transparency options (variable)
- <<Back to the Openttd.cfg (OpenTTD configuration file)
transparency_options is a variable of openttd.cfg file.
It is an integer value that stores what map features are toggled to be transparent (or, to be more accurate, what map features are set to not have full opacity). Practically it means which buttons are pressed in the first row of the Transparency options toolbar.
See Transparency options for further information on what effect it has and how to change it in the game.
If none of the buttons are pressed in the first row of Transpareny options toolbar, the value is 0 (zero).
Otherwise, the integer value which will be the value of this variable, is calculated as follows:
If the nth button is pressed, 2n-1 will be added to the value. This applies to all the 9 buttons in the row.
For example, if transparency is set on trees, houses and bridges, it means that the second, third and sixth buttons are pressed, so the value of transparency_options will be 21+22+25 = 2+4+32 = 38.
The method implies that the lowest possible value of the variable is 0, the highest is 511, and all integers between them are valid values, each one representing a state of the buttons, that is, a combination of map features.