BGLOB.DAT

From UFOpaedia
Revision as of 10:39, 23 June 2008 by Bomb Bloke (talk | contribs)
Jump to navigation Jump to search

This file is only used by tactical saves. It is always two bytes and describes the default light levels on the map.

The first byte indicates overall level of ambient lighting. On night missions it is 16, on day missions 0, dusk and dawn uses values in the middle. The second byte is the ambient lighting of shadowed areas (below and inside Skyranger, inside UFOs), usually it is equal to the first byte plus four. On the end of each turn TERMP.DAT is recalculated using the appropriate value from BGLOB.DAT as the maximum. What determines which value of the two gets used is not yet known.

The values held in this file are determined by values in MISSION.DAT. For a UFO/Terror site, a value from this table (stored in the executable) will be used as the first BGLOB byte, according to MISSION[76/4C] (which is based on the time at the mission location):

MISSION[76] Value:  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
BGLOB[0] Value:    16 16 16 16 16 16 16 16 16 16 12  8  4  2  0  0  0  0  0  0  0  0  0  0

For example, if MISSION[76] is 11 BGLOB[0] will be 8 and BGLOB[1] will be 12.

When defending an X-Com base, the table is ignored (as the map is underground and so time of day is irrelvant). Both BGLOB values will be set to 8.

The three other mission types (alien base assault, cydonia surface, cydonia underground base) set both BGLOB values to 16.

See Also