Difference between revisions of "BGLOB.DAT"

From UFOpaedia
Jump to navigation Jump to search
m
Line 3: Line 3:
 
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. [[TERMP.DAT]] is recalculated at certain times (eg end of turn, or when a light-source tile (eg street lamp) is destroyed - refer to page article for full list) using the appropriate value from BGLOB.DAT as the maximum. What determines under which exact circumstances the first or second offset will be used is not yet known.
 
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. [[TERMP.DAT]] is recalculated at certain times (eg end of turn, or when a light-source tile (eg street lamp) is destroyed - refer to page article for full list) using the appropriate value from BGLOB.DAT as the maximum. What determines under which exact circumstances the first or second offset will be 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):
+
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 [[MISDATA.DAT#74-75 |MISSION[74-75]]] (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'''
+
  '''MISSION[74-75] 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
+
  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.
+
For example, if MISSION[74-75] 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.
 
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.  
+
The three other mission types (alien base assault, cydonia surface, cydonia underground base) set both BGLOB values to 16. TFTD colony surface missions act the same way.
  
 
==See Also==
 
==See Also==

Revision as of 09:46, 15 May 2011

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. TERMP.DAT is recalculated at certain times (eg end of turn, or when a light-source tile (eg street lamp) is destroyed - refer to page article for full list) using the appropriate value from BGLOB.DAT as the maximum. What determines under which exact circumstances the first or second offset will be 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[74-75] (which is based on the time at the mission location):

MISSION[74-75] 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[74-75] 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. TFTD colony surface missions act the same way.

See Also