private DecorationsSaveSlotInfo ReadSaveSlot(int slotNumber) { SaveSlotInfoBase baseSaveSlotInfo = ReadUntilPlaytimeIncluded(slotNumber); // Skip until beginning of struct itemBox Skip( 4 + // unknown Constants.HunterAppearanceStructureSize + // H_APPEARANCE Constants.PalicoAppearanceStructureSize + // P_APPEARANCE Constants.GuildCardStructureSize + // hunterGC Constants.GuildCardStructureSize * 100 + // sharedGC 0x019e36 + // unknown Constants.ItemLoadoutsStructureSize + // itemLoadouts 8 + // unknown Constants.ItemPouchStructureSize // itemPouch ); Skip( 8 * 200 + // struct items 8 * 200 + // struct ammo 8 * 800 // struct matrials ); var decorations = new Dictionary <uint, uint>(); for (int i = 0; i < 200; i++) { uint itemId = reader.ReadUInt32(); uint itemQuantity = reader.ReadUInt32(); if (itemId > 0) { decorations.Add(itemId, itemQuantity); } } // Read 1000 equipment slots for (int i = 0; i < 1000; i++) { ReadEquipmentSlot(decorations); } // Skip until the end of the struct saveSlot Skip( 0x2449C + // unknown 0x2a * 250 + // investigations 0x0FB9 + // unknown Constants.EquipLoadoutsStructureSize + // equipLoadout 0x6521 + // unknown Constants.DlcTypeSize * 256 + // DLCClaimed 0x2A5D // unknown ); if (baseSaveSlotInfo.Playtime == 0) { return(null); } return(new DecorationsSaveSlotInfo(baseSaveSlotInfo, decorations)); }
public DecorationsSaveSlotInfo( SaveSlotInfoBase baseSaveSlotInfo, IDictionary <uint, uint> decorations ) : base(baseSaveSlotInfo) { Decorations = new ReadOnlyDictionary <uint, uint>(decorations); }
public MonsterStatsSaveSlotInfo( SaveSlotInfoBase baseSaveSlotInfo, MonsterStatsInfo[] monsterStats ) : base(baseSaveSlotInfo) { MonsterStats = monsterStats; }
public WeaponUsageSaveSlotInfo( SaveSlotInfoBase baseSaveSlotInfo, WeaponUsage lowRank, WeaponUsage highRank, WeaponUsage investigations) : base(baseSaveSlotInfo) { LowRank = lowRank; HighRank = highRank; Investigations = investigations; }
private EquipmentSaveSlotInfo ReadSaveSlot(int slotNumber) { Skip(4); // unknown SaveSlotInfoBase baseSaveSlotInfo = ReadUntilPlaytimeIncluded(slotNumber); Skip( Constants.HunterAppearanceStructureSize + // H_APPEARANCE 382 + // unknown Constants.PalicoAppearanceStructureSize // P_APPEARANCE ); Skip(Constants.GuildCardStructureSize * 101); // hunter's one + 100 shared Skip(209447); // unkn1 Skip(142200); // item loadouts // Skip item pouch Skip( 24 * 8 + // items 16 * 8 + // ammo 256 + // unknown 7 * 8 // special ); Skip( 200 * 8 + // items 200 * 8 + // ammo 1250 * 8 + // materials 500 * 8 // decorations ); var equipments = new List <Equipment>(); // Read 2500 equipment slots for (int i = 0; i < 2500; i++) { var eqp = Equipment.Read(reader); if (eqp != null) { equipments.Add(eqp); } } // Skip until the end of the struct saveSlot Skip(0xa2618); if (baseSaveSlotInfo.Playtime == 0) { return(null); } return(new EquipmentSaveSlotInfo(equipments.ToArray(), baseSaveSlotInfo)); }
public SaveSlotInfoBase(SaveSlotInfoBase copy) { SaveDataInfo = copy.SaveDataInfo; SlotNumber = copy.SlotNumber; Name = copy.Name; Zeni = copy.Zeni; ResearchPoints = copy.ResearchPoints; HR = copy.HR; MR = copy.MR; Playtime = copy.Playtime; }
public SaveSlotInfoBase(SaveSlotInfoBase copy) { SaveDataInfo = copy.SaveDataInfo; SlotNumber = copy.SlotNumber; Name = copy.Name; Zeni = copy.Zeni; ResearchPoints = copy.ResearchPoints; ExperiencePoints = copy.ExperiencePoints; Rank = copy.Rank; Playtime = copy.Playtime; }
public WeaponUsageSaveSlotInfo( SaveSlotInfoBase baseSaveSlotInfo, WeaponUsage lowRank, WeaponUsage highRank, WeaponUsage masterRank, WeaponUsage investigations, WeaponUsage guidingLands) : base(baseSaveSlotInfo) { LowRank = lowRank; HighRank = highRank; MasterRank = masterRank; Investigations = investigations; GuidingLands = guidingLands; }
private EquipmentSaveSlotInfo ReadSaveSlot(int slotNumber) { SaveSlotInfoBase baseSaveSlotInfo = ReadUntilPlaytimeIncluded(slotNumber); // Skip until beginning of struct equipmentSlot Skip( 4 + // unknown Constants.HunterAppearanceStructureSize + // H_APPEARANCE Constants.PalicoAppearanceStructureSize + // P_APPEARANCE Constants.GuildCardStructureSize + // hunterGC Constants.GuildCardStructureSize * 100 + // sharedGC 0x019e36 + // unknown Constants.ItemLoadoutsStructureSize + // itemLoadouts 8 + // unknown Constants.ItemPouchStructureSize + // itemPouch 8 * 200 + // struct items 8 * 200 + // struct ammo 8 * 800 + // struct matrials 8 * 200 // struct decorations ); var equipment = new List <Equipment>(); // Read 1000 equipment slots for (int i = 0; i < 1000; i++) { var eqp = Equipment.Read(reader); if (eqp != null) { equipment.Add(eqp); } } // Skip until the end of the struct saveSlot Skip( 0x2449C + // unknown 0x2a * 250 + // investigations 0x0FB9 + // unknown Constants.EquipLoadoutsStructureSize + // equipLoadout 0x6521 + // unknown Constants.DlcTypeSize * 256 + // DLCClaimed 0x2A5D // unknown ); if (baseSaveSlotInfo.Playtime == 0) { return(null); } return(new EquipmentSaveSlotInfo(equipment.ToArray(), baseSaveSlotInfo)); }
private WeaponUsageSaveSlotInfo ReadSaveSlot(int slotNumber) { Skip(4); // unknown SaveSlotInfoBase baseSaveSlotInfo = ReadUntilPlaytimeIncluded(slotNumber); Skip( Constants.HunterAppearanceStructureSize + // H_APPEARANCE 382 + // unknown Constants.PalicoAppearanceStructureSize // P_APPEARANCE ); // Here is struct GUILDCARD Skip( 171 + // begining of GUILDCARD struct Constants.HunterAppearanceStructureSize + // hunterAppearance (H_APPEARANCE) 212 + // unknown 64 + // Palico name 4 + // Palico rank 194 // unknown ); var lowRankWeaponUsage = WeaponUsage.Read(reader); var highRankWeaponUsage = WeaponUsage.Read(reader); var investigationsWeaponUsage = WeaponUsage.Read(reader); var masterRankWeaponUsage = WeaponUsage.Read(reader); var guidingLandsWeaponUsage = WeaponUsage.Read(reader); Skip( 4 + // unknown 2_134_609 + // 2_136_256 (total size of a save slot) - 1647 (bytes read and skipped so far) 512 // Hash things ); if (baseSaveSlotInfo.Playtime == 0) { return(null); } return(new WeaponUsageSaveSlotInfo( baseSaveSlotInfo, lowRankWeaponUsage, highRankWeaponUsage, masterRankWeaponUsage, investigationsWeaponUsage, guidingLandsWeaponUsage )); }
// Slot 0 Active @ 0x3F3D64 // Slot 1 Active @ 0x4E9E74 // Slot 2 Active @ 0x5DFF84 private WeaponUsageSaveSlotInfo ReadSaveSlot(int slotNumber) { SaveSlotInfoBase baseSaveSlotInfo = ReadUntilPlaytimeIncluded(slotNumber); Skip( 4 + // unknown Constants.HunterAppearanceStructureSize + // H_APPEARANCE Constants.PalicoAppearanceStructureSize // P_APPEARANCE ); // Here is struct GUILDCARD Skip( 167 + // begining of GUILDCARD struct Constants.HunterAppearanceStructureSize + // hunterAppearance (H_APPEARANCE) Constants.PalicoAppearanceStructureSize + // palicoAppearance (P_APPEARANCE) Constants.HunterEquipmentStructureSize + // hunterEquipment 92 + // unknown Constants.PalicoStructureSize + // struct palico 63 // remaining of the struct GUILDCARD until weapon usage ); var lowRankWeaponUsage = WeaponUsage.Read(reader); var highRankWeaponUsage = WeaponUsage.Read(reader); var investigationsWeaponUsage = WeaponUsage.Read(reader); // Skip the remaining of the GUILDCARD structure Skip( 1 + // poseID 1 + // expressionID 1 + // backgroundID 1 + // stickerID 256 + // greeting 256 + // title 2 + // titleFirst 2 + // titleMiddle 2 + // titleLast 4 + // positionX 4 + // positionY 4 + // zoom 10 * Constants.ArenaStatsStructSize + // arenaRecords 4 * Constants.Creatures16StructSize + // creatureStats Constants.Creatures8StructSize // researchLevel ); // Skip the remaining of the saveSlot structure Skip( Constants.GuildCardStructureSize * 100 + // sharedGC 0x019e36 + // unknown Constants.ItemLoadoutsStructureSize + // itemLoadouts 8 + // unknown Constants.ItemPouchStructureSize + // itemPouch Constants.ItemBoxStructureSize + // itemBox 0x034E3C + // unknown 42 * 250 + // investigations 0x0FB9 + // unknown Constants.EquipLoadoutsStructureSize + // equipLoadout 0x6521 + // unknown Constants.DlcTypeSize * 256 + // DLCClaimed 0x2A5D // unknown ); if (baseSaveSlotInfo.Playtime == 0) { return(null); } return(new WeaponUsageSaveSlotInfo( baseSaveSlotInfo, lowRankWeaponUsage, highRankWeaponUsage, investigationsWeaponUsage )); }
public EquipmentSaveSlotInfo(Equipment[] equipment, SaveSlotInfoBase baseSaveSlotInfo) : base(baseSaveSlotInfo) { Equipment = equipment; }
private DecorationsSaveSlotInfo ReadSaveSlot(int slotNumber) { Skip(4); // unknown SaveSlotInfoBase baseSaveSlotInfo = ReadUntilPlaytimeIncluded(slotNumber); Skip( Constants.HunterAppearanceStructureSize + // H_APPEARANCE 382 + // unknown Constants.PalicoAppearanceStructureSize // P_APPEARANCE ); Skip(Constants.GuildCardStructureSize * 101); // hunter's one + 100 shared Skip(209447); // unkn1 Skip(142200); // item loadouts // Skip item pouch Skip( 24 * 8 + // items 16 * 8 + // ammo 256 + // unknown 7 * 8 // special ); Skip( 200 * 8 + // items 200 * 8 + // ammo 1250 * 8 // materials ); var decorations = new Dictionary <uint, uint>(); for (int i = 0; i < 500; i++) { uint itemId = reader.ReadUInt32(); uint itemQuantity = reader.ReadUInt32(); if (itemId > 0) { decorations.Add(itemId, itemQuantity); } } // Read 1000 equipment slots for (int i = 0; i < 2500; i++) { ReadEquipmentSlot(decorations); } // Skip until specialized tools Skip(0x4AD29); for (int i = 0; i < 128; i++) // 128 { Skip(4); // id uint isAvailable = reader.ReadUInt32(); if (isAvailable == 0) { Skip(118); continue; } Skip(4); // Unused uint slot1EquipId = reader.ReadUInt32(); uint slot2EquipId = reader.ReadUInt32(); uint slot3EquipId = reader.ReadUInt32(); if (slot1EquipId != uint.MaxValue) { IncrementDecorationByEquipmentId(slot1EquipId, decorations); } if (slot2EquipId != uint.MaxValue) { IncrementDecorationByEquipmentId(slot2EquipId, decorations); } if (slot3EquipId != uint.MaxValue) { IncrementDecorationByEquipmentId(slot3EquipId, decorations); } Skip(102); // Unknown } // Skip until the end of the struct saveSlot Skip(0x539EF); if (baseSaveSlotInfo.Playtime == 0) { return(null); } return(new DecorationsSaveSlotInfo(baseSaveSlotInfo, decorations)); }
// Slot 0 Active @ 0x3F3D64 // Slot 1 Active @ 0x4E9E74 // Slot 2 Active @ 0x5DFF84 private MonsterStatsSaveSlotInfo ReadSaveSlot(int slotNumber) { SaveSlotInfoBase baseSaveSlotInfo = ReadUntilPlaytimeIncluded(slotNumber); Skip( 4 + // unknown Constants.HunterAppearanceStructureSize + // H_APPEARANCE Constants.PalicoAppearanceStructureSize // P_APPEARANCE ); // Here is struct GUILDCARD Skip( 167 + // begining of GUILDCARD struct Constants.HunterAppearanceStructureSize + // hunterAppearance (H_APPEARANCE) Constants.PalicoAppearanceStructureSize + // palicoAppearance (P_APPEARANCE) Constants.HunterEquipmentStructureSize + // hunterEquipment 92 + // unknown Constants.PalicoStructureSize + // struct palico 63 // remaining of the struct GUILDCARD until weapon usage ); Skip(Constants.WeaponUsageStructureSize * 3); // Skip the remaining of the GUILDCARD structure Skip( 1 + // poseID 1 + // expressionID 1 + // backgroundID 1 + // stickerID 256 + // greeting 256 + // title 2 + // titleFirst 2 + // titleMiddle 2 + // titleLast 4 + // positionX 4 + // positionY 4 + // zoom 10 * Constants.ArenaStatsStructSize // arenaRecords ); ushort[] captured = ReadMonsters16(); ushort[] slayed = ReadMonsters16(); ushort[] largest = ReadMonsters16(); ushort[] smallest = ReadMonsters16(); byte[] researchLevel = ReadMonsters8(); // Skip the remaining of the saveSlot structure Skip( Constants.GuildCardStructureSize * 100 + // sharedGC 0x019e36 + // unknown Constants.ItemLoadoutsStructureSize + // itemLoadouts 8 + // unknown Constants.ItemPouchStructureSize + // itemPouch Constants.ItemBoxStructureSize + // itemBox 0x034E3C + // unknown 42 * 250 + // investigations 0x0FB9 + // unknown Constants.EquipLoadoutsStructureSize + // equipLoadout 0x6521 + // unknown Constants.DlcTypeSize * 256 + // DLCClaimed 0x2A5D // unknown ); if (baseSaveSlotInfo.Playtime == 0) { return(null); } var monsters = new MonsterStatsInfo[captured.Length]; for (int i = 0; i < captured.Length; i++) { bool hasMini = HasMini(smallest[i], MonsterData[i]); bool hasGold = HasGold(largest[i], MonsterData[i]); bool hasSilver = hasGold ? true : HasSilver(largest[i], MonsterData[i]); monsters[i] = new MonsterStatsInfo { Name = MonsterData[i].Name, Captured = captured[i], Slayed = slayed[i], Largest = largest[i], Smallest = smallest[i], ResearchLevel = researchLevel[i], HasCrowns = MonsterData[i].CrownSize != MonsterSize.None, HasMiniCrown = hasMini, HasSilverCrown = hasSilver, HasGoldCrown = hasGold }; } return(new MonsterStatsSaveSlotInfo(baseSaveSlotInfo, monsters)); }
// Slot 0 Active @ 0x3F3D64 // Slot 1 Active @ 0x4E9E74 // Slot 2 Active @ 0x5DFF84 private MonsterStatsSaveSlotInfo ReadSaveSlot(int slotNumber) { Skip(4); // unknown SaveSlotInfoBase baseSaveSlotInfo = ReadUntilPlaytimeIncluded(slotNumber); Skip( Constants.HunterAppearanceStructureSize + // H_APPEARANCE 382 + // unknown Constants.PalicoAppearanceStructureSize // P_APPEARANCE ); // Here is struct GUILDCARD Skip( 171 + // begining of GUILDCARD struct Constants.HunterAppearanceStructureSize + // hunterAppearance (H_APPEARANCE) 212 + // unknown 64 + // Palico name 4 + // Palico rank 194 // unknown ); Skip(Constants.WeaponUsageStructureSize * 5); // Skip the remaining of the GUILDCARD structure Skip( 1 + // poseID 1 + // expressionID 1 + // backgroundID 1 + // stickerID 256 + // greeting 256 // title ); Skip( 5454 // lot of things ); ushort[] captured = ReadMonsters16(); ushort[] slayed = ReadMonsters16(); ushort[] largest = ReadMonsters16(); ushort[] smallest = ReadMonsters16(); byte[] researchLevel = ReadMonsters8(); // Skip the remaining of the saveSlot structure Skip( 2127779 + // lot of things 512 // hash things ); if (baseSaveSlotInfo.Playtime == 0) { return(null); } var monsters = new MonsterStatsInfo[MonsterData.Count]; int i = 0; foreach (MonsterBaseInfo monsterData in MonsterData.Values) { bool hasMini = HasMini(smallest[i], monsterData); bool hasGold = HasGold(largest[i], monsterData); bool hasSilver = hasGold || HasSilver(largest[i], monsterData); monsters[i] = new MonsterStatsInfo { Name = monsterData.Name, Captured = captured[i], Slayed = slayed[i], Largest = largest[i], Smallest = smallest[i], ResearchLevel = researchLevel[i], HasCrowns = monsterData.CrownSize != MonsterSize.None, HasMiniCrown = hasMini, HasSilverCrown = hasSilver, HasGoldCrown = hasGold }; i++; } return(new MonsterStatsSaveSlotInfo(baseSaveSlotInfo, monsters)); }