diff --git a/pkNX.Game/Editors/Poke/PokeEditor8a.cs b/pkNX.Game/Editors/Poke/PokeEditor8a.cs index f98fb678..b5795d83 100644 --- a/pkNX.Game/Editors/Poke/PokeEditor8a.cs +++ b/pkNX.Game/Editors/Poke/PokeEditor8a.cs @@ -13,6 +13,8 @@ public class PokeEditor8a : IDataEditor public TableCache FieldDropTables { get; set; } public TableCache BattleDropTabels { get; set; } public TableCache DexResearch { get; set; } + public TableCache PokeResourceList { get; set; } + public TableCache PokeResourceTable { get; set; } public void CancelEdits() { } @@ -28,5 +30,7 @@ public void Save() FieldDropTables.Save(); BattleDropTabels.Save(); DexResearch.Save(); + PokeResourceList.Save(); + PokeResourceTable.Save(); } } diff --git a/pkNX.Game/File/GameFile.cs b/pkNX.Game/File/GameFile.cs index dc15dd94..5532dc01 100644 --- a/pkNX.Game/File/GameFile.cs +++ b/pkNX.Game/File/GameFile.cs @@ -280,7 +280,7 @@ public enum GameFile FieldItemRespawn, FieldLandmarkInciteConfig, FieldLockonConfig, - FieldMyPokeBallHitNoneTargetConfig, + FieldBallMissedConfig, FieldObstructionWazaConfig, FieldPokemonSlopeConfig, FieldQuestDestinationConfig, @@ -331,4 +331,7 @@ public enum GameFile SoundConfig, WaterMotion, + + PokemonResourceList, + PokemonResourceTable, } diff --git a/pkNX.Game/File/GameFileMapping.cs b/pkNX.Game/File/GameFileMapping.cs index 588a3d17..21f8976d 100644 --- a/pkNX.Game/File/GameFileMapping.cs +++ b/pkNX.Game/File/GameFileMapping.cs @@ -188,16 +188,16 @@ internal void SaveAll() { new(GameFile.TrainerData, "bin", "trainer"), - new(GameFile.GameText0, 0, "bin", "message", "JPN", "common"), - new(GameFile.GameText1, 1, "bin", "message", "JPN_KANJI", "common"), - new(GameFile.GameText2, 2, "bin", "message", "English", "common"), - new(GameFile.GameText3, 3, "bin", "message", "French", "common"), - new(GameFile.GameText4, 4, "bin", "message", "Italian", "common"), - new(GameFile.GameText5, 5, "bin", "message", "German", "common"), + new(GameFile.GameText0, 0, "bin", "message", "JPN", "common"), + new(GameFile.GameText1, 1, "bin", "message", "JPN_KANJI", "common"), + new(GameFile.GameText2, 2, "bin", "message", "English", "common"), + new(GameFile.GameText3, 3, "bin", "message", "French", "common"), + new(GameFile.GameText4, 4, "bin", "message", "Italian", "common"), + new(GameFile.GameText5, 5, "bin", "message", "German", "common"), // 6 unused lang - new(GameFile.GameText6, 7, "bin", "message", "Spanish", "common"), - new(GameFile.GameText7, 8, "bin", "message", "Korean", "common"), - new(GameFile.GameText8, 9, "bin", "message", "Simp_Chinese", "common"), + new(GameFile.GameText6, 7, "bin", "message", "Spanish", "common"), + new(GameFile.GameText7, 8, "bin", "message", "Korean", "common"), + new(GameFile.GameText8, 9, "bin", "message", "Simp_Chinese", "common"), new(GameFile.GameText9, 10, "bin", "message", "Trad_Chinese", "common"), new(GameFile.StoryText0, 0, "bin", "message", "JPN", "script"), @@ -212,146 +212,148 @@ internal void SaveAll() new(GameFile.StoryText8, 9, "bin", "message", "Simp_Chinese", "script"), new(GameFile.StoryText9, 10, "bin", "message", "Trad_Chinese", "script"), - new(GameFile.ItemStats, ContainerType.SingleFile, "bin", "pml", "item", "item.dat"), - new(GameFile.Evolutions, ContainerType.SingleFile, "bin", "pml", "evolution", "evolution_data_total.evobin"), - new(GameFile.PersonalStats, ContainerType.SingleFile, "bin", "pml", "personal", "personal_data_total.perbin"), - new(GameFile.MoveStats, "bin", "pml", "waza"), - new(GameFile.EncounterStatic, ContainerType.SingleFile, "bin", "pokemon", "data", "poke_event_encount.bin"), - new(GameFile.EncounterTrade, ContainerType.SingleFile, "bin", "script_event_data", "field_trade.bin"), - new(GameFile.EncounterGift, ContainerType.SingleFile, "bin", "pokemon", "data", "poke_add.bin"), - new(GameFile.Learnsets, ContainerType.SingleFile, "bin", "pml", "waza_oboe", "waza_oboe_total.wazaoboe"), + new(GameFile.DexResearch , ContainerType.SingleFile, "bin", "appli", "pokedex", "res_table", "pokedex_research_task_table.bin"), + new(GameFile.PokemonResourceList , ContainerType.SingleFile, "bin", "appli", "res_pokemon", "list", "pokemon_info_list.bin"), + new(GameFile.MoveShop , ContainerType.SingleFile, "bin", "appli", "wazaremember", "bin", "wazashop_table.bin"), + new(GameFile.HaShop , ContainerType.SingleFile, "bin", "appli", "shop", "bin", "ha_shop_data.bin"), - new(GameFile.Resident, ContainerType.GFPack, "bin", "archive", "field", "resident_release.gfpak"), - - new(GameFile.FieldDrops, ContainerType.SingleFile, "bin", "pokemon", "data", "poke_drop_item.bin"), - new(GameFile.BattleDrops, ContainerType.SingleFile, "bin", "pokemon", "data", "poke_drop_item_battle.bin"), - - new(GameFile.DexResearch, ContainerType.SingleFile, "bin", "appli", "pokedex", "res_table", "pokedex_research_task_table.bin"), - - new(GameFile.EncounterRateTable, ContainerType.SingleFile, "bin", "pokemon", "data", "poke_encount.bin"), - new(GameFile.PokeMisc, ContainerType.SingleFile, "bin", "pokemon", "data", "poke_misc.bin"), - new(GameFile.Outbreak, ContainerType.SingleFile, "bin", "field", "encount", "huge_outbreak.bin"), - new(GameFile.MoveShop, ContainerType.SingleFile, "bin", "appli", "wazaremember", "bin", "wazashop_table.bin"), - new(GameFile.HaShop, ContainerType.SingleFile, "bin", "appli", "shop", "bin", "ha_shop_data.bin"), + new(GameFile.Resident , ContainerType.GFPack , "bin", "archive", "field", "resident_release.gfpak"), new(GameFile.ThrowPermissionSet , ContainerType.SingleFile, "bin", "capture", "throw_permissionset_dictionary.bin"), new(GameFile.ThrowableParam , ContainerType.SingleFile, "bin", "capture", "throwable_param_table.bin"), new(GameFile.ThrowableResource , ContainerType.SingleFile, "bin", "capture", "throwable_resource_dictionary.bin"), new(GameFile.ThrowableResourceSet , ContainerType.SingleFile, "bin", "capture", "throwable_resourceset_dictionary.bin"), - new(GameFile.SymbolBehave , ContainerType.SingleFile, "bin", "pokemon", "data", "poke_ai.bin"), - - new(GameFile.AICommonConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ai_common_config.bin"), - new(GameFile.AIExcitingConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ai_exciting_config.bin"), - new(GameFile.AIFieldWazaConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ai_field_waza_config.bin"), - new(GameFile.AISemiLegendConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ai_semi_legend_config.bin"), - new(GameFile.AITirednessConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ai_tiredness_config.bin"), - new(GameFile.AppConfigList , ContainerType.SingleFile, "bin", "misc", "app_config", "app_config_list.bin"), - new(GameFile.AppliHudConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "appli_hud_config.bin"), - new(GameFile.AppliStaffrollConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "appli_staffroll_config.bin"), - new(GameFile.AppliTipsConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "appli_tips_config.bin"), - new(GameFile.BattleCommonConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "battle_common_config.bin"), - new(GameFile.BattleEndConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "battle_end_config.bin"), - new(GameFile.BattleInConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "battle_in_config.bin"), - new(GameFile.BattleLogicConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "battle_logic_config.bin"), - new(GameFile.BattleStartConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "battle_start_config.bin"), - new(GameFile.BattleViewConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "battle_view_config.bin"), - new(GameFile.BattleVsnsConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "battle_vsns_config.bin"), - new(GameFile.BuddyBattleConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "buddy_battle_config.bin"), - new(GameFile.BuddyConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "buddy_config.bin"), - new(GameFile.BuddyDirectItemConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "buddy_direct_item_config.bin"), - new(GameFile.BuddyGroupTalkConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "buddy_group_talk_config.bin"), - new(GameFile.BuddyLandmarkConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "buddy_landmark_config.bin"), - new(GameFile.BuddyNPCReactionConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "buddy_npc_reaction_config.bin"), - new(GameFile.BuddyPlayerModeConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "buddy_player_mode_config.bin"), - new(GameFile.BuddyWarpConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "buddy_warp_config.bin"), - new(GameFile.CharacterBipedIkConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "character_biped_ik_config.bin"), - new(GameFile.CharacterBlinkConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "character_blink_config.bin"), - new(GameFile.CharacterControllerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "character_controller_config.bin"), - new(GameFile.CharacterLookAtConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "character_look_at_config.bin"), - new(GameFile.CaptureConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "common_capture_config.bin"), - new(GameFile.CommonGeneralConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "common_general_config.bin"), - new(GameFile.CommonItemConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "common_item_config.bin"), - new(GameFile.DemoConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "demo_config.bin"), - new(GameFile.EnvPokeVoiceConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "env_poke_voice_config.bin"), - new(GameFile.EventBalloonrunConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_balloonrun_config.bin"), - new(GameFile.EventBalloonthrowConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_balloonthrow_config.bin"), - new(GameFile.EventBanditConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_bandit_config.bin"), - new(GameFile.EventCullingConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_culling_config.bin"), - new(GameFile.EventDitherConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_dither_config.bin"), - new(GameFile.EventFarmConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_farm_config.bin"), - new(GameFile.EventGameOverConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_game_over_config.bin"), - new(GameFile.EventItemConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_item_config.bin"), - new(GameFile.EventMkrgRewardConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_mkrg_reward_config.bin"), - new(GameFile.EventQuestBoardConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_quest_board_config.bin"), - new(GameFile.EventRestrictionBattle , ContainerType.SingleFile, "bin", "misc", "app_config", "event_restriction_battle.bin"), - new(GameFile.EventWork , ContainerType.SingleFile, "bin", "misc", "app_config", "event_work.bin"), - new(GameFile.FieldAnimationFramerateConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_anime_framerate_config.bin"), - new(GameFile.FieldAreaSpeedConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_area_speed_config.bin"), - new(GameFile.FieldCameraConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_camera_config.bin"), - new(GameFile.FieldCaptureDirectorConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_capture_director_config.bin"), - new(GameFile.FieldCharaViewerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_chara_viewer_config.bin"), - new(GameFile.FieldCommonConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_common_config.bin"), - new(GameFile.FieldDirectItemConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_direct_item_config.bin"), - new(GameFile.FieldEnvConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_env_config.bin"), - new(GameFile.OutbreakConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_huge_outbreak.bin"), - new(GameFile.FieldItem , ContainerType.SingleFile, "bin", "misc", "app_config", "field_item.bin"), - new(GameFile.FieldItemRespawn , ContainerType.SingleFile, "bin", "misc", "app_config", "field_item_respawn.bin"), - new(GameFile.FieldLandmarkConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_landmark_config.bin"), - new(GameFile.FieldLandmarkInciteConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_landmark_incite_config.bin"), - new(GameFile.FieldLockonConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_lockon_config.bin"), - new(GameFile.BallThrowConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_my_poke_ball_config.bin"), - new(GameFile.FieldMyPokeBallHitNoneTargetConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_my_poke_ball_hit_none_target_config.bin"), - new(GameFile.FieldObstructionWazaConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_obstruction_waza_config.bin"), - new(GameFile.FieldPokemonSlopeConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_pokemon_slope_config.bin"), - new(GameFile.FieldQuestDestinationConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_quest_destination_config.bin"), - new(GameFile.FieldShadowConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_shadow_config.bin"), - new(GameFile.FieldSpawnerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_spawner_config.bin"), - new(GameFile.FieldThrowConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_throw_config.bin"), - new(GameFile.FieldThrowableAfterHitConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_throwable_after_hit_config.bin"), - new(GameFile.FieldVigilanceBgmConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_vigilance_bgm_config.bin"), - new(GameFile.FieldWeatheringConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_weathering_config.bin"), - new(GameFile.FieldWildPokemonConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_wild_pokemon_config.bin"), - new(GameFile.WormholeConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_wormhole_config.bin"), - new(GameFile.NPCAIConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "npc_ai_config.bin"), - new(GameFile.NPCControllerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "npc_controller_config.bin"), - new(GameFile.NPCCreaterConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "npc_creater_config.bin"), - new(GameFile.NPCPokemonAIConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "npc_pokemon_ai_config.bin"), - new(GameFile.NPCPopupConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "npc_popup_config.bin"), - new(GameFile.NPCTalkTableConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "npc_talk_table_config.bin"), - new(GameFile.PlayerCameraShakeConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "player_camera_shake_config.bin"), - new(GameFile.PlayerCollisionConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "player_collision_config.bin"), - new(GameFile.PlayerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "player_config.bin"), - new(GameFile.PlayerControllerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "player_controller_config.bin"), - new(GameFile.PlayerFaceConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "player_face_config.bin"), - new(GameFile.PokemonConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "pokemon_config.bin"), - new(GameFile.PokemonControllerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "pokemon_controller_config.bin"), - new(GameFile.EvolutionConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "pokemon_evolution_config.bin"), - new(GameFile.PokemonFriendshipConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "pokemon_friendship_config.bin"), - new(GameFile.ShinyRolls , ContainerType.SingleFile, "bin", "misc", "app_config", "pokemon_rare.bin"), - new(GameFile.SizeScaleConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "pokemon_size_category_adjust_scale_config.bin"), - new(GameFile.RideBasuraoCollisionConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_basurao_collision_config.bin"), - new(GameFile.RideBasuraoConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_basurao_config.bin"), - new(GameFile.RideChangeConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_change_config.bin"), - new(GameFile.RideCommonConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_common_config.bin"), - new(GameFile.RideNyuuraCollisionConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_nyuura_collision_config.bin"), - new(GameFile.RideNyuuraConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_nyuura_config.bin"), - new(GameFile.RideNyuuraControllerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_nyuura_controller_config.bin"), - new(GameFile.RideOdoshishiCollisionConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_odoshishi_collision_config.bin"), - new(GameFile.RideOdoshishiConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_odoshishi_config.bin"), - new(GameFile.RideRingumaCollisionConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_ringuma_collision_config.bin"), - new(GameFile.RideRingumaConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_ringuma_config.bin"), - new(GameFile.RideRingumaControllerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_ringuma_controller_config.bin"), - new(GameFile.RideWhooguruCollisionConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_whooguru_collision_config.bin"), - new(GameFile.RideWhooguruConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_whooguru_config.bin"), - new(GameFile.RideWhooguruControllerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_whooguru_controller_config.bin"), - new(GameFile.SoundConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "sound_config.bin"), - new(GameFile.WaterMotion , ContainerType.SingleFile, "bin", "misc", "app_config", "water_motion.bin"), - + new(GameFile.Outbreak , ContainerType.SingleFile, "bin", "field", "encount", "huge_outbreak.bin"), new(GameFile.NewHugeGroup , ContainerType.SingleFile, "bin", "field", "encount", "new_huge_outbreak_group.bin"), new(GameFile.NewHugeGroupLottery , ContainerType.SingleFile, "bin", "field", "encount", "new_huge_outbreak_group_lottery.bin"), new(GameFile.NewHugeLottery , ContainerType.SingleFile, "bin", "field", "encount", "new_huge_outbreak_lottery.bin"), new(GameFile.NewHugeTimeLimit , ContainerType.SingleFile, "bin", "field", "encount", "new_huge_outbreak_time_limit.bin"), + + new(GameFile.AICommonConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ai_common_config.bin"), + new(GameFile.AIExcitingConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ai_exciting_config.bin"), + new(GameFile.AIFieldWazaConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ai_field_waza_config.bin"), + new(GameFile.AISemiLegendConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ai_semi_legend_config.bin"), + new(GameFile.AITirednessConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ai_tiredness_config.bin"), + new(GameFile.AppConfigList , ContainerType.SingleFile, "bin", "misc", "app_config", "app_config_list.bin"), + new(GameFile.AppliHudConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "appli_hud_config.bin"), + new(GameFile.AppliStaffrollConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "appli_staffroll_config.bin"), + new(GameFile.AppliTipsConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "appli_tips_config.bin"), + new(GameFile.BattleCommonConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "battle_common_config.bin"), + new(GameFile.BattleEndConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "battle_end_config.bin"), + new(GameFile.BattleInConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "battle_in_config.bin"), + new(GameFile.BattleLogicConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "battle_logic_config.bin"), + new(GameFile.BattleStartConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "battle_start_config.bin"), + new(GameFile.BattleViewConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "battle_view_config.bin"), + new(GameFile.BattleVsnsConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "battle_vsns_config.bin"), + new(GameFile.BuddyBattleConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "buddy_battle_config.bin"), + new(GameFile.BuddyConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "buddy_config.bin"), + new(GameFile.BuddyDirectItemConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "buddy_direct_item_config.bin"), + new(GameFile.BuddyGroupTalkConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "buddy_group_talk_config.bin"), + new(GameFile.BuddyLandmarkConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "buddy_landmark_config.bin"), + new(GameFile.BuddyNPCReactionConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "buddy_npc_reaction_config.bin"), + new(GameFile.BuddyPlayerModeConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "buddy_player_mode_config.bin"), + new(GameFile.BuddyWarpConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "buddy_warp_config.bin"), + new(GameFile.CharacterBipedIkConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "character_biped_ik_config.bin"), + new(GameFile.CharacterBlinkConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "character_blink_config.bin"), + new(GameFile.CharacterControllerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "character_controller_config.bin"), + new(GameFile.CharacterLookAtConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "character_look_at_config.bin"), + new(GameFile.CaptureConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "common_capture_config.bin"), + new(GameFile.CommonGeneralConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "common_general_config.bin"), + new(GameFile.CommonItemConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "common_item_config.bin"), + new(GameFile.DemoConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "demo_config.bin"), + new(GameFile.EnvPokeVoiceConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "env_poke_voice_config.bin"), + new(GameFile.EventBalloonrunConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_balloonrun_config.bin"), + new(GameFile.EventBalloonthrowConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_balloonthrow_config.bin"), + new(GameFile.EventBanditConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_bandit_config.bin"), + new(GameFile.EventCullingConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_culling_config.bin"), + new(GameFile.EventDitherConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_dither_config.bin"), + new(GameFile.EventFarmConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_farm_config.bin"), + new(GameFile.EventGameOverConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_game_over_config.bin"), + new(GameFile.EventItemConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_item_config.bin"), + new(GameFile.EventMkrgRewardConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_mkrg_reward_config.bin"), + new(GameFile.EventQuestBoardConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "event_quest_board_config.bin"), + new(GameFile.EventRestrictionBattle , ContainerType.SingleFile, "bin", "misc", "app_config", "event_restriction_battle.bin"), + new(GameFile.EventWork , ContainerType.SingleFile, "bin", "misc", "app_config", "event_work.bin"), + new(GameFile.FieldAnimationFramerateConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_anime_framerate_config.bin"), + new(GameFile.FieldAreaSpeedConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_area_speed_config.bin"), + new(GameFile.FieldCameraConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_camera_config.bin"), + new(GameFile.FieldCaptureDirectorConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_capture_director_config.bin"), + new(GameFile.FieldCharaViewerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_chara_viewer_config.bin"), + new(GameFile.FieldCommonConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_common_config.bin"), + new(GameFile.FieldDirectItemConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_direct_item_config.bin"), + new(GameFile.FieldEnvConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_env_config.bin"), + new(GameFile.OutbreakConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_huge_outbreak.bin"), + new(GameFile.FieldItem , ContainerType.SingleFile, "bin", "misc", "app_config", "field_item.bin"), + new(GameFile.FieldItemRespawn , ContainerType.SingleFile, "bin", "misc", "app_config", "field_item_respawn.bin"), + new(GameFile.FieldLandmarkConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_landmark_config.bin"), + new(GameFile.FieldLandmarkInciteConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_landmark_incite_config.bin"), + new(GameFile.FieldLockonConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_lockon_config.bin"), + new(GameFile.BallThrowConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_my_poke_ball_config.bin"), + new(GameFile.FieldBallMissedConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_my_poke_ball_hit_none_target_config.bin"), + new(GameFile.FieldObstructionWazaConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_obstruction_waza_config.bin"), + new(GameFile.FieldPokemonSlopeConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_pokemon_slope_config.bin"), + new(GameFile.FieldQuestDestinationConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_quest_destination_config.bin"), + new(GameFile.FieldShadowConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_shadow_config.bin"), + new(GameFile.FieldSpawnerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_spawner_config.bin"), + new(GameFile.FieldThrowConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_throw_config.bin"), + new(GameFile.FieldThrowableAfterHitConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_throwable_after_hit_config.bin"), + new(GameFile.FieldVigilanceBgmConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_vigilance_bgm_config.bin"), + new(GameFile.FieldWeatheringConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_weathering_config.bin"), + new(GameFile.FieldWildPokemonConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_wild_pokemon_config.bin"), + new(GameFile.WormholeConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "field_wormhole_config.bin"), + new(GameFile.NPCAIConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "npc_ai_config.bin"), + new(GameFile.NPCControllerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "npc_controller_config.bin"), + new(GameFile.NPCCreaterConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "npc_creater_config.bin"), + new(GameFile.NPCPokemonAIConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "npc_pokemon_ai_config.bin"), + new(GameFile.NPCPopupConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "npc_popup_config.bin"), + new(GameFile.NPCTalkTableConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "npc_talk_table_config.bin"), + new(GameFile.PlayerCameraShakeConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "player_camera_shake_config.bin"), + new(GameFile.PlayerCollisionConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "player_collision_config.bin"), + new(GameFile.PlayerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "player_config.bin"), + new(GameFile.PlayerControllerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "player_controller_config.bin"), + new(GameFile.PlayerFaceConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "player_face_config.bin"), + new(GameFile.PokemonConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "pokemon_config.bin"), + new(GameFile.PokemonControllerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "pokemon_controller_config.bin"), + new(GameFile.EvolutionConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "pokemon_evolution_config.bin"), + new(GameFile.PokemonFriendshipConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "pokemon_friendship_config.bin"), + new(GameFile.ShinyRolls , ContainerType.SingleFile, "bin", "misc", "app_config", "pokemon_rare.bin"), + new(GameFile.SizeScaleConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "pokemon_size_category_adjust_scale_config.bin"), + new(GameFile.RideBasuraoCollisionConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_basurao_collision_config.bin"), + new(GameFile.RideBasuraoConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_basurao_config.bin"), + new(GameFile.RideChangeConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_change_config.bin"), + new(GameFile.RideCommonConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_common_config.bin"), + new(GameFile.RideNyuuraCollisionConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_nyuura_collision_config.bin"), + new(GameFile.RideNyuuraConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_nyuura_config.bin"), + new(GameFile.RideNyuuraControllerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_nyuura_controller_config.bin"), + new(GameFile.RideOdoshishiCollisionConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_odoshishi_collision_config.bin"), + new(GameFile.RideOdoshishiConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_odoshishi_config.bin"), + new(GameFile.RideRingumaCollisionConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_ringuma_collision_config.bin"), + new(GameFile.RideRingumaConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_ringuma_config.bin"), + new(GameFile.RideRingumaControllerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_ringuma_controller_config.bin"), + new(GameFile.RideWhooguruCollisionConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_whooguru_collision_config.bin"), + new(GameFile.RideWhooguruConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_whooguru_config.bin"), + new(GameFile.RideWhooguruControllerConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "ride_whooguru_controller_config.bin"), + new(GameFile.SoundConfig , ContainerType.SingleFile, "bin", "misc", "app_config", "sound_config.bin"), + new(GameFile.WaterMotion , ContainerType.SingleFile, "bin", "misc", "app_config", "water_motion.bin"), + + new(GameFile.MoveStats , "bin", "pml", "waza"), + new(GameFile.ItemStats , ContainerType.SingleFile, "bin", "pml", "item", "item.dat"), + new(GameFile.Evolutions , ContainerType.SingleFile, "bin", "pml", "evolution", "evolution_data_total.evobin"), + new(GameFile.PersonalStats , ContainerType.SingleFile, "bin", "pml", "personal", "personal_data_total.perbin"), + new(GameFile.Learnsets , ContainerType.SingleFile, "bin", "pml", "waza_oboe", "waza_oboe_total.wazaoboe"), + + new(GameFile.EncounterGift , ContainerType.SingleFile, "bin", "pokemon", "data", "poke_add.bin"), + new(GameFile.SymbolBehave , ContainerType.SingleFile, "bin", "pokemon", "data", "poke_ai.bin"), + new(GameFile.FieldDrops , ContainerType.SingleFile, "bin", "pokemon", "data", "poke_drop_item.bin"), + new(GameFile.BattleDrops , ContainerType.SingleFile, "bin", "pokemon", "data", "poke_drop_item_battle.bin"), + new(GameFile.EncounterRateTable , ContainerType.SingleFile, "bin", "pokemon", "data", "poke_encount.bin"), + new(GameFile.EncounterStatic , ContainerType.SingleFile, "bin", "pokemon", "data", "poke_event_encount.bin"), + new(GameFile.PokeMisc , ContainerType.SingleFile, "bin", "pokemon", "data", "poke_misc.bin"), + new(GameFile.PokemonResourceTable , ContainerType.SingleFile, "bin", "pokemon", "table", "poke_resource_table.trpmcatalog"), + + new(GameFile.EncounterTrade , ContainerType.SingleFile, "bin", "script_event_data", "field_trade.bin"), // Incorrect? + // Cutscenes bin\demo // Models bin\archive\pokemon // pretty much everything is obviously named :) diff --git a/pkNX.Game/GameData8a.cs b/pkNX.Game/GameData8a.cs index 24a0c801..4e5aa3f3 100644 --- a/pkNX.Game/GameData8a.cs +++ b/pkNX.Game/GameData8a.cs @@ -6,8 +6,6 @@ namespace pkNX.Game; public class GameData8a { public IPersonalTable PersonalData { get; internal set; } - public TableCache PokeMiscData { get; internal set; } - public TableCache SymbolBehaveData { get; internal set; } public DataCache MoveData { get; internal set; } public TableCache EvolutionData { get; internal set; } diff --git a/pkNX.Game/GameManagerPLA.cs b/pkNX.Game/GameManagerPLA.cs index cbeb75fd..c258eebe 100644 --- a/pkNX.Game/GameManagerPLA.cs +++ b/pkNX.Game/GameManagerPLA.cs @@ -50,8 +50,6 @@ private void ResetData() // Single Files PersonalData = new PersonalTable8LA(GetFile(GameFile.PersonalStats)), - PokeMiscData = new(GetFile(GameFile.PokeMisc)), - SymbolBehaveData = new(GetFile(GameFile.SymbolBehave)), LevelUpData = new(GetFile(GameFile.Learnsets)), EvolutionData = new(GetFile(GameFile.Evolutions)), diff --git a/pkNX.Structures.FlatBuffers/Arceus/PokeResource/PokeInfoList.cs b/pkNX.Structures.FlatBuffers/Arceus/PokeResource/PokeInfoList.cs index 9b1cf3e9..1374feb2 100644 --- a/pkNX.Structures.FlatBuffers/Arceus/PokeResource/PokeInfoList.cs +++ b/pkNX.Structures.FlatBuffers/Arceus/PokeResource/PokeInfoList.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using System.Diagnostics; using System.Linq; using FlatSharp.Attributes; @@ -23,6 +24,71 @@ public class PokeInfoList8a : IFlatBufferArchive [FlatBufferItem(0)] public string DefaultIcon { get; set; } = string.Empty; [FlatBufferItem(1)] public PokeInfo8a[] Table { get; set; } = Array.Empty(); + public PokeInfo8a GetEntry(ushort species) + { + return Table.FirstOrDefault(z => z.Species == species) ?? + new PokeInfo8a { }; + } + + public bool HasEntry(ushort species) + { + return Table.Any(x => x.Species == species); + } + + public PokeInfo8a AddEntry(ushort species, byte formCount) + { + Debug.Assert(!HasEntry(species), "The resource info table already contains an entry for the same species!"); + + var entry = new PokeInfo8a + { + Species = species, + Children = new PokeInfoDetail8a[formCount] + }; + + int genderId = 0; + + for (int form = 0; form < formCount; form++) + { + entry.Children[form] = new PokeInfoDetail8a + { + Form = form, + Detail = new PokeInfoDetail8a_2[] + { + new() { + IsRare = false, + Detail = new PokeInfoDetail8a_3[] { + new() { + Detail = new PokeInfoDetail8a_5[] { + new() { + AssetName = $"{species:0000}_{genderId:000}_{form:000}_n_00000000_fn_n" + } + } + } + } + }, + new() { + IsRare = true, // Shiny form + Detail = new PokeInfoDetail8a_3[] { + new() { + Detail = new PokeInfoDetail8a_5[] { + new() { + AssetName = $"{species:0000}_{genderId:000}_{form:000}_n_00000000_fn_r" + } + } + } + } + }, + } + }; + } + + + Table = Table.Append(entry) + .OrderBy(x => x.Species) + .ToArray(); + return entry; + } + public (ushort[] SF, byte[] Gender) Parse() { var entries = GetDexFormEntries().GroupBy(z => (int)(ushort)z) @@ -109,7 +175,7 @@ public class PokeInfoDetail8a_5 [FlatBufferTable, TypeConverter(typeof(ExpandableObjectConverter))] public class PokeInfoGender8a { - [FlatBufferItem(00)] public PokeInfoGender GenderValue { get; set; } + [FlatBufferItem(00)] public PokeInfoGender GenderValue { get; set; } = PokeInfoGender.DualGenderNoDifference; } [FlatBufferEnum(typeof(byte))] diff --git a/pkNX.Structures.FlatBuffers/Arceus/PokeResource/PokeResourceTable8a.cs b/pkNX.Structures.FlatBuffers/Arceus/PokeResource/PokeResourceTable8a.cs index e4ed328e..94253a8f 100644 --- a/pkNX.Structures.FlatBuffers/Arceus/PokeResource/PokeResourceTable8a.cs +++ b/pkNX.Structures.FlatBuffers/Arceus/PokeResource/PokeResourceTable8a.cs @@ -1,5 +1,8 @@ using System; using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Linq; using FlatSharp.Attributes; // ReSharper disable UnusedAutoPropertyAccessor.Global @@ -18,6 +21,53 @@ public class PokeResourceTable8a : IFlatBufferArchive { public byte[] Write() => FlatBufferConverter.SerializeFrom(this); + public PokeModelConfig8a GetEntry(ushort species, ushort form, byte gender) + { + return Table.FirstOrDefault(x => x.Meta.Species == species && x.Meta.Form == form && x.Meta.Gender == gender) ?? + new PokeModelConfig8a { }; + } + + public bool HasEntry(ushort species, ushort form, byte gender) + { + return Table.Any(x => x.Meta.Species == species && x.Meta.Form == form && x.Meta.Gender == gender); + } + + public PokeModelConfig8a AddEntry(ushort species, ushort form, byte gender) + { + Debug.Assert(!HasEntry(species, form, gender), "The resource info table already contains an entry for the same species!"); + + string pmStr = $"pm{species:0000}_{gender:00}_{form:00}"; + string basePath = $"bin/pokemon/pm{species:0000}/{pmStr}"; + var entry = new PokeModelConfig8a + { + Meta = new() { Species = species, Form = form, Gender = gender }, + PathModel = $"{basePath}/mdl/{pmStr}.trmdl", + PathConfig = $"{basePath}/mdl/{pmStr}.trmmt", + PathArchive = $"{basePath}/{pmStr}.trpokecfg", + + Field_05 = new AnimationConfigStringTuple8a[] { + new(){ + Name = "base", + Path = $"{basePath}/anm/{pmStr}_base.tracn", + } + }, + + Field_06 = new AnimationConfigStringTuple8a[] { + new() { + Name = "eff", + Path = $"{basePath}/locators/{pmStr}_eff.trskl", + } + }, + }; + + Table = Table.Append(entry) + .OrderBy(x => x.Meta.Species) + .ThenBy(x => x.Meta.Form) + .ThenBy(x => x.Meta.Gender) + .ToArray(); + return entry; + } + [FlatBufferItem(00)] public PokeResourceMeta8a Meta { get; set; } = new(); [FlatBufferItem(01)] public PokeModelConfig8a[] Table { get; set; } = Array.Empty(); } @@ -48,7 +98,6 @@ public class PokeModelMeta8a [FlatBufferItem(00)] public ushort Species { get; set; } [FlatBufferItem(01)] public ushort Form { get; set; } [FlatBufferItem(02)] public byte Gender { get; set; } - [FlatBufferItem(03)] public byte Shiny { get; set; } } [FlatBufferTable, TypeConverter(typeof(ExpandableObjectConverter))] diff --git a/pkNX.WinForms/MainEditor/EditorPLA.cs b/pkNX.WinForms/MainEditor/EditorPLA.cs index 5d2eed6b..07122cee 100644 --- a/pkNX.WinForms/MainEditor/EditorPLA.cs +++ b/pkNX.WinForms/MainEditor/EditorPLA.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text; using System.Windows.Forms; using pkNX.Containers; using pkNX.Game; @@ -140,13 +141,15 @@ public void EditPokemon() var editor = new PokeEditor8a { Personal = Data.PersonalData, - PokeMisc = Data.PokeMiscData, - SymbolBehave = Data.SymbolBehaveData, + PokeMisc = new(ROM.GetFile(GameFile.PokeMisc)), + SymbolBehave = new(ROM.GetFile(GameFile.SymbolBehave)), Evolve = Data.EvolutionData, Learn = Data.LevelUpData, FieldDropTables = Data.FieldDrops, BattleDropTabels = Data.BattleDrops, - DexResearch = Data.DexResearch + DexResearch = Data.DexResearch, + PokeResourceList = new(ROM.GetFile(GameFile.PokemonResourceList)), + PokeResourceTable = new(ROM.GetFile(GameFile.PokemonResourceTable)), }; using var form = new PokeDataUI8a(editor, ROM, Data); form.ShowDialog(); @@ -380,7 +383,7 @@ public void EditNewOutbreakTimeLimit() [EditorCallable(EditorCategory.Field)] public void EditFieldItem() => PopFlatConfig(GameFile.FieldItem, "Field Item"); [EditorCallable(EditorCategory.Field)] public void EditFieldItemRespawn() => PopFlatConfig(GameFile.FieldItemRespawn, "Field Item Respawn"); [EditorCallable(EditorCategory.Field)] public void EditFieldLandmarkInciteConfig() => PopFlatConfig(GameFile.FieldLandmarkInciteConfig, "Field Landmark Incite Config"); - [EditorCallable(EditorCategory.Field)] public void EditFieldMyPokeBallHitNoneTargetConfig() => PopFlatConfig(GameFile.FieldMyPokeBallHitNoneTargetConfig, "Field My Poke Ball Hit None Target Config"); + [EditorCallable(EditorCategory.Field)] public void EditFieldMyPokeBallHitNoneTargetConfig() => PopFlatConfig(GameFile.FieldBallMissedConfig, "Field My Poke Ball Hit None Target Config"); [EditorCallable(EditorCategory.Field)] public void EditFieldObstructionWazaConfig() => PopFlatConfig(GameFile.FieldObstructionWazaConfig, "Field Obstruction Waza Config"); [EditorCallable(EditorCategory.Field)] public void EditFieldPokemonSlopeConfig() => PopFlatConfig(GameFile.FieldPokemonSlopeConfig, "Field Pokemon Slope Config"); [EditorCallable(EditorCategory.Field)] public void EditFieldQuestDestinationConfig() => PopFlatConfig(GameFile.FieldQuestDestinationConfig, "Field Quest Destination Config"); @@ -524,6 +527,21 @@ public void EditNPCModelSet() gfp[index] = FlatBufferConverter.SerializeFrom(obj); } + [EditorCallable(EditorCategory.Graphics)] + public void EditPokeResourceTable() + { + var names = ROM.GetStrings(TextName.SpeciesNames); + PopFlat(GameFile.PokemonResourceTable, "Pokemon Resource Table", z => $"{names[z.Meta.Species]}{(z.Meta.Form == 0 ? "" : $"-{z.Meta.Form}")}{(z.Meta.Gender == 0 ? "" : $" ({z.Meta.Gender})")}"); + } + + [EditorCallable(EditorCategory.Graphics)] + public void EditPokemonResourceList() + { + var names = ROM.GetStrings(TextName.SpeciesNames); + + PopFlat(GameFile.PokemonResourceList, "Pokemon Resource List", z => $"{names[z.Species]}"); + } + #endregion #region Items Editors @@ -637,6 +655,7 @@ public void EditAppConfigList() { PopFlat(GameFile.AppConfigList, "App Config List", z => z.OriginalPath); } + [EditorCallable(EditorCategory.Misc)] public void EditAppliStaffrollConfig() => PopFlatConfig(GameFile.AppliStaffrollConfig, "Appli Staffroll Config Editor"); [EditorCallable(EditorCategory.Misc)] public void EditCommonGeneralConfig() => PopFlatConfig(GameFile.CommonGeneralConfig, "Common General Config Editor"); [EditorCallable(EditorCategory.Misc)] public void EditDemoConfig() => PopFlatConfig(GameFile.DemoConfig, "Demo Config Editor"); diff --git a/pkNX.WinForms/Subforms/PokeDataUI8a.cs b/pkNX.WinForms/Subforms/PokeDataUI8a.cs index adcd392e..afa06c3d 100644 --- a/pkNX.WinForms/Subforms/PokeDataUI8a.cs +++ b/pkNX.WinForms/Subforms/PokeDataUI8a.cs @@ -852,6 +852,16 @@ private void CHK_IsPresentInGame_CheckedChanged(object sender, EventArgs e) Editor.SymbolBehave.Root.AddEntry(cPersonal.DexIndexNational, cPersonal.Form, false); Editor.SymbolBehave.Root.AddEntry(cPersonal.DexIndexNational, cPersonal.Form, true); } + + if (!Editor.PokeResourceList.Root.HasEntry(cPersonal.DexIndexNational)) + { + Editor.PokeResourceList.Root.AddEntry(cPersonal.DexIndexNational, cPersonal.FormCount); + } + + if (!Editor.PokeResourceTable.Root.HasEntry(cPersonal.DexIndexNational, cPersonal.Form, 0)) + { + Editor.PokeResourceTable.Root.AddEntry(cPersonal.DexIndexNational, cPersonal.Form, 0); + } } }