hide results

    Save Game Hacking Guide by Agus Kurniawan

    Version: 3.0 | Updated: 07/17/01 | Printable Version | Search This Guide

                              X-COM: UFO Defense
                          Hacking Guide version 3.0
                                 By: whatever
                         aizen_myouou@zdnetonebox.com
    
    ----------------------------------------------------------------------
    Table of Content
      1. Introduction
      2. Money
      3. Soldiers
      4. Items and Facilities
      5. Weapons
      6. Credits
      7. Copyright Statement
    
    
    ----------------------------------------------------------------------
    1. Introduction
    ----------------------------------------------------------------------
    This guide is designated to help those, who stuck in X-COM:UFO Defense
    game. This guide is tested on X-COM: UFO Defense, which is included in
    X-COM Collectors Edition. Since I don't have the older version, so I
    can't test on it. The older version might be the same as the Collector
    Edition, but I can't guarantee.
    
    If you find any mistake on this guide, don't hesitate to contact me.
    I'm looking forward to receive corrections and feed back.
    
    A word of warning, by using this guide you've spoiled the entire
    excitement of the game. If you want to play fair, don't read the rest
    of the guide. If you decided to make use of this guide, you'll need
    these:
        1. X-COM: UFO Defense game
        2. The save game you want to tamper
        3. Hex Editor
        4. Knowledge of Hexadecimal
    
    The game provides 10 slots of save games you can use. Each of the 
    slots is saved in a separate directory named "Game_" appended with 
    the slot number. In Example: You saved your game in the third slot,
    your save game is inside "Game_3" directory. From here on, I won't 
    touch the save game directory anymore.
    
    Below are some basic conversions from decimal to hexadecimal:
    
    --------------------------------------
    Decimal                   Hexadecimal
    --------------------------------------
    1                         01
    2                         02
    3                         03
    4                         04
    5                         05
    6                         06
    7                         07
    8                         08
    9                         09
    10                        0A
    11                        0B
    12                        0C
    13                        0D
    14                        0E
    15                        0F
    16                        10
    100                       64
    255                       FF
    65,535                    FF FF
    99,999,999                FF E0 F5 05
    --------------------------------------
    
    NOTE: Before you start editing, back up the file you're gonna change.
    
    
    ----------------------------------------------------------------------
    2. Money
    ----------------------------------------------------------------------
    Open the file "lilglob.dat" with your Hex Editor. Change the first 4
    bytes value to your needs. The recommended value is FF E0 F5 05. This
    will give you 99,999,999, more than enough to finish the game. You can
    go up to 2 billions, but I'm afraid it may screw up your save game.
    
    
    ----------------------------------------------------------------------
    3. Soldiers
    ----------------------------------------------------------------------
    The soldiers' data are saved in the file "soldier.dat". Browsing 
    through this file is somehow easy, since the soldier name is saved 
    there as well. The stats for each soldier are several bytes
    underneath. The total number of soldiers you may have is variable.
    Thus, it's impossible to list all the offset here. I will use the
    first soldier as reference for the next soldiers.
    
    This is the stats table for the first soldier:
    
    ------------------------------------------------------------
    Stats                  Offset       Size           Max Value
    ------------------------------------------------------------
    Time Unit              002A         1 Byte         FF
    Health                 002B         1 Byte         FF
    Stamina                002C         1 Byte         FF
    Reaction               002D         1 Byte         FF
    Strength               002E         1 Byte         64
    Firing Accuracy        002F         1 Byte         FF
    Throwing Accuracy      0030         1 Byte         FF
    Psi Strength           0032         1 Byte         FF
    Psi Skill              0033         1 Byte         FF
    Bravery                0034         1 Byte         01
    ------------------------------------------------------------
    
    NOTE: If you give Strength above 64, the soldier won't be able to
          throw anything.
          Bravery uses the formula below to calculate:
                               110 - Bravery 
                   Hex Value = -------------
                                    10
          I.e.: If your soldier has Bravery 70 points, the hex value is:
                               110 - 70
                               -------- = 04
                                  10
    
    To calculate the stat offset for the second soldier, just add 44 to 
    the offset of the first soldier. For the third soldier add (44 x 2)
    to the offset of the first soldier (The calculation is done in 
    Hexadecimal, you might need a scientific calculator to do so).
    
    Example:
       The Strength offset for the second soldier will be:
            002E + 44 = 0072
       The Stamina offset for the 11th soldier will be:
            002C + (44 x A) = 2D4
                            = 02D4
    
    
    ----------------------------------------------------------------------
    4. Items and Facilities
    ----------------------------------------------------------------------
    Items data can be found inside the file "base.dat" in your save game
    directory. The offset for each item is fixed, just key in the amount
    of item you want. Just like the soldiers data, I'll use the first base
    as reference for the next bases.
    
    -----------------------------------------------
    Item Name                  Offset         Size
    -----------------------------------------------
    Engineer                   005E         1 Byte
    Scientist                  005F         1 Byte
    Stingray Launcher          0060         2 Bytes
    Avalanche Launcher         0062         2 Bytes
    Cannon                     0064         2 Bytes
    Fusion Ball Launcher       0066         2 Bytes
    Laser Cannon               0068         2 Bytes
    Plasma Beam                006A         2 Bytes
    Stingray Missile           006C         2 Bytes
    Avalanche Missile          006E         2 Bytes
    Cannon Rounds              0070         2 Bytes
    Fusion Balls               0072         2 Bytes     
    Tank/Cannon                0074         2 Bytes
    Tank/Rocket Launcher       0076         2 Bytes
    Tank/Laser Cannon          0078         2 Bytes
    Hovertank/Plasma           007A         2 Bytes
    Hovertank/Launcher         007C         2 Bytes
    Pistol                     007E         2 Bytes
    Pistol Clip                0080         2 Bytes
    Rifle                      0082         2 Bytes
    Rifle Clip                 0084         2 Bytes
    Heavy Cannon               0086         2 Bytes
    HC-AP Ammo                 0088         2 Bytes
    HC-HE Ammo                 008A         2 Bytes
    HC-IN Ammo                 008C         2 Bytes
    Auto Cannon                008E         2 Bytes
    AC-AP Ammo                 0090         2 Bytes
    AC-HE Ammo                 0092         2 Bytes
    AC-IN Ammo                 0094         2 Bytes
    Rocket Launcher            0096         2 Bytes
    Small Rocket               0098         2 Bytes
    Large Rocket               009A         2 Bytes
    Incendiary Rocket          009C         2 Bytes
    Laser Pistol               009E         2 Bytes
    Laser Rifle                00A0         2 Bytes
    Heavy Laser                00A2         2 Bytes
    Grenade                    00A4         2 Bytes
    Smoke Grenade              00A6         2 Bytes
    Proximity Grenade          00A8         2 Bytes
    High Explosive             00AA         2 Bytes
    Motion Scanner             00AC         2 Bytes
    Medi-Kit                   00AE         2 Bytes
    Psi-Amp                    00B0         2 Bytes
    Stun Rod                   00B2         2 Bytes
    Electro Flare              00B4         2 Bytes
    Heavy Plasma               00C2         2 Bytes
    Heavy Plasma Clip          00C4         2 Bytes
    Plasma Rifle               00C6         2 Bytes
    Plasma Rifle Clip          00C8         2 Bytes
    Plasma Pistol              00CA         2 Bytes
    Plasma Pistol Clip         00CC         2 Bytes
    Blaster Launcher           00CE         2 Bytes
    Blaster Bomb               00D0         2 Bytes
    Small Launcher             00D2         2 Bytes
    Stun Bomb                  00D4         2 Bytes
    Alien Grenade              00D6         2 Bytes
    Elerium-115                00D8         2 Bytes
    Mind Probe                 00DA         2 Bytes
    Sectoid Corpse             00E2         2 Bytes
    Snakeman Corpse            00E4         2 Bytes
    Ethereal Corpse            00E6         2 Bytes
    Muton Corpse               00E8         2 Bytes
    Floater Corpse             00EA         2 Bytes
    Celatid Corpse             00EC         2 Bytes
    Silacoid Corpse            00EE         2 Bytes
    Chryssalid Corpse          00F0         2 Bytes
    Reaper Corpse              00F2         2 Bytes
    Sectopod Corpse            00F4         2 Bytes
    Cyberdisc Corpse           00F6         2 Bytes
    UFO Power Source           0100         2 Bytes
    UFO Navigation             0102         2 Bytes
    UFO Construction           0104         2 Bytes
    Alien Food                 0106         2 Bytes
    Alien Reproduction         0108         2 Bytes
    Alien Entertainment        010A         2 Bytes
    Alien Surgery              010C         2 Bytes
    Examination Room           010E         2 Bytes
    Alien Alloys               0110         2 Bytes
    Alien Habitat              0112         2 Bytes
    Personal Armour            0114         2 Bytes
    Power Suit                 0116         2 Bytes
    Flying Suit                0118         2 Bytes
    HWP Cannon Shell           011A         2 Bytes
    HWP Rockets                011C         2 Bytes
    HWP Fusion Bomb            011E         2 Bytes
    -----------------------------------------------
    
    The table above is only for first base. To get the next base offsets
    just add 124 to the previous base offsets. The calculation is still
    in hexadecimal. Just use scientific calculator to make life easier.
    
    Example:
       To calculate the Engineer offset for base number 2:
               005E + 124 = 182
                          = 0182
       To calculate Flying Suit offset for base number 4:
               0118 + (124 x 3) = 484
                                = 0484
    
    Another easy trick is to change the item amount is the first base and
    just transfer them to other base. But this method will consume some
    time to complete. But it is easier than actually changing the item 
    amount in the particular base.
    
    The next is the facilities that you can build in the game. I will list
    out the facility code first.
    ------------------------------------
    Hex Code       Facility Name
    ------------------------------------
    00             Access Lift
    01             Living Quarters
    02             Laboratory
    03             Workshop
    04             Small Radar System
    05             Large Radar System
    06             Missile Defense
    07             General Stores
    08             Alien Containment
    09             Laser Defense
    0A             Plasma Defense
    0B             Fusion Ball Defense
    0C             Grav Shield
    0D             Mind Shield
    0E             Psionic Laboratory
    0F             Hyper-wave Decoder
    10             Hangar (Top Left)
    11             Hangar (Top Right)
    12             Hangar (Bottom Left)
    13             Hangar (Bottom Right)
    FF             Empty
    ------------------------------------
    
    All facilities use 1 block of space, except hangar that uses 4 blocks.
    Each section of hangar must be placed manually, so it has to like.....
    
    /-------------\
    |  10  |  11  |
    |      |      |
    |-------------|
    |  12  |  13  |
    |      |      |
    \-------------/
    
    If you missed any of those bytes, the game may not recognize the 
    hangar's existence. So, you can't place any craft in it.
    
    The next is the first Base Layout and the offset of each block. Every
    block is given FF code when empty, replace it with any of the above
    code.
    
    /-----------------------------------------\
    | 0016 | 0017 | 0018 | 0019 | 001A | 001B |
    |      |      |      |      |      |      |
    |-----------------------------------------|
    | 001C | 001D | 001E | 001F | 0020 | 0021 |
    |      |      |      |      |      |      |
    |-----------------------------------------|
    | 0022 | 0023 | 0024 | 0025 | 0026 | 0027 |
    |      |      |      |      |      |      |
    |-----------------------------------------|
    | 0028 | 0029 | 002A | 002B | 002C | 002D |
    |      |      |      |      |      |      |
    |-----------------------------------------|
    | 002E | 002F | 0030 | 0031 | 0032 | 0033 |
    |      |      |      |      |      |      |
    |-----------------------------------------|
    | 0034 | 0035 | 0036 | 0037 | 0038 | 0039 |
    |      |      |      |      |      |      |
    \-----------------------------------------/
    
    Next goes to the time taken to finish building base facilities. Again,
    it is based on the first base. When empty, each block has FF value.
    Set it to 00 to indicate that the facility is finished.
    
    /-----------------------------------------\
    | 003A | 003B | 003C | 003D | 003E | 003F |
    |      |      |      |      |      |      |
    |-----------------------------------------|
    | 0040 | 0041 | 0042 | 0043 | 0044 | 0045 |
    |      |      |      |      |      |      |
    |-----------------------------------------|
    | 0046 | 0047 | 0048 | 0049 | 004A | 004B |
    |      |      |      |      |      |      |
    |-----------------------------------------|
    | 004C | 004D | 004E | 004F | 0050 | 0051 |
    |      |      |      |      |      |      |
    |-----------------------------------------|
    | 0052 | 0053 | 0054 | 0055 | 0056 | 0057 |
    |      |      |      |      |      |      |
    |-----------------------------------------|
    | 0058 | 0059 | 005A | 005B | 005C | 005D |
    |      |      |      |      |      |      |
    \-----------------------------------------/
    
    In order to get the offset for the rest of the bases, you can use the
    same calculation examples given in "Items Section" above.
    
    
    ----------------------------------------------------------------------
    5. Weapons
    ----------------------------------------------------------------------
    WARNING: This section completely tampers with the game setting. This
             section is not recommended for a novice. The changes will
             affect the whole game, not only a particular save game. Any
             mistake might screw up the whole game, forcing you to re-
             install the game.
    
    The weapons data can be found in directory "\Geodata", with file named
    "Obdata.dat". Please, make back up of it before you proceed further.
    
    I separate them into 2 parts: human & alien technology. Be very 
    careful when tampering with alien technology. The alien will use them
    against you.
    
    Maximum byte values:
      Accuracy (in percentage)                        64
      Time Unit Consumption Rate (in percentage)      01
      Power                                           FF
      Rounds                                          FF
    
    Human Technology:
    
    1. Pistol
       Accuracy:
           Auto Shot      0020        1 Byte
           Snap Shot      0021        1 Byte
           Aimed Shot     0022        1 Byte
       Time Unit Consumption Rate:
           Auto Shot      0023        1 Byte
           Snap Shot      0024        1 Byte
           Aimed Shot     0025        1 Byte
    
    2. Pistol Clip
           Power          004C        1 Byte
           Rounds         005C        1 Byte
    
    3. Rifle
       Accuracy:
           Auto Shot      008C        1 Byte
           Snap Shot      008D        1 Byte
           Aimed Shot     008E        1 Byte
       Time Unit Consumption Rate:
           Auto Shot      008F        1 Byte
           Snap Shot      0090        1 Byte
           Aimed Shot     0091        1 Byte
    
    4. Rifle Clip
           Power          00B8        1 Byte
           Rounds         00C8        1 Byte
    
    5. Heavy Cannon
       Accuracy:
           Auto Shot      00F8        1 Byte
           Snap Shot      00F9        1 Byte
           Aimed Shot     00FA        1 Byte
       Time Unit Consumption Rate:
           Auto Shot      00FB        1 Byte
           Snap Shot      00FC        1 Byte
           Aimed Shot     00FD        1 Byte
    
    6. Heavy Cannon AP Ammo
           Power          0124        1 Byte
           Rounds         0134        1 Byte
    
    7. Heavy Cannon HE Ammo
           Power          015A        1 Byte
           Rounds         016A        1 Byte
    
    8. Heavy Cannon IN Ammo
           Power          0190        1 Byte
           Rounds         01A0        1 Byte
    
    9. Auto Cannon
       Accuracy:
           Auto Shot      01D0        1 Byte
           Snap Shot      01D1        1 Byte
           Aimed Shot     01D2        1 Byte
       Time Unit Consumption Rate:
           Auto Shot      01D3        1 Byte
           Snap Shot      01D4        1 Byte
           Aimed Shot     01D5        1 Byte
    
    10. Auto Cannon AP Ammo
           Power          01FC        1 Byte
           Rounds         020C        1 Byte
    
    11. Auto Cannon HE Ammo
           Power          0232        1 Byte
           Rounds         0242        1 Byte 
    
    12. Auto Cannon IN Ammo
           Power          0268        1 Byte
           Rounds         0278        1 Byte
    
    13. Rocket Launcher
        Accuracy:
           Auto Shot      02A8        1 Byte
           Snap Shot      02A9        1 Byte
           Aimed Shot     02AA        1 Byte
        Time Unit Consumption Rate:
           Auto Shot      02AB        1 Byte
           Snap Shot      02AC        1 Byte
           Aimed Shot     02AD        1 Byte
    
    14. Small Rocket
           Power          02D4        1 Byte
           Rounds         02E4        1 Byte
    
    15. Large Rocket
           Power          030A        1 Byte
           Rounds         031A        1 Byte
    
    16. Incendiary Rocket
           Power          0340        1 Byte
           Rounds         0350        1 Byte
    
    17. Laser Pistol
           Power          0376        1 Byte
        Accuracy:
           Auto Shot      0380        1 Byte
           Snap Shot      0381        1 Byte
           Aimed Shot     0382        1 Byte
        Time Unit Consumption Rate:
           Auto Shot      0383        1 Byte
           Snap Shot      0384        1 Byte
           Aimed Shot     0385        1 Byte
    
    18. Laser Rifle
           Power          03AC        1 Byte
        Accuracy:
           Auto Shot      03B6        1 Byte
           Snap Shot      03B7        1 Byte
           Aimed Shot     03B8        1 Byte
        Time Unit Consumption Rate:
           Auto Shot      03B9        1 Byte
           Snap Shot      03BA        1 Byte
           Aimed Shot     03BB        1 Byte
    
    19. Heavy Laser
           Power          03E2        1 Byte
        Accuracy:
           Auto Shot      03EC        1 Byte
           Snap Shot      03ED        1 Byte
           Aimed Shot     03EE        1 Byte
        Time Unit Consumption Rate:
           Auto Shot      03EF        1 Byte
           Snap Shot      03F0        1 Byte
           Aimed Shot     03F1        1 Byte
    
    20. Grenade
           Power          0418        1 Byte
    
    21. Smoke Grenade
           Power          044E        1 Byte
    
    22. Proximity Grenade
           Power          0484        1 Byte
    
    23. High Explosive
           Power          04BA        1 Byte
    
    24. Stun Rod
        Time Unit Consumption Rate:
           Stun           05A5        1 Byte
    
    
    Alien Technology:
    
    1. Plasma Pistol
       Accuracy:
           Auto Shot      0824        1 Byte
           Snap Shot      0825        1 Byte
           Aimed Shot     0826        1 Byte
       Time Unit Consumption Rate:
           Auto Shot      0827        1 Byte
           Snap Shot      0828        1 Byte
           Aimed Shot     0829        1 Byte
    
    2. Plasma Pistol Clip
           Power          0850        1 Byte
           Rounds         0860        1 Byte
    
    3. Plasma Rifle
       Accuracy:
           Auto Shot      07B8        1 Byte
           Snap Shot      07B9        1 Byte
           Aimed Shot     07BA        1 Byte
       Time Unit Consumption Rate:
           Auto Shot      07BB        1 Byte
           Snap Shot      07BC        1 Byte
           Aimed Shot     07BD        1 Byte
    
    4. Plasma Rifle Clip
           Power          07E4        1 Byte
           Rounds         07F4        1 Byte
    
    5. Heavy Plasma
       Accuracy:
           Auto Shot      074C        1 Byte
           Snap Shot      074D        1 Byte
           Aimed Shot     074E        1 Byte
       Time Unit Consumption Rate:
           Auto Shot      074F        1 Byte
           Snap Shot      0750        1 Byte
           Aimed Shot     0751        1 Byte
    
    6. Heavy Plasma Clip
           Power          0778        1 Byte
           Rounds         0788        1 Byte
    
    7. Blaster Launcher
       Accuracy:
           Auto Shot      0890        1 Byte
           Snap Shot      0891        1 Byte
           Aimed Shot     0892        1 Byte
       Time Unit Consumption Rate:
           Auto Shot      0893        1 Byte
           Snap Shot      0894        1 Byte
           Aimed Shot     0895        1 Byte
    
    8. Blaster Bomb
           Power          08BC        1 Byte
           Rounds         08CC        1 Byte
    
    9. Small Launcher
       Accuracy:
           Auto Shot      08FC        1 Byte
           Snap Shot      08FD        1 Byte
           Aimed Shot     08FE        1 Byte
       Time Unit Consumption Rate:
           Auto Shot      08FF        1 Byte
           Snap Shot      0900        1 Byte
           Aimed Shot     0901        1 Byte
    
    10. Stun Bomb
           Power          0928        1 Byte
           Rounds         0938        1 Byte
    
    11. Alien Grenade
           Power          095E        1 Byte
    
    12. Mind Probe
        Time Unit Consumption Rate:
           Use            09DD        1 Byte
    
    
    I have found some anomalies when altering weapon data. If you'd 
    changed the soldier firing accuracy to 255 and the weapon accuracy to
    255 as well, it'll result a negative accuracy. So, if you change the 
    soldier firing accuracy to 255, don't set the weapon accuracy for more
    than 64 (100% Accuracy). Shooting modes for weapon too, can be change.
    To add, just apply a reasonable value to the designated offsets. To
    remove, simply change the value to 00 on the desired shooting mode.
    Changes must be applied on both the Accuracy and Time Unit Usage on
    that mode.
    
    
    ----------------------------------------------------------------------
    6. Credit
    ----------------------------------------------------------------------
    Special thanks to:
      -MicroProse, for making such a great tactical game series.
      -Benjamin Peterson, for writing Advance HeX Editor.
    
    
    ----------------------------------------------------------------------
    7. Copyright Statement
    ----------------------------------------------------------------------
    This document is copyright of Agus Kurniawan, 2001. This document is 
    intended to be posted only on GameFAQs and may not be posted on other 
    site. X-COM Collector Series is a trademark of MicroProse 
    Entertainment, 1999. Advance HeX Editor is copyright of Benjamin 
    Peterson, 1998.