Example #1
0
        /// <summary>
        /// Reads known character data.
        /// </summary>
        void ReadCharacterData()
        {
            byte[]       recordData = RecordData;
            MemoryStream stream     = new MemoryStream(recordData);
            BinaryReader reader     = new BinaryReader(stream);

            parsedData = new CharacterRecordData();
            parsedData.characterName       = ReadCharacterName(reader);
            parsedData.currentStats        = ReadStats(reader);
            parsedData.baseStats           = ReadStats(reader);
            parsedData.gender              = ReadGender(reader);
            parsedData.transportationFlags = ReadTransportationFlags(reader);
            parsedData.race        = ReadRace(reader);
            parsedData.armorValues = reader.ReadBytes(7);

            reader.BaseStream.Position = 0x58;
            parsedData.startSumUnknown = reader.ReadInt32();
            parsedData.opponentUnknown = reader.ReadInt32();

            reader.BaseStream.Position = 0x7c;
            parsedData.currentHealth   = reader.ReadInt16();
            parsedData.startingHealth  = reader.ReadInt16();
            parsedData.faceIndex       = reader.ReadByte();
            parsedData.level           = reader.ReadByte();

            reader.BaseStream.Position = 0x83;
            parsedData.reflexes        = ReadReflexes(reader);

            reader.BaseStream.Position = 0x85;
            parsedData.physicalGold    = reader.ReadUInt32();

            reader.BaseStream.Position = 0x8d;
            parsedData.maxMagicka      = reader.ReadInt16();

            // TODO: 0x91 reputation?

            reader.BaseStream.Position = 0x9d;
            parsedData.skills          = ReadSkills(reader);

            reader.BaseStream.Position = 0x016f;
            parsedData.equippedItems   = ReadEquippedItems(reader);

            reader.BaseStream.Position = 0x01fd;
            parsedData.timeStamp       = reader.ReadUInt32();

            reader.BaseStream.Position = 0x230;
            parsedData.career          = ReadCareer(reader);

            reader.Close();
        }
