Difference between revisions of "WGLOB.DAT"

From UFOpaedia
Jump to navigation Jump to search
m (→‎See Also: added category)
(TFTD stores TU reserve modes here.)
Line 1: Line 1:
 
This file is only used by tactical saves. It stores the turn count, map dimensions, possibly the lighting, and information concerning kills and score.
 
This file is only used by tactical saves. It stores the turn count, map dimensions, possibly the lighting, and information concerning kills and score.
  
There are 22 values made of 2 bytes each. 44 bytes in total.
+
There are 22 values (25 for TFTD) made of 2 bytes each. 44 bytes in total (or 50 for TFTD).
  
 
== Structure ==
 
== Structure ==
  
<b>0/00</b> - Current turn * 2. First value of play is 2.
+
{| class="wikitable"
 +
|-
 +
!Offset<br>(Decimal)
 +
!Offset<br>(Hex)
 +
!Usage
 +
|- valign="top"
 +
!<span id="0-1"></span>0-1
 +
!<span id="0x00-0x01"></span>0x00-0x01
 +
|Current turn * 2. First value of play is 2.
 +
|- valign="top"
 +
!<span id="2-3"></span>2-3
 +
!<span id="0x02-0x03"></span>0x02-0x03
 +
|Current turn. First value of play is 1.
 +
|- valign="top"
 +
!<span id="4-5"></span>4-5
 +
!<span id="0x04-0x05"></span>0x04-0x05
 +
|X dimension of map.
 +
|- valign="top"
 +
!<span id="6-7"></span>6-7
 +
!<span id="0x06-0x07"></span>0x06-0x07
 +
|Y dimension of map.
 +
|- valign="top"
 +
!<span id="8-9"></span>8-9
 +
!<span id="0x08-0x09"></span>0x08-0x09
 +
|Z dimension of map.
 +
|- valign="top"
 +
!<span id="10-11"></span>10-11
 +
!<span id="0x0A-0x0B"></span>0x0A-0x0B
 +
|Values [[#4-5|[4-5]]] and [[#6-7|[6-7]]] multiplied together.
 +
|- valign="top"
 +
!<span id="12-13"></span>12-13
 +
!<span id="0x0C-0x0D"></span>0x0C-0x0D
 +
|Seems to be equal to [[#8-9|[8-9]]] - 1.
 +
|- valign="top"
 +
!<span id="14-15"></span>14-15
 +
!<span id="0x0E-0x0F"></span>0x0E-0x0F
 +
|''Unknown.'' Maybe something to do with lighting? Probably not...
 +
|- valign="top"
 +
!<span id="16-17"></span>16-17
 +
!<span id="0x10-0x11"></span>0x10-0x11
 +
|''Unknown.'' Can change during play of the map. Maybe this flags when the AI starts "cheating"?
 +
|- valign="top"
 +
!<span id="18-19"></span>18-19
 +
!<span id="0x12-0x13"></span>0x12-0x13
 +
|Alien units killed.
 +
|- valign="top"
 +
!<span id="20-21"></span>20-21
 +
!<span id="0x14-0x15"></span>0x14-0x15
 +
|X-Com soldiers lost.
 +
|- valign="top"
 +
!<span id="22-23"></span>22-23
 +
!<span id="0x16-0x17"></span>0x16-0x17
 +
|X-Com tanks lost.
 +
|- valign="top"
 +
!<span id="24-25"></span>24-25
 +
!<span id="0x18-0x19"></span>0x18-0x19
 +
|Score for killing Aliens.
 +
|- valign="top"
 +
!<span id="26-27"></span>26-27
 +
!<span id="0x1A-0x1B"></span>0x1A-0x1B
 +
|Score for losing X-Com units. A negative value.
 +
|- valign="top"
 +
!<span id="28-29"></span>28-29
 +
!<span id="0x1C-0x1D"></span>0x1C-0x1D
 +
|Civilians killed by Aliens.
 +
|- valign="top"
 +
!<span id="30-31"></span>30-31
 +
!<span id="0x1E-0x1F"></span>0x1E-0x1F
 +
|Civilians killed by X-Com.
 +
|- valign="top"
 +
|colspan="3"|''The following six entries override the six values in [[OPTION.DAT]] when loading the save game:''
 +
|- valign="top"
 +
!<span id="32-33"></span>32-33
 +
!<span id="0x20-0x21"></span>0x20-0x21
 +
|Scroll speed is six minus this.
 +
|- valign="top"
 +
!<span id="34-35"></span>34-35
 +
!<span id="0x22-0x23"></span>0x22-0x23
 +
|X-Com movement speed is six minus this.
 +
|- valign="top"
 +
!<span id="36-37"></span>36-37
 +
!<span id="0x24-0x25"></span>0x24-0x25
 +
|Seems to be a mirror of [[#34-35|[34-35]]].
 +
|- valign="top"
 +
!<span id="38-39"></span>38-39
 +
!<span id="0x26-0x27"></span>0x26-0x27
 +
|Alien movement speed is six minus this.
 +
|- valign="top"
 +
!<span id="40-41"></span>40-41
 +
!<span id="0x28-0x29"></span>0x28-0x29
 +
|Fire speed.
 +
|- valign="top"
 +
!<span id="42-43"></span>42-43
 +
!<span id="0x2A-0x2B"></span>0x2A-0x2B
 +
|Scrolling mode:
 +
0: Trigger scroll.
 +
1: Auto-scroll.
 +
|- valign="top"
 +
|colspan="3"|''The following three entries only exist in TFTD:''
 +
|- valign="top"
 +
!<span id="44-45"></span>44-45
 +
!<span id="0x2C-0x2D"></span>0x2C-0x2D
 +
|TU reserve for firing:
 +
0: Don't reserve.
 +
1: Reserve for snap shot.
 +
2: Reserve for auto-shot.
 +
3: Reserve for aimed shot.
 +
|- valign="top"
 +
!<span id="46-47"></span>46-47
 +
!<span id="0x2E-0x2F"></span>0x2E-0x2F
 +
|TU reserve for kneeling:
 +
0: Don't reserve.
 +
1: Do reserve.
 +
|- valign="top"
 +
!<span id="48-49"></span>48-49
 +
!<span id="0x30-0x31"></span>0x30-0x31
 +
|''Unknown, always 1?''
 +
|-
 +
|}
  
<b>1/01</b> - Current turn. First value of play is 1.
 
 
<b>2/02</b> - X dimension of map.
 
 
<b>3/03</b> - Y dimension of map.
 
 
<b>4/04</b> - Z dimension of map.
 
 
<b>5/05</b> - Values [2] and [3] multiplied together.
 
 
<b>6/06</b> - Seems to be equal to wglob[4] - 1.
 
 
<b>7/07</b> - ?Unknown? Maybe something to do with lighting.
 
 
<b>8/08</b> - ?Unknown? Can change during play of the map.
 
 
<b>9/09</b> - Alien units killed.
 
 
<b>10/0A</b> - X-Com soldiers lost.
 
 
<b>11/0B</b> - X-Com tanks lost.
 
 
<b>12/0C</b> - Score for killing Aliens.
 
 
<b>13/0D</b> - Score for losing X-Com units. A negative value.
 
 
<b>14/0E</b> - Civilians killed by Aliens.
 
 
<b>15/0F</b> - Civilians killed by X-Com.
 
 
The remaining 6 values are of the same use as those in the mission data option file. They are loaded with the save game, whereas [[OPTION.DAT|option.dat]] is used if a new tactical combat is initiated.
 
  
 
==See Also==
 
==See Also==

Revision as of 12:06, 1 December 2012

This file is only used by tactical saves. It stores the turn count, map dimensions, possibly the lighting, and information concerning kills and score.

There are 22 values (25 for TFTD) made of 2 bytes each. 44 bytes in total (or 50 for TFTD).

Structure

Offset
(Decimal)
Offset
(Hex)
Usage
0-1 0x00-0x01 Current turn * 2. First value of play is 2.
2-3 0x02-0x03 Current turn. First value of play is 1.
4-5 0x04-0x05 X dimension of map.
6-7 0x06-0x07 Y dimension of map.
8-9 0x08-0x09 Z dimension of map.
10-11 0x0A-0x0B Values [4-5] and [6-7] multiplied together.
12-13 0x0C-0x0D Seems to be equal to [8-9] - 1.
14-15 0x0E-0x0F Unknown. Maybe something to do with lighting? Probably not...
16-17 0x10-0x11 Unknown. Can change during play of the map. Maybe this flags when the AI starts "cheating"?
18-19 0x12-0x13 Alien units killed.
20-21 0x14-0x15 X-Com soldiers lost.
22-23 0x16-0x17 X-Com tanks lost.
24-25 0x18-0x19 Score for killing Aliens.
26-27 0x1A-0x1B Score for losing X-Com units. A negative value.
28-29 0x1C-0x1D Civilians killed by Aliens.
30-31 0x1E-0x1F Civilians killed by X-Com.
The following six entries override the six values in OPTION.DAT when loading the save game:
32-33 0x20-0x21 Scroll speed is six minus this.
34-35 0x22-0x23 X-Com movement speed is six minus this.
36-37 0x24-0x25 Seems to be a mirror of [34-35].
38-39 0x26-0x27 Alien movement speed is six minus this.
40-41 0x28-0x29 Fire speed.
42-43 0x2A-0x2B Scrolling mode:
0: Trigger scroll.
1: Auto-scroll.
The following three entries only exist in TFTD:
44-45 0x2C-0x2D TU reserve for firing:
0: Don't reserve.
1: Reserve for snap shot.
2: Reserve for auto-shot.
3: Reserve for aimed shot.
46-47 0x2E-0x2F TU reserve for kneeling:
0: Don't reserve.
1: Do reserve.
48-49 0x30-0x31 Unknown, always 1?


See Also