SKYDEFS Text Lump

SKYDEFS is used to define properties of a sky background for the PC engines of Doom 64. It is defined as a text file, specifically "SKYDEFS.txt". Each sky definition must have a corresponding texture of the same name to be usable in-game. The contents of the texture is not important.

Sky Definitions

A sky definition begins with the keyword "sky", followed by the sky texture name, and lastly, open and close brackets. Inside the brackets, properties can be entered to define settings for a sky.

Example: sky "<texturename>" { properties }

<texturename> is the name of the corresponding sky texture used in a level. When a ceiling or floor uses that texture, it will draw the sky.

Properties

Here are properties which can be assigned to each sky.

<graphic> is the name of a background graphic or a cloud graphic between the G_ markers in the WAD to be used. It is unused for the fire sky which instead exclusively points to the "FIRE" graphic
<graphic> is the name of a graphic between the G_ markers in the WAD to overlay on the sky. This is used for mountains in Doom 64 and the graphic is placed 75 sky pixels above the bottom of the screen.
<r g b> are three hexadecimal color numbers to define the color of fog. Most original Doom 64 skies have a "black" fog, however levels such as "Watch Your Step" and "In The Void" define a different color.
<number> is a number to define how close the fog is to the player. Lower the number, the closer the fog is. Maximum value is 999 (no fog) while 0 (complete fog) is the lowest.
<r g b> are three hexadecimal color numbers to define the base color of the sky. For void skies, this is the background color, while on cloud skies this colors the clouds.
<r g b> are three hexadecimal color numbers to define the top color of the sky. This color adds to the clouds at the top of the cloud sky. For fire sky it colors the top of the fire.
<r g b> are three hexadecimal color numbers to define the low color of the sky. This color adds to the clouds at the bottom of the cloud sky. For fire sky it colors the bottom of the fire.
Renders a semi-3D cloud plane which uses the "pic" definition for the cloud texture.
Displays the fire sky effect. Here "pic" and "basecolor" definitions are ignored.
Displays no special sky effect rather a solid color is shown. Here "pic", "highcolor", and "lowcolor" values are ignored.
Causes random thunder sound effect and randomly flickers the "highcolor" and "lowcolor" values. Some color choices on the Doom 64 Remaster cause green-colored flashes.
Sets the "pic" graphic to the bottom of the screen and allows linedef action type 254 to fade it with the "backpic" graphic.

Original Sky Definitions

Doom 64 used eleven different skies associated with the textures below.

Examples

sky "F_SKYA"
{
    pic = "CLOUD"
    fogcolor = 0 0 0
    basecolor = b0 80 ff
    highcolor = 0 0 0
    lowcolor = 0 0 15
    cloud
    thunder
    fogfactor = 985
}
sky "F_SKYH"
{
    fogcolor = 0 40 40
    basecolor = 0 38 38
    highcolor = 0 0 0
    lowcolor = 0 0 0
    void
    fogfactor = 975
}

Sky Rendering Bugs

Doom 64 Remaster Color Bug

There is a bug in sky colors on the Doom 64 Remaster due to how it was translated over from EX to the KEX engine. Numbers like 1F are read as two different token types because of KEX's letter system (difference between how it reads numbers and letters). So fog colors like "8F 00 FF" will bug out because of the "8F". However, "89 00 FF" and "AF 00 FF" work just fine as they do not mix tokens. Token order matters too. If the hex value begins with a letter, it should be fine. It is only if it begins with a number and then a letter that causes a bug.

Doom 64 EX Sky Reference Bug

Doom 64 EX seems to be particular how skies are named. Sometimes it will render the texture for the sky and not the sky itself. Changing the name of a bugged sky in EX will often fix this issue.