Example #2
0
        /// <summary>
        /// Reads known character data.
        /// </summary>
        void ReadCharacterData()
        {
            byte[]       recordData = RecordData;
            MemoryStream stream     = new MemoryStream(recordData);
            BinaryReader reader     = new BinaryReader(stream);

            parsedData = new CharacterRecordData();
            parsedData.characterName       = ReadCharacterName(reader);
            parsedData.currentStats        = ReadStats(reader);
            parsedData.baseStats           = ReadStats(reader);
            parsedData.gender              = ReadGender(reader);
            parsedData.transportationFlags = ReadTransportationFlags(reader);
            parsedData.minMetalToHit       = reader.ReadByte();
            parsedData.race = ReadRace(reader);

            sbyte[] armorValues = new sbyte[7];
            for (int i = 0; i < 7; i++)
            {
                armorValues[i] = reader.ReadSByte();
            }
            parsedData.armorValues = armorValues;

            parsedData.skillsRaisedThisLevel1  = reader.ReadUInt32();
            parsedData.skillsRaisedThisLevel2  = reader.ReadUInt32();
            parsedData.startingLevelUpSkillSum = reader.ReadInt32();

            parsedData.baseHealth = reader.ReadInt16();

            reader.BaseStream.Position = 0x60;
            parsedData.lastTimeUrgeToHuntInnocentSatisfied = reader.ReadUInt32();
            parsedData.timeAfterWhichShieldEffectWillEnd   = reader.ReadUInt32();
            parsedData.unknownLycanthropy = reader.ReadInt16();

            reader.BaseStream.Position = 0x74;
            parsedData.playerHouse     = reader.ReadUInt32();
            parsedData.playerShip      = reader.ReadUInt32();

            parsedData.currentHealth = reader.ReadInt16();
            parsedData.maxHealth     = reader.ReadInt16();

            parsedData.faceIndex = reader.ReadByte();
            parsedData.level     = reader.ReadByte();

            reader.BaseStream.Position = 0x83;
            parsedData.reflexes        = ReadReflexes(reader);

            reader.BaseStream.Position = 0x85;
            parsedData.physicalGold    = reader.ReadUInt32();

            parsedData.magicEffects1 = reader.ReadByte();
            parsedData.magicEffects2 = reader.ReadByte();
            parsedData.magicEffects3 = reader.ReadByte();
            parsedData.magicEffects4 = reader.ReadByte();

            parsedData.currentSpellPoints = reader.ReadInt16();
            parsedData.maxSpellPoints     = reader.ReadInt16();

            parsedData.reputationCommoners  = reader.ReadInt16();
            parsedData.reputationMerchants  = reader.ReadInt16();
            parsedData.reputationScholars   = reader.ReadInt16();
            parsedData.reputationNobility   = reader.ReadInt16();
            parsedData.reputationUnderworld = reader.ReadInt16();

            parsedData.currentFatigue = reader.ReadUInt16();

            parsedData.skills = ReadSkills(reader, out parsedData.skillUses);

            parsedData.equippedItems = ReadEquippedItems(reader);

            reader.BaseStream.Position = 0x1f2;
            parsedData.race2           = ReadRace(reader);
            parsedData.timeToBecomeVampireOrWerebeast = reader.ReadUInt32();

            reader.BaseStream.Position = 0x1fd;
            parsedData.timeStamp       = reader.ReadUInt32();

            reader.BaseStream.Position = 0x205;
            parsedData.lastTimePlayerAteOrDrankAtTavern = reader.ReadUInt32();
            parsedData.lastTimePlayerBoughtTraining     = reader.ReadUInt32();

            reader.BaseStream.Position              = 0x211;
            parsedData.timeForThievesGuildLetter    = reader.ReadUInt32();
            parsedData.timeForDarkBrotherhoodLetter = reader.ReadUInt32();
            parsedData.shieldEffectAmount           = reader.ReadUInt32();

            reader.BaseStream.Position = 0x21f;
            parsedData.darkBrotherhoodRequirementTally = reader.ReadByte();

            reader.BaseStream.Position = 0x222;
            parsedData.thievesGuildRequirementTally = reader.ReadByte();

            reader.BaseStream.Position              = 0x224;
            parsedData.biographyReactionMod         = reader.ReadSByte();
            parsedData.resistanceToFire             = reader.ReadByte();
            parsedData.resistanceToFrost            = reader.ReadByte();
            parsedData.resistanceToDiseaseAndPoison = reader.ReadByte();
            parsedData.resistanceToShock            = reader.ReadByte();
            parsedData.resistanceToMagicka          = reader.ReadByte();

            reader.BaseStream.Position = 0x230;
            parsedData.career          = ReadCareer(reader);

            reader.Close();
        }
        /// <summary>
        /// Reads known character data.
        /// </summary>
        void ReadCharacterData()
        {
            byte[] recordData = RecordData;
            MemoryStream stream = new MemoryStream(recordData);
            BinaryReader reader = new BinaryReader(stream);

            parsedData = new CharacterRecordData();
            parsedData.characterName = ReadCharacterName(reader);
            parsedData.currentStats = ReadStats(reader);
            parsedData.baseStats = ReadStats(reader);
            parsedData.gender = ReadGender(reader);
            parsedData.transportationFlags = ReadTransportationFlags(reader);
            parsedData.race = ReadRace(reader);
            parsedData.armorValues = reader.ReadBytes(7);

            reader.BaseStream.Position = 0x58;
            parsedData.startSumUnknown = reader.ReadInt32();
            parsedData.opponentUnknown = reader.ReadInt32();

            reader.BaseStream.Position = 0x7c;
            parsedData.currentHealth = reader.ReadInt16();
            parsedData.startingHealth = reader.ReadInt16();
            parsedData.faceIndex = reader.ReadByte();
            parsedData.level = reader.ReadByte();

            reader.BaseStream.Position = 0x83;
            parsedData.reflexes = ReadReflexes(reader);

            reader.BaseStream.Position = 0x85;
            parsedData.physicalGold = reader.ReadUInt32();

            reader.BaseStream.Position = 0x8d;
            parsedData.maxMagicka = reader.ReadInt16();

            // TODO: 0x91 reputation?

            reader.BaseStream.Position = 0x9d;
            parsedData.skills = ReadSkills(reader);

            // TODO: 0x16f equipped items?

            reader.BaseStream.Position = 0x01fd;
            parsedData.timeStamp = reader.ReadUInt32();

            reader.BaseStream.Position = 0x230;
            parsedData.career = ReadCareer(reader);

            reader.Close();
        }
        /// <summary>
        /// Reads known character data.
        /// </summary>
        void ReadCharacterData()
        {
            byte[]       recordData = RecordData;
            MemoryStream stream     = new MemoryStream(recordData);
            BinaryReader reader     = new BinaryReader(stream);

            parsedData = new CharacterRecordData();
            parsedData.characterName       = ReadCharacterName(reader);
            parsedData.currentStats        = ReadStats(reader);
            parsedData.baseStats           = ReadStats(reader);
            parsedData.gender              = ReadGender(reader);
            parsedData.transportationFlags = ReadTransportationFlags(reader);
            parsedData.minMetalToHit       = reader.ReadByte();
            parsedData.race = ReadRace(reader);

            sbyte[] armorValues = new sbyte[7];
            for (int i = 0; i < 7; i++)
            {
                armorValues[i] = reader.ReadSByte();
            }
            parsedData.armorValues = armorValues;

            parsedData.skillUnknown1           = reader.ReadInt32();
            parsedData.skillUnknown2           = reader.ReadInt32();
            parsedData.startingLevelUpSkillSum = reader.ReadInt32();

            parsedData.baseHealth = reader.ReadInt16();

            reader.BaseStream.Position           = 0x60;
            parsedData.timePlayerBecameWerebeast = reader.ReadUInt32();

            reader.BaseStream.Position    = 0x6c;
            parsedData.unknownLycanthropy = reader.ReadInt16();

            reader.BaseStream.Position = 0x74;
            parsedData.playerHouse     = reader.ReadUInt32();
            parsedData.playerShip      = reader.ReadUInt32();

            parsedData.currentHealth = reader.ReadInt16();
            parsedData.maxHealth     = reader.ReadInt16();

            parsedData.faceIndex = reader.ReadByte();
            parsedData.level     = reader.ReadByte();

            reader.BaseStream.Position = 0x83;
            parsedData.reflexes        = ReadReflexes(reader);

            reader.BaseStream.Position = 0x85;
            parsedData.physicalGold    = reader.ReadUInt32();

            parsedData.magicEffects1 = reader.ReadByte();
            parsedData.magicEffects2 = reader.ReadByte();
            parsedData.magicEffects3 = reader.ReadByte();

            reader.BaseStream.Position    = 0x8D;
            parsedData.currentSpellPoints = reader.ReadInt16();
            parsedData.maxSpellPoints     = reader.ReadInt16();

            parsedData.reputationCommoners  = reader.ReadInt16();
            parsedData.reputationMerchants  = reader.ReadInt16();
            parsedData.reputationScholars   = reader.ReadInt16();
            parsedData.reputationNobility   = reader.ReadInt16();
            parsedData.reputationUnderworld = reader.ReadInt16();

            parsedData.currentFatigue = reader.ReadUInt16();

            parsedData.skills = ReadSkills(reader, out parsedData.skillUses);

            parsedData.equippedItems = ReadEquippedItems(reader);

            reader.BaseStream.Position = 0x1f2;
            parsedData.race2           = ReadRace(reader);
            parsedData.timeToBecomeVampireOrWerebeast = reader.ReadUInt32();

            reader.BaseStream.Position = 0x1fd;
            parsedData.timeStamp       = reader.ReadUInt32();

            reader.BaseStream.Position = 0x230;
            parsedData.career          = ReadCareer(reader);

            reader.Close();
        }
        /// <summary>
        /// Reads known character data.
        /// </summary>
        void ReadCharacterData()
        {
            byte[]       recordData = RecordData;
            MemoryStream stream     = new MemoryStream(recordData);
            BinaryReader reader     = new BinaryReader(stream);

            parsedData = new CharacterRecordData();
            parsedData.characterName       = ReadCharacterName(reader);
            parsedData.currentStats        = ReadStats(reader);
            parsedData.baseStats           = ReadStats(reader);
            parsedData.gender              = ReadGender(reader);
            parsedData.transportationFlags = ReadTransportationFlags(reader);
            parsedData.race        = ReadRace(reader);
            parsedData.armorValues = reader.ReadBytes(7);

            reader.BaseStream.Position         = 0x58;
            parsedData.startingLevelUpSkillSum = reader.ReadInt32();
            parsedData.opponentUnknown         = reader.ReadInt32();

            reader.BaseStream.Position = 0x5c;
            parsedData.baseHealth      = reader.ReadInt16();

            reader.BaseStream.Position = 0x7c;
            parsedData.currentHealth   = reader.ReadInt16();
            parsedData.maxHealth       = reader.ReadInt16();
            parsedData.faceIndex       = reader.ReadByte();
            parsedData.level           = reader.ReadByte();

            reader.BaseStream.Position = 0x83;
            parsedData.reflexes        = ReadReflexes(reader);

            reader.BaseStream.Position = 0x85;
            parsedData.physicalGold    = reader.ReadUInt32();

            reader.BaseStream.Position    = 0x8d;
            parsedData.currentSpellPoints = reader.ReadInt16();
            parsedData.maxSpellPoints     = reader.ReadInt16();

            parsedData.reputationCommoners  = reader.ReadInt16();
            parsedData.reputationMerchants  = reader.ReadInt16();
            parsedData.reputationScholars   = reader.ReadInt16();
            parsedData.reputationNobility   = reader.ReadInt16();
            parsedData.reputationUnderworld = reader.ReadInt16();

            parsedData.currentFatigue = reader.ReadUInt16();

            parsedData.skills = ReadSkills(reader, out parsedData.skillUses);

            reader.BaseStream.Position = 0x16f;
            parsedData.equippedItems   = ReadEquippedItems(reader);

            reader.BaseStream.Position = 0x1f2;
            parsedData.race2           = ReadRace(reader);

            reader.BaseStream.Position = 0x1fd;
            parsedData.timeStamp       = reader.ReadUInt32();

            reader.BaseStream.Position = 0x230;
            parsedData.career          = ReadCareer(reader);

            reader.Close();
        }