ROCK FOG invalid comments in Lego.cfg #31
Labels
alteration
A change to an existing feature.
config
Related to loading game configuration files.
game data bug
Misbehavior on interaction with wad files or game assets.
original bug
This was an issue in the original game already.
Describe the issue
In the standard Lego.cfg configuration file, there are invalid comments used when defining the fog colour values for Rock biomes:
// ROCK FOG
The token
//
is not a valid line comment! (only;
is valid)So when
// ROCK FOG
occurs, these 3 tokens (//
,ROCK
,FOG
) are consumed, throwing off the file's key/value property parsing until the next// ROCK FOG
comment appears on the second line definingHighFogColourRGB
. If these comments did not appear in pairs, the entire Lego.cfg file would have been broken from the start. Instead, onlyHighFogColourRGB
is broken on the offending lines.Config snippet
The offending lines, appearing 15 times in Lego.cfg.
Solution
For the time being, it's safe to assume that the exact string:
// ROCK FOG
will not appear in property keys/values, and that it will only be used in its original form. However, we should not make assumptions about the usage of//
itself, as it could be used as a property value. The solution should aim to fix// ROCK FOG
and only// ROCK FOG
, while maintaining the stance that//
is -and always will be- an invalid comment.In the future, more user-friendly solutions could be created to identify rogue double-slash comments in custom user-made Lego.cfg files. Either by having an option to correct them, or to warn the modder when loading the config file.
Attachments
Below are comparisons of the intended Rock biome fog colour vs. the actual colour.
On the left: The fog colour as it was intended. On the right: The fog colour as we get with the
// ROCK FOG
comments left unfixed.The text was updated successfully, but these errors were encountered: