Cholmondely wrote: ↑Wed Jul 02, 2025 3:12 pm
I did not find "setBackgroundFromDescriptionsKey" in the wiki
Slightly incorrect name. The correct name is
setScreenBackgroundForKey, which is on the JavaScript Global page.
Any reference to "Alpha" is related to how transparent/opaque the colour is. A standard RGBA (red, green, blue, alpha) definition is made up of four values, and in Oolite these numbers are generally in the range of 0-1. So, a fully opaque version of red would be (1, 0, 0, 1). A half-transparent version of red would be (1, 0, 0, 0.5). An almost invisible version of red would be (1, 0, 0, 0.1).
Often, though, you will see colour specifiers that only have 3 values. eg (1, 0, 0). In those instances, an alpha value of 1 is assumed, unless it is being overridden by some other setting.
A HSV string refers to a "Hue/Saturation/Value" string, which is another way of defining a color. It can also be called HSB, with "Value" being replaced by "Brightness". They look like this: "{ hue = 300; saturation = 0.3; }". If the "value"/"brightness" component is missing, it is assumed to be 1.0. This can also have an alpha value (making them HSVA/HSBA), and if it's missing it's assumed to be 1.0.
Scale factors are just multipliers. The "cloud_alpha" will be used on the alpha value of "cloud_color" and "polar_cloud_color". For example, if the "cloud_color" is set to (0.7, 0.7, 0.7, 0.2) (a light grey that is mostly transparent), and the "cloud_alpha" is set to 0.5, the result for "cloud_color" would be (0.7, 0.7, 0.7, 0.1) (a light grey that is even more transparent).
Going through the code, I found the following were missing from the wiki page:
"atmosphere_color", "polar_atmosphere_color", "cloud_fraction", "cloud_color", "polar_cloud_color", "land_fraction", "noise_map_seed", "polar_fraction", "perlin_3d"
I'll examine the code and try to come up with reasonably understandable descriptions for each (which may be tricky, as some of this code is hard to understand).
Confusion abounds, though, as the wiki says the "Polar Land Color" is defined with "land_color", and the "Polar Sea Color" is defined with "sea_color", when actually, there are two values for each: "land_color" (which defines the normal land color) along with "polar_land_color" (which defines the land color at the poles), and "sea_color" (which defines the normal sea color) along with "polar_sea_color" (which defines the sea color at the poles).
I can't find any reference in the core code for "clear_sky_color" or "polar_clear_sky_color". It looks like they were added a long time ago (2007), but were replaced with "atmosphere_color" and "polar_atmosphere_color" at some point later, the exact date of the change being unclear.