├── ReMastersTest ├── TestResources │ ├── Monster.pb │ ├── assetdb_shard │ └── 10259522396886124101 ├── ReMastersTest.csproj ├── GeneralTests.cs └── Properties │ ├── Resources.Designer.cs │ └── Resources.resx ├── ReMastersLib ├── Proto │ ├── Util │ │ ├── readme.md │ │ └── ProtoTableDumper.cs │ ├── EggConfig.proto │ ├── ItemConfig.proto │ ├── SalonConfig.proto │ ├── ShopConfig.proto │ ├── FieldConfig.proto │ ├── BannerConfig.proto │ ├── GrowthConfig.proto │ ├── LegendQuest.proto │ ├── RewardConfig.proto │ ├── InheritQuest.proto │ ├── DeckItemConfig.proto │ ├── Action.proto │ ├── FieldActorConfig.proto │ ├── BattleConfig.proto │ ├── TrainerAbility.proto │ ├── Schedule.proto │ ├── ScoutFilter.proto │ ├── BoxSearchStep.proto │ ├── DeckPresetGroup.proto │ ├── EggUnitHappinessConfig.proto │ ├── AbilityItem.proto │ ├── TitleCall.proto │ ├── Archive.proto │ ├── SalonPhotoCustomItem.proto │ ├── TrainerBuildupConfig.proto │ ├── EggDropWeight.proto │ ├── EggLotGroup.proto │ ├── Inherit.proto │ ├── LotteryUnitRate.proto │ ├── Potential.proto │ ├── MissionItem.proto │ ├── QuestReward.proto │ ├── DeckItemLvUp.proto │ ├── FieldTalkVoice.proto │ ├── BingoMissionCard.proto │ ├── TeamSkillGrowth.proto │ ├── EmblemItemCategory.proto │ ├── MissionRequirementCategory.proto │ ├── BGMReplace.proto │ ├── LoginBonusReward.proto │ ├── EggDrop.proto │ ├── TrainerLevelEvent.proto │ ├── LegendQuestGroupSchedule.proto │ ├── VillaItem.proto │ ├── ItemExchangeLinkage.proto │ ├── AreaSpot.proto │ ├── BingoMissionReward.proto │ ├── TreatItem.proto │ ├── BadgeItem.proto │ ├── DateFormatConfig.proto │ ├── PassiveSkillExtra.proto │ ├── TrainerLevel.proto │ ├── EggDropLimited.proto │ ├── EggUnitHappinessOffScreen.proto │ ├── EventBanner.proto │ ├── BattleReward.proto │ ├── FarmMonster.proto │ ├── BoxSearchItem.proto │ ├── LegendQuestDamageReward.proto │ ├── PackedItem.proto │ ├── TeamSkillTag.proto │ ├── DeckItemLevelExchangeRate.proto │ ├── DeckItemLvUpItem.proto │ ├── LoginBonusWelcomeBack.proto │ ├── MoveLevelUpItem.proto │ ├── SalonPresentItem.proto │ ├── VillaQuestGroup.proto │ ├── AbilityReleaseCondition.proto │ ├── Area.proto │ ├── EggUnitEvolutionCondition.proto │ ├── HomeFrequentlyGiveItemTrainerLotItem.proto │ ├── PotentialItem.proto │ ├── TeamSkill.proto │ ├── DeckItemLevelLimitExchangeRate.proto │ ├── LegendQuestGroup.proto │ ├── ItemExchangeGroup.proto │ ├── PassiveSkillElement.proto │ ├── PassiveTypeRank.proto │ ├── SalonPhotoItem.proto │ ├── BattleRewardPreset.proto │ ├── HomeFrequentlyGiveItemTrainerLotGroup.proto │ ├── OtherItem.proto │ ├── TrainerBuildupItem.proto │ ├── EggUnitHappinessParameter.proto │ ├── TeamSkillEffect.proto │ ├── ScoutEp.proto │ ├── PassiveSkillPiece.proto │ ├── FieldBuddyMonsterOffset.proto │ ├── MonsterEnhancement.proto │ ├── TrainerBuildupParameter.proto │ ├── VillaGrade.proto │ ├── MissionGroup.proto │ ├── PassiveDefaultLevel.proto │ ├── ItemCategory.proto │ ├── EventQuestGroup.proto │ ├── PotentialLot.proto │ ├── BoxSearch.proto │ ├── EventQuestListHeader002.proto │ ├── DeckItem.proto │ ├── HomeFrequentlyGiveItemTrainerLot.proto │ ├── EventExchangeItem.proto │ ├── ItemExchange.proto │ ├── StoryQuestDetail.proto │ ├── EggItem.proto │ ├── LoginBonus.proto │ ├── TeamSkillCondition.proto │ ├── AbilityPanel.proto │ ├── DeckItemParam.proto │ ├── Battle.proto │ ├── EmblemItem.proto │ ├── ScoutPickup.proto │ ├── Scout.proto │ ├── EventQuestListHeader.proto │ ├── ScoutUnitRate.proto │ ├── Ability.proto │ ├── Banner.proto │ ├── MonsterEvolution.proto │ ├── Mission.proto │ ├── TrainerBase.proto │ ├── Monster.proto │ ├── ItemSet.proto │ ├── MonsterBase.proto │ ├── MoveAndPassiveSkillDigit.proto │ ├── BingoMissionGroup.proto │ ├── VillaBonusZone.proto │ ├── BattleParameter.proto │ ├── MonsterVariation.proto │ ├── DeckPreset.proto │ ├── Move.proto │ ├── StoryQuest.proto │ ├── Trainer.proto │ ├── BattleNpcUnit.proto │ ├── Item.proto │ └── Proto │ │ ├── EggConfig.cs │ │ ├── Potential.cs │ │ └── LegendQuest.cs ├── Misc │ ├── IFileName.cs │ ├── FileLocationEntry.cs │ └── ResourceLocationEntry.cs ├── ABND │ ├── EncryptionType.cs │ ├── ABNDChunk.cs │ ├── ABNDFileEntryFlag.cs │ ├── ABNDHeader.cs │ ├── ABNDExtHeader.cs │ ├── ABNDFileEntry.cs │ └── ABND.cs ├── GameDataPaths.cs ├── Util │ ├── Util.cs │ ├── StructConverter.cs │ ├── LZ4.cs │ └── ChaCha.cs ├── ASDB │ ├── ASDBHeader.cs │ ├── ASDBExtHeader.cs │ └── ASDB.cs ├── DumpSettings.cs ├── ReMastersLib.csproj ├── LSD │ ├── LSD.cs │ └── LSDDumper.cs ├── Sound │ └── SoundFile.cs └── GameDumper.cs ├── ReMastersConsole ├── ReMastersConsole.csproj └── Program.cs ├── README.md ├── .gitattributes ├── ReMasters.sln └── .gitignore /ReMastersTest/TestResources/Monster.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwsch/ReMasters/HEAD/ReMastersTest/TestResources/Monster.pb -------------------------------------------------------------------------------- /ReMastersTest/TestResources/assetdb_shard: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwsch/ReMasters/HEAD/ReMastersTest/TestResources/assetdb_shard -------------------------------------------------------------------------------- /ReMastersLib/Proto/Util/readme.md: -------------------------------------------------------------------------------- 1 | ### Protobuf Structures 2 | 3 | Protobuf files are stored in the downloaded data, located at .\db\master\pb -------------------------------------------------------------------------------- /ReMastersTest/TestResources/10259522396886124101: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwsch/ReMasters/HEAD/ReMastersTest/TestResources/10259522396886124101 -------------------------------------------------------------------------------- /ReMastersLib/Misc/IFileName.cs: -------------------------------------------------------------------------------- 1 | namespace ReMastersLib 2 | { 3 | public interface IFileName 4 | { 5 | string FileName { get; } 6 | } 7 | } -------------------------------------------------------------------------------- /ReMastersLib/ABND/EncryptionType.cs: -------------------------------------------------------------------------------- 1 | namespace ReMastersLib 2 | { 3 | public enum EncryptionType : uint 4 | { 5 | None, 6 | ChaCha, 7 | } 8 | } -------------------------------------------------------------------------------- /ReMastersLib/ABND/ABNDChunk.cs: -------------------------------------------------------------------------------- 1 | namespace ReMastersLib 2 | { 3 | public class ABNDChunk 4 | { 5 | public uint Length; 6 | public byte[] Data; 7 | } 8 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/EggConfig.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message EggConfig { 5 | string egg_config_id = 1; 6 | int64 value = 2; 7 | } 8 | 9 | message EggConfigTable { 10 | repeated EggConfig entries = 1; 11 | } 12 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/ItemConfig.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message ItemConfig { 5 | string item_config_id = 1; 6 | int64 value = 2; 7 | } 8 | 9 | message ItemConfigTable { 10 | repeated ItemConfig entries = 1; 11 | } 12 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/SalonConfig.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message SalonConfig { 5 | string salon_config_id = 1; 6 | int64 value = 2; 7 | } 8 | 9 | message SalonConfigTable { 10 | repeated SalonConfig entries = 1; 11 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/ShopConfig.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message ShopConfig { 5 | string shop_config_id = 1; 6 | int64 value = 2; 7 | } 8 | 9 | message ShopConfigTable { 10 | repeated ShopConfig entries = 1; 11 | } 12 | -------------------------------------------------------------------------------- /ReMastersLib/ABND/ABNDFileEntryFlag.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ReMastersLib 4 | { 5 | [Flags] 6 | public enum ABNDFileEntryFlag : uint 7 | { 8 | None, 9 | Encrypted = 1 << 0, 10 | Compressed = 1 << 1 11 | } 12 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/FieldConfig.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message FieldConfig { 5 | string field_config_id = 1; 6 | int64 value = 2; 7 | } 8 | 9 | message FieldConfigTable { 10 | repeated FieldConfig entries = 1; 11 | } 12 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/BannerConfig.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message BannerConfig { 5 | string banner_config_id = 1; 6 | int64 value = 2; 7 | } 8 | 9 | message BannerConfigTable { 10 | repeated BannerConfig entries = 1; 11 | } 12 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/GrowthConfig.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message GrowthConfig { 5 | string growth_config_id = 1; 6 | int64 value = 2; 7 | } 8 | 9 | message GrowthConfigTable { 10 | repeated GrowthConfig entries = 1; 11 | } 12 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/LegendQuest.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message LegendQuest { 6 | int64 story_quest_id = 1; 7 | int64 item_id = 2; 8 | } 9 | 10 | message LegendQuestTable { 11 | repeated LegendQuest entries = 1; 12 | } 13 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/RewardConfig.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message RewardConfig { 5 | string reward_config_id = 1; 6 | int64 value = 2; 7 | } 8 | 9 | message RewardConfigTable { 10 | repeated RewardConfig entries = 1; 11 | } 12 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/InheritQuest.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message InheritQuest { 6 | int64 story_quest_id = 1; 7 | int32 max_pairs = 2; 8 | } 9 | 10 | message InheritQuestTable { 11 | repeated InheritQuest entries = 1; 12 | } 13 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/DeckItemConfig.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message DeckItemConfig { 5 | string deck_item_config_id = 1; 6 | int64 value = 2; 7 | } 8 | 9 | message DeckItemConfigTable { 10 | repeated DeckItemConfig entries = 1; 11 | } 12 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Action.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message Action { 6 | uint32 u1 = 1; 7 | uint32 u2 = 2; 8 | string u3 = 3; 9 | string u4 = 4; 10 | } 11 | 12 | message ActionTable { 13 | repeated Action entries = 1; 14 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/FieldActorConfig.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message FieldActorConfig { 5 | string actor_id = 1; 6 | string encounter_bgm_id = 2; 7 | } 8 | 9 | message FieldActorConfigTable { 10 | repeated FieldActorConfig entries = 1; 11 | } 12 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/BattleConfig.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message BattleConfig { 5 | string battle_parameter_id = 1; 6 | int64 value = 2; 7 | string coords = 3; 8 | } 9 | 10 | message BattleConfigTable { 11 | repeated BattleConfig entries = 1; 12 | } 13 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/TrainerAbility.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message TrainerAbility { 6 | int64 trainer_id = 1; // Trainer.pb 7 | int32 max_energy = 2; 8 | } 9 | 10 | message TrainerAbilityTable { 11 | repeated TrainerAbility entries = 1; 12 | } 13 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Schedule.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message Schedule { 6 | string schedule_id = 1; 7 | uint64 start_date = 2; 8 | uint64 end_date = 3; 9 | } 10 | 11 | message ScheduleTable { 12 | repeated Schedule entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/ScoutFilter.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message ScoutFilter { 6 | string scout_id = 1; // Scout.pb 7 | string u2 = 2; 8 | bool is_paid_only = 3; 9 | } 10 | 11 | message ScoutFilterTable { 12 | repeated ScoutFilter entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/BoxSearchStep.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message BoxSearchStep { 6 | int32 box_search_id = 1; // BoxSearch.pb 7 | int32 step = 2; 8 | int32 u3 = 3; 9 | } 10 | 11 | message BoxSearchStepTable { 12 | repeated BoxSearchStep entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/DeckPresetGroup.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message DeckPresetGroup { 5 | int32 deck_preset_group_id = 1; 6 | int32 deck_preset_id = 2; // DeckPreset.pb 7 | } 8 | 9 | message DeckPresetGroupTable { 10 | repeated DeckPresetGroup entries = 1; 11 | } 12 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/EggUnitHappinessConfig.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message EggUnitHappinessConfig { 6 | int32 happiness = 1; 7 | int32 nb_treats = 2; 8 | } 9 | 10 | message EggUnitHappinessConfigTable { 11 | repeated EggUnitHappinessConfig entries = 1; 12 | } 13 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/AbilityItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message AbilityItem { 6 | int64 item_id = 1; // Item.pb 7 | int64 trainer_id = 2; // Trainer.pb / 0 = Co-op Sync Orb 8 | } 9 | 10 | message AbilityItemTable { 11 | repeated AbilityItem entries = 1; 12 | } 13 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/TitleCall.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message TitleCall { 6 | string schedule_id = 1; 7 | int32 u2 = 2; 8 | string actorId = 3; 9 | string u4 = 4; 10 | } 11 | 12 | message TitleCallTable { 13 | repeated TitleCall entries = 1; 14 | } 15 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Archive.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message Archive { 6 | string name = 1; 7 | uint32 unk2 = 2; 8 | string none = 3; 9 | string lang = 4; 10 | uint32 unk5 = 5; 11 | } 12 | 13 | message ArchiveTable { 14 | repeated Archive entries = 1; 15 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/SalonPhotoCustomItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message SalonPhotoCustomItem { 5 | int32 id = 1; 6 | int32 condition = 2; 7 | int32 salon_photo_item_id = 3; 8 | } 9 | 10 | message SalonPhotoCustomItemTable { 11 | repeated SalonPhotoCustomItem entries = 1; 12 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/TrainerBuildupConfig.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message TrainerBuildupConfig { 6 | int32 trainer_buildup_config_id = 1; 7 | int32 nb_powerups = 2; 8 | } 9 | 10 | message TrainerBuildupConfigTable { 11 | repeated TrainerBuildupConfig entries = 1; 12 | } 13 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/EggDropWeight.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message EggDropWeight { 6 | int32 egg_drop_id = 1; // EggDrop.pb 7 | int64 item_id = 2; 8 | int32 rate = 3; // in % 9 | } 10 | 11 | message EggDropWeightTable { 12 | repeated EggDropWeight entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/EggLotGroup.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message EggLotGroup { 6 | int32 egg_lot_group_id = 1; 7 | int64 farm_monster_id = 2; // FarmMonster.pb 8 | int32 weight = 3; 9 | } 10 | 11 | message EggLotGroupTable { 12 | repeated EggLotGroup entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Inherit.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message Inherit { 6 | int32 quest_group_id = 1; 7 | int32 days = 2; // days before the quest are automatically reset 8 | int32 u3 = 3; 9 | } 10 | 11 | message InheritTable { 12 | repeated Inherit entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/LotteryUnitRate.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message LotteryUnitRate { 6 | string lottery_name = 1; 7 | uint64 character_id = 2; 8 | uint32 drop_rate = 3; 9 | } 10 | 11 | message LotteryUnitRateTable { 12 | repeated LotteryUnitRate entries = 1; 13 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/Potential.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message Potential { 6 | int32 potential_id = 1; // passive_skill_name_xx.lsd / passive_skill_description_xx.lsd 7 | int32 rarity = 2; 8 | } 9 | 10 | message PotentialTable { 11 | repeated Potential entries = 1; 12 | } 13 | -------------------------------------------------------------------------------- /ReMastersLib/GameDataPaths.cs: -------------------------------------------------------------------------------- 1 | namespace ReMastersLib 2 | { 3 | public class GameDataPaths 4 | { 5 | public string UnpackedAPKPath { get; set; } 6 | public string ShardPath { get; set; } 7 | public string OutputPath { get; set; } 8 | public string DownloadPath { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/MissionItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message MissionItem { 6 | uint64 item_id = 1; // Item.pb 7 | uint32 mission_group_id = 2; // MissionGroup.pb 8 | uint32 u3 = 3; 9 | } 10 | 11 | message MissionItemTable { 12 | repeated MissionItem entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/QuestReward.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message QuestReward { 6 | uint64 story_quest_id = 1; // StoryQuest.pb 7 | uint32 u2 = 2; 8 | uint64 item_set_id = 3; // ItemSet.pb 9 | } 10 | 11 | message QuestRewardTable { 12 | repeated QuestReward entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/DeckItemLvUp.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message DeckItemLvUp { 6 | int64 item_id = 1; 7 | int32 item_level = 2; 8 | int32 coin_cost = 3; 9 | int64 item_set_id = 4; 10 | } 11 | 12 | message DeckItemLvUpTable { 13 | repeated DeckItemLvUp entries = 1; 14 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/FieldTalkVoice.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message FieldTalkVoice { 6 | string field_talk_voice_id = 1; 7 | string u2 = 2; 8 | string u3 = 3; 9 | bool u4 = 4; 10 | } 11 | 12 | message FieldTalkVoiceTable { 13 | repeated FieldTalkVoice entries = 1; 14 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/BingoMissionCard.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message BingoMissionCard { 6 | int32 bingo_mission_card_id = 1; 7 | int32 number = 2; 8 | int32 mission_id = 3; // Mission.pb 9 | } 10 | 11 | message BingoMissionCardTable { 12 | repeated BingoMissionCard entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/TeamSkillGrowth.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message TeamSkillGrowth { 6 | uint64 team_Skill_Growth_Id = 1; 7 | int32 team_Skill_Level = 2; 8 | int32 team_Skill_Stat_Growth = 3; 9 | } 10 | 11 | message TeamSkillGrowthTable { 12 | repeated TeamSkillGrowth entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/EmblemItemCategory.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message EmblemItemCategory { 6 | int32 category = 1; 7 | repeated int64 sub_categories = 2; // bardge_item_minor_category_xx.lsd 8 | } 9 | 10 | message EmblemItemCategoryTable { 11 | repeated EmblemItemCategory entries = 1; 12 | } 13 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/MissionRequirementCategory.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message MissionRequirementCategory { 6 | int32 requirement_id = 1; 7 | int32 u2 = 2; 8 | int32 u3 = 3; 9 | } 10 | 11 | message MissionRequirementCategoryTable { 12 | repeated MissionRequirementCategory entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/BGMReplace.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message BGMReplace { 6 | uint32 bgm_replace_id = 1; 7 | string bgm_id_old = 2; 8 | string bgm_id_new = 3; 9 | string schedule_id = 4; // Schedule.pb 10 | } 11 | 12 | message BGMReplaceTable { 13 | repeated BGMReplace entries = 1; 14 | } 15 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/LoginBonusReward.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message LoginBonusReward { 6 | string reward_id = 1; 7 | int32 day = 2; 8 | uint64 item_set_id = 3; // ItemSet.pb 9 | uint32 u4 = 4; 10 | } 11 | 12 | message LoginBonusRewardTable { 13 | repeated LoginBonusReward entries = 1; 14 | } 15 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/EggDrop.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message EggDrop { 6 | int32 egg_drop_id = 1; 7 | int32 rate = 2; // per 1000 8 | int64 u3 = 3; // same as egg_drop_id 9 | int32 u4 = 4; 10 | bool is_regular = 5; 11 | } 12 | 13 | message EggDropTable { 14 | repeated EggDrop entries = 1; 15 | } 16 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/TrainerLevelEvent.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message TrainerLevelEvent { 6 | uint32 level = 1; 7 | uint64 quest = 2; 8 | uint32 exp = 3; 9 | uint32 u4 = 4; 10 | uint64 quest2 = 5; 11 | } 12 | 13 | message TrainerLevelEventTable { 14 | repeated TrainerLevelEvent entries = 1; 15 | } -------------------------------------------------------------------------------- /ReMastersConsole/ReMastersConsole.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/LegendQuestGroupSchedule.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message LegendQuestGroupSchedule { 6 | int32 quest_group_id = 1; // LegendQuestGroup.pb 7 | string schedule_id = 2; // Schedule.pb 8 | } 9 | 10 | message LegendQuestGroupScheduleTable { 11 | repeated LegendQuestGroupSchedule entries = 1; 12 | } 13 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/VillaItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message VillaItem { 6 | int64 item_id = 1; // Item.pb 7 | int64 u2 = 2; // same as item_id 8 | string image_id = 3; // ui/image/Item 9 | int32 rarity = 4; 10 | int32 u5 = 5; 11 | } 12 | 13 | message VillaItemTable { 14 | repeated VillaItem entries = 1; 15 | } 16 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/ItemExchangeLinkage.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message ItemExchangeLinkage { 6 | int32 item_exchange_group_id = 1; // ItemExchangeGroup.pb 7 | int32 quest_group_id = 2; // EventQuestGroup.pb (and more?) 8 | } 9 | 10 | message ItemExchangeLinkageTable { 11 | repeated ItemExchangeLinkage entries = 1; 12 | } 13 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/AreaSpot.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message AreaSpot { 6 | uint32 u1 = 1; 7 | uint32 u2 = 2; 8 | string name = 3; 9 | string u4 = 4; 10 | string u5 = 5; 11 | string tex_big = 6; 12 | string tex_small = 7; 13 | } 14 | 15 | message AreaSpotTable { 16 | repeated AreaSpot entries = 1; 17 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/BingoMissionReward.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message BingoMissionReward { 6 | int32 bingo_mission_reward_id = 1; 7 | int32 nb_lines = 2; // 0 = bingo blackout 8 | int64 item_set_id = 3; // ItemSet.pb 9 | } 10 | 11 | message BingoMissionRewardTable { 12 | repeated BingoMissionReward entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/TreatItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message TreatItem { 6 | int64 item_id = 1; // Item.pb 7 | int32 affinity = 2; // EggUnitHappinessConfig.pb 8 | string image_id = 3; // ui/image/Item 9 | int32 u4 = 4; 10 | int32 u5 = 5; 11 | } 12 | 13 | message TreatItemTable { 14 | repeated TreatItem entries = 1; 15 | } 16 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/BadgeItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message BadgeItem { 6 | uint64 badge_item_id = 1; // bardge_item_name_xx.lsd 7 | uint32 badge_number = 2; 8 | string badge_name = 3; 9 | uint32 trainer_base_id = 4; // TrainerBase.pb 10 | } 11 | 12 | message BadgeItemTable { 13 | repeated BadgeItem entries = 1; 14 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/DateFormatConfig.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message DateFormatConfig { 5 | string language = 1; 6 | int32 type = 2; // 1: Date, 2: Date and Time 7 | string format = 3; 8 | string am_format = 4; 9 | string pm_format = 5; 10 | } 11 | 12 | message DateFormatConfigTable { 13 | repeated DateFormatConfig entries = 1; 14 | } 15 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/PassiveSkillExtra.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message PassiveSkillExtra { 6 | int32 passive_id = 1; // passive_skill_name_xx.lsd / passive_skill_description_xx.lsd 7 | int32 u2 = 2; 8 | int32 u3 = 3; 9 | int32 type = 4; 10 | } 11 | 12 | message PassiveSkillExtraTable { 13 | repeated PassiveSkillExtra entries = 1; 14 | } 15 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/TrainerLevel.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message TrainerLevel { 6 | uint32 level = 1; 7 | uint32 u2 = 2; 8 | uint32 u3 = 3; 9 | uint32 u4 = 4; 10 | uint32 u5 = 5; 11 | uint32 u6 = 6; 12 | uint32 u7 = 7; 13 | } 14 | 15 | message TrainerLevelTable { 16 | repeated TrainerLevel entries = 1; 17 | } 18 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/EggDropLimited.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message EggDropLimited { 6 | int32 egg_drop_id = 1; // EggDrop.pb 7 | string schedule_id = 2; // Schedule.pb 8 | int32 u3 = 3; 9 | int32 u4 = 4; 10 | int32 u5 = 5; 11 | int32 u6 = 6; 12 | } 13 | 14 | message EggDropLimitedTable { 15 | repeated EggDropLimited entries = 1; 16 | } 17 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/EggUnitHappinessOffScreen.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message EggUnitHappinessOffScreen { 6 | string actor_id = 1; 7 | int32 u2 = 2; 8 | int32 u3 = 3; 9 | int32 u4 = 4; 10 | int32 u5 = 5; 11 | int32 u6 = 6; 12 | } 13 | 14 | message EggUnitHappinessOffScreenTable { 15 | repeated EggUnitHappinessOffScreen entries = 1; 16 | } 17 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/EventBanner.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message EventBanner { 6 | string event_banner_id = 1; 7 | int32 u2 = 2; 8 | int32 u3 = 3; 9 | string schedule_id = 4; // Schedule.pb 10 | string u5 = 5; 11 | int32 banner_id = 6; // Banner.pb 12 | } 13 | 14 | message EventBannerTable { 15 | repeated EventBanner entries = 1; 16 | } 17 | -------------------------------------------------------------------------------- /ReMastersLib/Util/Util.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ReMastersLib 4 | { 5 | public static class Util 6 | { 7 | public static byte[] GetSlice(byte[] src, int offset, int length) 8 | { 9 | byte[] data = new byte[length]; 10 | Buffer.BlockCopy(src, offset, data, 0, data.Length); 11 | return data; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/BattleReward.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message BattleReward { 6 | int32 battle_reward_id = 1; 7 | int32 exp = 2; 8 | int32 coins = 3; 9 | int32 u4 = 4; 10 | repeated int32 reward_preset_ids = 5; // BattleRewardPreset.pb 11 | } 12 | 13 | message BattleRewardTable { 14 | repeated BattleReward entries = 1; 15 | } 16 | -------------------------------------------------------------------------------- /ReMastersLib/ABND/ABNDHeader.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace ReMastersLib 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct ABNDHeader 7 | { 8 | public const int SIZE = 0x10; 9 | 10 | public uint Magic; 11 | public uint Version; 12 | public int ExtHeaderOffset; 13 | public int ExtHeaderSize; 14 | } 15 | } -------------------------------------------------------------------------------- /ReMastersLib/ASDB/ASDBHeader.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace ReMastersLib 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct ASDBHeader 7 | { 8 | public const int SIZE = 0x10; 9 | 10 | public uint Magic; 11 | public uint Version; 12 | public int ExtHeaderOffset; 13 | public int ExtHeaderSize; 14 | } 15 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/FarmMonster.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message FarmMonster { 6 | int64 farm_monster_id = 1; 7 | int64 trainer_id = 2; // Trainer.pb 8 | int32 nb_passives = 3; 9 | bool is_shiny = 4; 10 | int64 u5 = 5; // same as trainer_id ? 11 | int32 u6 = 6; 12 | } 13 | 14 | message FarmMonsterTable { 15 | repeated FarmMonster entries = 1; 16 | } 17 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/BoxSearchItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message BoxSearchItem { 6 | int32 box_search_id = 1; // BoxSearch.pb 7 | int32 step = 2; 8 | int64 order = 3; 9 | bool is_grand_prize = 4; 10 | int64 item_set_id = 5; // ItemSet.pb 11 | int32 quantity = 6; 12 | } 13 | 14 | message BoxSearchItemTable { 15 | repeated BoxSearchItem entries = 1; 16 | } 17 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/LegendQuestDamageReward.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message LegendQuestDamageReward { 6 | int64 story_quest_id = 1; 7 | int32 gauge = 2; 8 | int32 percentage = 3; 9 | int64 item_set_id_first = 4; 10 | int64 item_set_id_general = 5; 11 | } 12 | 13 | message LegendQuestDamageRewardTable { 14 | repeated LegendQuestDamageReward entries = 1; 15 | } 16 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/PackedItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message PackedItem { 6 | int32 packed_item_name_id = 1; // packed_item_name_xx.lsd 7 | int32 u2 = 2; 8 | string image_id = 3; // ui/image/Item 9 | int32 item_set_id = 4; // ItemSet.pb 10 | } 11 | 12 | message PackedItemTable { 13 | repeated PackedItem entries = 1; 14 | } 15 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/TeamSkillTag.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message TeamSkillTag { 6 | uint64 team_skill_tag_id = 1; // team_skill_tag 7 | int32 team_skill_tag_type = 2; // motif_type_name_xx.lsd 8 | int32 u3 = 3; 9 | int32 u4 = 4; 10 | string schedule_id = 5; 11 | } 12 | 13 | message TeamSkillTagTable { 14 | repeated TeamSkillTag entries = 1; 15 | } 16 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/DeckItemLevelExchangeRate.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message DeckItemLevelExchangeRate { 6 | int64 u1 = 1; 7 | int64 u2 = 2; 8 | int64 u3 = 3; 9 | int64 u4 = 4; 10 | int64 u5 = 5; 11 | int64 item_set_id = 6; 12 | } 13 | 14 | message DeckItemLevelExchangeRateTable { 15 | repeated DeckItemLevelExchangeRate entries = 1; 16 | } 17 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/DeckItemLvUpItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message DeckItemLvUpItem { 6 | int64 item_id = 1; 7 | int32 item_subCategory = 2; 8 | string item_image_name = 3; 9 | int32 item_frame = 4; 10 | int32 item_type = 5; // motif_type_name_en.lsd 11 | } 12 | 13 | message DeckItemLvUpItemTable { 14 | repeated DeckItemLvUpItem entries = 1; 15 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/LoginBonusWelcomeBack.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message LoginBonusWelcomeBack { 6 | string login_bonus_id = 1; // LoginBonus.pb 7 | string schedule_id = 2; // Schedule.pb 8 | uint32 u3 = 3; 9 | uint64 item_set_id = 4; // ItemSet.pb 10 | } 11 | 12 | message LoginBonusWelcomeBackTable { 13 | repeated LoginBonusWelcomeBack entries = 1; 14 | } 15 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/MoveLevelUpItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message MoveLevelUpItem { 6 | int64 item_id = 1; // Item.pb 7 | string image_id = 2; // ui/image/Item 8 | int32 stars = 3; 9 | int32 type = 4; // 1: Non-Egg, 2: Role Specific, 3: Egg 10 | int32 role = 5; 11 | } 12 | 13 | message MoveLevelUpItemTable { 14 | repeated MoveLevelUpItem entries = 1; 15 | } 16 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/SalonPresentItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message SalonPresentItem { 5 | int32 salon_present_item_id = 1; 6 | int32 salon_guest_id = 2; 7 | int32 u3 = 3; 8 | string image_id = 4; 9 | int32 u5 = 5; 10 | int32 item_frame_id = 6; 11 | repeated int32 u7 = 7; 12 | } 13 | 14 | message SalonPresentItemTable { 15 | repeated SalonPresentItem entries = 1; 16 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/VillaQuestGroup.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message VillaQuestGroup { 6 | int64 quest_group_id = 1; 7 | string schedule_id = 2; // Schedule.pb 8 | string u3 = 3; 9 | int64 item_set_id = 4; // ItemSet.pb / Items given at the start of a villa challenge 10 | } 11 | 12 | message VillaQuestGroupTable { 13 | repeated VillaQuestGroup entries = 1; 14 | } 15 | -------------------------------------------------------------------------------- /ReMastersLib/ASDB/ASDBExtHeader.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace ReMastersLib 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct ASDBExtHeader 7 | { 8 | public const int SIZE = 0x10; 9 | 10 | public int EntryCount; 11 | public int EntrySize; 12 | public int EntryStart; 13 | public EncryptionType EncryptionType; 14 | } 15 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/AbilityReleaseCondition.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message AbilityReleaseCondition { 6 | int32 condition_id = 1; 7 | int32 type = 2; // ability_release_condition_xx.lsd 8 | int32 parameter = 3; // required # of tiles, sync move level... 9 | } 10 | 11 | message AbilityReleaseConditionTable { 12 | repeated AbilityReleaseCondition entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Area.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message Area { 6 | uint64 unk1 = 1; 7 | uint64 unk2 = 2; 8 | string name = 3; 9 | string desc = 4; 10 | string icon = 5; 11 | string position = 6; 12 | string button = 7; 13 | string effect = 8; 14 | string lbdat = 9; 15 | } 16 | 17 | message AreaTable { 18 | repeated Area entries = 1; 19 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/EggUnitEvolutionCondition.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message EggUnitEvolutionCondition { 6 | int64 monster_evolution_id = 1; // MonsterEvolution.pb 7 | int32 level = 2; 8 | int64 item_set_id = 3; // Required evolution items / ItemSet.pb 9 | } 10 | 11 | message EggUnitEvolutionConditionTable { 12 | repeated EggUnitEvolutionCondition entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/HomeFrequentlyGiveItemTrainerLotItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message HomeFrequentlyGiveItemTrainerLotItem { 6 | int32 item_lot_item_id = 1; 7 | int64 item_set_id = 2; // ItemSet.pb 8 | int32 rate = 3; // in % 9 | } 10 | 11 | message HomeFrequentlyGiveItemTrainerLotItemTable { 12 | repeated HomeFrequentlyGiveItemTrainerLotItem entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/PotentialItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message PotentialItem { 6 | int64 item_id = 1; // Item.pb 7 | int64 u2 = 2; // same as item_id 8 | string image_id = 3; // ui/image/Item 9 | int32 rarity = 4; 10 | int32 potential_lot_id = 5; // PotentialLot.pb 11 | } 12 | 13 | message PotentialItemTable { 14 | repeated PotentialItem entries = 1; 15 | } 16 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/TeamSkill.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message TeamSkill { 6 | uint64 team_skill_id = 1; // team_skill_name 7 | int32 team_skill_prop_num = 2; // 1 - team_skill_tag, 2 - team_skill_condition, 3 - team_skill_effect 8 | int32 team_skill_prop_value = 3; // based on above 9 | } 10 | 11 | message TeamSkillTable { 12 | repeated TeamSkill entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/DeckItemLevelLimitExchangeRate.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message DeckItemLevelLimitExchangeRate { 6 | int64 u1 = 1; 7 | int64 u2 = 2; 8 | int64 u3 = 3; 9 | int64 u4 = 4; 10 | int64 u5 = 5; 11 | int64 item_set_id = 6; 12 | } 13 | 14 | message DeckItemLevelLimitExchangeRateTable { 15 | repeated DeckItemLevelLimitExchangeRate entries = 1; 16 | } 17 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/LegendQuestGroup.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message LegendQuestGroup { 6 | int64 quest_group_id = 1; 7 | int32 banner_id = 2; 8 | int32 u3 = 3; 9 | string u4 = 4; 10 | string u5 = 5; 11 | string bgm_id = 6; 12 | int64 item_id = 7; 13 | repeated int32 mission_ids = 8; 14 | } 15 | 16 | message LegendQuestGroupTable { 17 | repeated LegendQuestGroup entries = 1; 18 | } 19 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/ItemExchangeGroup.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message ItemExchangeGroup { 6 | int32 item_exchange_group_id = 1; 7 | int32 u2 = 2; // boolean? 8 | string schedule_id = 3; // Schedule.pb 9 | int32 banner_id = 4; // Banner.pb 10 | int32 u5 = 5; // EventQuestGroup.pb ? 11 | } 12 | 13 | message ItemExchangeGroupTable { 14 | repeated ItemExchangeGroup entries = 1; 15 | } 16 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/PassiveSkillElement.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message PassiveSkillElement { 6 | int32 passive_id = 1; // passive_skill_name_xx.lsd / passive_skill_description_xx.lsd 7 | int32 u2 = 2; 8 | int32 u4 = 4; 9 | int32 u5 = 5; 10 | int32 u6 = 6; 11 | int32 u7 = 7; 12 | int32 u8 = 8; 13 | } 14 | 15 | message PassiveSkillElementTable { 16 | repeated PassiveSkillElement entries = 1; 17 | } 18 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/PassiveTypeRank.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message PassiveTypeRank { 6 | int32 u1 = 1; 7 | int32 u2 = 2; 8 | int32 passive_1_id = 3; // passive_skill_name_xx.lsd / passive_skill_description_xx.lsd 9 | int32 passive_2_id = 4; 10 | int32 passive_3_id = 5; 11 | int32 passive_4_id = 6; 12 | } 13 | 14 | message PassiveTypeRankTable { 15 | repeated PassiveTypeRank entries = 1; 16 | } 17 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/SalonPhotoItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message SalonPhotoItem { 5 | int32 salon_photo_item_id = 1; 6 | int64 trainer_id = 2; 7 | int32 photo_type = 3; 8 | int32 item_frame_id = 4; 9 | int32 u5 = 5; 10 | int32 u6 = 6; 11 | string image_id = 7; 12 | string schedule_id = 8; 13 | uint64 u9 = 9; 14 | } 15 | 16 | message SalonPhotoItemTable { 17 | repeated SalonPhotoItem entries = 1; 18 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/BattleRewardPreset.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message BattleRewardPreset { 6 | int32 reward_preset_id = 1; 7 | int32 u2 = 2; 8 | int32 rate = 3; 9 | repeated int64 item_ids = 4; 10 | repeated int32 amounts = 5; 11 | repeated int32 item_rates = 6; 12 | int32 u7 = 7; 13 | } 14 | 15 | message BattleRewardPresetTable { 16 | repeated BattleRewardPreset entries = 1; 17 | } 18 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/HomeFrequentlyGiveItemTrainerLotGroup.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message HomeFrequentlyGiveItemTrainerLotGroup { 6 | int32 item_lot_group_id = 1; 7 | int32 repeat_time = 2; // in seconds 8 | repeated string conditions = 3; // the last one is a schedule_id 9 | } 10 | 11 | message HomeFrequentlyGiveItemTrainerLotGroupTable { 12 | repeated HomeFrequentlyGiveItemTrainerLotGroup entries = 1; 13 | } 14 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/OtherItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message OtherItem { 6 | int64 other_item_name_id = 1; // other_item_name_xx.lsd 7 | int32 other_item_description_id = 2; // other_item_description_xx.lsd 8 | string image_id = 3; // ui/image/Item 9 | int32 u4 = 4; 10 | int32 u5 = 5; 11 | } 12 | 13 | message OtherItemTable { 14 | repeated OtherItem entries = 1; 15 | } 16 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/TrainerBuildupItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message TrainerBuildupItem { 6 | int64 item_id = 1; // Item.pb 7 | int32 trainer_buildup_config_id = 2; // TrainerBuildupConfig.pb 8 | string schedule_id = 3; // Schedule.pb 9 | string u4 = 4; 10 | int64 trainer_id = 5; // Trainer.pb 11 | } 12 | 13 | message TrainerBuildupItemTable { 14 | repeated TrainerBuildupItem entries = 1; 15 | } 16 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/EggUnitHappinessParameter.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message EggUnitHappinessParameter { 6 | int64 trainer_id = 1; 7 | int32 happiness = 2; // EggUnitHappinessConfig.pb 8 | int32 hp = 3; 9 | int32 atk = 4; 10 | int32 def = 5; 11 | int32 spa = 6; 12 | int32 spd = 7; 13 | int32 spe = 8; 14 | } 15 | 16 | message EggUnitHappinessParameterTable { 17 | repeated EggUnitHappinessParameter entries = 1; 18 | } 19 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/TeamSkillEffect.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message TeamSkillEffect { 6 | uint64 team_skill_effect_id = 1; // team_skill_effect 7 | int32 team_skill_id = 2; // team_skill_name 8 | int32 u3 = 3; 9 | int32 team_skill_growth_id = 4; 10 | int32 u5 = 5; 11 | int32 u6 = 6; 12 | int32 u7 = 7; 13 | int32 u8 = 8; 14 | } 15 | 16 | message TeamSkillEffectTable { 17 | repeated TeamSkillEffect entries = 1; 18 | } 19 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/ScoutEp.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message ScoutEp { 6 | string scout_ep_id = 1; 7 | string scout_id = 2; 8 | int32 u3 = 3; 9 | string text_id = 4; // shop_xx.lsd 10 | int32 gem_type = 5; // 1: Non paid, 2: Paid 11 | int32 cost = 6; 12 | int32 scout_quantity = 7; 13 | int32 u8 = 8; 14 | int64 item_set_id = 9; // ItemSet.pb 15 | } 16 | 17 | message ScoutEpTable { 18 | repeated ScoutEp entries = 1; 19 | } 20 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/PassiveSkillPiece.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message PassiveSkillPiece { 6 | int32 passive_id = 1; // passive_skill_name_xx.lsd / passive_skill_description_xx.lsd 7 | int32 u2 = 2; 8 | int32 u4 = 4; 9 | int32 u5 = 5; 10 | int32 u6 = 6; 11 | int32 u7 = 7; 12 | int32 u8 = 8; 13 | int32 u9 = 9; 14 | int32 u10 = 10; 15 | } 16 | 17 | message PassiveSkillPieceTable { 18 | repeated PassiveSkillPiece entries = 1; 19 | } 20 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/FieldBuddyMonsterOffset.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message FieldBuddyMonsterOffset { 6 | string trainer = 1; 7 | string monster = 2; 8 | uint32 unk3 = 3; 9 | int32 unk4 = 4; 10 | uint32 unk5 = 5; 11 | int32 unk6 = 6; 12 | int32 unk7 = 7; 13 | string number = 8; 14 | string empty = 9; 15 | } 16 | 17 | message FieldBuddyMonsterOffsetTable { 18 | repeated FieldBuddyMonsterOffset entries = 1; 19 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/MonsterEnhancement.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message MonsterEnhancement { 6 | uint64 monster_enhancement_id = 1; 7 | uint64 trainer_id = 2; 8 | uint64 monster_id_current = 3; 9 | uint64 monster_id_next = 4; 10 | string schedule_id = 5; // Schedule.pb 11 | string type = 6; // monster_enhancement_description_xx.lsd 12 | } 13 | 14 | message MonsterEnhancementTable { 15 | repeated MonsterEnhancement entries = 1; 16 | } 17 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/TrainerBuildupParameter.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message TrainerBuildupParameter { 6 | int64 trainer_id = 1; // Trainer.pb 7 | int32 trainer_buildup_config_id = 2; // TrainerBuildupConfig.pb 8 | int32 hp = 3; 9 | int32 atk = 4; 10 | int32 def = 5; 11 | int32 spa = 6; 12 | int32 spd = 7; 13 | int32 spe = 8; 14 | } 15 | 16 | message TrainerBuildupParameterTable { 17 | repeated TrainerBuildupParameter entries = 1; 18 | } 19 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/VillaGrade.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message VillaGrade { 6 | int64 quest_group_id = 1; // VillaQuestGroup.pb 7 | int32 hall = 2; 8 | int64 story_quest_id = 3; // StoryQuest.pb / StoryQuestDetail.pb 9 | int64 milestone_item_set_id = 4; // ItemSet.pb 10 | int64 villa_bonus_zone_id = 5; // VillaBonusZone.pb 11 | bool is_milestone = 6; 12 | } 13 | 14 | message VillaGradeTable { 15 | repeated VillaGrade entries = 1; 16 | } 17 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/MissionGroup.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message MissionGroup { 6 | int32 mission_group_id = 1; 7 | string schedule_id = 2; // Schedule.pb 8 | int32 u3 = 3; 9 | int32 u4 = 4; 10 | int32 u5 = 5; 11 | int32 u6 = 6; 12 | int64 item_set_id = 7; // ItemSet.pb 13 | int32 banner_id = 8; // Banner.pb 14 | int32 u9 = 9; 15 | int32 u10 = 10; 16 | } 17 | 18 | message MissionGroupTable { 19 | repeated MissionGroup entries = 1; 20 | } 21 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/PassiveDefaultLevel.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message PassiveDefaultLevel { 6 | int32 u1 = 1; 7 | int32 u2 = 2; 8 | int32 u3 = 3; 9 | int32 u4 = 4; 10 | int32 u5 = 5; 11 | int32 u6 = 6; 12 | int32 u7 = 7; 13 | int32 u8 = 8; 14 | int32 u9 = 9; 15 | int32 u10 = 10; 16 | int32 u11 = 11; 17 | int32 u12 = 12; 18 | int32 u13 = 13; 19 | } 20 | 21 | message PassiveDefaultLevelTable { 22 | repeated PassiveDefaultLevel entries = 1; 23 | } 24 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/ItemCategory.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message ItemCategory { 6 | uint32 item_category_id = 1; // item_category_name_xx.lsd 7 | repeated uint32 subcategories = 2; // Item.pb (sub_category) 8 | /* 9 | item_category_id = 1: 10 | 51 : breakthrough_item_name_xx.lsd 11 | 52 : training_item_name_de.lsd 12 | item_category_id = 2: 13 | ... 14 | */ 15 | } 16 | 17 | message ItemCategoryTable { 18 | repeated ItemCategory entries = 1; 19 | } 20 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/EventQuestGroup.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message EventQuestGroup { 6 | int64 quest_group_id = 1; 7 | string u2 = 2; 8 | int32 banner_id = 3; // Banner.pb 9 | int32 u4 = 4; 10 | string schedule_id = 5; // Schedule.pb 11 | int32 u6 = 6; // boolean? 12 | string u7 = 7; 13 | int32 u8 = 8; 14 | string bgm_id = 9; 15 | int32 u10 = 10; // boolean? 16 | } 17 | 18 | message EventQuestGroupTable { 19 | repeated EventQuestGroup entries = 1; 20 | } 21 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/PotentialLot.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message PotentialLot { 6 | int32 potential_lot_id = 1; 7 | int32 potential_id = 2; // Potential.pb / passive_skill_name_xx.lsd / passive_skill_description_xx.lsd 8 | int32 rate = 3; 9 | /* 10 | Not a percentage! doing a sum of all messages with the same 11 | potential_lot_id is needed to obtain the actual percentage 12 | */ 13 | } 14 | 15 | message PotentialLotTable { 16 | repeated PotentialLot entries = 1; 17 | } 18 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/BoxSearch.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message BoxSearch { 6 | int32 box_search_id = 1; // BoxSearch.pb 7 | string schedule_id = 2; // Schedule.pb 8 | int64 item_id = 3; // EventExchangeItem.pb 9 | int32 banner_id = 4; // Banner.pb 10 | string u5 = 5; 11 | string text_id = 6; // box_scout_description_xx.lsd 12 | int32 u7 = 7; // number of scouted items? 13 | int32 u8 = 8; 14 | } 15 | 16 | message BoxSearchTable { 17 | repeated BoxSearch entries = 1; 18 | } 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ReMasters 2 | Reverse Engineering of Pokémon Masters 3 | 4 | ![License](https://img.shields.io/badge/License-GPLv3-blue.svg) 5 | 6 | ### Usage: 7 | 8 | In `Program.cs`: 9 | - Change the path variables to point to your unpacked & downloaded files. 10 | - Specify the output path. 11 | 12 | When the Console project is run the program will decrypt, decompress, and export as much content as possible. 13 | 14 | ### Credits: 15 | 16 | By [SciresM](https://github.com/SciresM/) & [Kaphotics](https://github.com/kwsch/) 17 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/EventQuestListHeader002.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message EventQuestListHeader002 { 6 | int32 quest_group_id = 1; // EventQuestGroup.pb 7 | int32 box_search_id = 2; // BoxSearch.pb 8 | int32 title_text_id = 3; // event_legend_header_title_xx.lsd 9 | int32 desc_text_id = 4; // event_legend_header_description_xx.lsd 10 | string image_id = 5; // ui/image/Event/Legend 11 | } 12 | 13 | message EventQuestListHeader002Table { 14 | repeated EventQuestListHeader002 entries = 1; 15 | } 16 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/DeckItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message DeckItem { 6 | uint64 item_id = 1; 7 | int32 item_subtype_id = 2; 8 | string image_id = 3; 9 | EquipmentTypes equipment_type = 4; 10 | int32 u5 = 5; 11 | int32 Type = 6; 12 | int32 rarity = 7; 13 | int32 deckItemParam_id = 8; 14 | int32 u9 = 9; 15 | } 16 | 17 | enum EquipmentTypes { 18 | Other = 0; 19 | Bracelet= 1; 20 | Bandana = 2; 21 | Pin = 3; 22 | } 23 | 24 | message DeckItemTable { 25 | repeated DeckItem entries = 1; 26 | } 27 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/HomeFrequentlyGiveItemTrainerLot.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message HomeFrequentlyGiveItemTrainerLot { 6 | int32 item_lot_id = 1; 7 | int32 item_lot_group_id = 2; // HomeFrequentlyGiveItemTrainerLotGroup.pb 8 | int64 trainer_id = 3; // Trainer.pb 9 | int32 u4 = 4; 10 | string lua_path = 5; 11 | int32 item_lot_item_id = 6; // HomeFrequentlyGiveItemTrainerLotItem.pb 12 | } 13 | 14 | message HomeFrequentlyGiveItemTrainerLotTable { 15 | repeated HomeFrequentlyGiveItemTrainerLot entries = 1; 16 | } 17 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/EventExchangeItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message EventExchangeItem { 6 | int64 item_id = 1; // Item.pb / event_item_name_xx.lsd 7 | int32 description_id = 2; // event_item_description_xx.lsd 8 | string image_id = 3; // ui/image/Item 9 | int32 u4 = 4; // Type? 10 | int64 story_quest_id = 5; // StoryQuest.pb 11 | int64 trainer_id = 6; // Trainer.pb 12 | string schedule_id = 7; // Schedule.pb 13 | } 14 | 15 | message EventExchangeItemTable { 16 | repeated EventExchangeItem entries = 1; 17 | } 18 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/ItemExchange.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message ItemExchange { 6 | int32 item_exchange_id = 1; 7 | int32 item_exchange_group_id = 2; // ItemExchangeGroup.pb 8 | int64 item_set_id = 3; // ItemSet.pb 9 | int64 item_id = 4; // Item.pb 10 | int32 quantity = 5; 11 | string schedule_id = 6; // Schedule.pb 12 | int32 limit = 7; 13 | int32 u8 = 8; 14 | int32 u9 = 9; 15 | int32 u10 = 10; 16 | int64 u11 = 11; 17 | } 18 | 19 | message ItemExchangeTable { 20 | repeated ItemExchange entries = 1; 21 | } 22 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/StoryQuestDetail.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message StoryQuestDetail { 6 | uint64 story_quest_id = 1; // StoryQuest.pb 7 | repeated int32 weak_types = 2; // motif_type_name_xx.lsd 8 | Subtype quest_subtype = 3; 9 | repeated uint64 battle_ids = 4; 10 | repeated int64 u5 = 5; 11 | string background = 6; 12 | } 13 | 14 | enum Subtype { 15 | Story = 0; 16 | Other = 1; 17 | Battle = 2; 18 | } 19 | 20 | message StoryQuestDetailTable { 21 | repeated StoryQuestDetail entries = 1; 22 | } 23 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/EggItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message EggItem { 6 | int64 item_id = 1; 7 | int32 text_id = 2; // egg_item_description_xx.lsd 8 | string image_id = 3; // ui/image/Item 9 | int32 rarity = 4; // egg_item_name_xx.lsd 10 | int32 u5 = 5; // type? 11 | int32 u6 = 6; // u5 = 0: not present, u5 = 1: 12, u5 = 2: FarmMonster.pb 12 | int32 egg_lot_group_id = 7; // EggLotGroup.pb 13 | int32 time = 8; // in seconds 14 | } 15 | 16 | message EggItemTable { 17 | repeated EggItem entries = 1; 18 | } 19 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/LoginBonus.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message LoginBonus { 6 | string login_bonus_id = 1; 7 | string reward_id = 2; // LoginBonusReward.pb 8 | uint32 type = 3; 9 | /* 10 | 0 = General Log-In Bonus 11 | 1 = Other Login Bonuses 12 | 2 = Compensation 13 | */ 14 | string login_bonus_name_id = 4; // login_bonus_name_xx.lsd 15 | int32 banner_id = 5; // Banner.pb 16 | uint32 start_date = 6; 17 | uint32 end_date = 7; 18 | } 19 | 20 | message LoginBonusTable { 21 | repeated LoginBonus entries = 1; 22 | } 23 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/TeamSkillCondition.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message TeamSkillCondition { 6 | uint64 team_skill_condition_id = 1; // team_skill_condition 7 | int32 team_skill_id = 2; // team_skill_name 8 | int32 team_skill_min_pairs_req = 3; // currently 2 needed 9 | int32 u4 = 4; 10 | int32 u5 = 5; 11 | int32 u6 = 6; 12 | int32 u7 = 7; 13 | int32 u8 = 8; 14 | int32 u9 = 9; 15 | int32 u10 = 10; 16 | int32 u11 = 11; 17 | } 18 | 19 | message TeamSkillConditionTable { 20 | repeated TeamSkillCondition entries = 1; 21 | } 22 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/AbilityPanel.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message AbilityPanel { 6 | int32 cell_id = 1; 7 | int64 trainer_id = 2; // Trainer.pb 8 | int32 energy_cost = 3; 9 | int32 orb_cost = 4; 10 | 11 | // Hex grid coordinates 12 | int32 x = 5; 13 | int32 y = 6; 14 | int32 z = 7; 15 | 16 | int64 ability_id = 8; // Ability.pb 17 | repeated int32 condition_ids = 9; // AbilityReleaseCondition.pb 18 | string schedule_id = 10; // Schedule.pb 19 | } 20 | 21 | message AbilityPanelTable { 22 | repeated AbilityPanel entries = 1; 23 | } 24 | -------------------------------------------------------------------------------- /ReMastersLib/Misc/FileLocationEntry.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace ReMastersLib 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct FileLocationEntry : IFileName 7 | { 8 | public const int SIZE = 0x10; 9 | 10 | /// 11 | /// u64 file hash name? 12 | /// 13 | public ulong ResourceID; 14 | 15 | /// 16 | /// Container Name the asset is in 17 | /// 18 | public ulong FileID; 19 | 20 | public string FileName => ResourceID.ToString(); 21 | } 22 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/DeckItemParam.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message DeckItemParam { 6 | uint64 deckItemParam_id = 1; 7 | BoostStat Boost = 2; 8 | int32 Lv1_boost = 3; 9 | int32 Lv3_boost = 4; 10 | int32 Lv6_boost = 5; 11 | int32 Lv9_boost = 6; 12 | int32 Lv12_boost = 7; 13 | int32 Lv15_boost = 8; 14 | 15 | } 16 | 17 | 18 | enum BoostStat { 19 | 20 | none = 0; 21 | HP = 1; 22 | ATK = 2; 23 | DEF = 3; 24 | SPA = 4; 25 | SPD = 5; 26 | SPE = 6; 27 | 28 | 29 | } 30 | 31 | 32 | message DeckItemParamTable { 33 | repeated DeckItemParam entries = 1; 34 | } 35 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Battle.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message Battle { 6 | int64 battle_id = 1; 7 | int32 battle_parameter_id = 2; // BattleParameter.pb 8 | int32 battle_reward_id = 3; // BattleReward.pb 9 | int32 base_level = 4; 10 | int32 u5 = 5; 11 | string battle_bgm_id = 6; 12 | string result_bgm_id = 7; 13 | int32 u8 = 8; 14 | int32 u9 = 9; 15 | int32 u10 = 10; 16 | int32 u11 = 11; 17 | int32 deck_preset_group_id = 12; // DeckPresetGroup.pb 18 | int32 u13 = 13; 19 | int32 u14 = 14; 20 | } 21 | 22 | message BattleTable { 23 | repeated Battle entries = 1; 24 | } 25 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/EmblemItem.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message EmblemItem { 6 | int64 item_id = 1; 7 | int64 sub_category = 2; // EmblemItemCategory.pb (sub_categories) / bardge_item_minor_category_xx.lsd 8 | int32 u3 = 3; 9 | int32 rarity = 4; 10 | int32 u5 = 5; 11 | string image_id = 6; // ui/image/Item 12 | string schedule_id = 7; // Schedule.pb 13 | 14 | /* 15 | if u8 = 0: u9 is a quest_id or item_id 16 | if u8 = 1: u9 is a mission_id 17 | */ 18 | int32 u8 = 8; 19 | int64 u9 = 9; 20 | } 21 | 22 | message EmblemItemTable { 23 | repeated EmblemItem entries = 1; 24 | } 25 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/ScoutPickup.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message ScoutPickup { 6 | string scout_id = 1; // Scout.pb 7 | int64 trainer_id = 2; // Trainer.pb 8 | 9 | /* 10 | Used in: 11 | - lottery_pickup_description_xx.lsd (1.0.0) / scout_pickup_description_xx.lsd (Later versions) 12 | - path to the video: Movie/Scout/Pickup//.mp4 13 | */ 14 | string scout_pickup_id = 3; 15 | int32 priority = 4; // from 10 to lower values 16 | } 17 | 18 | message ScoutPickupTable { 19 | repeated ScoutPickup entries = 1; 20 | } 21 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Scout.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message Scout { 6 | string scout_id = 1; 7 | string banner_id_string = 2; // Banner.pb 8 | uint32 type = 3; 9 | /* 10 | 0 = Tutorial Scout 11 | 1 = Spotlight Scout 12 | 2 = 5* Guaranteed Scout 13 | 5 = Poké Fair Scout 14 | 6 = Featured Type Scout 15 | 7 = Seasonal Scout 16 | 8 = 5* Select Special Scout 17 | 18 | */ 19 | string schedule_id = 4; // Schedule.pb 20 | uint64 u5 = 5; 21 | uint32 u6 = 6; 22 | uint32 u7 = 7; 23 | uint32 banner_id = 8; // Banner.pb 24 | string u9 = 9; 25 | } 26 | 27 | message ScoutTable { 28 | repeated Scout entries = 1; 29 | } 30 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/EventQuestListHeader.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message EventQuestListHeader { 6 | int32 quest_group_id = 1; // EventQuestGroup.pb 7 | int64 item_id = 2; // item required to obtain the legendary pair's area info 8 | int32 quantity = 3; // quantity of ^ 9 | int64 story_quest_id = 4; // story_quest_id of the final 10 | int32 title_text_id = 5; // event_legend_header_title_xx.lsd 11 | int32 desc_text_id = 6; // event_legend_header_description_xx.lsd 12 | string image_id = 7; // ui/image/Event/Legend 13 | } 14 | 15 | message EventQuestListHeaderTable { 16 | repeated EventQuestListHeader entries = 1; 17 | } 18 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/ScoutUnitRate.proto: -------------------------------------------------------------------------------- 1 | // The corresponding .pb file is named LotteryUnitRate in 1.0.0 2 | syntax = "proto3"; 3 | 4 | package ReMastersLib; 5 | 6 | message ScoutUnitRate { 7 | string scout_name = 1; 8 | uint64 trainer_id = 2; 9 | uint32 drop_rate = 3; 10 | uint32 display_order = 4; // the greater this value is, the higher 11 | // the character is displayed in the 12 | // "Offering Rates" list 13 | 14 | uint32 u5 = 5; // 1 for Christmas Rosa/Siebold in their banners 15 | // and Whitney in the tutorial banner, 16 | // not set otherwise 17 | } 18 | 19 | message ScoutUnitRateTable { 20 | repeated ScoutUnitRate entries = 1; 21 | } 22 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Ability.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message Ability { 6 | int64 ability_id = 1; 7 | int32 type = 2; // ability_description_xx.lsd 8 | /* 9 | 1 to 6: stat boosts 10 | 7: passive 11 | 8: additional move effect 12 | 9: move power boost 13 | 10: move accuracy boost 14 | */ 15 | int32 passive_id = 3; // passive_skill_name_xx.lsd / passive_skill_description_xx.lsd 16 | int32 move_id = 4; // Move.pb / move_name_xx.lsd / move_description_xx.lsd 17 | int32 value = 5; // stat boost given by the ability if applicable 18 | int32 u6 = 6; 19 | } 20 | 21 | message AbilityTable { 22 | repeated Ability entries = 1; 23 | } 24 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Banner.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message Banner { 6 | uint32 banner_id = 1; 7 | string banner_id_string = 2; 8 | int32 text_1_id = 3; // banner_text_xx.lsd 9 | int32 text_2_id = 4; // banner_text_xx.lsd 10 | uint32 type = 5; 11 | /* 12 | 1 = Type Training Event 13 | 2 = Story Event 14 | 5 = Rally / Login Bonus 15 | 7 = Regular Scout / Gem Special 16 | 8 = Poké Fair Scout 17 | 10 = Legendary Event 18 | 11 = Weekly Bingo 19 | 12 = Bingo (Difficulty unset) 20 | 13 = Normal Bingo 21 | 14 = Hard Bingo 22 | 15 = Very Hard Bingo 23 | 16 = Expert Bingo 24 | */ 25 | } 26 | 27 | message BannerTable { 28 | repeated Banner entries = 1; 29 | } 30 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/MonsterEvolution.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message MonsterEvolution { 6 | uint64 evolution_id = 1; 7 | uint64 trainer_id = 2; 8 | uint64 monster_id_current = 3; 9 | uint64 monster_id_next = 4; 10 | int32 u5 = 5; 11 | int32 u6 = 6; 12 | int32 u7 = 7; 13 | int32 u8 = 8; 14 | int32 u9 = 9; 15 | int32 u10 = 10; 16 | int32 u11 = 11; 17 | int32 u12 = 12; 18 | int32 u13 = 13; 19 | int32 u14 = 14; 20 | int32 u15 = 15; 21 | int32 u16 = 16; 22 | int32 u17 = 17; 23 | int32 u18 = 18; 24 | int32 u19 = 19; 25 | int32 u20 = 20; 26 | string schedule_id = 21; // Schedule.pb 27 | } 28 | 29 | message MonsterEvolutionTable { 30 | repeated MonsterEvolution entries = 1; 31 | } 32 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Mission.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message Mission { 6 | int32 mission_id = 1; 7 | int32 mission_group_id = 2; // MissionGroup.pb 8 | int32 u3 = 3; 9 | repeated int64 parameters = 4; 10 | /* 11 | u3 = 5: StoryQuest.pb 12 | u3 = 14: Trainer.pb (characterId) 13 | */ 14 | repeated int32 objectives = 5; 15 | string schedule_id = 6; // Schedule.pb 16 | int32 u7 = 7; 17 | int32 u8 = 8; 18 | int32 u9 = 9; 19 | repeated int64 item_set_ids = 10; // ItemSet.pb 20 | int32 number = 11; 21 | int32 requirement_id = 12; // MissionRequirementCategory.pb 22 | string u13 = 13; 23 | string u14 = 14; 24 | } 25 | 26 | message MissionTable { 27 | repeated Mission entries = 1; 28 | } 29 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/TrainerBase.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message TrainerBase { 6 | uint64 id = 1; 7 | string actor_id = 2; 8 | string trainer_name_id = 3; // trainer_name_xx.lsd 9 | int32 u4 = 4; 10 | string u5 = 5; 11 | int32 u6 = 6; 12 | int32 u7 = 7; 13 | int32 gender = 8; // 1: Male, 2: Female 14 | string pokeball_id = 9; 15 | int32 is_generic = 10; // 0: Non-generic character, 1: Generic character 16 | 17 | // BGM name in sound/BGM.json 18 | string battle_bgm_id = 11; 19 | string result_bgm_id = 12; 20 | 21 | string u13 = 13; 22 | } 23 | 24 | message TrainerBaseTable { 25 | repeated TrainerBase entries = 1; 26 | } 27 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Monster.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message Monster { 6 | uint64 monster_id = 1; 7 | uint32 monster_base_id = 2; // MonsterBase.pb / monster_name_xx.lsd 8 | uint32 sync_move_id = 3; // Move.pb 9 | repeated uint32 hp_values = 4; 10 | repeated uint32 atk_values = 5; 11 | repeated uint32 def_values = 6; 12 | repeated uint32 spa_values = 7; 13 | repeated uint32 spd_values = 8; 14 | repeated uint32 spe_values = 9; 15 | int32 move1_change_id = 10; 16 | int32 move2_change_id = 11; 17 | int32 move3_change_id = 12; 18 | int32 move4_change_id = 13; 19 | } 20 | 21 | message MonsterTable { 22 | repeated Monster entries = 1; 23 | } 24 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/ItemSet.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message ItemSet { 6 | uint64 item_set_id = 1; 7 | int64 item_1 = 2; // Item.pb 8 | uint32 item_1_quantity = 3; 9 | int64 item_2 = 4; 10 | uint32 item_2_quantity = 5; 11 | int64 item_3 = 6; 12 | uint32 item_3_quantity = 7; 13 | int64 item_4 = 8; 14 | uint32 item_4_quantity = 9; 15 | int64 item_5 = 10; 16 | uint32 item_5_quantity = 11; 17 | int64 item_6 = 12; 18 | uint32 item_6_quantity = 13; 19 | int64 item_7 = 14; 20 | uint32 item_7_quantity = 15; 21 | int64 item_8 = 16; 22 | uint32 item_8_quantity = 17; 23 | int64 item_9 = 18; 24 | uint32 item_9_quantity = 19; 25 | int64 item_10 = 20; 26 | uint32 item_10_quantity = 21; 27 | } 28 | 29 | message ItemSetTable { 30 | repeated ItemSet entries = 1; 31 | } 32 | -------------------------------------------------------------------------------- /ReMastersLib/Misc/ResourceLocationEntry.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace ReMastersLib 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct ResourceLocationEntry : IFileName 7 | { 8 | public const int SIZE = 0x18; 9 | 10 | /// 11 | /// u64 file hash name? 12 | /// 13 | public ulong ResourceID; 14 | 15 | /// 16 | /// Container Name the asset is in 17 | /// 18 | public ulong FileID; 19 | 20 | /// 21 | /// Index within the 22 | /// 23 | public ulong AssetIndex; 24 | 25 | 26 | public string FileName => ResourceID.ToString(); 27 | public string ContainerName => FileID.ToString(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/MonsterBase.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message MonsterBase { 6 | int32 monster_base_id = 1; 7 | string actor_id = 2; 8 | int32 actor_number = 3; // not actual dex numbers for Gen 6/7 9 | int32 actor_variant = 4; 10 | int32 u5 = 5; 11 | string jp_name = 6; 12 | int32 u7 = 7; 13 | int32 gender = 8; 14 | int32 u9 = 9; 15 | int32 strength = 10; 16 | int32 u11 = 11; 17 | 18 | // If this passive is set, the game displays it above the others 19 | int32 form_passive_id = 12; // passive_skill_name_xx.lsd 20 | 21 | int32 u13 = 13; 22 | int32 u14 = 14; 23 | int32 form_id = 15; // monster_form_xx.json 24 | int32 monster_name_id = 16; // monster_name_xx.json 25 | 26 | bool is_shiny = 17; 27 | } 28 | 29 | message MonsterBaseTable { 30 | repeated MonsterBase entries = 1; 31 | } 32 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/MoveAndPassiveSkillDigit.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message MoveAndPassiveSkillDigit { 6 | int64 id = 1; // Move id or Passive id 7 | int64 param1 = 2; 8 | int64 param2 = 3; 9 | int64 param3 = 4; 10 | int64 param4 = 5; 11 | int64 param5 = 6; 12 | int64 param6 = 7; 13 | int64 param7 = 8; 14 | int64 param8 = 9; 15 | int64 param9 = 10; 16 | int64 param10 = 11; 17 | int64 param11 = 12; 18 | int64 param12 = 13; 19 | int64 param13 = 14; 20 | int64 param14 = 15; 21 | int64 param15 = 16; 22 | int64 param16 = 17; 23 | int64 param17 = 18; 24 | int64 param18 = 19; 25 | int64 param19 = 20; 26 | int64 param20 = 21; 27 | } 28 | 29 | message MoveAndPassiveSkillDigitTable { 30 | repeated MoveAndPassiveSkillDigit entries = 1; 31 | } 32 | -------------------------------------------------------------------------------- /ReMastersLib/ABND/ABNDExtHeader.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace ReMastersLib 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct ABNDExtHeader 7 | { 8 | public const int SIZE = 0x40; 9 | 10 | public int MetaTableOffset; 11 | public int MetaTableSize; 12 | public uint FileCount; 13 | public uint BlockSizeSectors; 14 | public int EStringTableOffset; 15 | public int EStringTableEnd; 16 | public EncryptionType EncryptionType; // 1 17 | public uint _0x1C; // 0 18 | 19 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0xC)] 20 | public byte[] IV; 21 | 22 | public uint _0x2C; // 0 23 | 24 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x10)] 25 | public byte[] MAC; // MAC 26 | 27 | public int EStringTableLength => EStringTableEnd - EStringTableOffset; 28 | } 29 | } -------------------------------------------------------------------------------- /ReMastersLib/ABND/ABNDFileEntry.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace ReMastersLib 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct ABNDFileEntry 7 | { 8 | public const int SIZE = 0x40; 9 | 10 | public int CompressedOffset; 11 | public int CompressedLength; 12 | public int DecompressedLength; 13 | public int FileNameOffset; 14 | public int FileNameLength; 15 | public ABNDFileEntryFlag Flags; // Usually Compressed & Encrypted 16 | public uint _0x18; // 0 17 | public EncryptionType EncryptionType; // 1 18 | 19 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x10)] 20 | public byte[] MAC; 21 | 22 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x8)] 23 | public byte[] IV; 24 | 25 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x8)] 26 | public byte[] Unused; 27 | } 28 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/BingoMissionGroup.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message BingoMissionGroup { 6 | int32 bingo_mission_group_id = 1; 7 | int32 u2 = 2; 8 | string schedule_id = 3; // Schedule.pb 9 | 10 | // These two might be inversed but there's no way to 11 | // actually know since they have the same value 12 | int32 bingo_mission_card_id = 4; // BingoMissionCard.pb 13 | int32 bingo_mission_reward_id = 5; // BingoMissionReward.pb 14 | 15 | int32 u6 = 6; 16 | int32 banner_id = 7; // Banner.pb 17 | int32 u8 = 8; 18 | int32 prev_bingo_mission_group_id = 9; // id of the bingo that needs to be finished before 19 | int32 bingo_mission_group_permission_id = 10; // bingo_mission_group_permission_xx.lsd 20 | int32 u11 = 11; // boolean? 21 | int32 u12 = 12; // boolean? 22 | } 23 | 24 | message BingoMissionGroupTable { 25 | repeated BingoMissionGroup entries = 1; 26 | } 27 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/VillaBonusZone.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message VillaBonusZone { 6 | int32 villa_bonus_zone_id = 1; 7 | int64 vitality_item_set_id = 2; // ItemSet.pb 8 | int64 vigor_item_set_id = 3; 9 | 10 | int64 extra_item_set_1_id = 4; 11 | int32 rate1 = 5; 12 | int64 extra_item_set_2_id = 6; 13 | int32 rate2 = 7; 14 | int64 extra_item_set_3_id = 8; 15 | int32 rate3 = 9; 16 | int64 extra_item_set_4_id = 10; 17 | int32 rate4 = 11; 18 | int64 extra_item_set_5_id = 12; 19 | int32 rate5 = 13; 20 | int64 extra_item_set_6_id = 14; 21 | int32 rate6 = 15; 22 | int64 extra_item_set_7_id = 16; 23 | int32 rate7 = 17; 24 | int64 extra_item_set_8_id = 18; 25 | int32 rate8 = 19; 26 | int64 extra_item_set_9_id = 20; 27 | int32 rate9 = 21; 28 | int64 extra_item_set_10_id = 22; 29 | int32 rate10 = 23; 30 | } 31 | 32 | message VillaBonusZoneTable { 33 | repeated VillaBonusZone entries = 1; 34 | } 35 | -------------------------------------------------------------------------------- /ReMastersLib/Util/StructConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace ReMastersLib 5 | { 6 | public static class StructConverter 7 | { 8 | public static T ByteArrayToStructure(this byte[] bytes) where T : struct 9 | { 10 | GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned); 11 | T obj = (T)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(T)); 12 | handle.Free(); 13 | return obj; 14 | } 15 | public static byte[] StructureToByteArray(T obj) where T : struct 16 | { 17 | int size = Marshal.SizeOf(obj); 18 | byte[] arr = new byte[size]; 19 | 20 | IntPtr ptr = Marshal.AllocHGlobal(size); 21 | Marshal.StructureToPtr(obj, ptr, true); 22 | Marshal.Copy(ptr, arr, 0, size); 23 | Marshal.FreeHGlobal(ptr); 24 | return arr; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/BattleParameter.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message BattleParameter { 6 | int32 battle_parameter_id = 1; 7 | string battle_name_jp = 2; 8 | int32 u3 = 3; 9 | int32 u4 = 4; 10 | int32 u5 = 5; 11 | int32 u6 = 6; 12 | int32 u7 = 7; 13 | int32 u8 = 8; 14 | int32 u9 = 9; 15 | int32 u10 = 10; 16 | int32 u11 = 11; 17 | int32 u12 = 12; 18 | int32 u13 = 13; 19 | int32 u14 = 14; 20 | int32 u15 = 15; 21 | int32 u16 = 16; 22 | int32 u17 = 17; 23 | int32 npc_unit_id_1 = 18; // BattleNpcUnit.pb 24 | int32 npc_unit_id_2 = 19; // BattleNpcUnit.pb 25 | int32 npc_unit_id_3 = 20; // BattleNpcUnit.pb 26 | int32 background_id = 21; 27 | string trainer_name_id = 22; // trainer_variation_name_xx.lsd 28 | int32 u23 = 23; 29 | int32 u24 = 24; 30 | int32 u25 = 25; 31 | int32 u26 = 26; 32 | int32 u27 = 27; 33 | int32 u28 = 28; 34 | } 35 | 36 | message BattleParameterTable { 37 | repeated BattleParameter entries = 1; 38 | } 39 | -------------------------------------------------------------------------------- /ReMastersLib/Util/LZ4.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Diagnostics; 3 | using K4os.Compression.LZ4.Encoders; 4 | 5 | namespace ReMastersLib 6 | { 7 | /// 8 | /// Wrapper for nuget lib 9 | /// 10 | public static class LZ4 11 | { 12 | public static unsafe byte[] DecodeChunks(List chunks, uint blockSize, int decLength) 13 | { 14 | var result = new byte[decLength]; 15 | var decoder = LZ4Decoder.Create(true, (int)blockSize, chunks.Count - 1); 16 | int offset = 0; 17 | foreach (var chunk in chunks) 18 | { 19 | fixed (byte* chunkP = chunk.Data) 20 | { 21 | int chunkLen = decoder.Decode(chunkP, (int)chunk.Length); 22 | Debug.Assert(chunkLen > 0 || chunk.Length == 1); 23 | offset -= chunkLen; 24 | } 25 | } 26 | fixed (byte *resultP = result) 27 | { 28 | decoder.Drain(resultP, offset, decLength); 29 | } 30 | return result; 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /ReMastersConsole/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReMastersLib; 3 | 4 | namespace ReMastersConsole 5 | { 6 | public static class Program 7 | { 8 | private static void Main(string[] args) 9 | { 10 | if (args.Length > 1) 11 | { 12 | Console.WriteLine("Not a console app, really. Don't do that!"); 13 | Console.ReadLine(); 14 | } 15 | 16 | var paths = new GameDataPaths 17 | { 18 | UnpackedAPKPath = @"E:\masters-inv\2.9.0\apk", 19 | DownloadPath = @"E:\masters-inv\2.9.0\downloaded-resource-dir", 20 | ShardPath = @"E:\masters-inv\2.9.0\downloaded-resource-dir\assetdb_shard", 21 | 22 | OutputPath = @"E:\masters-inv\2.9.0\dump", 23 | }; 24 | 25 | var settings = new DumpSettings(paths) 26 | { 27 | DumpStringsDL = true, 28 | DumpStringsAPK = true, 29 | 30 | DumpResources = true, 31 | DumpSound = true, 32 | DumpVideo = true, 33 | DumpProto = false, 34 | }; 35 | 36 | settings.DumpGameData(); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/MonsterVariation.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message MonsterVariation { 6 | uint64 monster_id = 1; 7 | uint32 form = 2; // 1 = Mega, 2 = Other 8 | string actor_id = 3; 9 | uint32 atk_scale = 4; 10 | uint32 def_scale = 5; 11 | uint32 spa_scale = 6; 12 | uint32 spd_scale = 7; 13 | uint32 spe_scale = 8; 14 | int64 move_1_id = 9; 15 | int64 move_2_id = 10; 16 | int64 move_3_id = 11; 17 | int64 move_4_id = 12; 18 | int64 move_5_id = 13; 19 | int64 move_6_id = 14; 20 | int32 passive_1_id = 15; 21 | int32 passive_2_id = 16; 22 | int32 passive_3_id = 17; 23 | int32 u18 = 18; 24 | int32 u19 = 19; 25 | int32 u20 = 20; 26 | int32 u21 = 21; 27 | int32 u22 = 22; 28 | int32 u23 = 23; 29 | int32 u24 = 24; 30 | int32 u25 = 25; 31 | int32 form_id = 26; // monster_form_xx.lsd 32 | int32 u27 = 27; 33 | int32 u28 = 28; 34 | int32 move_dynamax_1_id = 29; 35 | int32 move_dynamax_2_id = 30; 36 | int32 move_dynamax_3_id = 31; 37 | int32 move_dynamax_4_id = 32; 38 | } 39 | 40 | message MonsterVariationTable { 41 | repeated MonsterVariation entries = 1; 42 | } 43 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/DeckPreset.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package ReMastersLib; 3 | 4 | message DeckPreset { 5 | int32 deck_preset_id = 1; 6 | 7 | int64 character_1_id = 2; // Trainer.pb 8 | int64 trainer_1_id = 3; // Monster.pb 9 | // Stats? 10 | int32 u4 = 4; 11 | int32 u5 = 5; 12 | int32 u6 = 6; 13 | int32 u7 = 7; 14 | int32 u8 = 8; 15 | int32 u9 = 9; 16 | 17 | int64 character_2_id = 12; // Trainer.pb 18 | int64 trainer_2_id = 13; // Monster.pb 19 | // Stats? 20 | int32 u14 = 14; 21 | int32 u15 = 15; 22 | int32 u16 = 16; 23 | int32 u17 = 17; 24 | int32 u18 = 18; 25 | int32 u19 = 19; 26 | 27 | int64 character_3_id = 22; // Trainer.pb 28 | int64 trainer_3_id = 23; // Monster.pb 29 | // Stats? 30 | int32 u24 = 24; 31 | int32 u25 = 25; 32 | int32 u26 = 26; 33 | int32 u27 = 27; 34 | int32 u28 = 28; 35 | int32 u29 = 29; 36 | 37 | int64 item_1_id = 32; // DeckItem.pb / deck_item_name_xx.lsd 38 | int32 u33 = 33; 39 | int32 u34 = 34; 40 | int64 item_2_id = 35; // DeckItem.pb / deck_item_name_xx.lsd 41 | int32 u36 = 36; 42 | int32 u37 = 37; 43 | int64 item_3_id = 38; // DeckItem.pb / deck_item_name_xx.lsd 44 | int32 u39 = 39; 45 | int32 u40 = 40; 46 | } 47 | 48 | message DeckPresetTable { 49 | repeated DeckPreset entries = 1; 50 | } 51 | -------------------------------------------------------------------------------- /ReMastersTest/ReMastersTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | all 15 | runtime; build; native; contentfiles; analyzers; buildtransitive 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | True 26 | True 27 | Resources.resx 28 | 29 | 30 | 31 | 32 | 33 | ResXFileCodeGenerator 34 | Resources.Designer.cs 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /ReMastersLib/DumpSettings.cs: -------------------------------------------------------------------------------- 1 | namespace ReMastersLib 2 | { 3 | public class DumpSettings 4 | { 5 | public bool DumpStringsAPK { get; set; } = true; 6 | public bool DumpStringsDL { get; set; } = true; 7 | public bool DumpResources { get; set; } = true; 8 | public bool DumpSound { get; set; } = true; 9 | public bool DumpVideo { get; set; } = true; 10 | public bool DumpProto { get; set; } = true; 11 | 12 | public readonly GameDataPaths Paths; 13 | 14 | public DumpSettings(GameDataPaths p) => Paths = p; 15 | 16 | public void DumpGameData() 17 | { 18 | var dumper = new GameDumper(Paths.UnpackedAPKPath, Paths.DownloadPath); 19 | dumper.LoadShard(Paths.ShardPath); 20 | dumper.InitializeShardData(Paths.OutputPath); 21 | 22 | if (DumpStringsAPK) 23 | dumper.DumpMessagesAPK(Paths.OutputPath); 24 | if (DumpResources) 25 | dumper.DumpResources(Paths.OutputPath); 26 | if (DumpStringsDL) 27 | dumper.DumpMessagesDownload(Paths.OutputPath); 28 | if (DumpSound) 29 | dumper.DumpSound(Paths.OutputPath); 30 | if (DumpVideo) 31 | dumper.DumpVideo(Paths.OutputPath); 32 | if (DumpProto) 33 | dumper.DumpProto(Paths.OutputPath); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /ReMastersLib/ReMastersLib.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | true 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | all 17 | runtime; build; native; contentfiles; analyzers; buildtransitive 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /ReMastersLib/Util/ChaCha.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Waher.Security.ChaChaPoly; 3 | 4 | namespace ReMastersLib 5 | { 6 | /// 7 | /// Wrapper for nuget package 8 | /// 9 | public static class ChaCha 10 | { 11 | private static readonly byte[] Key = 12 | { 13 | 0xC7, 0x79, 0xCC, 0x30, 0x44, 0xC0, 0xE0, 0x4E, 14 | 0xA3, 0x24, 0x0C, 0xAE, 0x80, 0xCF, 0xF6, 0xA9, 15 | 0x8A, 0xF9, 0x53, 0x63, 0x68, 0xC3, 0x60, 0x2C, 16 | 0xA4, 0xC2, 0x6D, 0xC7, 0xBC, 0xA2, 0x37, 0x51, 17 | }; 18 | 19 | private static readonly byte[] XorKey = BitConverter.GetBytes(1234567891234567891ul); 20 | 21 | /// 22 | /// Decrypts the data. 23 | /// 24 | /// Null if the provided Mac doesn't match the calculated Mac 25 | public static byte[] Decrypt(byte[] data, byte[] nonce, byte[] mac) 26 | { 27 | var chacha = new AeadChaCha20Poly1305(Key, nonce); 28 | return chacha.Decrypt(data, Array.Empty(), mac); 29 | } 30 | 31 | public static byte[] Xor(this byte[] iv, int arrsize) 32 | { 33 | byte[] result = new byte[arrsize]; 34 | iv.CopyTo(result, 0); 35 | 36 | for (int i = XorKey.Length - 1; i >= 0; i--) 37 | result[i] ^= XorKey[i]; 38 | return result; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ReMastersTest/GeneralTests.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using ReMastersLib; 3 | using Xunit; 4 | using FluentAssertions; 5 | using ReMastersTest.Properties; 6 | 7 | namespace ReMastersTest 8 | { 9 | public static class GeneralTests 10 | { 11 | [Theory] 12 | [InlineData("_10259522396886124101")] 13 | [InlineData("assetdb_shard")] 14 | public static void TestABND(string file) 15 | { 16 | var data = (byte[])Resources.ResourceManager.GetObject(file); 17 | var abndo = new ABND(data); 18 | 19 | var f0 = abndo.GetFileInfo(0); 20 | var d0 = abndo.GetFileData(f0); 21 | 22 | d0.Should().NotBeNull("expected a valid data result"); 23 | d0.Length.Should().Be(f0.DecompressedLength, "expected specified length"); 24 | } 25 | 26 | [Theory] 27 | [InlineData("Monster")] 28 | public static void TestProto(string file) 29 | { 30 | var data = (byte[])Resources.ResourceManager.GetObject(file); 31 | var table = MonsterTable.Parser.ParseFrom(data); 32 | table.Entries.Count.Should().Be(0x4E, "expected data!"); 33 | 34 | var dump = table.DumpAll(); 35 | dump.Length.Should().BeGreaterThan(9000, "expected data in the table!"); 36 | 37 | var dump2 = table.Entries.DumpAllLines(); 38 | dump2.Any().Should().BeTrue("expected data in the single line per-item table!"); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Move.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message Move { 6 | uint32 move_id = 1; 7 | Category category = 2; 8 | uint32 u3 = 3; 9 | User user = 4; 10 | Group group = 5; 11 | uint32 type = 6; // motif_type_name_xx.lsd 12 | Target target = 7; // move_target_type_xx.lsd 13 | uint32 u8 = 8; 14 | uint32 gauge_drain = 9; 15 | uint32 power = 10; 16 | uint32 accuracy = 11; 17 | uint32 uses = 12; // 0 = unlimited 18 | Tag tags = 13; // move_tag_xx.lsd 19 | } 20 | 21 | enum Category { 22 | NoCategory = 0; 23 | Physical = 1; 24 | Special = 2; 25 | Status = 3; 26 | UnityMove = 4; 27 | } 28 | 29 | enum User { 30 | Pokemon = 0; 31 | Trainer = 1; 32 | } 33 | 34 | enum Group { 35 | None = 0; 36 | Unknown1 = 1; 37 | Regular = 2; 38 | Sync = 3; 39 | Unity = 4; 40 | } 41 | 42 | enum Target { 43 | AllySingle = 0; 44 | AllyAll = 1; 45 | OpponentSingle = 2; 46 | OpponentAll = 3; 47 | Self = 4; 48 | AllyRandom = 5; 49 | OpponentRandom = 6; 50 | AllyField = 7; 51 | OpponentField = 8; 52 | EntireField = 9; 53 | } 54 | 55 | enum Tag { 56 | none = 0; 57 | ForcedSwitch = 1; 58 | SuddenSwitch = 2; 59 | QuickMove = 4; 60 | SureHit = 8; 61 | na = 16; 62 | OkWhileFrozen = 32; 63 | OkWhileSleep = 64; 64 | OnlyWhileAsleep = 128; 65 | Heals = 256; 66 | Absorbs = 512; 67 | Continues = 1024; 68 | Recoil = 2048; 69 | } 70 | 71 | message MoveTable { 72 | repeated Move entries = 1; 73 | } 74 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/StoryQuest.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message StoryQuest { 6 | uint64 story_quest_id = 1; 7 | string quest_name_id = 2; // story_quest_name_xx.lsd 8 | uint64 field_id = 3; 9 | int64 required_condition_id = 4; 10 | uint64 sort_by = 5; 11 | uint64 area_spot_id = 6; 12 | uint64 item_set_id = 7; // ItemSet.pb (First-time rewards) 13 | uint64 quest_group_id = 8; 14 | int32 field_type = 9; // 0: No battle, 1: Normal, 2: Co-op 15 | string schedule_id = 10; // Schedule.pb 16 | int64 play_count_limit = 11; 17 | bool chapter_open_animation = 12; 18 | Difficulty difficulty = 13; 19 | string week_schedule_keyword = 14; 20 | bool debug = 15; 21 | int64 debug_category = 16; 22 | int32 reward_type = 17; 23 | int64 showcased_item_id = 18; // Item.pb 24 | int64 chara_quest_list_item_id = 19; 25 | bool is_evolution_quest = 20; 26 | QuestType quest_type = 21; 27 | bool is_search_quest = 22; 28 | uint64 next_quest_id = 23; 29 | uint64 u24 = 24; 30 | uint64 u25 = 25; 31 | int64 u26 = 26; 32 | int64 u27 = 27; 33 | int64 u28 = 28; 34 | int64 u29 = 29; 35 | int64 u30 = 30; 36 | int64 egg_drop_id = 31; // EggDrop.pb 37 | } 38 | 39 | enum Difficulty { 40 | None = 0; 41 | Normal = 1; 42 | Hard = 2; 43 | VeryHard = 3; 44 | SuperHard = 4; 45 | UltraHard = 5; 46 | } 47 | 48 | enum QuestType { 49 | MainStory = 0; 50 | TrainingArea = 1; 51 | SyncPairStories = 2; 52 | Events = 3; 53 | } 54 | 55 | 56 | message StoryQuestTable { 57 | repeated StoryQuest entries = 1; 58 | } 59 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Trainer.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message Trainer { 6 | int64 trainer_id = 1; 7 | int32 trainer_kind = 2; // 1: Main Character, 2: Other 8 | int32 scout_method = 3; // 1: Gacha / BP, 2: Story, 3: Egg 9 | int64 exclusivity = 4; // 1: Regular, 2: Pokéfair / Master Fair, 3: Seasonal 10 | int32 trainer_base_id = 5; // TrainerBase.pb 11 | int32 type = 6; // motif_type_name_xx.lsd 12 | int32 rarity = 7; 13 | int32 role = 8; // role_type_name_xx.lsd (0: Physical Strike) 14 | uint64 monster_id = 9; // Monster.pb 15 | 16 | // Move.pb 17 | int32 move_1_id = 10; 18 | int32 move_2_id = 11; 19 | int32 move_3_id = 12; 20 | int32 move_4_id = 13; 21 | 22 | int32 weakness = 14; // motif_type_name_xx.lsd 23 | uint64 story_quest = 15; // Sync Pair Story quest ID (-1 if none) 24 | int32 u16 = 16; 25 | 26 | // passive_skill_name_xx.lsd / passive_skill_description_xx.lsd 27 | int32 passive_1_id = 17; 28 | int32 passive_2_id = 18; 29 | int32 passive_3_id = 19; 30 | int32 passive_4_id = 20; 31 | 32 | // TeamSkill.pb 33 | int32 team_skill_1_id = 21; 34 | int32 team_skill_2_id = 22; 35 | int32 team_skill_3_id = 23; 36 | int32 team_skill_4_id = 24; 37 | int32 team_skill_5_id = 25; 38 | 39 | int32 u26 = 26; 40 | int32 u27 = 27; 41 | int32 number = 28; // least significant 2 digits = alt number, rest = in-game pair number 42 | 43 | // Schedule.pb 44 | string schedule_id = 29; 45 | string ex_schedule_id = 30; // for the 6* EX timeframe 46 | } 47 | 48 | message TrainerTable { 49 | repeated Trainer entries = 1; 50 | } 51 | -------------------------------------------------------------------------------- /ReMastersLib/LSD/LSD.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.Text; 4 | using System.Collections.Generic; 5 | 6 | namespace ReMastersLib 7 | { 8 | /// 9 | /// Language [Statement] [Digraph] ?? 10 | /// 11 | public class LSD 12 | { 13 | public const int MAGIC = 0x4C534446; // LSDF (LSD File) 14 | 15 | private readonly byte[] Data; 16 | 17 | public LSD(byte[] data) 18 | { 19 | Data = data; 20 | Debug.Assert(Magic == MAGIC); 21 | } 22 | 23 | private uint Magic => BitConverter.ToUInt32(Data, 0x00); 24 | public int Count => BitConverter.ToInt32(Data, 0x0C); 25 | 26 | public KeyValuePair[] GetEntries() 27 | { 28 | int count = Count; 29 | var entries = new KeyValuePair[Count]; 30 | for (int i = 0; i < count; i++) 31 | entries[i] = GetEntry(i); 32 | return entries; 33 | } 34 | 35 | private KeyValuePair GetEntry(int i) 36 | { 37 | var eOfs = GetEntryInfoOffset(i); 38 | int ofs = BitConverter.ToInt32(Data, eOfs + 0); 39 | int codeLen = BitConverter.ToInt16(Data, eOfs + 4); 40 | int len = BitConverter.ToInt32(Data, eOfs + 6); 41 | 42 | var enc = Encoding.UTF8; 43 | var code = enc.GetString(Data, ofs, codeLen); 44 | var str = enc.GetString(Data, ofs + codeLen, len); 45 | 46 | return new KeyValuePair(code, str); 47 | } 48 | 49 | private static int GetEntryInfoOffset(int i) 50 | { 51 | // assumed struct: 52 | // u32 data start 53 | // u16 ID length 54 | // u32 string length 55 | 56 | const int start = 0x1E + 4; 57 | const int size = 0xA; 58 | return start + (size * i); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /ReMasters.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29009.5 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReMastersConsole", "ReMastersConsole\ReMastersConsole.csproj", "{106DC786-4B9A-4C38-97AF-0D9C48981551}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReMastersLib", "ReMastersLib\ReMastersLib.csproj", "{E8B53258-33D1-4BFB-8F38-4EF9C69101A9}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReMastersTest", "ReMastersTest\ReMastersTest.csproj", "{6848DE12-E5F2-4B96-9AA9-147DF60A70D6}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {106DC786-4B9A-4C38-97AF-0D9C48981551}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {106DC786-4B9A-4C38-97AF-0D9C48981551}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {106DC786-4B9A-4C38-97AF-0D9C48981551}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {106DC786-4B9A-4C38-97AF-0D9C48981551}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {E8B53258-33D1-4BFB-8F38-4EF9C69101A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {E8B53258-33D1-4BFB-8F38-4EF9C69101A9}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {E8B53258-33D1-4BFB-8F38-4EF9C69101A9}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {E8B53258-33D1-4BFB-8F38-4EF9C69101A9}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {6848DE12-E5F2-4B96-9AA9-147DF60A70D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {6848DE12-E5F2-4B96-9AA9-147DF60A70D6}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {6848DE12-E5F2-4B96-9AA9-147DF60A70D6}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {6848DE12-E5F2-4B96-9AA9-147DF60A70D6}.Release|Any CPU.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | SolutionGuid = {0B671480-301F-45A7-8F28-8A414AA9D349} 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /ReMastersLib/ASDB/ASDB.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | 5 | namespace ReMastersLib 6 | { 7 | public class ASDB 8 | { 9 | public uint MAGIC = 0x62646261; // abdb 10 | 11 | private readonly byte[] Data; 12 | private readonly ASDBHeader Header; 13 | public readonly ASDBExtHeader ExtHeader; 14 | 15 | public ASDB(byte[] data) 16 | { 17 | Data = data; 18 | Header = Util.GetSlice(data, 0, ASDBHeader.SIZE).ByteArrayToStructure(); 19 | Debug.Assert(Header.Magic == MAGIC); 20 | Debug.Assert(Header.ExtHeaderOffset == ASDBHeader.SIZE); 21 | Debug.Assert(Header.ExtHeaderSize == ASDBExtHeader.SIZE); 22 | ExtHeader = Util.GetSlice(data, Header.ExtHeaderOffset, Header.ExtHeaderSize).ByteArrayToStructure(); 23 | 24 | Debug.Assert(ExtHeader.EncryptionType == EncryptionType.None); 25 | } 26 | 27 | public byte[] GetEntry(int index) 28 | { 29 | if ((uint)index >= ExtHeader.EntryCount) 30 | throw new ArgumentException(nameof(index)); 31 | 32 | var len = ExtHeader.EntrySize; 33 | var ofs = ExtHeader.EntryStart + (len * index); 34 | 35 | return Util.GetSlice(Data, ofs, len); 36 | } 37 | 38 | public Dictionary GetEntryDictionary() where T : struct, IFileName 39 | { 40 | var result = new Dictionary(ExtHeader.EntryCount); 41 | for (int i = 0; i < ExtHeader.EntryCount; i++) 42 | { 43 | var entry = GetEntry(i); 44 | var obj = entry.ByteArrayToStructure(); 45 | result.Add(obj.FileName, obj); 46 | } 47 | return result; 48 | } 49 | 50 | public T[] GetEntryArray(ASDB asdb) where T : struct 51 | { 52 | var result = new T[asdb.ExtHeader.EntryCount]; 53 | for (int i = 0; i < asdb.ExtHeader.EntryCount; i++) 54 | { 55 | var entry = asdb.GetEntry(i); 56 | result[i] = entry.ByteArrayToStructure(); 57 | } 58 | 59 | return result; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /ReMastersLib/Sound/SoundFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.IO; 5 | using System.Security.Cryptography; 6 | using System.Text; 7 | 8 | namespace ReMastersLib.Sound 9 | { 10 | public class SoundFile 11 | { 12 | 13 | public readonly byte[] EncryptedData; 14 | public readonly byte[] Data; 15 | 16 | public static readonly byte[] Key = 17 | { 18 | 0x23, 0x7B, 0x9B, 0x77, 0xFE, 0x3C, 0x60, 0xD3, 0xC1, 0xF2, 0x19, 0xEC, 0xD9, 0xBD, 0x1C, 0x9C 19 | }; 20 | private static byte[] Decrypt(byte[] iv, byte[] dat) 21 | { 22 | using (var ms = new MemoryStream(dat.Length)) 23 | { 24 | ms.Write(dat, 0, dat.Length); 25 | ms.Position = 0; 26 | 27 | using (var aes = new AesManaged 28 | { 29 | Key = Key, 30 | IV = iv, 31 | Mode = CipherMode.CBC, 32 | Padding = PaddingMode.None 33 | }) 34 | using (var decryptor = aes.CreateDecryptor()) 35 | using (var cs = new CryptoStream(ms, decryptor, CryptoStreamMode.Read)) 36 | { 37 | var decrypted = new byte[dat.Length]; 38 | cs.Read(decrypted, 0, decrypted.Length); 39 | return decrypted; 40 | } 41 | } 42 | } 43 | 44 | public SoundFile(byte[] data) 45 | { 46 | EncryptedData = data; 47 | 48 | Data = new byte[BitConverter.ToUInt32(EncryptedData, 0)]; 49 | Debug.Assert(Data.Length <= EncryptedData.Length); 50 | 51 | var ofs = 0; 52 | var encOfs = 4; 53 | while (ofs < Data.Length) 54 | { 55 | var chunkSize = BitConverter.ToInt32(EncryptedData, encOfs) ^ BitConverter.ToInt32(EncryptedData, encOfs + 4); 56 | var iv = Util.GetSlice(EncryptedData, encOfs + 0x4, 0x10); 57 | 58 | var dec = Decrypt(iv, Util.GetSlice(EncryptedData, encOfs + 0x14, (chunkSize + 0xF) & ~0xF)); 59 | 60 | Buffer.BlockCopy(dec, 0, Data, ofs, chunkSize); 61 | ofs += chunkSize; 62 | encOfs += 0x814; 63 | } 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /ReMastersLib/LSD/LSDDumper.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | using Newtonsoft.Json; 4 | 5 | namespace ReMastersLib 6 | { 7 | public static class LSDDumper 8 | { 9 | public static void Dump(string lsdPath, string jsonPath, string txtPath) 10 | { 11 | Directory.CreateDirectory(jsonPath); 12 | var files = Directory.EnumerateFiles(lsdPath, "*.lsd", SearchOption.AllDirectories); 13 | 14 | using (StreamWriter sw = File.CreateText(txtPath)) 15 | { 16 | foreach (var f in files) 17 | { 18 | var data = File.ReadAllBytes(f); 19 | var lsd = new LSD(data); 20 | var entries = lsd.GetEntries(); 21 | AddStrings(f, entries, sw); 22 | DumpJSON(f, entries, lsdPath, jsonPath); 23 | } 24 | } 25 | } 26 | 27 | private static void AddStrings(string file, KeyValuePair[] entries, StreamWriter sw) 28 | { 29 | var fn = Path.GetFileName(file); 30 | sw.WriteLine("==========="); 31 | sw.WriteLine(fn); 32 | sw.WriteLine("==========="); 33 | 34 | foreach (var entry in entries) 35 | sw.WriteLine($"[{entry.Key}] {entry.Value}"); 36 | 37 | sw.WriteLine(""); 38 | } 39 | 40 | private static void DumpJSON(string file, KeyValuePair[] entries, string lsdPath, string jsonPath) 41 | { 42 | var relPath = file.Replace(lsdPath + Path.DirectorySeparatorChar, ""); 43 | var path = Path.Combine(jsonPath, relPath); 44 | path = Path.ChangeExtension(path, "json"); 45 | 46 | Directory.CreateDirectory(Path.GetDirectoryName(path)); 47 | using (StreamWriter sw = File.CreateText(path)) 48 | { 49 | var size = entries.Length; 50 | 51 | sw.WriteLine("{"); 52 | for (int i = 0; i < size; i++) 53 | { 54 | var entry = entries[i]; 55 | var key = JsonConvert.ToString(entry.Key); 56 | var val = JsonConvert.ToString(entry.Value); 57 | sw.WriteLine($" {key}: {val}" + (i == size - 1 ? "" : ",")); 58 | } 59 | sw.WriteLine("}"); 60 | } 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/BattleNpcUnit.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message BattleNpcUnit { 6 | int32 npc_unit_id = 1; 7 | string u2 = 2; 8 | int32 u3 = 3; 9 | int32 u4 = 4; 10 | string trainer_actor_id = 5; 11 | string monster_actor_id = 6; 12 | Role role = 7; 13 | int32 u8 = 8; 14 | 15 | // Move.pb 16 | int32 move_1_id = 9; 17 | int32 move_2_id = 10; 18 | int32 move_3_id = 11; 19 | int32 move_4_id = 12; 20 | int32 move_5_id = 13; 21 | int32 move_6_id = 14; 22 | 23 | int32 move_1_uses = 15; 24 | int32 move_2_uses = 16; 25 | int32 move_3_uses = 17; 26 | int32 move_4_uses = 18; 27 | int32 move_5_uses = 19; 28 | int32 move_6_uses = 20; 29 | 30 | int32 sync_move_id = 21; // Move.pb 31 | int32 level = 22; 32 | 33 | // passive_skill_xx_xx.lsd 34 | int32 passive_1_id = 23; 35 | int32 passive_2_id = 24; 36 | int32 passive_3_id = 25; 37 | int32 passive_4_id = 26; 38 | int32 passive_5_id = 27; 39 | 40 | int32 u28 = 28; 41 | int32 u29 = 29; 42 | int32 u30 = 30; 43 | int32 u31 = 31; 44 | int32 u32 = 32; 45 | 46 | int32 hp_scale = 33; 47 | int32 atk_scale = 34; 48 | int32 def_scale = 35; 49 | int32 spa_scale = 36; 50 | int32 spd_scale = 37; 51 | int32 spe_scale = 38; 52 | 53 | int32 weak_type = 39; 54 | int32 state_1 = 40; 55 | int32 state_2 = 41; 56 | 57 | int32 u42 = 42; 58 | int32 u43 = 43; 59 | int32 u44 = 44; 60 | int32 u45 = 45; 61 | int32 u46 = 46; 62 | int32 u47 = 47; 63 | int32 u48 = 48; 64 | int32 u49 = 49; 65 | int32 u50 = 50; 66 | int32 u51 = 51; 67 | int32 u52 = 52; 68 | int32 u53 = 53; 69 | int32 u54 = 54; 70 | int32 u55 = 55; 71 | int32 u56 = 56; 72 | int32 u57 = 57; 73 | int32 u58 = 58; 74 | int32 u59 = 59; 75 | int32 u60 = 60; 76 | int32 u61 = 61; 77 | int32 u62 = 62; 78 | int32 u63 = 63; 79 | int32 u64 = 64; 80 | int32 u65 = 65; 81 | int32 u66 = 66; 82 | int32 u67 = 67; 83 | int32 u68 = 68; 84 | int32 u69 = 69; 85 | int32 u70 = 70; 86 | int32 u71 = 71; 87 | int32 u72 = 72; 88 | int32 u73 = 73; 89 | int32 u74 = 74; 90 | int32 u75 = 75; 91 | int32 u76 = 76; 92 | int32 u77 = 77; 93 | int32 u78 = 78; 94 | int32 u79 = 79; 95 | int32 u80 = 80; 96 | int32 u81 = 81; 97 | int32 u82 = 82; 98 | int32 u83 = 83; 99 | int32 u84 = 84; 100 | int32 u85 = 85; 101 | int32 u86 = 86; 102 | int32 u87 = 87; 103 | int32 u88 = 88; 104 | int32 u89 = 89; 105 | int32 u90 = 90; 106 | int32 u91 = 91; 107 | } 108 | 109 | 110 | enum Role { 111 | StrikePhysical = 0; 112 | StrikeSpecial = 1; 113 | Support = 2; 114 | Tech = 3; 115 | } 116 | 117 | message BattleNpcUnitTable { 118 | repeated BattleNpcUnit entries = 1; 119 | } 120 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Item.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReMastersLib; 4 | 5 | message Item { 6 | uint64 item_id = 1; 7 | /* 8 | sub_category = 1: Trainer.pb 9 | sub_category = 3: StoryQuest.pb 10 | sub_category = 4: other_item_name_xx.lsd 11 | sub_category = 5: ??? 12 | sub_category = 6: other_item_name_xx.lsd 13 | sub_category = 7: other_item_name_xx.lsd 14 | sub_category = 9: other_item_name_xx.lsd 15 | sub_category = 10: other_item_name_xx.lsd 16 | sub_category = 41: other_item_name_xx.lsd 17 | sub_category = 45: other_item_name_xx.lsd 18 | sub_category = 51: breakthrough_item_name_xx.lsd 19 | sub_category = 52: training_item_name_xx.lsd 20 | sub_category = 53: other_item_name_xx.lsd 21 | sub_category = 54: potential_item_name_xx.lsd 22 | sub_category = 55: TrainerBuildupItem.pb 23 | sub_category = 56: AbilityItem.pb 24 | sub_category = 57: MoveLevelUpItem.pb 25 | sub_category = 58: other_item_name_xx.lsd 26 | sub_category = 61: MonsterEvolution.pb 27 | sub_category = 65: other_item_name_xx.lsd 28 | sub_category = 66: other_item_name_xx.lsd 29 | sub_category = 67: other_item_name_xx.lsd 30 | sub_category = 68: trainer_rarity_up_item_name_xx.lsd 31 | sub_category = 69: trainer_rarity_up_item_name_xx.lsd 32 | sub_category = 73: bardge_item_name_xx.lsd 33 | sub_category = 74: villa_item_description_xx.lsd 34 | sub_category = 75: event_item_name_xx.lsd 35 | sub_category = 81: deck_item_name_xx.lsd 36 | sub_category = 82: deck_item_lvup_item_name_xx.lsd 37 | sub_category = 83: packed_item_name_xx.lsd 38 | sub_category = 85: EggItem.pb 39 | sub_category = 86: treat_item_name_xx.lsd 40 | sub_category = 89: scout_ticket_item_name_xx.lsd 41 | sub_category = 90: scout_server_ticket_item_name_xx.lsd 42 | sub_category = 91: ??? 43 | sub_category = 92: monster_enhancement_item_description_xx.lsd 44 | sub_category = 101: MissionItem.pb 45 | sub_category = 111: other_item_name_xx.lsd 46 | sub_category = 120: jukebox_music_key_item_name_xx.lsd 47 | */ 48 | uint32 sub_category = 2; 49 | /* 50 | 1: Sync Pairs 51 | 3: Area Info 52 | 4: Coins 53 | 5: ??? 54 | 6: Rank Points 55 | 7: Stamina 56 | 9: Prestige Points 57 | 10: Battle Points 58 | 41: Gems 59 | 45: Daily Voucher / Pearl / Big Pearl 60 | 51: Level Cap Items 61 | 52: Level-Up Manuals 62 | 53: Sync Move Level-up 63 | 54: Cookies 64 | 55: Star Power-Up 65 | 56: Sync Orbs 66 | 57: Move Candies 67 | 58: Move Candy Coins 68 | 61: Evolution 69 | 65: Replay Ticket 70 | 66: Evolution Shard / Crystal 71 | 67: Move Jauge Slot 72 | 68: Champion Spirit 73 | 69: Legendary Spirit 74 | 73: Badges 75 | 74: Villa Treats 76 | 75: Event Items 77 | 81: Gear 78 | 82: Gear-Upgrade Items 79 | 83: Packs 80 | 85: Eggs 81 | 86: Tarts 82 | 89: Scout Tickets 83 | 90: Grat Scout Ticket 84 | 91: ??? 85 | 92: Monster Enhancement 86 | 101: Mission 87 | 111: Sync Orbs Reward Boost 88 | 120: Jukebox 89 | */ 90 | } 91 | 92 | message ItemTable { 93 | repeated Item entries = 1; 94 | } 95 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Util/ProtoTableDumper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using Google.Protobuf; 6 | using Google.Protobuf.Collections; 7 | using Newtonsoft.Json; 8 | using Newtonsoft.Json.Linq; 9 | 10 | namespace ReMastersLib 11 | { 12 | public static class ProtoTableDumper 13 | { 14 | /// 15 | /// Converts the to a string with newlines separating each declaration for easy analysis. 16 | /// 17 | /// Decoded proto message data 18 | /// Single line string ready for writing to a file 19 | public static string DumpAll(this IMessage message) 20 | { 21 | var s = new JsonFormatter.Settings(true); 22 | var f = new JsonFormatter(s); 23 | var result = f.Format(message); 24 | return Prettify(result); 25 | } 26 | 27 | /// 28 | /// Converts each message in to a string. 29 | /// 30 | /// Type of message 31 | /// Decoded proto message data table 32 | /// Single line string ready for writing to a file 33 | public static IEnumerable DumpAllLines(this IEnumerable messages) 34 | { 35 | var s = new JsonFormatter.Settings(true); 36 | var f = new JsonFormatter(s); 37 | 38 | var size = messages.Count(); 39 | yield return "{\"entries\": ["; 40 | for (int i = 0; i < size; i++) 41 | yield return f.Format(messages.ElementAt(i)) + (i == size - 1 ? "" : ","); 42 | yield return "]}"; 43 | } 44 | 45 | private static string Prettify(string json) => JToken.Parse(json).ToString(Formatting.Indented); 46 | 47 | public static IEnumerable GetProtoTypes() 48 | { 49 | var type = typeof(IMessage); 50 | var types = Assembly.GetAssembly(typeof(ProtoTableDumper)).DefinedTypes 51 | .Where(p => type.IsAssignableFrom(p) && p.Name.EndsWith("Table")); 52 | return types; 53 | } 54 | 55 | public static string GetProtoString(Type t, byte[] data) 56 | { 57 | var table = GetProtoData(t, data); 58 | return table?.DumpAll(); 59 | } 60 | 61 | private static IMessage GetProtoData(Type t, byte[] data) 62 | { 63 | var method = t.GetProperty("Parser"); 64 | var arr = (MessageParser) method?.GetValue(null); 65 | return arr?.ParseFrom(data); 66 | } 67 | 68 | public static IEnumerable GetProtoStrings(Type t, byte[] data) 69 | { 70 | var table = GetProtoData(t, data); 71 | var ep = t.GetProperty("Entries"); 72 | if (ep == null) 73 | return null; 74 | var entries = ep.GetValue(table); 75 | var result = (IEnumerable)entries; 76 | return DumpAllLines(result); 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /ReMastersTest/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ReMastersTest.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ReMastersTest.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Byte[]. 65 | /// 66 | internal static byte[] _10259522396886124101 { 67 | get { 68 | object obj = ResourceManager.GetObject("_10259522396886124101", resourceCulture); 69 | return ((byte[])(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Byte[]. 75 | /// 76 | internal static byte[] assetdb_shard { 77 | get { 78 | object obj = ResourceManager.GetObject("assetdb_shard", resourceCulture); 79 | return ((byte[])(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// Looks up a localized resource of type System.Byte[]. 85 | /// 86 | internal static byte[] Monster { 87 | get { 88 | object obj = ResourceManager.GetObject("Monster", resourceCulture); 89 | return ((byte[])(obj)); 90 | } 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | *.vs 44 | 45 | # Build results 46 | 47 | [Dd]ebug/ 48 | [Rr]elease/ 49 | x64/ 50 | build/ 51 | [Bb]in/ 52 | [Oo]bj/ 53 | 54 | # MSTest test Results 55 | [Tt]est[Rr]esult*/ 56 | [Bb]uild[Ll]og.* 57 | 58 | *_i.c 59 | *_p.c 60 | *.ilk 61 | *.meta 62 | *.obj 63 | *.pch 64 | *.pdb 65 | *.pgc 66 | *.pgd 67 | *.rsp 68 | *.sbr 69 | *.tlb 70 | *.tli 71 | *.tlh 72 | *.tmp 73 | *.tmp_proj 74 | *.log 75 | *.vspscc 76 | *.vssscc 77 | .builds 78 | *.pidb 79 | *.log 80 | *.scc 81 | 82 | # Visual C++ cache files 83 | ipch/ 84 | *.aps 85 | *.ncb 86 | *.opensdf 87 | *.sdf 88 | *.cachefile 89 | 90 | # Visual Studio profiler 91 | *.psess 92 | *.vsp 93 | *.vspx 94 | 95 | # Guidance Automation Toolkit 96 | *.gpState 97 | 98 | # ReSharper is a .NET coding add-in 99 | _ReSharper*/ 100 | *.[Rr]e[Ss]harper 101 | 102 | # TeamCity is a build add-in 103 | _TeamCity* 104 | 105 | # DotCover is a Code Coverage Tool 106 | *.dotCover 107 | 108 | # NCrunch 109 | *.ncrunch* 110 | .*crunch*.local.xml 111 | 112 | # Installshield output folder 113 | [Ee]xpress/ 114 | 115 | # DocProject is a documentation generator add-in 116 | DocProject/buildhelp/ 117 | DocProject/Help/*.HxT 118 | DocProject/Help/*.HxC 119 | DocProject/Help/*.hhc 120 | DocProject/Help/*.hhk 121 | DocProject/Help/*.hhp 122 | DocProject/Help/Html2 123 | DocProject/Help/html 124 | 125 | # Click-Once directory 126 | publish/ 127 | 128 | # Publish Web Output 129 | *.Publish.xml 130 | *.pubxml 131 | 132 | # NuGet Packages Directory 133 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 134 | packages/ 135 | 136 | # Windows Azure Build Output 137 | csx 138 | *.build.csdef 139 | 140 | # Windows Store app package directory 141 | AppPackages/ 142 | 143 | # Others 144 | sql/ 145 | *.Cache 146 | ClientBin/ 147 | [Ss]tyle[Cc]op.* 148 | ~$* 149 | *~ 150 | *.dbmdl 151 | *.[Pp]ublish.xml 152 | *.pfx 153 | *.publishsettings 154 | 155 | # RIA/Silverlight projects 156 | Generated_Code/ 157 | 158 | # Backup & report files from converting an old project file to a newer 159 | # Visual Studio version. Backup files are not needed, because we have git ;-) 160 | _UpgradeReport_Files/ 161 | Backup*/ 162 | UpgradeLog*.XML 163 | UpgradeLog*.htm 164 | 165 | # SQL Server files 166 | App_Data/*.mdf 167 | App_Data/*.ldf 168 | 169 | 170 | ############# 171 | ## Qt Creator 172 | ############# 173 | 174 | *.save 175 | *.autosave 176 | 177 | ############# 178 | ## GNU Emacs 179 | ############# 180 | 181 | \#* 182 | .\#* 183 | *.elc 184 | 185 | 186 | ############# 187 | ## Windows detritus 188 | ############# 189 | 190 | # Windows image file caches 191 | Thumbs.db 192 | ehthumbs.db 193 | 194 | # Folder config file 195 | Desktop.ini 196 | 197 | # Recycle Bin used on file shares 198 | $RECYCLE.BIN/ 199 | 200 | 201 | ############# 202 | ## OS X 203 | ############# 204 | 205 | .DS_Store 206 | 207 | 208 | ############# 209 | ## C# 210 | ############# 211 | 212 | *.resources 213 | pingme.txt 214 | 215 | 216 | ############# 217 | ## Python 218 | ############# 219 | 220 | *.py[co] 221 | 222 | # Packages 223 | *.egg 224 | *.egg-info 225 | dist/ 226 | build/ 227 | eggs/ 228 | parts/ 229 | var/ 230 | sdist/ 231 | develop-eggs/ 232 | .installed.cfg 233 | 234 | # Installer logs 235 | pip-log.txt 236 | 237 | # Unit test / coverage reports 238 | .coverage 239 | .tox 240 | 241 | # Translations 242 | *.mo 243 | 244 | # Mr Developer 245 | .mr.developer.cfg 246 | 247 | ################# 248 | ## MonoDevelop 249 | ################# 250 | 251 | *.userprefs 252 | -------------------------------------------------------------------------------- /ReMastersLib/ABND/ABND.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Text; 5 | 6 | namespace ReMastersLib 7 | { 8 | /// 9 | /// Android Binary Name Dictionary (not real name) 10 | /// 11 | public class ABND 12 | { 13 | public uint MAGIC = 0x646E6261; // abnd 14 | 15 | private readonly byte[] Data; 16 | private readonly ABNDHeader Header; 17 | public readonly ABNDExtHeader ExtHeader; 18 | 19 | private readonly byte[] FileNameTable; 20 | 21 | public ABND(byte[] data) 22 | { 23 | Data = data; 24 | Header = Util.GetSlice(data, 0, ABNDHeader.SIZE).ByteArrayToStructure(); 25 | Debug.Assert(Header.Magic == MAGIC); 26 | Debug.Assert(Header.ExtHeaderOffset == ABNDHeader.SIZE); 27 | Debug.Assert(Header.ExtHeaderSize == ABNDExtHeader.SIZE); 28 | ExtHeader = Util.GetSlice(data, Header.ExtHeaderOffset, Header.ExtHeaderSize).ByteArrayToStructure(); 29 | 30 | Debug.Assert(ExtHeader.EncryptionType == EncryptionType.ChaCha); 31 | var payload = Util.GetSlice(data, ExtHeader.EStringTableOffset, ExtHeader.EStringTableLength); 32 | FileNameTable = ChaCha.Decrypt(payload, ExtHeader.IV, ExtHeader.MAC); 33 | } 34 | 35 | public ABNDFileEntry GetFileInfo(int index) 36 | { 37 | if (index > ExtHeader.FileCount) 38 | throw new ArgumentOutOfRangeException(nameof(index)); 39 | 40 | var metaTable = ExtHeader.MetaTableOffset; 41 | var entryOffset = (index * ABNDFileEntry.SIZE) + metaTable; 42 | 43 | var entryBytes = Util.GetSlice(Data, entryOffset, ABNDFileEntry.SIZE); 44 | var entry = entryBytes.ByteArrayToStructure(); 45 | return entry; 46 | } 47 | 48 | public byte[] GetFileData(int index) 49 | { 50 | var entry = GetFileInfo(index); 51 | return GetFileData(entry); 52 | } 53 | 54 | public byte[] GetFileData(ABNDFileEntry entry) 55 | { 56 | var chunks = GetChunkData(entry); 57 | 58 | if ((entry.Flags & ABNDFileEntryFlag.Encrypted) != 0) 59 | TryDecrypt(entry, chunks); 60 | 61 | var file_data = GetFileData(entry, chunks); 62 | Debug.Assert(file_data != null); 63 | 64 | return file_data; 65 | } 66 | 67 | private static void TryDecrypt(ABNDFileEntry entry, List chunks) 68 | { 69 | Debug.Assert(entry.EncryptionType == EncryptionType.ChaCha); 70 | 71 | uint totalLen = 0; 72 | foreach (var chunk in chunks) 73 | totalLen += chunk.Length; 74 | 75 | var encrypted = GetConcatenatedEncryptedChunks(totalLen, chunks); 76 | 77 | var IV = entry.IV; 78 | var xor = IV.Xor(12); 79 | var decrypted = ChaCha.Decrypt(encrypted, xor, entry.MAC); 80 | if (decrypted == null) 81 | throw new Exception(); 82 | 83 | // rechunk data 84 | GetDecryptedChunks(chunks, decrypted); 85 | } 86 | 87 | private static byte[] GetConcatenatedEncryptedChunks(uint totalLen, List chunks) 88 | { 89 | byte[] encrypted = new byte[totalLen]; 90 | 91 | uint offset = 0; 92 | foreach (var chunk in chunks) 93 | { 94 | chunk.Data.CopyTo(encrypted, offset); 95 | offset += chunk.Length; 96 | } 97 | 98 | return encrypted; 99 | } 100 | 101 | private static void GetDecryptedChunks(List chunks, byte[] decrypted) 102 | { 103 | int offset = 0; 104 | foreach (var chunk in chunks) 105 | { 106 | chunk.Data = Util.GetSlice(decrypted, offset, (int) chunk.Length); 107 | offset += (int) chunk.Length; 108 | } 109 | } 110 | 111 | private byte[] GetFileData(ABNDFileEntry entry, List chunks) 112 | { 113 | if ((entry.Flags & ABNDFileEntryFlag.Compressed) == 0) 114 | return GetDecompressedFileData(entry, chunks); 115 | 116 | var result = LZ4.DecodeChunks(chunks, ExtHeader.BlockSizeSectors << 9, entry.DecompressedLength); 117 | Debug.Assert(result.Length == entry.DecompressedLength); 118 | return result; 119 | } 120 | 121 | private static byte[] GetDecompressedFileData(ABNDFileEntry entry, List chunks) 122 | { 123 | Debug.Assert(entry.CompressedLength == entry.DecompressedLength); 124 | var result = new byte[entry.DecompressedLength]; 125 | 126 | uint offset = 0; 127 | foreach (var chunk in chunks) 128 | { 129 | chunk.Data.CopyTo(result, offset); 130 | offset += chunk.Length; 131 | } 132 | 133 | return result; 134 | } 135 | 136 | public string GetFileName(int index) 137 | { 138 | var entry = GetFileInfo(index); 139 | return GetFileName(entry); 140 | } 141 | 142 | public string GetFileName(ABNDFileEntry entry) 143 | { 144 | var encoding = Encoding.UTF8; 145 | return encoding.GetString(FileNameTable, entry.FileNameOffset, entry.FileNameLength); 146 | } 147 | 148 | public List GetChunkData(ABNDFileEntry entry) 149 | { 150 | var result = new List(); 151 | var ofs = entry.CompressedOffset; 152 | 153 | if ((entry.Flags & ABNDFileEntryFlag.Compressed) == 0) 154 | { 155 | var blob = new ABNDChunk 156 | { 157 | Data = Data, 158 | Length = (uint) entry.CompressedLength, 159 | }; 160 | result.Add(blob); 161 | return result; 162 | } 163 | 164 | do 165 | { 166 | var len = BitConverter.ToInt32(Data, ofs); 167 | 168 | // copy chunk data to final array at current position 169 | byte[] chunk = Util.GetSlice(Data, ofs + 4, len); 170 | var blob = new ABNDChunk 171 | { 172 | Data = chunk, 173 | Length = (uint) len, 174 | }; 175 | result.Add(blob); 176 | 177 | // advance to next chunk 178 | ofs += 4 + len; 179 | } while (ofs < entry.CompressedOffset + entry.CompressedLength); 180 | 181 | return result; 182 | } 183 | } 184 | } 185 | -------------------------------------------------------------------------------- /ReMastersTest/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\TestResources\assetdb_shard;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 123 | 124 | 125 | ..\TestResources\10259522396886124101;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 126 | 127 | 128 | ..\TestResources\Monster.pb;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 129 | 130 | -------------------------------------------------------------------------------- /ReMastersLib/GameDumper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.IO; 5 | using System.Text; 6 | using Newtonsoft.Json; 7 | using Newtonsoft.Json.Linq; 8 | using K4os.Hash.xxHash; 9 | using ReMastersLib.Sound; 10 | 11 | namespace ReMastersLib 12 | { 13 | public class GameDumper 14 | { 15 | public readonly string BasePath; 16 | public readonly string DownloadPath; 17 | private Dictionary ResourceDB; 18 | private Dictionary FileDB; 19 | private ABND AssetShard; 20 | 21 | /// 22 | /// Initializes the asset unpacker 23 | /// 24 | /// Root folder where the unpacked apk data resides. 25 | /// Root folder where the download data resides. 26 | public GameDumper(string root, string dlPath) 27 | { 28 | BasePath = root; 29 | DownloadPath = dlPath; 30 | // read in shards & file/folder maps 31 | } 32 | 33 | private void LoadResourceDB(string path) 34 | { 35 | var data = File.ReadAllBytes(path); 36 | var asdb = new ASDB(data); 37 | Debug.Assert(asdb.ExtHeader.EntrySize == 0x18); 38 | ResourceDB = asdb.GetEntryDictionary(); 39 | } 40 | 41 | private void LoadFileDB(string path) 42 | { 43 | var data = File.ReadAllBytes(path); 44 | var asdb = new ASDB(data); 45 | Debug.Assert(asdb.ExtHeader.EntrySize == 0x10); 46 | FileDB = asdb.GetEntryDictionary(); 47 | } 48 | 49 | public void LoadShard(string path) 50 | { 51 | var data = File.ReadAllBytes(path); 52 | AssetShard = new ABND(data); 53 | } 54 | 55 | public void InitializeShardData(string outRoot) 56 | { 57 | Directory.CreateDirectory(outRoot); 58 | // Process the asset database shard info, and load the unpacked files 59 | DumpABND(AssetShard, outRoot); 60 | LoadResourceDB(Path.Combine(outRoot, "resource_location.asdb")); 61 | LoadFileDB(Path.Combine(outRoot, "file_location.asdb")); 62 | // don't care about archive_info.asdb 63 | // don't care about bundle_header_hash.asdb 64 | } 65 | 66 | public void DumpMessagesAPK(string outRoot) 67 | { 68 | var messages = Path.Combine(BasePath, @"assets\resources\assets\Messages"); 69 | var jsonPath = Path.Combine(outRoot, "lsddump", "apk"); 70 | var txtPath = Path.Combine(outRoot, "lsddump", "lsd_apk.txt"); 71 | LSDDumper.Dump(messages, jsonPath, txtPath); 72 | } 73 | 74 | public void DumpMessagesDownload(string outRoot) 75 | { 76 | var messages = Path.Combine(outRoot, "Messages"); 77 | var jsonPath = Path.Combine(outRoot, "lsddump", "dl"); 78 | var txtPath = Path.Combine(outRoot, "lsddump", "lsd_dl.txt"); 79 | LSDDumper.Dump(messages, jsonPath, txtPath); 80 | } 81 | 82 | public void DumpResources(string outRoot) 83 | { 84 | // dump the abnd's, and track which ones we've already seen 85 | var processed = new HashSet(); 86 | 87 | foreach (var f in ResourceDB) 88 | { 89 | // Get the file's location on the disk 90 | var fn = f.Value.ContainerName; 91 | if (processed.Contains(fn)) 92 | continue; 93 | 94 | var folder = fn[0].ToString(); 95 | var file = Path.Combine(DownloadPath, folder, fn); 96 | 97 | if (!File.Exists(file)) 98 | { 99 | Debug.WriteLine("Unable to find file (optional?): " + fn); 100 | continue; 101 | } 102 | 103 | // Read ABND 104 | var data = File.ReadAllBytes(file); 105 | var abnd = new ABND(data); 106 | 107 | // Dump ABND to final location 108 | var outPath = outRoot; // Path.Combine(outRoot, fn); -- don't bother using the ABND zip name; just get everything in one folder 109 | DumpABND(abnd, outPath); 110 | 111 | processed.Add(fn); 112 | } 113 | } 114 | 115 | public void DumpSound(string outRoot) 116 | { 117 | foreach (var audioType in new[] {"BGM", "SE", "Voice_en", "Voice_ja"}) 118 | { 119 | var jsonPath = Path.Combine(outRoot, "sound", $"{audioType}.json"); 120 | if (!File.Exists(jsonPath)) 121 | continue; 122 | 123 | var audioJson = JObject.Parse(File.ReadAllText(jsonPath)); 124 | foreach (var audioBank in audioJson["audioBanks"]) 125 | { 126 | foreach (var audioResource in audioBank["audioResources"]) 127 | { 128 | var name = audioResource["name"].ToString(); 129 | var format = audioResource["format"].ToString(); 130 | if (format != "ogg") throw new ArgumentException($"Unknown format for {name}: {format}"); 131 | 132 | var fileID = XXH64.DigestOf(Encoding.ASCII.GetBytes($"{name}.{format}")); 133 | var folder = fileID; 134 | while (folder >= 10) 135 | folder /= 10; 136 | 137 | var resourcePath = Path.Combine(DownloadPath, $"{folder}", $"{fileID}"); 138 | 139 | if (!File.Exists(resourcePath)) 140 | { 141 | if (!name.StartsWith("sound/Bundle")) 142 | { 143 | Console.WriteLine($"Failed to find {name} ({resourcePath})"); 144 | } 145 | continue; 146 | } 147 | 148 | var sf = new SoundFile(File.ReadAllBytes(resourcePath)); 149 | 150 | var outPath = $"{Path.Combine(outRoot, name.Replace("/", $"{Path.DirectorySeparatorChar}"))}.{format}"; 151 | Directory.CreateDirectory(Path.GetDirectoryName(outPath)); 152 | File.WriteAllBytes(outPath, sf.Data); 153 | } 154 | } 155 | } 156 | } 157 | 158 | private void DumpSyncPairPreviewVideo(string outRoot) 159 | { 160 | var pbPath = Path.Combine(outRoot, @"db\master\pb\ScoutPickup.pb"); 161 | 162 | if (!File.Exists(pbPath)) 163 | pbPath = Path.Combine(outRoot, @"db\master\pb\LotteryPickup.pb"); // different name in v1.0.0 164 | 165 | if (!File.Exists(pbPath)) 166 | { 167 | Console.WriteLine($"Failed to find ScoutPickup.pb or LotteryPickup.pb: skip Sync Pair Preview videos"); 168 | return; 169 | } 170 | 171 | var table = ScoutPickupTable.Parser.ParseFrom(File.ReadAllBytes(pbPath)); 172 | foreach (var message in table.Entries) 173 | { 174 | var path = $"Movie/Scout/Pickup/{message.ScoutId}/{message.ScoutPickupId}.mp4"; 175 | var fileIDString = $"{XXH64.DigestOf(Encoding.ASCII.GetBytes(path))}"; 176 | var resourcePath = Path.Combine(DownloadPath, $"{fileIDString[0]}", fileIDString); 177 | if (!File.Exists(resourcePath)) 178 | { 179 | Console.WriteLine($"Failed to find {path} ({resourcePath})"); 180 | continue; 181 | } 182 | 183 | var outPath = $"{Path.Combine(outRoot, path.Replace("/", $"{Path.DirectorySeparatorChar}"))}"; 184 | Directory.CreateDirectory(Path.GetDirectoryName(outPath)); 185 | System.IO.File.Copy(resourcePath, outPath, true); 186 | } 187 | } 188 | 189 | private void DumpVideoWithUnknownName(string outRoot, Dictionary unkNameVideos) 190 | { 191 | foreach (var entry in FileDB.Values) 192 | { 193 | var fileIDString = $"{entry.FileID}"; 194 | if (!unkNameVideos.ContainsKey(fileIDString)) 195 | continue; 196 | 197 | var resourcePath = Path.Combine(DownloadPath, $"{entry.FileName[0]}", entry.FileName); 198 | if (!File.Exists(resourcePath)) 199 | { 200 | Console.WriteLine($"Failed to find video {resourcePath}"); 201 | continue; 202 | } 203 | 204 | // we don't know the actual video names, but can still place them in the correct(ish?) folder 205 | var relPath = Path.GetDirectoryName(unkNameVideos[fileIDString]).Replace("/", $"{Path.DirectorySeparatorChar}"); 206 | var outPath = $"{Path.Combine(outRoot, relPath, $"{entry.FileName}.mp4")}"; 207 | Directory.CreateDirectory(Path.GetDirectoryName(outPath)); 208 | System.IO.File.Copy(resourcePath, outPath, true); 209 | } 210 | } 211 | 212 | public void DumpMiscVideo(string outRoot) 213 | { 214 | var jsonPath = Path.Combine(outRoot, @"db\asset\bundles_archives.json"); 215 | if (!File.Exists(jsonPath)) 216 | return; 217 | 218 | var unkNameVideos = new Dictionary(); 219 | var json = JObject.Parse(File.ReadAllText(jsonPath)); 220 | foreach (var archive in json["archives"]) 221 | { 222 | var archiveName = archive["name"].ToString(); 223 | if (!archiveName.StartsWith("archive_Movie_")) 224 | continue; 225 | 226 | foreach (var p in archive["include"]) 227 | { 228 | var path = p.ToString(); 229 | if (path.EndsWith(".mp4")) 230 | { 231 | var fileIDString = $"{XXH64.DigestOf(Encoding.ASCII.GetBytes(path))}"; 232 | var resourcePath = Path.Combine(DownloadPath, $"{fileIDString[0]}", fileIDString); 233 | 234 | if (!File.Exists(resourcePath)) 235 | { 236 | Console.WriteLine($"Failed to find {path} ({resourcePath})"); 237 | continue; 238 | } 239 | 240 | var outPath = $"{Path.Combine(outRoot, path.Replace("/", $"{Path.DirectorySeparatorChar}"))}"; 241 | Directory.CreateDirectory(Path.GetDirectoryName(outPath)); 242 | System.IO.File.Copy(resourcePath, outPath, true); 243 | } 244 | else if (!path.StartsWith("Movie/Scout/Pickup/")) 245 | { 246 | var archiveNameHashString = $"{XXH64.DigestOf(Encoding.ASCII.GetBytes(archiveName))}"; 247 | if (unkNameVideos.ContainsKey(archiveNameHashString)) 248 | Console.WriteLine($"Multiple paths given for {archiveName}: fallback to {path}"); 249 | unkNameVideos[archiveNameHashString] = path; 250 | } 251 | } 252 | } 253 | DumpVideoWithUnknownName(outRoot, unkNameVideos); 254 | } 255 | 256 | public void DumpVideo(string outRoot) 257 | { 258 | DumpSyncPairPreviewVideo(outRoot); 259 | DumpMiscVideo(outRoot); 260 | } 261 | 262 | public void DumpProto(string outRoot, bool tableLayout = true) 263 | { 264 | var pdf = Path.Combine(outRoot, "protodump"); 265 | Directory.CreateDirectory(pdf); 266 | 267 | var types = ProtoTableDumper.GetProtoTypes(); 268 | foreach (var t in types) 269 | { 270 | var name = t.Name.Replace("Table", string.Empty); 271 | var filename = $"{name}.pb"; 272 | var path = Path.Combine(outRoot, @"db\master\pb\", filename); 273 | var outpath = Path.Combine(pdf, $"{name}.json"); 274 | if (!File.Exists(path)) 275 | { 276 | Debug.WriteLine($"Couldn't find proto data file: {name}"); 277 | continue; 278 | } 279 | var data = File.ReadAllBytes(path); 280 | 281 | if (tableLayout) 282 | { 283 | var result = ProtoTableDumper.GetProtoStrings(t, data); 284 | if (result == null) 285 | { 286 | Debug.WriteLine($"Bad conversion for {name}, skipping."); 287 | continue; 288 | } 289 | File.WriteAllLines(outpath, result); 290 | } 291 | else 292 | { 293 | var result = ProtoTableDumper.GetProtoString(t, data); 294 | if (result == null) 295 | { 296 | Debug.WriteLine($"Bad conversion for {name}, skipping."); 297 | continue; 298 | } 299 | File.WriteAllText(outpath, result); 300 | } 301 | } 302 | } 303 | 304 | /// 305 | /// Spits out all contents of the to the 306 | /// 307 | /// Archive 308 | /// Location to dump to 309 | private static void DumpABND(ABND abnd, string outPath) 310 | { 311 | Directory.CreateDirectory(outPath); 312 | for (int i = 0; i < abnd.ExtHeader.FileCount; i++) 313 | { 314 | var fi = abnd.GetFileInfo(i); 315 | var fn = abnd.GetFileName(fi); 316 | var fd = abnd.GetFileData(fi); 317 | 318 | var path = Path.Combine(outPath, fn); 319 | var di = Path.GetDirectoryName(path); 320 | if (di != null) 321 | Directory.CreateDirectory(di); 322 | 323 | File.WriteAllBytes(path, fd); 324 | } 325 | } 326 | } 327 | } -------------------------------------------------------------------------------- /ReMastersLib/Proto/Proto/EggConfig.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: Proto/EggConfig.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace ReMastersLib { 13 | 14 | /// Holder for reflection information generated from Proto/EggConfig.proto 15 | public static partial class EggConfigReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for Proto/EggConfig.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static EggConfigReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChVQcm90by9FZ2dDb25maWcucHJvdG8SDFJlTWFzdGVyc0xpYiIxCglFZ2dD", 28 | "b25maWcSFQoNZWdnX2NvbmZpZ19pZBgBIAEoCRINCgV2YWx1ZRgCIAEoAyI6", 29 | "Cg5FZ2dDb25maWdUYWJsZRIoCgdlbnRyaWVzGAEgAygLMhcuUmVNYXN0ZXJz", 30 | "TGliLkVnZ0NvbmZpZ2IGcHJvdG8z")); 31 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 32 | new pbr::FileDescriptor[] { }, 33 | new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { 34 | new pbr::GeneratedClrTypeInfo(typeof(global::ReMastersLib.EggConfig), global::ReMastersLib.EggConfig.Parser, new[]{ "EggConfigId", "Value" }, null, null, null, null), 35 | new pbr::GeneratedClrTypeInfo(typeof(global::ReMastersLib.EggConfigTable), global::ReMastersLib.EggConfigTable.Parser, new[]{ "Entries" }, null, null, null, null) 36 | })); 37 | } 38 | #endregion 39 | 40 | } 41 | #region Messages 42 | public sealed partial class EggConfig : pb::IMessage 43 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 44 | , pb::IBufferMessage 45 | #endif 46 | { 47 | private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EggConfig()); 48 | private pb::UnknownFieldSet _unknownFields; 49 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 50 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 51 | public static pb::MessageParser Parser { get { return _parser; } } 52 | 53 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 54 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 55 | public static pbr::MessageDescriptor Descriptor { 56 | get { return global::ReMastersLib.EggConfigReflection.Descriptor.MessageTypes[0]; } 57 | } 58 | 59 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 60 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 61 | pbr::MessageDescriptor pb::IMessage.Descriptor { 62 | get { return Descriptor; } 63 | } 64 | 65 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 66 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 67 | public EggConfig() { 68 | OnConstruction(); 69 | } 70 | 71 | partial void OnConstruction(); 72 | 73 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 74 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 75 | public EggConfig(EggConfig other) : this() { 76 | eggConfigId_ = other.eggConfigId_; 77 | value_ = other.value_; 78 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 79 | } 80 | 81 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 82 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 83 | public EggConfig Clone() { 84 | return new EggConfig(this); 85 | } 86 | 87 | /// Field number for the "egg_config_id" field. 88 | public const int EggConfigIdFieldNumber = 1; 89 | private string eggConfigId_ = ""; 90 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 91 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 92 | public string EggConfigId { 93 | get { return eggConfigId_; } 94 | set { 95 | eggConfigId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 96 | } 97 | } 98 | 99 | /// Field number for the "value" field. 100 | public const int ValueFieldNumber = 2; 101 | private long value_; 102 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 103 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 104 | public long Value { 105 | get { return value_; } 106 | set { 107 | value_ = value; 108 | } 109 | } 110 | 111 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 112 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 113 | public override bool Equals(object other) { 114 | return Equals(other as EggConfig); 115 | } 116 | 117 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 118 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 119 | public bool Equals(EggConfig other) { 120 | if (ReferenceEquals(other, null)) { 121 | return false; 122 | } 123 | if (ReferenceEquals(other, this)) { 124 | return true; 125 | } 126 | if (EggConfigId != other.EggConfigId) return false; 127 | if (Value != other.Value) return false; 128 | return Equals(_unknownFields, other._unknownFields); 129 | } 130 | 131 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 132 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 133 | public override int GetHashCode() { 134 | int hash = 1; 135 | if (EggConfigId.Length != 0) hash ^= EggConfigId.GetHashCode(); 136 | if (Value != 0L) hash ^= Value.GetHashCode(); 137 | if (_unknownFields != null) { 138 | hash ^= _unknownFields.GetHashCode(); 139 | } 140 | return hash; 141 | } 142 | 143 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 144 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 145 | public override string ToString() { 146 | return pb::JsonFormatter.ToDiagnosticString(this); 147 | } 148 | 149 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 150 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 151 | public void WriteTo(pb::CodedOutputStream output) { 152 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 153 | output.WriteRawMessage(this); 154 | #else 155 | if (EggConfigId.Length != 0) { 156 | output.WriteRawTag(10); 157 | output.WriteString(EggConfigId); 158 | } 159 | if (Value != 0L) { 160 | output.WriteRawTag(16); 161 | output.WriteInt64(Value); 162 | } 163 | if (_unknownFields != null) { 164 | _unknownFields.WriteTo(output); 165 | } 166 | #endif 167 | } 168 | 169 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 170 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 171 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 172 | void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 173 | if (EggConfigId.Length != 0) { 174 | output.WriteRawTag(10); 175 | output.WriteString(EggConfigId); 176 | } 177 | if (Value != 0L) { 178 | output.WriteRawTag(16); 179 | output.WriteInt64(Value); 180 | } 181 | if (_unknownFields != null) { 182 | _unknownFields.WriteTo(ref output); 183 | } 184 | } 185 | #endif 186 | 187 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 188 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 189 | public int CalculateSize() { 190 | int size = 0; 191 | if (EggConfigId.Length != 0) { 192 | size += 1 + pb::CodedOutputStream.ComputeStringSize(EggConfigId); 193 | } 194 | if (Value != 0L) { 195 | size += 1 + pb::CodedOutputStream.ComputeInt64Size(Value); 196 | } 197 | if (_unknownFields != null) { 198 | size += _unknownFields.CalculateSize(); 199 | } 200 | return size; 201 | } 202 | 203 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 204 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 205 | public void MergeFrom(EggConfig other) { 206 | if (other == null) { 207 | return; 208 | } 209 | if (other.EggConfigId.Length != 0) { 210 | EggConfigId = other.EggConfigId; 211 | } 212 | if (other.Value != 0L) { 213 | Value = other.Value; 214 | } 215 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 216 | } 217 | 218 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 219 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 220 | public void MergeFrom(pb::CodedInputStream input) { 221 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 222 | input.ReadRawMessage(this); 223 | #else 224 | uint tag; 225 | while ((tag = input.ReadTag()) != 0) { 226 | switch(tag) { 227 | default: 228 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 229 | break; 230 | case 10: { 231 | EggConfigId = input.ReadString(); 232 | break; 233 | } 234 | case 16: { 235 | Value = input.ReadInt64(); 236 | break; 237 | } 238 | } 239 | } 240 | #endif 241 | } 242 | 243 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 244 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 245 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 246 | void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 247 | uint tag; 248 | while ((tag = input.ReadTag()) != 0) { 249 | switch(tag) { 250 | default: 251 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 252 | break; 253 | case 10: { 254 | EggConfigId = input.ReadString(); 255 | break; 256 | } 257 | case 16: { 258 | Value = input.ReadInt64(); 259 | break; 260 | } 261 | } 262 | } 263 | } 264 | #endif 265 | 266 | } 267 | 268 | public sealed partial class EggConfigTable : pb::IMessage 269 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 270 | , pb::IBufferMessage 271 | #endif 272 | { 273 | private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EggConfigTable()); 274 | private pb::UnknownFieldSet _unknownFields; 275 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 276 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 277 | public static pb::MessageParser Parser { get { return _parser; } } 278 | 279 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 280 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 281 | public static pbr::MessageDescriptor Descriptor { 282 | get { return global::ReMastersLib.EggConfigReflection.Descriptor.MessageTypes[1]; } 283 | } 284 | 285 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 286 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 287 | pbr::MessageDescriptor pb::IMessage.Descriptor { 288 | get { return Descriptor; } 289 | } 290 | 291 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 292 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 293 | public EggConfigTable() { 294 | OnConstruction(); 295 | } 296 | 297 | partial void OnConstruction(); 298 | 299 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 300 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 301 | public EggConfigTable(EggConfigTable other) : this() { 302 | entries_ = other.entries_.Clone(); 303 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 304 | } 305 | 306 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 307 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 308 | public EggConfigTable Clone() { 309 | return new EggConfigTable(this); 310 | } 311 | 312 | /// Field number for the "entries" field. 313 | public const int EntriesFieldNumber = 1; 314 | private static readonly pb::FieldCodec _repeated_entries_codec 315 | = pb::FieldCodec.ForMessage(10, global::ReMastersLib.EggConfig.Parser); 316 | private readonly pbc::RepeatedField entries_ = new pbc::RepeatedField(); 317 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 318 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 319 | public pbc::RepeatedField Entries { 320 | get { return entries_; } 321 | } 322 | 323 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 324 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 325 | public override bool Equals(object other) { 326 | return Equals(other as EggConfigTable); 327 | } 328 | 329 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 330 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 331 | public bool Equals(EggConfigTable other) { 332 | if (ReferenceEquals(other, null)) { 333 | return false; 334 | } 335 | if (ReferenceEquals(other, this)) { 336 | return true; 337 | } 338 | if(!entries_.Equals(other.entries_)) return false; 339 | return Equals(_unknownFields, other._unknownFields); 340 | } 341 | 342 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 343 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 344 | public override int GetHashCode() { 345 | int hash = 1; 346 | hash ^= entries_.GetHashCode(); 347 | if (_unknownFields != null) { 348 | hash ^= _unknownFields.GetHashCode(); 349 | } 350 | return hash; 351 | } 352 | 353 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 354 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 355 | public override string ToString() { 356 | return pb::JsonFormatter.ToDiagnosticString(this); 357 | } 358 | 359 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 360 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 361 | public void WriteTo(pb::CodedOutputStream output) { 362 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 363 | output.WriteRawMessage(this); 364 | #else 365 | entries_.WriteTo(output, _repeated_entries_codec); 366 | if (_unknownFields != null) { 367 | _unknownFields.WriteTo(output); 368 | } 369 | #endif 370 | } 371 | 372 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 373 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 374 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 375 | void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 376 | entries_.WriteTo(ref output, _repeated_entries_codec); 377 | if (_unknownFields != null) { 378 | _unknownFields.WriteTo(ref output); 379 | } 380 | } 381 | #endif 382 | 383 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 384 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 385 | public int CalculateSize() { 386 | int size = 0; 387 | size += entries_.CalculateSize(_repeated_entries_codec); 388 | if (_unknownFields != null) { 389 | size += _unknownFields.CalculateSize(); 390 | } 391 | return size; 392 | } 393 | 394 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 395 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 396 | public void MergeFrom(EggConfigTable other) { 397 | if (other == null) { 398 | return; 399 | } 400 | entries_.Add(other.entries_); 401 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 402 | } 403 | 404 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 405 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 406 | public void MergeFrom(pb::CodedInputStream input) { 407 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 408 | input.ReadRawMessage(this); 409 | #else 410 | uint tag; 411 | while ((tag = input.ReadTag()) != 0) { 412 | switch(tag) { 413 | default: 414 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 415 | break; 416 | case 10: { 417 | entries_.AddEntriesFrom(input, _repeated_entries_codec); 418 | break; 419 | } 420 | } 421 | } 422 | #endif 423 | } 424 | 425 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 426 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 427 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 428 | void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 429 | uint tag; 430 | while ((tag = input.ReadTag()) != 0) { 431 | switch(tag) { 432 | default: 433 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 434 | break; 435 | case 10: { 436 | entries_.AddEntriesFrom(ref input, _repeated_entries_codec); 437 | break; 438 | } 439 | } 440 | } 441 | } 442 | #endif 443 | 444 | } 445 | 446 | #endregion 447 | 448 | } 449 | 450 | #endregion Designer generated code 451 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Proto/Potential.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: Proto/Potential.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace ReMastersLib { 13 | 14 | /// Holder for reflection information generated from Proto/Potential.proto 15 | public static partial class PotentialReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for Proto/Potential.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static PotentialReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChVQcm90by9Qb3RlbnRpYWwucHJvdG8SDFJlTWFzdGVyc0xpYiIxCglQb3Rl", 28 | "bnRpYWwSFAoMcG90ZW50aWFsX2lkGAEgASgFEg4KBnJhcml0eRgCIAEoBSI6", 29 | "Cg5Qb3RlbnRpYWxUYWJsZRIoCgdlbnRyaWVzGAEgAygLMhcuUmVNYXN0ZXJz", 30 | "TGliLlBvdGVudGlhbGIGcHJvdG8z")); 31 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 32 | new pbr::FileDescriptor[] { }, 33 | new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { 34 | new pbr::GeneratedClrTypeInfo(typeof(global::ReMastersLib.Potential), global::ReMastersLib.Potential.Parser, new[]{ "PotentialId", "Rarity" }, null, null, null, null), 35 | new pbr::GeneratedClrTypeInfo(typeof(global::ReMastersLib.PotentialTable), global::ReMastersLib.PotentialTable.Parser, new[]{ "Entries" }, null, null, null, null) 36 | })); 37 | } 38 | #endregion 39 | 40 | } 41 | #region Messages 42 | public sealed partial class Potential : pb::IMessage 43 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 44 | , pb::IBufferMessage 45 | #endif 46 | { 47 | private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Potential()); 48 | private pb::UnknownFieldSet _unknownFields; 49 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 50 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 51 | public static pb::MessageParser Parser { get { return _parser; } } 52 | 53 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 54 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 55 | public static pbr::MessageDescriptor Descriptor { 56 | get { return global::ReMastersLib.PotentialReflection.Descriptor.MessageTypes[0]; } 57 | } 58 | 59 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 60 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 61 | pbr::MessageDescriptor pb::IMessage.Descriptor { 62 | get { return Descriptor; } 63 | } 64 | 65 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 66 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 67 | public Potential() { 68 | OnConstruction(); 69 | } 70 | 71 | partial void OnConstruction(); 72 | 73 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 74 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 75 | public Potential(Potential other) : this() { 76 | potentialId_ = other.potentialId_; 77 | rarity_ = other.rarity_; 78 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 79 | } 80 | 81 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 82 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 83 | public Potential Clone() { 84 | return new Potential(this); 85 | } 86 | 87 | /// Field number for the "potential_id" field. 88 | public const int PotentialIdFieldNumber = 1; 89 | private int potentialId_; 90 | /// 91 | /// passive_skill_name_xx.lsd / passive_skill_description_xx.lsd 92 | /// 93 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 94 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 95 | public int PotentialId { 96 | get { return potentialId_; } 97 | set { 98 | potentialId_ = value; 99 | } 100 | } 101 | 102 | /// Field number for the "rarity" field. 103 | public const int RarityFieldNumber = 2; 104 | private int rarity_; 105 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 106 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 107 | public int Rarity { 108 | get { return rarity_; } 109 | set { 110 | rarity_ = value; 111 | } 112 | } 113 | 114 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 115 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 116 | public override bool Equals(object other) { 117 | return Equals(other as Potential); 118 | } 119 | 120 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 121 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 122 | public bool Equals(Potential other) { 123 | if (ReferenceEquals(other, null)) { 124 | return false; 125 | } 126 | if (ReferenceEquals(other, this)) { 127 | return true; 128 | } 129 | if (PotentialId != other.PotentialId) return false; 130 | if (Rarity != other.Rarity) return false; 131 | return Equals(_unknownFields, other._unknownFields); 132 | } 133 | 134 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 135 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 136 | public override int GetHashCode() { 137 | int hash = 1; 138 | if (PotentialId != 0) hash ^= PotentialId.GetHashCode(); 139 | if (Rarity != 0) hash ^= Rarity.GetHashCode(); 140 | if (_unknownFields != null) { 141 | hash ^= _unknownFields.GetHashCode(); 142 | } 143 | return hash; 144 | } 145 | 146 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 147 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 148 | public override string ToString() { 149 | return pb::JsonFormatter.ToDiagnosticString(this); 150 | } 151 | 152 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 153 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 154 | public void WriteTo(pb::CodedOutputStream output) { 155 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 156 | output.WriteRawMessage(this); 157 | #else 158 | if (PotentialId != 0) { 159 | output.WriteRawTag(8); 160 | output.WriteInt32(PotentialId); 161 | } 162 | if (Rarity != 0) { 163 | output.WriteRawTag(16); 164 | output.WriteInt32(Rarity); 165 | } 166 | if (_unknownFields != null) { 167 | _unknownFields.WriteTo(output); 168 | } 169 | #endif 170 | } 171 | 172 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 173 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 174 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 175 | void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 176 | if (PotentialId != 0) { 177 | output.WriteRawTag(8); 178 | output.WriteInt32(PotentialId); 179 | } 180 | if (Rarity != 0) { 181 | output.WriteRawTag(16); 182 | output.WriteInt32(Rarity); 183 | } 184 | if (_unknownFields != null) { 185 | _unknownFields.WriteTo(ref output); 186 | } 187 | } 188 | #endif 189 | 190 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 191 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 192 | public int CalculateSize() { 193 | int size = 0; 194 | if (PotentialId != 0) { 195 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(PotentialId); 196 | } 197 | if (Rarity != 0) { 198 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Rarity); 199 | } 200 | if (_unknownFields != null) { 201 | size += _unknownFields.CalculateSize(); 202 | } 203 | return size; 204 | } 205 | 206 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 207 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 208 | public void MergeFrom(Potential other) { 209 | if (other == null) { 210 | return; 211 | } 212 | if (other.PotentialId != 0) { 213 | PotentialId = other.PotentialId; 214 | } 215 | if (other.Rarity != 0) { 216 | Rarity = other.Rarity; 217 | } 218 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 219 | } 220 | 221 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 222 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 223 | public void MergeFrom(pb::CodedInputStream input) { 224 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 225 | input.ReadRawMessage(this); 226 | #else 227 | uint tag; 228 | while ((tag = input.ReadTag()) != 0) { 229 | switch(tag) { 230 | default: 231 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 232 | break; 233 | case 8: { 234 | PotentialId = input.ReadInt32(); 235 | break; 236 | } 237 | case 16: { 238 | Rarity = input.ReadInt32(); 239 | break; 240 | } 241 | } 242 | } 243 | #endif 244 | } 245 | 246 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 247 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 248 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 249 | void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 250 | uint tag; 251 | while ((tag = input.ReadTag()) != 0) { 252 | switch(tag) { 253 | default: 254 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 255 | break; 256 | case 8: { 257 | PotentialId = input.ReadInt32(); 258 | break; 259 | } 260 | case 16: { 261 | Rarity = input.ReadInt32(); 262 | break; 263 | } 264 | } 265 | } 266 | } 267 | #endif 268 | 269 | } 270 | 271 | public sealed partial class PotentialTable : pb::IMessage 272 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 273 | , pb::IBufferMessage 274 | #endif 275 | { 276 | private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PotentialTable()); 277 | private pb::UnknownFieldSet _unknownFields; 278 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 279 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 280 | public static pb::MessageParser Parser { get { return _parser; } } 281 | 282 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 283 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 284 | public static pbr::MessageDescriptor Descriptor { 285 | get { return global::ReMastersLib.PotentialReflection.Descriptor.MessageTypes[1]; } 286 | } 287 | 288 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 289 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 290 | pbr::MessageDescriptor pb::IMessage.Descriptor { 291 | get { return Descriptor; } 292 | } 293 | 294 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 295 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 296 | public PotentialTable() { 297 | OnConstruction(); 298 | } 299 | 300 | partial void OnConstruction(); 301 | 302 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 303 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 304 | public PotentialTable(PotentialTable other) : this() { 305 | entries_ = other.entries_.Clone(); 306 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 307 | } 308 | 309 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 310 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 311 | public PotentialTable Clone() { 312 | return new PotentialTable(this); 313 | } 314 | 315 | /// Field number for the "entries" field. 316 | public const int EntriesFieldNumber = 1; 317 | private static readonly pb::FieldCodec _repeated_entries_codec 318 | = pb::FieldCodec.ForMessage(10, global::ReMastersLib.Potential.Parser); 319 | private readonly pbc::RepeatedField entries_ = new pbc::RepeatedField(); 320 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 321 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 322 | public pbc::RepeatedField Entries { 323 | get { return entries_; } 324 | } 325 | 326 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 327 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 328 | public override bool Equals(object other) { 329 | return Equals(other as PotentialTable); 330 | } 331 | 332 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 333 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 334 | public bool Equals(PotentialTable other) { 335 | if (ReferenceEquals(other, null)) { 336 | return false; 337 | } 338 | if (ReferenceEquals(other, this)) { 339 | return true; 340 | } 341 | if(!entries_.Equals(other.entries_)) return false; 342 | return Equals(_unknownFields, other._unknownFields); 343 | } 344 | 345 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 346 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 347 | public override int GetHashCode() { 348 | int hash = 1; 349 | hash ^= entries_.GetHashCode(); 350 | if (_unknownFields != null) { 351 | hash ^= _unknownFields.GetHashCode(); 352 | } 353 | return hash; 354 | } 355 | 356 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 357 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 358 | public override string ToString() { 359 | return pb::JsonFormatter.ToDiagnosticString(this); 360 | } 361 | 362 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 363 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 364 | public void WriteTo(pb::CodedOutputStream output) { 365 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 366 | output.WriteRawMessage(this); 367 | #else 368 | entries_.WriteTo(output, _repeated_entries_codec); 369 | if (_unknownFields != null) { 370 | _unknownFields.WriteTo(output); 371 | } 372 | #endif 373 | } 374 | 375 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 376 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 377 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 378 | void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 379 | entries_.WriteTo(ref output, _repeated_entries_codec); 380 | if (_unknownFields != null) { 381 | _unknownFields.WriteTo(ref output); 382 | } 383 | } 384 | #endif 385 | 386 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 387 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 388 | public int CalculateSize() { 389 | int size = 0; 390 | size += entries_.CalculateSize(_repeated_entries_codec); 391 | if (_unknownFields != null) { 392 | size += _unknownFields.CalculateSize(); 393 | } 394 | return size; 395 | } 396 | 397 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 398 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 399 | public void MergeFrom(PotentialTable other) { 400 | if (other == null) { 401 | return; 402 | } 403 | entries_.Add(other.entries_); 404 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 405 | } 406 | 407 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 408 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 409 | public void MergeFrom(pb::CodedInputStream input) { 410 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 411 | input.ReadRawMessage(this); 412 | #else 413 | uint tag; 414 | while ((tag = input.ReadTag()) != 0) { 415 | switch(tag) { 416 | default: 417 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 418 | break; 419 | case 10: { 420 | entries_.AddEntriesFrom(input, _repeated_entries_codec); 421 | break; 422 | } 423 | } 424 | } 425 | #endif 426 | } 427 | 428 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 429 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 430 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 431 | void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 432 | uint tag; 433 | while ((tag = input.ReadTag()) != 0) { 434 | switch(tag) { 435 | default: 436 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 437 | break; 438 | case 10: { 439 | entries_.AddEntriesFrom(ref input, _repeated_entries_codec); 440 | break; 441 | } 442 | } 443 | } 444 | } 445 | #endif 446 | 447 | } 448 | 449 | #endregion 450 | 451 | } 452 | 453 | #endregion Designer generated code 454 | -------------------------------------------------------------------------------- /ReMastersLib/Proto/Proto/LegendQuest.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: Proto/LegendQuest.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace ReMastersLib { 13 | 14 | /// Holder for reflection information generated from Proto/LegendQuest.proto 15 | public static partial class LegendQuestReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for Proto/LegendQuest.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static LegendQuestReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChdQcm90by9MZWdlbmRRdWVzdC5wcm90bxIMUmVNYXN0ZXJzTGliIjYKC0xl", 28 | "Z2VuZFF1ZXN0EhYKDnN0b3J5X3F1ZXN0X2lkGAEgASgDEg8KB2l0ZW1faWQY", 29 | "AiABKAMiPgoQTGVnZW5kUXVlc3RUYWJsZRIqCgdlbnRyaWVzGAEgAygLMhku", 30 | "UmVNYXN0ZXJzTGliLkxlZ2VuZFF1ZXN0YgZwcm90bzM=")); 31 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 32 | new pbr::FileDescriptor[] { }, 33 | new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { 34 | new pbr::GeneratedClrTypeInfo(typeof(global::ReMastersLib.LegendQuest), global::ReMastersLib.LegendQuest.Parser, new[]{ "StoryQuestId", "ItemId" }, null, null, null, null), 35 | new pbr::GeneratedClrTypeInfo(typeof(global::ReMastersLib.LegendQuestTable), global::ReMastersLib.LegendQuestTable.Parser, new[]{ "Entries" }, null, null, null, null) 36 | })); 37 | } 38 | #endregion 39 | 40 | } 41 | #region Messages 42 | public sealed partial class LegendQuest : pb::IMessage 43 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 44 | , pb::IBufferMessage 45 | #endif 46 | { 47 | private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LegendQuest()); 48 | private pb::UnknownFieldSet _unknownFields; 49 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 50 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 51 | public static pb::MessageParser Parser { get { return _parser; } } 52 | 53 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 54 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 55 | public static pbr::MessageDescriptor Descriptor { 56 | get { return global::ReMastersLib.LegendQuestReflection.Descriptor.MessageTypes[0]; } 57 | } 58 | 59 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 60 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 61 | pbr::MessageDescriptor pb::IMessage.Descriptor { 62 | get { return Descriptor; } 63 | } 64 | 65 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 66 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 67 | public LegendQuest() { 68 | OnConstruction(); 69 | } 70 | 71 | partial void OnConstruction(); 72 | 73 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 74 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 75 | public LegendQuest(LegendQuest other) : this() { 76 | storyQuestId_ = other.storyQuestId_; 77 | itemId_ = other.itemId_; 78 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 79 | } 80 | 81 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 82 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 83 | public LegendQuest Clone() { 84 | return new LegendQuest(this); 85 | } 86 | 87 | /// Field number for the "story_quest_id" field. 88 | public const int StoryQuestIdFieldNumber = 1; 89 | private long storyQuestId_; 90 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 91 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 92 | public long StoryQuestId { 93 | get { return storyQuestId_; } 94 | set { 95 | storyQuestId_ = value; 96 | } 97 | } 98 | 99 | /// Field number for the "item_id" field. 100 | public const int ItemIdFieldNumber = 2; 101 | private long itemId_; 102 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 103 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 104 | public long ItemId { 105 | get { return itemId_; } 106 | set { 107 | itemId_ = value; 108 | } 109 | } 110 | 111 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 112 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 113 | public override bool Equals(object other) { 114 | return Equals(other as LegendQuest); 115 | } 116 | 117 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 118 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 119 | public bool Equals(LegendQuest other) { 120 | if (ReferenceEquals(other, null)) { 121 | return false; 122 | } 123 | if (ReferenceEquals(other, this)) { 124 | return true; 125 | } 126 | if (StoryQuestId != other.StoryQuestId) return false; 127 | if (ItemId != other.ItemId) return false; 128 | return Equals(_unknownFields, other._unknownFields); 129 | } 130 | 131 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 132 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 133 | public override int GetHashCode() { 134 | int hash = 1; 135 | if (StoryQuestId != 0L) hash ^= StoryQuestId.GetHashCode(); 136 | if (ItemId != 0L) hash ^= ItemId.GetHashCode(); 137 | if (_unknownFields != null) { 138 | hash ^= _unknownFields.GetHashCode(); 139 | } 140 | return hash; 141 | } 142 | 143 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 144 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 145 | public override string ToString() { 146 | return pb::JsonFormatter.ToDiagnosticString(this); 147 | } 148 | 149 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 150 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 151 | public void WriteTo(pb::CodedOutputStream output) { 152 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 153 | output.WriteRawMessage(this); 154 | #else 155 | if (StoryQuestId != 0L) { 156 | output.WriteRawTag(8); 157 | output.WriteInt64(StoryQuestId); 158 | } 159 | if (ItemId != 0L) { 160 | output.WriteRawTag(16); 161 | output.WriteInt64(ItemId); 162 | } 163 | if (_unknownFields != null) { 164 | _unknownFields.WriteTo(output); 165 | } 166 | #endif 167 | } 168 | 169 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 170 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 171 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 172 | void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 173 | if (StoryQuestId != 0L) { 174 | output.WriteRawTag(8); 175 | output.WriteInt64(StoryQuestId); 176 | } 177 | if (ItemId != 0L) { 178 | output.WriteRawTag(16); 179 | output.WriteInt64(ItemId); 180 | } 181 | if (_unknownFields != null) { 182 | _unknownFields.WriteTo(ref output); 183 | } 184 | } 185 | #endif 186 | 187 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 188 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 189 | public int CalculateSize() { 190 | int size = 0; 191 | if (StoryQuestId != 0L) { 192 | size += 1 + pb::CodedOutputStream.ComputeInt64Size(StoryQuestId); 193 | } 194 | if (ItemId != 0L) { 195 | size += 1 + pb::CodedOutputStream.ComputeInt64Size(ItemId); 196 | } 197 | if (_unknownFields != null) { 198 | size += _unknownFields.CalculateSize(); 199 | } 200 | return size; 201 | } 202 | 203 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 204 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 205 | public void MergeFrom(LegendQuest other) { 206 | if (other == null) { 207 | return; 208 | } 209 | if (other.StoryQuestId != 0L) { 210 | StoryQuestId = other.StoryQuestId; 211 | } 212 | if (other.ItemId != 0L) { 213 | ItemId = other.ItemId; 214 | } 215 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 216 | } 217 | 218 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 219 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 220 | public void MergeFrom(pb::CodedInputStream input) { 221 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 222 | input.ReadRawMessage(this); 223 | #else 224 | uint tag; 225 | while ((tag = input.ReadTag()) != 0) { 226 | switch(tag) { 227 | default: 228 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 229 | break; 230 | case 8: { 231 | StoryQuestId = input.ReadInt64(); 232 | break; 233 | } 234 | case 16: { 235 | ItemId = input.ReadInt64(); 236 | break; 237 | } 238 | } 239 | } 240 | #endif 241 | } 242 | 243 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 244 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 245 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 246 | void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 247 | uint tag; 248 | while ((tag = input.ReadTag()) != 0) { 249 | switch(tag) { 250 | default: 251 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 252 | break; 253 | case 8: { 254 | StoryQuestId = input.ReadInt64(); 255 | break; 256 | } 257 | case 16: { 258 | ItemId = input.ReadInt64(); 259 | break; 260 | } 261 | } 262 | } 263 | } 264 | #endif 265 | 266 | } 267 | 268 | public sealed partial class LegendQuestTable : pb::IMessage 269 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 270 | , pb::IBufferMessage 271 | #endif 272 | { 273 | private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LegendQuestTable()); 274 | private pb::UnknownFieldSet _unknownFields; 275 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 276 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 277 | public static pb::MessageParser Parser { get { return _parser; } } 278 | 279 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 280 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 281 | public static pbr::MessageDescriptor Descriptor { 282 | get { return global::ReMastersLib.LegendQuestReflection.Descriptor.MessageTypes[1]; } 283 | } 284 | 285 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 286 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 287 | pbr::MessageDescriptor pb::IMessage.Descriptor { 288 | get { return Descriptor; } 289 | } 290 | 291 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 292 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 293 | public LegendQuestTable() { 294 | OnConstruction(); 295 | } 296 | 297 | partial void OnConstruction(); 298 | 299 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 300 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 301 | public LegendQuestTable(LegendQuestTable other) : this() { 302 | entries_ = other.entries_.Clone(); 303 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 304 | } 305 | 306 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 307 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 308 | public LegendQuestTable Clone() { 309 | return new LegendQuestTable(this); 310 | } 311 | 312 | /// Field number for the "entries" field. 313 | public const int EntriesFieldNumber = 1; 314 | private static readonly pb::FieldCodec _repeated_entries_codec 315 | = pb::FieldCodec.ForMessage(10, global::ReMastersLib.LegendQuest.Parser); 316 | private readonly pbc::RepeatedField entries_ = new pbc::RepeatedField(); 317 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 318 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 319 | public pbc::RepeatedField Entries { 320 | get { return entries_; } 321 | } 322 | 323 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 324 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 325 | public override bool Equals(object other) { 326 | return Equals(other as LegendQuestTable); 327 | } 328 | 329 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 330 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 331 | public bool Equals(LegendQuestTable other) { 332 | if (ReferenceEquals(other, null)) { 333 | return false; 334 | } 335 | if (ReferenceEquals(other, this)) { 336 | return true; 337 | } 338 | if(!entries_.Equals(other.entries_)) return false; 339 | return Equals(_unknownFields, other._unknownFields); 340 | } 341 | 342 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 343 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 344 | public override int GetHashCode() { 345 | int hash = 1; 346 | hash ^= entries_.GetHashCode(); 347 | if (_unknownFields != null) { 348 | hash ^= _unknownFields.GetHashCode(); 349 | } 350 | return hash; 351 | } 352 | 353 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 354 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 355 | public override string ToString() { 356 | return pb::JsonFormatter.ToDiagnosticString(this); 357 | } 358 | 359 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 360 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 361 | public void WriteTo(pb::CodedOutputStream output) { 362 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 363 | output.WriteRawMessage(this); 364 | #else 365 | entries_.WriteTo(output, _repeated_entries_codec); 366 | if (_unknownFields != null) { 367 | _unknownFields.WriteTo(output); 368 | } 369 | #endif 370 | } 371 | 372 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 373 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 374 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 375 | void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 376 | entries_.WriteTo(ref output, _repeated_entries_codec); 377 | if (_unknownFields != null) { 378 | _unknownFields.WriteTo(ref output); 379 | } 380 | } 381 | #endif 382 | 383 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 384 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 385 | public int CalculateSize() { 386 | int size = 0; 387 | size += entries_.CalculateSize(_repeated_entries_codec); 388 | if (_unknownFields != null) { 389 | size += _unknownFields.CalculateSize(); 390 | } 391 | return size; 392 | } 393 | 394 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 395 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 396 | public void MergeFrom(LegendQuestTable other) { 397 | if (other == null) { 398 | return; 399 | } 400 | entries_.Add(other.entries_); 401 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 402 | } 403 | 404 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 405 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 406 | public void MergeFrom(pb::CodedInputStream input) { 407 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 408 | input.ReadRawMessage(this); 409 | #else 410 | uint tag; 411 | while ((tag = input.ReadTag()) != 0) { 412 | switch(tag) { 413 | default: 414 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 415 | break; 416 | case 10: { 417 | entries_.AddEntriesFrom(input, _repeated_entries_codec); 418 | break; 419 | } 420 | } 421 | } 422 | #endif 423 | } 424 | 425 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 426 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 427 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 428 | void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 429 | uint tag; 430 | while ((tag = input.ReadTag()) != 0) { 431 | switch(tag) { 432 | default: 433 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 434 | break; 435 | case 10: { 436 | entries_.AddEntriesFrom(ref input, _repeated_entries_codec); 437 | break; 438 | } 439 | } 440 | } 441 | } 442 | #endif 443 | 444 | } 445 | 446 | #endregion 447 | 448 | } 449 | 450 | #endregion Designer generated code 451 | --------------------------------------------------------------------------------