The Marathon Markup Language - Fader Elements: <faders>

This kind of element is for specifying various fader features, the faders being what causes the whole screen to change color when one is underneath a liquid or getting hit by something. It has two kinds of child elements, <fader> and <liquid>.

The first kind, <fader>, specifies features of each individual fader; it has attributes

and a child element <color>, which is not indexed. For more on specifying colors, go here. The fader types are these:
  1. Tint: fade to the fader's color value:
    [new color] = [old color] + ([fader color] - [old color])*[opacity]
  2. Randomize: do random shifts of the colors:
    [new color] = [old color] + [opacity]*[random numbers]
  3. Negate: darkens light colors and lightens dark colors. For each channel:
    [opacity complement] = 1 - [opacity]
    if [old color] > 0.5 then
       [new color] = max([old color], xor([fader color], [old color]) + [opacity complement])
    else
       [new color] = min([old color], xor([fader color], [old color]) - [opacity complement])
    Intermediate results may be out of (0,1) range.
  4. Dodge: some weird processing. For each channel:
    [new color] = max([old color], 1 - (1 - [fader color])*[old color] - [opacity])
    Intermediate results may be out of (0,1) range.
  5. Burn: some weird processing. For each channel:
    [opacity complement] = 1 - [opacity]
    [new color] = max([old color],[fader color]*[old color] + [opacity complement])
    Intermediate results may be out of (0,1) range.
  6. Soft tint: fade to the fader's color value multiplied by the intensity (maximum of color-channel values):
    [intensity] = max(color channels of [old color])
    [new color] = [old color] + ([fader color]*[intensity] - [old color])*[opacity]
In all these equations, color values are from 0 (black) to 1 (white), and out-of-range result values are reduced to that range by subtracting whichever integer will put the result into that range.

The second kind, <liquid>, specifies faders for liquids; it has attributes

The index is which one of these liquid types:
  1. Water
  2. Lava
  3. Sewage
  4. Jjaro
  5. Pfhor

Home