Transparency locks
<<Back to the Openttd.cfg (OpenTTD configuration file)

transparency_locks is a variable of openttd.cfg file.

It is an integer value that stores what map features are locked against being toggled to be transparent (more accurately, to not have full opacity) with the X key. Practically it means: on which buttons are there /File/en/Manual/TransparencyOptions-a.png icons in the first row of Transparency options toolbar.

See Transparency options for further information on what effect it has and how to change it in the game.

If no map features are locked, the value is 0 (zero).

Otherwise, the integer value which will be the value of this variable, is calculated as follows:

If the nth feature is locked (/File/en/Manual/TransparencyOptions-a.png icon on the nth button), 2n-1 will be added to the value. This applies to all the 9 buttons in the row.

For example, if trees, houses and bridges are locked against being toggled with X, it means that the second, third and sixth buttons have a /File/en/Manual/TransparencyOptions-a.png icon, so the value of transparency_locks 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.