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

ColumnExample ContentsValid ValuesDescription and Notes
LABELGrass_ClearText

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.
CYCLICAL1

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_001MDL 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.
If a module's Dawn Start Hour is set to 6 (default), the skybox will currently be NIGHT and take 1 in-game hour to transition to DAWN, then another in-game hour after that to transition to DAY. At 8, the DAY skybox will be fully visible with no other skyboxes present until the Dusk Start Hour.

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.

2da Contents

skyboxes.2da
2DA V2.0

    LABEL           STRING_REF  CYCLICAL    DAWN        DAY         DUSK        NIGHT

0   None            ****        ****        ****        ****        ****        ****
1   Grass_Clear     ****        1           Skyda_001   Sky_001     Skyd_001    Skyn_001
2   Grass_Storm	    ****        1           SSkyda_001  SSky_001    SSkyd_001   SSkyn_001
3   Desert_Clear    ****        1           DSkyda_001  DSky_001    DSkyd_001   DSkyn_001
4   Winter_Clear    ****        1           WSkyda_001  WSky_001    WSkyd_001   WSkyn_001
5   Icy             ****        1           ISkyda_001  ISky_001    ISkyd_001   ISkyn_001
6   Black           ****        0           Skybl_001   Skybl_001   Skybl_001   Skybl_001
  • No labels