This version is outdated by a newer approved version.DiffThis version (2017/04/15 15:44) was approved by stohrendorf.

This is an old revision of the document!


TR5

Heavily based on the TR4 savegame format

struct TR5Savegame
{
    uint8_t levelName[75]; // CP437 C string; null-terminated (data after \0 is ignored)
    int32_t saveNumber;
    uint16_t days;
    uint16_t hours;
    uint16_t minutes;
    uint16_t seconds;
    int16_t laraIndex;
    int16_t laraArmAction;
    int16_t currentItemInHand;
    int16_t changeToItemInHand;
    /* 0 None
     * 1 Pistols
     * 2 Desert Eagle
     * 3 Uzis
     * 4 Shotgun
     * 5 H&K
     * 6 Grappling Gun
     */
    int16_t activeWeapon;
    uint8_t unknown2[6];
    int16_t laraAir;
    uint8_t unknown3[20];
    int16_t weaponOnBack;
    uint8_t unknown3b[2];
    int16_t laraPoison1;
    int16_t laraPoison2;
    uint8_t unknown3a[19];
    uint8_t laraSpecialStatus; // 0x4 = Normal; 0xC = Burning Lara; Anything other = save doesn't appear
    uint8_t unknown4[92];
    int16_t laraFacing; // Matches data for item below
    uint8_t unknown4a[108];
    uint8_t pistols; // 0 = missing; 9 = present
    uint8_t uzis; // 0 = missing; 1 = present
    uint8_t shotgun; // 0 = missing; 9 = present
    uint8_t crossbow; // 0 = missing; 9 = present; 13 = combined with lasersight
    uint8_t grenadeGun; // 0 = missing; 9 = present
    uint8_t revolver; // 0 = missing; 1 = present; 5 = combined with lasersight
    uint8_t laserSight; // 0 = missing or combined; 1 = present separated
    uint8_t binoculars;
    uint8_t crowbar;
    uint8_t mechanicalScarab;
    uint8_t smallWaterSkin;
    int8_t largeWaterSkin;
    uint8_t examine[3];
    uint8_t puzzleItems[12];
    uint8_t puzzleItem1_4Combo;
    uint8_t puzzleItem5_8Combo;
    uint8_t keyItem1_8;
    uint8_t keyItem9_12;
    uint8_t keyItem1_4Combo;
    uint8_t keyItem5_8Combo;
    uint8_t pickupItem1_4;
    uint8_t unknown5;
    uint8_t pickupItem1_4Combo;
    uint8_t unknown6;
    uint8_t questItem1_6;
    uint8_t unknown7[5];
    int16_t smallMediPacks; // 65535 means unlimited
    int16_t largeMediPacks; // 65535 means unlimited
    int16_t flares; // 65535 means unlimited
    int16_t pistolAmmo;
    int16_t uziAmmo;
    int16_t revolverAmmo;
    int16_t shotgunAmmo[2]; // normal; wide, divide by 6 for real value
    int16_t hkAmmo;
    int16_t grapplingGunAmmo;
    uint8_t unknown8[27];
    uint8_t levelNumber;
    uint8_t unknown9; // clock??
    uint32_t timeTaken; // in game ticks (1/30th of a second), so divide by 30 for time in seconds
    uint32_t distanceTravelled; // Divide by 419.007 for value in meters
    int32_t ammoUsed;
    int32_t hits;
    uint8_t unknown10[2];
    uint8_t secrets;
    uint8_t healthPacksUsed;
    uint8_t unknown11[16];
    uint16_t kills;
    uint8_t unknown11a[11];
    struct
    {
        uint8_t unused;
        uint8_t blue;
        uint8_t green;
        uint8_t red;
    } fogColour;
    int8_t autoAimingForEnemy;
    uint8_t unknown12[172];
};
trs/savegame/tr5.1490469941.txt.gz · Last modified: 2017/03/25 19:25 (external edit)
Back to top
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0