The skyboxes.2da file defines the skybox models the game can load for particular times of the day for an area.
Skybox Usage
You usually set a skybox in the Area properties. Areas can be any combination of interior/exterior, artificial/natural and underground/above ground - there are no restrictions when setting a skybox.
Setting a skybox automatically adds additional render distance, see Render Distance with Fog and Skyboxes.
You can use GetSkyBox and SetSkyBox to change them whenever you like, which accept lines from this 2da (noting the last one - Black - is not actually defined in nwscript.nss as a constant, but using the line id will work as normal).
Creating a Skybox
Assuming you're building from an existing skybox, some things to keep in mind: the skybox model will not render 2 tiles below absolute ground level, but due to camera-clipping rules, is cut off anywhere from ground level to 2 tiles below.
The skyfade model skyfade1.mdl exists to manage fog and skybox balance; skyfade doesn't have the same clipping restrictions as the skybox and the model can extend at a minimum 400 meters (40 tiles-worth of distance) below the player (or more).
Fog doesn't render over a skybox, so the skyfade (and it's image: skyblurpoly.tga) defines both how much fog strength to send through to the skybox and how visible the skybox is through the fog.
As easy way to explain it is that a skyblurpoly's color layer as fully white will make fog fully opaque on it, whereas fully black will make it look like there isn't any fog at all (fog will still show on terrain though, +5 if tile-border is enabled).
And skyblurpoly's alpha layer exists to demonstrate how much of the skybox should be visible behind it (use Blender to open up both skyda_001.mdl and skyfade1.mdl to see how the world normally renders these around the player).
2da Columns
| Column | Example Contents | Valid Values | Description and Notes |
|---|---|---|---|
| LABEL | Grass_Clear | Text | Human readable name. This is used in the toolset when the STRING_REF column is blank. For some reason Bioware didn't make use of quotes, which are entirely valid (eg: having "Desert, Clear" instead of Desert_Clear works fine). Only used in the toolset, unused in game. |
| STRING_REF | **** | TLK number or **** | Used to display a localised string reference name from a TLK file. If blank uses the LABEL column in the toolset. Only used in the toolset, unused in game. |
| CYCLICAL | 1 | 1 - Cyclical 0 - Not cyclical | If the skybox is cyclical or not. This needs documenting if you know what it does. |
DAWN DAY DUSK NIGHT | Skyda_001 | MDL file name | This is the model to display as the skybox for that period of time. Transitions are defined by the starting hour and take 1 full hour to transition into the next skybox with slowly-incrementing levels of alpha until the previous skybox is fully transparent and no longer exists. Skybox models themselves are centered on the player, and are fairly large with an usually highly detailed texture (or multiple textures) on them. To make a new skybox simply with a new texture, you could edit an existing skybox and alter the bitmap field to point at a new texture. |